fix: hy2 解析缺少 name 字段

This commit is contained in:
2024-04-21 00:23:29 +08:00
parent faaf5c366a
commit aa9e102a81
3 changed files with 24 additions and 1 deletions

View File

@ -38,6 +38,8 @@ func ParseHysteria2(proxy string) (model.Proxy, error) {
if strings.Contains(proxy, "#") {
splitResult := strings.Split(proxy, "#")
name, _ = url.QueryUnescape(splitResult[len(splitResult)-1])
} else {
name = strings.Join(serverAndPort, ":")
}
// 返回结果
result := model.Proxy{