proxy

package
v0.0.0-...-e25560c Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeServer
	ModeClient
)

Variables

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

Functions

This section is empty.

Types

type Cipher

type Cipher interface {
	Encrypter(extra ...any) (Encrypter, error)
	Decrypter(extra ...any) (Decrypter, error)
}

type Decrypter

type Decrypter interface {
	Decrypt(ciphtext []byte, extra ...any) ([]byte, error)
}

type Encrypter

type Encrypter interface {
	Encrypt(planetext []byte, extra ...any) []byte
}

type Proxy

type Proxy interface {
	Cipher() Cipher
	ShadowStreamConn(c net.Conn, extra ...any) (conn.ProxyStreamConn, error)
	ShadowPacketConn(c net.PacketConn, extra ...any) (conn.ProxyPacketConn, error)
	Type() ProxyType
	// tcpmux implys whether many different msgs within a connection
	TcpMux() bool
}

Proxy reads out and write in message in []byte binary format

type ProxyType

type ProxyType string
const (
	TypeNone        ProxyType = "NONE"
	TypeShadowsocks ProxyType = "SHADOWSOCKS"
	TypeSocks       ProxyType = "SOCKS"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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