Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
A Proxy listens to a port and forwards incoming connections to a router
func NewProxy ¶
func NewProxy(c context.Context, router func(*net.TCPConn) (string, error)) (proxy *Proxy, err error)
NewProxy returns a new Proxy instance that is listening to the given tcp address
func (*Proxy) ListenerPort ¶
ListenerPort returns the port that this proxy listens to
func (*Proxy) Run ¶
Run starts the proxy accept loop and runs it until the context is cancelled. The limit argument limits the maximum number of connections that can be concurrently proxied. This limit prevents exhausting all available file descriptors when clients are greedy about opening connections. This was originally encountered with load testing clients. You might argue this is a bug in those clients, and you might be right, but without this limit it manifests in a far more confusing way as a bug in telepresence.
func (*Proxy) SetSocksPort ¶ added in v2.1.4
SetSocksPort sets the port that the connector has assigned for dynamic ssh port forwarding