1
1
Fork 0
mirror of https://git.sr.ht/~emersion/tlstunnel synced 2024-04-27 16:05:01 +02:00

Add `tls on_demand`

This commit is contained in:
Simon Ser 2021-02-17 18:34:13 +01:00
parent ac17fe976b
commit 373453ff23
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import (
"strings"
"git.sr.ht/~emersion/go-scfg"
"github.com/caddyserver/certmagic"
)
func parseConfig(srv *Server, cfg scfg.Block) error {
@ -159,6 +160,8 @@ func parseTLS(srv *Server, d *scfg.Directive) error {
return err
}
srv.ACMEManager.Email = email
case "on_demand":
srv.ACMEConfig.OnDemand = &certmagic.OnDemandConfig{}
default:
return fmt.Errorf("unknown %q directive", child.Name)
}

View File

@ -95,6 +95,9 @@ The following directives are supported:
The email address to use when creating or selecting an existing ACME
server account
*on_demand*
Enable on-demand TLS.
# FILES
_/etc/tlstunnel/config_