Skip to content

Commit

Permalink
tcpproxy: increase buffer size to 16K (#9548)
Browse files Browse the repository at this point in the history
  • Loading branch information
Volatus committed Jan 27, 2023
1 parent ea629a1 commit 5628f76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/tcpproxy/tcp.go
Expand Up @@ -59,11 +59,12 @@ func (p *TCPProxy) Get(host string) *TCPServer {
// and open a connection to the passthrough server.
func (p *TCPProxy) Handle(conn net.Conn) {
defer conn.Close()
data := make([]byte, 4096)
// See: https://www.ibm.com/docs/en/ztpf/1.1.0.15?topic=sessions-ssl-record-format
data := make([]byte, 16384)

length, err := conn.Read(data)
if err != nil {
klog.V(4).ErrorS(err, "Error reading the first 4k of the connection")
klog.V(4).ErrorS(err, "Error reading data from the connection")
return
}

Expand Down

0 comments on commit 5628f76

Please sign in to comment.