agent

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

Agent tunnels local socks stream to the server.

func NewAgent

func NewAgent(cfg *AgentConfig) (*Agent, error)

func (*Agent) CleanUp

func (a *Agent) CleanUp()

CleanUp stops the agent, and do cleanup work

func (*Agent) Run

func (a *Agent) Run() error

func (*Agent) Start

func (a *Agent) Start(ctx context.Context) error

Start starts the agent with retry mechanism

type AgentConfig

type AgentConfig struct {
	AuthKey       string // auth key when registering to the server
	ServerAddress string // server address, e.g. 127.0.0.1:443

	CaFile       string // ca file
	CertFile     string // cert file used in mtls
	KeyFile      string // key file used in mtls
	LocalAddress string // local address to listen on for local socks proxy service
	LockFile     string // lock file to prevent multiple agent instances
	LogFile      string
	LogLevel     string
	EnableTLS    bool // enable mtls
}

AgentConfig is the configuration of agent.

Jump to

Keyboard shortcuts

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