Skip to content

Commit

Permalink
fix: hysteria link
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Mar 10, 2024
1 parent 61c2276 commit af4a46d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 5 additions & 6 deletions ray2sing/hysteria.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit af4a46d

Please sign in to comment.