Fix xhttp link parsing

This commit is contained in:
Shtorm
2026-08-11 23:30:42 +03:00
parent b900e3513c
commit f74146648e

View File

@@ -70,9 +70,10 @@ func parseVLESSLink(link string) (option.Outbound, error) {
case "xhttp": case "xhttp":
Transport.Type = C.V2RayTransportTypeXHTTP Transport.Type = C.V2RayTransportTypeXHTTP
if alpn, exists := proxy["alpn"]; exists && alpn != "" { if alpn, exists := proxy["alpn"]; exists && alpn != "" {
TLSOptions.ALPN = []string{alpn} TLSOptions.ALPN = strings.Split(alpn, ",")
} else {
TLSOptions.ALPN = []string{"h2", "http/1.1"}
} }
TLSOptions.ALPN = []string{"h2", "http/1.1"}
if host, exists := proxy["host"]; exists && host != "" { if host, exists := proxy["host"]; exists && host != "" {
Transport.XHTTPOptions.Host = host Transport.XHTTPOptions.Host = host
} }