⬆ Upgrade dependences

 Re-add the group parameter
📝 Modify templates
This commit is contained in:
2024-10-20 00:46:01 +08:00
parent 4c9ce17994
commit 9f8bca3804
6 changed files with 252 additions and 15 deletions

View File

@ -24,6 +24,7 @@ func Convert(
templatePath string,
delete string,
rename map[string]string,
enableGroup bool,
groupType string,
sortKey string,
sortType string,
@ -84,7 +85,9 @@ func Convert(
}
}
}
if enableGroup {
outbounds = AddCountryGroup(outbounds, groupType, sortKey, sortType)
}
if templatePath != "" {
templateDate, err := ReadTemplate(templatePath)
if err != nil {
@ -97,7 +100,7 @@ func Convert(
group = true
}
}
if reg.MatchString(templateDate) || strings.Contains(templateDate, constant.AllCountryTags) || group {
if !enableGroup && (reg.MatchString(templateDate) || strings.Contains(templateDate, constant.AllCountryTags) || group) {
outbounds = AddCountryGroup(outbounds, groupType, sortKey, sortType)
}
var template model.Options