agent

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTCPAgentTunHandler

func NewTCPAgentTunHandler(a *Agent) tun.Handler

Types

type Agent

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

Agent for connecting remote tcp server

func New

func New(opts ...Option) *Agent

New create a new Endpoint

func (*Agent) Serve

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

Serve starts agent

type AgentTunHandlerNewer

type AgentTunHandlerNewer func(p *Agent) tun.Handler

type Option

type Option func(opts *Options)

Option is option setter for agent

func WithEnabledExecute added in v1.2.0

func WithEnabledExecute(enabled bool) Option

WithEnabledExecute sets enabled execute opt

func WithTunClient

func WithTunClient(client tun.Client) Option

WithTunClient sets tunnel client opt for reverse mode

func WithTunCrypt

func WithTunCrypt(crypt crypt.Crypt) Option

WithTunCrypt sets tunnel crypt opt

func WithTunHandlerNewer

func WithTunHandlerNewer(newer AgentTunHandlerNewer) Option

WithTunHandlerNewer sets tunnel handler newer opt

func WithTunServer

func WithTunServer(server tun.Server) Option

WithTunServer sets tunnel server opt for normal mode

type Options

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

Options is the options of endpoint

Jump to

Keyboard shortcuts

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