Add `tls on_demand`
This commit is contained in:
parent
ac17fe976b
commit
373453ff23
|
@ -8,6 +8,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.sr.ht/~emersion/go-scfg"
|
"git.sr.ht/~emersion/go-scfg"
|
||||||
|
"github.com/caddyserver/certmagic"
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseConfig(srv *Server, cfg scfg.Block) error {
|
func parseConfig(srv *Server, cfg scfg.Block) error {
|
||||||
|
@ -159,6 +160,8 @@ func parseTLS(srv *Server, d *scfg.Directive) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
srv.ACMEManager.Email = email
|
srv.ACMEManager.Email = email
|
||||||
|
case "on_demand":
|
||||||
|
srv.ACMEConfig.OnDemand = &certmagic.OnDemandConfig{}
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown %q directive", child.Name)
|
return fmt.Errorf("unknown %q directive", child.Name)
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,9 @@ The following directives are supported:
|
||||||
The email address to use when creating or selecting an existing ACME
|
The email address to use when creating or selecting an existing ACME
|
||||||
server account
|
server account
|
||||||
|
|
||||||
|
*on_demand*
|
||||||
|
Enable on-demand TLS.
|
||||||
|
|
||||||
# FILES
|
# FILES
|
||||||
|
|
||||||
_/etc/tlstunnel/config_
|
_/etc/tlstunnel/config_
|
||||||
|
|
Loading…
Reference in New Issue