mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-07-05 04:12:34 +08:00
♻️ Refactor parsers
This commit is contained in:
@ -76,7 +76,7 @@ func BuildSub(clashType model.ClashType, query validator.SubValidator, template
|
||||
err = yaml.Unmarshal(data, &sub)
|
||||
var newProxies []model.Proxy
|
||||
if err != nil {
|
||||
reg, _ := regexp.Compile("(ssr|ss|vmess|trojan|vless|hysteria)://")
|
||||
reg, _ := regexp.Compile("(ssr|ss|vmess|trojan|vless|hysteria|hy2|hysteria2)://")
|
||||
if reg.Match(data) {
|
||||
p := utils.ParseProxy(strings.Split(string(data), "\n")...)
|
||||
newProxies = p
|
||||
|
Reference in New Issue
Block a user