From 94648989b8c72df8ecec0a7e7f4853b5f61d5b21 Mon Sep 17 00:00:00 2001 From: MetaCubeX Date: Thu, 9 Jun 2022 00:22:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20hysteria=20URI=20Scheme=20=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/convert/converter.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/common/convert/converter.go b/common/convert/converter.go index 5c9846c2..7a96743e 100644 --- a/common/convert/converter.go +++ b/common/convert/converter.go @@ -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)