Documentation
¶
Index ¶
- Variables
- func BuildVersion() string
- func EndpointNames(eps []Endpoint) []string
- func PBFromEncryptions(schemes []EncryptionScheme) []pbconnect.RelayEncryptionScheme
- func PBsFromHostPorts(hps []HostPort) []*pbmodel.HostPort
- type ClientControlNextProto
- type ConnectClientNextProto
- type ConnectRelayNextProto
- type EncryptionScheme
- func EncryptionFromPB(pb pbconnect.RelayEncryptionScheme) EncryptionScheme
- func EncryptionsFromPB(pbs []pbconnect.RelayEncryptionScheme) []EncryptionScheme
- func ParseEncryptionScheme(s string) (EncryptionScheme, error)
- func SelectEncryptionScheme(dst []EncryptionScheme, src []EncryptionScheme) (EncryptionScheme, error)
- type Endpoint
- type HostPort
- type Key
- type LoadBalancePolicy
- type LoadBalanceRetry
- type ProxyProtoConn
- type ProxyVersion
- type RelayControlNextProto
- type Role
- type RouteOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoEncryption = EncryptionScheme{"none"} TLSEncryption = EncryptionScheme{"tls"} DHXCPEncryption = EncryptionScheme{"dhxcp"} )
View Source
var ( NoPolicy = LoadBalancePolicy{} LeastLatencyPolicy = LoadBalancePolicy{"least-latency"} LeastConnsPolicy = LoadBalancePolicy{"least-conns"} RoundRobinPolicy = LoadBalancePolicy{"round-robin"} RandomPolicy = LoadBalancePolicy{"random"} )
View Source
var ( NeverRetry = LoadBalanceRetry{} CountRetry = LoadBalanceRetry{"count"} TimedRetry = LoadBalanceRetry{"timed"} AllRetry = LoadBalanceRetry{"all"} )
View Source
var ( ClientControlUnknown = ClientControlNextProto{} ClientControlV02 = ClientControlNextProto{"connet-client/0.2"} // 0.8.0 ClientControlV03 = ClientControlNextProto{"connet-client/0.3"} // 0.13.0 )
View Source
var ( ConnectRelayUnknown = ConnectRelayNextProto{} ConnectRelayV01 = ConnectRelayNextProto{"connet-peer-relay/0.1"} // 0.7.0 ConnectRelayV02 = ConnectRelayNextProto{"connet-peer-relay/0.2"} // 0.13.0 )
View Source
var ( RelayControlUnknown = RelayControlNextProto{} RelayControlV02 = RelayControlNextProto{"connet-relay/0.2"} // 0.8.0 RelayControlV03 = RelayControlNextProto{"connet-relay/0.3"} // 0.13.0 )
View Source
var ( ProxyNone = ProxyVersion{"none"} ProxyV1 = ProxyVersion{"v1"} ProxyV2 = ProxyVersion{"v2"} )
View Source
var ( UnknownRole = Role{} Destination = Role{"destination"} Source = Role{"source"} )
View Source
var ( RouteAny = RouteOption{"any"} RouteDirect = RouteOption{"direct"} RouteRelay = RouteOption{"relay"} )
View Source
var (
ConnectClientV01 = ConnectClientNextProto{"connet-peer/0.1"} // 0.7.0
)
View Source
var Version string
Injected by ldflags
Functions ¶
func BuildVersion ¶ added in v0.7.0
func BuildVersion() string
func EndpointNames ¶ added in v0.9.0
func PBFromEncryptions ¶ added in v0.6.0
func PBFromEncryptions(schemes []EncryptionScheme) []pbconnect.RelayEncryptionScheme
func PBsFromHostPorts ¶ added in v0.12.0
Types ¶
type ClientControlNextProto ¶ added in v0.12.0
type ClientControlNextProto struct {
// contains filtered or unexported fields
}
ClientControlNextProto describes TLS NextProtos for clients connecting to control servers
func GetClientControlNextProto ¶ added in v0.12.0
func GetClientControlNextProto(conn *quic.Conn) ClientControlNextProto
func (ClientControlNextProto) String ¶ added in v0.12.0
func (v ClientControlNextProto) String() string
type ConnectClientNextProto ¶ added in v0.12.0
type ConnectClientNextProto struct {
// contains filtered or unexported fields
}
ConnectClientNextProto describes TLS NextProtos for clients connecting to other clients
func (ConnectClientNextProto) String ¶ added in v0.12.0
func (v ConnectClientNextProto) String() string
type ConnectRelayNextProto ¶ added in v0.8.0
type ConnectRelayNextProto struct {
// contains filtered or unexported fields
}
ConnectRelayNextProto describes TLS NextProtos for clients connecting to relays
func GetConnectRelayNextProto ¶ added in v0.13.0
func GetConnectRelayNextProto(conn *quic.Conn) ConnectRelayNextProto
func (ConnectRelayNextProto) String ¶ added in v0.8.0
func (v ConnectRelayNextProto) String() string
type EncryptionScheme ¶ added in v0.6.0
type EncryptionScheme struct {
// contains filtered or unexported fields
}
func EncryptionFromPB ¶ added in v0.6.0
func EncryptionFromPB(pb pbconnect.RelayEncryptionScheme) EncryptionScheme
func EncryptionsFromPB ¶ added in v0.6.0
func EncryptionsFromPB(pbs []pbconnect.RelayEncryptionScheme) []EncryptionScheme
func ParseEncryptionScheme ¶ added in v0.6.0
func ParseEncryptionScheme(s string) (EncryptionScheme, error)
func SelectEncryptionScheme ¶ added in v0.6.0
func SelectEncryptionScheme(dst []EncryptionScheme, src []EncryptionScheme) (EncryptionScheme, error)
func (EncryptionScheme) PB ¶ added in v0.6.0
func (e EncryptionScheme) PB() pbconnect.RelayEncryptionScheme
type Endpoint ¶ added in v0.9.0
type Endpoint struct {
// contains filtered or unexported fields
}
func EndpointFromPB ¶ added in v0.9.0
func NewEndpoint ¶ added in v0.9.0
func (Endpoint) MarshalText ¶ added in v0.9.0
func (*Endpoint) UnmarshalText ¶ added in v0.9.0
type Key ¶ added in v0.7.0
type Key struct {
// contains filtered or unexported fields
}
func NewKey ¶ added in v0.7.0
func NewKey(cert *x509.Certificate) Key
func NewKeyString ¶ added in v0.7.0
func (Key) MarshalText ¶ added in v0.7.0
func (*Key) UnmarshalText ¶ added in v0.7.0
type LoadBalancePolicy ¶ added in v0.9.4
type LoadBalancePolicy struct {
// contains filtered or unexported fields
}
func ParseLBPolicy ¶ added in v0.9.4
func ParseLBPolicy(s string) (LoadBalancePolicy, error)
type LoadBalanceRetry ¶ added in v0.9.4
type LoadBalanceRetry struct {
// contains filtered or unexported fields
}
func ParseLBRetry ¶ added in v0.9.4
func ParseLBRetry(s string) (LoadBalanceRetry, error)
type ProxyProtoConn ¶ added in v0.6.0
type ProxyVersion ¶ added in v0.5.0
type ProxyVersion struct {
// contains filtered or unexported fields
}
func ParseProxyVersion ¶ added in v0.5.0
func ParseProxyVersion(s string) (ProxyVersion, error)
func ProxyVersionFromPB ¶ added in v0.5.0
func ProxyVersionFromPB(r pbconnect.ProxyProtoVersion) ProxyVersion
func (ProxyVersion) PB ¶ added in v0.5.0
func (v ProxyVersion) PB() pbconnect.ProxyProtoVersion
type RelayControlNextProto ¶ added in v0.12.0
type RelayControlNextProto struct {
// contains filtered or unexported fields
}
RelayControlNextProto describes TLS NextProtos for relays connecting to control servers
func GetRelayControlNextProto ¶ added in v0.12.0
func GetRelayControlNextProto(conn *quic.Conn) RelayControlNextProto
func (RelayControlNextProto) String ¶ added in v0.12.0
func (v RelayControlNextProto) String() string
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
func RoleFromPB ¶
func (Role) MarshalText ¶
func (*Role) UnmarshalText ¶
type RouteOption ¶
type RouteOption struct {
// contains filtered or unexported fields
}
func ParseRouteOption ¶
func ParseRouteOption(s string) (RouteOption, error)
func (RouteOption) AllowDirect ¶
func (r RouteOption) AllowDirect() bool
func (RouteOption) AllowFrom ¶
func (r RouteOption) AllowFrom(from RouteOption) bool
func (RouteOption) AllowRelay ¶
func (r RouteOption) AllowRelay() bool
Click to show internal directories.
Click to hide internal directories.