Documentation
¶
Index ¶
- func NewSSHClient(u *url.URL, config *ssh.ClientConfig, isUptermClient bool, proxyURL *url.URL) (*ssh.Client, error)
- func NewWSConn(u *url.URL, isUptermClient bool, proxyURL *url.URL) (net.Conn, error)
- func NewWSConnContext(ctx context.Context, u *url.URL, isUptermClient bool, proxyURL *url.URL) (net.Conn, error)
- func WrapWSConn(ws *websocket.Conn) net.Conn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSSHClient ¶
func NewSSHClient(u *url.URL, config *ssh.ClientConfig, isUptermClient bool, proxyURL *url.URL) (*ssh.Client, error)
NewSSHClient creates a ssh client via ws. The url must include username as session id and password as encoded node address. isUptermClient indicates whether the client is host client or client client. proxyURL, when non-nil, is the HTTP proxy to dial through (see NewWSConn).
func NewWSConn ¶
NewWSConn creates a ws net.Conn. The url must include username as session id and password as encoded node address. isUptermClient indicates whether the client is host client or client client. proxyURL, when non-nil, is the HTTP proxy to dial through; when nil, the proxy comes from the environment (HTTPS_PROXY, HTTP_PROXY, NO_PROXY).
func NewWSConnContext ¶ added in v0.35.0
func NewWSConnContext(ctx context.Context, u *url.URL, isUptermClient bool, proxyURL *url.URL) (net.Conn, error)
NewWSConnContext is NewWSConn bounded by ctx: its deadline and a cancel both end the dial, any proxy's CONNECT, the TLS handshake and the upgrade. The returned connection outlives ctx.
Types ¶
This section is empty.