modify: 根据Clash筛选返回配置中的节点类型

This commit is contained in:
2023-09-16 21:46:59 +08:00
parent 3318f5f2db
commit 918521682c
8 changed files with 58 additions and 20 deletions

29
model/clash.go Normal file
View File

@ -0,0 +1,29 @@
package model
type ClashType int
const (
Clash ClashType = 1 + iota
ClashMeta
)
func GetSupportProxyTypes(clashType ClashType) map[string]bool {
if clashType == Clash {
return map[string]bool{
"ss": true,
"ssr": true,
"vmess": true,
"trojan": true,
}
}
if clashType == ClashMeta {
return map[string]bool{
"ss": true,
"ssr": true,
"vmess": true,
"trojan": true,
"vless": true,
}
}
return nil
}