fix: hysteria URI Scheme 解析问题

This commit is contained in:
gVisor bot 2022-06-09 00:22:47 +08:00
parent 736c9d13a4
commit a7006f17e8

View file

@ -71,21 +71,13 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
hysteria["type"] = scheme
hysteria["server"] = urlHysteria.Hostname()
hysteria["port"] = urlHysteria.Port()
hysteria["sni"] = query.Get("server_name")
hysteria["sni"] = query.Get("peer")
hysteria["obfs"] = query.Get("obfs")
hysteria["alpn"] = query.Get("alpn")
hysteria["auth"] = query.Get("auth")
hysteria["auth_str"] = query.Get("auth_str")
hysteria["auth_str"] = query.Get("auth")
hysteria["protocol"] = query.Get("protocol")
hysteria["down"] = query.Get("down_mbps")
hysteria["up"] = query.Get("up")
hysteria["down_mbps"], _ = strconv.Atoi(query.Get("down_mbps"))
hysteria["up_mbps"], _ = strconv.Atoi(query.Get("up_mbps"))
hysteria["ca"] = query.Get("ca")
hysteria["ca_str"] = query.Get("ca_str")
hysteria["recv_window_conn"], _ = strconv.Atoi(query.Get("recv_window_conn"))
hysteria["recv_window"], _ = strconv.Atoi(query.Get("recv_window"))
hysteria["disable_mtu_discovery"], _ = strconv.ParseBool(query.Get("disable_mtu_discovery"))
hysteria["down_mbps"], _ = strconv.Atoi(query.Get("downmbps"))
hysteria["up_mbps"], _ = strconv.Atoi(query.Get("upmbps"))
hysteria["skip-cert-verify"], _ = strconv.ParseBool(query.Get("insecure"))
proxies = append(proxies, hysteria)