# 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
Package errors provides error wrapping helpers that add inline, single frame
stack trace information to error messages.
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 packetman implements low-level manipulation of TCP packets, enabling a
variety of strategies to evade network censorship.
Package parameters implements dynamic, concurrency-safe parameters that
determine Psiphon client and server behaviors.
Package prng implements 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 stacktrace provides helpers for handling stack trace information.
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 values provides a mechanism for specifying and selecting dynamic
values employed by the Psiphon client and server.
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.
CopyBuffer calls io.CopyBuffer, masking out any src.WriteTo or dst.ReadFrom to force use of the specified buf.
No description provided by the author
Decompress returns zlib decompressed data.
DoFileMigration performs the specified file move operation.
FileExists returns true if a file, or directory, exists at the given path.
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.
GenerateWebServerCertificate creates a self-signed web server certificate, using the specified host name (commonName).
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 non-link local IPv4 and IPv6 addresses associated with it.
GetRoutableInterfaceIPAddresses returns GetInterfaceIPAddresses values for the first non-loopback, non-point-to-point network interface on the host that has an IP address.
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.
IsBogon checks if the specified IP is a bogon (loopback, private addresses, link-local addresses, etc.).
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.
NewBurstMonitoredConn creates a new BurstMonitoredConn.
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.
ParseDNSQuestion parses a DNS message.
PortFromAddr is a helper which extracts a port number from a net.Addr or returns 0 if there is no port number.
ReadAuthenticatedDataPackage extracts and verifies authenticated data from an AuthenticatedDataPackage.
RunNetworkConfigCommand execs a network config command, such as "ifconfig" or "iptables".
SafeParseRequestURI wraps url.ParseRequestURI, stripping the input URL from any error message.
SafeParseURL wraps url.Parse, stripping the input URL from any error message.
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.
BurstMonitoredConn wraps a net.Conn and monitors for data transfer bursts.
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.
FileMigration represents the action of moving a file, or directory, to a new location.
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.
CloseWriter defines the interface to a type, typically a net.TCPConn, that implements CloseWrite.
FragmentorReplayAccessor defines the interface for accessing replay properties of a fragmentor Conn.
IrregularIndicator defines the interface for a type, typically a net.Conn, that detects and reports irregular conditions during initial network connection establishment.
Logger exposes a logging interface that's compatible with psiphon/server.TraceLogger.
LogTrace is interface-compatible with the return values from psiphon/server.TraceLogger.WitTrace/WithTraceFields.
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.
UnderlyingTCPAddrSource defines the interface for a type, typically a net.Conn, such as a server meek Conn, which has an underlying TCP conn(s), providing access to the LocalAddr and RemoteAddr properties of the underlying TCP conn.
# 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.