cipher

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MethodNone = "none"

Variables

View Source
var (
	ErrMissingPassword = E.New("missing password")
	ErrPacketTooShort  = E.New("packet too short")
)

Functions

func RegisterMethod

func RegisterMethod(methods []string, creator MethodCreator)

Types

type Method

type Method interface {
	DialConn(conn net.Conn, destination M.Socksaddr) (net.Conn, error)
	DialEarlyConn(conn net.Conn, destination M.Socksaddr) net.Conn
	DialPacketConn(conn net.Conn) N.NetPacketConn
}

func CreateMethod

func CreateMethod(ctx context.Context, methodName string, options MethodOptions) (Method, error)

type MethodCreator

type MethodCreator func(ctx context.Context, methodName string, options MethodOptions) (Method, error)

type MethodOptions

type MethodOptions struct {
	Password string
	Key      []byte
	KeyList  [][]byte
}

Jump to

Keyboard shortcuts

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