1
0
mirror of https://github.com/bestnite/sub2clash.git synced 2025-12-13 18:00:16 +00:00
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,