config

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SOCKSListen   string         `yaml:"socksListen,omitempty"`
	HTTPListen    string         `yaml:"httpListen,omitempty"`
	TunnelListens []TunnelListen `yaml:"tunnelListens,omitempty"`
	TunnelClients []TunnelClient `yaml:"tunnelClients,omitempty"`
	Rules         []string       `yaml:"rules,omitempty"`
	// verbose logging
	Verbose bool `yaml:"verbose,omitempty"`
	// enable HTTP server for debugging and profiling, developers only
	Debug bool `yaml:"debug,omitempty"`
}

type TunnelClient added in v1.26.0

type TunnelClient struct {
	Type    TunnelType `yaml:"type"`
	Policy  string     `yaml:"policy"`
	Address string     `yaml:"address"` // target server address

	// the TLS config is unavailable when the tunnel server is plain TCP
	CertFile string `yaml:"certFile,omitempty"`
	CertPEM  string `yaml:"certPEM,omitempty"`
	KeyFile  string `yaml:"keyFile,omitempty"`
	KeyPEM   string `yaml:"keyPEM,omitempty"`
	CAFile   string `yaml:"caFile,omitempty"`
	CAPEM    string `yaml:"caPEM,omitempty"`

	// optional
	ConnectionPoolSize int `yaml:"connectionPoolSize,omitempty"`
}

type TunnelListen added in v1.26.0

type TunnelListen struct {
	Type   TunnelType `yaml:"type"`
	Listen string     `yaml:"listen"`
	// the TLS config is unavailable when the tunnel server is plain TCP
	CertFile string `yaml:"certFile,omitempty"`
	CertPEM  string `yaml:"certPEM,omitempty"`
	KeyFile  string `yaml:"keyFile,omitempty"`
	KeyPEM   string `yaml:"keyPEM,omitempty"`
	CAFile   string `yaml:"caFile,omitempty"`
	CAPEM    string `yaml:"caPEM,omitempty"`
}

type TunnelType added in v1.26.0

type TunnelType string
const (
	TunTCP  TunnelType = "tcp" // plain text
	TunGRPC TunnelType = "grpc"
	TunQUIC TunnelType = "quic"
)

Jump to

Keyboard shortcuts

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