cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: MIT Imports: 3 Imported by: 8

Documentation

Index

Constants

View Source
const (
	LISTEN_MODE  = 1
	CONNECT_MODE = 2
)
View Source
const (
	SOCKET_REUSE_METHOD = 1
	IPTABLES_METHOD     = 2
)

Variables

This section is empty.

Functions

func ParseArgs

func ParseArgs()

ParseArgs is a function aim to parse the command line args

Types

type Option

type Option struct {
	LocalPort  int
	LocalIP    string
	RemoteIP   string
	RemotePort int
	ReusedPort int
	// 0 默认值,表示参数解析错误,无法设置模式
	// mode 1 listen a local port
	// mode 2 connect to remote port
	Mode int
	// 端口复用方法
	// 1 通过SO_REUSEADDR、SO_REUSEPORT进行端口复用
	// 2 通过iptables端口复用
	PortReuseMethod int

	Password string
}
var Args Option

Args

Jump to

Keyboard shortcuts

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