Add country flag emoji before country code in each proxy name field, some typo fix
This commit is contained in:
2000
assets/flags.json
Normal file
2000
assets/flags.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -51,9 +51,9 @@ func CrawlGo() {
|
||||
cache.LastCrawlTime = time.Now().In(location).Format("2006-01-02 15:04:05")
|
||||
|
||||
// 可用性检测
|
||||
log.Println("Now check proxy health...")
|
||||
log.Println("Now proceed proxy health check...")
|
||||
proxies = proxy.CleanBadProxiesWithGrpool(proxies)
|
||||
log.Println("CrawlGo clash usefull node count:", len(proxies))
|
||||
log.Println("CrawlGo clash usable node count:", len(proxies))
|
||||
proxies.NameReIndex()
|
||||
cache.SetProxies("proxies", proxies)
|
||||
cache.UsefullProxiesCount = proxies.Len()
|
||||
|
||||
@@ -71,8 +71,8 @@ func (ps ProxyList) NameAddCounrty() ProxyList {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
_, country, err := geoIp.Find(ps[ii].BaseInfo().Server)
|
||||
if err != nil || country == "" {
|
||||
country = "ZZ"
|
||||
if err != nil {
|
||||
country = "🏁 ZZ"
|
||||
}
|
||||
ps[ii].SetName(fmt.Sprintf("%s", country))
|
||||
//ps[ii].SetIP(ip)
|
||||
@@ -85,7 +85,7 @@ func (ps ProxyList) NameAddCounrty() ProxyList {
|
||||
func (ps ProxyList) NameAddIndex() ProxyList {
|
||||
num := len(ps)
|
||||
for i := 0; i < num; i++ {
|
||||
ps[i].SetName(fmt.Sprintf("%s_%d", ps[i].BaseInfo().Name, i+1))
|
||||
ps[i].SetName(fmt.Sprintf("%s_%+02v", ps[i].BaseInfo().Name, i+1))
|
||||
}
|
||||
return ps
|
||||
}
|
||||
@@ -94,8 +94,9 @@ func (ps ProxyList) NameReIndex() ProxyList {
|
||||
num := len(ps)
|
||||
for i := 0; i < num; i++ {
|
||||
originName := ps[i].BaseInfo().Name
|
||||
country := string([]rune(originName)[:2])
|
||||
ps[i].SetName(fmt.Sprintf("%s_%d", country, i+1))
|
||||
// country := string([]rune(originName)[:2])
|
||||
country := string([]rune(originName)[:5])
|
||||
ps[i].SetName(fmt.Sprintf("%s_%+02v", country, i+1))
|
||||
}
|
||||
return ps
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user