Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Relay ¶
func Relay(a, b net.Conn, stats *RelayStats)
Relay copies data bidirectionally between a and b until one side closes or errors. Returns when both directions are done.
Types ¶
type SOCKS5Server ¶
type SOCKS5Server struct {
SM *tunnel.StreamManager
Logger *log.Logger
Listener net.Listener
ActiveConns atomic.Int64
TotalConns atomic.Int64
}
SOCKS5 server that listens locally and forwards connections through the tunnel via yamux streams. Runs on the client (PC) side.
func (*SOCKS5Server) ListenAndServe ¶
func (s *SOCKS5Server) ListenAndServe(ctx context.Context, addr string) error
ListenAndServe binds to addr (e.g. "127.0.0.1:1080") and accepts SOCKS5 connections until ctx is done.