diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java index 20bfe14172ea04315ce4e5d901eb67b12faf7b3a..90c4fc9b4900c0b3f91e0bb0c8f714468053897b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java @@ -38,6 +38,7 @@ import net.i2p.data.LeaseSet2; import net.i2p.data.PublicKey; import net.i2p.data.router.RouterAddress; import net.i2p.data.router.RouterInfo; +import net.i2p.data.router.RouterKeyGenerator; import net.i2p.router.JobImpl; import net.i2p.router.RouterContext; import net.i2p.router.TunnelPoolSettings; @@ -123,7 +124,7 @@ class NetDbRenderer { byte[] h = Base64.decode(routerPrefix); if (h != null && h.length == Hash.HASH_LENGTH) { Hash hash = new Hash(h); - RouterInfo ri = _context.netDb().lookupRouterInfoLocally(hash); + RouterInfo ri = (RouterInfo) _context.netDb().lookupLocallyWithoutValidation(hash); boolean banned = false; if (ri == null) { banned = _context.banlist().isBanlisted(hash); @@ -135,7 +136,7 @@ class NetDbRenderer { synchronized(lw) { try { lw.wait(9*1000); } catch (InterruptedException ie) {} } - ri = _context.netDb().lookupRouterInfoLocally(hash); + ri = (RouterInfo) _context.netDb().lookupLocallyWithoutValidation(hash); } } if (ri != null) { @@ -608,16 +609,21 @@ class NetDbRenderer { .append("]</a></th></tr>\n") .append("<tr><td><b>Total Leasesets:</b></td><td colspan=\"3\">").append(leases.size()).append("</td></tr>\n"); if (debug) { + RouterKeyGenerator gen = _context.routerKeyGenerator(); buf.append("<tr><td><b>Published (RAP) Leasesets:</b></td><td colspan=\"3\">").append(netdb.getKnownLeaseSets()).append("</td></tr>\n") - .append("<tr><td><b>Mod Data:</b></td><td>").append(DataHelper.getUTF8(_context.routerKeyGenerator().getModData())).append("</td>") - .append("<td><b>Last Changed:</b></td><td>").append(DataHelper.formatTime(_context.routerKeyGenerator().getLastChanged())).append("</td></tr>\n") - .append("<tr><td><b>Next Mod Data:</b></td><td>").append(DataHelper.getUTF8(_context.routerKeyGenerator().getNextModData())).append("</td>") - .append("<td><b>Change in:</b></td><td>").append(DataHelper.formatDuration(_context.routerKeyGenerator().getTimeTillMidnight())).append("</td></tr>\n"); + .append("<tr><td><b>Mod Data:</b></td><td>").append(DataHelper.getUTF8(gen.getModData())).append("</td>") + .append("<td><b>Last Changed:</b></td><td>").append(DataHelper.formatTime(gen.getLastChanged())).append("</td></tr>\n") + .append("<tr><td><b>Next Mod Data:</b></td><td>").append(DataHelper.getUTF8(gen.getNextModData())).append("</td>") + .append("<td><b>Change in:</b></td><td>").append(DataHelper.formatDuration(gen.getTimeTillMidnight())).append("</td></tr>\n"); } int ff = _context.peerManager().getPeersByCapability(FloodfillNetworkDatabaseFacade.CAPABILITY_FLOODFILL).size(); buf.append("<tr><td><b>Known Floodfills:</b></td><td colspan=\"3\">").append(ff).append("</td></tr>\n") - .append("<tr><td><b>Currently Floodfill?</b></td><td colspan=\"3\">").append(netdb.floodfillEnabled() ? "yes" : "no").append("</td></tr>\n"); - buf.append("</table>\n"); + .append("<tr><td><b>Currently Floodfill?</b></td><td>").append(netdb.floodfillEnabled() ? "yes" : "no"); + if (debug) + buf.append("</td><td><b>Routing Key:</b></td><td>").append(ourRKey.toBase64()); + else + buf.append("</td><td colspan=\"2\">"); + buf.append("</td></tr>\n</table>\n"); if (leases.isEmpty()) { //if (!debug) @@ -1227,6 +1233,8 @@ class NetDbRenderer { buf.append("</td></tr><tr><td><b>").append(_t("Encryption Key")).append(":</b></td><td colspan=\"2\">") .append(info.getIdentity().getPublicKey().getType()); if (debug) { + buf.append("</td></tr>\n<tr><td><b>Routing Key:</b></td><td colspan=\"2\">").append(info.getRoutingKey().toBase64()); + buf.append("</td></tr>"); byte[] padding = info.getIdentity().getPadding(); if (padding != null && padding.length >= 64) { if (DataHelper.eq(padding, 0, padding, 32, 32)) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/ProfileOrganizerRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/ProfileOrganizerRenderer.java index 73d71d46977edaae23eee58677c1970036f081e8..d2244e0199df326aab5f4448335ad48bf6933c6c 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/ProfileOrganizerRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/ProfileOrganizerRenderer.java @@ -55,7 +55,7 @@ class ProfileOrganizerRenderer { if (prof == null) continue; if (mode == 2) { - RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer); + RouterInfo info = (RouterInfo) _context.netDb().lookupLocallyWithoutValidation(peer); if (info != null && info.getCapabilities().indexOf('f') >= 0) order.add(prof); continue; @@ -146,7 +146,7 @@ class ProfileOrganizerRenderer { buf.append(", "); buf.append(_t("Integrated")); } - RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer); + RouterInfo info = (RouterInfo) _context.netDb().lookupLocallyWithoutValidation(peer); if (info != null) { // prevent HTML injection in the caps and version buf.append("<td align=\"right\">").append(DataHelper.stripHTML(info.getCapabilities())); @@ -249,7 +249,7 @@ class ProfileOrganizerRenderer { buf.append("<tr><td align=\"center\" nowrap>"); buf.append(_context.commSystem().renderPeerHTML(peer)); buf.append("</td>"); - RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer); + RouterInfo info = (RouterInfo) _context.netDb().lookupLocallyWithoutValidation(peer); if (info != null) buf.append("<td align=\"center\">").append(DataHelper.stripHTML(info.getCapabilities())).append("</td>"); else diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/SybilRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/SybilRenderer.java index 3461d95e82dedce30c988e2c4dad2aecc7f12087..f3ae3a6e563702077c4a55548f0c95530d6b7c1e 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/SybilRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/SybilRenderer.java @@ -553,7 +553,7 @@ public class SybilRenderer { buf.append("<li><b>").append(s, 0, c+1).append("</b>").append(s, c+1, s.length()).append("</li>"); } buf.append("</ul>"); - RouterInfo ri = _context.netDb().lookupRouterInfoLocally(h); + RouterInfo ri = (RouterInfo) _context.netDb().lookupLocallyWithoutValidation(h); if (ri != null) { renderRouterInfo(buf, ri, null, false, false); } else { diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/TunnelRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/TunnelRenderer.java index e69d33c30f7dd30a268afd6a6276307e5bb7c96d..708f66ad95121ed7e6b7b64419abeebff3e3418d 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/TunnelRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/TunnelRenderer.java @@ -559,7 +559,7 @@ class TunnelRenderer { /** @return cap char or ' ' */ private char getCapacity(Hash peer) { - RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer); + RouterInfo info = (RouterInfo) _context.netDb().lookupLocallyWithoutValidation(peer); if (info != null) { String caps = info.getCapabilities(); for (int i = 0; i < RouterInfo.BW_CAPABILITY_CHARS.length(); i++) {