Documentation
¶
Index ¶
- type Config
- type DnsOption
- type Domain
- type DomainKeyword
- type DomainSuffix
- type GeoIP
- type GrpcOption
- type IPCidr
- type LocalConfig
- type LogConfig
- type Match
- type MitmFakeCertPool
- type MitmOption
- type ObfsOption
- type QuicOption
- type Rules
- type SSROption
- type ServerConfig
- type SshOption
- type TlsOption
- type TunOption
- type WsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Server []*ServerConfig `yaml:"server,omitempty" json:"server,omitempty"`
Local *LocalConfig `yaml:"local,omitempty" json:"local,omitempty"`
Log *LogConfig `yaml:"log,omitempty" json:"log,omitempty"`
Iface string `yaml:"iface,omitempty" json:"iface,omitempty"`
AutoDetectIface bool `yaml:"auto_detect_iface,omitempty" json:"auto_detect_iface,omitempty"`
Rules *Rules `yaml:"rules,omitempty" json:"rules,omitempty"`
}
func ParseConfigFile ¶
func (*Config) BuildLocalOptions ¶
func (*Config) BuildRuler ¶
func (*Config) BuildSSLocalOptions ¶
func (*Config) BuildServerOptions ¶
func (*Config) DeleteServerConfig ¶
type DomainKeyword ¶
type DomainSuffix ¶
type GrpcOption ¶
type LocalConfig ¶
type LocalConfig struct {
SocksAddr string `yaml:"socks_addr,omitempty" json:"socks_addr,omitempty"`
HTTPAddr string `yaml:"http_addr,omitempty" json:"http_addr,omitempty"`
SocksAuth string `yaml:"socks_auth,omitempty" json:"socks_auth,omitempty"`
HTTPAuth string `yaml:"http_auth,omitempty" json:"http_auth,omitempty"`
MixedAddr string `yaml:"mixed_addr,omitempty" json:"mixed_addr,omitempty"`
TCPTunAddr []string `yaml:"tcp_tun_addr,omitempty" json:"tcp_tun_addr,omitempty"`
SystemProxy bool `yaml:"system_proxy,omitempty" json:"system_proxy,omitempty"`
Mitm *MitmOption `yaml:"mitm,omitempty" json:"mitm,omitempty"`
Tun *TunOption `yaml:"tun,omitempty" json:"tun,omitempty"`
DNS *DnsOption `yaml:"dns,omitempty" json:"dns,omitempty"`
}
type Match ¶
type Match struct {
Others string `yaml:"others,omitempty" json:"others,omitempty"`
Domains []*Domain `yaml:"domain,omitempty" json:"domain,omitempty"`
DomainKeywords []*DomainKeyword `yaml:"domain_keyword,omitempty" json:"domain_keyword,omitempty"`
DomainSuffixs []*DomainSuffix `yaml:"domain_suffix,omitempty" json:"domain_suffix,omitempty"`
GeoIPs []*GeoIP `yaml:"geoip,omitempty" json:"geoip,omitempty"`
IPCidrs []*IPCidr `yaml:"ipcidr,omitempty" json:"ipcidr,omitempty"`
}
type MitmFakeCertPool ¶
type MitmOption ¶
type MitmOption struct {
Enable bool `yaml:"enable" json:"enable"`
Proxy string `yaml:"proxy" json:"proxy"`
CAPath string `yaml:"ca_path" json:"ca_path"`
KeyPath string `yaml:"key_path" json:"key_path"`
FakeCertPool *MitmFakeCertPool `yaml:"fake_cert_pool" json:"fake_cert_pool"`
}
type ObfsOption ¶
type ObfsOption struct {
Host string `yaml:"host,omitempty" json:"host,omitempty"`
}
type QuicOption ¶
type QuicOption struct {
Conns int `yaml:"conns" json:"conns"`
KeepAlive int `yaml:"keep_alive" json:"keep_alive"`
MaxIdleTimeout int `yaml:"max_idle_timeout" json:"max_idle_timeout"`
HandshakeIdleTimeout int `yaml:"handshake_idle_timeout" json:"handshake_idle_timeout"`
TLS TlsOption `yaml:"tls,omitempty" json:"tls,omitempty"`
}
type ServerConfig ¶
type ServerConfig struct {
Disable bool `yaml:"disable,omitempty" json:"disable,omitempty"`
Type string `yaml:"type,omitempty" json:"type,omitempty"`
Name string `yaml:"name" json:"name"`
Addr string `yaml:"addr" json:"addr"`
Password string `yaml:"password" json:"password"`
Method string `yaml:"method" json:"method"`
Transport string `yaml:"transport" json:"transport"`
Udp bool `yaml:"udp,omitempty" json:"udp,omitempty"`
Ws *WsOption `yaml:"ws,omitempty" json:"ws,omitempty"`
Obfs *ObfsOption `yaml:"obfs,omitempty" json:"obfs,omitempty"`
Quic *QuicOption `yaml:"quic,omitempty" json:"quic,omitempty"`
Grpc *GrpcOption `yaml:"grpc,omitempty" json:"grpc,omitempty"`
Ssh *SshOption `yaml:"ssh,omitempty" json:"ssh,omitempty"`
SSR *SSROption `yaml:"ssr,omitempty" json:"ssr,omitempty"`
}
type TlsOption ¶
type TlsOption struct {
// tls or mtls
Mode string `yaml:"mode,omitempty" json:"mode,omitempty"`
Hostname string `yaml:"hostname,omitempty" json:"hostname,omitempty"`
KeyPath string `yaml:"key_path,omitempty" json:"key_path,omitempty"`
CertPath string `yaml:"cert_path,omitempty" json:"cert_path,omitempty"`
CAPath string `yaml:"ca_path,omitempty" json:"ca_path,omitempty"`
}
type TunOption ¶
type TunOption struct {
Enable bool `yaml:"enable" json:"enable"`
Name string `yaml:"name" json:"name"`
Cidr string `yaml:"cidr" json:"cidr"`
Mtu int `yaml:"mtu" json:"mtu"`
AutoRoute bool `yaml:"auto_route" json:"auto_route"`
DnsHijack []string `yaml:"dns_hijack,omitempty" json:"dns_hijack,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.