# Packages
No description provided by the author
# Functions
DialClient establishes an in-proxy connection for relaying traffic to the specified destination.
Enabled indicates if in-proxy functionality is enabled.
GenerateRootObfuscationSecret creates a new ObfuscationSecret using crypto/rand.
GenerateSessionPrivateKey creates a new session private key using crypto/rand.
No description provided by the author
No description provided by the author
GetNetworkType extracts the network_type from base API metrics and returns a corresponding NetworkType.
HaveCommonIDs indicates whether two lists of IDs have a common entry.
IDFromString returns an ID given its string encoding.
IDsFromStrings returns a list of IDs given a list of string encodings.
MakeID generates a new ID using crypto/rand.
MakeNATType creates a new NATType.
MakeTraversal returns the NATTraversal classification for the given NATType.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NATDiscover runs NAT type and port mapping type discovery operations.
NetworkProtocolFromString converts a "net" package network protocol string value to a NetworkProtocol.
NewBroker initializes a new Broker.
NewBrokerClient initializes a new BrokerClient with the provided BrokerDialCoordinator.
NewInitiatorSessions creates a new InitiatorSessions with the specified initator private key.
NewMatcher creates a new Matcher.
No description provided by the author
NewProxy initializes a new Proxy with the specified configuration.
NewResponderSessions creates a new ResponderSessions which allows any initiators to establish a session.
NewResponderSessionsForKnownInitiators creates a new ResponderSessions which allows only allow-listed initiators to establish a session.
No description provided by the author
NewServerBrokerSessions create a new ServerBrokerSessions, with the specified key material.
ObfuscationSecretFromString returns an ObfuscationSecret given its string encoding.
SessionPrivateKeyFromString returns a SessionPrivateKey given its base64 string encoding.
SessionPublicKeyFromString returns a SessionPublicKey given its base64 string encoding.
SessionPublicKeysFromStrings returns a list of SessionPublicKeys given the base64 string encodings.
SetAllowBogonWebRTCConnections configures whether to allow bogon ICE candidates in WebRTC session descriptions.
SetAllowCommonASNMatching configures whether to allow matching proxies and clients with the same GeoIP country and ASN.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
BrokerEndPointName is the standard name for referencing an endpoint that services broker requests.
BrokerMaxRequestBodySize is the maximum request size, that should be enforced by the provided broker transport.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaxRelayRoundTrips is a sanity/anti-DoS check against clients that attempt to relay more packets than are required for both a session handshake and application-level request round trip.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
NATTypeMobileNetwork is a pseudo NATType, usied in matching, that represents the assumed and relevent NAT behavior of clients on mobile networks, presumed to be behind CGNAT when they report NATTypeUnknown.
NATTypeNone and the following NATType constants are used in testing.
NATTypePortMapping is a pseudo NATType, used in matching, that represents the relevant NAT behavior of a port mapping (e.g., UPnP-IGD).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Broker is the in-proxy broker component, which matches clients and proxies and provides WebRTC signaling functionalty.
BrokerClient is used to make requests to a broker.
BrokerConfig specifies the configuration for a Broker.
BrokerServerReport is a one-way API call sent from a broker to a Psiphon server.
ClientConfig specifies the configuration for a ClientConn dial.
ClientConn is a network connection to an in-proxy, which is relayed to a Psiphon server destination.
ClientMetrics are network topolology metrics provided by a client to a broker.
ClientOfferRequest is an API request sent from a client to a broker, requesting a proxy connection.
ClientOfferResponse returns the connecting information for a matched proxy.
ClientRelayedPacketRequest is an API request sent from a client to a broker, relaying a secure session packet from the Psiphon server to the broker.
ClientRelayedPacketResponse returns the next packet from the broker to the server.
DataChannelTrafficShapingParameters specifies a data channel traffic shaping configuration, including random padding and decoy messages.
InitiatorRoundTrip represents the state of a session round trip, including a session handshake if required.
InitiatorSessions is a set of secure Noise protocol sessions for an initiator.
MatchAnnouncement is a proxy announcement to be queued for matching.
MatchAnswer is a proxy answer, the proxy's follow up to a matched announcement, to be routed to the awaiting client offer.
Matcher matches proxy announcements with client offers.
MatcherConfig specifies the configuration for a matcher.
MatcherLimitError is the error type returned by Announce or Offer when the caller has exceeded configured queue entry or rate limits.
MatchMetrics records statistics about the match queue state at the time a match is made.
MatchOffer is a client offer to be queued for matching.
MatchProperties specifies the compartment, GeoIP, and network topology matching roperties of clients and proxies.
NATDiscoverConfig specifies the configuration for a NATDiscover run.
Proxy is the in-proxy proxying component, which relays traffic from a client to a Psiphon server.
ProxyAnnounceRequest is an API request sent from a proxy to a broker, announcing that it is available for a client connection.
ProxyAnnounceResponse returns the connection information for a matched client.
ProxyAnswerRequest is an API request sent from a proxy to a broker, following ProxyAnnounceResponse, with the WebRTC answer SDP corresponding to the client offer SDP received in ProxyAnnounceResponse.
ProxyAnswerResponse is the acknowledgement for a ProxyAnswerRequest.
ProxyConfig specifies the configuration for a Proxy run.
ProxyMetrics are network topolology and resource metrics provided by a proxy to a broker.
ResponderSessions is a set of secure Noise protocol sessions for an responder.
RoundTripperFailedError is an error type that should be returned from RoundTripper.RoundTrip when the round trip transport has permanently failed.
ServerBrokerSessions manages the secure sessions that handle BrokerServerReports from brokers.
SessionPacket is a Noise protocol message, which may be a session handshake message, or secured application data, a SessionRoundTrip.
SessionPrologue is a Noise protocol prologue, which binds the session ID to the session.
SessionRoundTrip is an application data request or response, which is secured by the Noise protocol session.
WebRTCSessionDescription is compatible with pion/webrtc.SessionDescription and facilitates the PSIPHON_ENABLE_INPROXY build tag exclusion of pion dependencies.
# Interfaces
BrokerDialCoordinator provides in-proxy dial parameters and configuration, used by both clients and proxies, and an interface for signaling when parameters are successful or not, to facilitate replay of successful parameters.
RoundTripper provides a request/response round trip network transport with blocking circumvention capabilities.
WebRTCDialCoordinator provides in-proxy dial parameters and configuration, used by both clients and proxies, and an interface for signaling when parameters are successful or not, to facilitate replay of successful parameters.
# Type aliases
ActivityUpdater is a callback that is invoked when clients connect and disconnect and periodically with data transfer updates (unless idle).
ExtendTransportTimeout is a callback that extends the timeout for a server-side broker transport handler, facilitating request-specific timeouts including long-polling for proxy announcements.
GetTactics is a callback which returns the appropriate tactics for the specified client/proxy GeoIP data and API parameters.
ICECandidateType is an ICE candidate type: host for public addresses, port mapping for when a port mapping protocol was used to establish a public address, or server reflexive when STUN hole punching was used to create a public address.
ICECandidateTypes is a list of ICE candidate types.
ID is a unique identifier used to identify inproxy connections and actors.
LookupGeoIP is a callback for providing GeoIP lookup service.
NATMapping is a NAT filtering behavior defined in RFC 4787, section 5.
NATMapping is a NAT mapping behavior defined in RFC 4787, section 4.1.
NATTraversal classifies the NAT traversal potential for a NATType.
NATType specifies a network's NAT behavior and consists of a NATMapping and a NATFiltering component.
NetworkProtocol is an Internet protocol, such as TCP or UDP.
NetworkType is the type of a network, such as WiFi or Mobile.
ObfuscationSecret is shared, semisecret value used in obfuscation layers.
PortMappingType is a port mapping protocol supported by a network.
PortMappingTypes is a list of port mapping protocol supported by a network.
ProxiedConnectionHandler is a callback, provided by the Psiphon server, that receives information from a BrokerServerReport for the client associated with the callback.
RequestHandler is an application-level handler that receives the decrypted request payload and returns a response payload to be encrypted and sent to the initiator.
SessionPrivateKey is a Noise protocol private key.
SessionPublicKey is a Noise protocol public key.
SessionPublicKeyCurve25519 is a representation of a Curve25519 public key as a fixed-size array that may be used as a map key.