1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-18 05:25:23 +00:00

update json configure for websocket header

This commit is contained in:
Shelikhoo 2021-05-01 15:49:42 +01:00
parent d378b8c42e
commit 40a7847d7f
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -142,6 +142,7 @@ type WebSocketConfig struct {
AcceptProxyProtocol bool `json:"acceptProxyProtocol"` AcceptProxyProtocol bool `json:"acceptProxyProtocol"`
MaxEarlyData int32 `json:"maxEarlyData"` MaxEarlyData int32 `json:"maxEarlyData"`
UseBrowserForwarding bool `json:"useBrowserForwarding"` UseBrowserForwarding bool `json:"useBrowserForwarding"`
EarlyDataHeaderName string `json:"earlyDataHeaderName"`
} }
// Build implements Buildable. // Build implements Buildable.
@ -162,6 +163,7 @@ func (c *WebSocketConfig) Build() (proto.Message, error) {
Header: header, Header: header,
MaxEarlyData: c.MaxEarlyData, MaxEarlyData: c.MaxEarlyData,
UseBrowserForwarding: c.UseBrowserForwarding, UseBrowserForwarding: c.UseBrowserForwarding,
EarlyDataHeaderName: c.EarlyDataHeaderName,
} }
if c.AcceptProxyProtocol { if c.AcceptProxyProtocol {
config.AcceptProxyProtocol = c.AcceptProxyProtocol config.AcceptProxyProtocol = c.AcceptProxyProtocol