Versions in this module Expand all Collapse all v0 v0.0.3 Jan 24, 2024 v0.0.2 Jan 24, 2024 Changes in this version + func UnderlyingConn(c net.Conn) net.Conn + type Conn struct + HostName string + Peeked []byte + func (c *Conn) Read(p []byte) (n int, err error) + type DialProxy struct + Addr string + DialContext func(ctx context.Context, network, address string) (net.Conn, error) + DialTimeout time.Duration + KeepAlivePeriod time.Duration + OnDialError func(src net.Conn, dstDialErr error) + ProxyProtocolVersion int + func To(addr string) *DialProxy + func (dp *DialProxy) HandleConn(src net.Conn) + type Matcher func(ctx context.Context, hostname string) bool + type NegotiateFunc func(gc net.Conn, cfg *config) bool + type Proxy struct + ListenFunc func(net, laddr string) (net.Listener, error) + func (p *Proxy) AddHTTPHostMatchRoute(ipPort string, match Matcher, dest Target) uuid.UUID + func (p *Proxy) AddHTTPHostRoute(ipPort, httpHost string, dest Target) uuid.UUID + func (p *Proxy) AddIMAPSNIRouteFunc(ipPort string, targetLookup SNITargetFunc) uuid.UUID + func (p *Proxy) AddRoute(ipPort string, dest Target) uuid.UUID + func (p *Proxy) AddSMTPSNIRouteFunc(ipPort string, serverName string, targetLookup SNITargetFunc) uuid.UUID + func (p *Proxy) AddSNIMatchRoute(ipPort string, matcher Matcher, dest Target) uuid.UUID + func (p *Proxy) AddSNIRoute(ipPort, sni string, dest Target) uuid.UUID + func (p *Proxy) AddSNIRouteFunc(ipPort string, fn SNITargetFunc) uuid.UUID + func (p *Proxy) AddSNIStartTLSFunc(ipPort string, negFn NegotiateFunc, targetFn SNITargetFunc) uuid.UUID + func (p *Proxy) Close() error + func (p *Proxy) EnableProxyProtocol(ipPort string, enableProxyProtocol bool) + func (p *Proxy) RemoveRouteById(ipPort string, routeId uuid.UUID) + func (p *Proxy) Run() error + func (p *Proxy) SetDefaultTarget(ipPort string, dest Target) + func (p *Proxy) Start() error + func (p *Proxy) Wait() error + func (p *Proxy) Yolo() error + type SNITargetFunc func(ctx context.Context, sniName string) (t Target, ok bool) + type Target interface + HandleConn func(net.Conn) + type TargetListener struct + Address string + func (tl *TargetListener) Accept() (net.Conn, error) + func (tl *TargetListener) Addr() net.Addr + func (tl *TargetListener) Close() error + func (tl *TargetListener) HandleConn(c net.Conn)