From a04923a4f39ff2d08124f6326b25f161d8c117ad Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Fri, 22 Feb 2019 18:47:54 +0300 Subject: [PATCH] Fix printing HTTPS address --- app.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 50d378d1..0b55b6fa 100644 --- a/app.go +++ b/app.go @@ -399,7 +399,14 @@ func loadOptions() options { // proto is either "http" or "https" func printHTTPAddresses(proto string) { var address string - if config.BindHost == "0.0.0.0" { + + if proto == "https" && config.TLS.ServerName != "" { + if config.TLS.PortHTTPS == 443 { + log.Printf("Go to https://%s", config.TLS.ServerName) + } else { + log.Printf("Go to https://%s:%d", config.TLS.ServerName, config.TLS.PortHTTPS) + } + } else if config.BindHost == "0.0.0.0" { log.Println("AdGuard Home is available on the following addresses:") ifaces, err := getValidNetInterfacesForWeb() if err != nil {