feat(ssl): Add LetsEncrypt certificate option

This commit is contained in:
Björn Benouarets
2025-12-16 14:15:16 +01:00
parent 69a42d957d
commit eec632ff97
10 changed files with 568 additions and 11 deletions

View File

@@ -13,10 +13,21 @@ type Config struct {
Address string `yaml:"address"`
Port int `yaml:"port"`
} `yaml:"listen"`
TLS struct {
Enabled bool `yaml:"enabled"`
CertFile string `yaml:"cert_file"`
KeyFile string `yaml:"key_file"`
LetsEncrypt struct {
Enabled bool `yaml:"enabled"`
Email string `yaml:"email"` // Email for Let's Encrypt registration
CacheDir string `yaml:"cache_dir"` // Directory to store certificates (default: ./certs/letsencrypt)
Staging bool `yaml:"staging"` // Use Let's Encrypt staging environment
} `yaml:"letsencrypt"`
} `yaml:"tls"`
Mappings []struct {
External string `yaml:"external"`
Internal string `yaml:"internal"`
Port int `yaml:"port"` // Optional, defaults to listen port
Port int `yaml:"port"` // Optional, defaults to 5432
} `yaml:"mappings"`
Debug bool `yaml:"debug"`
}