Add autocert

This commit is contained in:
2021-04-10 11:24:10 +02:00
parent f356858f02
commit 7ce2b2aa2b
7 changed files with 97 additions and 11 deletions

View File

@@ -30,9 +30,18 @@ type HoneypotConfig struct {
}
type FrontendConfig struct {
ListenAddr string `toml:"ListenAddr"`
LogLevel string `toml:"LogLevel"`
AccessLogEnable bool `toml:"AccessLogEnable"`
ListenAddr string `toml:"ListenAddr"`
LogLevel string `toml:"LogLevel"`
AccessLogEnable bool `toml:"AccessLogEnable"`
Autocert FrontendAutocertConfig `toml:"Autocert"`
}
type FrontendAutocertConfig struct {
Enable bool `toml:"Enable"`
Email string `toml:"Email"`
Domains []string `toml:"Domains"`
CacheDir string `toml:"CacheDir"`
RedirectHTTP bool `toml:"RedirectHTTP"`
}
func FromReader(r io.Reader) (Config, error) {