proxy

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: GPL-3.0 Imports: 17 Imported by: 8

Documentation

Index

Constants

View Source
const (
	MaxPacketSize = 1024 * 8
)
View Source
const Name = "PROXY"

Variables

This section is empty.

Functions

func CreateClientStack added in v0.7.0

func CreateClientStack(ctx context.Context, clientStack []string) (tunnel.Client, error)

CreateClientStack create client tunnel stacks from lists

func CreateServerStack added in v0.7.0

func CreateServerStack(ctx context.Context, serverStack []string) (tunnel.Server, error)

CreateServerStack create server tunnel stack from list

func FindAllEndpoints added in v0.7.0

func FindAllEndpoints(root *Node) []tunnel.Server

func RegisterProxyCreator added in v0.7.0

func RegisterProxyCreator(name string, creator Creator)

Types

type Config added in v0.7.0

type Config struct {
	RunType  string `json:"run_type" yaml:"run-type"`
	LogLevel int    `json:"log_level" yaml:"log-level"`
	LogFile  string `json:"log_file" yaml:"log-file"`
}

type Creator added in v0.7.0

type Creator func(ctx context.Context) (*Proxy, error)

type Node added in v0.7.0

type Node struct {
	Name       string
	Next       map[string]*Node
	IsEndpoint bool
	context.Context
	tunnel.Server
	tunnel.Client
}

func (*Node) BuildNext added in v0.7.0

func (n *Node) BuildNext(name string) *Node

func (*Node) LinkNextNode added in v0.7.5

func (n *Node) LinkNextNode(next *Node) *Node

type Option added in v0.7.0

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

func (*Option) Handle added in v0.7.0

func (o *Option) Handle() error

func (*Option) Name added in v0.7.0

func (o *Option) Name() string

func (*Option) Priority added in v0.7.0

func (o *Option) Priority() int

type Proxy added in v0.7.0

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

Proxy relay connections and packets

func NewProxy

func NewProxy(ctx context.Context, cancel context.CancelFunc, sources []tunnel.Server, sink tunnel.Client) *Proxy

func NewProxyFromConfigData added in v0.7.0

func NewProxyFromConfigData(data []byte, isJSON bool) (*Proxy, error)

func (*Proxy) Close added in v0.7.0

func (p *Proxy) Close() error

func (*Proxy) Run added in v0.7.0

func (p *Proxy) Run() error

type StdinOption added in v0.8.0

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

func (*StdinOption) Handle added in v0.8.0

func (o *StdinOption) Handle() error

func (*StdinOption) Name added in v0.8.0

func (o *StdinOption) Name() string

func (*StdinOption) Priority added in v0.8.0

func (o *StdinOption) Priority() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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