Documentation ¶
Overview ¶
Package cmd is responsible for the program's command-line interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // DNSListenAddress is the IP address the DNS proxy server will be // listening to. DNSListenAddress string `long:"dns-address" description:"IP address that the DNS proxy server will be listening to." default:"0.0.0.0"` // DNSPort is the port the DNS proxy server will be listening to. DNSPort int `long:"dns-port" description:"Port the DNS proxy server will be listening to." default:"53"` // DNSUpstream is the address of the DNS server the proxy will forward // queries that are not rewritten to the SNI proxy. DNSUpstream string `` /* 148-byte string literal not displayed */ // DNSRedirectIPV4To is the IPv4 address of the SNI proxy domains will be // redirected to by rewriting responses to A queries. DNSRedirectIPV4To string `long:"dns-redirect-ipv4-to" description:"IPv4 address that will be used for redirecting type A DNS queries."` // DNSRedirectIPV6To is the IPv6 address of the SNI proxy domains will be // redirected to by rewriting responses to AAAA queries. If not set, the // program will try to automatically choose the public address of the SNI // proxy. DNSRedirectIPV6To string `long:"dns-redirect-ipv6-to" description:"IPv6 address that will be used for redirecting type AAAA DNS queries." default:""` // DNSRedirectRules is a list of wildcards that defines which domains // should be redirected to the SNI proxy. Can be specified multiple times. DNSRedirectRules []string `` /* 158-byte string literal not displayed */ // DNSDropRules is a list of wildcards that define queries to which domains // should be dropped. Can be specified multiple times. DNSDropRules []string `` /* 137-byte string literal not displayed */ // HTTPListenAddress is the IP address the HTTP proxy server will be // listening to. Note, that the HTTP proxy will work pretty much the same // way the SNI proxy works, i.e. it will tunnel traffic to the hostname // that was specified in the "Host" header. HTTPListenAddress string `` /* 129-byte string literal not displayed */ // HTTPPort is the port the HTTP proxy server will be listening to. HTTPPort int `long:"http-port" description:"Port the SNI proxy server will be listening for plain HTTP connections." default:"80"` // TLSListenAddress is the IP address the SNI proxy server will be // listening to. TLSListenAddress string `long:"tls-address" description:"IP address the SNI proxy server will be listening for TLS connections." default:"0.0.0.0"` // TLSPort is the port the SNI proxy server will be listening to. TLSPort int `long:"tls-port" description:"Port the SNI proxy server will be listening for TLS connections." default:"443"` // BandwidthRate is a number of bytes per second the connections speed will // be limited to. Note, that the speed is shared between all connections. // If not set, there is no limit. BandwidthRate float64 `` /* 137-byte string literal not displayed */ // BandwidthRules is a map that allows to define connection speed for // domains that match the wildcards. Has higher priority than // BandwidthRate. BandwidthRules map[string]float64 `` /* 177-byte string literal not displayed */ // ForwardProxy is the address of a SOCKS/HTTP/HTTPS proxy that the connections will // be forwarded to according to ForwardRules. ForwardProxy string `` /* 139-byte string literal not displayed */ // ForwardRules is a list of wildcards that define what connections will be // forwarded to ForwardProxy. If the list is empty and ForwardProxy is set, // all connections will be forwarded. ForwardRules []string `` /* 216-byte string literal not displayed */ // BlockRules is a list of wildcards that define connections to which hosts // will be blocked. BlockRules []string `` /* 134-byte string literal not displayed */ // DropRules is a list of wildcards that define connections to which hosts // will be "dropped". "Dropped" means that the connection will be delayed // for a hard-coded period of 3 minutes. DropRules []string `` /* 184-byte string literal not displayed */ // Verbose defines whether we should write the DEBUG-level log or not. Verbose bool `long:"verbose" description:"Verbose output (optional)" optional:"yes" optional-value:"true"` // LogOutput is the optional path to the log file. LogOutput string `long:"output" description:"Path to the log file. If not set, write to stdout."` }
Options represents console arguments.
Click to show internal directories.
Click to hide internal directories.