core

package
v0.0.0-...-1ef5823 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClosedErr = errors.New("shadow has been closed")

Functions

func Kdf

func Kdf(password string, keyLen int) []byte

Kdf from https://github.com/shadowsocks/go-shadowsocks2/blob/ef4b562095a69750509f82d3f82fc8e6dad50c6e/core/cipher.go key-derivation function from original Shadowsocks

Types

type Tunnel

type Tunnel interface {
	// Shadow Get a decrypted channel, read and write will be automatically encrypted and decrypted
	Shadow(rw io.ReadWriteCloser) (io.ReadWriteCloser, error)
	Unpack(dst []byte, data []byte) (int, error)
	Pack(dst []byte, data []byte) (int, error)
}

type TunnelProvider

type TunnelProvider interface {
	Name() string
	New(password string) Tunnel
}

Jump to

Keyboard shortcuts

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