diff --git a/tcpproxy.go b/tcpproxy.go index 1f03e32..896e1fd 100644 --- a/tcpproxy.go +++ b/tcpproxy.go @@ -223,7 +223,7 @@ func (p *Proxy) serveListener(ret chan<- error, ln net.Listener, routes []route) // serveConn runs in its own goroutine and matches c against routes. // It returns whether it matched purely for testing. func (p *Proxy) serveConn(c net.Conn, routes []route) bool { - br := bufio.NewReader(c) + br := bufio.NewReaderSize(c, 65536) for _, route := range routes { if target, hostName := route.match(br); target != nil { if n := br.Buffered(); n > 0 {