Skip to content

Commit

Permalink
Issue #177: TCP+SNI proxy does not work with PROXY protocol
Browse files Browse the repository at this point in the history
The TCP+SNI proxy fails when used behind a router which uses
the HAProxy PROXY protocol since it will not properly
decode the ClientHello message from the TLS handshake.

Adding the proxyproto listener support to the TCP listener
removes fixes this.
  • Loading branch information
magiconair committed Oct 12, 2016
1 parent f034c9c commit 66de03e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func listenAndServeTCP(l config.Listen, h proxy.TCPProxy) {
if err != nil {
exit.Fatal("[FATAL] ", err)
}
ln = &proxyproto.Listener{Listener: tcpKeepAliveListener{ln.(*net.TCPListener)}}
defer ln.Close()

// close the socket on exit to terminate the accept loop
Expand Down

0 comments on commit 66de03e

Please sign in to comment.