Documentation
¶
Index ¶
- Variables
- func BuildVersion() string
- func EndpointNames(eps []Endpoint) []string
- func PBFromEncryptions(schemes []EncryptionScheme) []pbconnect.RelayEncryptionScheme
- func PBFromEndpoints(eps []Endpoint) []*pbmodel.Endpoint
- type ClientNextProto
- type ConnectDirectNextProto
- 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 RelayNextProto
- 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 ( CNUnknown = ClientNextProto{} CNv02 = ClientNextProto{"connet-client/0.2"} // 0.8.0 )
View Source
var ( RNUnknown = RelayNextProto{} RNv02 = RelayNextProto{"connet-relay/0.2"} // 0.8.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 AllClientNextProtos = []ClientNextProto{CNv02}
View Source
var AllConnectDirectNextProtos = []ConnectDirectNextProto{CCv01}
View Source
var AllConnectRelayNextProtos = []ConnectRelayNextProto{CRv01}
View Source
var AllRelayNextProtos = []RelayNextProto{RNv02}
View Source
var (
CCv01 = ConnectDirectNextProto{"connet-peer/0.1"} // 0.7.0
)
View Source
var (
CRv01 = ConnectRelayNextProto{"connet-peer-relay/0.1"} // 0.7.0
)
View Source
var ClientNextProtos = iterc.MapSliceStrings(AllClientNextProtos)
View Source
var ConnectDirectNextProtos = iterc.MapSlice(AllConnectDirectNextProtos, ConnectDirectNextProto.String)
View Source
var ConnectRelayNextProtos = iterc.MapSlice(AllConnectRelayNextProtos, ConnectRelayNextProto.String)
View Source
var RelayNextProtos = iterc.MapSliceStrings(AllRelayNextProtos)
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 PBFromEndpoints ¶ added in v0.9.0
Types ¶
type ClientNextProto ¶ added in v0.8.0
type ClientNextProto struct {
// contains filtered or unexported fields
}
func GetClientNextProto ¶ added in v0.8.0
func GetClientNextProto(conn *quic.Conn) ClientNextProto
func (ClientNextProto) String ¶ added in v0.8.0
func (v ClientNextProto) String() string
type ConnectDirectNextProto ¶ added in v0.8.0
type ConnectDirectNextProto struct {
// contains filtered or unexported fields
}
func (ConnectDirectNextProto) String ¶ added in v0.8.0
func (v ConnectDirectNextProto) String() string
type ConnectRelayNextProto ¶ added in v0.8.0
type ConnectRelayNextProto struct {
// contains filtered or unexported fields
}
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 NewKeyTLS ¶ added in v0.7.0
func NewKeyTLS(cert tls.Certificate) Key
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 RelayNextProto ¶ added in v0.8.0
type RelayNextProto struct {
// contains filtered or unexported fields
}
func GetRelayNextProto ¶ added in v0.8.0
func GetRelayNextProto(conn *quic.Conn) RelayNextProto
func (RelayNextProto) String ¶ added in v0.8.0
func (v RelayNextProto) 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.