gstunnellib

package
v5.3.13 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const Info_protobuf bool = true
View Source
const Version string = gsbase.Version

Variables

This section is empty.

Functions

func ChangeCryKey_send

func ChangeCryKey_send(dst net.Conn, apack GsPack, ChangeCryKey_Total *int, wlent *int64) error

func CheckErrorEx

func CheckErrorEx(err error, inlogger *log.Logger)

func CreateFileLogger

func CreateFileLogger(FileName string) *log.Logger

func Find0

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

func IsTheVersionConsistent_send

func IsTheVersionConsistent_send(dst net.Conn, apack GsPack, wlent *int64) error

func Nullprint

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

func Nullprintf

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

func Panic_exit

func Panic_exit(inlog *log.Logger)

func RunGRuntimeStatistics_print

func RunGRuntimeStatistics_print(inlog *log.Logger, inruntstats Runtime_statistics)

Types

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_rand

func (gs *GsConfig) GetServer_rand() string

func (*GsConfig) GetServers

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

type GsPack

type GsPack interface {
	Packing(data []byte) []byte
	Unpack(data []byte) ([]byte, error)

	ChangeCryKey() []byte
	IsTheVersionConsistent() []byte
}

func NewGsPack

func NewGsPack(key string) GsPack

type Runtime_statistics

type Runtime_statistics interface {
	//	AddTotalNetworkData(int)
	AddSrcTotalNetData_recv(int)
	AddSrcTotalNetData_send(int)
	AddServerTotalNetData_recv(int)
	AddServerTotalNetData_send(int)

	GetJson() ([]byte, error)
}

func NewRuntimeStatistics

func NewRuntimeStatistics() Runtime_statistics

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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