Полный продовый фикс HY2XS/Hysteria2: auth DTO, валидация bind, smoke, URI, preflight и env-контракт

This commit is contained in:
2026-05-08 05:06:29 +05:00
parent 4b382d6ef9
commit d2898ac10c
10 changed files with 49 additions and 23 deletions
-9
View File
@@ -270,19 +270,10 @@ func Hysteria2Url(accountId int64) (string, error) {
hysteria2Config.ACME.Domains != nil &&
len(hysteria2Config.ACME.Domains) > 0 {
urlConfig += fmt.Sprintf("&sni=%s", hysteria2Config.ACME.Domains[0])
// shadowrocket
urlConfig += fmt.Sprintf("&peer=%s", hysteria2Config.ACME.Domains[0])
}
urlConfig += "&insecure=0"
if hysteria2Config.Bandwidth != nil &&
hysteria2Config.Bandwidth.Down != nil &&
*hysteria2Config.Bandwidth.Down != "" {
// shadowrocket
urlConfig += fmt.Sprintf("&downmbps=%s", url.PathEscape(*hysteria2Config.Bandwidth.Down))
}
hysteria2ConfigRemark, err := dao.GetConfig("key = ?", constant.Hysteria2ConfigRemark)
if err != nil {
return "", err