commands

package
v2.12.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtoName_OpenVPN   = "OpenVPN"
	ProtoName_WireGuard = "WireGuard"
)

Variables

This section is empty.

Functions

func GetAntitrackerIP

func GetAntitrackerIP(isHardcore, isMultihop bool, servers *apitypes.ServersInfoResponse) (string, error)

GetAntitrackerIP - returns IP of antitracker DNS

func Initialize

func Initialize(proto *protocol.Client)

Initialize initializes commands. Must be called before using any command.

func IsAntiTrackerIP

func IsAntiTrackerIP(dns string, servers *apitypes.ServersInfoResponse) (antitracker, antitrackerHardcore bool)

IsAntiTrackerIP returns info 'is this IP equals to antitracker IP'

func PrintTip

func PrintTip(w *tabwriter.Writer, tip TipType)

func PrintTips

func PrintTips(tips []TipType)

Types

type CmdAccount

type CmdAccount struct {
	flags.CmdInfo
}

func (*CmdAccount) Init

func (c *CmdAccount) Init()

func (*CmdAccount) Run

func (c *CmdAccount) Run() error

type CmdAntitracker

type CmdAntitracker struct {
	flags.CmdInfo
	// contains filtered or unexported fields
}

func (*CmdAntitracker) Init

func (c *CmdAntitracker) Init()

func (*CmdAntitracker) Run

func (c *CmdAntitracker) Run() error

type CmdConnect

type CmdConnect struct {
	flags.CmdInfo
	// contains filtered or unexported fields
}

func (*CmdConnect) Init

func (c *CmdConnect) Init()

func (*CmdConnect) Run

func (c *CmdConnect) Run() (retError error)

type CmdDisconnect

type CmdDisconnect struct {
	flags.CmdInfo
}

func (*CmdDisconnect) Init

func (c *CmdDisconnect) Init()

func (*CmdDisconnect) Run

func (c *CmdDisconnect) Run() error

type CmdDns

type CmdDns struct {
	flags.CmdInfo
	// contains filtered or unexported fields
}

func (*CmdDns) Init

func (c *CmdDns) Init()

func (*CmdDns) Run

func (c *CmdDns) Run() error

type CmdFirewall

type CmdFirewall struct {
	flags.CmdInfo
	// contains filtered or unexported fields
}

func (*CmdFirewall) Init

func (c *CmdFirewall) Init()

func (*CmdFirewall) Run

func (c *CmdFirewall) Run() error

type CmdLogin

type CmdLogin struct {
	flags.CmdInfo
	// contains filtered or unexported fields
}

----------------------------------------------------------------------------------------

func (*CmdLogin) Init

func (c *CmdLogin) Init()

func (*CmdLogin) Run

func (c *CmdLogin) Run() error

type CmdLogout

type CmdLogout struct {
	flags.CmdInfo
}

func (*CmdLogout) Init

func (c *CmdLogout) Init()

func (*CmdLogout) Run

func (c *CmdLogout) Run() error

type CmdLogs

type CmdLogs struct {
	flags.CmdInfo
	// contains filtered or unexported fields
}

func (*CmdLogs) Init

func (c *CmdLogs) Init()

func (*CmdLogs) Run

func (c *CmdLogs) Run() error

type CmdServers

type CmdServers struct {
	flags.CmdInfo
	// contains filtered or unexported fields
}

func (*CmdServers) Init

func (c *CmdServers) Init()

func (*CmdServers) Run

func (c *CmdServers) Run() error

type CmdState

type CmdState struct {
	flags.CmdInfo
}

func (*CmdState) Init

func (c *CmdState) Init()

func (*CmdState) Run

func (c *CmdState) Run() error

type CmdWireGuard

type CmdWireGuard struct {
	flags.CmdInfo
	// contains filtered or unexported fields
}

func (*CmdWireGuard) Init

func (c *CmdWireGuard) Init()

func (*CmdWireGuard) Run

func (c *CmdWireGuard) Run() error

type NotImplemented

type NotImplemented struct {
	Message string
}

NotImplemented error

func (NotImplemented) Error

func (e NotImplemented) Error() string

type TipType

type TipType uint
const (
	TipHelp            TipType = iota
	TipHelpFull        TipType = iota
	TipHelpCommand     TipType = iota
	TipLogout          TipType = iota
	TipLogin           TipType = iota
	TipForceLogin      TipType = iota
	TipServers         TipType = iota
	TipConnectHelp     TipType = iota
	TipDisconnect      TipType = iota
	TipFirewallDisable TipType = iota
	TipFirewallEnable  TipType = iota
	TipLastConnection  TipType = iota
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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