Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPrefetchDelay time.Duration = 24 * time.Hour MinimumPrefetchInterval time.Duration = 6 * time.Hour )
View Source
const CFG_Channels_Main = "main"
View Source
const (
SourceFormatV2 = iota
)
Variables ¶
This section is empty.
Functions ¶
func ConfigLoad ¶
func ConfigLoad(proxy *dns.Proxy, flags *ConfigFlags) error
func PrintInferfaceInfo ¶
func PrintInferfaceInfo(name *string)
Types ¶
type AnonymizedDNSConfig ¶
type AnonymizedDNSConfig struct {
Routes []AnonymizedDNSRouteConfig `toml:"routes"`
}
type Config ¶
type Config struct { *Main ChannelsSections map[string]channels.Config `toml:"channels_sections"` SourcesConfig map[string]SourceConfig `toml:"sources"` AnonymizedDNS AnonymizedDNSConfig `toml:"anonymized_dns"` }
type ConfigFlags ¶
type GroupsConfig ¶
type ListenerAssociation ¶
type Main ¶
type Main struct { LogLevel int `toml:"log_level"` LogFile *string `toml:"log_file"` UseSyslog bool `toml:"use_syslog"` ForceTCP bool `toml:"force_tcp"` TLSDisableSessionTickets bool `toml:"tls_disable_session_tickets"` NetprobeTimeout int `toml:"netprobe_Timeout"` CertRefreshDelay int `toml:"cert_refresh_delay"` Timeout int `toml:"timeout"` KeepAlive int `toml:"keepalive"` ServerNames []string `toml:"server_names"` DisabledServerNames []string `toml:"disabled_server_names"` ListenAddresses []string `toml:"listen_addresses"` MaxClients uint32 `toml:"max_clients"` ProxyURI string `toml:"proxy_uri"` ProxyIP string `toml:"proxy_ip"` LocalInterface string `toml:"network_interface"` NetprobeAddress string `toml:"netprobe_address"` UserName string `toml:"user_name"` Occurrence string `toml:"occurrence"` Groups []GroupsConfig `toml:"groups"` GroupsListener []ListenerAssociation `toml:"listener_association"` }
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func NewSource ¶
func NewSource(name string, XTransport *tls.XTransport, urls []string, minisignKeyStr string, cacheFile string, formatStr string, refreshDelay time.Duration) (source *Source, err error)
NewSource loads a new source using the given cacheFile and urls, ensuring it has a valid signature
type SourceConfig ¶
type SourceFormat ¶
type SourceFormat int
Click to show internal directories.
Click to hide internal directories.