# Packages
Package accesscontrol implements an access control authorization scheme based on digital signatures.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package osl implements the Obfuscated Server List (OSL) mechanism.
Package parameters implements dynamic, concurrency-safe parameters that
determine Psiphon client behavior.
Package prng implemented a seeded, unbiased PRNG that is suitable for use
cases including obfuscation, network jitter, load balancing.
No description provided by the author
Package quic wraps github.com/lucas-clemente/quic-go with net.Listener and
net.Conn types that provide a drop-in replacement for net.TCPConn.
Package sss implements Shamir's Secret Sharing algorithm over GF(2^8).
Package tactics provides dynamic Psiphon client configuration based on GeoIP
attributes, API parameters, and speed test data.
No description provided by the author
Package tun is an IP packet tunnel server and client.
Package wildcard implements a very simple wildcard matcher which supports only the term '*', which matches any sequence of characters.
# Functions
Compress returns zlib compressed data.
Contains is a helper function that returns true if the target string is in the list.
ContainsAny returns true if any string in targets is present in the list.
ContainsInt returns true if the target int is in the list.
ContainsWildcard returns true if target matches any of the patterns.
ContextError prefixes an error message with the current function name and source file line number.
ContextErrorMsg works like ContextError, but adds a message string to the error message.
No description provided by the author
Decompress returns zlib decompressed data.
FormatByteCount returns a string representation of the specified byte count in conventional, human-readable format.
GenerateAuthenticatedDataPackageKeys generates a key pair be used to sign and verify AuthenticatedDataPackages.
No description provided by the author
GenerateWebServerCertificate creates a self-signed web server certificate, using the specified host name (commonName).
GetBuildInfo returns an instance of the BuildInfo struct.
GetCurrentTimestamp returns the current time in UTC as an RFC 3339 formatted string.
GetInterfaceIPAddresses takes an interface name, such as "eth0", and returns the first IPv4 and IPv6 addresses associated with it.
GetParentContext returns the parent function name and source file line number.
GetStringSlice converts an interface{} which is of type []interace{}, and with the type of each element a string, to []string.
IPAddressFromAddr is a helper which extracts an IP address from a net.Addr or returns "" if there is no IP address.
MakeSecureRandomBytes is a helper function that wraps crypto/rand.Read.
NewActivityMonitoredConn creates a new ActivityMonitoredConn.
NewAuthenticatedDataPackageReader extracts and verifies authenticated data from an AuthenticatedDataPackage stored in the specified file.
NewConns initializes a new Conns.
NewLRUConns initializes a new LRUConns.
NewReloadableFile initializes a new ReloadableFile.
NewSubnetLookup creates a SubnetLookup from a list of subnet CIDRs.
NewSubnetLookupFromRoutes creates a SubnetLookup from text routes data.
NewThrottledConn initializes a new ThrottledConn.
ReadAuthenticatedDataPackage extracts and verifies authenticated data from an AuthenticatedDataPackage.
No description provided by the author
TerminateHTTPConnection sends a 404 response to a client and also closes the persistent connection.
TruncateTimestampToHour truncates an RFC 3339 formatted string to hour granularity.
WriteAuthenticatedDataPackage creates an AuthenticatedDataPackage containing the specified data and signed by the given key.
WriteRuntimeProfiles writes Go runtime profile information to a set of files in the specified output directory.
# Constants
No description provided by the author
# Structs
ActivityMonitoredConn wraps a net.Conn, adding logic to deal with events triggered by I/O activity.
AuthenticatedDataPackage is a JSON record containing some Psiphon data payload, such as list of Psiphon server entries.
BuildInfo captures relevant build information here for use in clients or servers.
Conns is a synchronized list of Conns that is used to coordinate interrupting a set of goroutines establishing connections, or close a set of open connections, etc.
GeoIPData is type-compatible with psiphon/server.GeoIPData.
LRUConns is a concurrency-safe list of net.Conns ordered by recent activity.
LRUConnsEntry is an entry in a LRUConns list.
RateLimits specify the rate limits for a ThrottledConn.
ReloadableFile is a file-backed Reloader.
ThrottledConn wraps a net.Conn with read and write rate limiters.
# Interfaces
ActivityUpdater defines an interface for receiving updates for ActivityMonitoredConn activity.
Closer defines the interface to a type, typically a net.Conn, that can be closed.
LogContext is interface-compatible with the return values from psiphon/server.ContextLogger.WithContext/WithContextFields.
Logger exposes a logging interface that's compatible with psiphon/server.ContextLogger.
MetricsSource is an object that provides metrics to be logged.
NetDialer mimicks the net.Dialer interface.
Reloader represents a read-only, in-memory reloadable data object.
# Type aliases
APIParameterLogFieldFormatter is a function that returns formatted LogFields containing the given GeoIPData and APIParameters.
APIParameters is a set of API parameter values, typically received from a Psiphon client and used/logged by the Psiphon server.
APIParameterValidator is a function that validates API parameters for a particular request or context.
LogFields is type-compatible with psiphon/server.LogFields and logrus.LogFields.
SubnetLookup provides an efficient lookup for individual IPv4 addresses within a list of subnets.