mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
Fix: TCP & WS override AcceptProxyProtocol (#425)
This commit is contained in:
parent
6c936e2fd3
commit
e564d9ef7e
2 changed files with 4 additions and 2 deletions
|
@ -38,7 +38,8 @@ func ListenTCP(ctx context.Context, address net.Address, port net.Port, streamSe
|
|||
if streamSettings.SocketSettings == nil {
|
||||
streamSettings.SocketSettings = &internet.SocketConfig{}
|
||||
}
|
||||
streamSettings.SocketSettings.AcceptProxyProtocol = l.config.AcceptProxyProtocol
|
||||
streamSettings.SocketSettings.AcceptProxyProtocol =
|
||||
l.config.AcceptProxyProtocol || streamSettings.SocketSettings.AcceptProxyProtocol
|
||||
}
|
||||
var listener net.Listener
|
||||
var err error
|
||||
|
|
|
@ -89,7 +89,8 @@ func ListenWS(ctx context.Context, address net.Address, port net.Port, streamSet
|
|||
if streamSettings.SocketSettings == nil {
|
||||
streamSettings.SocketSettings = &internet.SocketConfig{}
|
||||
}
|
||||
streamSettings.SocketSettings.AcceptProxyProtocol = l.config.AcceptProxyProtocol
|
||||
streamSettings.SocketSettings.AcceptProxyProtocol =
|
||||
l.config.AcceptProxyProtocol || streamSettings.SocketSettings.AcceptProxyProtocol
|
||||
}
|
||||
var listener net.Listener
|
||||
var err error
|
||||
|
|
Loading…
Reference in a new issue