diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java
index 6e52f2bc5..3e9a6cc66 100644
--- a/router/java/src/net/i2p/router/Router.java
+++ b/router/java/src/net/i2p/router/Router.java
@@ -463,14 +463,15 @@ public class Router {
ri.addCapability(CAPABILITY_BW256);
}
- if (FloodfillNetworkDatabaseFacade.floodfillEnabled(_context))
+ // if prop set to true, don't tell people we are ff even if we are
+ if (FloodfillNetworkDatabaseFacade.floodfillEnabled(_context) &&
+ !Boolean.valueOf(_context.getProperty("router.hideFloodfillParticipant")).booleanValue())
ri.addCapability(FloodfillNetworkDatabaseFacade.CAPACITY_FLOODFILL);
- if("true".equalsIgnoreCase(_context.getProperty(Router.PROP_HIDDEN, "false")))
+ if(Boolean.valueOf(_context.getProperty(PROP_HIDDEN)).booleanValue())
ri.addCapability(RouterInfo.CAPABILITY_HIDDEN);
- String forceUnreachable = _context.getProperty(PROP_FORCE_UNREACHABLE);
- if ( (forceUnreachable != null) && ("true".equalsIgnoreCase(forceUnreachable)) ) {
+ if (Boolean.valueOf(_context.getProperty(PROP_FORCE_UNREACHABLE)).booleanValue()) {
ri.addCapability(CAPABILITY_UNREACHABLE);
return;
}
@@ -582,7 +583,13 @@ public class Router {
//_context.inNetMessagePool().registerHandlerJobBuilder(TunnelMessage.MESSAGE_TYPE, new TunnelMessageHandler(_context));
}
+ /**
+ * this is for oldconsole.jsp, pretty much unused except as a way to get memory info,
+ * so let's comment out the rest, it is available elsewhere, and we don't really
+ * want to spend a minute rendering a multi-megabyte page in memory.
+ */
public void renderStatusHTML(Writer out) throws IOException {
+/****************
out.write("
Router console
\n" +
"console | stats
\n" +
"" +
"
\n");
+**************/
- StringBuilder buf = new StringBuilder(32*1024);
+ StringBuilder buf = new StringBuilder(4*1024);
+ // Please don't change the text or formatting, tino matches it in his scripts
if ( (_routerInfo != null) && (_routerInfo.getIdentity() != null) )
buf.append("Router: ").append(_routerInfo.getIdentity().getHash().toBase64()).append("
\n");
- buf.append("As of: ").append(new Date(_context.clock().now())).append(" (uptime: ").append(DataHelper.formatDuration(getUptime())).append(")
\n");
+ buf.append("As of: ").append(new Date(_context.clock().now())).append("
\n");
+ buf.append("RouterUptime: " ).append(DataHelper.formatDuration(getUptime())).append("
\n");
buf.append("Started on: ").append(new Date(getWhenStarted())).append("
\n");
buf.append("Clock offset: ").append(_context.clock().getOffset()).append("ms (OS time: ").append(new Date(_context.clock().now() - _context.clock().getOffset())).append(")
\n");
+ buf.append("RouterVersion: ").append(RouterVersion.FULL_VERSION).append(" / SDK: ").append(CoreVersion.VERSION).append("
\n");
long tot = Runtime.getRuntime().totalMemory()/1024;
long free = Runtime.getRuntime().freeMemory()/1024;
buf.append("Memory: In use: ").append((tot-free)).append("KB Free: ").append(free).append("KB
\n");
- buf.append("Version: Router: ").append(RouterVersion.VERSION).append(" / SDK: ").append(CoreVersion.VERSION).append("
\n");
if (_higherVersionSeen)
buf.append("HIGHER VERSION SEEN - please check to see if there is a new release out
\n");
+/*********
buf.append("
Bandwidth
\n");
long sent = _context.bandwidthLimiter().getTotalAllocatedOutboundBytes();
long received = _context.bandwidthLimiter().getTotalAllocatedInboundBytes();
@@ -768,6 +779,7 @@ public class Router {
buf.append("\n");
}
buf.append("\n");
+***********/
out.write(buf.toString());
out.flush();
}