Documentation
¶
Index ¶
- Variables
- func BoolPtr(b bool) *bool
- func FormatForwardedAddr(addr net.TCPAddr, props TunnelProperties) (string, error)
- func FormatForwardingAddr(props TunnelProperties) (string, error)
- func StrOrUndef(s *string) string
- func StringPtr(s string) *string
- func Uint16Ptr(u uint16) *uint16
- type Addr
- type BytestreamTunnel
- type Client
- type Config
- type ControlChannel
- type DatagramTunnel
- type Dialer
- type HTTPVersion
- type Listener
- type ListenerInfo
- type Protocol
- type TLSMode
- type Transport
- type Tunnel
- type TunnelProperties
- type TunnelType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Channel = "dev" Version = "development" OS = runtime.GOOS Arch = runtime.GOARCH )
Functions ¶
func FormatForwardedAddr ¶
func FormatForwardedAddr(addr net.TCPAddr, props TunnelProperties) (string, error)
func FormatForwardingAddr ¶
func FormatForwardingAddr(props TunnelProperties) (string, error)
func StrOrUndef ¶
Types ¶
type BytestreamTunnel ¶
type Client ¶
type Client struct {
ConfigFilePath *string
Transport Dialer
TLSClientConfig *tls.Config
EngineURL *string
Token *string
NoToken *bool
ZeroRTT *bool
}
func (*Client) PacketDial ¶
type ControlChannel ¶
type DatagramTunnel ¶
type DatagramTunnel interface {
Tunnel
net.PacketConn
}
type HTTPVersion ¶
type HTTPVersion string
const ( HTTP1_1 HTTPVersion = "http/1.1" // HTTP/1.1 (cleartext) HTTP2 HTTPVersion = "h2c" // HTTP/2 (cleartext) HTTP3 HTTPVersion = "h3" // HTTP/3 )
func HTTPVersionPtr ¶
func HTTPVersionPtr(h HTTPVersion) *HTTPVersion
type Listener ¶
type Listener struct {
Client *Client
Config *Config
TunnelProperties *TunnelProperties
AutoReconnect *bool
ReconnectTimeout *time.Duration
AutoRecreateTunnel *bool
RecreateTunnelTimeout *time.Duration
AcceptQueueSize *int
OnListenerInfo func(ListenerInfo)
// contains filtered or unexported fields
}
type ListenerInfo ¶
type ListenerInfo struct {
Status *string
ForwardingAddress *string
TunnelProperties *TunnelProperties
}
type Transport ¶
type Transport struct {
LocalAddr *string
NetworkInterface *string
ForceIPv4 *bool
ForceIPv6 *bool
DNSOverride *string
MPTCPEnabled *bool
ProxyHTTP *string
ProxyUsername *string
ProxyPassword *string
ProxyHTTPHeaders map[string]string
TLSProxyConfig *tls.Config
}
Default transport implementation
type Tunnel ¶
type Tunnel interface {
ForwardingAddress() (string, error)
Properties() (TunnelProperties, error)
Close() error
}
type TunnelProperties ¶
type TunnelProperties struct {
// Basic tunnel properties
ID *string
Name *string
CreationDate *time.Time
// Tunnel options
Type *TunnelType
Publish *bool
Protocol *Protocol // Only for published tunnels
Labels map[string]string
// Security options
GeoIP []string
TrustedIPs []string
Domain *string // Only for published tunnels
// TLS options
TLSMode *TLSMode // Passthorugh is only supported for TLS tunnels
TLSALPNs []string
TLSMinVersion *uint16
TLSCiphers []uint16
MTLS *bool
MTLSCACertPEM *string
// HTTP tunnel options (only for HTTP tunnels)
HTTPVersion *HTTPVersion
HTTPUseTLS *bool // Only for HTTP/1.1 and HTTP/2 (bytestream)
TokenAuth *bool
SSO *bool
SSOProviders []string
EmailWhitelist []string
EmailBlacklist []string
Challenge *bool
}
type TunnelType ¶
type TunnelType string
const ( TunnelBytestream TunnelType = "bytestream" TunnelDatagram TunnelType = "datagram" )
func TunnelTypePtr ¶
func TunnelTypePtr(t TunnelType) *TunnelType
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
rstream
command
|
|
|
examples
|
|
|
datagram-echo-client
command
|
|
|
datagram-echo-server
command
|
|
|
dtls-echo-client
command
|
|
|
dtls-echo-server
command
|
|
|
http-dial-h1
command
|
|
|
http-dial-h2
command
|
|
|
http-dial-h3
command
|
|
|
http-dial-tls
command
|
|
|
http-listener-h1
command
|
|
|
http-listener-h2
command
|
|
|
http-tunnel-h1
command
|
|
|
http-tunnel-h2
command
|
|
|
http-tunnel-h3
command
|
|
|
http-tunnel-tls
command
|
|
|
quic-echo-client
command
|
|
|
quic-echo-server
command
|
|
|
stream-echo-client
command
|
|
|
stream-echo-server
command
|
|
Click to show internal directories.
Click to hide internal directories.