Documentation ¶
Index ¶
- Variables
- func AESGCM(psk []byte) (cipherCreateFunc, error)
- func Chacha20Poly1305(psk []byte) (cipherCreateFunc, error)
- type PacketShadowsocks
- type Shadowsocks
- func (s *Shadowsocks) Cipher() proxy.Cipher
- func (s *Shadowsocks) ShadowPacketConn(c net.PacketConn, extra ...any) (conn.ProxyPacketConn, error)
- func (s *Shadowsocks) ShadowStreamConn(c net.Conn, extra ...any) (conn.ProxyStreamConn, error)
- func (s *Shadowsocks) TcpMux() bool
- func (s *Shadowsocks) Type() proxy.ProxyType
- type StreamShadowsocks
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 AESGCM ¶
AESGCM creates a new Cipher with a pre-shared key. len(psk) must be one of 16, 24, or 32 to select AES-128/196/256-GCM.
func Chacha20Poly1305 ¶
Chacha20Poly1305 creates a new Cipher with a pre-shared key. len(psk) must be 32.
Types ¶
type PacketShadowsocks ¶
type PacketShadowsocks struct { Shadowsocks net.PacketConn // contains filtered or unexported fields }
func (*PacketShadowsocks) Metadata ¶
func (p *PacketShadowsocks) Metadata() *message.Metadata
func (*PacketShadowsocks) ReadMsgFrom ¶
func (*PacketShadowsocks) WriteMsgTo ¶
type Shadowsocks ¶
type Shadowsocks struct {
// contains filtered or unexported fields
}
func NewProxyShadowsocks ¶
func NewProxyShadowsocks(mode int, password, cipher, key string, udp bool) (*Shadowsocks, error)
func (*Shadowsocks) Cipher ¶
func (s *Shadowsocks) Cipher() proxy.Cipher
func (*Shadowsocks) ShadowPacketConn ¶
func (s *Shadowsocks) ShadowPacketConn(c net.PacketConn, extra ...any) (conn.ProxyPacketConn, error)
func (*Shadowsocks) ShadowStreamConn ¶
func (s *Shadowsocks) ShadowStreamConn(c net.Conn, extra ...any) (conn.ProxyStreamConn, error)
func (*Shadowsocks) TcpMux ¶
func (s *Shadowsocks) TcpMux() bool
func (*Shadowsocks) Type ¶
func (s *Shadowsocks) Type() proxy.ProxyType
type StreamShadowsocks ¶
type StreamShadowsocks struct { Shadowsocks net.Conn // contains filtered or unexported fields }
func (*StreamShadowsocks) Metadata ¶
func (s *StreamShadowsocks) Metadata() *message.Metadata
Click to show internal directories.
Click to hide internal directories.