run

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 39 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ExtraSockName = "neobox_ping.sock"
	OkStr         = "ok"

	ProxyHistoryFile = ".proxy_history"
)
View Source
const (
	FromWireguard  string = "w"
	FromEdgetunnel string = "e"
	FromManually   string = "m"
)

index prefix for proxy

View Source
const (

	// restart cli options
	RestartShowProxy    string = "showproxy"
	RestartShowConfig   string = "showconfig"
	RestartUseDomain    string = "usedomain"
	RestartForceSingbox string = "forcesingbox"
)
View Source
const (
	NeoKeeperSockName = "neobox_keeper.sock"
)

Variables

View Source
var StopChan chan struct{} = make(chan struct{})

Functions

This section is empty.

Types

type IShell

type IShell struct {
	CNF *conf.NeoConf
	// contains filtered or unexported fields
}

func NewIShell

func NewIShell(cnf *conf.NeoConf) (s *IShell)

func (*IShell) InitKtrl

func (that *IShell) InitKtrl()

func (*IShell) PingServer

func (that *IShell) PingServer() (ok bool)

func (*IShell) PingVerifier

func (that *IShell) PingVerifier() (ok bool)

func (*IShell) Restart

func (that *IShell) Restart(ctx *ktrl.KtrlContext, optionStr ...string)

func (*IShell) SetRunner

func (that *IShell) SetRunner(runner *Runner)

func (*IShell) Start

func (that *IShell) Start()

func (*IShell) StartServer

func (that *IShell) StartServer()

func (*IShell) StartShell

func (that *IShell) StartShell()

type Keeper

type Keeper struct {
	CNF *conf.NeoConf
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cnf *conf.NeoConf) (k *Keeper)

func (*Keeper) GetStarter

func (that *Keeper) GetStarter() *exec.Cmd

func (*Keeper) PingKeeper

func (that *Keeper) PingKeeper() bool

func (*Keeper) SetRunner

func (that *Keeper) SetRunner(r *Runner)

func (*Keeper) SetStarter

func (that *Keeper) SetStarter(starter *exec.Cmd)

func (*Keeper) Start

func (that *Keeper) Start()

func (*Keeper) Stop

func (that *Keeper) Stop()

exit keeper

func (*Keeper) StopByRequest

func (that *Keeper) StopByRequest() string

type Runner

type Runner struct {
	CNF          *conf.NeoConf
	Client       client.IClient
	CurrentProxy *outbound.ProxyItem
	NextProxy    *outbound.ProxyItem
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(cnf *conf.NeoConf) (r *Runner)

func (*Runner) Current

func (that *Runner) Current() string

show current using proxy info

func (*Runner) DoesGeoInfoFileExist

func (that *Runner) DoesGeoInfoFileExist() bool

func (*Runner) DownloadGeoInfo

func (that *Runner) DownloadGeoInfo()

geoinfo files

func (*Runner) GetArgsFromHistory

func (that *Runner) GetArgsFromHistory() (args []string)

func (*Runner) GetKeeper

func (that *Runner) GetKeeper() *Keeper

keeper related

func (*Runner) GetKeeperStarter

func (that *Runner) GetKeeperStarter() *exec.Cmd

func (*Runner) GetProxyByIndex

func (that *Runner) GetProxyByIndex(idxStr string, useDomain ...bool) (p *outbound.ProxyItem)

func (*Runner) GetShell

func (that *Runner) GetShell() *IShell

func (*Runner) GetStarter

func (that *Runner) GetStarter() *exec.Cmd

func (*Runner) OpenShell

func (that *Runner) OpenShell()

shell related

func (*Runner) PingKeeper

func (that *Runner) PingKeeper() bool

func (*Runner) Restart

func (that *Runner) Restart(args ...string) (result string)

func (*Runner) SaveArgsToHistory

func (that *Runner) SaveArgsToHistory(args ...string)

func (*Runner) SetKeeperStarter

func (that *Runner) SetKeeperStarter(starter *exec.Cmd)

func (*Runner) SetStarter

func (that *Runner) SetStarter(starter *exec.Cmd)

daemon related

func (*Runner) Start

func (that *Runner) Start(args ...string)

start runner

func (*Runner) StartKeeper

func (that *Runner) StartKeeper()

func (*Runner) Stop

func (that *Runner) Stop()

exit runner

func (*Runner) StopKeeperByRequest

func (that *Runner) StopKeeperByRequest() string

Jump to

Keyboard shortcuts

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