mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-17 07:37:15 +00:00
feat(sub): add dummy info node and status configs for subscriptions (#6412)
* feat(settings): add subInfoNodeEnable and status template settings * feat(sub): add dummy info node and status configs for raw links * feat(sub): support dummy info node in clash and json subscriptions * feat(ui): add subscription info node switch and status templates to settings * style: apply gofumpt formatting * fix(sub): address review feedback on subscription info node - Restore GetSubs contract to avoid unintended remark expansions on non-subscription-body calls. - Exclude dummy info node from Clash PROXY select group when active server nodes exist. - Track hasEnabledClient and set traffic.Enable in JSON and Clash paths so status tokens evaluate correctly. - Deterministically sort client emails across subscriptions before selecting primaryEmail. - Consolidate duplicated info-node evaluation logic into resolveInfoNodeRemark helper. - Remove redundant pure-getter test from setting_sub_info_node_test.go. Co-Authored-By: Claude Code <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -191,6 +191,9 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subEncrypt": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"subExpiredTemplate": {
|
||||
"type": "string"
|
||||
},
|
||||
"subHideSettings": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -200,6 +203,9 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subIncyRoutingRules": {
|
||||
"type": "string"
|
||||
},
|
||||
"subInfoNodeEnable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"subJsonAlwaysArray": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -262,6 +268,9 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"subTrafficDepletedTemplate": {
|
||||
"type": "string"
|
||||
},
|
||||
"subURI": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -407,9 +416,11 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subEnable",
|
||||
"subEnableRouting",
|
||||
"subEncrypt",
|
||||
"subExpiredTemplate",
|
||||
"subHideSettings",
|
||||
"subIncyEnableRouting",
|
||||
"subIncyRoutingRules",
|
||||
"subInfoNodeEnable",
|
||||
"subJsonAlwaysArray",
|
||||
"subJsonAutoDetect",
|
||||
"subJsonEnable",
|
||||
@@ -430,6 +441,7 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subSupportUrl",
|
||||
"subThemeDir",
|
||||
"subTitle",
|
||||
"subTrafficDepletedTemplate",
|
||||
"subURI",
|
||||
"subUpdates",
|
||||
"tgBotAPIServer",
|
||||
@@ -670,6 +682,9 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subEncrypt": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"subExpiredTemplate": {
|
||||
"type": "string"
|
||||
},
|
||||
"subHideSettings": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -679,6 +694,9 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subIncyRoutingRules": {
|
||||
"type": "string"
|
||||
},
|
||||
"subInfoNodeEnable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"subJsonAlwaysArray": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -741,6 +759,9 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"subTrafficDepletedTemplate": {
|
||||
"type": "string"
|
||||
},
|
||||
"subURI": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -893,9 +914,11 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subEnable",
|
||||
"subEnableRouting",
|
||||
"subEncrypt",
|
||||
"subExpiredTemplate",
|
||||
"subHideSettings",
|
||||
"subIncyEnableRouting",
|
||||
"subIncyRoutingRules",
|
||||
"subInfoNodeEnable",
|
||||
"subJsonAlwaysArray",
|
||||
"subJsonAutoDetect",
|
||||
"subJsonEnable",
|
||||
@@ -916,6 +939,7 @@ export const SCHEMAS: Record<string, unknown> = {
|
||||
"subSupportUrl",
|
||||
"subThemeDir",
|
||||
"subTitle",
|
||||
"subTrafficDepletedTemplate",
|
||||
"subURI",
|
||||
"subUpdates",
|
||||
"tgBotAPIServer",
|
||||
|
||||
Reference in New Issue
Block a user