P9(4): remove local-core live-test trio — outbound speed test + egress probe, restart/stop xray endpoints

Per user decision 2026-10-21 (reverses the earlier keep call in
PANEL-LITE-SPEC.md, now amended): the lite panel never runs a local
core, so measuring/probing from the panel host is meaningless.

Backend:
- delete service/outbound probe implementation (probe_http.go and its
  tests) and the TestOutbound/TestOutbounds batch prober; outbound
  traffic accounting (AddTraffic/GetOutboundsTraffic/Reset) unchanged
- drop POST /panel/api/xray/testOutbound + testOutbounds routes and the
  outboundTestUrl setting (get/update plumbing removed; stored rows in
  existing DBs are inert)
- drop POST /panel/api/server/restartXrayService + stopXrayService
  routes/handlers and the node-sync allowlist entry; the service-level
  Stop/RestartXrayService stay for internal import/restore flows
- node-sync allowlist contract test updated to the new inventory

Frontend:
- remove test buttons/mode switch/test-all from outbounds tab, card
  list and table columns; delete TestResultPopover and CountryPill;
  drop the egress/country/latency columns fed by probe results
- remove outboundTestUrl state and save plumbing from useXraySetting
  and the Basics tab field; drop OutboundTestResult schemas
- delete the 15 now-dead i18n keys from all 13 locales (incl. the
  restart/stop keys orphaned since P6/P7 — i18n-dead-keys test green)
- tests: drop the test-URL hook test, re-probe the loopback index
  mapping through Move-to-top, regenerate API types (gen)
This commit is contained in:
Muse
2026-10-21 16:35:53 +00:00
parent 6772c97f8e
commit 5031a70ccb
43 changed files with 112 additions and 3982 deletions
+5 -149
View File
@@ -3,64 +3,24 @@ export const EXAMPLES: Record<string, unknown> = {
"AllSetting": {
"datepicker": "",
"expireDiff": 0,
"externalTrafficInformEnable": false,
"externalTrafficInformURI": "",
"ipLimitAllowlist": "",
"ldapAutoCreate": false,
"ldapAutoDelete": false,
"ldapBaseDN": "",
"ldapBindDN": "",
"ldapDefaultExpiryDays": 0,
"ldapDefaultLimitIP": 0,
"ldapDefaultTotalGB": 0,
"ldapEnable": false,
"ldapFlagField": "",
"ldapHost": "",
"ldapInboundTags": "",
"ldapInsecureSkipVerify": false,
"ldapInvertFlag": false,
"ldapPassword": "",
"ldapPort": 0,
"ldapSyncCron": "",
"ldapTruthyValues": "",
"ldapUseTLS": false,
"ldapUserAttr": "",
"ldapUserFilter": "",
"ldapVlessField": "",
"outboundDownThreshold": 1,
"pageSize": 0,
"panelOutbound": "",
"remarkTemplate": "",
"restartXrayOnClientDisable": false,
"sessionMaxAge": 1,
"smtpCpu": 0,
"smtpEnable": false,
"smtpEnabledEvents": "",
"smtpEncryptionType": "",
"smtpFrom": "",
"smtpFromName": "",
"smtpHost": "",
"smtpMemory": 0,
"smtpPassword": "",
"smtpPort": 1,
"smtpTo": "",
"smtpUsername": "",
"subAnnounce": "",
"subCertFile": "",
"subClashAutoDetect": false,
"subClashEnable": false,
"subClashEnableRouting": false,
"subClashPath": "",
"subClashRules": "",
"subClashURI": "",
"subClashUserAgentRegex": "",
"subDomain": "",
"subEnable": false,
"subEnableRouting": false,
"subEncrypt": false,
"subHideSettings": false,
"subIncyEnableRouting": false,
"subIncyRoutingRules": "",
"subJsonAlwaysArray": false,
"subJsonAutoDetect": false,
"subJsonEnable": false,
@@ -68,37 +28,22 @@ export const EXAMPLES: Record<string, unknown> = {
"subJsonMux": "",
"subJsonObservatory": "",
"subJsonPath": "",
"subJsonRules": "",
"subJsonURI": "",
"subJsonUserAgentRegex": "",
"subKeyFile": "",
"subListen": "",
"subPath": "",
"subPort": 1,
"subPort": 0,
"subProfileUrl": "",
"subRoutingRules": "",
"subShowIdentityOnAllLinks": false,
"subSupportUrl": "",
"subThemeDir": "",
"subTitle": "",
"subURI": "",
"subUpdates": 0,
"tgBotAPIServer": "",
"tgBotBackup": false,
"tgBotChatId": "",
"tgBotEnable": false,
"tgBotProxy": "",
"tgBotToken": "",
"tgCpu": 0,
"tgEnabledEvents": "",
"tgLang": "",
"tgMemory": 0,
"tgRunTime": "",
"timeLocation": "",
"trafficDiff": 0,
"trustedProxyCIDRs": "",
"twoFactorEnable": false,
"twoFactorToken": "",
"warpUpdateInterval": 0,
"webBasePath": "",
"webCertFile": "",
@@ -110,71 +55,27 @@ export const EXAMPLES: Record<string, unknown> = {
"AllSettingView": {
"datepicker": "",
"expireDiff": 0,
"externalTrafficInformEnable": false,
"externalTrafficInformURI": "",
"hasApiToken": false,
"hasLdapPassword": false,
"hasNordSecret": false,
"hasSmtpPassword": false,
"hasTgBotToken": false,
"hasTwoFactorToken": false,
"hasWarpSecret": false,
"ipLimitAllowlist": "",
"ldapAutoCreate": false,
"ldapAutoDelete": false,
"ldapBaseDN": "",
"ldapBindDN": "",
"ldapDefaultExpiryDays": 0,
"ldapDefaultLimitIP": 0,
"ldapDefaultTotalGB": 0,
"ldapEnable": false,
"ldapFlagField": "",
"ldapHost": "",
"ldapInboundTags": "",
"ldapInsecureSkipVerify": false,
"ldapInvertFlag": false,
"ldapPassword": "",
"ldapPort": 0,
"ldapSyncCron": "",
"ldapTruthyValues": "",
"ldapUseTLS": false,
"ldapUserAttr": "",
"ldapUserFilter": "",
"ldapVlessField": "",
"outboundDownThreshold": 1,
"pageSize": 0,
"panelOutbound": "",
"remarkTemplate": "",
"restartXrayOnClientDisable": false,
"sessionMaxAge": 1,
"smtpCpu": 0,
"smtpEnable": false,
"smtpEnabledEvents": "",
"smtpEncryptionType": "",
"smtpFrom": "",
"smtpFromName": "",
"smtpHost": "",
"smtpMemory": 0,
"smtpPassword": "",
"smtpPort": 1,
"smtpTo": "",
"smtpUsername": "",
"subAnnounce": "",
"subCertFile": "",
"subClashAutoDetect": false,
"subClashEnable": false,
"subClashEnableRouting": false,
"subClashPath": "",
"subClashRules": "",
"subClashURI": "",
"subClashUserAgentRegex": "",
"subDomain": "",
"subEnable": false,
"subEnableRouting": false,
"subEncrypt": false,
"subHideSettings": false,
"subIncyEnableRouting": false,
"subIncyRoutingRules": "",
"subJsonAlwaysArray": false,
"subJsonAutoDetect": false,
"subJsonEnable": false,
@@ -182,37 +83,22 @@ export const EXAMPLES: Record<string, unknown> = {
"subJsonMux": "",
"subJsonObservatory": "",
"subJsonPath": "",
"subJsonRules": "",
"subJsonURI": "",
"subJsonUserAgentRegex": "",
"subKeyFile": "",
"subListen": "",
"subPath": "",
"subPort": 1,
"subPort": 0,
"subProfileUrl": "",
"subRoutingRules": "",
"subShowIdentityOnAllLinks": false,
"subSupportUrl": "",
"subThemeDir": "",
"subTitle": "",
"subURI": "",
"subUpdates": 0,
"tgBotAPIServer": "",
"tgBotBackup": false,
"tgBotChatId": "",
"tgBotEnable": false,
"tgBotProxy": "",
"tgBotToken": "",
"tgCpu": 0,
"tgEnabledEvents": "",
"tgLang": "",
"tgMemory": 0,
"tgRunTime": "",
"timeLocation": "",
"trafficDiff": 0,
"trustedProxyCIDRs": "",
"twoFactorEnable": false,
"twoFactorToken": "",
"warpUpdateInterval": 0,
"webBasePath": "",
"webCertFile": "",
@@ -221,26 +107,6 @@ export const EXAMPLES: Record<string, unknown> = {
"webListen": "",
"webPort": 1
},
"AmneziaWGLogs": {
"events": [
"2025/01/01 12:00:00 amneziawg: started interface awg1 for inbound 1"
],
"peers": [
{
"allowedIPs": "10.8.1.2/32",
"down": 4194304,
"email": "peer@example.com",
"endpoint": "203.0.113.9:51820",
"handshake": 1735732800000,
"inboundId": 1,
"interface": "awg1",
"online": true,
"tag": "inbound-51820",
"up": 1048576
}
],
"running": true
},
"ApiToken": {
"createdAt": 0,
"enabled": false,
@@ -648,9 +514,10 @@ export const EXAMPLES: Record<string, unknown> = {
""
],
"name": "",
"nodeType": "traditional",
"outboundTag": "",
"pinnedCertSha256": "",
"port": 1,
"port": 0,
"remark": "",
"scheme": "http",
"tlsVerifyMode": "verify"
@@ -683,6 +550,7 @@ export const EXAMPLES: Record<string, unknown> = {
"name": "edge-1",
"netDown": 1048576,
"netUp": 2097152,
"nodeType": "traditional",
"onlineCount": 5,
"outboundTag": "direct",
"panelVersion": "v3.x.x",
@@ -713,18 +581,6 @@ export const EXAMPLES: Record<string, unknown> = {
"runId": "1735689600123456789",
"state": "success"
},
"PeerActivity": {
"allowedIPs": "10.8.1.2/32",
"down": 4194304,
"email": "peer@example.com",
"endpoint": "203.0.113.9:51820",
"handshake": 1735732800000,
"inboundId": 1,
"interface": "awg1",
"online": true,
"tag": "inbound-51820",
"up": 1048576
},
"ProbeResultUI": {
"cpuPct": 12.5,
"error": "",
+18 -581
View File
@@ -9,83 +9,9 @@ export const SCHEMAS: Record<string, unknown> = {
"minimum": 0,
"type": "integer"
},
"externalTrafficInformEnable": {
"type": "boolean"
},
"externalTrafficInformURI": {
"type": "string"
},
"ipLimitAllowlist": {
"type": "string"
},
"ldapAutoCreate": {
"type": "boolean"
},
"ldapAutoDelete": {
"type": "boolean"
},
"ldapBaseDN": {
"type": "string"
},
"ldapBindDN": {
"type": "string"
},
"ldapDefaultExpiryDays": {
"minimum": 0,
"type": "integer"
},
"ldapDefaultLimitIP": {
"minimum": 0,
"type": "integer"
},
"ldapDefaultTotalGB": {
"minimum": 0,
"type": "integer"
},
"ldapEnable": {
"type": "boolean"
},
"ldapFlagField": {
"type": "string"
},
"ldapHost": {
"type": "string"
},
"ldapInboundTags": {
"type": "string"
},
"ldapInsecureSkipVerify": {
"type": "boolean"
},
"ldapInvertFlag": {
"type": "boolean"
},
"ldapPassword": {
"type": "string"
},
"ldapPort": {
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"ldapSyncCron": {
"type": "string"
},
"ldapTruthyValues": {
"type": "string"
},
"ldapUseTLS": {
"type": "boolean"
},
"ldapUserAttr": {
"type": "string"
},
"ldapUserFilter": {
"type": "string"
},
"ldapVlessField": {
"type": "string"
},
"outboundDownThreshold": {
"maximum": 100,
"minimum": 1,
@@ -110,48 +36,6 @@ export const SCHEMAS: Record<string, unknown> = {
"minimum": 1,
"type": "integer"
},
"smtpCpu": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"smtpEnable": {
"type": "boolean"
},
"smtpEnabledEvents": {
"type": "string"
},
"smtpEncryptionType": {
"type": "string"
},
"smtpFrom": {
"type": "string"
},
"smtpFromName": {
"type": "string"
},
"smtpHost": {
"type": "string"
},
"smtpMemory": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"smtpPassword": {
"type": "string"
},
"smtpPort": {
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"smtpTo": {
"type": "string"
},
"smtpUsername": {
"type": "string"
},
"subAnnounce": {
"type": "string"
},
@@ -164,15 +48,9 @@ export const SCHEMAS: Record<string, unknown> = {
"subClashEnable": {
"type": "boolean"
},
"subClashEnableRouting": {
"type": "boolean"
},
"subClashPath": {
"type": "string"
},
"subClashRules": {
"type": "string"
},
"subClashURI": {
"type": "string"
},
@@ -185,21 +63,12 @@ export const SCHEMAS: Record<string, unknown> = {
"subEnable": {
"type": "boolean"
},
"subEnableRouting": {
"type": "boolean"
},
"subEncrypt": {
"type": "boolean"
},
"subHideSettings": {
"type": "boolean"
},
"subIncyEnableRouting": {
"type": "boolean"
},
"subIncyRoutingRules": {
"type": "string"
},
"subJsonAlwaysArray": {
"type": "boolean"
},
@@ -221,9 +90,6 @@ export const SCHEMAS: Record<string, unknown> = {
"subJsonPath": {
"type": "string"
},
"subJsonRules": {
"type": "string"
},
"subJsonURI": {
"type": "string"
},
@@ -240,16 +106,14 @@ export const SCHEMAS: Record<string, unknown> = {
"type": "string"
},
"subPort": {
"description": "SubPort 0 means \"no explicit port\": subscription links are generated\nwithout a port (standard scheme port behind a reverse proxy) while the\nsub server still binds the default port. See SettingService.BuildSubURIBase\nand the sub server bootstrap for the two sides of that split.",
"maximum": 65535,
"minimum": 1,
"minimum": 0,
"type": "integer"
},
"subProfileUrl": {
"type": "string"
},
"subRoutingRules": {
"type": "string"
},
"subShowIdentityOnAllLinks": {
"type": "boolean"
},
@@ -270,43 +134,6 @@ export const SCHEMAS: Record<string, unknown> = {
"minimum": 0,
"type": "integer"
},
"tgBotAPIServer": {
"type": "string"
},
"tgBotBackup": {
"type": "boolean"
},
"tgBotChatId": {
"type": "string"
},
"tgBotEnable": {
"type": "boolean"
},
"tgBotProxy": {
"type": "string"
},
"tgBotToken": {
"type": "string"
},
"tgCpu": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"tgEnabledEvents": {
"type": "string"
},
"tgLang": {
"type": "string"
},
"tgMemory": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"tgRunTime": {
"type": "string"
},
"timeLocation": {
"type": "string"
},
@@ -318,12 +145,6 @@ export const SCHEMAS: Record<string, unknown> = {
"trustedProxyCIDRs": {
"type": "string"
},
"twoFactorEnable": {
"type": "boolean"
},
"twoFactorToken": {
"type": "string"
},
"warpUpdateInterval": {
"minimum": 0,
"type": "integer"
@@ -352,64 +173,24 @@ export const SCHEMAS: Record<string, unknown> = {
"required": [
"datepicker",
"expireDiff",
"externalTrafficInformEnable",
"externalTrafficInformURI",
"ipLimitAllowlist",
"ldapAutoCreate",
"ldapAutoDelete",
"ldapBaseDN",
"ldapBindDN",
"ldapDefaultExpiryDays",
"ldapDefaultLimitIP",
"ldapDefaultTotalGB",
"ldapEnable",
"ldapFlagField",
"ldapHost",
"ldapInboundTags",
"ldapInsecureSkipVerify",
"ldapInvertFlag",
"ldapPassword",
"ldapPort",
"ldapSyncCron",
"ldapTruthyValues",
"ldapUseTLS",
"ldapUserAttr",
"ldapUserFilter",
"ldapVlessField",
"outboundDownThreshold",
"pageSize",
"panelOutbound",
"remarkTemplate",
"restartXrayOnClientDisable",
"sessionMaxAge",
"smtpCpu",
"smtpEnable",
"smtpEnabledEvents",
"smtpEncryptionType",
"smtpFrom",
"smtpFromName",
"smtpHost",
"smtpMemory",
"smtpPassword",
"smtpPort",
"smtpTo",
"smtpUsername",
"subAnnounce",
"subCertFile",
"subClashAutoDetect",
"subClashEnable",
"subClashEnableRouting",
"subClashPath",
"subClashRules",
"subClashURI",
"subClashUserAgentRegex",
"subDomain",
"subEnable",
"subEnableRouting",
"subEncrypt",
"subHideSettings",
"subIncyEnableRouting",
"subIncyRoutingRules",
"subJsonAlwaysArray",
"subJsonAutoDetect",
"subJsonEnable",
@@ -417,7 +198,6 @@ export const SCHEMAS: Record<string, unknown> = {
"subJsonMux",
"subJsonObservatory",
"subJsonPath",
"subJsonRules",
"subJsonURI",
"subJsonUserAgentRegex",
"subKeyFile",
@@ -425,29 +205,15 @@ export const SCHEMAS: Record<string, unknown> = {
"subPath",
"subPort",
"subProfileUrl",
"subRoutingRules",
"subShowIdentityOnAllLinks",
"subSupportUrl",
"subThemeDir",
"subTitle",
"subURI",
"subUpdates",
"tgBotAPIServer",
"tgBotBackup",
"tgBotChatId",
"tgBotEnable",
"tgBotProxy",
"tgBotToken",
"tgCpu",
"tgEnabledEvents",
"tgLang",
"tgMemory",
"tgRunTime",
"timeLocation",
"trafficDiff",
"trustedProxyCIDRs",
"twoFactorEnable",
"twoFactorToken",
"warpUpdateInterval",
"webBasePath",
"webCertFile",
@@ -467,104 +233,18 @@ export const SCHEMAS: Record<string, unknown> = {
"minimum": 0,
"type": "integer"
},
"externalTrafficInformEnable": {
"type": "boolean"
},
"externalTrafficInformURI": {
"type": "string"
},
"hasApiToken": {
"type": "boolean"
},
"hasLdapPassword": {
"type": "boolean"
},
"hasNordSecret": {
"type": "boolean"
},
"hasSmtpPassword": {
"type": "boolean"
},
"hasTgBotToken": {
"type": "boolean"
},
"hasTwoFactorToken": {
"type": "boolean"
},
"hasWarpSecret": {
"type": "boolean"
},
"ipLimitAllowlist": {
"type": "string"
},
"ldapAutoCreate": {
"type": "boolean"
},
"ldapAutoDelete": {
"type": "boolean"
},
"ldapBaseDN": {
"type": "string"
},
"ldapBindDN": {
"type": "string"
},
"ldapDefaultExpiryDays": {
"minimum": 0,
"type": "integer"
},
"ldapDefaultLimitIP": {
"minimum": 0,
"type": "integer"
},
"ldapDefaultTotalGB": {
"minimum": 0,
"type": "integer"
},
"ldapEnable": {
"type": "boolean"
},
"ldapFlagField": {
"type": "string"
},
"ldapHost": {
"type": "string"
},
"ldapInboundTags": {
"type": "string"
},
"ldapInsecureSkipVerify": {
"type": "boolean"
},
"ldapInvertFlag": {
"type": "boolean"
},
"ldapPassword": {
"type": "string"
},
"ldapPort": {
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"ldapSyncCron": {
"type": "string"
},
"ldapTruthyValues": {
"type": "string"
},
"ldapUseTLS": {
"type": "boolean"
},
"ldapUserAttr": {
"type": "string"
},
"ldapUserFilter": {
"type": "string"
},
"ldapVlessField": {
"type": "string"
},
"outboundDownThreshold": {
"maximum": 100,
"minimum": 1,
@@ -589,48 +269,6 @@ export const SCHEMAS: Record<string, unknown> = {
"minimum": 1,
"type": "integer"
},
"smtpCpu": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"smtpEnable": {
"type": "boolean"
},
"smtpEnabledEvents": {
"type": "string"
},
"smtpEncryptionType": {
"type": "string"
},
"smtpFrom": {
"type": "string"
},
"smtpFromName": {
"type": "string"
},
"smtpHost": {
"type": "string"
},
"smtpMemory": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"smtpPassword": {
"type": "string"
},
"smtpPort": {
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"smtpTo": {
"type": "string"
},
"smtpUsername": {
"type": "string"
},
"subAnnounce": {
"type": "string"
},
@@ -643,15 +281,9 @@ export const SCHEMAS: Record<string, unknown> = {
"subClashEnable": {
"type": "boolean"
},
"subClashEnableRouting": {
"type": "boolean"
},
"subClashPath": {
"type": "string"
},
"subClashRules": {
"type": "string"
},
"subClashURI": {
"type": "string"
},
@@ -664,21 +296,12 @@ export const SCHEMAS: Record<string, unknown> = {
"subEnable": {
"type": "boolean"
},
"subEnableRouting": {
"type": "boolean"
},
"subEncrypt": {
"type": "boolean"
},
"subHideSettings": {
"type": "boolean"
},
"subIncyEnableRouting": {
"type": "boolean"
},
"subIncyRoutingRules": {
"type": "string"
},
"subJsonAlwaysArray": {
"type": "boolean"
},
@@ -700,9 +323,6 @@ export const SCHEMAS: Record<string, unknown> = {
"subJsonPath": {
"type": "string"
},
"subJsonRules": {
"type": "string"
},
"subJsonURI": {
"type": "string"
},
@@ -719,16 +339,14 @@ export const SCHEMAS: Record<string, unknown> = {
"type": "string"
},
"subPort": {
"description": "SubPort 0 means \"no explicit port\": subscription links are generated\nwithout a port (standard scheme port behind a reverse proxy) while the\nsub server still binds the default port. See SettingService.BuildSubURIBase\nand the sub server bootstrap for the two sides of that split.",
"maximum": 65535,
"minimum": 1,
"minimum": 0,
"type": "integer"
},
"subProfileUrl": {
"type": "string"
},
"subRoutingRules": {
"type": "string"
},
"subShowIdentityOnAllLinks": {
"type": "boolean"
},
@@ -749,43 +367,6 @@ export const SCHEMAS: Record<string, unknown> = {
"minimum": 0,
"type": "integer"
},
"tgBotAPIServer": {
"type": "string"
},
"tgBotBackup": {
"type": "boolean"
},
"tgBotChatId": {
"type": "string"
},
"tgBotEnable": {
"type": "boolean"
},
"tgBotProxy": {
"type": "string"
},
"tgBotToken": {
"type": "string"
},
"tgCpu": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"tgEnabledEvents": {
"type": "string"
},
"tgLang": {
"type": "string"
},
"tgMemory": {
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"tgRunTime": {
"type": "string"
},
"timeLocation": {
"type": "string"
},
@@ -797,12 +378,6 @@ export const SCHEMAS: Record<string, unknown> = {
"trustedProxyCIDRs": {
"type": "string"
},
"twoFactorEnable": {
"type": "boolean"
},
"twoFactorToken": {
"type": "string"
},
"warpUpdateInterval": {
"minimum": 0,
"type": "integer"
@@ -831,71 +406,27 @@ export const SCHEMAS: Record<string, unknown> = {
"required": [
"datepicker",
"expireDiff",
"externalTrafficInformEnable",
"externalTrafficInformURI",
"hasApiToken",
"hasLdapPassword",
"hasNordSecret",
"hasSmtpPassword",
"hasTgBotToken",
"hasTwoFactorToken",
"hasWarpSecret",
"ipLimitAllowlist",
"ldapAutoCreate",
"ldapAutoDelete",
"ldapBaseDN",
"ldapBindDN",
"ldapDefaultExpiryDays",
"ldapDefaultLimitIP",
"ldapDefaultTotalGB",
"ldapEnable",
"ldapFlagField",
"ldapHost",
"ldapInboundTags",
"ldapInsecureSkipVerify",
"ldapInvertFlag",
"ldapPassword",
"ldapPort",
"ldapSyncCron",
"ldapTruthyValues",
"ldapUseTLS",
"ldapUserAttr",
"ldapUserFilter",
"ldapVlessField",
"outboundDownThreshold",
"pageSize",
"panelOutbound",
"remarkTemplate",
"restartXrayOnClientDisable",
"sessionMaxAge",
"smtpCpu",
"smtpEnable",
"smtpEnabledEvents",
"smtpEncryptionType",
"smtpFrom",
"smtpFromName",
"smtpHost",
"smtpMemory",
"smtpPassword",
"smtpPort",
"smtpTo",
"smtpUsername",
"subAnnounce",
"subCertFile",
"subClashAutoDetect",
"subClashEnable",
"subClashEnableRouting",
"subClashPath",
"subClashRules",
"subClashURI",
"subClashUserAgentRegex",
"subDomain",
"subEnable",
"subEnableRouting",
"subEncrypt",
"subHideSettings",
"subIncyEnableRouting",
"subIncyRoutingRules",
"subJsonAlwaysArray",
"subJsonAutoDetect",
"subJsonEnable",
@@ -903,7 +434,6 @@ export const SCHEMAS: Record<string, unknown> = {
"subJsonMux",
"subJsonObservatory",
"subJsonPath",
"subJsonRules",
"subJsonURI",
"subJsonUserAgentRegex",
"subKeyFile",
@@ -911,29 +441,15 @@ export const SCHEMAS: Record<string, unknown> = {
"subPath",
"subPort",
"subProfileUrl",
"subRoutingRules",
"subShowIdentityOnAllLinks",
"subSupportUrl",
"subThemeDir",
"subTitle",
"subURI",
"subUpdates",
"tgBotAPIServer",
"tgBotBackup",
"tgBotChatId",
"tgBotEnable",
"tgBotProxy",
"tgBotToken",
"tgCpu",
"tgEnabledEvents",
"tgLang",
"tgMemory",
"tgRunTime",
"timeLocation",
"trafficDiff",
"trustedProxyCIDRs",
"twoFactorEnable",
"twoFactorToken",
"warpUpdateInterval",
"webBasePath",
"webCertFile",
@@ -944,36 +460,6 @@ export const SCHEMAS: Record<string, unknown> = {
],
"type": "object"
},
"AmneziaWGLogs": {
"description": "AmneziaWGLogs is what the overview's AmneziaWG log view renders: the live\nper-peer activity of every running embedded interface, plus the panel's\nown recent AmneziaWG lifecycle log lines that explain a peer being absent\nfrom Peers at all.",
"properties": {
"events": {
"example": [
"2025/01/01 12:00:00 amneziawg: started interface awg1 for inbound 1"
],
"items": {
"type": "string"
},
"type": "array"
},
"peers": {
"items": {
"$ref": "#/components/schemas/PeerActivity"
},
"type": "array"
},
"running": {
"example": true,
"type": "boolean"
}
},
"required": [
"events",
"peers",
"running"
],
"type": "object"
},
"ApiToken": {
"properties": {
"createdAt": {
@@ -2617,6 +2103,14 @@ export const SCHEMAS: Record<string, unknown> = {
"name": {
"type": "string"
},
"nodeType": {
"description": "NodeType distinguishes traditional panel-to-panel nodes from lightweight\nagent nodes. Agent nodes skip the panel reachability probe and the API\ntoken requirement; an agent token is issued on creation instead.",
"enum": [
"traditional",
"agent"
],
"type": "string"
},
"outboundTag": {
"type": "string"
},
@@ -2625,7 +2119,7 @@ export const SCHEMAS: Record<string, unknown> = {
},
"port": {
"maximum": 65535,
"minimum": 1,
"minimum": 0,
"type": "integer"
},
"remark": {
@@ -2778,6 +2272,11 @@ export const SCHEMAS: Record<string, unknown> = {
"format": "int64",
"type": "integer"
},
"nodeType": {
"description": "NodeType is \"agent\" for lightweight agent-managed nodes (an agent is\nbound to the node) and \"traditional\" otherwise. It is derived from the\nagent binding, not stored on the node row; read paths that serve the\npanel UI annotate it via annotateNodeTypes. Empty on views built\noutside those paths.",
"example": "traditional",
"type": "string"
},
"onlineCount": {
"example": 5,
"type": "integer"
@@ -2945,68 +2444,6 @@ export const SCHEMAS: Record<string, unknown> = {
],
"type": "object"
},
"PeerActivity": {
"description": "PeerActivity is one peer's live embedded-Device-reported state, the\ncounterpart of an Xray access-log entry: a tunnel logs no requests, only\nhandshakes and bytes.",
"properties": {
"allowedIPs": {
"example": "10.8.1.2/32",
"type": "string"
},
"down": {
"example": 4194304,
"format": "int64",
"type": "integer"
},
"email": {
"example": "peer@example.com",
"type": "string"
},
"endpoint": {
"example": "203.0.113.9:51820",
"type": "string"
},
"handshake": {
"description": "Handshake is unix milliseconds, 0 when the peer has never connected.",
"example": 1735732800000,
"format": "int64",
"type": "integer"
},
"inboundId": {
"example": 1,
"type": "integer"
},
"interface": {
"example": "awg1",
"type": "string"
},
"online": {
"example": true,
"type": "boolean"
},
"tag": {
"example": "inbound-51820",
"type": "string"
},
"up": {
"example": 1048576,
"format": "int64",
"type": "integer"
}
},
"required": [
"allowedIPs",
"down",
"email",
"endpoint",
"handshake",
"inboundId",
"interface",
"online",
"tag",
"up"
],
"type": "object"
},
"ProbeResultUI": {
"properties": {
"cpuPct": {
+3 -133
View File
@@ -4,6 +4,7 @@ export type OnlineAPISupport = number;
export type ProcessState = string;
export type Protocol = string;
export type SubLinkProvider = unknown;
export type rawBytes = number[];
export type staticEgressResolver = string;
export type trafficLocalApplyAction = number;
export type transportBits = number;
@@ -11,64 +12,24 @@ export type transportBits = number;
export interface AllSetting {
datepicker: string;
expireDiff: number;
externalTrafficInformEnable: boolean;
externalTrafficInformURI: string;
ipLimitAllowlist: string;
ldapAutoCreate: boolean;
ldapAutoDelete: boolean;
ldapBaseDN: string;
ldapBindDN: string;
ldapDefaultExpiryDays: number;
ldapDefaultLimitIP: number;
ldapDefaultTotalGB: number;
ldapEnable: boolean;
ldapFlagField: string;
ldapHost: string;
ldapInboundTags: string;
ldapInsecureSkipVerify: boolean;
ldapInvertFlag: boolean;
ldapPassword: string;
ldapPort: number;
ldapSyncCron: string;
ldapTruthyValues: string;
ldapUseTLS: boolean;
ldapUserAttr: string;
ldapUserFilter: string;
ldapVlessField: string;
outboundDownThreshold: number;
pageSize: number;
panelOutbound: string;
remarkTemplate: string;
restartXrayOnClientDisable: boolean;
sessionMaxAge: number;
smtpCpu: number;
smtpEnable: boolean;
smtpEnabledEvents: string;
smtpEncryptionType: string;
smtpFrom: string;
smtpFromName: string;
smtpHost: string;
smtpMemory: number;
smtpPassword: string;
smtpPort: number;
smtpTo: string;
smtpUsername: string;
subAnnounce: string;
subCertFile: string;
subClashAutoDetect: boolean;
subClashEnable: boolean;
subClashEnableRouting: boolean;
subClashPath: string;
subClashRules: string;
subClashURI: string;
subClashUserAgentRegex: string;
subDomain: string;
subEnable: boolean;
subEnableRouting: boolean;
subEncrypt: boolean;
subHideSettings: boolean;
subIncyEnableRouting: boolean;
subIncyRoutingRules: string;
subJsonAlwaysArray: boolean;
subJsonAutoDetect: boolean;
subJsonEnable: boolean;
@@ -76,7 +37,6 @@ export interface AllSetting {
subJsonMux: string;
subJsonObservatory: string;
subJsonPath: string;
subJsonRules: string;
subJsonURI: string;
subJsonUserAgentRegex: string;
subKeyFile: string;
@@ -84,29 +44,15 @@ export interface AllSetting {
subPath: string;
subPort: number;
subProfileUrl: string;
subRoutingRules: string;
subShowIdentityOnAllLinks: boolean;
subSupportUrl: string;
subThemeDir: string;
subTitle: string;
subURI: string;
subUpdates: number;
tgBotAPIServer: string;
tgBotBackup: boolean;
tgBotChatId: string;
tgBotEnable: boolean;
tgBotProxy: string;
tgBotToken: string;
tgCpu: number;
tgEnabledEvents: string;
tgLang: string;
tgMemory: number;
tgRunTime: string;
timeLocation: string;
trafficDiff: number;
trustedProxyCIDRs: string;
twoFactorEnable: boolean;
twoFactorToken: string;
warpUpdateInterval: number;
webBasePath: string;
webCertFile: string;
@@ -119,71 +65,27 @@ export interface AllSetting {
export interface AllSettingView {
datepicker: string;
expireDiff: number;
externalTrafficInformEnable: boolean;
externalTrafficInformURI: string;
hasApiToken: boolean;
hasLdapPassword: boolean;
hasNordSecret: boolean;
hasSmtpPassword: boolean;
hasTgBotToken: boolean;
hasTwoFactorToken: boolean;
hasWarpSecret: boolean;
ipLimitAllowlist: string;
ldapAutoCreate: boolean;
ldapAutoDelete: boolean;
ldapBaseDN: string;
ldapBindDN: string;
ldapDefaultExpiryDays: number;
ldapDefaultLimitIP: number;
ldapDefaultTotalGB: number;
ldapEnable: boolean;
ldapFlagField: string;
ldapHost: string;
ldapInboundTags: string;
ldapInsecureSkipVerify: boolean;
ldapInvertFlag: boolean;
ldapPassword: string;
ldapPort: number;
ldapSyncCron: string;
ldapTruthyValues: string;
ldapUseTLS: boolean;
ldapUserAttr: string;
ldapUserFilter: string;
ldapVlessField: string;
outboundDownThreshold: number;
pageSize: number;
panelOutbound: string;
remarkTemplate: string;
restartXrayOnClientDisable: boolean;
sessionMaxAge: number;
smtpCpu: number;
smtpEnable: boolean;
smtpEnabledEvents: string;
smtpEncryptionType: string;
smtpFrom: string;
smtpFromName: string;
smtpHost: string;
smtpMemory: number;
smtpPassword: string;
smtpPort: number;
smtpTo: string;
smtpUsername: string;
subAnnounce: string;
subCertFile: string;
subClashAutoDetect: boolean;
subClashEnable: boolean;
subClashEnableRouting: boolean;
subClashPath: string;
subClashRules: string;
subClashURI: string;
subClashUserAgentRegex: string;
subDomain: string;
subEnable: boolean;
subEnableRouting: boolean;
subEncrypt: boolean;
subHideSettings: boolean;
subIncyEnableRouting: boolean;
subIncyRoutingRules: string;
subJsonAlwaysArray: boolean;
subJsonAutoDetect: boolean;
subJsonEnable: boolean;
@@ -191,7 +93,6 @@ export interface AllSettingView {
subJsonMux: string;
subJsonObservatory: string;
subJsonPath: string;
subJsonRules: string;
subJsonURI: string;
subJsonUserAgentRegex: string;
subKeyFile: string;
@@ -199,29 +100,15 @@ export interface AllSettingView {
subPath: string;
subPort: number;
subProfileUrl: string;
subRoutingRules: string;
subShowIdentityOnAllLinks: boolean;
subSupportUrl: string;
subThemeDir: string;
subTitle: string;
subURI: string;
subUpdates: number;
tgBotAPIServer: string;
tgBotBackup: boolean;
tgBotChatId: string;
tgBotEnable: boolean;
tgBotProxy: string;
tgBotToken: string;
tgCpu: number;
tgEnabledEvents: string;
tgLang: string;
tgMemory: number;
tgRunTime: string;
timeLocation: string;
trafficDiff: number;
trustedProxyCIDRs: string;
twoFactorEnable: boolean;
twoFactorToken: string;
warpUpdateInterval: number;
webBasePath: string;
webCertFile: string;
@@ -231,12 +118,6 @@ export interface AllSettingView {
webPort: number;
}
export interface AmneziaWGLogs {
events: string[];
peers: PeerActivity[];
running: boolean;
}
export interface ApiToken {
createdAt: number;
enabled: boolean;
@@ -601,6 +482,7 @@ export interface NodeMutationRequest {
inboundSyncMode: string;
inboundTags: string[];
name: string;
nodeType?: string;
outboundTag: string;
pinnedCertSha256: string;
port: number;
@@ -635,6 +517,7 @@ export interface NodeView {
name: string;
netDown: number;
netUp: number;
nodeType?: string;
onlineCount: number;
outboundTag: string;
panelVersion: string;
@@ -668,19 +551,6 @@ export interface PanelUpdateStatus {
state: string;
}
export interface PeerActivity {
allowedIPs: string;
down: number;
email: string;
endpoint: string;
handshake: number;
inboundId: number;
interface: string;
online: boolean;
tag: string;
up: number;
}
export interface ProbeResultUI {
cpuPct: number;
error: string;
+6 -136
View File
@@ -15,6 +15,9 @@ export type Protocol = z.infer<typeof ProtocolSchema>;
export const SubLinkProviderSchema = z.unknown();
export type SubLinkProvider = z.infer<typeof SubLinkProviderSchema>;
export const rawBytesSchema = z.array(z.number().int());
export type rawBytes = z.infer<typeof rawBytesSchema>;
export const staticEgressResolverSchema = z.string();
export type staticEgressResolver = z.infer<typeof staticEgressResolverSchema>;
@@ -27,64 +30,24 @@ export type transportBits = z.infer<typeof transportBitsSchema>;
export const AllSettingSchema = z.object({
datepicker: z.string(),
expireDiff: z.number().int().min(0),
externalTrafficInformEnable: z.boolean(),
externalTrafficInformURI: z.string(),
ipLimitAllowlist: z.string(),
ldapAutoCreate: z.boolean(),
ldapAutoDelete: z.boolean(),
ldapBaseDN: z.string(),
ldapBindDN: z.string(),
ldapDefaultExpiryDays: z.number().int().min(0),
ldapDefaultLimitIP: z.number().int().min(0),
ldapDefaultTotalGB: z.number().int().min(0),
ldapEnable: z.boolean(),
ldapFlagField: z.string(),
ldapHost: z.string(),
ldapInboundTags: z.string(),
ldapInsecureSkipVerify: z.boolean(),
ldapInvertFlag: z.boolean(),
ldapPassword: z.string(),
ldapPort: z.number().int().min(0).max(65535),
ldapSyncCron: z.string(),
ldapTruthyValues: z.string(),
ldapUseTLS: z.boolean(),
ldapUserAttr: z.string(),
ldapUserFilter: z.string(),
ldapVlessField: z.string(),
outboundDownThreshold: z.number().int().min(1).max(100),
pageSize: z.number().int().min(0).max(1000),
panelOutbound: z.string(),
remarkTemplate: z.string(),
restartXrayOnClientDisable: z.boolean(),
sessionMaxAge: z.number().int().min(1).max(525600),
smtpCpu: z.number().int().min(0).max(100),
smtpEnable: z.boolean(),
smtpEnabledEvents: z.string(),
smtpEncryptionType: z.string(),
smtpFrom: z.string(),
smtpFromName: z.string(),
smtpHost: z.string(),
smtpMemory: z.number().int().min(0).max(100),
smtpPassword: z.string(),
smtpPort: z.number().int().min(1).max(65535),
smtpTo: z.string(),
smtpUsername: z.string(),
subAnnounce: z.string(),
subCertFile: z.string(),
subClashAutoDetect: z.boolean(),
subClashEnable: z.boolean(),
subClashEnableRouting: z.boolean(),
subClashPath: z.string(),
subClashRules: z.string(),
subClashURI: z.string(),
subClashUserAgentRegex: z.string(),
subDomain: z.string(),
subEnable: z.boolean(),
subEnableRouting: z.boolean(),
subEncrypt: z.boolean(),
subHideSettings: z.boolean(),
subIncyEnableRouting: z.boolean(),
subIncyRoutingRules: z.string(),
subJsonAlwaysArray: z.boolean(),
subJsonAutoDetect: z.boolean(),
subJsonEnable: z.boolean(),
@@ -92,7 +55,6 @@ export const AllSettingSchema = z.object({
subJsonMux: z.string(),
subJsonObservatory: z.string(),
subJsonPath: z.string(),
subJsonRules: z.string(),
subJsonURI: z.string(),
subJsonUserAgentRegex: z.string(),
subKeyFile: z.string(),
@@ -100,29 +62,15 @@ export const AllSettingSchema = z.object({
subPath: z.string(),
subPort: z.number().int().min(0).max(65535),
subProfileUrl: z.string(),
subRoutingRules: z.string(),
subShowIdentityOnAllLinks: z.boolean(),
subSupportUrl: z.string(),
subThemeDir: z.string(),
subTitle: z.string(),
subURI: z.string(),
subUpdates: z.number().int().min(0).max(525600),
tgBotAPIServer: z.string(),
tgBotBackup: z.boolean(),
tgBotChatId: z.string(),
tgBotEnable: z.boolean(),
tgBotProxy: z.string(),
tgBotToken: z.string(),
tgCpu: z.number().int().min(0).max(100),
tgEnabledEvents: z.string(),
tgLang: z.string(),
tgMemory: z.number().int().min(0).max(100),
tgRunTime: z.string(),
timeLocation: z.string(),
trafficDiff: z.number().int().min(0).max(100),
trustedProxyCIDRs: z.string(),
twoFactorEnable: z.boolean(),
twoFactorToken: z.string(),
warpUpdateInterval: z.number().int().min(0),
webBasePath: z.string(),
webCertFile: z.string(),
@@ -136,71 +84,27 @@ export type AllSetting = z.infer<typeof AllSettingSchema>;
export const AllSettingViewSchema = z.object({
datepicker: z.string(),
expireDiff: z.number().int().min(0),
externalTrafficInformEnable: z.boolean(),
externalTrafficInformURI: z.string(),
hasApiToken: z.boolean(),
hasLdapPassword: z.boolean(),
hasNordSecret: z.boolean(),
hasSmtpPassword: z.boolean(),
hasTgBotToken: z.boolean(),
hasTwoFactorToken: z.boolean(),
hasWarpSecret: z.boolean(),
ipLimitAllowlist: z.string(),
ldapAutoCreate: z.boolean(),
ldapAutoDelete: z.boolean(),
ldapBaseDN: z.string(),
ldapBindDN: z.string(),
ldapDefaultExpiryDays: z.number().int().min(0),
ldapDefaultLimitIP: z.number().int().min(0),
ldapDefaultTotalGB: z.number().int().min(0),
ldapEnable: z.boolean(),
ldapFlagField: z.string(),
ldapHost: z.string(),
ldapInboundTags: z.string(),
ldapInsecureSkipVerify: z.boolean(),
ldapInvertFlag: z.boolean(),
ldapPassword: z.string(),
ldapPort: z.number().int().min(0).max(65535),
ldapSyncCron: z.string(),
ldapTruthyValues: z.string(),
ldapUseTLS: z.boolean(),
ldapUserAttr: z.string(),
ldapUserFilter: z.string(),
ldapVlessField: z.string(),
outboundDownThreshold: z.number().int().min(1).max(100),
pageSize: z.number().int().min(0).max(1000),
panelOutbound: z.string(),
remarkTemplate: z.string(),
restartXrayOnClientDisable: z.boolean(),
sessionMaxAge: z.number().int().min(1).max(525600),
smtpCpu: z.number().int().min(0).max(100),
smtpEnable: z.boolean(),
smtpEnabledEvents: z.string(),
smtpEncryptionType: z.string(),
smtpFrom: z.string(),
smtpFromName: z.string(),
smtpHost: z.string(),
smtpMemory: z.number().int().min(0).max(100),
smtpPassword: z.string(),
smtpPort: z.number().int().min(1).max(65535),
smtpTo: z.string(),
smtpUsername: z.string(),
subAnnounce: z.string(),
subCertFile: z.string(),
subClashAutoDetect: z.boolean(),
subClashEnable: z.boolean(),
subClashEnableRouting: z.boolean(),
subClashPath: z.string(),
subClashRules: z.string(),
subClashURI: z.string(),
subClashUserAgentRegex: z.string(),
subDomain: z.string(),
subEnable: z.boolean(),
subEnableRouting: z.boolean(),
subEncrypt: z.boolean(),
subHideSettings: z.boolean(),
subIncyEnableRouting: z.boolean(),
subIncyRoutingRules: z.string(),
subJsonAlwaysArray: z.boolean(),
subJsonAutoDetect: z.boolean(),
subJsonEnable: z.boolean(),
@@ -208,7 +112,6 @@ export const AllSettingViewSchema = z.object({
subJsonMux: z.string(),
subJsonObservatory: z.string(),
subJsonPath: z.string(),
subJsonRules: z.string(),
subJsonURI: z.string(),
subJsonUserAgentRegex: z.string(),
subKeyFile: z.string(),
@@ -216,29 +119,15 @@ export const AllSettingViewSchema = z.object({
subPath: z.string(),
subPort: z.number().int().min(0).max(65535),
subProfileUrl: z.string(),
subRoutingRules: z.string(),
subShowIdentityOnAllLinks: z.boolean(),
subSupportUrl: z.string(),
subThemeDir: z.string(),
subTitle: z.string(),
subURI: z.string(),
subUpdates: z.number().int().min(0).max(525600),
tgBotAPIServer: z.string(),
tgBotBackup: z.boolean(),
tgBotChatId: z.string(),
tgBotEnable: z.boolean(),
tgBotProxy: z.string(),
tgBotToken: z.string(),
tgCpu: z.number().int().min(0).max(100),
tgEnabledEvents: z.string(),
tgLang: z.string(),
tgMemory: z.number().int().min(0).max(100),
tgRunTime: z.string(),
timeLocation: z.string(),
trafficDiff: z.number().int().min(0).max(100),
trustedProxyCIDRs: z.string(),
twoFactorEnable: z.boolean(),
twoFactorToken: z.string(),
warpUpdateInterval: z.number().int().min(0),
webBasePath: z.string(),
webCertFile: z.string(),
@@ -249,13 +138,6 @@ export const AllSettingViewSchema = z.object({
});
export type AllSettingView = z.infer<typeof AllSettingViewSchema>;
export const AmneziaWGLogsSchema = z.object({
events: z.array(z.string()),
peers: z.array(z.lazy(() => PeerActivitySchema)),
running: z.boolean(),
});
export type AmneziaWGLogs = z.infer<typeof AmneziaWGLogsSchema>;
export const ApiTokenSchema = z.object({
createdAt: z.number().int(),
enabled: z.boolean(),
@@ -643,9 +525,10 @@ export const NodeMutationRequestSchema = z.object({
inboundSyncMode: z.enum(['all', 'selected']),
inboundTags: z.array(z.string()),
name: z.string(),
nodeType: z.enum(['traditional', 'agent']).optional(),
outboundTag: z.string(),
pinnedCertSha256: z.string(),
port: z.number().int().min(1).max(65535),
port: z.number().int().min(0).max(65535),
remark: z.string(),
scheme: z.enum(['http', 'https']),
tlsVerifyMode: z.enum(['verify', 'skip', 'pin', 'mtls']),
@@ -678,6 +561,7 @@ export const NodeViewSchema = z.object({
name: z.string(),
netDown: z.number().int(),
netUp: z.number().int(),
nodeType: z.string().optional(),
onlineCount: z.number().int(),
outboundTag: z.string(),
panelVersion: z.string(),
@@ -714,20 +598,6 @@ export const PanelUpdateStatusSchema = z.object({
});
export type PanelUpdateStatus = z.infer<typeof PanelUpdateStatusSchema>;
export const PeerActivitySchema = z.object({
allowedIPs: z.string(),
down: z.number().int(),
email: z.string(),
endpoint: z.string(),
handshake: z.number().int(),
inboundId: z.number().int(),
interface: z.string(),
online: z.boolean(),
tag: z.string(),
up: z.number().int(),
});
export type PeerActivity = z.infer<typeof PeerActivitySchema>;
export const ProbeResultUISchema = z.object({
cpuPct: z.number(),
error: z.string(),