ctrld_library

package
v1.3.11 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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