From 772f3d05abc571312576285262a1e944492d4eda Mon Sep 17 00:00:00 2001 From: xenolf Date: Fri, 8 Jan 2016 08:05:07 +0100 Subject: [PATCH] Add interface:port override to CLI --- cli.go | 8 ++++---- cli_handlers.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cli.go b/cli.go index 7a8026d6..83173e08 100644 --- a/cli.go +++ b/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", }, } diff --git a/cli_handlers.go b/cli_handlers.go index f6996aaa..e622316d 100644 --- a/cli_handlers.go +++ b/cli_handlers.go @@ -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