ctrld_library

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCallback

type AppCallback interface {
	Hostname() string
	LanIp() string
	MacAddress() string
	Exit(error string)
}

AppCallback provides access to app instance.

type Controller

type Controller struct {
	AppCallback AppCallback
	Config      cli.AppConfig
	// contains filtered or unexported fields
}

Controller holds global state

func NewController

func NewController(appCallback AppCallback) *Controller

NewController provides reference to global state to be managed by android vpn service and iOS network extension. reference is not safe for concurrent use.

func (*Controller) IsRunning

func (c *Controller) IsRunning() bool

func (*Controller) Start

func (c *Controller) Start(CdUID string, HomeDir string, UpstreamProto string, logLevel int, logPath string)

Start configures utility with config.toml from provided directory. This function will block until Stop is called Check port availability prior to calling it.

func (*Controller) Stop

func (c *Controller) Stop(restart bool, pin int64) int

Jump to

Keyboard shortcuts

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