From af4a46d2946f0a3459a277f05f7d321efeefa8a6 Mon Sep 17 00:00:00 2001 From: hiddify Date: Sun, 10 Mar 2024 19:58:14 +0100 Subject: [PATCH] fix: hysteria link --- main.go | 1 + ray2sing/hysteria.go | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index e0f3677..f7b0d7c 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,7 @@ import ( var examples = map[string][]string{ "hysteria": { "hysteria://host:443?protocol=udp&auth=123456&peer=sni.domain&insecure=1&upmbps=100&downmbps=100&alpn=hysteria&obfs=xplus&obfsParam=123456#remarks", + "hysteria://ip:999/?mport=6000-21000&insecure=1&auth=483f8ef7-8480-490d-92fb-1fc392fb34b6&upmbps=30&downmbps=70&alpn=h3", }, "ssconf": { "ssconf://s3.amazonaws.com/beedynconprd/ng4lf90ip01zstlyle4r0t56x1qli4cvmt2ws6nh0kdz1jpgzyedogxt3mpxfbxi.json#BeePass", diff --git a/ray2sing/hysteria.go b/ray2sing/hysteria.go index c40e3fd..d2483a8 100644 --- a/ray2sing/hysteria.go +++ b/ray2sing/hysteria.go @@ -27,22 +27,21 @@ func HysteriaSingbox(hysteriaURL string) (*T.Outbound, error) { }, }, } - options := singOut.HysteriaOptions - options.AuthString = u.Params["auth"] + singOut.HysteriaOptions.AuthString = u.Params["auth"] upMbps, err := strconv.Atoi(u.Params["upmbps"]) if err == nil { - options.UpMbps = upMbps + singOut.HysteriaOptions.UpMbps = upMbps } downMbps, err := strconv.Atoi(u.Params["downmbps"]) if err == nil { - options.DownMbps = downMbps + singOut.HysteriaOptions.DownMbps = downMbps } - options.Obfs = u.Params["obfsParam"] - options.TurnRelay, err = u.GetRelayOptions() + singOut.HysteriaOptions.Obfs = u.Params["obfsParam"] + singOut.HysteriaOptions.TurnRelay, err = u.GetRelayOptions() if err != nil { return nil, err }