gqclient

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: GPL-3.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BtoInt

func BtoInt(b []byte) int

BtoInt converts a byte slice into int in Big Endian order Uint methods from binary package can be used, but they are messy

func CryptoRandBytes

func CryptoRandBytes(length int) (ret []byte)

CryptoRandBytes generates a byte slice filled with cryptographically secure random bytes

func MakeRandomField added in v1.0.0

func MakeRandomField(sta *State) []byte

MakeRandomField makes the random value that can pass the check at server side

func PsudoRandBytes

func PsudoRandBytes(length int, seed int64) (ret []byte)

PsudoRandBytes returns a byte slice filled with psudorandom bytes generated by the seed

func ReadTillDrain

func ReadTillDrain(conn net.Conn, buffer []byte) (n int, err error)

ReadTillDrain reads TLS data according to its record layer

Types

type State

type State struct {
	SS_LOCAL_HOST  string
	SS_LOCAL_PORT  string
	SS_REMOTE_HOST string
	SS_REMOTE_PORT string
	Now            func() time.Time
	Opaque         int
	Key            string
	TicketTimeHint int
	AESKey         []byte
	ServerName     string
	Browser        string
}

State stores global variables

func (*State) ParseConfig

func (sta *State) ParseConfig(config string) (err error)

ParseConfig parses the config (either a path to json or Android config) into a State variable

func (*State) SetAESKey

func (sta *State) SetAESKey()

SetAESKey calculates the SHA256 of the string key

Directories

Path Synopsis
Firefox 58
Firefox 58

Jump to

Keyboard shortcuts

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