From bb430dbb8d0ce16df751c4f0c03458e0f68ec367 Mon Sep 17 00:00:00 2001 From: Yuzuki999 <yuzuki2332@gmail.com> Date: Mon, 19 Dec 2022 16:26:02 +0800 Subject: [PATCH] fix proxy protocol not work --- node/controller/inbound.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/controller/inbound.go b/node/controller/inbound.go index f18506e..a3f128a 100644 --- a/node/controller/inbound.go +++ b/node/controller/inbound.go @@ -50,7 +50,7 @@ func buildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s sniffingConfig.Enabled = false } inbound.SniffingConfig = sniffingConfig - if nodeInfo.NodeType == "tcp" { + if *inbound.StreamSetting.Network == "tcp" { if inbound.StreamSetting.TCPSettings != nil { inbound.StreamSetting.TCPSettings.AcceptProxyProtocol = config.EnableProxyProtocol } else { @@ -59,7 +59,7 @@ func buildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s } //Enable proxy protocol inbound.StreamSetting.TCPSettings = tcpSetting } - } else if nodeInfo.NodeType == "ws" { + } else if *inbound.StreamSetting.Network == "ws" { inbound.StreamSetting.WSSettings = &coreConf.WebSocketConfig{ AcceptProxyProtocol: config.EnableProxyProtocol} //Enable proxy protocol }