feat: 增加 Hysteria 节点支持

This commit is contained in:
2024-03-09 17:01:52 +08:00
parent d8a81e44b6
commit 68269fd499
5 changed files with 145 additions and 5 deletions

View File

@ -127,9 +127,12 @@ func ParseProxy(proxies ...string) []model.Proxy {
if strings.HasPrefix(proxy, "ssr://") {
proxyItem, err = parser.ParseShadowsocksR(proxy)
}
if strings.HasPrefix(proxy, "hysteria2://") {
if strings.HasPrefix(proxy, "hysteria2://") || strings.HasPrefix(proxy, "hy2://") {
proxyItem, err = parser.ParseHysteria2(proxy)
}
if strings.HasPrefix(proxy, "hysteria://") {
proxyItem, err = parser.ParseHysteria(proxy)
}
if err == nil {
result = append(result, proxyItem)
} else {