config

package
v1.26.4 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate added in v1.26.3

func Generate(ip, srvConfOutput, cliConfOutput string) error

Generate generates the corrensponding client and server config file

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"`
	// developer only: enable debug logging, start HTTP server for profiling
	Debug bool `yaml:"debug,omitempty"`
}

func Pair added in v1.26.3

func Pair(host string) (srv, cli Config, err error)

Pair make a pair of client and server config

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

	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"`
	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 (
	TunGRPC TunnelType = "grpc"
	TunQUIC TunnelType = "quic"
)

Jump to

Keyboard shortcuts

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