Documentation ¶
Index ¶
Constants ¶
View Source
const ( Windows = 7 DoH = "DoH" DoT = "DoT" DNSCrypt = "DNSCrypt" )
View Source
const ( Well_Known_Tag_NO_PROXY = "NO-PROXY" // intranet Well_Known_Tag_HTTP_USE_GET = "HTTP-USE-GET" Well_Known_Tag_DNS_BOOST_GROUP = "DNS-BOOST-GROUP" // shared across all servers Well_Known_Tag_DNSSEC_PRIME_GROUP = "DNSSEC-PRIME-GROUP" // shared across all servers Well_Known_Tag_DNSCRPT_OBTAIN_FAST_KEY = "DNSCRPT-OBTAIN-FAST-KEY" // works with cfg:credentialpath when import_credential=false Well_Known_Tag_TIMEOUT1 = "TIMEOUT1" //1s Well_Known_Tag_TIMEOUT2 = "TIMEOUT2" //2s Well_Known_Tag_TIMEOUT3 = "TIMEOUT3" //3s )
Predefined Well-known Tag Name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnonymizedDNSConfig ¶
type AnonymizedDNSConfig struct {
Routes []AnonymizedDNSRouteConfig `toml:"routes"`
}
type Config ¶
type Config struct { ServerNames []string `toml:"enabled_server_names"` // temporary filter of names DisabledServerNames []string `toml:"disabled_server_names"` // temporary filter of names DnscryptTCP bool `toml:"dnscrypt_use_tcp"` // parameter for dnscrypt protocol Bootstrap bool `toml:"bootstrap"` // allow bootstrap; no ip address TLSDisableSessionTickets bool `toml:"tls_disable_session_tickets"` // parameter for (doh/dot)tls protocol Timeout int `toml:"timeout"` // parameter for communication protocol KeepAlive int `toml:"keepalive"` // parameter for communication protocol MaxUpstreams uint32 `toml:"max_concurrent_upstreams"` // simultaneous outgoing dns query directly by downstreams ExportCredentialPath string `toml:"credentialpath"` // export persistence credential file ImportCredential bool `toml:"import_credential"` // load persistence credential file when startup and skip seeking public key(dnscrypt) if valid till now FetchInterval int `toml:"interval"` // to fetch public key of dnscrypt or determine connectivity to the upstreams; 0>=no_interval FetchAtLeastTwo bool `toml:"at_least_one_or_two"` // keep fetching without interval until one(n=1) or two(n>1) nodes are available NoMetrics bool `toml:"no_metrics"` // lock free; useful at low hardware conditions }
type ListenerConfiguration ¶
type NodesMgr ¶
type NodesMgr struct { *conceptions.SemaGroup metrics.RTT L2NMapping *[]*ListenerConfiguration // mapping between listeners and nodes Tags *map[string]map[string]interface{} //key:tag values:servers SP func(*channels.Session) SPNoIPv6 *bool Ready chan interface{} // contains filtered or unexported fields }
A simple node manager across all servers
func (*NodesMgr) Init ¶
func (mgr *NodesMgr) Init(cfg *Config, routes *AnonymizedDNSConfig, sum []byte, servers, relays, proxies map[string]*common.RegisteredServer, globalproxy *conceptions.NestedProxy, ifi *string)
type SourceConfig ¶
type SourceConfig struct { URL string //faker for fun URLs []string //faker for fun Prefix string //of names MinisignKeyStr string `toml:"minisign_key"` CacheFile string `toml:"cache_file"` FormatStr string `toml:"format"` //dummy of creation RefreshDelay int `toml:"refresh_delay"` //faker for fun }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.