mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -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() {
|
func main() {
|
||||||
|
var acmeEmail string
|
||||||
var acmeHostnamesCommas string
|
var acmeHostnamesCommas string
|
||||||
var disableTLS bool
|
var disableTLS bool
|
||||||
var logFilename string
|
var logFilename string
|
||||||
|
|
||||||
flag.Usage = usage
|
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.StringVar(&acmeHostnamesCommas, "acme-hostnames", "", "comma-separated hostnames for TLS certificate")
|
||||||
flag.BoolVar(&disableTLS, "disable-tls", false, "don't use HTTPS")
|
flag.BoolVar(&disableTLS, "disable-tls", false, "don't use HTTPS")
|
||||||
flag.StringVar(&logFilename, "log", "", "log file to write to")
|
flag.StringVar(&logFilename, "log", "", "log file to write to")
|
||||||
|
@ -250,6 +252,7 @@ func main() {
|
||||||
certManager := autocert.Manager{
|
certManager := autocert.Manager{
|
||||||
Prompt: autocert.AcceptTOS,
|
Prompt: autocert.AcceptTOS,
|
||||||
HostPolicy: autocert.HostWhitelist(acmeHostnames...),
|
HostPolicy: autocert.HostWhitelist(acmeHostnames...),
|
||||||
|
Email: acmeEmail,
|
||||||
}
|
}
|
||||||
|
|
||||||
// The ACME responder only works when it is running on port 443. In case
|
// 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