mirror of
https://github.com/MetaCubeX/Clash.Meta.git
synced 2025-04-19 16:50:56 +00:00
Fix: query string parse on ws-opts
(#2213)
This commit is contained in:
parent
3cbfad1b13
commit
ec5bdbc157
1 changed files with 9 additions and 3 deletions
|
@ -256,10 +256,16 @@ func streamWebsocketConn(conn net.Conn, c *WebsocketConfig, earlyData *bytes.Buf
|
|||
dialer.TLSClientConfig = c.TLSConfig
|
||||
}
|
||||
|
||||
u, err := url.Parse(c.Path)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("parse url %s error: %w", c.Path, err)
|
||||
}
|
||||
|
||||
uri := url.URL{
|
||||
Scheme: scheme,
|
||||
Host: net.JoinHostPort(c.Host, c.Port),
|
||||
Path: c.Path,
|
||||
Scheme: scheme,
|
||||
Host: net.JoinHostPort(c.Host, c.Port),
|
||||
Path: u.Path,
|
||||
RawQuery: u.RawQuery,
|
||||
}
|
||||
|
||||
headers := http.Header{}
|
||||
|
|
Loading…
Add table
Reference in a new issue