Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Logger *slog.Logger `json:"-"`
LogLevel string `json:"log_level"`
DevMode bool `json:"dev_mode"`
DataDir string `json:"data_dir"`
HttpPort int `json:"http_port"`
DnsPort int `json:"dns_port"`
DotPort int `json:"dot_port"`
Upstreams []string `json:"upstreams"`
BlockListURLs []string `json:"blocklist_urls"`
AllowedHosts []string `json:"allowed_hosts"`
NoiseFilterURL string `json:"noise_filter_url"`
MetricsAuth string `json:"-"`
MaxCacheSize int `json:"max_cache_size"`
DisableIpinfo bool `json:"disable_ipinfo"`
CronSchedule struct {
Downloader string `json:"downloader"`
CacheReaper string `json:"cache_reaper"`
IPInfo string `json:"ipinfo"`
} `json:"cron_schedule"`
CacheTtlFloor time.Duration `json:"cache_ttl_floor"`
RequireProxyProtocol bool `json:"require_proxy_protocol"`
TrustedProxies []string `json:"trusted_proxies,omitempty"`
EnableECS bool `json:"enable_ecs"`
Timeouts struct {
Read time.Duration `json:"read"`
Write time.Duration `json:"write"`
Dial time.Duration `json:"dial"`
} `json:"timeouts"`
}
func (*App) LogValue ¶
LogValue implements slog.LogValuer to ensure nested durations are formatted as strings.
func (*App) NewBlockLists ¶ added in v0.14.0
Click to show internal directories.
Click to hide internal directories.