ctrl

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ExtraSocksName = "xtray_runner"
	KtrlSocksName  = "xtray_ktrl"
	XtrayOK        = "ok"
)
View Source
const (
	KeeperSocksName = "xtray_keeper"
)

Variables

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

Functions

This section is empty.

Types

type XKeeper

type XKeeper struct {
	Conf *conf.Conf
	Cron *cron.Cron
	// contains filtered or unexported fields
}

func NewXKeeper

func NewXKeeper(cnf *conf.Conf, runner *XRunner) *XKeeper

func (*XKeeper) PingKeeper

func (that *XKeeper) PingKeeper() bool

func (*XKeeper) Run

func (that *XKeeper) Run()

func (*XKeeper) SendQuitSig

func (that *XKeeper) SendQuitSig() string

type XRunner

type XRunner struct {
	Client     *client.XClient
	Verifier   *proxy.Verifier
	XKeeper    *XKeeper
	Conf       *conf.Conf
	Cron       *cron.Cron
	ExtraSocks string
	KtrlSocks  string
	Ktrl       *goktrl.Ktrl
	// contains filtered or unexported fields
}

func NewXRunner

func NewXRunner(cnf *conf.Conf) (r *XRunner)

func (*XRunner) CtrlServer

func (that *XRunner) CtrlServer()

func (*XRunner) CtrlShell

func (that *XRunner) CtrlShell()

func (*XRunner) GetGeoInfo

func (that *XRunner) GetGeoInfo() (fgeoip, fgeosite string)

func (*XRunner) PingXtray

func (that *XRunner) PingXtray() bool

func (*XRunner) RegisterKeeper

func (that *XRunner) RegisterKeeper(keeper *exec.Cmd)

func (*XRunner) RegisterStarter

func (that *XRunner) RegisterStarter(starter *exec.Cmd)

func (*XRunner) Restart

func (that *XRunner) Restart(idx int) (result string)

func (*XRunner) Start

func (that *XRunner) Start()

func (*XRunner) Stop

func (that *XRunner) Stop()

func (*XRunner) SwitchyOmega

func (that *XRunner) SwitchyOmega() (omegaPath string)

Jump to

Keyboard shortcuts

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