Documentation ¶
Overview ¶
Package core implements essential parts of Shadowsocks
Index ¶
- Variables
- func Dial(network, address string, ciph StreamConnCipher) (net.Conn, error)
- func Kdf(password string, keyLen int) []byte
- func ListCipher() []string
- func Listen(network, address string, ciph StreamConnCipher) (net.Listener, error)
- func ListenPacket(network, address string, ciph PacketConnCipher) (net.PacketConn, error)
- type AeadCipher
- type Cipher
- type PacketConnCipher
- type StreamCipher
- type StreamConnCipher
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCipherNotSupported = errors.New("cipher not supported")
ErrCipherNotSupported occurs when a cipher is not supported (likely because of security concerns).
Functions ¶
func ListCipher ¶
func ListCipher() []string
ListCipher returns a list of available cipher names sorted alphabetically.
func ListenPacket ¶
func ListenPacket(network, address string, ciph PacketConnCipher) (net.PacketConn, error)
Types ¶
type AeadCipher ¶
type AeadCipher struct { shadowaead.Cipher Key []byte }
func (*AeadCipher) PacketConn ¶
func (aead *AeadCipher) PacketConn(c net.PacketConn) net.PacketConn
func (*AeadCipher) StreamConn ¶
func (aead *AeadCipher) StreamConn(c net.Conn) net.Conn
type Cipher ¶
type Cipher interface { StreamConnCipher PacketConnCipher }
type PacketConnCipher ¶
type PacketConnCipher interface {
PacketConn(net.PacketConn) net.PacketConn
}
type StreamCipher ¶
type StreamCipher struct { shadowstream.Cipher Key []byte }
func (*StreamCipher) PacketConn ¶
func (ciph *StreamCipher) PacketConn(c net.PacketConn) net.PacketConn
func (*StreamCipher) StreamConn ¶
func (ciph *StreamCipher) StreamConn(c net.Conn) net.Conn
Click to show internal directories.
Click to hide internal directories.