This commit is contained in:
2024-08-04 12:59:55 +08:00
parent 7158ad467a
commit dedbf2bc03
3 changed files with 14 additions and 1 deletions

View File

@ -72,6 +72,14 @@ func ParseHysteria2(proxy string) (model.Proxy, error) {
enableTLS := pinSHA256 != ""
insecureBool := insecure == "1"
if remarks == "" {
remarksIndex := strings.LastIndex(proxy, "#")
if remarksIndex != -1 {
remarks = proxy[remarksIndex:]
remarks, _ = url.QueryUnescape(remarks)
}
}
result := model.Proxy{
Type: "hysteria2",
Name: remarks,