config

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 1 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 {
	// socks 代理监听地址
	SOCKSListen string `yaml:"socksListen,omitempty"`
	// http 代理监听地址
	HTTPListen string `yaml:"httpListen,omitempty"`
	// yeager入站代理
	Inbounds []*YeagerServer `yaml:"inbounds,omitempty"`
	// yeager出站代理
	Outbounds []YeagerClient `yaml:"outbounds,omitempty"`
	// 路由规则
	Rules []string `yaml:"rules,omitempty"`
	// verbose logging
	Verbose bool `yaml:"verbose,omitempty"`
	// expose runtime metrics for debugging and profiling, developers only
	Debug bool `yaml:"debug,omitempty"`
}

func Load added in v1.21.9

func Load(bs []byte) (Config, error)

Load read config from bytes

type TLS

type TLS struct {
	CertFile string `yaml:"certFile"`
	CertPEM  string `yaml:"certPEM,omitempty"`
	KeyFile  string `yaml:"keyFile"`
	KeyPEM   string `yaml:"keyPEM,omitempty"`
	CAFile   string `yaml:"caFile"`
	CAPEM    string `yaml:"caPEM,omitempty"`
}

type Transport

type Transport string
const (
	TransTCP  Transport = "tcp" // plain text
	TransGRPC Transport = "grpc"
	TransQUIC Transport = "quic"
)

type YeagerClient

type YeagerClient struct {
	Tag string `yaml:"tag"`
	// server address to be connected
	Address   string    `yaml:"address"`
	Transport Transport `yaml:"transport"`
	// unavailable when transport is tcp
	TLS TLS `yaml:"tls,omitempty"`

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

type YeagerServer

type YeagerServer struct {
	Listen    string    `yaml:"listen"`
	Transport Transport `yaml:"transport"`
	// unavailable when transport is tcp
	TLS TLS `yaml:"tls,omitempty"`
}

Jump to

Keyboard shortcuts

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