gqclient

package
v0.0.0-...-392571f Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

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 MakeRandomField

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) []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