diff --git a/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java b/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java
index 852c9cca0c0dd2192bf9a28e97b2b8f286038ee9..3b7984abeb794fc7990f86924c6179af0400cb58 100644
--- a/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java
+++ b/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java
@@ -438,21 +438,7 @@ class InternalTrayManager extends TrayManager {
      * @since 0.9.26
      */
     private void launchBrowser() {
-        String unset = "*unset*";
-        PortMapper pm = _context.portMapper();
-        String httpHost = pm.getActualHost(PortMapper.SVC_CONSOLE, unset);
-        String httpsHost = pm.getActualHost(PortMapper.SVC_HTTPS_CONSOLE, unset);
-        int httpPort = pm.getPort(PortMapper.SVC_CONSOLE, 7657);
-        int httpsPort = pm.getPort(PortMapper.SVC_HTTPS_CONSOLE, -1);
-        boolean httpsOnly = httpsPort > 0 && httpHost.equals(unset) && !httpsHost.equals(unset);
-        String url;
-        if (httpsOnly) {
-            url = "https://" + httpsHost + ':' + httpsPort + '/';
-        } else {
-            if (httpHost.equals(unset))
-                httpHost = "127.0.0.1";
-            url = "http://" + httpHost + ':' + httpPort + '/';
-        }
+        String url = _context.portMapper().getConsoleURL();
         try {
             I2PDesktop.browse(url);
         } catch (BrowseException e1) {
diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java
index 92cb2dca78eb71f0853a0143ce5c99a071c6cd97..c8aafbd667b2d96210ac1e3d7d73b580d41da0de 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java
@@ -550,19 +550,9 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
             String rv = out.toString();
             // Do we need to replace http://127.0.0.1:7657 console links in the error page?
             // Get the registered host and port from the PortMapper.
-            final String unset = "*unset*";
-            final String httpHost = ctx.portMapper().getActualHost(PortMapper.SVC_CONSOLE, unset);
-            final String httpsHost = ctx.portMapper().getActualHost(PortMapper.SVC_HTTPS_CONSOLE, unset);
-            final int httpPort = ctx.portMapper().getPort(PortMapper.SVC_CONSOLE, 7657);
-            final int httpsPort = ctx.portMapper().getPort(PortMapper.SVC_HTTPS_CONSOLE, -1);
-            final boolean httpsOnly = httpsPort > 0 && httpHost.equals(unset) && !httpsHost.equals(unset);
-            final int port = httpsOnly ? httpsPort : httpPort;
-            String host = httpsOnly ? httpsHost : httpHost;
-            if (host.equals(unset))
-                host = "127.0.0.1";
-            if (httpsOnly || port != 7657 || !host.equals("127.0.0.1")) {
-                String url = (httpsOnly ? "https://" : "http://") + host + ':' + port;
-                rv = rv.replace("http://127.0.0.1:7657", url);
+            String url = ctx.portMapper().getConsoleURL();
+            if (!url.equals("http://127.0.0.1:7657/")) {
+                rv = rv.replace("http://127.0.0.1:7657/", url);
             }
             return rv;
         } finally {
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java
index 7bfc470fe9f2a9e7e5523c259407531d7910f179..857d16cb5708c26b56181f647f94fde1d1e096f1 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java
@@ -219,6 +219,13 @@ public class ConfigServiceHandler extends FormHandler {
                (sdtg == null && (SystemVersion.isWindows() || SystemVersion.isMac()));
     }
 
+    /**
+     *  @since 0.9.33
+     */
+    public String getConsoleURL() {
+        return _context.portMapper().getConsoleURL();
+    }
+
     @Override
     protected void processForm() {
         if (_action == null) return;
@@ -348,9 +355,9 @@ public class ConfigServiceHandler extends FormHandler {
         }
         // releases <= 0.6.5 deleted the entry completely
         if (shouldLaunchBrowser && !found) {
-            int port = _context.portMapper().getPort(PortMapper.SVC_CONSOLE, RouterConsoleRunner.DEFAULT_LISTEN_PORT);
+            String url = _context.portMapper().getConsoleURL();
             ClientAppConfig ca = new ClientAppConfig(UrlLauncher.class.getName(), "consoleBrowser",
-                                                     "http://127.0.0.1:" + port + '/', 5, false);
+                                                     url, 5, false);
             clients.add(ca);
         }
         ClientAppConfig.writeClientAppConfig(_context, clients);
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/HomeHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/HomeHelper.java
index 752edacdbff92260539b8c7e863527d96327e2cc..45ff222f37b095dc172e245809d4b68869b454b8 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/HomeHelper.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/HomeHelper.java
@@ -190,7 +190,7 @@ public class HomeHelper extends HelperBase {
             String url;
             if (app.name.equals(website) && app.url.equals("http://127.0.0.1:7658/")) {
                 // fixup eepsite link
-                url = "http://" + _context.portMapper().getHost(PortMapper.SVC_EEPSITE, "127.0.0.1") +
+                url = "http://" + _context.portMapper().getActualHost(PortMapper.SVC_EEPSITE, "127.0.0.1") +
                       ':' + _context.portMapper().getPort(PortMapper.SVC_EEPSITE, 7658) + '/';
             } else {
                 url = app.url;
diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java
index 05936e89a9a3ddb9855003c3f58e314eccfb20bd..4003fcebf32755224482ccf7546a83f05f165933 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java
@@ -226,7 +226,7 @@ class SummaryBarRenderer {
            .append("</a>\n" +
 
                    "<a href=\"http://")
-           .append(_context.portMapper().getHost(PortMapper.SVC_EEPSITE, "127.0.0.1"))
+           .append(_context.portMapper().getActualHost(PortMapper.SVC_EEPSITE, "127.0.0.1"))
            .append(':')
            .append(_context.portMapper().getPort(PortMapper.SVC_EEPSITE, 7658))
            .append("/\" target=\"_blank\" title=\"")
diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp
index 8892b5bbd29cfc7fa91ef96100b75625020a61c8..38ea13d8c8934f695081b013be187fa77374504a 100644
--- a/apps/routerconsole/jsp/configservice.jsp
+++ b/apps/routerconsole/jsp/configservice.jsp
@@ -83,7 +83,8 @@
 
  <h3 class="ptitle" id="browseronstart"><%=intl._t("Launch browser on router startup?")%></h3>
  <p class="infohelp">
-    <%=intl._t("I2P''s main configuration interface is this web console, so for your convenience I2P can launch a web browser on startup pointing at {0}.", "<a href=\"http://127.0.0.1:7657/\">http://127.0.0.1:7657/</a>")%>
+    <% String consoleURL = formhandler.getConsoleURL(); %>
+    <%=intl._t("I2P''s main configuration interface is this web console, so for your convenience I2P can launch a web browser on startup pointing at {0}.", "<a href=\"" + consoleURL + "\">" + consoleURL + "</a>")%>
  </p>
  <hr><div class="formaction" id="browserstart">
  <input type="submit" class="check" name="action" value="<%=intl._t("View console on startup")%>" >
diff --git a/core/java/src/net/i2p/util/PortMapper.java b/core/java/src/net/i2p/util/PortMapper.java
index 105dc1f07487f4a72994137e61adee9f8ac3b9a8..3548bc35f2641f28aecd4c48504f9437013a2fbd 100644
--- a/core/java/src/net/i2p/util/PortMapper.java
+++ b/core/java/src/net/i2p/util/PortMapper.java
@@ -173,6 +173,24 @@ public class PortMapper {
         return rv;
     }
 
+    /*
+     *  @return http URL unless console is https only. Default http://127.0.0.1:7657/
+     *  @since 0.9.33 consolidated from i2ptunnel and desktopgui
+     */
+    public String getConsoleURL() {
+        String unset = "*unset*";
+        String httpHost = getActualHost(SVC_CONSOLE, unset);
+        String httpsHost = getActualHost(SVC_HTTPS_CONSOLE, unset);
+        int httpPort = getPort(SVC_CONSOLE, 7657);
+        int httpsPort = getPort(SVC_HTTPS_CONSOLE, -1);
+        boolean httpsOnly = httpsPort > 0 && httpHost.equals(unset) && !httpsHost.equals(unset);
+        if (httpsOnly)
+            return "https://" + httpsHost + ':' + httpsPort + '/';
+        if (httpHost.equals(unset))
+            httpHost = "127.0.0.1";
+        return "http://" + httpHost + ':' + httpPort + '/';
+    }
+
     /**
      *  For debugging only
      *  @since 0.9.20