proxy

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxyTunHandler added in v1.2.0

func NewProxyTunHandler(p *Proxy) tun.Handler

Types

type Option

type Option func(opts *Options)

Option is option setter for proxy

func WithConnectAddress

func WithConnectAddress(addr string) Option

WithConnectAddress sets remote agent connect address opt

func WithConnectPTY added in v1.2.0

func WithConnectPTY(args []string) Option

WithConnectPTY sets remote agent connect pty opt

func WithDownloadCounter

func WithDownloadCounter(counter counter.Counter) Option

WithDownloadCounter sets download counter opt

func WithDumpDir added in v1.1.0

func WithDumpDir(dir string) Option

WithDumpDir sets dump directory opt

func WithListenAddress

func WithListenAddress(addr string) Option

WithListenAddress sets local proxy listen address opt

func WithRawPTYMode added in v1.2.0

func WithRawPTYMode(rawPTYMode bool) Option

WithRawPTYMode sets raw pty mode opt

func WithTunClient

func WithTunClient(client tun.Client) Option

WithTunClient sets tunnel client opt

func WithTunCrypt

func WithTunCrypt(crypt crypt.Crypt) Option

WithTunCrypt sets tunnel crypt opt for normal mode

func WithTunHandlerNewer

func WithTunHandlerNewer(newer ProxyTunHandlerNewer) Option

WithTunHandlerNewer sets tunnel handler newer opt

func WithTunServer

func WithTunServer(server tun.Server) Option

WithTunServer sets tunnel server opt for reverse mode

func WithUploadCounter

func WithUploadCounter(counter counter.Counter) Option

WithUploadCounter sets upload counter opt

type Options

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

Options is options of proxy

type Proxy

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

Proxy for proxying remote tcp server to local address

func New

func New(opts ...Option) *Proxy

New create a new proxy

func (*Proxy) Serve

func (p *Proxy) Serve(ctx context.Context) error

Serve starts proxy

type ProxyTunHandlerNewer

type ProxyTunHandlerNewer func(p *Proxy) tun.Handler

Jump to

Keyboard shortcuts

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