ssr

package
v0.0.0-...-cca48ee Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 2 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")
	ErrAuthAES128HMACError                 = errors.New("auth_aes128_* post decrypt hmac error")
	ErrAuthAES128DataLengthError           = errors.New("auth_aes128_* post decrypt length mismatch")
	ErrAuthAES128IncorrectChecksum         = errors.New("auth_aes128_* post decrypt incorrect checksum")
	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, value uint32) uint32

func CheckAdler32

func CheckAdler32(input []byte, l int) bool

func CheckCRC32

func CheckCRC32(buffer []byte, length int) bool

func DoCalcCRC32

func DoCalcCRC32(input []byte, index int, length int, value uint32) uint32

func DoSetCRC32

func DoSetCRC32(buffer []byte, index int, length int)

func GetHeadSize

func GetHeadSize(data []byte, defaultValue int) int

func SetCRC32

func SetCRC32(buffer []byte, length int)

Types

type ServerInfoForObfs

type ServerInfoForObfs struct {
	Host      string
	Port      uint16
	Param     string
	IV        []byte
	IVLen     int
	RecvIV    []byte
	RecvIVLen int
	Key       []byte
	KeyLen    int
	HeadLen   int
	TcpMss    int
}

func (*ServerInfoForObfs) SetHeadLen

func (s *ServerInfoForObfs) SetHeadLen(data []byte, defaultValue int)

Jump to

Keyboard shortcuts

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