mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-07-04 11:52:34 +08:00
modify: 根据Clash筛选返回配置中的节点类型
This commit is contained in:
@ -29,12 +29,18 @@ func GetContryName(proxy model.Proxy) string {
|
||||
}
|
||||
|
||||
func AddProxy(
|
||||
sub *model.Subscription, autotest bool, lazy bool, sortStrategy string,
|
||||
proxies ...model.Proxy,
|
||||
sub *model.Subscription, autotest bool,
|
||||
lazy bool, sortStrategy string,
|
||||
clashType model.ClashType, proxies ...model.Proxy,
|
||||
) {
|
||||
newCountryGroupNames := make([]string, 0)
|
||||
proxyTypes := model.GetSupportProxyTypes(clashType)
|
||||
|
||||
// 添加节点
|
||||
for _, proxy := range proxies {
|
||||
if !proxyTypes[proxy.Type] {
|
||||
continue
|
||||
}
|
||||
sub.Proxies = append(sub.Proxies, proxy)
|
||||
haveProxyGroup := false
|
||||
countryName := GetContryName(proxy)
|
||||
|
Reference in New Issue
Block a user