mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Add acme-email flag to server
This commit is contained in:
parent
eaf95f6bea
commit
7b2d4cffcb
@ -53,6 +53,7 @@ func Listen() {
|
|||||||
allowHttp := flagSet.Bool("allow-http", false, "Allow unencrypted (HTTP) requests")
|
allowHttp := flagSet.Bool("allow-http", false, "Allow unencrypted (HTTP) requests")
|
||||||
publicIp := flagSet.String("public-ip", "", "Public IP")
|
publicIp := flagSet.String("public-ip", "", "Public IP")
|
||||||
behindProxy := flagSet.Bool("behind-proxy", false, "Whether we're running behind another reverse proxy")
|
behindProxy := flagSet.Bool("behind-proxy", false, "Whether we're running behind another reverse proxy")
|
||||||
|
acmeEmail := flagSet.String("acme-email", "", "Email for ACME (ie Let's Encrypt)")
|
||||||
acmeUseStaging := flagSet.Bool("acme-use-staging", false, "Use ACME (ie Let's Encrypt) staging servers")
|
acmeUseStaging := flagSet.Bool("acme-use-staging", false, "Use ACME (ie Let's Encrypt) staging servers")
|
||||||
err := flagSet.Parse(os.Args[2:])
|
err := flagSet.Parse(os.Args[2:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -101,6 +102,10 @@ func Listen() {
|
|||||||
//certmagic.DefaultACME.DisableHTTPChallenge = true
|
//certmagic.DefaultACME.DisableHTTPChallenge = true
|
||||||
//certmagic.DefaultACME.DisableTLSALPNChallenge = true
|
//certmagic.DefaultACME.DisableTLSALPNChallenge = true
|
||||||
|
|
||||||
|
if *acmeEmail != "" {
|
||||||
|
certmagic.DefaultACME.Email = *acmeEmail
|
||||||
|
}
|
||||||
|
|
||||||
if *acmeUseStaging {
|
if *acmeUseStaging {
|
||||||
certmagic.DefaultACME.CA = certmagic.LetsEncryptStagingCA
|
certmagic.DefaultACME.CA = certmagic.LetsEncryptStagingCA
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user