Documentation
¶
Overview ¶
Package config handles TOML configuration parsing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFullSecret ¶
BuildFullSecret builds the full secret string: ee + key + hex(host)
func GenerateKey ¶
GenerateKey generates a new random 16-byte key (returned as 32 hex chars).
Types ¶
type Config ¶
type Config struct {
Secrets map[string]string `toml:"secrets"` // name = "secret"
BindTo string `toml:"bind-to"`
LogLevel string `toml:"log-level"` // trace, debug, info, warn, error
TLSFronting TLSFrontingConfig `toml:"tls-fronting"`
Performance PerformanceConfig `toml:"performance"`
}
Config is the TOML configuration structure.
type PerformanceConfig ¶
type PerformanceConfig struct {
TCPBufferKB int `toml:"tcp-buffer-kb"`
NumEventLoops int `toml:"num-event-loops"` // gnet event loops (0 = auto, uses all cores)
PreferIP string `toml:"prefer-ip"`
IdleTimeout Duration `toml:"idle-timeout"`
}
PerformanceConfig configures performance settings.
type TLSFrontingConfig ¶
type TLSFrontingConfig struct {
MaskHost string `toml:"mask-host"`
}
TLSFrontingConfig configures TLS fronting.
Click to show internal directories.
Click to hide internal directories.