share

package
v0.0.0-...-5fb5acb Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const InterfacePrefix = "dyn"

Variables

View Source
var (
	Logger *zap.Logger
)

Functions

func AddrAddArr

func AddrAddArr(i int, k ...string) error

func CheckFolder

func CheckFolder(folder string) error

Check folder is exist or not if not, create the folder

func CheckKernelFouCapability

func CheckKernelFouCapability() error

func ConnectionTimeout

func ConnectionTimeout(conn *net.Conn, s int, q *chan bool)

func Err

func Err(err error)

err!=nil

func FouAdd

func FouAdd(p int) error

func FouDel

func FouDel(p int) error

func IniVal

func IniVal(text, key string) string

Get ini value from string

func InitLogger

func InitLogger(logfile string, level uint8)

Start the logger

func InterfaceAdd

func InterfaceAdd(id int, sourcePort int, remote string, destinationPort int, MTU int) error

func InterfaceDel

func InterfaceDel(id int) error

func InterfaceName

func InterfaceName(clientid int) string

func IsInterfacesExist

func IsInterfacesExist(iface int) bool

func LogDefer

func LogDefer()

func NewOTK

func NewOTK(password string) string

func NewReader

func NewReader(conn *net.Conn, i int, pC chan []byte, errC chan error)

func OTKCheck

func OTKCheck(otk, password string) bool

func PortGenerate

func PortGenerate() int

func UDPPortCheck

func UDPPortCheck(port int) error

Types

type Env

type Env []string

func (Env) Exec

func (e Env) Exec(Command string, arg ...string) (string, string)

Jump to

Keyboard shortcuts

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