gstunnellib

package
v3.8.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

* *Open source agreement: * The project is based on the GPLv3 protocol. *

Index

Constants

View Source
const (
	POBegin        uint8 = 0
	POGenOper      uint8 = 1
	POChangeCryKey uint8 = 2
	POVersion      uint8 = 3
	POEnd          uint8 = 4
)
View Source
const Version string = "V3.8"

Variables

View Source
var Logger *log.Logger

Functions

func CheckError

func CheckError(err error)

func CreateFileLogger

func CreateFileLogger(FileName string) *log.Logger

func CreatePackOperChangeKey

func CreatePackOperChangeKey() *packOper

func CreatePackOperGen

func CreatePackOperGen(data []byte) *packOper

func CreatePackOperGen_po1

func CreatePackOperGen_po1(data []byte) *packOper_1

func CreatePackOperVersion

func CreatePackOperVersion() *packOper

func Find0

func Find0(v1 []byte) (int, bool)

func GetKey

func GetKey(Data []byte) []byte

func GetRDBytes

func GetRDBytes(byteLen int) []byte

func GetRDCBytes

func GetRDCBytes(byteLen int) []byte

func GetRDCInt64

func GetRDCInt64() int64

func GetRDCInt8

func GetRDCInt8() int8

func GetRDCInt_max

func GetRDCInt_max(max int64) int64

func GetRDCbyte

func GetRDCbyte() byte

func GetRDF64

func GetRDF64() float64

func GetRDInt16

func GetRDInt16() int16

func GetRDInt32

func GetRDInt32() int32

func GetRDInt64

func GetRDInt64() int64

func GetRDInt8

func GetRDInt8() int8

func GetSha256Hex

func GetSha256Hex(data []byte) string

func GetSha256_32bytes

func GetSha256_32bytes(data []byte) [32]byte

func GetSha256_old_po1

func GetSha256_old_po1(po *packOper_1) string

func Int32ToBytes

func Int32ToBytes(i32 int32) []byte

func Int64ToBytes

func Int64ToBytes(data int64) []byte

func Intu8ToBytes

func Intu8ToBytes(v uint8) []byte

func IsChangeCryKey

func IsChangeCryKey(Data []byte) bool

func IsPOGen

func IsPOGen(Data []byte) bool

func IsPOVersion

func IsPOVersion(Data []byte) bool

func Nullprint

func Nullprint(v ...interface{}) (int, error)

func Nullprintf

func Nullprintf(format string, a ...interface{}) (n int, err error)

func UnPack_Oper

func UnPack_Oper(data []byte) *packOper

Types

type Aes

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

func CreateAes

func CreateAes(key string) Aes

type Aespack

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

func CreateAesPack

func CreateAesPack(key string) Aespack

func (*Aespack) ChangeCryKey

func (ap *Aespack) ChangeCryKey() []byte

func (*Aespack) IsTheVersionConsistent

func (ap *Aespack) IsTheVersionConsistent() []byte

func (*Aespack) Packing

func (ap *Aespack) Packing(data []byte) []byte

func (*Aespack) Unpack

func (ap *Aespack) Unpack(data []byte) ([]byte, error)

type Gorou_status

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

func CreateGorouStatus

func CreateGorouStatus() *Gorou_status

func (*Gorou_status) IsOk

func (g *Gorou_status) IsOk() bool

func (*Gorou_status) SetClose

func (g *Gorou_status) SetClose()

func (*Gorou_status) SetOk

func (g *Gorou_status) SetOk()

type GsConfig

type GsConfig struct {
	Listen             string
	Servers            []string
	Key                string
	Debug              bool
	Tmr_display_time   int
	Tmr_changekey_time int
	Mt_model           bool
}

func CreateGsconfig

func CreateGsconfig(confn string) *GsConfig

func (*GsConfig) GetServer

func (gs *GsConfig) GetServer() string

func (*GsConfig) GetServers

func (gs *GsConfig) GetServers() []string

type GsConfig_1

type GsConfig_1 struct {
	Listen             string
	Server             string
	Key                string
	Debug              bool
	Tmr_display_time   int
	Tmr_changekey_time int
	Mt_model           bool
}

type Pack

type Pack struct {
	Data []byte
}

type PackRand

type PackRand struct {
	Pack
	Rand int64
}

Data, Rand

type PackRandHash

type PackRandHash struct {
	PackRand
	HashHex string
}

Data, Rand, HashHex

Jump to

Keyboard shortcuts

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