MCPcopy
hub / github.com/cloudflare/cloudflared / NewConnectionHandler

Function NewConnectionHandler

socks/connection_handler.go:23–28  ·  view source on GitHub ↗

NewConnectionHandler creates a standard SOCKS5 connection handler This process connections from a generic TCP listener from the standard library

(requestHandler RequestHandler)

Source from the content-addressed store, hash-verified

21// NewConnectionHandler creates a standard SOCKS5 connection handler
22// This process connections from a generic TCP listener from the standard library
23func NewConnectionHandler(requestHandler RequestHandler) ConnectionHandler {
24 return &StandardConnectionHandler{
25 requestHandler: requestHandler,
26 authHandler: NewAuthHandler(),
27 }
28}
29
30// Serve process new connection created after calling `Accept()` in the standard library
31func (h *StandardConnectionHandler) Serve(c io.ReadWriter) error {

Callers 3

startTestServerFunction · 0.85
StreamHandlerFunction · 0.85
StreamNetHandlerFunction · 0.85

Calls 1

NewAuthHandlerFunction · 0.85

Tested by 1

startTestServerFunction · 0.68