client

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client connects to the gatecrash server and handles tunnel requests.

func New

func New(cfg Config, version string) *Client

New creates a new client instance.

func (*Client) Run

func (c *Client) Run(ctx context.Context) error

Run connects to the server and handles requests. Reconnects on failure.

type Config

type Config struct {
	ServerAddr string                 // host:port of the SSH server
	Token      string                 // tunnel token (tunnel_id:secret)
	TargetHost string                 // default target service host
	TargetPort int                    // default target service port
	HostKey    string                 // optional SSH host key fingerprint (SHA256:...)
	TargetTLS  string                 // "", "tls", or "tls-insecure"
	Routes     map[string]RouteTarget // hostname or "tcp" → target
}

Config holds the client configuration.

type RouteTarget added in v0.8.4

type RouteTarget struct {
	Host string
	Port int
	TLS  string // "", "tls", or "tls-insecure"
}

RouteTarget defines a backend target for routing.

Jump to

Keyboard shortcuts

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