mirror of
https://github.com/go-acme/lego.git
synced 2024-12-27 19:43:24 +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\".",
|
Usage: "Explicitly disallow solvers by name from being used. Solvers: \"http-01\", \"tls-sni-01\".",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "httpPort",
|
Name: "http",
|
||||||
Usage: "Set the port to use for HTTP based challenges to listen on.",
|
Usage: "Set the port and interface to use for HTTP based challenges to listen on. Supported: interface:port or :port",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "tlsPort",
|
Name: "tls",
|
||||||
Usage: "Set the port to use for TLS based challenges to listen on.",
|
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())
|
client.ExcludeChallenges(conf.ExcludedSolvers())
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.GlobalIsSet("httpPort") {
|
if c.GlobalIsSet("http") {
|
||||||
client.SetHTTPPort(c.GlobalString("httpPort"))
|
client.SetHTTPAddress(c.GlobalString("http"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.GlobalIsSet("tlsPort") {
|
if c.GlobalIsSet("tls") {
|
||||||
client.SetTLSPort(c.GlobalString("tlsPort"))
|
client.SetTLSAddress(c.GlobalString("tls"))
|
||||||
}
|
}
|
||||||
|
|
||||||
return conf, acc, client
|
return conf, acc, client
|
||||||
|
Loading…
Reference in New Issue
Block a user