forked from I2P_Developers/i2p.i2p
use portmapper
This commit is contained in:
@ -188,10 +188,10 @@ public class HomeHelper extends HelperBase {
|
|||||||
String website = _t("Web Server");
|
String website = _t("Web Server");
|
||||||
StringBuilder buf = new StringBuilder(1024);
|
StringBuilder buf = new StringBuilder(1024);
|
||||||
buf.append("<div class=\"appgroup\">");
|
buf.append("<div class=\"appgroup\">");
|
||||||
|
PortMapper pm = _context.portMapper();
|
||||||
for (App app : apps) {
|
for (App app : apps) {
|
||||||
String url;
|
String url;
|
||||||
if (app.name.equals(website) && app.url.equals("http://127.0.0.1:7658/")) {
|
if (app.name.equals(website) && app.url.equals("http://127.0.0.1:7658/")) {
|
||||||
PortMapper pm = _context.portMapper();
|
|
||||||
int port = pm.getPort(PortMapper.SVC_EEPSITE);
|
int port = pm.getPort(PortMapper.SVC_EEPSITE);
|
||||||
int sslPort = pm.getPort(PortMapper.SVC_HTTPS_EEPSITE);
|
int sslPort = pm.getPort(PortMapper.SVC_HTTPS_EEPSITE);
|
||||||
if (port <= 0 && sslPort <= 0)
|
if (port <= 0 && sslPort <= 0)
|
||||||
@ -208,13 +208,13 @@ public class HomeHelper extends HelperBase {
|
|||||||
url = app.url;
|
url = app.url;
|
||||||
// check for disabled webapps and other things
|
// check for disabled webapps and other things
|
||||||
if (url.equals("/dns")) {
|
if (url.equals("/dns")) {
|
||||||
if (!WebAppStarter.isWebAppRunning("susidns"))
|
if (pm.getPort("susidns") <= 0)
|
||||||
continue;
|
continue;
|
||||||
} else if (url.equals("/webmail")) {
|
} else if (url.equals("/webmail")) {
|
||||||
if (!WebAppStarter.isWebAppRunning("susimail"))
|
if (pm.getPort("susimail") <= 0)
|
||||||
continue;
|
continue;
|
||||||
} else if (url.equals("/torrents")) {
|
} else if (url.equals("/torrents")) {
|
||||||
if (!WebAppStarter.isWebAppRunning("i2psnark"))
|
if (pm.getPort("i2psnark") <= 0)
|
||||||
continue;
|
continue;
|
||||||
} else if (url.equals("/configplugins")) {
|
} else if (url.equals("/configplugins")) {
|
||||||
if (!PluginStarter.pluginsEnabled(_context))
|
if (!PluginStarter.pluginsEnabled(_context))
|
||||||
|
Reference in New Issue
Block a user