client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package client implements the otun tunnel client.

Index

Constants

View Source
const (
	// HeartbeatInterval is how often to send heartbeat messages.
	HeartbeatInterval = 30 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the otun tunnel client.

func New

func New(serverAddr, localAddr string) *Client

New creates a new tunnel client.

func (*Client) Close

func (c *Client) Close() error

Close closes the client session.

func (*Client) Run

func (c *Client) Run() error

Run connects to the server and handles incoming streams.

func (*Client) Subdomain

func (c *Client) Subdomain() string

Subdomain returns the assigned subdomain.

func (*Client) TunnelURL

func (c *Client) TunnelURL() string

TunnelURL returns the public URL for the tunnel.

func (*Client) WithSubdomain

func (c *Client) WithSubdomain(subdomain string) *Client

WithSubdomain sets a preferred subdomain for the tunnel.

Jump to

Keyboard shortcuts

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