Skip to content

Commit

Permalink
fix: 修复重名节点没有正确重命名的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
nitezs committed Mar 9, 2024
1 parent 70f5c63 commit d8a81e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/controller/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,11 @@ func BuildSub(clashType model.ClashType, query validator.SubValidator, template
names := make(map[string]int)
for i := range proxyList {
if _, exist := names[proxyList[i].Name]; exist {
names[proxyList[i].Name] = names[proxyList[i].Name] + 1
proxyList[i].Name = proxyList[i].Name + " " + strconv.Itoa(names[proxyList[i].Name])
} else {
names[proxyList[i].Name] = 0
}
names[proxyList[i].Name] = names[proxyList[i].Name] + 1
}
// trim
for i := range proxyList {
Expand Down

0 comments on commit d8a81e4

Please sign in to comment.