This commit is contained in:
2024-03-11 17:31:29 +08:00
parent 80994b835c
commit 7c8cb5d7f6
12 changed files with 616 additions and 116 deletions

16
constant/parsers_map.go Normal file
View File

@ -0,0 +1,16 @@
package constant
import (
"sub2sing-box/model"
"sub2sing-box/parser"
)
var ParserMap map[string]func(string) (model.Proxy, error) = map[string]func(string) (model.Proxy, error){
"ss://": parser.ParseShadowsocks,
"vmess://": parser.ParseVmess,
"trojan://": parser.ParseTrojan,
"vless://": parser.ParseVless,
"hysteria://": parser.ParseHysteria,
"hy2://": parser.ParseHysteria2,
"hysteria2://": parser.ParseHysteria2,
}