1
0
mirror of https://github.com/nitezs/sub2clash.git synced 2024-12-23 15:04:41 -05:00
This commit is contained in:
Nite07 2024-10-19 15:39:20 +08:00
parent 6bb2d16e4b
commit f7dc78aabc

View File

@ -104,6 +104,11 @@ func ParseVless(proxy string) (model.Proxy, error) {
} }
if _type == "http" { if _type == "http" {
result.HTTPOpts = model.HTTPOptions{}
result.HTTPOpts.Headers = map[string][]string{}
result.HTTPOpts.Path = strings.Split(path, ",")
hosts, err := url.QueryUnescape(host) hosts, err := url.QueryUnescape(host)
if err != nil { if err != nil {
return model.Proxy{}, &ParseError{ return model.Proxy{}, &ParseError{
@ -113,10 +118,9 @@ func ParseVless(proxy string) (model.Proxy, error) {
} }
} }
result.Network = "http" result.Network = "http"
result.HTTPOpts = model.HTTPOptions{ if hosts != "" {
Headers: map[string][]string{"Host": strings.Split(hosts, ",")}, result.HTTPOpts.Headers["host"] = strings.Split(host, ",")
} }
} }
return result, nil return result, nil