mirror of
https://github.com/go-acme/lego.git
synced 2024-12-26 11:18:00 +02:00
Add interface:port override to CLI
This commit is contained in:
parent
0c10083ef0
commit
772f3d05ab
8
cli.go
8
cli.go
@ -88,12 +88,12 @@ func main() {
|
||||
Usage: "Explicitly disallow solvers by name from being used. Solvers: \"http-01\", \"tls-sni-01\".",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "httpPort",
|
||||
Usage: "Set the port to use for HTTP based challenges to listen on.",
|
||||
Name: "http",
|
||||
Usage: "Set the port and interface to use for HTTP based challenges to listen on. Supported: interface:port or :port",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "tlsPort",
|
||||
Usage: "Set the port to use for TLS based challenges to listen on.",
|
||||
Name: "tls",
|
||||
Usage: "Set the port and interface to use for TLS based challenges to listen on. Supported: interface:port or :port",
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -43,12 +43,12 @@ func setup(c *cli.Context) (*Configuration, *Account, *acme.Client) {
|
||||
client.ExcludeChallenges(conf.ExcludedSolvers())
|
||||
}
|
||||
|
||||
if c.GlobalIsSet("httpPort") {
|
||||
client.SetHTTPPort(c.GlobalString("httpPort"))
|
||||
if c.GlobalIsSet("http") {
|
||||
client.SetHTTPAddress(c.GlobalString("http"))
|
||||
}
|
||||
|
||||
if c.GlobalIsSet("tlsPort") {
|
||||
client.SetTLSPort(c.GlobalString("tlsPort"))
|
||||
if c.GlobalIsSet("tls") {
|
||||
client.SetTLSAddress(c.GlobalString("tls"))
|
||||
}
|
||||
|
||||
return conf, acc, client
|
||||
|
Loading…
Reference in New Issue
Block a user