0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 11:29:36 +03:00

Add support for HTTPupgrade custom headers

This commit is contained in:
风扇滑翔翼
2024-03-23 17:43:07 +00:00
committed by yuhan6665
parent bd38578978
commit 9a619f9e7c
4 changed files with 55 additions and 30 deletions

View File

@ -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,
}