Versions in this module Expand all Collapse all v1 v1.0.1 Dec 12, 2024 Changes in this version + const BrokerEndPointName + const BrokerMaxRequestBodySize + const MaxCompartmentIDs + const MaxRelayRoundTrips + const MinimumProxyProtocolVersion + const ProxyProtocolVersion1 + const SessionProtocolName + const SessionProtocolVersion1 + var NATTypeFullCone = MakeNATType(NATMappingEndpointIndependent, NATFilteringEndpointIndependent) + var NATTypeMobileNetwork = MakeNATType(NATMappingAddressPortDependent, NATFilteringAddressPortDependent) + var NATTypeNone = MakeNATType(NATMappingEndpointIndependent, NATFilteringEndpointIndependent) + var NATTypePortMapping = MakeNATType(NATMappingEndpointIndependent, NATFilteringEndpointIndependent) + var NATTypePortRestrictedCone = MakeNATType(NATMappingEndpointIndependent, NATFilteringAddressPortDependent) + var NATTypeRestrictedCone = MakeNATType(NATMappingEndpointIndependent, NATFilteringAddressDependent) + var NATTypeSymmetric = MakeNATType(NATMappingAddressPortDependent, NATFilteringAddressPortDependent) + var NATTypeUnknown = MakeNATType(NATMappingUnknown, NATFilteringUnknown) + func Enabled() bool + func GetAllowBogonWebRTCConnections() bool + func GetAllowCommonASNMatching() bool + func HaveCommonIDs(a, b []ID) bool + func MarshalBrokerServerReport(request *BrokerServerReport) ([]byte, error) + func MarshalClientOfferRequest(request *ClientOfferRequest) ([]byte, error) + func MarshalClientOfferResponse(response *ClientOfferResponse) ([]byte, error) + func MarshalClientRelayedPacketRequest(request *ClientRelayedPacketRequest) ([]byte, error) + func MarshalClientRelayedPacketResponse(response *ClientRelayedPacketResponse) ([]byte, error) + func MarshalProxyAnnounceRequest(request *ProxyAnnounceRequest) ([]byte, error) + func MarshalProxyAnnounceResponse(response *ProxyAnnounceResponse) ([]byte, error) + func MarshalProxyAnswerRequest(request *ProxyAnswerRequest) ([]byte, error) + func MarshalProxyAnswerResponse(response *ProxyAnswerResponse) ([]byte, error) + func NATDiscover(ctx context.Context, config *NATDiscoverConfig) + func SetAllowBogonWebRTCConnections(allow bool) + func SetAllowCommonASNMatching(allow bool) + type ActivityUpdater func(connectingClients int32, connectedClients int32, bytesUp int64, ...) + type Broker struct + func NewBroker(config *BrokerConfig) (*Broker, error) + func (b *Broker) HandleSessionPacket(ctx context.Context, extendTransportTimeout ExtendTransportTimeout, ...) ([]byte, error) + func (b *Broker) SetCommonCompartmentIDs(commonCompartmentIDs []ID) error + func (b *Broker) SetLimits(matcherAnnouncementLimitEntryCount int, ...) + func (b *Broker) SetTimeouts(proxyAnnounceTimeout time.Duration, clientOfferTimeout time.Duration, ...) + func (b *Broker) Start() error + func (b *Broker) Stop() + type BrokerClient struct + func NewBrokerClient(coordinator BrokerDialCoordinator) (*BrokerClient, error) + func (b *BrokerClient) ClientOffer(ctx context.Context, request *ClientOfferRequest, ...) (*ClientOfferResponse, error) + func (b *BrokerClient) ClientRelayedPacket(ctx context.Context, request *ClientRelayedPacketRequest) (*ClientRelayedPacketResponse, error) + func (b *BrokerClient) GetBrokerDialCoordinator() BrokerDialCoordinator + func (b *BrokerClient) ProxyAnnounce(ctx context.Context, requestDelay time.Duration, request *ProxyAnnounceRequest) (*ProxyAnnounceResponse, error) + func (b *BrokerClient) ProxyAnswer(ctx context.Context, request *ProxyAnswerRequest) (*ProxyAnswerResponse, error) + type BrokerConfig struct + APIParameterLogFieldFormatter common.APIParameterLogFieldFormatter + APIParameterValidator common.APIParameterValidator + AllowClient func(common.GeoIPData) bool + AllowDomainFrontedDestinations func(common.GeoIPData) bool + AllowProxy func(common.GeoIPData) bool + ClientOfferPersonalTimeout time.Duration + ClientOfferTimeout time.Duration + CommonCompartmentIDs []ID + GetTacticsPayload GetTacticsPayload + IsLoadLimiting func() bool + IsValidServerEntryTag func(serverEntryTag string) bool + Logger common.Logger + LookupGeoIP LookupGeoIP + MatcherAnnouncementLimitEntryCount int + MatcherAnnouncementNonlimitedProxyIDs []ID + MatcherAnnouncementRateLimitInterval time.Duration + MatcherAnnouncementRateLimitQuantity int + MatcherOfferLimitEntryCount int + MatcherOfferRateLimitInterval time.Duration + MatcherOfferRateLimitQuantity int + MaxCompartmentIDs int + ObfuscationRootSecret ObfuscationSecret + PendingServerReportsTTL time.Duration + PrioritizeProxy func(common.GeoIPData, common.APIParameters) bool + PrivateKey SessionPrivateKey + ProxyAnnounceTimeout time.Duration + ServerEntrySignaturePublicKey string + type BrokerDialCoordinator interface + AnnounceDelay func() time.Duration + AnnounceDelayJitter func() float64 + AnnounceMaxBackoffDelay func() time.Duration + AnnounceRequestTimeout func() time.Duration + AnswerRequestTimeout func() time.Duration + BrokerClientNoMatch func(roundTripper RoundTripper) + BrokerClientPrivateKey func() SessionPrivateKey + BrokerClientRoundTripper func() (RoundTripper, error) + BrokerClientRoundTripperFailed func(roundTripper RoundTripper) + BrokerClientRoundTripperSucceeded func(roundTripper RoundTripper) + BrokerPublicKey func() SessionPublicKey + BrokerRootObfuscationSecret func() ObfuscationSecret + CommonCompartmentIDs func() []ID + MetricsForBrokerRequests func() common.LogFields + NetworkID func() string + NetworkType func() NetworkType + OfferRequestPersonalTimeout func() time.Duration + OfferRequestTimeout func() time.Duration + OfferRetryDelay func() time.Duration + OfferRetryJitter func() float64 + PersonalCompartmentIDs func() []ID + RelayedPacketRequestTimeout func() time.Duration + SessionHandshakeRoundTripTimeout func() time.Duration + type BrokerServerReport struct + ClientIP string + ClientNATType NATType + ClientPortMappingTypes PortMappingTypes + ConnectionID ID + MatchedCommonCompartments bool + MatchedPersonalCompartments bool + ProxyID ID + ProxyIP string + ProxyMetrics *ProxyMetrics + ProxyNATType NATType + ProxyPortMappingTypes PortMappingTypes + func UnmarshalBrokerServerReport(payload []byte) (*BrokerServerReport, error) + func (report *BrokerServerReport) ValidateAndGetLogFields(baseAPIParameterValidator common.APIParameterValidator, ...) (common.LogFields, error) + type ClientConfig struct + BaseAPIParameters common.APIParameters + BrokerClient *BrokerClient + DialAddress string + DialNetworkProtocol NetworkProtocol + EnableWebRTCDebugLogging bool + Logger common.Logger + MustUpgrade func() + PackedDestinationServerEntry []byte + ReliableTransport bool + RemoteAddrOverride string + WebRTCDialCoordinator WebRTCDialCoordinator + type ClientConn struct + func DialClient(ctx context.Context, config *ClientConfig) (retConn *ClientConn, retErr error) + func (conn *ClientConn) Close() error + func (conn *ClientConn) GetConnectionID() ID + func (conn *ClientConn) GetMetrics() common.LogFields + func (conn *ClientConn) InitialRelayPacket() []byte + func (conn *ClientConn) IsClosed() bool + func (conn *ClientConn) LocalAddr() net.Addr + func (conn *ClientConn) Read(p []byte) (int, error) + func (conn *ClientConn) ReadFrom(b []byte) (int, net.Addr, error) + func (conn *ClientConn) RelayPacket(ctx context.Context, in []byte) ([]byte, error) + func (conn *ClientConn) RemoteAddr() net.Addr + func (conn *ClientConn) SetDeadline(t time.Time) error + func (conn *ClientConn) SetReadDeadline(t time.Time) error + func (conn *ClientConn) SetWriteDeadline(t time.Time) error + func (conn *ClientConn) Write(p []byte) (int, error) + func (conn *ClientConn) WriteTo(b []byte, _ net.Addr) (int, error) + type ClientMetrics struct + BaseAPIParameters protocol.PackedAPIParameters + NATType NATType + PortMappingTypes PortMappingTypes + ProxyProtocolVersion int32 + func (metrics *ClientMetrics) ValidateAndGetLogFields(baseAPIParameterValidator common.APIParameterValidator, ...) (common.LogFields, error) + type ClientOfferRequest struct + ClientOfferSDP WebRTCSessionDescription + ClientRootObfuscationSecret ObfuscationSecret + CommonCompartmentIDs []ID + DestinationAddress string + DoDTLSRandomization bool + ICECandidateTypes ICECandidateTypes + Metrics *ClientMetrics + NetworkProtocol NetworkProtocol + PackedDestinationServerEntry []byte + PersonalCompartmentIDs []ID + TrafficShapingParameters *DataChannelTrafficShapingParameters + func UnmarshalClientOfferRequest(payload []byte) (*ClientOfferRequest, error) + func (request *ClientOfferRequest) ValidateAndGetLogFields(maxCompartmentIDs int, lookupGeoIP LookupGeoIP, ...) ([]byte, common.LogFields, error) + type ClientOfferResponse struct + ConnectionID ID + Limited bool + MustUpgrade bool + NoMatch bool + ProxyAnswerSDP WebRTCSessionDescription + RelayPacketToServer []byte + SelectedProxyProtocolVersion int32 + func UnmarshalClientOfferResponse(payload []byte) (*ClientOfferResponse, error) + type ClientRelayedPacketRequest struct + ConnectionID ID + PacketFromServer []byte + func UnmarshalClientRelayedPacketRequest(payload []byte) (*ClientRelayedPacketRequest, error) + func (request *ClientRelayedPacketRequest) ValidateAndGetLogFields(baseAPIParameterValidator common.APIParameterValidator, ...) (common.LogFields, error) + type ClientRelayedPacketResponse struct + PacketToServer []byte + func UnmarshalClientRelayedPacketResponse(payload []byte) (*ClientRelayedPacketResponse, error) + type DataChannelTrafficShapingParameters struct + DecoyMessageProbability float64 + MaxDecoyMessages int + MaxDecoySize int + MaxPaddedMessages int + MaxPaddingSize int + MinDecoyMessages int + MinDecoySize int + MinPaddedMessages int + MinPaddingSize int + func (params *DataChannelTrafficShapingParameters) Validate() error + type DeobfuscationAnomoly struct + func NewDeobfuscationAnomoly(err error) *DeobfuscationAnomoly + func (e DeobfuscationAnomoly) Error() string + type ExtendTransportTimeout func(timeout time.Duration) + type GetTacticsPayload func(common.GeoIPData, common.APIParameters) ([]byte, string, error) + type ICECandidateType int32 + const ICECandidateHost + const ICECandidatePeerReflexive + const ICECandidatePortMapping + const ICECandidateServerReflexive + const ICECandidateUnknown + func (t ICECandidateType) IsValid() bool + func (t ICECandidateType) MarshalText() ([]byte, error) + func (t ICECandidateType) String() string + type ICECandidateTypes []ICECandidateType + func (t ICECandidateTypes) IsValid() bool + type ID [32]byte + func IDFromString(s string) (ID, error) + func IDsFromStrings(strs []string) ([]ID, error) + func MakeID() (ID, error) + func (id ID) Equal(x ID) bool + func (id ID) MarshalText() ([]byte, error) + func (id ID) String() string + func (id ID) Zero() bool + type InitiatorRoundTrip struct + func (r *InitiatorRoundTrip) Next(ctx context.Context, receivedPacket []byte) (retSendPacket []byte, retIsRequestPacket bool, retErr error) + func (r *InitiatorRoundTrip) Response() ([]byte, error) + func (r *InitiatorRoundTrip) TransportFailed() + type InitiatorSessions struct + func NewInitiatorSessions(initiatorPrivateKey SessionPrivateKey) *InitiatorSessions + func (s *InitiatorSessions) NewRoundTrip(responderPublicKey SessionPublicKey, ...) (*InitiatorRoundTrip, error) + func (s *InitiatorSessions) RoundTrip(ctx context.Context, roundTripper RoundTripper, ...) ([]byte, error) + type LookupGeoIP func(IP string) common.GeoIPData + type MatchAnnouncement struct + ConnectionID ID + Properties MatchProperties + ProxyID ID + ProxyMetrics *ProxyMetrics + type MatchAnswer struct + ConnectionID ID + ProxyAnswerSDP WebRTCSessionDescription + ProxyID ID + ProxyIP string + SelectedProxyProtocolVersion int32 + type MatchMetrics struct + AnnouncementMatchIndex int + AnnouncementQueueSize int + OfferMatchIndex int + OfferQueueSize int + func (metrics *MatchMetrics) GetMetrics() common.LogFields + type MatchOffer struct + ClientOfferSDP WebRTCSessionDescription + ClientProxyProtocolVersion int32 + ClientRootObfuscationSecret ObfuscationSecret + DestinationAddress string + DestinationServerID string + DoDTLSRandomization bool + NetworkProtocol NetworkProtocol + Properties MatchProperties + TrafficShapingParameters *DataChannelTrafficShapingParameters + type MatchProperties struct + CommonCompartmentIDs []ID + GeoIPData common.GeoIPData + IsPriority bool + NATType NATType + NetworkType NetworkType + PersonalCompartmentIDs []ID + PortMappingTypes PortMappingTypes + func (p *MatchProperties) EffectiveNATType() NATType + func (p *MatchProperties) ExistsPreferredNATMatch(unlimitedNAT, partiallyLimitedNAT, limitedNAT bool) bool + func (p *MatchProperties) IsPreferredNATMatch(peerMatchProperties *MatchProperties) bool + type Matcher struct + func NewMatcher(config *MatcherConfig) *Matcher + func (m *Matcher) Announce(ctx context.Context, proxyIP string, proxyAnnouncement *MatchAnnouncement) (*MatchOffer, *MatchMetrics, error) + func (m *Matcher) AnnouncementHasPersonalCompartmentIDs(proxyID ID, connectionID ID) (bool, error) + func (m *Matcher) Answer(proxyAnswer *MatchAnswer) error + func (m *Matcher) AnswerError(proxyID ID, connectionID ID) + func (m *Matcher) Offer(ctx context.Context, clientIP string, clientOffer *MatchOffer) (*MatchAnswer, *MatchAnnouncement, *MatchMetrics, error) + func (m *Matcher) SetLimits(announcementLimitEntryCount int, announcementRateLimitQuantity int, ...) + func (m *Matcher) Start() error + func (m *Matcher) Stop() + type MatcherConfig struct + AnnouncementLimitEntryCount int + AnnouncementNonlimitedProxyIDs []ID + AnnouncementRateLimitInterval time.Duration + AnnouncementRateLimitQuantity int + IsLoadLimiting func() bool + Logger common.Logger + OfferLimitEntryCount int + OfferRateLimitInterval time.Duration + OfferRateLimitQuantity int + type MatcherLimitError struct + func NewMatcherLimitError(err error) *MatcherLimitError + func (e MatcherLimitError) Error() string + type NATDiscoverConfig struct + Logger common.Logger + SkipPortMapping bool + WebRTCDialCoordinator WebRTCDialCoordinator + type NATFiltering int32 + const NATFilteringAddressDependent + const NATFilteringAddressPortDependent + const NATFilteringEndpointIndependent + const NATFilteringUnknown + func (f NATFiltering) IsValid() bool + func (f NATFiltering) MarshalText() ([]byte, error) + func (f NATFiltering) String() string + type NATMapping int32 + const NATMappingAddressDependent + const NATMappingAddressPortDependent + const NATMappingEndpointIndependent + const NATMappingUnknown + func (m NATMapping) IsValid() bool + func (m NATMapping) MarshalText() ([]byte, error) + func (m NATMapping) String() string + type NATTraversal int32 + const NATTraversalPartiallyLimited + const NATTraversalStrictlyLimited + const NATTraversalUnlimited + func MakeTraversal(t NATType) NATTraversal + func (t NATTraversal) Compatible(t1 NATTraversal) bool + func (t NATTraversal) ExistsPreferredMatch(unlimited, partiallyLimited, strictlyLimited bool) bool + func (t NATTraversal) IsPreferredMatch(t1 NATTraversal) bool + type NATType int32 + func MakeNATType(mapping NATMapping, filtering NATFiltering) NATType + func (t NATType) Compatible(t1 NATType) bool + func (t NATType) ExistsPreferredMatch(unlimited, partiallyLimited, limited bool) bool + func (t NATType) Filtering() NATFiltering + func (t NATType) IsPreferredMatch(t1 NATType) bool + func (t NATType) IsValid() bool + func (t NATType) Mapping() NATMapping + func (t NATType) MarshalText() ([]byte, error) + func (t NATType) NeedsDiscovery() bool + func (t NATType) String() string + func (t NATType) Traversal() NATTraversal + type NetworkProtocol int32 + const NetworkProtocolTCP + const NetworkProtocolUDP + func NetworkProtocolFromString(networkProtocol string) (NetworkProtocol, error) + func (p NetworkProtocol) IsStream() bool + func (p NetworkProtocol) String() string + type NetworkType int32 + const NetworkTypeMobile + const NetworkTypeUnknown + const NetworkTypeWiFi + func GetNetworkType(packedBaseParams protocol.PackedAPIParameters) NetworkType + type ObfuscationSecret [32]byte + func GenerateRootObfuscationSecret() (ObfuscationSecret, error) + func ObfuscationSecretFromString(s string) (ObfuscationSecret, error) + func (secret ObfuscationSecret) String() string + type PortMappingProbe struct + type PortMappingType int32 + const PortMappingTypeNone + const PortMappingTypePCP + const PortMappingTypePMP + const PortMappingTypeUPnP + func (t PortMappingType) IsValid() bool + func (t PortMappingType) MarshalText() ([]byte, error) + func (t PortMappingType) String() string + type PortMappingTypes []PortMappingType + func (t PortMappingTypes) Available() bool + func (t PortMappingTypes) IsValid() bool + func (t PortMappingTypes) NeedsDiscovery() bool + type ProxiedConnectionHandler func(brokerVerifiedOriginalClientIP string, logFields common.LogFields) + type Proxy struct + func NewProxy(config *ProxyConfig) (*Proxy, error) + func (p *Proxy) Run(ctx context.Context) + type ProxyAnnounceRequest struct + CheckTactics bool + Metrics *ProxyMetrics + PersonalCompartmentIDs []ID + func UnmarshalProxyAnnounceRequest(payload []byte) (*ProxyAnnounceRequest, error) + func (request *ProxyAnnounceRequest) ValidateAndGetParametersAndLogFields(maxCompartmentIDs int, baseAPIParameterValidator common.APIParameterValidator, ...) (common.APIParameters, common.LogFields, error) + type ProxyAnnounceResponse struct + ClientOfferSDP WebRTCSessionDescription + ClientProxyProtocolVersion int32 + ClientRootObfuscationSecret ObfuscationSecret + ConnectionID ID + DestinationAddress string + DoDTLSRandomization bool + Limited bool + MustUpgrade bool + NetworkProtocol NetworkProtocol + NoMatch bool + TacticsPayload []byte + TrafficShapingParameters *DataChannelTrafficShapingParameters + func UnmarshalProxyAnnounceResponse(payload []byte) (*ProxyAnnounceResponse, error) + type ProxyAnswerRequest struct + AnswerError string + ConnectionID ID + ICECandidateTypes ICECandidateTypes + ProxyAnswerSDP WebRTCSessionDescription + SelectedProxyProtocolVersion int32 + func UnmarshalProxyAnswerRequest(payload []byte) (*ProxyAnswerRequest, error) + func (request *ProxyAnswerRequest) ValidateAndGetLogFields(lookupGeoIP LookupGeoIP, ...) ([]byte, common.LogFields, error) + type ProxyAnswerResponse struct + func UnmarshalProxyAnswerResponse(payload []byte) (*ProxyAnswerResponse, error) + type ProxyConfig struct + ActivityUpdater ActivityUpdater + EnableWebRTCDebugLogging bool + GetBaseAPIParameters func(includeTacticsParameters bool) (common.APIParameters, string, error) + GetBrokerClient func() (*BrokerClient, error) + GetCurrentNetworkContext func() context.Context + HandleTacticsPayload func(networkID string, tacticsPayload []byte) bool + LimitDownstreamBytesPerSecond int + LimitUpstreamBytesPerSecond int + Logger common.Logger + MakeWebRTCDialCoordinator func() (WebRTCDialCoordinator, error) + MaxClients int + MustUpgrade func() + WaitForNetworkConnectivity func() bool + type ProxyMetrics struct + BaseAPIParameters protocol.PackedAPIParameters + ConnectedClients int32 + ConnectingClients int32 + LimitDownstreamBytesPerSecond int64 + LimitUpstreamBytesPerSecond int64 + MaxClients int32 + NATType NATType + PeakDownstreamBytesPerSecond int64 + PeakUpstreamBytesPerSecond int64 + PortMappingTypes PortMappingTypes + ProxyProtocolVersion int32 + func (metrics *ProxyMetrics) ValidateAndGetParametersAndLogFields(baseAPIParameterValidator common.APIParameterValidator, ...) (common.APIParameters, common.LogFields, error) + type RequestHandler func(initiatorID ID, request []byte) ([]byte, error) + type ResponderSessions struct + func NewResponderSessions(responderPrivateKey SessionPrivateKey, ...) (*ResponderSessions, error) + func NewResponderSessionsForKnownInitiators(responderPrivateKey SessionPrivateKey, ...) (*ResponderSessions, error) + func (s *ResponderSessions) HandlePacket(inPacket []byte, requestHandler RequestHandler) (retOutPacket []byte, retErr error) + func (s *ResponderSessions) SetKnownInitiatorPublicKeys(initiatorPublicKeys []SessionPublicKey) error + type RoundTripper interface + RoundTrip func(ctx context.Context, roundTripDelay time.Duration, ...) (responsePayload []byte, err error) + type RoundTripperFailedError struct + func NewRoundTripperFailedError(err error) *RoundTripperFailedError + func (e RoundTripperFailedError) Error() string + type ServerBrokerSessions struct + func NewServerBrokerSessions(serverPrivateKey SessionPrivateKey, ...) (*ServerBrokerSessions, error) + func (s *ServerBrokerSessions) HandlePacket(logger common.Logger, in []byte, clientConnectionID ID, ...) (retOut []byte, retErr error) + func (s *ServerBrokerSessions) SetKnownBrokerPublicKeys(brokerPublicKeys []SessionPublicKey) error + type SessionPacket struct + Nonce uint64 + Payload []byte + ResetSessionToken []byte + SessionID ID + type SessionPrivateKey [ed25519.PrivateKeySize]byte + func GenerateSessionPrivateKey() (SessionPrivateKey, error) + func SessionPrivateKeyFromString(s string) (SessionPrivateKey, error) + func (k SessionPrivateKey) GetPublicKey() (SessionPublicKey, error) + func (k SessionPrivateKey) IsZero() bool + func (k SessionPrivateKey) String() string + func (k SessionPrivateKey) ToCurve25519() []byte + type SessionPrologue struct + SessionID ID + SessionProtocolName string + SessionProtocolVersion uint32 + type SessionPublicKey [ed25519.PublicKeySize]byte + func SessionPublicKeyFromString(s string) (SessionPublicKey, error) + func SessionPublicKeysFromStrings(strs []string) ([]SessionPublicKey, error) + func (k SessionPublicKey) String() string + func (k SessionPublicKey) ToCurve25519() (SessionPublicKeyCurve25519, error) + type SessionPublicKeyCurve25519 [curve25519.PointSize]byte + func (k SessionPublicKeyCurve25519) String() string + type SessionRoundTrip struct + Payload []byte + RoundTripID ID + type WebRTCDialCoordinator interface + BindToDevice func(fileDescriptor int) error + ClientRootObfuscationSecret func() ObfuscationSecret + DataChannelTrafficShapingParameters func() *DataChannelTrafficShapingParameters + DisableIPv6ICECandidates func() bool + DisableInboundForMobileNetworks func() bool + DisablePortMapping func() bool + DisableSTUN func() bool + DiscoverNAT func() bool + DiscoverNATTimeout func() time.Duration + DoDTLSRandomization func() bool + NATType func() NATType + NetworkID func() string + NetworkType func() NetworkType + PortMappingProbe func() *PortMappingProbe + PortMappingTypes func() PortMappingTypes + ProxyDestinationDialTimeout func() time.Duration + ProxyRelayInactivityTimeout func() time.Duration + ProxyUpstreamDial func(ctx context.Context, network, address string) (net.Conn, error) + ResolveAddress func(ctx context.Context, network, address string) (string, error) + STUNServerAddress func(RFC5780 bool) string + STUNServerAddressFailed func(RFC5780 bool, address string) + STUNServerAddressSucceeded func(RFC5780 bool, address string) + SetNATType func(t NATType) + SetPortMappingProbe func(p *PortMappingProbe) + SetPortMappingTypes func(t PortMappingTypes) + UDPConn func(ctx context.Context, network, remoteAddress string) (net.PacketConn, error) + UDPListen func(ctx context.Context) (net.PacketConn, error) + WebRTCAnswerTimeout func() time.Duration + WebRTCAwaitDataChannelTimeout func() time.Duration + WebRTCAwaitPortMappingTimeout func() time.Duration + type WebRTCSessionDescription struct + SDP string + Type int