Documentation
¶
Index ¶
- func CountUserTunnels(userId string) uint32
- func DeleteTunnel(userId, tunnelName string) error
- func GetTunnelsForUser(userId string) []string
- func HandleCreatePortTunnel(w http.ResponseWriter, r *http.Request, muxSession *yamux.Session, ...) error
- func HandleTunnel(w http.ResponseWriter, r *http.Request)
- func HandleWebTunnel(w http.ResponseWriter, r *http.Request)
- func ListenAndServe(listen string, tlsConfig *tls.Config)
- func Routes(router *http.ServeMux)
- func TunnelAgentPort(agentSessionId string, port uint16, conn net.Conn)
- type TunnelClient
- type TunnelOpts
- type TunnelType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountUserTunnels ¶ added in v0.12.3
func DeleteTunnel ¶ added in v0.15.2
func GetTunnelsForUser ¶ added in v0.12.7
func HandleCreatePortTunnel ¶ added in v0.18.0
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 ¶
Start a web server to listen for connections to tunnels, the left most part of the domain is the <username>--<tunnel name>
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 )
Click to show internal directories.
Click to hide internal directories.