From 42fd251eb5737925f26a78c78b2c596995df35d3 Mon Sep 17 00:00:00 2001 From: Nite07 Date: Mon, 7 Oct 2024 16:34:56 +0800 Subject: [PATCH] #42 --- README.md | 2 -- api/handler/default.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 39befff..02ba0ca 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # sub2clash -> Sing-box 用户?看看另一个项目 [sub2sing-box](https://github.com/nitezs/sub2sing-box) - 将订阅链接转换为 Clash、Clash.Meta 配置 [预览](https://www.nite07.com/sub) diff --git a/api/handler/default.go b/api/handler/default.go index 7d3244c..dfeff91 100644 --- a/api/handler/default.go +++ b/api/handler/default.go @@ -119,7 +119,7 @@ func BuildSub(clashType model.ClashType, query validator.SubValidator, template proxies := make(map[string]*model.Proxy) newProxies := make([]model.Proxy, 0, len(proxyList)) for i := range proxyList { - key := proxyList[i].Server + strconv.Itoa(proxyList[i].Port) + proxyList[i].Type + proxyList[i].UUID + proxyList[i].Password + key := proxyList[i].Name + proxyList[i].Server + strconv.Itoa(proxyList[i].Port) + proxyList[i].Type + proxyList[i].UUID + proxyList[i].Password if _, exist := proxies[key]; !exist { proxies[key] = &proxyList[i] newProxies = append(newProxies, proxyList[i])