Documentation ¶
Index ¶
- Variables
- func Connect(proxy *url.URL, host string, port uint16, pos, ack uint32, mods ...GetModifier) (*websocket.Conn, error)
- func ConnectSID(proxy *url.URL, sid string, pos, ack uint32, mods ...ConnectModifier) (*websocket.Conn, error)
- func ConnectURL(curl *url.URL, mods ...ConnectModifier) (*websocket.Conn, error)
- func DefaultOptions() *options
- func GetSID(proxy *url.URL, host string, port uint16, mods ...GetModifier) (string, error)
- type ConnectModifier
- type ConnectModifiers
- type Flags
- type Flushable
- type GetModifier
- type GetModifiers
- type GetOptions
- type Modifier
- type Modifiers
- type TimeSource
- type Timeouts
- type Tunnel
- type TunnelType
- type WithWriteDeadline
Constants ¶
This section is empty.
Variables ¶
View Source
var CloseRequested = errors.New("close requested")
CloseRequested error is returned to interrupt Reads/Writes once a Close() has been requested by the user.
Functions ¶
func ConnectSID ¶
func ConnectURL ¶
func DefaultOptions ¶
func DefaultOptions() *options
Types ¶
type ConnectModifier ¶
func WithBufferSize ¶
func WithBufferSize(read, write int) ConnectModifier
func WithHandshakeTimeout ¶
func WithHandshakeTimeout(t time.Duration) ConnectModifier
func WithHeader ¶
func WithHeader(key, value string) ConnectModifier
type ConnectModifiers ¶
type ConnectModifiers []ConnectModifier
type Flags ¶
func DefaultFlags ¶
func DefaultFlags() *Flags
type GetModifier ¶
type GetModifier func(*GetOptions) error
func WithConnectOptions ¶
func WithConnectOptions(mods ...ConnectModifier) GetModifier
Configures options to use to establish the websocket moving bytes around.
This mostly affects the Connect(), ConnectSID() and ConnectURL() call, invoked once per attempt to establish the websocket used as the actual tunnel.
func WithGetOptions ¶
func WithGetOptions(mods ...protocol.Modifier) GetModifier
Configures options to use in the GET requests to prepare the tunnel. This mostly affects the GetSID() call, invoked once per attempt to log in.
func WithOptions ¶
func WithOptions(r *GetOptions) GetModifier
func WithRetryOptions ¶
func WithRetryOptions(mods ...retry.Modifier) GetModifier
type GetModifiers ¶
type GetModifiers []GetModifier
func (GetModifiers) Apply ¶
func (mods GetModifiers) Apply(o *GetOptions) error
type GetOptions ¶
type GetOptions struct {
// contains filtered or unexported fields
}
type Modifier ¶
type Modifier func(o *options) error
func WithLogger ¶
func WithTimeouts ¶
func WithWindowSize ¶
type TimeSource ¶
type Timeouts ¶
type Timeouts struct { Now TimeSource ConnWriteTimeout time.Duration BrowserWriteTimeout time.Duration BrowserAckInterval time.Duration BrowserPingInterval time.Duration BrowserPingTimeout time.Duration }
func DefaultTimeouts ¶
func DefaultTimeouts() *Timeouts
type Tunnel ¶
type Tunnel struct { SendWin *nasshp.BlockingSendWindow ReceiveWin *nasshp.BlockingReceiveWindow // contains filtered or unexported fields }
func (*Tunnel) BrowserReceive ¶
func (*Tunnel) BrowserSend ¶
func (*Tunnel) KeepConnected ¶
type TunnelType ¶
type TunnelType int
const ( TunnelTypeNone TunnelType = iota TunnelTypePersistent TunnelTypeLocal )
func TunnelTypeForHost ¶
func TunnelTypeForHost(host string) (TunnelType, error)
type WithWriteDeadline ¶
Click to show internal directories.
Click to hide internal directories.