From eef6c29cc4ef5824f5ffd8dac6853115c72a5dd2 Mon Sep 17 00:00:00 2001 From: Konrad Zemek <konrad.zemek@gmail.com> Date: Wed, 29 May 2019 02:12:14 +0200 Subject: [PATCH] Fix forwarding bytes received with PROXY header. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index ca76dcf..2e71e26 100644 --- a/main.go +++ b/main.go @@ -292,7 +292,7 @@ func handleConnection(conn net.Conn, listenLog *zap.Logger) { } for len(restBytes) > 0 { - n, err := conn.Write(restBytes) + n, err := upstreamConn.Write(restBytes) if err != nil { connLog.Debug("failed to write data to upstream connection", zap.Error(err), zap.Bool("dropConnection", true)) -- GitLab