mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-30 18:52:12 +08:00
chore: i18n (#5276)
* chore: notice i18n * feat: add script to clean up unused i18n keys * chore: cleanup i18n keys * refactor(i18n/proxies): migrate proxies UI to structured locale keys * chore: i18n for rule module * chore: i18n for profile module * chore: i18n for connections module * chore: i18n for settings module * chore: i18n for verge settings * chore: i18n for theme settings * chore: i18n for theme * chore(i18n): components.home.* * chore(i18n): remove unused i18n keys * chore(i18n): components.profile.* * chore(i18n): components.connection * chore(i18n): pages.logs.* * chore(i18n): pages.*.provider * chore(i18n): components.settings.externalCors.* * chore(i18n): components.settings.clash.* * chore(i18n): components.settings.liteMode.* * chore(i18n): components.settings.backup.* * chore(i18n): components.settings.clash.port.* * chore(i18n): components.settings.misc.* * chore(i18n): components.settings.update.* * chore(i18n): components.settings.sysproxy.* * chore(i18n): components.settings.sysproxy.* * chore(i18n): pages.profiles.notices/components.providers.notices * refactor(notice): unify showNotice usage * refactor(notice): add typed showNotice shortcuts, centralize defaults, and simplify subscriptions * refactor: unify showNotice usage * refactor(notice): unify showNotice API * refactor(notice): unify showNotice usage * chore(i18n): components.test.* * chore(i18n): components.settings.dns.* * chore(i18n): components.home.clashInfo.* * chore(i18n): components.home.systemInfo.* * chore(i18n): components.home.ipInfo/traffic.* * chore(i18n): navigation.* * refactor(i18n): remove pages.* namespace and migrate route texts under module-level page keys * chore(i18n): common.* * chore(i18n): common.* * fix: change error handling in patch_profiles_config to return false when a switch is in progress * fix: improve error handling in patch_profiles_config to prevent requests during profile switching * fix: change error handling in patch_profiles_config to return false when a switch is in progress fix: ensure CURRENT_SWITCHING_PROFILE is reset after config updates in perform_config_update and patch_profiles_config * chore(i18n): restructure root-level locale keys into namespaces * chore(i18n): add missing i18n keys * docs: i18n guide * chore: adjust i18n * refactor(i18n): align UI actions and status labels with common keys * refactor(i18n): unify two-name locale namespaces * refactor(i18n/components): unify locale keys and update component references * chore(i18n): add shared and entities namespaces to all locale files * refactor(i18n): consolidate shared and entity namespaces across features * chore(deps): update npm dependencies to ^7.3.5 (#5310) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * refactor(i18n): migrate shared editor modes and consolidate entities namespaces * tmp * refactor(i18n): flatten locales and move theme/validation strings * docs: CONTRIBUTING_i18n.md * refactor(i18n): restructure feedback and profile namespaces for better organization * refactor(i18n): unify settings locale structure and update references * refactor(i18n): reorganize locale keys for home, proxies, rules, connections, logs, unlock, and tests * refactor(i18n/feedback/layout): unify shared toasts & normalize layout namespace * refactor(i18n): centralize common UI strings in shared * refactor(i18n): flatten headers and unify locale schema * refactor(i18n): consolidate duplicate per-feature translations into shared namespace * refactor(i18n): split locales into per-namespace files * style: lint * refactor(i18n): unify unlock UI translations under tests namespace * feat(i18n): add type-checked translation keys * style: eslint import order * feat(i18n): replace ad-hoc loader with rust-i18n backend bundles * chore(prebuild): remove locale-copy step * fix(i18n, notice): propagate runtime params and update cleanup script path * fix(i18n,notice): make locale formatting idempotent and guard early notice translations * fix(i18n): resolve locale aliases and match OS codes correctly * fix(unlock): use i18next-compatible double-brace interpolation in failure notice * fix(i18n): route unlock error notices through translation keys * fix(i18n): i18n types * feat(i18n): localize upgrade notice for Clash core viewer * fix(notice): ensure runtime overrides apply to prefix translations * chore(i18n): replace literal notices with translation keys * chore(i18n): types * chore(i18n): regen typings before formatting to keep keys in sync * chore(i18n): simply labels * chore(i18n): adjust translation * chore: remove eslint-plugin-i18next * chore(i18n): add/refine Korean translations across frontend scopes and Rust backend (#5341) * chore(i18n): translate settings.json (missed in previous pass) (#5343) * chore(i18n): add/refine Korean translations across frontend scopes and Rust backend * chore(i18n): add/refine Korean translations across frontend scopes and Rust backend * fix(i18n-tauri): quote placeholder-leading value in ko.yml to prevent rust_i18n parse panic * chore(i18n): translate settings.json (forgot to include previously) --------- Co-authored-by: rozan <34974262+thelojan@users.noreply.github.com>
This commit is contained in:
co-authored by
renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
rozan
parent
c1a2e99f63
commit
c8aa72186e
@@ -0,0 +1,728 @@
|
||||
// This file is auto-generated by scripts/generate-i18n-keys.mjs
|
||||
// Do not edit this file manually.
|
||||
|
||||
export const translationKeys = [
|
||||
"connections.page.title",
|
||||
"connections.components.fields.host",
|
||||
"connections.components.fields.dlSpeed",
|
||||
"connections.components.fields.ulSpeed",
|
||||
"connections.components.fields.chains",
|
||||
"connections.components.fields.rule",
|
||||
"connections.components.fields.process",
|
||||
"connections.components.fields.time",
|
||||
"connections.components.fields.source",
|
||||
"connections.components.fields.destination",
|
||||
"connections.components.fields.destinationPort",
|
||||
"connections.components.fields.type",
|
||||
"connections.components.order.default",
|
||||
"connections.components.order.uploadSpeed",
|
||||
"connections.components.order.downloadSpeed",
|
||||
"connections.components.actions.closeConnection",
|
||||
"home.page.tooltips.lightweightMode",
|
||||
"home.page.tooltips.manual",
|
||||
"home.page.tooltips.settings",
|
||||
"home.page.cards.trafficStats",
|
||||
"home.page.cards.networkSettings",
|
||||
"home.page.cards.proxyMode",
|
||||
"home.page.settings.cards.profile",
|
||||
"home.page.settings.cards.currentProxy",
|
||||
"home.page.settings.cards.network",
|
||||
"home.page.settings.cards.proxyMode",
|
||||
"home.page.settings.cards.traffic",
|
||||
"home.page.settings.cards.tests",
|
||||
"home.page.settings.cards.ip",
|
||||
"home.page.settings.cards.clashInfo",
|
||||
"home.page.settings.cards.systemInfo",
|
||||
"home.page.settings.title",
|
||||
"home.page.title",
|
||||
"home.components.proxyTun.status.systemProxyEnabled",
|
||||
"home.components.proxyTun.status.systemProxyDisabled",
|
||||
"home.components.proxyTun.status.tunModeServiceRequired",
|
||||
"home.components.proxyTun.status.tunModeEnabled",
|
||||
"home.components.proxyTun.status.tunModeDisabled",
|
||||
"home.components.proxyTun.tooltips.systemProxy",
|
||||
"home.components.proxyTun.tooltips.tunMode",
|
||||
"home.components.clashInfo.title",
|
||||
"home.components.clashInfo.fields.coreVersion",
|
||||
"home.components.clashInfo.fields.systemProxyAddress",
|
||||
"home.components.clashInfo.fields.mixedPort",
|
||||
"home.components.clashInfo.fields.uptime",
|
||||
"home.components.clashInfo.fields.rulesCount",
|
||||
"home.components.systemInfo.title",
|
||||
"home.components.systemInfo.fields.osInfo",
|
||||
"home.components.systemInfo.fields.autoLaunch",
|
||||
"home.components.systemInfo.fields.runningMode",
|
||||
"home.components.systemInfo.fields.lastCheckUpdate",
|
||||
"home.components.systemInfo.fields.vergeVersion",
|
||||
"home.components.systemInfo.actions.settings",
|
||||
"home.components.systemInfo.tooltips.autoLaunchAdmin",
|
||||
"home.components.systemInfo.badges.adminMode",
|
||||
"home.components.systemInfo.badges.serviceMode",
|
||||
"home.components.systemInfo.badges.sidecarMode",
|
||||
"home.components.systemInfo.badges.adminServiceMode",
|
||||
"home.components.ipInfo.title",
|
||||
"home.components.ipInfo.labels.ip",
|
||||
"home.components.ipInfo.labels.asn",
|
||||
"home.components.ipInfo.labels.isp",
|
||||
"home.components.ipInfo.labels.org",
|
||||
"home.components.ipInfo.labels.location",
|
||||
"home.components.ipInfo.labels.timezone",
|
||||
"home.components.ipInfo.labels.autoRefresh",
|
||||
"home.components.ipInfo.labels.unknown",
|
||||
"home.components.ipInfo.errors.load",
|
||||
"home.components.currentProxy.title",
|
||||
"home.components.currentProxy.actions.refreshDelay",
|
||||
"home.components.currentProxy.labels.globalMode",
|
||||
"home.components.currentProxy.labels.directMode",
|
||||
"home.components.currentProxy.labels.group",
|
||||
"home.components.currentProxy.labels.proxy",
|
||||
"home.components.currentProxy.labels.noActiveNode",
|
||||
"home.components.tests.title",
|
||||
"home.components.traffic.metrics.uploadSpeed",
|
||||
"home.components.traffic.metrics.downloadSpeed",
|
||||
"home.components.traffic.metrics.activeConnections",
|
||||
"home.components.traffic.metrics.memoryUsage",
|
||||
"home.components.traffic.legends.upload",
|
||||
"home.components.traffic.legends.download",
|
||||
"home.components.traffic.patterns.minutes",
|
||||
"home.components.clashMode.errors.communication",
|
||||
"home.components.clashMode.labels.rule",
|
||||
"home.components.clashMode.labels.global",
|
||||
"home.components.clashMode.labels.direct",
|
||||
"home.components.clashMode.descriptions.rule",
|
||||
"home.components.clashMode.descriptions.global",
|
||||
"home.components.clashMode.descriptions.direct",
|
||||
"layout.components.navigation.tabs.home",
|
||||
"layout.components.navigation.tabs.proxies",
|
||||
"layout.components.navigation.tabs.profiles",
|
||||
"layout.components.navigation.tabs.connections",
|
||||
"layout.components.navigation.tabs.rules",
|
||||
"layout.components.navigation.tabs.logs",
|
||||
"layout.components.navigation.tabs.unlock",
|
||||
"layout.components.navigation.tabs.settings",
|
||||
"layout.components.navigation.menu.reorderMode",
|
||||
"layout.components.navigation.menu.unlock",
|
||||
"layout.components.navigation.menu.lock",
|
||||
"logs.page.title",
|
||||
"profiles.page.actions.updateAll",
|
||||
"profiles.page.actions.viewRuntimeConfig",
|
||||
"profiles.page.actions.reactivate",
|
||||
"profiles.page.actions.import",
|
||||
"profiles.page.batch.actions.delete",
|
||||
"profiles.page.batch.actions.selectAll",
|
||||
"profiles.page.batch.actions.deselectAll",
|
||||
"profiles.page.batch.actions.done",
|
||||
"profiles.page.batch.summary.selected",
|
||||
"profiles.page.batch.summary.items",
|
||||
"profiles.page.batch.title",
|
||||
"profiles.page.importForm.placeholder",
|
||||
"profiles.page.importForm.actions.paste",
|
||||
"profiles.page.feedback.errors.invalidUrl",
|
||||
"profiles.page.feedback.errors.onlyYaml",
|
||||
"profiles.page.feedback.notifications.importRetry",
|
||||
"profiles.page.feedback.notifications.importFail",
|
||||
"profiles.page.feedback.notifications.importNeedsRefresh",
|
||||
"profiles.page.feedback.notifications.importSuccess",
|
||||
"profiles.page.feedback.notifications.profileSwitched",
|
||||
"profiles.page.feedback.notifications.profileReactivated",
|
||||
"profiles.page.feedback.notifications.switchInterrupted",
|
||||
"profiles.page.feedback.notifications.batchDeleted",
|
||||
"profiles.page.feedback.notices.forceRefreshCompleted",
|
||||
"profiles.page.feedback.notices.emergencyRefreshFailed",
|
||||
"profiles.page.title",
|
||||
"profiles.components.card.labels.clickToImport",
|
||||
"profiles.components.fileInput.chooseFile",
|
||||
"profiles.components.menu.home",
|
||||
"profiles.components.menu.select",
|
||||
"profiles.components.menu.editInfo",
|
||||
"profiles.components.menu.editFile",
|
||||
"profiles.components.menu.editRules",
|
||||
"profiles.components.menu.editProxies",
|
||||
"profiles.components.menu.editGroups",
|
||||
"profiles.components.menu.extendConfig",
|
||||
"profiles.components.menu.extendScript",
|
||||
"profiles.components.menu.openFile",
|
||||
"profiles.components.menu.update",
|
||||
"profiles.components.menu.updateViaProxy",
|
||||
"profiles.components.more.global.merge",
|
||||
"profiles.components.more.global.script",
|
||||
"profiles.components.more.chips.merge",
|
||||
"profiles.components.more.chips.script",
|
||||
"profiles.components.profileItem.tooltips.showLast",
|
||||
"profiles.components.profileItem.tooltips.showNext",
|
||||
"profiles.components.profileItem.status.lastUpdateFailed",
|
||||
"profiles.components.profileItem.status.nextUp",
|
||||
"profiles.components.profileItem.status.noSchedule",
|
||||
"profiles.components.profileItem.status.unknown",
|
||||
"profiles.components.profileItem.status.autoUpdateDisabled",
|
||||
"profiles.modals.profileForm.title.create",
|
||||
"profiles.modals.profileForm.title.edit",
|
||||
"profiles.modals.profileForm.fields.type",
|
||||
"profiles.modals.profileForm.fields.description",
|
||||
"profiles.modals.profileForm.fields.subscriptionUrl",
|
||||
"profiles.modals.profileForm.fields.httpTimeout",
|
||||
"profiles.modals.profileForm.fields.updateInterval",
|
||||
"profiles.modals.profileForm.fields.useSystemProxy",
|
||||
"profiles.modals.profileForm.fields.useClashProxy",
|
||||
"profiles.modals.profileForm.fields.acceptInvalidCerts",
|
||||
"profiles.modals.profileForm.fields.allowAutoUpdate",
|
||||
"profiles.modals.profileForm.feedback.notifications.creationRetry",
|
||||
"profiles.modals.profileForm.feedback.notifications.creationSuccess",
|
||||
"profiles.modals.proxiesEditor.title",
|
||||
"profiles.modals.proxiesEditor.placeholders.multiUri",
|
||||
"profiles.modals.proxiesEditor.actions.prepend",
|
||||
"profiles.modals.proxiesEditor.actions.append",
|
||||
"profiles.modals.groupsEditor.title",
|
||||
"profiles.modals.groupsEditor.errors.nameRequired",
|
||||
"profiles.modals.groupsEditor.errors.nameExists",
|
||||
"profiles.modals.groupsEditor.fields.type",
|
||||
"profiles.modals.groupsEditor.fields.name",
|
||||
"profiles.modals.groupsEditor.fields.icon",
|
||||
"profiles.modals.groupsEditor.fields.proxies",
|
||||
"profiles.modals.groupsEditor.fields.provider",
|
||||
"profiles.modals.groupsEditor.fields.healthCheckUrl",
|
||||
"profiles.modals.groupsEditor.fields.expectedStatus",
|
||||
"profiles.modals.groupsEditor.fields.interval",
|
||||
"profiles.modals.groupsEditor.fields.maxFailedTimes",
|
||||
"profiles.modals.groupsEditor.fields.interfaceName",
|
||||
"profiles.modals.groupsEditor.fields.routingMark",
|
||||
"profiles.modals.groupsEditor.fields.filter",
|
||||
"profiles.modals.groupsEditor.fields.excludeFilter",
|
||||
"profiles.modals.groupsEditor.fields.excludeType",
|
||||
"profiles.modals.groupsEditor.fields.includeAll",
|
||||
"profiles.modals.groupsEditor.fields.includeAllProxies",
|
||||
"profiles.modals.groupsEditor.fields.includeAllProviders",
|
||||
"profiles.modals.groupsEditor.toggles.lazy",
|
||||
"profiles.modals.groupsEditor.toggles.disableUdp",
|
||||
"profiles.modals.groupsEditor.toggles.hidden",
|
||||
"profiles.modals.groupsEditor.actions.prepend",
|
||||
"profiles.modals.groupsEditor.actions.append",
|
||||
"profiles.modals.editor.actions.format",
|
||||
"profiles.modals.editor.messages.readOnly",
|
||||
"profiles.modals.confirmDelete.title",
|
||||
"profiles.modals.confirmDelete.message",
|
||||
"profiles.modals.logViewer.title",
|
||||
"proxies.page.modes.rule",
|
||||
"proxies.page.modes.global",
|
||||
"proxies.page.modes.direct",
|
||||
"proxies.page.actions.toggleChain",
|
||||
"proxies.page.actions.connect",
|
||||
"proxies.page.actions.disconnect",
|
||||
"proxies.page.actions.connecting",
|
||||
"proxies.page.actions.clearChainConfig",
|
||||
"proxies.page.provider.title",
|
||||
"proxies.page.provider.actions.updateAll",
|
||||
"proxies.page.provider.actions.update",
|
||||
"proxies.page.rules.title",
|
||||
"proxies.page.rules.select",
|
||||
"proxies.page.labels.proxyCount",
|
||||
"proxies.page.labels.delayCheckReset",
|
||||
"proxies.page.tooltips.locate",
|
||||
"proxies.page.tooltips.delayCheck",
|
||||
"proxies.page.tooltips.sortDefault",
|
||||
"proxies.page.tooltips.sortDelay",
|
||||
"proxies.page.tooltips.sortName",
|
||||
"proxies.page.tooltips.delayCheckUrl",
|
||||
"proxies.page.tooltips.showBasic",
|
||||
"proxies.page.tooltips.showDetail",
|
||||
"proxies.page.tooltips.filter",
|
||||
"proxies.page.placeholders.delayCheckUrl",
|
||||
"proxies.page.chain.header",
|
||||
"proxies.page.chain.empty",
|
||||
"proxies.page.chain.instruction",
|
||||
"proxies.page.chain.minimumNodes",
|
||||
"proxies.page.chain.minimumNodesHint",
|
||||
"proxies.page.chain.connectFailed",
|
||||
"proxies.page.chain.disconnectFailed",
|
||||
"proxies.page.chain.duplicateNode",
|
||||
"proxies.page.messages.directMode",
|
||||
"proxies.page.title.default",
|
||||
"proxies.page.title.chainMode",
|
||||
"proxies.feedback.notifications.provider.updateSuccess",
|
||||
"proxies.feedback.notifications.provider.updateFailed",
|
||||
"proxies.feedback.notifications.provider.genericError",
|
||||
"proxies.feedback.notifications.provider.none",
|
||||
"proxies.feedback.notifications.provider.allUpdated",
|
||||
"proxies.components.enums.strategies.select",
|
||||
"proxies.components.enums.strategies.url-test",
|
||||
"proxies.components.enums.strategies.fallback",
|
||||
"proxies.components.enums.strategies.load-balance",
|
||||
"proxies.components.enums.strategies.relay",
|
||||
"proxies.components.enums.policies.DIRECT",
|
||||
"proxies.components.enums.policies.REJECT",
|
||||
"proxies.components.enums.policies.REJECT-DROP",
|
||||
"proxies.components.enums.policies.PASS",
|
||||
"rules.page.provider.trigger",
|
||||
"rules.page.provider.dialogTitle",
|
||||
"rules.page.provider.actions.updateAll",
|
||||
"rules.page.provider.actions.update",
|
||||
"rules.page.title",
|
||||
"rules.feedback.notifications.provider.updateSuccess",
|
||||
"rules.feedback.notifications.provider.updateFailed",
|
||||
"rules.feedback.notifications.provider.genericError",
|
||||
"rules.feedback.notifications.provider.none",
|
||||
"rules.feedback.notifications.provider.allUpdated",
|
||||
"rules.modals.editor.form.labels.type",
|
||||
"rules.modals.editor.form.labels.content",
|
||||
"rules.modals.editor.form.labels.proxyPolicy",
|
||||
"rules.modals.editor.form.toggles.noResolve",
|
||||
"rules.modals.editor.form.actions.prependRule",
|
||||
"rules.modals.editor.form.actions.appendRule",
|
||||
"rules.modals.editor.form.validation.conditionRequired",
|
||||
"rules.modals.editor.form.validation.invalidRule",
|
||||
"rules.modals.editor.ruleTypes.DOMAIN",
|
||||
"rules.modals.editor.ruleTypes.DOMAIN-SUFFIX",
|
||||
"rules.modals.editor.ruleTypes.DOMAIN-KEYWORD",
|
||||
"rules.modals.editor.ruleTypes.DOMAIN-REGEX",
|
||||
"rules.modals.editor.ruleTypes.GEOSITE",
|
||||
"rules.modals.editor.ruleTypes.GEOIP",
|
||||
"rules.modals.editor.ruleTypes.SRC-GEOIP",
|
||||
"rules.modals.editor.ruleTypes.IP-ASN",
|
||||
"rules.modals.editor.ruleTypes.SRC-IP-ASN",
|
||||
"rules.modals.editor.ruleTypes.IP-CIDR",
|
||||
"rules.modals.editor.ruleTypes.IP-CIDR6",
|
||||
"rules.modals.editor.ruleTypes.SRC-IP-CIDR",
|
||||
"rules.modals.editor.ruleTypes.IP-SUFFIX",
|
||||
"rules.modals.editor.ruleTypes.SRC-IP-SUFFIX",
|
||||
"rules.modals.editor.ruleTypes.SRC-PORT",
|
||||
"rules.modals.editor.ruleTypes.DST-PORT",
|
||||
"rules.modals.editor.ruleTypes.IN-PORT",
|
||||
"rules.modals.editor.ruleTypes.DSCP",
|
||||
"rules.modals.editor.ruleTypes.PROCESS-NAME",
|
||||
"rules.modals.editor.ruleTypes.PROCESS-PATH",
|
||||
"rules.modals.editor.ruleTypes.PROCESS-NAME-REGEX",
|
||||
"rules.modals.editor.ruleTypes.PROCESS-PATH-REGEX",
|
||||
"rules.modals.editor.ruleTypes.NETWORK",
|
||||
"rules.modals.editor.ruleTypes.UID",
|
||||
"rules.modals.editor.ruleTypes.IN-TYPE",
|
||||
"rules.modals.editor.ruleTypes.IN-USER",
|
||||
"rules.modals.editor.ruleTypes.IN-NAME",
|
||||
"rules.modals.editor.ruleTypes.SUB-RULE",
|
||||
"rules.modals.editor.ruleTypes.RULE-SET",
|
||||
"rules.modals.editor.ruleTypes.AND",
|
||||
"rules.modals.editor.ruleTypes.OR",
|
||||
"rules.modals.editor.ruleTypes.NOT",
|
||||
"rules.modals.editor.ruleTypes.MATCH",
|
||||
"rules.modals.editor.title",
|
||||
"settings.page.actions.manual",
|
||||
"settings.page.actions.telegram",
|
||||
"settings.page.actions.github",
|
||||
"settings.page.title",
|
||||
"settings.sections.system.title",
|
||||
"settings.sections.system.toggles.tunMode",
|
||||
"settings.sections.system.toggles.systemProxy",
|
||||
"settings.sections.system.tooltips.autoLaunchAdmin",
|
||||
"settings.sections.system.tooltips.silentStart",
|
||||
"settings.sections.system.fields.autoLaunch",
|
||||
"settings.sections.system.fields.silentStart",
|
||||
"settings.sections.system.notifications.tunMode.autoDisabled",
|
||||
"settings.sections.system.notifications.tunMode.autoDisableFailed",
|
||||
"settings.sections.proxyControl.tooltips.systemProxy",
|
||||
"settings.sections.proxyControl.tooltips.tunMode",
|
||||
"settings.sections.proxyControl.tooltips.tunUnavailable",
|
||||
"settings.sections.proxyControl.actions.installService",
|
||||
"settings.sections.proxyControl.actions.uninstallService",
|
||||
"settings.sections.proxyControl.fields.systemProxy",
|
||||
"settings.sections.proxyControl.fields.tunMode",
|
||||
"settings.sections.externalController.title",
|
||||
"settings.sections.externalController.fields.enable",
|
||||
"settings.sections.externalController.fields.address",
|
||||
"settings.sections.externalController.fields.secret",
|
||||
"settings.sections.externalController.placeholders.address",
|
||||
"settings.sections.externalController.placeholders.secret",
|
||||
"settings.sections.externalController.tooltips.copy",
|
||||
"settings.sections.externalController.messages.addressRequired",
|
||||
"settings.sections.externalController.messages.secretRequired",
|
||||
"settings.sections.externalController.messages.copyFailed",
|
||||
"settings.sections.externalController.messages.controllerCopied",
|
||||
"settings.sections.externalController.messages.secretCopied",
|
||||
"settings.sections.externalCors.title",
|
||||
"settings.sections.externalCors.fields.allowPrivateNetwork",
|
||||
"settings.sections.externalCors.fields.allowedOrigins",
|
||||
"settings.sections.externalCors.placeholders.origin",
|
||||
"settings.sections.externalCors.actions.add",
|
||||
"settings.sections.externalCors.messages.alwaysIncluded",
|
||||
"settings.sections.externalCors.tooltips.open",
|
||||
"settings.sections.appearance.light",
|
||||
"settings.sections.appearance.dark",
|
||||
"settings.sections.appearance.system",
|
||||
"settings.sections.clash.title",
|
||||
"settings.sections.clash.form.fields.allowLan",
|
||||
"settings.sections.clash.form.fields.dnsOverwrite",
|
||||
"settings.sections.clash.form.fields.ipv6",
|
||||
"settings.sections.clash.form.fields.unifiedDelay",
|
||||
"settings.sections.clash.form.fields.logLevel",
|
||||
"settings.sections.clash.form.fields.portConfig",
|
||||
"settings.sections.clash.form.fields.external",
|
||||
"settings.sections.clash.form.fields.webUI",
|
||||
"settings.sections.clash.form.fields.clashCore",
|
||||
"settings.sections.clash.form.fields.openUwpTool",
|
||||
"settings.sections.clash.form.fields.updateGeoData",
|
||||
"settings.sections.clash.form.tooltips.networkInterface",
|
||||
"settings.sections.clash.form.tooltips.unifiedDelay",
|
||||
"settings.sections.clash.form.tooltips.logLevel",
|
||||
"settings.sections.clash.form.tooltips.openUwpTool",
|
||||
"settings.sections.clash.form.options.logLevel.debug",
|
||||
"settings.sections.clash.form.options.logLevel.info",
|
||||
"settings.sections.clash.form.options.logLevel.warning",
|
||||
"settings.sections.clash.form.options.logLevel.error",
|
||||
"settings.sections.clash.form.options.logLevel.silent",
|
||||
"settings.components.verge.basic.title",
|
||||
"settings.components.verge.basic.actions.browse",
|
||||
"settings.components.verge.basic.trayOptions.showMainWindow",
|
||||
"settings.components.verge.basic.trayOptions.showTrayMenu",
|
||||
"settings.components.verge.basic.trayOptions.disable",
|
||||
"settings.components.verge.basic.fields.language",
|
||||
"settings.components.verge.basic.fields.themeMode",
|
||||
"settings.components.verge.basic.fields.trayClickEvent",
|
||||
"settings.components.verge.basic.fields.copyEnvType",
|
||||
"settings.components.verge.basic.fields.startPage",
|
||||
"settings.components.verge.basic.fields.startupScript",
|
||||
"settings.components.verge.basic.fields.themeSetting",
|
||||
"settings.components.verge.basic.fields.layoutSetting",
|
||||
"settings.components.verge.basic.fields.misc",
|
||||
"settings.components.verge.basic.fields.hotkeySetting",
|
||||
"settings.components.verge.advanced.title",
|
||||
"settings.components.verge.advanced.tooltips.backupInfo",
|
||||
"settings.components.verge.advanced.tooltips.openConfDir",
|
||||
"settings.components.verge.advanced.tooltips.liteMode",
|
||||
"settings.components.verge.advanced.actions.copyVersion",
|
||||
"settings.components.verge.advanced.notifications.latestVersion",
|
||||
"settings.components.verge.advanced.notifications.versionCopied",
|
||||
"settings.components.verge.advanced.fields.backupSetting",
|
||||
"settings.components.verge.advanced.fields.runtimeConfig",
|
||||
"settings.components.verge.advanced.fields.openConfDir",
|
||||
"settings.components.verge.advanced.fields.openCoreDir",
|
||||
"settings.components.verge.advanced.fields.openLogsDir",
|
||||
"settings.components.verge.advanced.fields.checkUpdates",
|
||||
"settings.components.verge.advanced.fields.openDevTools",
|
||||
"settings.components.verge.advanced.fields.liteModeSettings",
|
||||
"settings.components.verge.advanced.fields.exit",
|
||||
"settings.components.verge.advanced.fields.exportDiagnostics",
|
||||
"settings.components.verge.advanced.fields.vergeVersion",
|
||||
"settings.components.verge.theme.title",
|
||||
"settings.components.verge.theme.fields.primaryColor",
|
||||
"settings.components.verge.theme.fields.secondaryColor",
|
||||
"settings.components.verge.theme.fields.primaryText",
|
||||
"settings.components.verge.theme.fields.secondaryText",
|
||||
"settings.components.verge.theme.fields.infoColor",
|
||||
"settings.components.verge.theme.fields.warningColor",
|
||||
"settings.components.verge.theme.fields.errorColor",
|
||||
"settings.components.verge.theme.fields.successColor",
|
||||
"settings.components.verge.theme.fields.fontFamily",
|
||||
"settings.components.verge.theme.fields.cssInjection",
|
||||
"settings.components.verge.theme.actions.editCss",
|
||||
"settings.components.verge.theme.dialogs.editCssTitle",
|
||||
"settings.components.verge.layout.title",
|
||||
"settings.components.verge.layout.fields.preferSystemTitlebar",
|
||||
"settings.components.verge.layout.fields.trafficGraph",
|
||||
"settings.components.verge.layout.fields.memoryUsage",
|
||||
"settings.components.verge.layout.fields.proxyGroupIcon",
|
||||
"settings.components.verge.layout.fields.hoverNavigator",
|
||||
"settings.components.verge.layout.fields.hoverNavigatorDelay",
|
||||
"settings.components.verge.layout.fields.navIcon",
|
||||
"settings.components.verge.layout.fields.trayIcon",
|
||||
"settings.components.verge.layout.fields.showProxyGroupsInline",
|
||||
"settings.components.verge.layout.fields.commonTrayIcon",
|
||||
"settings.components.verge.layout.fields.systemProxyTrayIcon",
|
||||
"settings.components.verge.layout.fields.tunTrayIcon",
|
||||
"settings.components.verge.layout.fields.enableTrayIcon",
|
||||
"settings.components.verge.layout.fields.enableTraySpeed",
|
||||
"settings.components.verge.layout.tooltips.hoverNavigator",
|
||||
"settings.components.verge.layout.tooltips.hoverNavigatorDelay",
|
||||
"settings.components.verge.layout.options.icon.monochrome",
|
||||
"settings.components.verge.layout.options.icon.colorful",
|
||||
"settings.components.verge.layout.options.icon.disable",
|
||||
"settings.modals.clashPort.title",
|
||||
"settings.modals.clashPort.fields.mixed",
|
||||
"settings.modals.clashPort.fields.socks",
|
||||
"settings.modals.clashPort.fields.http",
|
||||
"settings.modals.clashPort.fields.redir",
|
||||
"settings.modals.clashPort.fields.tproxy",
|
||||
"settings.modals.clashPort.actions.random",
|
||||
"settings.modals.clashPort.messages.saved",
|
||||
"settings.modals.clashPort.messages.saveFailed",
|
||||
"settings.modals.clashCore.variants.release",
|
||||
"settings.modals.clashCore.variants.alpha",
|
||||
"settings.modals.liteMode.title",
|
||||
"settings.modals.liteMode.actions.enterNow",
|
||||
"settings.modals.liteMode.toggles.autoEnter",
|
||||
"settings.modals.liteMode.tooltips.autoEnter",
|
||||
"settings.modals.liteMode.fields.delay",
|
||||
"settings.modals.liteMode.messages.autoEnterHint",
|
||||
"settings.modals.backup.title",
|
||||
"settings.modals.backup.tabs.local",
|
||||
"settings.modals.backup.tabs.webdav",
|
||||
"settings.modals.backup.actions.selectTarget",
|
||||
"settings.modals.backup.actions.backup",
|
||||
"settings.modals.backup.actions.export",
|
||||
"settings.modals.backup.actions.exportBackup",
|
||||
"settings.modals.backup.actions.deleteBackup",
|
||||
"settings.modals.backup.actions.restore",
|
||||
"settings.modals.backup.actions.restoreBackup",
|
||||
"settings.modals.backup.fields.webdavUrl",
|
||||
"settings.modals.backup.fields.username",
|
||||
"settings.modals.backup.fields.info",
|
||||
"settings.modals.backup.messages.webdavUrlRequired",
|
||||
"settings.modals.backup.messages.invalidWebdavUrl",
|
||||
"settings.modals.backup.messages.usernameRequired",
|
||||
"settings.modals.backup.messages.passwordRequired",
|
||||
"settings.modals.backup.messages.webdavConfigSaved",
|
||||
"settings.modals.backup.messages.webdavConfigSaveFailed",
|
||||
"settings.modals.backup.messages.backupCreated",
|
||||
"settings.modals.backup.messages.backupFailed",
|
||||
"settings.modals.backup.messages.localBackupCreated",
|
||||
"settings.modals.backup.messages.localBackupFailed",
|
||||
"settings.modals.backup.messages.restoreSuccess",
|
||||
"settings.modals.backup.messages.localBackupExported",
|
||||
"settings.modals.backup.messages.localBackupExportFailed",
|
||||
"settings.modals.backup.messages.confirmDelete",
|
||||
"settings.modals.backup.messages.confirmRestore",
|
||||
"settings.modals.backup.table.filename",
|
||||
"settings.modals.backup.table.backupTime",
|
||||
"settings.modals.backup.table.actions",
|
||||
"settings.modals.backup.table.noBackups",
|
||||
"settings.modals.backup.table.rowsPerPage",
|
||||
"settings.modals.misc.title",
|
||||
"settings.modals.misc.fields.appLogLevel",
|
||||
"settings.modals.misc.fields.appLogMaxSize",
|
||||
"settings.modals.misc.fields.appLogMaxCount",
|
||||
"settings.modals.misc.fields.autoCloseConnections",
|
||||
"settings.modals.misc.fields.autoCheckUpdate",
|
||||
"settings.modals.misc.fields.enableBuiltinEnhanced",
|
||||
"settings.modals.misc.fields.proxyLayoutColumns",
|
||||
"settings.modals.misc.fields.autoLogClean",
|
||||
"settings.modals.misc.fields.autoDelayDetection",
|
||||
"settings.modals.misc.fields.defaultLatencyTest",
|
||||
"settings.modals.misc.fields.defaultLatencyTimeout",
|
||||
"settings.modals.misc.tooltips.autoCloseConnections",
|
||||
"settings.modals.misc.tooltips.enableBuiltinEnhanced",
|
||||
"settings.modals.misc.tooltips.autoDelayDetection",
|
||||
"settings.modals.misc.tooltips.defaultLatencyTest",
|
||||
"settings.modals.misc.options.proxyLayoutColumns.auto",
|
||||
"settings.modals.misc.options.autoLogClean.never",
|
||||
"settings.modals.misc.options.autoLogClean.retainDays",
|
||||
"settings.modals.update.title",
|
||||
"settings.modals.update.actions.goToRelease",
|
||||
"settings.modals.update.actions.update",
|
||||
"settings.modals.update.messages.portableError",
|
||||
"settings.modals.update.messages.breakChangeError",
|
||||
"settings.modals.sysproxy.title",
|
||||
"settings.modals.sysproxy.fieldsets.currentStatus",
|
||||
"settings.modals.sysproxy.fields.enableStatus",
|
||||
"settings.modals.sysproxy.fields.serverAddr",
|
||||
"settings.modals.sysproxy.fields.pacUrl",
|
||||
"settings.modals.sysproxy.fields.proxyHost",
|
||||
"settings.modals.sysproxy.fields.usePacMode",
|
||||
"settings.modals.sysproxy.fields.proxyGuard",
|
||||
"settings.modals.sysproxy.fields.guardDuration",
|
||||
"settings.modals.sysproxy.fields.alwaysUseDefaultBypass",
|
||||
"settings.modals.sysproxy.fields.proxyBypass",
|
||||
"settings.modals.sysproxy.fields.bypass",
|
||||
"settings.modals.sysproxy.fields.pacScriptContent",
|
||||
"settings.modals.sysproxy.tooltips.proxyGuard",
|
||||
"settings.modals.sysproxy.messages.durationTooShort",
|
||||
"settings.modals.sysproxy.messages.invalidBypass",
|
||||
"settings.modals.sysproxy.messages.invalidProxyHost",
|
||||
"settings.modals.sysproxy.actions.editPac",
|
||||
"settings.modals.tun.title",
|
||||
"settings.modals.tun.fields.stack",
|
||||
"settings.modals.tun.fields.device",
|
||||
"settings.modals.tun.fields.autoRoute",
|
||||
"settings.modals.tun.fields.strictRoute",
|
||||
"settings.modals.tun.fields.autoDetectInterface",
|
||||
"settings.modals.tun.fields.dnsHijack",
|
||||
"settings.modals.tun.fields.mtu",
|
||||
"settings.modals.tun.tooltips.dnsHijack",
|
||||
"settings.modals.tun.messages.applied",
|
||||
"settings.modals.dns.dialog.title",
|
||||
"settings.modals.dns.dialog.warning",
|
||||
"settings.modals.dns.sections.general",
|
||||
"settings.modals.dns.sections.fallbackFilter",
|
||||
"settings.modals.dns.sections.hosts",
|
||||
"settings.modals.dns.fields.enable",
|
||||
"settings.modals.dns.fields.listen",
|
||||
"settings.modals.dns.fields.enhancedMode",
|
||||
"settings.modals.dns.fields.fakeIpRange",
|
||||
"settings.modals.dns.fields.fakeIpFilterMode",
|
||||
"settings.modals.dns.fields.ipv6.label",
|
||||
"settings.modals.dns.fields.ipv6.description",
|
||||
"settings.modals.dns.fields.preferH3.label",
|
||||
"settings.modals.dns.fields.preferH3.description",
|
||||
"settings.modals.dns.fields.respectRules.label",
|
||||
"settings.modals.dns.fields.respectRules.description",
|
||||
"settings.modals.dns.fields.useHosts.label",
|
||||
"settings.modals.dns.fields.useHosts.description",
|
||||
"settings.modals.dns.fields.useSystemHosts.label",
|
||||
"settings.modals.dns.fields.useSystemHosts.description",
|
||||
"settings.modals.dns.fields.directPolicy.label",
|
||||
"settings.modals.dns.fields.directPolicy.description",
|
||||
"settings.modals.dns.fields.defaultNameserver.label",
|
||||
"settings.modals.dns.fields.defaultNameserver.description",
|
||||
"settings.modals.dns.fields.nameserver.label",
|
||||
"settings.modals.dns.fields.nameserver.description",
|
||||
"settings.modals.dns.fields.fallback.label",
|
||||
"settings.modals.dns.fields.fallback.description",
|
||||
"settings.modals.dns.fields.proxy.label",
|
||||
"settings.modals.dns.fields.proxy.description",
|
||||
"settings.modals.dns.fields.directNameserver.label",
|
||||
"settings.modals.dns.fields.directNameserver.description",
|
||||
"settings.modals.dns.fields.fakeIpFilter.label",
|
||||
"settings.modals.dns.fields.fakeIpFilter.description",
|
||||
"settings.modals.dns.fields.nameserverPolicy.label",
|
||||
"settings.modals.dns.fields.nameserverPolicy.description",
|
||||
"settings.modals.dns.fields.geoipFiltering.label",
|
||||
"settings.modals.dns.fields.geoipFiltering.description",
|
||||
"settings.modals.dns.fields.geoipCode",
|
||||
"settings.modals.dns.fields.fallbackIpCidr.label",
|
||||
"settings.modals.dns.fields.fallbackIpCidr.description",
|
||||
"settings.modals.dns.fields.fallbackDomain.label",
|
||||
"settings.modals.dns.fields.fallbackDomain.description",
|
||||
"settings.modals.dns.fields.hosts.label",
|
||||
"settings.modals.dns.fields.hosts.description",
|
||||
"settings.modals.dns.messages.saved",
|
||||
"settings.modals.dns.messages.configError",
|
||||
"settings.modals.dns.errors.invalid",
|
||||
"settings.modals.dns.errors.invalidYaml",
|
||||
"settings.modals.webUI.actions.openUrl",
|
||||
"settings.modals.webUI.title",
|
||||
"settings.modals.webUI.messages.supportedPlaceholders",
|
||||
"settings.modals.webUI.messages.placeholderInstruction",
|
||||
"settings.modals.hotkey.toggles.enableGlobal",
|
||||
"settings.modals.hotkey.title",
|
||||
"settings.modals.hotkey.functions.rule",
|
||||
"settings.modals.hotkey.functions.global",
|
||||
"settings.modals.hotkey.functions.openOrCloseDashboard",
|
||||
"settings.modals.hotkey.functions.toggleSystemProxy",
|
||||
"settings.modals.hotkey.functions.toggleTunMode",
|
||||
"settings.modals.hotkey.functions.entryLightweightMode",
|
||||
"settings.modals.hotkey.functions.direct",
|
||||
"settings.modals.password.prompts.enterRoot",
|
||||
"settings.modals.networkInterface.title",
|
||||
"settings.modals.networkInterface.fields.ipAddress",
|
||||
"settings.modals.networkInterface.fields.macAddress",
|
||||
"settings.feedback.notifications.clash.restartSuccess",
|
||||
"settings.feedback.notifications.clash.versionUpdated",
|
||||
"settings.feedback.notifications.clash.alreadyLatestVersion",
|
||||
"settings.feedback.notifications.clash.changeSuccess",
|
||||
"settings.feedback.notifications.clash.changeFailed",
|
||||
"settings.feedback.notifications.clash.geoDataUpdated",
|
||||
"settings.feedback.notifications.clashService.installSuccess",
|
||||
"settings.feedback.notifications.clashService.uninstallSuccess",
|
||||
"settings.feedback.notifications.updater.withClashProxySuccess",
|
||||
"settings.feedback.notifications.updater.withClashProxyFailed",
|
||||
"settings.statuses.clash.stopping",
|
||||
"settings.statuses.clash.restarting",
|
||||
"settings.statuses.clashService.installing",
|
||||
"settings.statuses.clashService.uninstalling",
|
||||
"shared.actions.cancel",
|
||||
"shared.actions.close",
|
||||
"shared.actions.confirm",
|
||||
"shared.actions.save",
|
||||
"shared.actions.delete",
|
||||
"shared.actions.edit",
|
||||
"shared.actions.new",
|
||||
"shared.actions.enable",
|
||||
"shared.actions.upgrade",
|
||||
"shared.actions.restart",
|
||||
"shared.actions.resetToDefault",
|
||||
"shared.actions.refresh",
|
||||
"shared.actions.retry",
|
||||
"shared.actions.refreshPage",
|
||||
"shared.actions.showDetails",
|
||||
"shared.actions.hideDetails",
|
||||
"shared.actions.listView",
|
||||
"shared.actions.tableView",
|
||||
"shared.actions.pause",
|
||||
"shared.actions.resume",
|
||||
"shared.actions.closeAll",
|
||||
"shared.actions.clear",
|
||||
"shared.labels.updateAt",
|
||||
"shared.labels.timeout",
|
||||
"shared.labels.icon",
|
||||
"shared.labels.name",
|
||||
"shared.labels.readOnly",
|
||||
"shared.labels.expireTime",
|
||||
"shared.labels.updateTime",
|
||||
"shared.labels.usedTotal",
|
||||
"shared.labels.from",
|
||||
"shared.labels.password",
|
||||
"shared.labels.retryAttempts",
|
||||
"shared.labels.downloaded",
|
||||
"shared.labels.uploaded",
|
||||
"shared.statuses.enabled",
|
||||
"shared.statuses.disabled",
|
||||
"shared.statuses.saving",
|
||||
"shared.statuses.empty",
|
||||
"shared.units.milliseconds",
|
||||
"shared.units.seconds",
|
||||
"shared.units.minutes",
|
||||
"shared.units.kilobytes",
|
||||
"shared.units.files",
|
||||
"shared.placeholders.filter",
|
||||
"shared.placeholders.matchCase",
|
||||
"shared.placeholders.matchWholeWord",
|
||||
"shared.placeholders.useRegex",
|
||||
"shared.validation.invalidRegex",
|
||||
"shared.window.maximize",
|
||||
"shared.window.minimize",
|
||||
"shared.editorModes.visualization",
|
||||
"shared.editorModes.advanced",
|
||||
"shared.feedback.errors.trafficStats",
|
||||
"shared.feedback.errors.trafficStatsDescription",
|
||||
"shared.feedback.notices.raw",
|
||||
"shared.feedback.notices.prefixedRaw",
|
||||
"shared.feedback.notifications.importSuccess",
|
||||
"shared.feedback.notifications.importSubscriptionSuccess",
|
||||
"shared.feedback.notifications.importWithClashProxy",
|
||||
"shared.feedback.notifications.updateAvailable",
|
||||
"shared.feedback.notifications.saved",
|
||||
"shared.feedback.notifications.common.copySuccess",
|
||||
"shared.feedback.notifications.common.saveSuccess",
|
||||
"shared.feedback.notifications.common.saveFailed",
|
||||
"shared.feedback.validation.config.failed",
|
||||
"shared.feedback.validation.config.bootFailed",
|
||||
"shared.feedback.validation.config.coreChangeFailed",
|
||||
"shared.feedback.validation.config.processTerminated",
|
||||
"shared.feedback.validation.script.syntaxError",
|
||||
"shared.feedback.validation.script.missingMain",
|
||||
"shared.feedback.validation.script.fileNotFound",
|
||||
"shared.feedback.validation.script.fileError",
|
||||
"shared.feedback.validation.yaml.syntaxError",
|
||||
"shared.feedback.validation.yaml.readError",
|
||||
"shared.feedback.validation.yaml.mappingError",
|
||||
"shared.feedback.validation.yaml.keyError",
|
||||
"shared.feedback.validation.yaml.generalError",
|
||||
"shared.feedback.validation.merge.syntaxError",
|
||||
"shared.feedback.validation.merge.mappingError",
|
||||
"shared.feedback.validation.merge.keyError",
|
||||
"shared.feedback.validation.merge.generalError",
|
||||
"shared.filters.logLevels.all",
|
||||
"shared.filters.logLevels.debug",
|
||||
"shared.filters.logLevels.info",
|
||||
"shared.filters.logLevels.warn",
|
||||
"shared.filters.logLevels.error",
|
||||
"tests.page.actions.testAll",
|
||||
"tests.page.title",
|
||||
"tests.components.item.actions.test",
|
||||
"tests.modals.test.title.create",
|
||||
"tests.modals.test.title.edit",
|
||||
"tests.modals.test.fields.url",
|
||||
"tests.statuses.test.pending",
|
||||
"tests.statuses.test.yes",
|
||||
"tests.statuses.test.no",
|
||||
"tests.statuses.test.failed",
|
||||
"tests.statuses.test.completed",
|
||||
"tests.statuses.test.disallowedIsp",
|
||||
"tests.statuses.test.originalsOnly",
|
||||
"tests.statuses.test.noDisney",
|
||||
"tests.statuses.test.unsupportedRegion",
|
||||
"tests.statuses.test.failedNetwork",
|
||||
"tests.unlock.page.actions.testing",
|
||||
"tests.unlock.page.empty",
|
||||
"tests.unlock.page.messages.detectionFailedWithName",
|
||||
"tests.unlock.page.messages.detectionTimeout",
|
||||
"tests.unlock.page.title",
|
||||
] as const;
|
||||
|
||||
export type TranslationKey = (typeof translationKeys)[number];
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import "i18next";
|
||||
|
||||
import type { TranslationResources } from "./generated/i18n-resources";
|
||||
|
||||
declare module "i18next" {
|
||||
interface CustomTypeOptions {
|
||||
defaultNS: "translation";
|
||||
resources: TranslationResources;
|
||||
enableSelector: "optimize";
|
||||
}
|
||||
}
|
||||
Vendored
+39
@@ -0,0 +1,39 @@
|
||||
import "react-i18next";
|
||||
|
||||
import type { i18n, Namespace, TOptions, TFunction } from "i18next";
|
||||
import type {
|
||||
UseTranslationOptions,
|
||||
UseTranslationResponse,
|
||||
} from "react-i18next";
|
||||
|
||||
import type { TranslationKey } from "./generated/i18n-keys";
|
||||
|
||||
type EnforcedTranslationKey<Key extends string> = string extends Key
|
||||
? string
|
||||
: Key extends TranslationKey
|
||||
? Key
|
||||
: never;
|
||||
|
||||
type BaseTFunction = UseTranslationResponse<Namespace, undefined>[0];
|
||||
|
||||
type TypedTFunction = BaseTFunction &
|
||||
TFunction &
|
||||
(<Key extends string>(
|
||||
key: EnforcedTranslationKey<Key>,
|
||||
options?: TOptions | string,
|
||||
) => string) &
|
||||
(<Key extends string>(
|
||||
key: readonly EnforcedTranslationKey<Key>[],
|
||||
options?: TOptions | string,
|
||||
) => string);
|
||||
|
||||
declare module "react-i18next" {
|
||||
function useTranslation<KPrefix extends string = undefined>(
|
||||
ns?: Namespace | Namespace[],
|
||||
options?: UseTranslationOptions<KPrefix>,
|
||||
): [t: TypedTFunction, i18n: i18n, ready: boolean] & {
|
||||
t: TypedTFunction;
|
||||
i18n: i18n;
|
||||
ready: boolean;
|
||||
};
|
||||
}
|
||||
Vendored
+888
@@ -0,0 +1,888 @@
|
||||
type Platform =
|
||||
| "aix"
|
||||
| "android"
|
||||
| "darwin"
|
||||
| "freebsd"
|
||||
| "haiku"
|
||||
| "linux"
|
||||
| "openbsd"
|
||||
| "sunos"
|
||||
| "win32"
|
||||
| "cygwin"
|
||||
| "netbsd";
|
||||
|
||||
/**
|
||||
* defines in `vite.config.ts`
|
||||
*/
|
||||
declare const OS_PLATFORM: Platform;
|
||||
|
||||
/**
|
||||
* Some interface for clash api
|
||||
*/
|
||||
interface IConfigData {
|
||||
port: number;
|
||||
mode: string;
|
||||
ipv6: boolean;
|
||||
"socket-port": number;
|
||||
"allow-lan": boolean;
|
||||
"log-level": string;
|
||||
"mixed-port": number;
|
||||
"redir-port": number;
|
||||
"socks-port": number;
|
||||
"tproxy-port": number;
|
||||
"external-controller": string;
|
||||
"external-controller-cors": {
|
||||
"allow-private-network": boolean;
|
||||
"allow-origins": string[];
|
||||
};
|
||||
secret: string;
|
||||
"unified-delay": boolean;
|
||||
tun: {
|
||||
stack: string;
|
||||
device: string;
|
||||
"auto-route": boolean;
|
||||
"auto-detect-interface": boolean;
|
||||
"dns-hijack": string[];
|
||||
"strict-route": boolean;
|
||||
mtu: number;
|
||||
};
|
||||
dns?: {
|
||||
enable?: boolean;
|
||||
listen?: string;
|
||||
"enhanced-mode"?: "fake-ip" | "redir-host";
|
||||
"fake-ip-range"?: string;
|
||||
"fake-ip-filter"?: string[];
|
||||
"fake-ip-filter-mode"?: "blacklist" | "whitelist";
|
||||
"prefer-h3"?: boolean;
|
||||
"respect-rules"?: boolean;
|
||||
nameserver?: string[];
|
||||
fallback?: string[];
|
||||
"default-nameserver"?: string[];
|
||||
"proxy-server-nameserver"?: string[];
|
||||
"direct-nameserver"?: string[];
|
||||
"direct-nameserver-follow-policy"?: boolean;
|
||||
"nameserver-policy"?: Record<string, any>;
|
||||
"use-hosts"?: boolean;
|
||||
"use-system-hosts"?: boolean;
|
||||
"fallback-filter"?: {
|
||||
geoip?: boolean;
|
||||
"geoip-code"?: string;
|
||||
ipcidr?: string[];
|
||||
domain?: string[];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
interface IRuleItem {
|
||||
type: string;
|
||||
payload: string;
|
||||
proxy: string;
|
||||
}
|
||||
|
||||
interface IProxyItem {
|
||||
name: string;
|
||||
type: string;
|
||||
udp: boolean;
|
||||
xudp: boolean;
|
||||
tfo: boolean;
|
||||
mptcp: boolean;
|
||||
smux: boolean;
|
||||
history: {
|
||||
time: string;
|
||||
delay: number;
|
||||
}[];
|
||||
testUrl?: string;
|
||||
all?: string[];
|
||||
now?: string;
|
||||
hidden?: boolean;
|
||||
icon?: string;
|
||||
provider?: string; // 记录是否来自provider
|
||||
fixed?: string; // 记录固定(优先)的节点
|
||||
}
|
||||
|
||||
type IProxyGroupItem = Omit<IProxyItem, "all"> & {
|
||||
all: IProxyItem[];
|
||||
};
|
||||
|
||||
interface IProxyProviderItem {
|
||||
name: string;
|
||||
type: string;
|
||||
proxies: IProxyItem[];
|
||||
updatedAt: string;
|
||||
vehicleType: string;
|
||||
subscriptionInfo?: {
|
||||
Upload: number;
|
||||
Download: number;
|
||||
Total: number;
|
||||
Expire: number;
|
||||
};
|
||||
}
|
||||
|
||||
interface IRuleProviderItem {
|
||||
name: string;
|
||||
behavior: string;
|
||||
format: string;
|
||||
ruleCount: number;
|
||||
type: string;
|
||||
updatedAt: string;
|
||||
vehicleType: string;
|
||||
}
|
||||
|
||||
interface ITrafficItem {
|
||||
up: number;
|
||||
down: number;
|
||||
up_rate?: number;
|
||||
down_rate?: number;
|
||||
last_updated?: number;
|
||||
}
|
||||
|
||||
interface IFormattedTrafficData {
|
||||
up_rate_formatted: string;
|
||||
down_rate_formatted: string;
|
||||
total_up_formatted: string;
|
||||
total_down_formatted: string;
|
||||
is_fresh: boolean;
|
||||
}
|
||||
|
||||
interface IFormattedMemoryData {
|
||||
inuse_formatted: string;
|
||||
oslimit_formatted: string;
|
||||
usage_percent: number;
|
||||
is_fresh: boolean;
|
||||
}
|
||||
|
||||
// 增强的类型安全接口定义,确保所有字段必需
|
||||
interface ISystemMonitorOverview {
|
||||
traffic: {
|
||||
raw: {
|
||||
up: number;
|
||||
down: number;
|
||||
up_rate: number;
|
||||
down_rate: number;
|
||||
};
|
||||
formatted: {
|
||||
up_rate: string;
|
||||
down_rate: string;
|
||||
total_up: string;
|
||||
total_down: string;
|
||||
};
|
||||
is_fresh: boolean;
|
||||
};
|
||||
memory: {
|
||||
raw: {
|
||||
inuse: number;
|
||||
oslimit: number;
|
||||
usage_percent: number;
|
||||
};
|
||||
formatted: {
|
||||
inuse: string;
|
||||
oslimit: string;
|
||||
usage_percent: number;
|
||||
};
|
||||
is_fresh: boolean;
|
||||
};
|
||||
overall_status: "active" | "inactive" | "error" | "unknown" | "healthy";
|
||||
}
|
||||
|
||||
// 类型安全的数据验证器
|
||||
interface ISystemMonitorOverviewValidator {
|
||||
validate(data: any): data is ISystemMonitorOverview;
|
||||
sanitize(data: any): ISystemMonitorOverview;
|
||||
}
|
||||
|
||||
interface ILogItem {
|
||||
type: string;
|
||||
time?: string;
|
||||
payload: string;
|
||||
}
|
||||
|
||||
interface IConnectionsItem {
|
||||
id: string;
|
||||
metadata: {
|
||||
network: string;
|
||||
type: string;
|
||||
host: string;
|
||||
sourceIP: string;
|
||||
sourcePort: string;
|
||||
destinationPort: string;
|
||||
destinationIP?: string;
|
||||
remoteDestination?: string;
|
||||
process?: string;
|
||||
processPath?: string;
|
||||
};
|
||||
upload: number;
|
||||
download: number;
|
||||
start: string;
|
||||
chains: string[];
|
||||
rule: string;
|
||||
rulePayload: string;
|
||||
curUpload?: number; // upload speed, calculate at runtime
|
||||
curDownload?: number; // download speed, calculate at runtime
|
||||
}
|
||||
|
||||
interface IConnections {
|
||||
downloadTotal: number;
|
||||
uploadTotal: number;
|
||||
connections: IConnectionsItem[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Some interface for command
|
||||
*/
|
||||
|
||||
interface IClashInfo {
|
||||
// status: string;
|
||||
mixed_port?: number; // clash mixed port
|
||||
socks_port?: number; // clash socks port
|
||||
redir_port?: number; // clash redir port
|
||||
tproxy_port?: number; // clash tproxy port
|
||||
port?: number; // clash http port
|
||||
server?: string; // external-controller
|
||||
secret?: string;
|
||||
}
|
||||
|
||||
interface IProfileItem {
|
||||
uid: string;
|
||||
type?: "local" | "remote" | "merge" | "script";
|
||||
name?: string;
|
||||
desc?: string;
|
||||
file?: string;
|
||||
url?: string;
|
||||
updated?: number;
|
||||
selected?: {
|
||||
name?: string;
|
||||
now?: string;
|
||||
}[];
|
||||
extra?: {
|
||||
upload: number;
|
||||
download: number;
|
||||
total: number;
|
||||
expire: number;
|
||||
};
|
||||
option?: IProfileOption;
|
||||
home?: string;
|
||||
}
|
||||
|
||||
interface IProfileOption {
|
||||
user_agent?: string;
|
||||
with_proxy?: boolean;
|
||||
self_proxy?: boolean;
|
||||
update_interval?: number;
|
||||
timeout_seconds?: number;
|
||||
danger_accept_invalid_certs?: boolean;
|
||||
allow_auto_update?: boolean;
|
||||
merge?: string;
|
||||
script?: string;
|
||||
rules?: string;
|
||||
proxies?: string;
|
||||
groups?: string;
|
||||
}
|
||||
|
||||
interface IProfilesConfig {
|
||||
current?: string;
|
||||
items?: IProfileItem[];
|
||||
}
|
||||
|
||||
interface IVergeTestItem {
|
||||
uid: string;
|
||||
name?: string;
|
||||
icon?: string;
|
||||
url: string;
|
||||
}
|
||||
interface IAddress {
|
||||
V4?: {
|
||||
ip: string;
|
||||
broadcast?: string;
|
||||
netmask?: string;
|
||||
};
|
||||
V6?: {
|
||||
ip: string;
|
||||
broadcast?: string;
|
||||
netmask?: string;
|
||||
};
|
||||
}
|
||||
interface INetworkInterface {
|
||||
name: string;
|
||||
addr: IAddress[];
|
||||
mac_addr?: string;
|
||||
index: number;
|
||||
}
|
||||
|
||||
interface ISeqProfileConfig {
|
||||
prepend: [];
|
||||
append: [];
|
||||
delete: [];
|
||||
}
|
||||
|
||||
interface IProxyGroupConfig {
|
||||
name: string;
|
||||
type: "select" | "url-test" | "fallback" | "load-balance" | "relay";
|
||||
proxies?: string[];
|
||||
use?: string[];
|
||||
url?: string;
|
||||
interval?: number;
|
||||
lazy?: boolean;
|
||||
timeout?: number;
|
||||
"max-failed-times"?: number;
|
||||
"disable-udp"?: boolean;
|
||||
"interface-name": string;
|
||||
"routing-mark"?: number;
|
||||
"include-all"?: boolean;
|
||||
"include-all-proxies"?: boolean;
|
||||
"include-all-providers"?: boolean;
|
||||
filter?: string;
|
||||
"exclude-filter"?: string;
|
||||
"exclude-type"?: string;
|
||||
"expected-status"?: string;
|
||||
hidden?: boolean;
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
interface WsOptions {
|
||||
path?: string;
|
||||
headers?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
"max-early-data"?: number;
|
||||
"early-data-header-name"?: string;
|
||||
"v2ray-http-upgrade"?: boolean;
|
||||
"v2ray-http-upgrade-fast-open"?: boolean;
|
||||
}
|
||||
|
||||
interface HttpOptions {
|
||||
method?: string;
|
||||
path?: string[];
|
||||
headers?: {
|
||||
[key: string]: string[];
|
||||
};
|
||||
}
|
||||
|
||||
interface H2Options {
|
||||
path?: string;
|
||||
host?: string;
|
||||
}
|
||||
|
||||
interface GrpcOptions {
|
||||
"grpc-service-name"?: string;
|
||||
}
|
||||
|
||||
interface RealityOptions {
|
||||
"public-key"?: string;
|
||||
"short-id"?: string;
|
||||
}
|
||||
type ClientFingerprint =
|
||||
| "chrome"
|
||||
| "firefox"
|
||||
| "safari"
|
||||
| "iOS"
|
||||
| "android"
|
||||
| "edge"
|
||||
| "360"
|
||||
| "qq"
|
||||
| "random";
|
||||
type NetworkType = "ws" | "http" | "h2" | "grpc" | "tcp";
|
||||
type CipherType =
|
||||
| "none"
|
||||
| "auto"
|
||||
| "dummy"
|
||||
| "aes-128-gcm"
|
||||
| "aes-192-gcm"
|
||||
| "aes-256-gcm"
|
||||
| "lea-128-gcm"
|
||||
| "lea-192-gcm"
|
||||
| "lea-256-gcm"
|
||||
| "aes-128-gcm-siv"
|
||||
| "aes-256-gcm-siv"
|
||||
| "2022-blake3-aes-128-gcm"
|
||||
| "2022-blake3-aes-256-gcm"
|
||||
| "aes-128-cfb"
|
||||
| "aes-192-cfb"
|
||||
| "aes-256-cfb"
|
||||
| "aes-128-ctr"
|
||||
| "aes-192-ctr"
|
||||
| "aes-256-ctr"
|
||||
| "chacha20"
|
||||
| "chacha20-ietf"
|
||||
| "chacha20-ietf-poly1305"
|
||||
| "2022-blake3-chacha20-poly1305"
|
||||
| "rabbit128-poly1305"
|
||||
| "xchacha20-ietf-poly1305"
|
||||
| "xchacha20"
|
||||
| "aegis-128l"
|
||||
| "aegis-256"
|
||||
| "aez-384"
|
||||
| "deoxys-ii-256-128"
|
||||
| "rc4-md5";
|
||||
// base
|
||||
interface IProxyBaseConfig {
|
||||
tfo?: boolean;
|
||||
mptcp?: boolean;
|
||||
"interface-name"?: string;
|
||||
"routing-mark"?: number;
|
||||
"ip-version"?: "dual" | "ipv4" | "ipv6" | "ipv4-prefer" | "ipv6-prefer";
|
||||
"dialer-proxy"?: string;
|
||||
}
|
||||
// direct
|
||||
interface IProxyDirectConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "direct";
|
||||
}
|
||||
// dns
|
||||
interface IProxyDnsConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "dns";
|
||||
}
|
||||
// http
|
||||
interface IProxyHttpConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "http";
|
||||
server?: string;
|
||||
port?: number;
|
||||
username?: string;
|
||||
password?: string;
|
||||
tls?: boolean;
|
||||
sni?: string;
|
||||
"skip-cert-verify"?: boolean;
|
||||
fingerprint?: string;
|
||||
headers?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
// socks5
|
||||
interface IProxySocks5Config extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "socks5";
|
||||
server?: string;
|
||||
port?: number;
|
||||
username?: string;
|
||||
password?: string;
|
||||
tls?: boolean;
|
||||
udp?: boolean;
|
||||
"skip-cert-verify"?: boolean;
|
||||
fingerprint?: string;
|
||||
}
|
||||
// ssh
|
||||
interface IProxySshConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "ssh";
|
||||
server?: string;
|
||||
port?: number;
|
||||
username?: string;
|
||||
password?: string;
|
||||
"private-key"?: string;
|
||||
"private-key-passphrase"?: string;
|
||||
"host-key"?: string;
|
||||
"host-key-algorithms"?: string;
|
||||
}
|
||||
// trojan
|
||||
interface IProxyTrojanConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "trojan";
|
||||
server?: string;
|
||||
port?: number;
|
||||
password?: string;
|
||||
alpn?: string[];
|
||||
sni?: string;
|
||||
"skip-cert-verify"?: boolean;
|
||||
fingerprint?: string;
|
||||
udp?: boolean;
|
||||
network?: NetworkType;
|
||||
"reality-opts"?: RealityOptions;
|
||||
"grpc-opts"?: GrpcOptions;
|
||||
"ws-opts"?: WsOptions;
|
||||
"ss-opts"?: {
|
||||
enabled?: boolean;
|
||||
method?: string;
|
||||
password?: string;
|
||||
};
|
||||
"client-fingerprint"?: ClientFingerprint;
|
||||
}
|
||||
// tuic
|
||||
interface IProxyTuicConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "tuic";
|
||||
server?: string;
|
||||
port?: number;
|
||||
token?: string;
|
||||
uuid?: string;
|
||||
password?: string;
|
||||
ip?: string;
|
||||
"heartbeat-interval"?: number;
|
||||
alpn?: string[];
|
||||
"reduce-rtt"?: boolean;
|
||||
"request-timeout"?: number;
|
||||
"udp-relay-mode"?: string;
|
||||
"congestion-controller"?: string;
|
||||
"disable-sni"?: boolean;
|
||||
"max-udp-relay-packet-size"?: number;
|
||||
"fast-open"?: boolean;
|
||||
"max-open-streams"?: number;
|
||||
cwnd?: number;
|
||||
"skip-cert-verify"?: boolean;
|
||||
fingerprint?: string;
|
||||
ca?: string;
|
||||
"ca-str"?: string;
|
||||
"recv-window-conn"?: number;
|
||||
"recv-window"?: number;
|
||||
"disable-mtu-discovery"?: boolean;
|
||||
"max-datagram-frame-size"?: number;
|
||||
sni?: string;
|
||||
"udp-over-stream"?: boolean;
|
||||
"udp-over-stream-version"?: number;
|
||||
}
|
||||
// vless
|
||||
interface IProxyVlessConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "vless";
|
||||
server?: string;
|
||||
port?: number;
|
||||
uuid?: string;
|
||||
flow?: string;
|
||||
tls?: boolean;
|
||||
alpn?: string[];
|
||||
udp?: boolean;
|
||||
"packet-addr"?: boolean;
|
||||
xudp?: boolean;
|
||||
"packet-encoding"?: string;
|
||||
network?: NetworkType;
|
||||
"reality-opts"?: RealityOptions;
|
||||
"http-opts"?: HttpOptions;
|
||||
"h2-opts"?: H2Options;
|
||||
"grpc-opts"?: GrpcOptions;
|
||||
"ws-opts"?: WsOptions;
|
||||
"ws-path"?: string;
|
||||
"ws-headers"?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
"skip-cert-verify"?: boolean;
|
||||
fingerprint?: string;
|
||||
servername?: string;
|
||||
"client-fingerprint"?: ClientFingerprint;
|
||||
smux?: boolean;
|
||||
}
|
||||
// vmess
|
||||
interface IProxyVmessConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "vmess";
|
||||
server?: string;
|
||||
port?: number;
|
||||
uuid?: string;
|
||||
alterId?: number;
|
||||
cipher?: CipherType;
|
||||
udp?: boolean;
|
||||
network?: NetworkType;
|
||||
tls?: boolean;
|
||||
alpn?: string[];
|
||||
"skip-cert-verify"?: boolean;
|
||||
fingerprint?: string;
|
||||
servername?: string;
|
||||
"reality-opts"?: RealityOptions;
|
||||
"http-opts"?: HttpOptions;
|
||||
"h2-opts"?: H2Options;
|
||||
"grpc-opts"?: GrpcOptions;
|
||||
"ws-opts"?: WsOptions;
|
||||
"packet-addr"?: boolean;
|
||||
xudp?: boolean;
|
||||
"packet-encoding"?: string;
|
||||
"global-padding"?: boolean;
|
||||
"authenticated-length"?: boolean;
|
||||
"client-fingerprint"?: ClientFingerprint;
|
||||
smux?: boolean;
|
||||
}
|
||||
interface WireGuardPeerOptions {
|
||||
server?: string;
|
||||
port?: number;
|
||||
"public-key"?: string;
|
||||
"pre-shared-key"?: string;
|
||||
reserved?: number[];
|
||||
"allowed-ips"?: string[];
|
||||
}
|
||||
// wireguard
|
||||
interface IProxyWireguardConfig extends IProxyBaseConfig, WireGuardPeerOptions {
|
||||
name: string;
|
||||
type: "wireguard";
|
||||
ip?: string;
|
||||
ipv6?: string;
|
||||
"private-key"?: string;
|
||||
workers?: number;
|
||||
mtu?: number;
|
||||
udp?: boolean;
|
||||
"persistent-keepalive"?: number;
|
||||
peers?: WireGuardPeerOptions[];
|
||||
"remote-dns-resolve"?: boolean;
|
||||
dns?: string[];
|
||||
"refresh-server-ip-interval"?: number;
|
||||
}
|
||||
// hysteria
|
||||
interface IProxyHysteriaConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "hysteria";
|
||||
server?: string;
|
||||
port?: number;
|
||||
ports?: string;
|
||||
protocol?: string;
|
||||
"obfs-protocol"?: string;
|
||||
up?: string;
|
||||
"up-speed"?: number;
|
||||
down?: string;
|
||||
"down-speed"?: number;
|
||||
auth?: string;
|
||||
"auth-str"?: string;
|
||||
obfs?: string;
|
||||
sni?: string;
|
||||
"skip-cert-verify"?: boolean;
|
||||
fingerprint?: string;
|
||||
alpn?: string[];
|
||||
ca?: string;
|
||||
"ca-str"?: string;
|
||||
"recv-window-conn"?: number;
|
||||
"recv-window"?: number;
|
||||
"disable-mtu-discovery"?: boolean;
|
||||
"fast-open"?: boolean;
|
||||
"hop-interval"?: number;
|
||||
}
|
||||
// hysteria2
|
||||
interface IProxyHysteria2Config extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "hysteria2";
|
||||
server?: string;
|
||||
port?: number;
|
||||
ports?: string;
|
||||
"hop-interval"?: number;
|
||||
protocol?: string;
|
||||
"obfs-protocol"?: string;
|
||||
up?: string;
|
||||
down?: string;
|
||||
password?: string;
|
||||
obfs?: string;
|
||||
"obfs-password"?: string;
|
||||
sni?: string;
|
||||
"skip-cert-verify"?: boolean;
|
||||
fingerprint?: string;
|
||||
alpn?: string[];
|
||||
ca?: string;
|
||||
"ca-str"?: string;
|
||||
cwnd?: number;
|
||||
"udp-mtu"?: number;
|
||||
}
|
||||
// shadowsocks
|
||||
interface IProxyShadowsocksConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "ss";
|
||||
server?: string;
|
||||
port?: number;
|
||||
password?: string;
|
||||
cipher?: CipherType;
|
||||
udp?: boolean;
|
||||
plugin?: "obfs" | "v2ray-plugin" | "shadow-tls" | "restls";
|
||||
"plugin-opts"?: {
|
||||
mode?: string;
|
||||
host?: string;
|
||||
password?: string;
|
||||
path?: string;
|
||||
tls?: string;
|
||||
fingerprint?: string;
|
||||
headers?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
"skip-cert-verify"?: boolean;
|
||||
version?: number;
|
||||
mux?: boolean;
|
||||
"v2ray-http-upgrade"?: boolean;
|
||||
"v2ray-http-upgrade-fast-open"?: boolean;
|
||||
"version-hint"?: string;
|
||||
"restls-script"?: string;
|
||||
};
|
||||
"udp-over-tcp"?: boolean;
|
||||
"udp-over-tcp-version"?: number;
|
||||
"client-fingerprint"?: ClientFingerprint;
|
||||
smux?: boolean;
|
||||
}
|
||||
// shadowsocksR
|
||||
interface IProxyshadowsocksRConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "ssr";
|
||||
server?: string;
|
||||
port?: number;
|
||||
password?: string;
|
||||
cipher?: CipherType;
|
||||
obfs?: string;
|
||||
"obfs-param"?: string;
|
||||
protocol?: string;
|
||||
"protocol-param"?: string;
|
||||
udp?: boolean;
|
||||
}
|
||||
// sing-mux
|
||||
interface IProxySmuxConfig {
|
||||
smux?: {
|
||||
enabled?: boolean;
|
||||
protocol?: "smux" | "yamux" | "h2mux";
|
||||
"max-connections"?: number;
|
||||
"min-streams"?: number;
|
||||
"max-streams"?: number;
|
||||
padding?: boolean;
|
||||
statistic?: boolean;
|
||||
"only-tcp"?: boolean;
|
||||
"brutal-opts"?: {
|
||||
enabled?: boolean;
|
||||
up?: string;
|
||||
down?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
// snell
|
||||
interface IProxySnellConfig extends IProxyBaseConfig {
|
||||
name: string;
|
||||
type: "snell";
|
||||
server?: string;
|
||||
port?: number;
|
||||
psk?: string;
|
||||
udp?: boolean;
|
||||
version?: number;
|
||||
}
|
||||
interface IProxyConfig
|
||||
extends IProxyBaseConfig,
|
||||
IProxyDirectConfig,
|
||||
IProxyDnsConfig,
|
||||
IProxyHttpConfig,
|
||||
IProxySocks5Config,
|
||||
IProxySshConfig,
|
||||
IProxyTrojanConfig,
|
||||
IProxyTuicConfig,
|
||||
IProxyVlessConfig,
|
||||
IProxyVmessConfig,
|
||||
IProxyWireguardConfig,
|
||||
IProxyHysteriaConfig,
|
||||
IProxyHysteria2Config,
|
||||
IProxyShadowsocksConfig,
|
||||
IProxyshadowsocksRConfig,
|
||||
IProxySmuxConfig,
|
||||
IProxySnellConfig {
|
||||
type:
|
||||
| "ss"
|
||||
| "ssr"
|
||||
| "direct"
|
||||
| "dns"
|
||||
| "snell"
|
||||
| "http"
|
||||
| "trojan"
|
||||
| "hysteria"
|
||||
| "hysteria2"
|
||||
| "tuic"
|
||||
| "wireguard"
|
||||
| "ssh"
|
||||
| "socks5"
|
||||
| "vmess"
|
||||
| "vless";
|
||||
}
|
||||
|
||||
interface IVergeConfig {
|
||||
app_log_level?: "trace" | "debug" | "info" | "warn" | "error" | string;
|
||||
app_log_max_size?: number; // KB
|
||||
app_log_max_count?: number;
|
||||
language?: string;
|
||||
tray_event?:
|
||||
| "main_window"
|
||||
| "tray_menu"
|
||||
| "system_proxy"
|
||||
| "tun_mode"
|
||||
| string;
|
||||
env_type?: "bash" | "cmd" | "powershell" | "fish" | string;
|
||||
startup_script?: string;
|
||||
start_page?: string;
|
||||
clash_core?: string;
|
||||
theme_mode?: "light" | "dark" | "system";
|
||||
traffic_graph?: boolean;
|
||||
enable_memory_usage?: boolean;
|
||||
enable_group_icon?: boolean;
|
||||
menu_icon?: "monochrome" | "colorful" | "disable";
|
||||
menu_order?: string[];
|
||||
tray_icon?: "monochrome" | "colorful";
|
||||
common_tray_icon?: boolean;
|
||||
sysproxy_tray_icon?: boolean;
|
||||
tun_tray_icon?: boolean;
|
||||
// enable_tray_speed?: boolean;
|
||||
// enable_tray_icon?: boolean;
|
||||
tray_inline_proxy_groups?: boolean;
|
||||
enable_tun_mode?: boolean;
|
||||
enable_auto_light_weight_mode?: boolean;
|
||||
auto_light_weight_minutes?: number;
|
||||
enable_auto_launch?: boolean;
|
||||
enable_silent_start?: boolean;
|
||||
enable_system_proxy?: boolean;
|
||||
enable_global_hotkey?: boolean;
|
||||
enable_dns_settings?: boolean;
|
||||
proxy_auto_config?: boolean;
|
||||
pac_file_content?: string;
|
||||
proxy_host?: string;
|
||||
enable_random_port?: boolean;
|
||||
verge_mixed_port?: number;
|
||||
verge_socks_port?: number;
|
||||
verge_redir_port?: number;
|
||||
verge_tproxy_port?: number;
|
||||
verge_port?: number;
|
||||
verge_redir_enabled?: boolean;
|
||||
verge_tproxy_enabled?: boolean;
|
||||
verge_socks_enabled?: boolean;
|
||||
verge_http_enabled?: boolean;
|
||||
enable_proxy_guard?: boolean;
|
||||
enable_bypass_check?: boolean;
|
||||
use_default_bypass?: boolean;
|
||||
proxy_guard_duration?: number;
|
||||
system_proxy_bypass?: string;
|
||||
web_ui_list?: string[];
|
||||
hotkeys?: string[];
|
||||
theme_setting?: {
|
||||
primary_color?: string;
|
||||
secondary_color?: string;
|
||||
primary_text?: string;
|
||||
secondary_text?: string;
|
||||
info_color?: string;
|
||||
error_color?: string;
|
||||
warning_color?: string;
|
||||
success_color?: string;
|
||||
font_family?: string;
|
||||
css_injection?: string;
|
||||
background_image?: string;
|
||||
background_blend_mode?: string;
|
||||
background_opacity?: number;
|
||||
};
|
||||
auto_close_connection?: boolean;
|
||||
auto_check_update?: boolean;
|
||||
default_latency_test?: string;
|
||||
default_latency_timeout?: number;
|
||||
enable_auto_delay_detection?: boolean;
|
||||
enable_builtin_enhanced?: boolean;
|
||||
auto_log_clean?: 0 | 1 | 2 | 3 | 4;
|
||||
proxy_layout_column?: number;
|
||||
test_list?: IVergeTestItem[];
|
||||
webdav_url?: string;
|
||||
webdav_username?: string;
|
||||
webdav_password?: string;
|
||||
home_cards?: Record<string, boolean>;
|
||||
enable_hover_jump_navigator?: boolean;
|
||||
hover_jump_navigator_delay?: number;
|
||||
enable_external_controller?: boolean;
|
||||
}
|
||||
|
||||
interface IWebDavFile {
|
||||
filename: string;
|
||||
href: string;
|
||||
last_modified: string;
|
||||
content_length: number;
|
||||
content_type: string;
|
||||
tag: string;
|
||||
}
|
||||
|
||||
interface ILocalBackupFile {
|
||||
filename: string;
|
||||
path: string;
|
||||
last_modified: string;
|
||||
content_length: number;
|
||||
}
|
||||
|
||||
interface IWebDavConfig {
|
||||
url: string;
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
Reference in New Issue
Block a user