Versions in this module Expand all Collapse all v1 v1.2.0 Dec 21, 2021 Changes in this version + var DefaultTimeout = 10 * time.Second + type Auth struct + Password string + User string + func NewAuth(auth string) *Auth + type Backoff interface + NextBackOff func() time.Duration + Reset func() + type Client struct + func NewClient(config *ClientConfig) *Client + func (c *Client) Start() error + func (c *Client) Stop() + type ClientConfig struct + Backoff Backoff + DialTLS func(network, addr string, config *tls.Config) (net.Conn, error) + Logger log.Logger + Proxy ProxyFunc + ServerAddr string + TLSClientConfig *tls.Config + Tunnels map[string]*proto.Tunnel + type ConnDiscoNotifier interface + ConnNotify func(tunnels map[string]*proto.Tunnel, identifier id.ID) + type ConnPool struct + func (p *ConnPool) AddConn(conn net.Conn, identifier id.ID) error + func (p *ConnPool) AddrToIdentifier(addr string) id.ID + func (p *ConnPool) DeleteConn(identifier id.ID) + func (p *ConnPool) GetClientConn(req *http.Request, addr string) (*http2.ClientConn, error) + func (p *ConnPool) MarkDead(c *http2.ClientConn) + func (p *ConnPool) URL(identifier id.ID) string + type DiscoNotifier interface + DiscoNotify func(identifier id.ID) + type HTTPProxy struct + func NewHTTPProxy(localURL *url.URL, logger log.Logger) *HTTPProxy + func NewMultiHTTPProxy(localURLMap map[string]*url.URL, logger log.Logger) *HTTPProxy + func (p *HTTPProxy) Director(req *http.Request) + func (p *HTTPProxy) Proxy(w io.Writer, r io.ReadCloser, msg *proto.ControlMessage) + type HostAuth struct + Auth *Auth + Host string + type ProxyFunc func(w io.Writer, r io.ReadCloser, msg *proto.ControlMessage) + func Proxy(p ProxyFuncs) ProxyFunc + type ProxyFuncs struct + HTTP ProxyFunc + TCP ProxyFunc + type RegChecker interface + CheckRegistration func(id.ID) bool + type RegistryItem struct + Hosts []*HostAuth + Listeners []net.Listener + type Server struct + ConnPool *ConnPool + func NewServer(config *ServerConfig) (*Server, error) + func (r Server) IsSubscribed(identifier id.ID) bool + func (r Server) Item(identifier id.ID) *RegistryItem + func (r Server) Subscribe(identifier id.ID) + func (r Server) Subscriber(hostPort string) (id.ID, *Auth, bool) + func (s *Server) Addr() string + func (s *Server) DiscoNotify(identifier id.ID) + func (s *Server) RoundTrip(r *http.Request) (*http.Response, error) + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server) Start() + func (s *Server) Stop() + func (s *Server) Unsubscribe(identifier id.ID) *RegistryItem + type ServerConfig struct + Addr string + Listener net.Listener + Logger log.Logger + Notifier DiscoNotifier + RegChecker RegChecker + TLSConfig *tls.Config + type TCPProxy struct + func NewMultiTCPProxy(localAddrMap map[string]string, logger log.Logger) *TCPProxy + func NewTCPProxy(localAddr string, logger log.Logger) *TCPProxy + func (p *TCPProxy) Proxy(w io.Writer, r io.ReadCloser, msg *proto.ControlMessage)