mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Add --acme-email option.
This commit is contained in:
parent
61310600c3
commit
b86bbd748d
1 changed files with 3 additions and 0 deletions
|
@ -213,11 +213,13 @@ func startServer(ln net.Listener) (net.Listener, error) {
|
|||
}
|
||||
|
||||
func main() {
|
||||
var acmeEmail string
|
||||
var acmeHostnamesCommas string
|
||||
var disableTLS bool
|
||||
var logFilename string
|
||||
|
||||
flag.Usage = usage
|
||||
flag.StringVar(&acmeEmail, "acme-email", "", "optional contact email for Let's Encrypt notifications")
|
||||
flag.StringVar(&acmeHostnamesCommas, "acme-hostnames", "", "comma-separated hostnames for TLS certificate")
|
||||
flag.BoolVar(&disableTLS, "disable-tls", false, "don't use HTTPS")
|
||||
flag.StringVar(&logFilename, "log", "", "log file to write to")
|
||||
|
@ -250,6 +252,7 @@ func main() {
|
|||
certManager := autocert.Manager{
|
||||
Prompt: autocert.AcceptTOS,
|
||||
HostPolicy: autocert.HostWhitelist(acmeHostnames...),
|
||||
Email: acmeEmail,
|
||||
}
|
||||
|
||||
// The ACME responder only works when it is running on port 443. In case
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue