Help us shape the future of Go! Take the 2026 Go Developer Survey

ws

package
v0.38.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

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

func NewWSConn(u *url.URL, isUptermClient bool, proxyURL *url.URL) (net.Conn, error)

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.

func WrapWSConn

func WrapWSConn(ws *websocket.Conn) net.Conn

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL