chore: hy URI Scheme 解析
This commit is contained in:
parent
77acd4ba8d
commit
930a7af8e7
1 changed files with 10 additions and 2 deletions
|
@ -66,8 +66,16 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
|
||||||
hysteria["alpn"] = query.Get("alpn")
|
hysteria["alpn"] = query.Get("alpn")
|
||||||
hysteria["auth_str"] = query.Get("auth")
|
hysteria["auth_str"] = query.Get("auth")
|
||||||
hysteria["protocol"] = query.Get("protocol")
|
hysteria["protocol"] = query.Get("protocol")
|
||||||
hysteria["down_mbps"], _ = strconv.Atoi(query.Get("downmbps"))
|
up := query.Get("up")
|
||||||
hysteria["up_mbps"], _ = strconv.Atoi(query.Get("upmbps"))
|
down := query.Get("down")
|
||||||
|
if up == "" {
|
||||||
|
up = query.Get("upmbps")
|
||||||
|
}
|
||||||
|
if down == "" {
|
||||||
|
down = query.Get("downmbps")
|
||||||
|
}
|
||||||
|
hysteria["down"] = down
|
||||||
|
hysteria["up"] = up
|
||||||
hysteria["skip-cert-verify"], _ = strconv.ParseBool(query.Get("insecure"))
|
hysteria["skip-cert-verify"], _ = strconv.ParseBool(query.Get("insecure"))
|
||||||
|
|
||||||
proxies = append(proxies, hysteria)
|
proxies = append(proxies, hysteria)
|
||||||
|
|
Loading…
Reference in a new issue