mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +00:00
Add support for HTTPupgrade custom headers
This commit is contained in:
parent
bd38578978
commit
9a619f9e7c
4 changed files with 55 additions and 30 deletions
|
@ -73,6 +73,9 @@ func dialhttpUpgrade(ctx context.Context, dest net.Destination, streamSettings *
|
|||
Host: transportConfiguration.Host,
|
||||
Header: make(http.Header),
|
||||
}
|
||||
for key, value := range transportConfiguration.Header {
|
||||
req.Header.Add(key, value)
|
||||
}
|
||||
req.Header.Set("Connection", "upgrade")
|
||||
req.Header.Set("Upgrade", "websocket")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue