Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler responds to a TCP request.
ServeTCP should write responses to the in connection and close it on return.
type HandlerFunc ¶
type Proxy ¶
type Proxy struct { // DialTimeout sets the timeout for establishing the outbound // connection. DialTimeout time.Duration // Lookup returns a target host for the given server name. // The proxy will panic if this value is nil. Lookup func(host string) string }
Proxy implements a generic TCP proxying handler.
type SNIProxy ¶
type SNIProxy struct { // DialTimeout sets the timeout for establishing the outbound // connection. DialTimeout time.Duration // Lookup returns a target host for the given server name. // The proxy will panic if this value is nil. Lookup func(host string) string }
SNIProxy implements an SNI aware transparent TCP proxy which captures the TLS client hello, extracts the host name and uses it for finding the upstream server. Then it replays the ClientHello message and copies data transparently allowing to route a TLS connection based on the SNI header without decrypting it.
Click to show internal directories.
Click to hide internal directories.