Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03cf8c6c22 | ||
|
|
60009fedea |
@@ -54,7 +54,7 @@ func (c Clash) Provide() string {
|
||||
}
|
||||
if !noNeedFilterCountry {
|
||||
for _, c := range countries {
|
||||
if strings.HasPrefix(p.BaseInfo().Name, c) {
|
||||
if strings.Contains(p.BaseInfo().Name, c) {
|
||||
countryOk = true
|
||||
break
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package proxy
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
@@ -94,8 +95,7 @@ func (ps ProxyList) NameReIndex() ProxyList {
|
||||
num := len(ps)
|
||||
for i := 0; i < num; i++ {
|
||||
originName := ps[i].BaseInfo().Name
|
||||
// country := string([]rune(originName)[:2])
|
||||
country := string([]rune(originName)[:5])
|
||||
country := strings.SplitN(originName, "_", 2)[0]
|
||||
ps[i].SetName(fmt.Sprintf("%s_%+02v", country, i+1))
|
||||
}
|
||||
return ps
|
||||
|
||||
Reference in New Issue
Block a user