mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-07 05:34:17 +00:00
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
1.7 KiB
1.7 KiB
Clash YAML Subscription Endpoint
Date: 2026-04-24
Changes
New Files
sub/subClashService.go— Clash YAML subscription service: reads user template, generates proxies from inbound/client data, injects viaproxies: []placeholder replacementweb/html/settings/panel/subscription/clash.html— Clash subscription settings panel (path, URI, template textarea)
Backend
web/entity/entity.go— AddedSubClashEnable,SubClashPath,SubClashURI,SubClashTemplatetoAllSettingweb/service/setting.go— Added defaults, getter functions,GetSubSettings()auto-build URI for Clashsub/sub.go— Read Clash settings, pass to controllersub/subController.go— Added Clash fields, routeGET /clash/:subid,clashSubs()handler returningtext/yaml
Frontend
web/html/settings.html— Added Clash settings tab (key 6)web/html/settings/panel/subscription/general.html— Added Clash enable toggleweb/html/settings/panel/subscription/subpage.html— Added Clash QR code, Desktop dropdown with Clash Verge deep linkweb/assets/js/subscription.js— AddedsubClashUrl,clashvergeUrlprefers Clash URLweb/assets/js/model/setting.js— Added Clash defaultsweb/html/inbounds.html— AddedsubClashEnable,subClashURIto subscription settingsweb/html/modals/qrcode_modal.html— Added Clash QR code +genSubClashLink()web/html/modals/inbound_info_modal.html— Added Clash subscription linkweb/translation/translate.en_US.toml— AddedsubClashEnablei18nweb/translation/translate.zh_CN.toml— AddedsubClashEnablei18n
Version
config/version— Bumped to v1.5.2-beta