mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 16:49:57 +00:00
TUN-3799: extended the Stream interface to take a logger and added debug logs for io.Copy errors
This commit is contained in:

committed by
Nuno Diegues

parent
a6c2348127
commit
8b794390e5
@@ -5,6 +5,8 @@ import (
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
)
|
||||
|
||||
// RequestHandler is the functions needed to handle a SOCKS5 command
|
||||
@@ -106,7 +108,7 @@ func (h *StandardRequestHandler) handleAssociate(conn io.ReadWriter, req *Reques
|
||||
return nil
|
||||
}
|
||||
|
||||
func StreamHandler(tunnelConn io.ReadWriter, originConn net.Conn) {
|
||||
func StreamHandler(tunnelConn io.ReadWriter, originConn net.Conn, log *zerolog.Logger) {
|
||||
dialer := NewConnDialer(originConn)
|
||||
requestHandler := NewRequestHandler(dialer)
|
||||
socksServer := NewConnectionHandler(requestHandler)
|
||||
|
Reference in New Issue
Block a user