mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 23:13:01 +00:00
Fix: TCP & WS override AcceptProxyProtocol (#425)
This commit is contained in:
parent
6c936e2fd3
commit
e564d9ef7e
@ -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 New Issue
Block a user