Documentation
¶
Index ¶
Constants ¶
const ( AuthRoleAdmin = "admin" AuthRoleViewer = "viewer" )
const DefaultControlHost = "127.0.0.1"
const DefaultControlListenAddr = "127.0.0.1:19090"
const DefaultControlPort = 19090
const DefaultLogFormat = "text"
const DefaultLogLevel = "info"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Tokens []AuthToken `json:"tokens,omitempty" yaml:"tokens,omitempty"`
}
AuthConfig controls Control API bearer-token authentication.
type AuthToken ¶
type AuthToken struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Token string `json:"token" yaml:"token"`
Role string `json:"role,omitempty" yaml:"role,omitempty"`
}
AuthToken is one Control API bearer token. Token values are secrets and must not be logged.
type CertReviewConfig ¶
type CertReviewConfig struct {
ExpiryWarningDays int `json:"expiry_warning_days,omitempty" yaml:"expiry_warning_days,omitempty"`
ExpiryCriticalDays int `json:"expiry_critical_days,omitempty" yaml:"expiry_critical_days,omitempty"`
MinRSABits int `json:"min_rsa_bits,omitempty" yaml:"min_rsa_bits,omitempty"`
}
CertReviewConfig controls certificate review thresholds.
type ControlTLSConfig ¶ added in v0.3.0
type ControlTLSConfig struct {
CertFile string `json:"cert_file,omitempty" yaml:"cert_file,omitempty"`
KeyFile string `json:"key_file,omitempty" yaml:"key_file,omitempty"`
ClientCAFile string `json:"client_ca_file,omitempty" yaml:"client_ca_file,omitempty"`
MinVersion string `json:"min_version,omitempty" yaml:"min_version,omitempty"`
}
ControlTLSConfig enables TLS (and optionally mTLS) on the control API. TLS is active when both CertFile and KeyFile are set. Setting ClientCAFile turns on mutual TLS, requiring every client to present a certificate signed by that CA.
type DNS01Config ¶
type DNS01Config struct {
Provider string `json:"provider,omitempty" yaml:"provider,omitempty"`
PropagationTimeout string `json:"propagation_timeout,omitempty" yaml:"propagation_timeout,omitempty"`
PollingInterval string `json:"polling_interval,omitempty" yaml:"polling_interval,omitempty"`
CloudflareAPIToken string `json:"cloudflare_api_token,omitempty" yaml:"cloudflare_api_token,omitempty"`
RFC2136Nameserver string `json:"rfc2136_nameserver,omitempty" yaml:"rfc2136_nameserver,omitempty"`
RFC2136TSIGAlgorithm string `json:"rfc2136_tsig_algorithm,omitempty" yaml:"rfc2136_tsig_algorithm,omitempty"`
RFC2136TSIGKey string `json:"rfc2136_tsig_key,omitempty" yaml:"rfc2136_tsig_key,omitempty"`
RFC2136TSIGSecret string `json:"rfc2136_tsig_secret,omitempty" yaml:"rfc2136_tsig_secret,omitempty"`
ExecPath string `json:"exec_path,omitempty" yaml:"exec_path,omitempty"`
}
DNS01Config configures DNS-01 ACME challenge solving.
type File ¶
type File struct {
Version int `json:"version" yaml:"version"`
ControlPort int `json:"control_port" yaml:"control_port"`
DeprecatedControlListenAddr string `json:"-" yaml:"control_listen_addr,omitempty"`
UsedDeprecatedControlListenAddr bool `json:"-" yaml:"-"`
UDPMaxSessions int `json:"udp_max_sessions,omitempty" yaml:"udp_max_sessions,omitempty"`
ControlTLS ControlTLSConfig `json:"control_tls,omitempty" yaml:"control_tls,omitempty"`
Log LogConfig `json:"log,omitempty" yaml:"log,omitempty"`
Auth AuthConfig `json:"auth,omitempty" yaml:"auth,omitempty"`
BotToken string `json:"bot_token,omitempty" yaml:"bot_token,omitempty"`
BotChat int64 `json:"bot_chat,omitempty" yaml:"bot_chat,omitempty"`
BotControlToken string `json:"bot_control_token,omitempty" yaml:"bot_control_token,omitempty"`
AcmeChallenge string `json:"acme_challenge,omitempty" yaml:"acme_challenge,omitempty"`
AcmeHTTP01Addr string `json:"acme_http01_addr,omitempty" yaml:"acme_http01_addr,omitempty"`
AcmeCacheDir string `json:"acme_cache_dir,omitempty" yaml:"acme_cache_dir,omitempty"`
AcmeDNS01 DNS01Config `json:"acme_dns01,omitempty" yaml:"acme_dns01,omitempty"`
CertCacheDir string `json:"cert_cache_dir,omitempty" yaml:"cert_cache_dir,omitempty"`
CertReview CertReviewConfig `json:"cert_review,omitempty" yaml:"cert_review,omitempty"`
Stats StatsConfig `json:"stats,omitempty" yaml:"stats,omitempty"`
Rules []engine.Rule `json:"rules" yaml:"rules"`
}
func (File) ControlListenAddress ¶ added in v0.3.0
ControlListenAddress returns the internal management listener. The host is intentionally fixed so configuration can change only the local port.
type LogConfig ¶
type LogConfig struct {
Level string `json:"level,omitempty" yaml:"level,omitempty"`
Format string `json:"format,omitempty" yaml:"format,omitempty"`
}
LogConfig controls structured logging for daemon mode.
type StatsConfig ¶ added in v0.3.0
type StatsConfig struct {
Persist bool `json:"persist" yaml:"persist"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
FlushInterval string `json:"flush_interval,omitempty" yaml:"flush_interval,omitempty"`
}
StatsConfig controls optional persistence of cumulative traffic counters so daemon restarts do not lose per-rule upload/download/drop totals.