mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +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
|
@ -183,6 +183,7 @@ func (c *WebSocketConfig) Build() (proto.Message, error) {
|
|||
type HttpUpgradeConfig struct {
|
||||
Path string `json:"path"`
|
||||
Host string `json:"host"`
|
||||
Headers map[string]string `json:"headers"`
|
||||
AcceptProxyProtocol bool `json:"acceptProxyProtocol"`
|
||||
}
|
||||
|
||||
|
@ -202,6 +203,7 @@ func (c *HttpUpgradeConfig) Build() (proto.Message, error) {
|
|||
config := &httpupgrade.Config{
|
||||
Path: path,
|
||||
Host: c.Host,
|
||||
Header: c.Headers,
|
||||
AcceptProxyProtocol: c.AcceptProxyProtocol,
|
||||
Ed: ed,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue