feat(settings): add subscription format controls

This commit is contained in:
Tomilla
2026-07-06 10:02:04 +08:00
parent 5a7b3b7370
commit 8bb9a8c6d5
32 changed files with 926 additions and 23 deletions
+5
View File
@@ -71,6 +71,11 @@ type AllSetting struct {
// Subscription server settings
SubEnable bool `json:"subEnable" form:"subEnable"` // Enable subscription server
SubJsonEnable bool `json:"subJsonEnable" form:"subJsonEnable"` // Enable JSON subscription endpoint
SubJsonAutoDetect bool `json:"subJsonAutoDetect" form:"subJsonAutoDetect"` // Opt in to serving Xray JSON from the standard subscription URL for recognized compatible User-Agents
SubJsonAlwaysArray bool `json:"subJsonAlwaysArray" form:"subJsonAlwaysArray"` // Always return JSON subscriptions as an array, including single-profile responses
SubJsonUserAgentRegex string `json:"subJsonUserAgentRegex" form:"subJsonUserAgentRegex"` // Go RE2 regular expression used to recognize Xray JSON subscription clients
SubClashAutoDetect bool `json:"subClashAutoDetect" form:"subClashAutoDetect"` // Opt in to serving Clash YAML from the standard subscription URL for recognized Clash/Mihomo/Stash User-Agents; browsers and other clients keep existing responses
SubClashUserAgentRegex string `json:"subClashUserAgentRegex" form:"subClashUserAgentRegex"` // Go RE2 regular expression used to recognize Clash/Mihomo clients on the standard subscription URL
SubTitle string `json:"subTitle" form:"subTitle"` // Subscription title
SubSupportUrl string `json:"subSupportUrl" form:"subSupportUrl"` // Subscription support URL
SubProfileUrl string `json:"subProfileUrl" form:"subProfileUrl"` // Subscription profile URL