Documentation
¶
Index ¶
- type Config
- type HTTPTunnel
- type HTTPTunnelMuxer
- type TCPTunnel
- type TCPTunnelRegistry
- func (tr *TCPTunnelRegistry) Close()
- func (tr *TCPTunnelRegistry) Deregister(ahash, thash string) bool
- func (tr *TCPTunnelRegistry) DeregisterAll(ahash string) bool
- func (tr *TCPTunnelRegistry) ListenAddr() string
- func (tr *TCPTunnelRegistry) Register(tracker *tracker.TunnelTracker, proto, serverAddr string) error
- func (tr *TCPTunnelRegistry) Serve() error
- func (tr *TCPTunnelRegistry) WaitDone()
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { IP string Domain string HTTPAddr string Timeout util.TimeoutConfig }
type HTTPTunnel ¶
type HTTPTunnel struct {
// contains filtered or unexported fields
}
func NewHTTPTunnel ¶
func NewHTTPTunnel(tracker *tracker.TunnelTracker, l net.Listener) *HTTPTunnel
func (HTTPTunnel) Close ¶
func (tt HTTPTunnel) Close()
Close closes the listener and set the closed flag, then no more new requests could be processed.
func (HTTPTunnel) NewSession ¶
func (HTTPTunnel) WaitAndCleanup ¶
func (tt HTTPTunnel) WaitAndCleanup()
WaitAndCleanup wait in processing requests done then closes the session, since all streams will be closed if session closed.
type HTTPTunnelMuxer ¶
func NewHTTPTunnelMuxer ¶
func NewHTTPTunnelMuxer(domain string, addr string) (*HTTPTunnelMuxer, error)
func (*HTTPTunnelMuxer) Close ¶
func (hm *HTTPTunnelMuxer) Close() error
func (*HTTPTunnelMuxer) Listen ¶
func (hm *HTTPTunnelMuxer) Listen(subdomain string) (*httpConnListener, error)
func (*HTTPTunnelMuxer) Serve ¶
func (hm *HTTPTunnelMuxer) Serve() error
type TCPTunnel ¶
type TCPTunnel struct {
// contains filtered or unexported fields
}
func NewTCPTunnel ¶
func NewTCPTunnel(tracker *tracker.TunnelTracker, serverAddr string) (*TCPTunnel, error)
func (TCPTunnel) Close ¶
func (tt TCPTunnel) Close()
Close closes the listener and set the closed flag, then no more new requests could be processed.
func (TCPTunnel) NewSession ¶
func (TCPTunnel) WaitAndCleanup ¶
func (tt TCPTunnel) WaitAndCleanup()
WaitAndCleanup wait in processing requests done then closes the session, since all streams will be closed if session closed.
type TCPTunnelRegistry ¶
type TCPTunnelRegistry struct { sync.RWMutex sync.WaitGroup // contains filtered or unexported fields }
func New ¶
func New(conf Config) (*TCPTunnelRegistry, error)
func (*TCPTunnelRegistry) Close ¶
func (tr *TCPTunnelRegistry) Close()
func (*TCPTunnelRegistry) Deregister ¶
func (tr *TCPTunnelRegistry) Deregister(ahash, thash string) bool
func (*TCPTunnelRegistry) DeregisterAll ¶
func (tr *TCPTunnelRegistry) DeregisterAll(ahash string) bool
func (*TCPTunnelRegistry) ListenAddr ¶
func (tr *TCPTunnelRegistry) ListenAddr() string
func (*TCPTunnelRegistry) Register ¶
func (tr *TCPTunnelRegistry) Register(tracker *tracker.TunnelTracker, proto, serverAddr string) error
func (*TCPTunnelRegistry) Serve ¶
func (tr *TCPTunnelRegistry) Serve() error
func (*TCPTunnelRegistry) WaitDone ¶
func (tr *TCPTunnelRegistry) WaitDone()
Click to show internal directories.
Click to hide internal directories.