Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProtoHTTP = "http" ProtoSOCKS5 = "socks5" ProtoGRPC = "grpc" ProtoHTTP2 = "h2" ProtoShadowsocks = "ss" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Listen []ServerConfig `json:"listen,omitempty"` // supports http, socks5, grpc and h2 protocols Transport []ServerConfig `json:"transport,omitempty"` // supports grpc, h2 and shadowsocks protocols // Bypass specifies a string that contains comma-separated values // specifying hosts that should be excluded from proxying. Each value is // represented by an IP address (1.2.3.4), an IP address in // CIDR notation (1.2.3.4/8), a domain name, or a special DNS label (*). // A domain name matches that name and all subdomains. // A single asterisk (*) indicates that no proxying should be done. // A best effort is made to parse the string and errors are ignored. Bypass string `json:"bypass,omitempty"` // Block specifies a string that contains comma-separated values // specifying hosts that should be blocked from proxying. // Block has priority over Bypass. Block string `json:"block,omitempty"` }
type ServerConfig ¶ added in v1.35.0
type ServerConfig struct { Protocol string `json:"protocol,omitempty"` Address string `json:"address,omitempty"` // for TLS CertPEM []string `json:"cert_pem,omitempty"` KeyPEM []string `json:"key_pem,omitempty"` CAPEM []string `json:"ca_pem,omitempty"` // for h2 Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` // for shadowsocks Cipher string `json:"cipher,omitempty"` Secret string `json:"secret,omitempty"` }
Click to show internal directories.
Click to hide internal directories.