ssr

package
v0.3.1-beta.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ObfsHMACSHA1Len = 10

Variables

View Source
var (
	ErrAuthSHA1v4CRC32Error                = errors.New("auth_sha1_v4 post decrypt data crc32 error")
	ErrAuthSHA1v4DataLengthError           = errors.New("auth_sha1_v4 post decrypt data length error")
	ErrAuthSHA1v4IncorrectChecksum         = errors.New("auth_sha1_v4 post decrypt incorrect checksum")
	ErrAuthAES128IncorrectHMAC             = errors.New("auth_aes128_* post decrypt incorrect hmac")
	ErrAuthAES128DataLengthError           = errors.New("auth_aes128_* post decrypt length mismatch")
	ErrAuthChainDataLengthError            = errors.New("auth_chain_* post decrypt length mismatch")
	ErrAuthChainIncorrectHMAC              = errors.New("auth_chain_* post decrypt incorrect hmac")
	ErrAuthAES128IncorrectChecksum         = errors.New("auth_aes128_* post decrypt incorrect checksum")
	ErrAuthAES128PosOutOfRange             = errors.New("auth_aes128_* post decrypt pos out of range")
	ErrTLS12TicketAuthTooShortData         = errors.New("tls1.2_ticket_auth too short data")
	ErrTLS12TicketAuthHMACError            = errors.New("tls1.2_ticket_auth hmac verifying failed")
	ErrTLS12TicketAuthIncorrectMagicNumber = errors.New("tls1.2_ticket_auth incorrect magic number")
)

Functions

func CalcAdler32

func CalcAdler32(input []byte) uint32

func CalcCRC32

func CalcCRC32(input []byte, length int) uint32

func HmacMD5

func HmacMD5(key []byte, data []byte) []byte

func HmacSHA1

func HmacSHA1(key []byte, data []byte) []byte

func KDF

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

key-derivation function from original Shadowsocks

func MD5Sum

func MD5Sum(d []byte) []byte

func SHA1Sum

func SHA1Sum(d []byte) []byte

func SetCRC32

func SetCRC32(buffer []byte, length int)

Types

type Info

type Info struct {
	IVSize  int
	Key     []byte
	KeySize int
}

type ObfsInfo

type ObfsInfo struct {
	Info
	Host  string
	Port  uint16
	Param string
}

type Shift128plusContext

type Shift128plusContext struct {
	// contains filtered or unexported fields
}

func (*Shift128plusContext) InitFromBin

func (ctx *Shift128plusContext) InitFromBin(bin []byte)

func (*Shift128plusContext) InitFromBinDatalen

func (ctx *Shift128plusContext) InitFromBinDatalen(bin []byte, datalen int)

func (*Shift128plusContext) Next

func (ctx *Shift128plusContext) Next() uint64

Jump to

Keyboard shortcuts

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