support proxy protocol

This commit is contained in:
fatedier
2019-03-29 19:01:18 +08:00
parent 74a8752570
commit 9c4ec56491
13 changed files with 98 additions and 26 deletions

View File

@@ -160,7 +160,7 @@ func (pxy *UdpProxy) Run() (remoteAddr string, err error) {
// Sleep a while for waiting control send the NewProxyResp to client.
time.Sleep(500 * time.Millisecond)
for {
workConn, err := pxy.GetWorkConnFromPool()
workConn, err := pxy.GetWorkConnFromPool(nil, nil)
if err != nil {
time.Sleep(1 * time.Second)
// check if proxy is closed