myss

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCipherNotSupported = errors.New("cipher not supported")

Functions

func Dial

func Dial(network, address string, ciph StreamConnCipher) (net.Conn, error)

func ListCipher

func ListCipher() []string

func Listen

func Listen(network, address string, ciph StreamConnCipher) (net.Listener, error)

func ListenPacket

func ListenPacket(network, address string, ciph PacketConnCipher) (net.PacketConn, error)

Types

type AeadCipher added in v1.0.2

type AeadCipher struct{ aeadstream.Cipher }

func (*AeadCipher) PacketConn added in v1.0.2

func (aead *AeadCipher) PacketConn(c net.PacketConn) net.PacketConn

func (*AeadCipher) StreamConn added in v1.0.2

func (aead *AeadCipher) StreamConn(c net.Conn) net.Conn

type Cipher

type Cipher interface {
	StreamConnCipher
	PacketConnCipher
}

func PickCipher

func PickCipher(name string, key []byte, password string) (Cipher, error)

PickCipher returns a Cipher of the given name. Derive key from password if given key is empty.

type PacketConnCipher

type PacketConnCipher interface {
	PacketConn(net.PacketConn) net.PacketConn
}

type StreamCipher added in v1.0.2

type StreamCipher struct{ ssstream.Cipher }

func (*StreamCipher) PacketConn added in v1.0.2

func (ciph *StreamCipher) PacketConn(c net.PacketConn) net.PacketConn

func (*StreamCipher) StreamConn added in v1.0.2

func (ciph *StreamCipher) StreamConn(c net.Conn) net.Conn

type StreamConnCipher

type StreamConnCipher interface {
	StreamConn(net.Conn) net.Conn
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL