# Packages
No description provided by the author
# Functions
MakeCipherEntry constructs a CipherEntry.
NewPacketListener creates a new PacketListener that listens on UDP and optionally sets a firewall mark on the socket (Linux only).
MakeTestCiphers creates a CipherList containing one fresh AEAD cipher for each secret in `secrets`.
fwmark can be used in conjunction with other Linux networking features like cgroups, network namespaces, and TC (Traffic Control) for sophisticated network management.
NewAssociationHandler creates a Shadowsocks proxy AssociationHandler.
NewCipherList creates an empty CipherList.
NewListenerManager creates a new [ListenerManger].
NewMultiPacketListener creates a new packet-based [MultiListener].
NewMultiStreamListener creates a new stream-based [MultiListener].
NewReplayCache returns a fresh ReplayCache that promises to remember at least the most recent `capacity` handshakes.
NewServerSaltGenerator returns a SaltGenerator whose output is apparently random, but is secretly marked as being issued by the server.
NewShadowsocksHandlers creates new Shadowsocks stream and packet handlers.
NewShadowsocksStreamAuthenticator creates a stream authenticator that uses Shadowsocks.
NewStreamHandler creates a StreamHandler.
PacketServe listens for UDP packets on the provided [net.PacketConn] and creates and manages NAT associations.
No description provided by the author
StreamServe repeatedly calls `accept` to obtain connections and `handle` to handle them until accept() returns [ErrClosed].
WithCiphers option function.
WithLogger can be used to provide a custom log target.
No description provided by the author
WithPacketListener option function.
WithReplayCache option function.
WithStreamDialer option function.
No description provided by the author
# Constants
MaxCapacity is the largest allowed size of ReplayCache.
# Variables
RandomServerSaltGenerator is a basic ServerSaltGenerator.
# Structs
CipherEntry holds a Cipher with an identifier.
NoOpShadowsocksConnMetrics is a [ShadowsocksConnMetrics] that doesn't do anything.
NoOpTCPConnMetrics is a [TCPConnMetrics] that doesn't do anything.
NoOpUDPAssociationMetrics is a [UDPAssociationMetrics] that doesn't do anything.
ReplayCache allows us to check whether a handshake salt was used within the last `capacity` handshakes.
No description provided by the author
# Interfaces
AssociationHandler is a handler that handles UDP assocations.
CipherList is a thread-safe collection of CipherEntry elements that allows for snapshotting and moving to front.
ListenerManager holds the state of shared listeners.
MultiListener manages shared listeners.
NATMetrics is used to report NAT related metrics.
ServerSaltGenerator offers the ability to check if a salt was marked as server-originated.
No description provided by the author
ShadowsocksConnMetrics is used to report Shadowsocks related metrics on connections.
StreamHandler is a handler that handles stream connections.
StreamListener is a network listener for stream-oriented protocols that accepts [transport.StreamConn] connections.
TCPConnMetrics is used to report metrics on TCP connections.
UDPAssociationMetrics is used to report metrics on UDP associations.
# Type aliases
No description provided by the author
The implementations of listeners for different network types are not interchangeable.
No description provided by the author
Option is a Shadowsocks service constructor option.
No description provided by the author
No description provided by the author
No description provided by the author