fix numbered external links #774

This commit is contained in:
Alireza Ahmadi
2025-09-04 00:47:58 +02:00
parent 2d28d9b409
commit 97d1694bfa
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -73,8 +73,12 @@ func (s *ClashService) GetClash(subId string) (*string, []string, error) {
}
links := s.LinkService.GetLinks(&client.Links, "external", "")
tagNumEnable := 0
if len(links) > 1 {
tagNumEnable = 1
}
for index, link := range links {
json, tag, err := util.GetOutbound(link, index)
json, tag, err := util.GetOutbound(link, (index+1)*tagNumEnable)
if err == nil && len(tag) > 0 {
*outbounds = append(*outbounds, *json)
*outTags = append(*outTags, tag)