tunnel_server

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountUserTunnels added in v0.12.3

func CountUserTunnels(userId string) uint32

func DeleteTunnel added in v0.15.2

func DeleteTunnel(userId, tunnelName string) error

func GetTunnelsForUser added in v0.12.7

func GetTunnelsForUser(userId string) []string

func HandleCreatePortTunnel added in v0.18.0

func HandleCreatePortTunnel(w http.ResponseWriter, r *http.Request, muxSession *yamux.Session, agentSessionId string, port uint16, space *model.Space, user *model.User) error

func HandleTunnel

func HandleTunnel(w http.ResponseWriter, r *http.Request)

func HandleWebTunnel added in v0.19.0

func HandleWebTunnel(w http.ResponseWriter, r *http.Request)

HandleWebTunnel handles web tunnel requests for domain-based routing

func ListenAndServe

func ListenAndServe(listen string, tlsConfig *tls.Config)

Start a web server to listen for connections to tunnels, the left most part of the domain is the <username>--<tunnel name>

func Routes

func Routes(router *http.ServeMux)

func TunnelAgentPort added in v0.18.0

func TunnelAgentPort(agentSessionId string, port uint16, conn net.Conn)

Types

type TunnelClient added in v0.18.0

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

func NewTunnelClient added in v0.18.0

func NewTunnelClient(wsServerUrl, serverUrl, token string, skipTLSVerify bool, opts *TunnelOpts) *TunnelClient

func (*TunnelClient) ConnectAndServe added in v0.18.0

func (c *TunnelClient) ConnectAndServe() error

func (*TunnelClient) GetCtx added in v0.18.0

func (c *TunnelClient) GetCtx() context.Context

func (*TunnelClient) Shutdown added in v0.18.0

func (c *TunnelClient) Shutdown()

type TunnelOpts added in v0.18.0

type TunnelOpts struct {
	Type          TunnelType // Type of tunnel
	Protocol      string     // http, https or tcp
	LocalPort     uint16     // The local port to forward to
	TunnelName    string     // The name of the tunnel for web tunnels
	SpaceName     string     // The name of the space for space tunnels
	SpacePort     uint16     // The port within the space being forwarded
	TlsName       string     // The name to present to TLS ports
	TlsSkipVerify bool       // Don't verify TLS of the local port
}

type TunnelType added in v0.18.0

type TunnelType int
const (
	WebTunnel TunnelType = iota
	PortTunnel
)

Jump to

Keyboard shortcuts

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