config

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 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 {
	// 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"`
}

type TLS

type TLS struct {
	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 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