feat: add Clash YAML subscription endpoint with template injection
Add /clash/:subid endpoint that returns complete Clash YAML config.
User provides full template (DNS, routing, proxy-groups, rules) in
settings, panel generates proxies from inbound/client data and injects
via proxies: [] placeholder replacement.
- New SubClashService reads template, generates vmess/vless/trojan/ss
proxy entries with transport (ws/grpc/h2/tcp/httpupgrade), TLS, and
Reality support
- Settings: subClashEnable, subClashPath, subClashURI, subClashTemplate
- UI: Clash settings tab, QR code on subpage, Desktop dropdown with
clash-verge:// deep link preferring Clash URL
- Version bump to v1.5.2-beta
2026-04-24 03:25:10 +00:00
{{define "settings/panel/subscription/clash"}}
2026-04-25 10:23:42 +00:00
< a-collapse default-active-key = "['1']" >
feat: add Clash YAML subscription endpoint with template injection
Add /clash/:subid endpoint that returns complete Clash YAML config.
User provides full template (DNS, routing, proxy-groups, rules) in
settings, panel generates proxies from inbound/client data and injects
via proxies: [] placeholder replacement.
- New SubClashService reads template, generates vmess/vless/trojan/ss
proxy entries with transport (ws/grpc/h2/tcp/httpupgrade), TLS, and
Reality support
- Settings: subClashEnable, subClashPath, subClashURI, subClashTemplate
- UI: Clash settings tab, QR code on subpage, Desktop dropdown with
clash-verge:// deep link preferring Clash URL
- Version bump to v1.5.2-beta
2026-04-24 03:25:10 +00:00
< a-collapse-panel key = "1" header = '{{ i18n "pages.xray.generalConfigs"}}' >
< a-setting-list-item paddings = "small" >
< template # title > {{ i18n "pages.settings.subPath"}}< / template >
< template # description > {{ i18n "pages.settings.subPathDesc"}}< / template >
< template # control >
< a-input type = "text" v-model = "allSetting.subClashPath"
@input="allSetting.subClashPath = ((typeof $event === 'string' ? $event : ($event & & $event.target ? $event.target.value : '')) || '').replace(/[:*]/g, '')"
@blur="allSetting.subClashPath = (p => { p = p || '/'; if (!p.startsWith('/')) p='/' + p; if (!p.endsWith('/')) p += '/'; return p.replace(/\/+/g,'/'); })(allSetting.subClashPath)"
placeholder="/clash/">< / a-input >
< / template >
< / a-setting-list-item >
< a-setting-list-item paddings = "small" >
< template # title > {{ i18n "pages.settings.subURI"}}< / template >
< template # description > {{ i18n "pages.settings.subURIDesc"}}< / template >
< template # control >
< a-input type = "text" placeholder = "(http|https)://domain[:port]/path/"
v-model="allSetting.subClashURI">< / a-input >
< / template >
< / a-setting-list-item >
< / a-collapse-panel >
< / a-collapse >
{{end}}