mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
- Add splitTemplate() to split at proxies:/proxy-groups: markers (like mihomo-gen) - Store clash_template.yaml and servers.yaml as files alongside x-ui.json - Add Clash/Servers editors in Xray advanced config page - Support multi-server proxy generation (each server × each client) - Remove inline template editor from Clash settings panel - Bump version to v1.7.2.1
1.8 KiB
1.8 KiB
Clash Link: Full Mihomo Template + Multi-Server Support
Date: 2026-04-25
Changes
Backend
config/config.go— AddedGetClashTemplatePath(),GetServersPath(),ReadClashTemplate(),SaveClashTemplate(),ReadServers(),SaveServers(). Files stored at/etc/x-ui/clash_template.yamland/etc/x-ui/servers.yamlsub/subClashService.go— AddedsplitTemplate()(from mihomo-gen), modifiedGetClash()to split atproxies:/proxy-groups:markers instead ofproxies: []replacement. Added multi-server support: eachClashServer× each client generates a proxy entry. Falls back to old approach if split fails.sub/sub.go— Reads template and servers from files viaconfig.ReadClashTemplate()/config.ReadServers(). AddedClashServerstruct andparseServers().sub/subController.go— UpdatedNewSUBControllerto acceptclashServers []ClashServerweb/controller/xray_setting.go— Added 4 API endpoints:GET/POST /xray/clashTemplate,GET/POST /xray/serversweb/service/setting.go— ClearedsubClashTemplatedefault (template now from file)
Frontend
web/html/settings/xray/advanced.html— Added "Clash" and "Servers" radio buttons in Xray advanced configweb/html/xray.html— AddedclashTemplate/serversdata with old-value tracking, load/save methods, YAML CodeMirror mode, smart save button dispatches to correct save handlerweb/html/settings/panel/subscription/clash.html— Removed template editor (now in Xray advanced config)web/html/settings.html— RemovedinitClashCodeMirror()(template editor moved)web/translation/translate.en_US.toml— Added "Servers" keyweb/translation/translate.zh_CN.toml— Added "Servers" key
Version
config/version— Bumped to v1.7.2.1