mirror of
https://github.com/bestnite/sub2sing-box.git
synced 2025-06-16 10:03:18 +08:00
⚡Auto detect if need country group
This commit is contained in:
@ -90,7 +90,13 @@ func Convert(
|
||||
return "", err
|
||||
}
|
||||
reg := regexp.MustCompile("\"<[A-Za-z]{2}>\"")
|
||||
if reg.MatchString(templateDate) || strings.Contains(templateDate, constant.AllCountryTags) {
|
||||
group := false
|
||||
for _, v := range model.CountryEnglishName {
|
||||
if strings.Contains(templateDate, v) {
|
||||
group = true
|
||||
}
|
||||
}
|
||||
if reg.MatchString(templateDate) || strings.Contains(templateDate, constant.AllCountryTags) || group {
|
||||
outbounds = AddCountryGroup(outbounds, groupType, sortKey, sortType)
|
||||
}
|
||||
var template model.Config
|
||||
|
Reference in New Issue
Block a user