<%@page contentType="text/html"%> <%@page trimDirectiveWhitespaces="true"%> <%@page pageEncoding="UTF-8"%> <% /* * Do not tag this file for translation. */ %> I2P Router Console - Debug <%@include file="css.jsi" %> <%@include file="summaryajax.jsi" %> <%@include file="summary.jsi" %>

Router Debug

Port Mapper App Manager Update Manager Router Session Key Manager Client Session Key Managers Router DHT Translation Status Jars
<% /* * Quick and easy place to put debugging stuff */ net.i2p.router.RouterContext ctx = (net.i2p.router.RouterContext) net.i2p.I2PAppContext.getGlobalContext(); String dd = request.getParameter("d"); if (dd == null || dd.equals("0")) { /* * Print out the status for the PortMapper */ ctx.portMapper().renderStatusHTML(out); /* * Print out the status for the InternalServerSockets */ net.i2p.util.InternalServerSocket.renderStatusHTML(out); } else if (dd.equals("1")) { /* * Print out the status for the AppManager */ out.print("
"); ctx.routerAppManager().renderStatusHTML(out); out.print("
"); } else if (dd.equals("2")) { /* * Print out the status for the UpdateManager */ out.print("
"); net.i2p.app.ClientAppManager cmgr = ctx.clientAppManager(); if (cmgr != null) { net.i2p.router.update.ConsoleUpdateManager umgr = (net.i2p.router.update.ConsoleUpdateManager) cmgr.getRegisteredApp(net.i2p.update.UpdateManager.APP_NAME); if (umgr != null) { umgr.renderStatusHTML(out); } out.print("
"); } } else if (dd.equals("3")) { /* * Print out the status for all the SessionKeyManagers */ out.print("
"); out.print("

Router Session Key Manager

"); ctx.sessionKeyManager().renderStatusHTML(out); out.print("
"); } else if (dd.equals("4")) { out.print("

Client Session Key Managers

"); java.util.Set clients = ctx.clientManager().listClients(); java.util.Set skms = new java.util.HashSet(clients.size()); int i = 0; for (net.i2p.data.Destination dest : clients) { net.i2p.data.Hash h = dest.calculateHash(); net.i2p.crypto.SessionKeyManager skm = ctx.clientManager().getClientSessionKeyManager(h); if (skm != null) { out.print("

"); net.i2p.router.TunnelPoolSettings tps = ctx.tunnelManager().getInboundSettings(h); if (tps != null) { String nick = tps.getDestinationNickname(); if (nick != null) out.print(net.i2p.data.DataHelper.escapeHTML(nick)); else out.print("" + dest.toBase32() + ""); } else { out.print("" + dest.toBase32() + ""); } out.print(" Session Key Manager

"); if (skms.add(skm)) skm.renderStatusHTML(out); else out.print("

See Session Key Manager for alternate destination above

"); out.print("
"); } } } else if (dd.equals("5")) { /* * Print out the status for the NetDB */ out.print("

Router DHT

"); ctx.netDb().renderStatusHTML(out); } else if (dd.equals("6")) { /* * Print out the status of the translations */ java.io.InputStream is = this.getClass().getResourceAsStream("/net/i2p/router/web/resources/translationstatus.html"); if (is == null) { out.println("Translation status not available"); } else { java.io.Reader br = null; try { br = new java.io.InputStreamReader(is, "UTF-8"); char[] buf = new char[4096]; int read; while ( (read = br.read(buf)) >= 0) { out.write(buf, 0, read); } } finally { if (br != null) try { br.close(); } catch (java.io.IOException ioe) {} } } } else if (dd.equals("7")) { %>

Jar File Dump

<% } %>