propagate from branch 'i2p.i2p' (head 439bb8be3133559026640ebd22fdf93d10ba2cb9)

to branch 'i2p.i2p.str4d.ui' (head 83c1a136effdf092093e9af799a138e86da7ec43)
This commit is contained in:
str4d
2017-01-08 01:37:15 +00:00
729 changed files with 42290 additions and 9367 deletions

View File

@ -245,6 +245,7 @@ Applications:
- All other flag icons: public domain, courtesy mjames@gmail.com http://www.famfamfam.com/
Silk icons: See licenses/LICENSE-SilkIcons.txt
FatCow icons: See licenses/LICENSE-FatCowIcons.txt
Fugue Icons: See licenses/LICENSE-FugueIcons.txt
GeoIP Data:
This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/

View File

@ -276,7 +276,7 @@
<!-- we really don't need all of these -->
<fileset dir="../../../installer/resources/themes/console/images/" />
</copy>
<copy file="../../../installer/resources/themes/console/dark/images/transparent.gif"
<copy file="../../../installer/resources/themes/console/images/transparent.gif"
todir="build/standalone-resources/.resources/themes/snark/ubergine/images" />
<copy file="../../../installer/resources/themes/console/dark/images/header.png"
todir="build/standalone-resources/.resources/themes/snark/ubergine/images" />

View File

@ -1073,7 +1073,7 @@ public class SnarkManager implements CompleteListener {
if (theme != null) {
if(!theme.equals(_config.getProperty(PROP_THEME))) {
_config.setProperty(PROP_THEME, theme);
addMessage(_t("{0} theme loaded, return to main i2psnark page to view.", theme));
addMessage(_t("{0} theme loaded.", theme));
changed = true;
}
}

View File

@ -138,7 +138,7 @@ class DHTNodes {
* @since 0.9.4
*/
public void renderStatusHTML(StringBuilder buf) {
buf.append(_kad.toString().replace("\n", "<br>\n"));
buf.append(_kad.toString().replace("\n", "<br><hr class=\"debug\">\n"));
}
/** */

View File

@ -682,7 +682,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
public String renderStatusHTML() {
long uptime = Math.max(1000, _context.clock().now() - _started);
StringBuilder buf = new StringBuilder(256);
buf.append("<br><b>DHT DEBUG</b><br>TX: ").append(_txPkts.get()).append(" pkts / ")
buf.append("<br><hr class=\"debug\"><b>DHT DEBUG</b><br><hr class=\"debug\">TX: ").append(_txPkts.get()).append(" pkts / ")
.append(DataHelper.formatSize2(_txBytes.get())).append("B / ")
.append(DataHelper.formatSize2(_txBytes.get() * 1000 / uptime)).append("Bps<br>" +
"RX: ").append(_rxPkts.get()).append(" pkts / ")
@ -692,7 +692,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
"Blacklisted: ").append(_blacklist.size()).append("<br>" +
"Sent tokens: ").append(_outgoingTokens.size()).append("<br>" +
"Rcvd tokens: ").append(_incomingTokens.size()).append("<br>" +
"Pending queries: ").append(_sentQueries.size()).append("<br>");
"Pending queries: ").append(_sentQueries.size()).append("<br><hr>");
_tracker.renderStatusHTML(buf);
_knownNodes.renderStatusHTML(buf);
return buf.toString();

View File

@ -506,7 +506,7 @@ public class I2PSnarkServlet extends BasicServlet {
: tx));
if (showSort)
out.write("</a>");
out.write("</th>\n<th align=\"center\">");
out.write("</th>\n<th id=\"pagenav\" align=\"center\">");
if (total > 0 && (start > 0 || total > pageSize)) {
writePageNav(out, req, start, pageSize, total, noThinsp);
}
@ -832,7 +832,7 @@ public class I2PSnarkServlet extends BasicServlet {
out.write("<a href=\"" + _contextPath);
out.write(getQueryString(req, null, "", null));
out.write("\">");
out.write(toThemeImg("control_rewind_blue", _t("First"), _t("First page")));
out.write(toThemeImg("first", _t("First"), _t("First page")));
out.write("</a>&nbsp;");
int prev = Math.max(0, start - pageSize);
//if (prev > 0) {
@ -842,16 +842,16 @@ public class I2PSnarkServlet extends BasicServlet {
String sprev = (prev > 0) ? Integer.toString(prev) : "";
out.write(getQueryString(req, null, sprev, null));
out.write("\">");
out.write(toThemeImg("control_back_blue", _t("Prev"), _t("Previous page")));
out.write(toThemeImg("previous", _t("Prev"), _t("Previous page")));
out.write("</a>&nbsp;");
}
} else {
out.write(
"<img alt=\"\" border=\"0\" class=\"disable\" src=\"" +
_imgPath + "control_rewind_blue.png\">" +
_imgPath + "first.png\">" +
"&nbsp;" +
"<img alt=\"\" border=\"0\" class=\"disable\" src=\"" +
_imgPath + "control_back_blue.png\">" +
_imgPath + "previous.png\">" +
"&nbsp;");
}
// Page count
@ -875,7 +875,7 @@ public class I2PSnarkServlet extends BasicServlet {
out.write("&nbsp;<a href=\"" + _contextPath);
out.write(getQueryString(req, null, Integer.toString(next), null));
out.write("\">");
out.write(toThemeImg("control_play_blue", _t("Next"), _t("Next page")));
out.write(toThemeImg("next", _t("Next"), _t("Next page")));
out.write("</a>&nbsp;");
}
// Last
@ -883,15 +883,15 @@ public class I2PSnarkServlet extends BasicServlet {
out.write("&nbsp;<a href=\"" + _contextPath);
out.write(getQueryString(req, null, Integer.toString(last), null));
out.write("\">");
out.write(toThemeImg("control_fastforward_blue", _t("Last"), _t("Last page")));
out.write(toThemeImg("last", _t("Last"), _t("Last page")));
out.write("</a>&nbsp;");
} else {
out.write("&nbsp;" +
"<img alt=\"\" border=\"0\" class=\"disable\" src=\"" +
_imgPath + "control_play_blue.png\">" +
_imgPath + "next.png\">" +
"&nbsp;" +
"<img alt=\"\" border=\"0\" class=\"disable\" src=\"" +
_imgPath + "control_fastforward_blue.png\">");
_imgPath + "last.png\">");
}
}
@ -2071,24 +2071,26 @@ public class I2PSnarkServlet extends BasicServlet {
// *not* enctype="multipart/form-data", so that the input type=file sends the filename, not the file
out.write("<form action=\"_post\" method=\"POST\">\n");
writeHiddenInputs(out, req, "Add");
out.write("<div class=\"addtorrentsection\"><span class=\"snarkConfigTitle\">");
out.write("<div class=\"addtorrentsection\">");
out.write("<input class=\"toggle_input\" id=\"toggle_addtorrent\" type=\"checkbox\"><label class=\"toggleview\" for=\"toggle_addtorrent\">");
out.write(toThemeImg("add"));
out.write(' ');
out.write(_t("Add Torrent"));
out.write("</label>");
out.write("</span><hr>\n<table border=\"0\"><tr><td>");
out.write("<hr>\n<table border=\"0\"><tr><td>");
out.write(_t("From URL"));
out.write(":<td><input type=\"text\" name=\"nofilter_newURL\" size=\"85\" value=\"" + newURL + "\" spellcheck=\"false\"");
out.write(" title=\"");
out.write(_t("Enter the torrent file download URL (I2P only), magnet link, maggot link, or info hash"));
out.write("\"> \n");
out.write("\">\n");
// not supporting from file at the moment, since the file name passed isn't always absolute (so it may not resolve)
//out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>");
out.write("<input type=\"submit\" class=\"add\" value=\"");
out.write(_t("Add torrent"));
out.write("\" name=\"foo\" ><br>\n" +
"<tr><td>");
out.write(_t("Data dir"));
out.write(":<td><input type=\"text\" name=\"nofilter_newDir\" size=\"85\" value=\"\" spellcheck=\"false\"");
out.write(" title=\"");
@ -2102,17 +2104,17 @@ public class I2PSnarkServlet extends BasicServlet {
out.write("<br></span></table>\n");
out.write("</div></form></div>");
}
private void writeSeedForm(PrintWriter out, HttpServletRequest req, List<Tracker> sortedTrackers) throws IOException {
out.write("<a name=\"add\"></a><div class=\"newtorrentsection\"><div class=\"snarkNewTorrent\">\n");
// *not* enctype="multipart/form-data", so that the input type=file sends the filename, not the file
out.write("<form action=\"_post\" method=\"POST\">\n");
writeHiddenInputs(out, req, "Create");
out.write("<span class=\"snarkConfigTitle\">");
out.write("<input class=\"toggle_input\" id=\"toggle_createtorrent\" type=\"checkbox\"><label class=\"toggleview\" for=\"toggle_createtorrent\">");
out.write(toThemeImg("create"));
out.write(' ');
out.write(_t("Create Torrent"));
out.write("</span><hr>\n<table border=\"0\"><tr><td>");
out.write("</label><hr>\n<table border=\"0\"><tr><td>");
//out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n");
out.write(_t("Data to seed"));
out.write(":<td>"
@ -2120,20 +2122,23 @@ public class I2PSnarkServlet extends BasicServlet {
+ "\" spellcheck=\"false\" title=\"");
out.write(_t("File or directory to seed (full path or within the directory {0} )",
_manager.getDataDir().getAbsolutePath() + File.separatorChar));
out.write("\" ><tr><td>\n");
out.write("\" > <input type=\"submit\" class=\"create\" value=\"");
out.write(_t("Create torrent"));
out.write("\" name=\"foo\" >");
out.write("<tr><td>\n");
out.write(_t("Trackers"));
out.write(":<td><table style=\"width: 30%;\"><tr><td></td><td align=\"center\">");
out.write(":<td><table id=\"trackerselect\" style=\"width: 30%;\"><tr><td></td><td align=\"center\">");
out.write(_t("Primary"));
out.write("</td><td align=\"center\">");
out.write(_t("Alternates"));
out.write("</td><td rowspan=\"0\">" +
" <input type=\"submit\" class=\"create\" value=\"");
out.write(_t("Create torrent"));
out.write("\" name=\"foo\" >" +
"</td></tr>\n");
out.write("</td><td>");
out.write(_t("Tracker URL"));
out.write("</td></tr>\n");
for (Tracker t : sortedTrackers) {
String name = t.name;
String announceURL = t.announceURL.replace("&#61;", "=");
String homeURL = t.baseURL;
out.write("<tr><td>");
out.write(name);
out.write("</td><td align=\"center\"><input type=\"radio\" name=\"announceURL\" value=\"");
@ -2143,14 +2148,18 @@ public class I2PSnarkServlet extends BasicServlet {
out.write(" checked");
out.write("></td><td align=\"center\"><input type=\"checkbox\" name=\"backup_");
out.write(announceURL);
out.write("\" value=\"foo\"></td></tr>\n");
out.write("\" value=\"foo\"></td><td><a href=\"");
out.write(homeURL);
out.write("\">");
out.write(homeURL);
out.write("</a></td></tr>\n");
}
out.write("<tr><td><i>");
out.write(_t("none"));
out.write("</i></td><td align=\"center\"><input type=\"radio\" name=\"announceURL\" value=\"none\"");
if (_lastAnnounceURL == null)
out.write(" checked");
out.write("></td><td></td></tr></table>\n");
out.write("></td><td></td><td></td></tr></table>\n");
// make the user add a tracker on the config form now
//out.write(_t("or"));
//out.write("&nbsp;<input type=\"text\" name=\"announceURLOther\" size=\"57\" value=\"http://\" " +
@ -3314,10 +3323,11 @@ public class I2PSnarkServlet extends BasicServlet {
else if (mime.equals("text/plain") ||
mime.equals("text/x-sfv") ||
mime.equals("application/rtf") ||
mime.equals("application/epub+zip") ||
mime.equals("application/x-mobipocket-ebook") ||
plc.endsWith(".azw4"))
icon = "page";
else if (mime.equals("application/epub+zip") ||
mime.equals("application/x-mobipocket-ebook"))
icon = "ebook";
else if (mime.equals("application/java-archive") ||
plc.endsWith(".deb"))
icon = "package";
@ -3343,7 +3353,7 @@ public class I2PSnarkServlet extends BasicServlet {
icon = "compress";
else if (plc.endsWith(".exe"))
icon = "application";
else if (plc.endsWith(".iso"))
else if (plc.endsWith(".iso") || plc.endsWith(".nrg"))
icon = "cd";
else if (mime.equals("application/x-bittorrent"))
icon = "magnet";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 635 B

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 582 B

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -29,46 +29,42 @@
<% if (indexBean.allowCSS()) {
%><link rel="icon" href="<%=indexBean.getTheme()%>images/favicon.ico" />
<link href="<%=indexBean.getTheme()%>default.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
<link href="<%=indexBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
<link href="<%=indexBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
<% }
%>
</head>
<body id="tunnelListPage">
<div id="pageHeader">
</div>
<div id="statusMessagePanel" class="panel">
<div class="header">
<h4><%=intl._t("Status Messages")%></h4>
</div>
<div class="separator">
<hr />
</div>
<div class="panel">
<h2><%=intl._t("Status Messages")%></h2>
<table id="statusMessagesTable">
<tr>
<td id="tunnelMessages">
<textarea id="statusMessages" rows="4" cols="60" readonly="readonly"><jsp:getProperty name="indexBean" property="messages" /></textarea>
</td>
</tr>
<div class="separator">
<hr />
</div>
<div class="footer">
<div class="toolbox">
<tr>
<td class="buttons">
<a class="control" href="list"><%=intl._t("Refresh")%></a>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<%
if (indexBean.isInitialized()) {
String nextNonce = net.i2p.i2ptunnel.web.IndexBean.getNextNonce();
%>
<div id="globalOperationsPanel" class="panel">
<div class="header"></div>
<div class="footer">
<div class="toolbox">
<div class="panel" id="globalTunnelControl">
<h2><%=intl._t("Global Tunnel Control")%></h2>
<table>
<tr>
<td class="buttons">
<a class="control" href="wizard"><%=intl._t("Tunnel Wizard")%></a>
<a class="control" href="list?nonce=<%=nextNonce%>&amp;action=Stop%20all"><%=intl._t("Stop All")%></a>
<a class="control" href="list?nonce=<%=nextNonce%>&amp;action=Start%20all"><%=intl._t("Start All")%></a>
@ -77,52 +73,44 @@
//this is really bad because it stops and restarts all tunnels, which is probably not what you want
<a class="control" href="list?nonce=<%=nextNonce%>&amp;action=Reload%20configuration"><%=intl._t("Reload Config")%></a>
--%>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="panel">
<h2><%=intl._t("I2P Hidden Services")%></h2>
<table id="serverTunnels">
<tr>
<th class="tunnelName"><%=intl._t("Name")%></th>
<th class="tunnelType"><%=intl._t("Type")%></th>
<th class="tunnelLocation"><%=intl._t("Points at")%></th>
<th class="tunnelPreview"><%=intl._t("Preview")%></th>
<th class="tunnelStatus"><%=intl._t("Status")%></th>
<th class="tunnelControl"><%=intl._t("Control")%></th>
</tr>
<div id="localServerTunnelList" class="panel">
<div class="header">
<h4><%=intl._t("I2P Hidden Services")%></h4>
</div>
<div class="separator"> </div>
<div class="nameHeaderField rowItem">
<label><%=intl._t("Name")%>:</label>
</div>
<div class="previewHeaderField rowItem">
<label><%=intl._t("Points at")%>:</label>
</div>
<div class="targetHeaderField rowItem">
<label><%=intl._t("Preview")%>:</label>
</div>
<div class="statusHeaderField rowItem">
<label><%=intl._t("Status")%>:</label>
<hr /> </div>
<%
for (int curServer = 0; curServer < indexBean.getTunnelCount(); curServer++) {
if (indexBean.isClient(curServer)) continue;
%>
<div class="nameField rowItem">
<label><%=intl._t("Name")%>:</label>
<span class="text"><a href="edit?tunnel=<%=curServer%>" title="Edit Server Tunnel Settings for <%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a></span>
</div>
<div class="previewField rowItem">
<label><%=intl._t("Points at")%>:</label>
<span class="text">
<tr class="tunnelProperties">
<td class="tunnelName">
<a href="edit?tunnel=<%=curServer%>" title="<%=intl._t("Edit Server Tunnel Settings for")%>&nbsp;<%=indexBean.getTunnelName(curServer)%>"><%=indexBean.getTunnelName(curServer)%></a>
</td>
<td class="tunnelType"><%=indexBean.getTunnelType(curServer)%></td>
<td class="tunnelLocation">
<%
if (indexBean.isServerTargetLinkValid(curServer)) {
if (indexBean.isSSLEnabled(curServer)) { %>
<a href="https://<%=indexBean.getServerTarget(curServer)%>/" title="Test HTTPS server, bypassing I2P" target="_top"><%=indexBean.getServerTarget(curServer)%> SSL</a>
<a href="https://<%=indexBean.getServerTarget(curServer)%>/" title="<%=intl._t("Test HTTPS server, bypassing I2P")%>" target="_top"><%=indexBean.getServerTarget(curServer)%> SSL</a>
<% } else { %>
<a href="http://<%=indexBean.getServerTarget(curServer)%>/" title="Test HTTP server, bypassing I2P" target="_top"><%=indexBean.getServerTarget(curServer)%></a>
<a href="http://<%=indexBean.getServerTarget(curServer)%>/" title="<%=intl._t("Test HTTP server, bypassing I2P")%>" target="_top"><%=indexBean.getServerTarget(curServer)%></a>
<%
}
} else {
@ -133,64 +121,66 @@
<%
}
}
%></span>
</div>
<div class="targetField rowItem">
%>
</td>
<td class="tunnelPreview">
<%
if (("httpserver".equals(indexBean.getInternalType(curServer)) || ("httpbidirserver".equals(indexBean.getInternalType(curServer)))) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) {
%><label><%=intl._t("Preview")%>:</label>
<a class="control" title="Test HTTP server through I2P" href="http://<%=indexBean.getDestHashBase32(curServer)%>" target="_top"><%=intl._t("Preview")%></a>
%>
<a class="control" title="<%=intl._t("Test HTTP server through I2P")%>" href="http://<%=indexBean.getDestHashBase32(curServer)%>" target="_top"><%=intl._t("Preview")%></a>
<%
} else if (indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) {
%><span class="text"><%=intl._t("Base32 Address")%>:<br /><%=indexBean.getDestHashBase32(curServer)%></span>
%><%=intl._t("Base32 Address")%>:<%=indexBean.getDestHashBase32(curServer)%>
<%
} else {
%><span class="comment"><%=intl._t("No Preview")%></span>
%><%=intl._t("No Preview")%>
<%
}
%></div>
<div class="statusField rowItem">
<label><%=intl._t("Status")%>:</label>
%>
</td>
<td class="tunnelStatus">
<%
switch (indexBean.getTunnelStatus(curServer)) {
case IndexBean.STARTING:
%><div class="statusStarting text"><%=intl._t("Starting...")%></div>
<a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curServer%>"><%=intl._t("Stop")%></a>
%><div class="statusStarting text" title="<%=intl._t("Starting...")%>"><%=intl._t("Starting...")%></div>
</td>
<td class="tunnelControl">
<a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curServer%>"><%=intl._t("Stop")%></a>
<%
break;
case IndexBean.RUNNING:
%><div class="statusRunning text"><%=intl._t("Running")%></div>
<a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curServer%>"><%=intl._t("Stop")%></a>
%><div class="statusRunning text" title="<%=intl._t("Running")%>"><%=intl._t("Running")%></div>
</td>
<td class="tunnelControl">
<a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curServer%>"><%=intl._t("Stop")%></a>
<%
break;
case IndexBean.NOT_RUNNING:
%><div class="statusNotRunning text"><%=intl._t("Stopped")%></div>
<a class="control" title="Start this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=start&amp;tunnel=<%=curServer%>"><%=intl._t("Start")%></a>
%><div class="statusNotRunning text" title="<%=intl._t("Stopped")%>"><%=intl._t("Stopped")%></div>
</td>
<td class="tunnelControl">
<a class="control" title="<%=intl._t("Start this Tunnel")%>" href="list?nonce=<%=nextNonce%>&amp;action=start&amp;tunnel=<%=curServer%>"><%=intl._t("Start")%></a>
<%
break;
}
%></div>
%>
</td>
</tr>
<tr>
<td class="tunnelDescription" colspan="6">
<span class="tunnelDescriptionLabel"><b>Description:</b></span>
<%=indexBean.getTunnelDescription(curServer)%>
</td>
</tr>
<div class="descriptionField rowItem">
<label><%=intl._t("Description")%>:</label>
<div class="text"><%=indexBean.getTunnelDescription(curServer)%></div>
</div>
<div class="subdivider">
<hr />
</div>
<%
}
%>
<div class="separator">
<hr />
</div>
<div class="footer">
<form id="addNewServerTunnelForm" action="edit">
<div class="toolbox">
<label><%=intl._t("New hidden service")%>:</label>
<tr>
<td class="newTunnel" colspan="6">
<form id="addNewServerTunnelForm" action="edit">
<b><%=intl._t("New hidden service")%>:</b>&nbsp;
<select name="type">
<option value="httpserver">HTTP</option>
<option value="server"><%=intl._t("Standard")%></option>
@ -199,66 +189,36 @@
<option value="streamrserver">Streamr</option>
</select>
<input class="control" type="submit" value="<%=intl._t("Create")%>" />
</div>
</form>
</div>
</div>
</td>
</tr>
</table>
<h2><%=intl._t("I2P Client Tunnels")%></h2>
<table id="clientTunnels">
<tr>
<th class="tunnelName"><%=intl._t("Name")%></th>
<th class="tunnelType"><%=intl._t("Type")%></th>
<th class="tunnelInterface"><%=intl._t("Interface")%></th>
<th class="tunnelPort"><%=intl._t("Port")%></th>
<th class="tunnelStatus"><%=intl._t("Status")%></th>
<th class="tunnelControl"><%=intl._t("Control")%></th>
</tr>
<div id="localClientTunnelList" class="panel">
<div class="header">
<h4><%=intl._t("I2P Client Tunnels")%></h4>
</div>
<div class="separator"> </div>
<div class="nameHeaderField rowItem">
<label><%=intl._t("Name")%>:</label>
</div>
<div class="portHeaderField rowItem">
<label><%=intl._t("Port")%>:</label>
</div>
<div class="typeHeaderField rowItem">
<label><%=intl._t("Type")%>:</label>
</div>
<div class="interfaceHeaderField rowItem">
<label><%=intl._t("Interface")%>:</label>
</div>
<div class="statusHeaderField rowItem">
<label><%=intl._t("Status")%>:</label>
</div>
<div class="separator">
<hr />
</div>
<%
for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) {
if (!indexBean.isClient(curClient)) continue;
%>
<div class="nameField rowItem">
<label><%=intl._t("Name")%>:</label>
<span class="text"><a href="edit?tunnel=<%=curClient%>" title="Edit Tunnel Settings for <%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a></span>
</div>
<div class="portField rowItem">
<label><%=intl._t("Port")%>:</label>
<span class="text">
<%
String cPort= indexBean.getClientPort2(curClient);
out.write(cPort);
if (indexBean.isSSLEnabled(curClient))
out.write(" SSL");
%>
</span>
</div>
<div class="typeField rowItem">
<label><%=intl._t("Type")%>:</label>
<span class="text"><%=indexBean.getTunnelType(curClient)%></span>
</div>
<div class="interfaceField rowItem">
<label><%=intl._t("Interface")%>:</label>
<span class="text">
%>
<tr class="tunnelProperties">
<td class="tunnelName">
<a href="edit?tunnel=<%=curClient%>" title="<%=intl._t("Edit Tunnel Settings for")%>&nbsp;<%=indexBean.getTunnelName(curClient)%>"><%=indexBean.getTunnelName(curClient)%></a>
</td>
<td class="tunnelType"><%=indexBean.getTunnelType(curClient)%></td>
<td class="tunnelInterface">
<%
/* should only happen for streamr client */
String cHost= indexBean.getClientInterface(curClient);
@ -270,45 +230,60 @@
out.write(cHost);
}
%>
</span>
</div>
<div class="statusField rowItem">
<label><%=intl._t("Status")%>:</label>
</td>
<td class="tunnelPort">
<%
String cPort= indexBean.getClientPort2(curClient);
out.write(cPort);
if (indexBean.isSSLEnabled(curClient))
out.write(" SSL");
%>
</td>
<td class="tunnelStatus">
<%
switch (indexBean.getTunnelStatus(curClient)) {
case IndexBean.STARTING:
%><div class="statusStarting text"><%=intl._t("Starting...")%></div>
<a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
%><div class="statusStarting text" title="<%=intl._t("Starting...")%>"><%=intl._t("Starting...")%></div>
</td>
<td class="tunnelControl">
<a class="control" title="<%=intl._t("Stop this Tunnel")%>" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
<%
break;
case IndexBean.STANDBY:
%><div class="statusStarting text"><%=intl._t("Standby")%></div>
%><div class="statusStarting text" title="<%=intl._t("Standby")%>"><%=intl._t("Standby")%></div>
</td>
<td class="tunnelControl">
<a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
<%
break;
case IndexBean.RUNNING:
%><div class="statusRunning text"><%=intl._t("Running")%></div>
%><div class="statusRunning text" title="<%=intl._t("Running")%>"><%=intl._t("Running")%></div>
</td>
<td class="tunnelControl">
<a class="control" title="Stop this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=stop&amp;tunnel=<%=curClient%>"><%=intl._t("Stop")%></a>
<%
break;
case IndexBean.NOT_RUNNING:
%><div class="statusNotRunning text"><%=intl._t("Stopped")%></div>
<a class="control" title="Start this Tunnel" href="list?nonce=<%=nextNonce%>&amp;action=start&amp;tunnel=<%=curClient%>"><%=intl._t("Start")%></a>
%><div class="statusNotRunning text" title="<%=intl._t("Stopped")%>"><%=intl._t("Stopped")%></div>
</td>
<td class="tunnelControl">
<a class="control" title="<%=intl._t("Start this Tunnel")%>" href="list?nonce=<%=nextNonce%>&amp;action=start&amp;tunnel=<%=curClient%>"><%=intl._t("Start")%></a>
<%
break;
}
%></div>
<div class="destinationField rowItem">
<label>
%>
</td>
</tr>
<tr>
<td class="tunnelDestination" colspan="6">
<span class="tunnelDestinationLabel">
<% if ("httpclient".equals(indexBean.getInternalType(curClient)) || "connectclient".equals(indexBean.getInternalType(curClient)) ||
"sockstunnel".equals(indexBean.getInternalType(curClient)) || "socksirctunnel".equals(indexBean.getInternalType(curClient))) { %>
<%=intl._t("Outproxy")%>:
<b><%=intl._t("Outproxy")%>:</b>
<% } else { %>
<%=intl._t("Destination")%>:
<b><%=intl._t("Destination")%>:</b>
<% } %>
</label>
<div class="text">
</span>
<%
if (indexBean.getIsUsingOutproxyPlugin(curClient)) {
%><%=intl._t("internal plugin")%><%
@ -322,30 +297,22 @@
%><i><%=intl._t("none")%></i><%
}
} %>
</div>
</div>
</td>
</tr>
<% /* TODO SSL outproxy for httpclient if plugin not present */ %>
<div class="descriptionField rowItem">
<label><%=intl._t("Description")%>:</label>
<div class="text"><%=indexBean.getTunnelDescription(curClient)%></div>
</div>
<div class="subdivider">
<hr />
</div>
<tr>
<td class="tunnelDescription" colspan="6">
<span class="tunnelDescriptionLabel"><b><%=intl._t("Description")%>:</b></span>
<%=indexBean.getTunnelDescription(curClient)%>
</td>
</tr>
<%
}
%>
<div class="separator">
<hr />
</div>
<div class="footer">
%>
<tr>
<td class="newTunnel" colspan="6">
<form id="addNewClientTunnelForm" action="edit">
<div class="toolbox">
<label><%=intl._t("New client tunnel")%>:</label>
<b><%=intl._t("New client tunnel")%>:</b>&nbsp;
<select name="type">
<option value="client"><%=intl._t("Standard")%></option>
<option value="httpclient">HTTP/CONNECT</option>
@ -356,16 +323,17 @@
<option value="streamrclient">Streamr</option>
</select>
<input class="control" type="submit" value="<%=intl._t("Create")%>" />
</div>
</form>
</div>
</div>
</td>
</tr>
</table>
</div>
<%
} // isInitialized()
%>
<div id="pageFooter">
</div>
</body>
</html>

View File

@ -29,25 +29,22 @@
<% if (editBean.allowCSS()) {
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
<link href="<%=editBean.getTheme()%>default.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
<link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
<link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
<% }
%>
<style type='text/css'>
input.default { width: 1px; height: 1px; visibility: hidden; }
</style>
</head>
<body id="tunnelEditPage">
<div id="pageHeader">
</div>
<body id="tunnelRegistration">
<%
if (editBean.isInitialized()) {
%>
<form method="post" enctype="multipart/form-data" action="register" accept-charset="UTF-8">
<div id="tunnelEditPanel" class="panel">
<div class="header">
<div class="panel" id="registration">
<%
String tunnelTypeName;
String tunnelType;
@ -55,11 +52,11 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
if (curTunnel >= 0) {
tunnelTypeName = editBean.getTunnelType(curTunnel);
tunnelType = editBean.getInternalType(curTunnel);
%><h4><%=intl._t("Registration Helper")%></h4><%
%><h2><%=intl._t("Registration Helper")%> (<%=editBean.getTunnelName(curTunnel)%>)</h2><%
} else {
tunnelTypeName = "new";
tunnelType = "new";
%><h4>Fail</h4><p>Tunnel not found</p><%
%><h2>Fail</h2><p>Tunnel not found</p><%
}
String b64 = editBean.getDestinationBase64(curTunnel);
String name = editBean.getSpoofedHost(curTunnel);
@ -70,85 +67,93 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" />
<input type="hidden" name="type" value="<%=tunnelType%>" />
<input type="submit" class="default" name="action" value="Save changes" />
</div>
<%
if (!"new".equals(tunnelType)) {
%>
<div class="rowItem"><span class="comment">
<table>
<tr>
<td class="infohelp">
<%=intl._t("Please be sure to select, copy, and paste the entire contents of the appropriate authentication data into the form of your favorite registration site")%>
</span><br /></div>
<div class="separator">
<hr />
</div>
<div id="nameField" class="rowItem">
<label for="name" accesskey="N">
<%=intl._t("Name")%>
</label>
<span class="text"><%=editBean.getTunnelName(curTunnel)%></span>
</div>
</td>
</tr>
<tr>
<td>
<b><%=intl._t("Tunnel Name")%>:</b> <%=editBean.getTunnelName(curTunnel)%>
</td>
</tr>
<%
if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) {
%><div id="websiteField" class="rowItem">
<label for="spoofedHost" accesskey="W">
<%=intl._t("Website name")%>
</label>
<span class="text"><%=editBean.getSpoofedHost(curTunnel)%></span>
</div>
%>
<tr><td><b><%=intl._t("Website Name")%>:</b> <%=editBean.getSpoofedHost(curTunnel)%></td></tr>
<%
}
%>
<div id="destinationField" class="rowItem">
<label for="localDestination" accesskey="L">
<%=intl._t("Local destination")%>
</label>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=editBean.getDestinationBase64(curTunnel)%></textarea>
</div>
<div class="subdivider">
<hr />
</div>
<tr>
<th>
<b><%=intl._t("Local Destination")%></b>
</th>
</tr>
<tr>
<td>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Read Only: Local Destination (if known)" wrap="off" spellcheck="false"><%=editBean.getDestinationBase64(curTunnel)%></textarea>
</td>
</tr>
<%
if (b64 == null || b64.length() < 516) {
%><%=intl._t("Local destination is not available. Start the tunnel.")%><%
%><tr><td class="infohelp"><%=intl._t("Local destination is not available. Start the tunnel.")%></td></tr><%
} else if (name == null || name.equals("") || name.contains(" ") || !name.endsWith(".i2p")) {
if (("httpserver".equals(tunnelType)) || ("httpbidirserver".equals(tunnelType))) {
%><%=intl._t("To enable registration verification, edit tunnel and set name (or website name) to a valid host name ending in '.i2p'")%><%
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name (or website name) to a valid host name ending in '.i2p'")%></td></tr><%
} else {
%><%=intl._t("To enable registration verification, edit tunnel and set name to a valid host name ending in '.i2p'")%><%
%><tr><td class="infohelp"><%=intl._t("To enable registration verification, edit tunnel and set name to a valid host name ending in '.i2p'")%></td></tr><%
}
} else {
SigningPrivateKey spk = editBean.getSigningPrivateKey(curTunnel);
if (spk == null) {
%><%=intl._t("Destination signing key is not available. Start the tunnel.")%><%
%><tr><td class="infohelp"><%=intl._t("Destination signing key is not available. Start the tunnel.")%></td></tr><%
} else {
valid = true;
OrderedProperties props = new OrderedProperties();
HostTxtEntry he = new HostTxtEntry(name, b64, props);
he.sign(spk);
%><div id="sigField" class="rowItem">
<label for="signature">
<%=intl._t("Authentication for adding host")%>
</label>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea>
</div>
</div>
<div id="tunnelAdvancedNetworking" class="panel">
<div class="header">
<h4><%=intl._t("Advanced authentication strings")%></h4>
</div>
%>
<tr>
<th>
<%=intl._t("Authentication for adding host {0}", name)%>
</th>
</tr>
<tr>
<td>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false" class="authentication"><% he.write(out); %></textarea>
</td>
</tr>
</table>
<h3><%=intl._t("Advanced authentication strings")%></h3>
<%
props.remove(HostTxtEntry.PROP_SIG);
props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_REMOVE);
he.signRemove(spk);
%><div id="sigField" class="rowItem">
<label for="signature">
<%=intl._t("Authentication for removing host")%>
</label>
<textarea rows="1" style="height: 3em; margin: 0 10px 0 0;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.writeRemove(out); %></textarea>
<span class="comment"><%=intl._t("This will remove the entry for {0}", name)%></span>
</div>
<div class="separator">
<hr />
</div>
%>
<table>
<tr>
<th>
<%=intl._t("Authentication for removing host {0}", name)%>
</th>
</tr>
<tr>
<td>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false" class="authentication"><% he.writeRemove(out); %></textarea>
</td>
</tr>
<%
String oldname = wrequest.getParameter("oldname");
String olddestfile = wrequest.getFilename("olddestfile");
@ -171,106 +176,154 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
}
}
props.remove(HostTxtEntry.PROP_SIG);
%><div id="sigField" class="rowItem">
<label for="signature">
%>
<tr>
<th>
<%=intl._t("Authentication for changing name")%>
</label>
</th>
</tr>
<%
if (oldname != null && oldname.length() > 0 && !oldname.equals(name)) {
props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_CHANGENAME);
props.setProperty(HostTxtEntry.PROP_OLDNAME, oldname);
he.sign(spk);
%><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea>
<span class="comment"><%=intl._t("This will change the name from {0} to {1}, using the same destination", oldname, name)%></span>
%>
<tr>
<td>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false" class="authentication"><% he.write(out); %></textarea>
</td>
</tr>
<tr>
<td class="infohelp">
<%=intl._t("This will change the name from {0} to {1}, using the same destination", oldname, name)%>
</td>
</tr>
<%
} else {
%><span class="comment"><%=intl._t("This tunnel must be configured with the new host name.")%></span>
<span class="comment"><%=intl._t("Enter old host name below.")%></span>
%><tr><td class="infohelp"><%=intl._t("This tunnel must be configured with the new host name.")%>
&nbsp;<%=intl._t("Enter old hostname below.")%></td></tr>
<%
}
%></div>
<div class="separator">
<hr />
</div>
%>
<%
props.remove(HostTxtEntry.PROP_SIG);
%><div id="sigField" class="rowItem">
<label for="signature">
%>
<tr>
<th>
<%=intl._t("Authentication for adding alias")%>
</label>
</th>
</tr>
<%
if (oldname != null && oldname.length() > 0 && !oldname.equals(name)) {
props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_ADDNAME);
props.setProperty(HostTxtEntry.PROP_OLDNAME, oldname);
he.sign(spk);
%><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea>
<span class="comment"><%=intl._t("This will add an alias {0} for {1}, using the same destination", name, oldname)%></span>
%>
<tr>
<td>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false" class="authentication"><% he.write(out); %></textarea>
</td>
</tr>
<tr>
<td class="infohelp">
<%=intl._t("This will add an alias {0} for {1}, using the same destination", name, oldname)%>
</td>
</tr>
<%
} else {
%><span class="comment"><%=intl._t("This tunnel must be configured with the new host name.")%></span>
<span class="comment"><%=intl._t("Enter old host name below.")%></span>
%><tr> <td class="infohelp"><%=intl._t("This tunnel must be configured with the new host name.")%>
&nbsp;<%=intl._t("Enter old hostname below.")%></td></tr>
<%
}
%></div>
<div class="separator">
<hr />
</div>
%>
<%
props.remove(HostTxtEntry.PROP_SIG);
%><div id="sigField" class="rowItem">
<label for="signature">
%>
<tr>
<th>
<%=intl._t("Authentication for changing destination")%>
</label>
</th>
</tr>
<%
if (spk2 != null) {
props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_CHANGEDEST);
props.setProperty(HostTxtEntry.PROP_OLDDEST, olddest);
he.signInner(spk2);
he.sign(spk);
%><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea>
<span class="comment"><%=intl._t("This will change the destination for {0}", name)%></span>
%>
<tr>
<td>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false" class="authentication"><% he.write(out); %></textarea>
</td>
</tr>
<tr>
<td class="infohelp">
<%=intl._t("This will change the destination for {0}", name)%>
</td>
</tr>
<%
} else {
%><span class="comment"><%=intl._t("This tunnel must be configured with the new destination.")%></span>
<span class="comment"><%=intl._t("Enter old destination below.")%></span>
%><tr><td class="infohelp"><%=intl._t("This tunnel must be configured with the new destination.")%>
&nbsp;<%=intl._t("Enter old destination below.")%></td></tr>
<%
}
%></div>
<div class="separator">
<hr />
</div>
%>
<%
props.remove(HostTxtEntry.PROP_SIG);
props.remove(HostTxtEntry.PROP_OLDSIG);
%><div id="sigField" class="rowItem">
<label for="signature" style="height: 42px;" >
%>
<tr>
<th>
<%=intl._t("Authentication for adding alternate destination")%>
</label>
</th>
</tr>
<%
if (spk2 != null) {
props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_ADDDEST);
props.setProperty(HostTxtEntry.PROP_OLDDEST, olddest);
he.signInner(spk2);
he.sign(spk);
%><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea>
<span class="comment"><%=intl._t("This will add an alternate destination for {0}", name)%></span>
%>
<tr>
<td>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false" class="authentication"><% he.write(out); %></textarea>
</td>
</tr>
<tr>
<td class="infohelp">
<%=intl._t("This will add an alternate destination for {0}", name)%>
</td>
</tr>
<%
} else {
%><span class="comment"><%=intl._t("This tunnel must be configured with the new destination.")%></span>
<span class="comment"><%=intl._t("Enter old destination below.")%></span>
%><tr><td class="infohelp"><%=intl._t("This tunnel must be configured with the new destination.")%>
&nbsp;<%=intl._t("Enter old destination below.")%></td></tr>
<%
}
%></div>
<div class="separator">
<hr />
</div>
%>
<%
props.remove(HostTxtEntry.PROP_SIG);
props.remove(HostTxtEntry.PROP_OLDSIG);
%><div id="sigField" class="rowItem">
<label for="signature">
%>
<tr>
<th>
<%=intl._t("Authentication for adding subdomain")%>
</label>
</th>
</tr>
<%
if (oldname != null && oldname.length() > 0 && !oldname.equals(name) && spk2 != null) {
props.setProperty(HostTxtEntry.PROP_ACTION, HostTxtEntry.ACTION_ADDSUBDOMAIN);
@ -278,73 +331,98 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
props.setProperty(HostTxtEntry.PROP_OLDDEST, olddest);
he.signInner(spk2);
he.sign(spk);
%><textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he.write(out); %></textarea>
<span class="comment"><%=intl._t("This will add a subdomain {0} of {1}, with a different destination", name, oldname)%></span>
%>
<tr>
<td>
<textarea rows="1" style="height: 3em;" cols="60" readonly="readonly" title="Copy and paste this to the registration site" wrap="off" spellcheck="false" class="authentication"><% he.write(out); %></textarea>
</td>
</tr>
<tr>
<td class="infohelp">
<%=intl._t("This will add a subdomain {0} of {1}, with a different destination", name, oldname)%>
</td>
</tr>
<%
} else {
%><span class="comment"><%=intl._t("This tunnel must be configured with the new subdomain and destination.")%></span>
<span class="comment"><%=intl._t("Enter higher-level domain and destination below.")%></span>
%>
<tr>
<td class="infohelp">
<%=intl._t("This tunnel must be configured with the new subdomain and destination.")%>
&nbsp;<%=intl._t("Enter higher-level domain and destination below.")%>
</td>
</tr>
<%
}
%></div>
%>
<div class="footer">
</div>
<%
} // spk != null
} // valid b64 and name
} // !"new".equals(tunnelType)
if (!valid && curTunnel >= 0) {
%><a href="edit?tunnel=<%=curTunnel%>"><%=intl._t("Go back and edit the tunnel")%></a><%
%>
<tr>
<td>
<a href="edit?tunnel=<%=curTunnel%>"><%=intl._t("Go back and edit the tunnel")%></a>
</td>
</tr>
<%
}
%>
</div>
<%
if (valid) {
%>
<div id="globalOperationsPanel" class="panel">
<div class="header">
<h4><%=intl._t("Specify old name and destination")%></h4>
</div>
<span class="comment">
<%=intl._t("This is only required for advanced authentication.")%>
<%=intl._t("See above for required items.")%>
</span><br />
<tr>
<th>
<%=intl._t("Specify old name and destination")%>
</th>
</tr>
<tr>
<td class="infohelp">
<%=intl._t("This is only required for advanced authentication.")%>
&nbsp;<%=intl._t("See above for required items.")%>
</td>
</tr>
<%
String oldname = wrequest.getParameter("oldname");
if (oldname == null) oldname = "";
%><div id="sigField" class="rowItem">
<label for="signature">
<%=intl._t("Old Host Name")%>
</label>
<input type="text" size="30" maxlength="50" name="oldname" id="name" title="Old Host Name" value="<%=oldname%>" class="freetext" />
</div>
<div id="sigField" class="rowItem">
<label for="signature">
<%=intl._t("Private Key File for old Destination")%>
</label>
<input type="file" size="50%" name="olddestfile" id="name" value="" />
</div>
<div class="footer">
<div class="toolbox">
%>
<tr>
<td>
<b><%=intl._t("Old Hostname")%>:</b>
<input type="text" size="30" maxlength="50" name="oldname" id="oldName" title="Old Hostname" value="<%=oldname%>" class="freetext" />
</td>
</tr>
<tr>
<td>
<b><%=intl._t("Private Key File for old Destination")%>:</b>
<input type="file" name="olddestfile" id="oldDestFile" value="" />
</td>
</tr>
<tr>
<td class="buttons">
<input type="hidden" value="true" name="removeConfirm" />
<button id="controlCancel" class="control" type="submit" name="action" value="" title="Cancel"><%=intl._t("Cancel")%></button>
<button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="authenticate" title="Generate Authentication"><%=intl._t("Generate")%></button>
</div>
</div>
</div>
</td>
</tr>
<%
} // valid
%>
</table>
</div>
</form>
<div id="pageFooter">
</div>
<%
} else {
%>Tunnels are not initialized yet, please reload in two minutes.<%
%><div id="notReady"><%=intl._t("Tunnels are not initialized yet, please reload in two minutes.")%></div><%
} // isInitialized()
%>

View File

@ -63,48 +63,45 @@
<% if (editBean.allowCSS()) {
%><link rel="icon" href="<%=editBean.getTheme()%>images/favicon.ico" />
<link href="<%=editBean.getTheme()%>default.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
<link href="<%=editBean.getTheme()%>i2ptunnel.css?<%=net.i2p.CoreVersion.VERSION%>" rel="stylesheet" type="text/css" />
<% }
%>
</head>
<body id="tunnelWizardPage">
<div id="pageHeader">
</div>
<form method="post" action="<%=(curPage == 7 ? "list" : "wizard") %>">
<div id="wizardPanel" class="panel">
<div class="header">
<%
if (curPage == 1) {
%><h4><%=intl._t("Server or client tunnel?")%></h4><%
%><h2><%=intl._t("Server or client tunnel?")%></h2><%
} else if (curPage == 2) {
%><h4><%=intl._t("Tunnel type")%></h4><%
%><h2><%=intl._t("Tunnel type")%></h2><%
} else if (curPage == 3) {
%><h4><%=intl._t("Tunnel name and description")%></h4><%
%><h2><%=intl._t("Tunnel name and description")%></h2><%
} else if (curPage == 4 && tunnelIsClient) {
%><h4><%=intl._t("Tunnel destination")%></h4><%
%><h2><%=intl._t("Tunnel destination")%></h2><%
} else if (curPage == 5) {
%><h4><%=intl._t("Binding address and port")%></h4><%
%><h2><%=intl._t("Binding address and port")%></h2><%
} else if (curPage == 6) {
%><h4><%=intl._t("Tunnel auto-start")%></h4><%
%><h2><%=intl._t("Tunnel auto-start")%></h2><%
} else if (curPage == 7) {
%><h4><%=intl._t("Wizard completed")%></h4><%
%><h2><%=intl._t("Wizard completed")%></h2><%
} %>
<input type="hidden" name="page" value="<%=curPage%>" />
<input type="hidden" name="tunnel" value="null" />
<input type="hidden" name="nonce" value="<%=net.i2p.i2ptunnel.web.IndexBean.getNextNonce()%>" />
</div>
<div class="separator">
<hr />
</div>
<table>
<% /* Page 1 - Whether to make a client or server tunnel */
if (curPage == 1) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("This wizard will take you through the various options available for creating tunnels in I2P.")%>
</p>
<p>
@ -112,12 +109,22 @@
<%=intl._t("If you need to connect to a remote service, such as an IRC server inside I2P or a code repository, then you will require a CLIENT tunnel.")%>
<%=intl._t("On the other hand, if you wish to host a service for others to connect to you'll need to create a SERVER tunnel.")%>
</p>
<div id="typeField" class="rowItem">
<label><%=intl._t("Server Tunnel")%></label>
</td>
</tr>
<tr>
<td class="options">
<span class="multiOption" id="isServer">
<input value="false" type="radio" id="baseType" name="isClient" class="tickbox" />
<label><%=intl._t("Client Tunnel")%></label>
&nbsp;<%=intl._t("Server Tunnel")%>
</span>
<span class="multiOption" id="isClient">
<input value="true" type="radio" id="baseType" name="isClient" class="tickbox" checked="checked" />
</div><%
&nbsp;<%=intl._t("Client Tunnel")%>
</span>
</td>
</tr>
<%
} else {
%><input type="hidden" name="isClient" value="<%=tunnelIsClient%>" /><%
} /* curPage 1 */
@ -127,10 +134,18 @@
<% /* Page 2 - Tunnel type */
if (curPage == 2) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("There are several types of tunnels to choose from:")%>
</p>
<table><%
</td>
</tr>
<tr>
<td id="wizardTable">
<table id="wizardTunnelTypes">
<%
if (tunnelIsClient) {
%>
<tr><td><%=intl._t("Standard")%></td><td>
@ -189,8 +204,12 @@
</td></tr><%
}
%>
</table>
<div id="typeField" class="rowItem">
<tr>
<td>
<%=intl._t("Select tunnel type")%>:
</td>
<td>
<%
if (tunnelIsClient) {
%><select name="type">
@ -211,7 +230,12 @@
<option value="streamrserver">Streamr</option>
</select><%
} /* tunnelIsClient */ %>
</div><%
</td>
</tr>
</table>
</td>
</tr>
<%
} else {
%><input type="hidden" name="type" value="<%=tunnelType%>" /><%
} /* curPage 2 */
@ -221,22 +245,28 @@
<% /* Page 3 - Name and description */
if (curPage == 3) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("Choose a name and description for your tunnel.")%>
<%=intl._t("These can be anything you want - they are just for ease of identifying the tunnel in the routerconsole.")%>
</p>
<div id="nameField" class="rowItem">
<label for="name" accesskey="N">
<%=intl._t("Name")%>:(<span class="accessKey">N</span>)
</label>
<input type="text" size="30" maxlength="50" name="name" id="name" title="Tunnel Name" value="<%=(!"null".equals(request.getParameter("name")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("name")) : "" ) %>" class="freetext" />
</div>
<div id="descriptionField" class="rowItem">
<label for="description" accesskey="e">
<%=intl._t("Description")%>:(<span class="accessKey">E</span>)
</label>
</td>
</tr>
<tr>
<td>
<span class="tag"><%=intl._t("Name")%>:</span>
<input type="text" size="30" maxlength="50" name="name" id="name" placeholder="New Tunnel" title="Tunnel Name" value="<%=(!"null".equals(request.getParameter("name")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("name")) : "" ) %>" class="freetext" />
</td>
</tr>
<tr>
<td>
<span class="tag"><%=intl._t("Description")%>:</span>
<input type="text" size="60" maxlength="80" name="nofilter_description" id="description" title="Tunnel Description" value="<%=(!"null".equals(request.getParameter("nofilter_description")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description")) : "" ) %>" class="freetext" />
</div><%
</td>
</tr>
<%
} else {
%><input type="hidden" name="name" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%>" />
<input type="hidden" name="nofilter_description" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%>" /><%
@ -249,36 +279,47 @@
if (tunnelIsClient) {
if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) {
if (curPage == 4) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("If you know of any outproxies for this type of tunnel (either HTTP or SOCKS), fill them in below.")%>
<%=intl._t("Separate multiple proxies with commas.")%>
</p>
<div id="destinationField" class="rowItem">
<label for="proxyList" accesskey="x">
<%=intl._t("Outproxies")%>(<span class="accessKey">x</span>):
</label>
</td>
</tr>
<tr>
<td>
<span class="tag"><%=intl._t("Outproxies")%>:</span>
<input type="text" size="30" id="proxyList" name="proxyList" title="List of Outproxy I2P destinations" value="<%=(!"null".equals(request.getParameter("proxyList")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList")) : "" ) %>" class="freetext" />
</div><%
</td>
</tr>
<%
} else {
%><input type="hidden" name="proxyList" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("proxyList"))%>" /><%
} /* curPage 4 */
} else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) {
if (curPage == 4) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("Type in the I2P destination of the service that this client tunnel should connect to.")%>
<%=intl._t("This could be the full base 64 destination key, or an I2P URL from your address book.")%>
</p>
<div id="destinationField" class="rowItem">
<label for="targetDestination" accesskey="T">
<%=intl._t("Tunnel Destination")%>(<span class="accessKey">T</span>):
</label>
</td>
</tr>
<tr>
<td>
<span class="tag"><%=intl._t("Tunnel Destination")%>:</span>
<input type="text" size="30" id="targetDestination" name="targetDestination" title="Destination of the Tunnel" value="<%=(!"null".equals(request.getParameter("targetDestination")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination")) : "" ) %>" class="freetext" />
<span class="comment">(<%=intl._t("name, name:port, or destination")%>
&nbsp;(<%=intl._t("name, name:port, or destination")%>
<% if ("streamrclient".equals(tunnelType)) { /* deferred resolution unimplemented in streamr client */ %>
- <%=intl._t("b32 not recommended")%>
<% } %> )
</span>
</div><%
</td>
</tr>
<%
} else {
%><input type="hidden" name="targetDestination" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetDestination"))%>" /><%
} /* curPage 4 */
@ -291,16 +332,22 @@
if ((tunnelIsClient && "streamrclient".equals(tunnelType)) || (!tunnelIsClient && !"streamrserver".equals(tunnelType))) {
if (curPage == 5) {
%><p>
<%=intl._t("This is the IP that your service is running on, this is usually on the same machine so 127.0.0.1 is autofilled.")%><%
//XXX TODO<%=intl._t("For some reason streamrclient also uses this.")%>
%>
<tr>
<td>
<p>
<%=intl._t("This is the IP that your service is running on, this is usually on the same machine so 127.0.0.1 is autofilled.")%>
<% //TODO For some reason streamrclient also uses this. %>
</p>
<div id="hostField" class="rowItem">
<label for="targetHost" accesskey="H">
<%=intl._t("Host")%>(<span class="accessKey">H</span>):
</label>
<input type="text" size="20" id="targetHost" name="targetHost" title="Target Hostname or IP" value="<%=(!"null".equals(request.getParameter("targetHost")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost")) : "127.0.0.1" ) %>" class="freetext" />
</div><%
</td>
</tr>
<tr>
<td>
<span class="tag"><%=intl._t("Host")%>:</span>
<input type="text" size="20" id="targetHost" name="targetHost" title="Target Hostname or IP" placeholder="127.0.0.1" value="<%=(!"null".equals(request.getParameter("targetHost")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost")) : "127.0.0.1" ) %>" class="freetext" />
</td>
</tr>
<%
} else {
%><input type="hidden" name="targetHost" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%>" /><%
} /* curPage 5 */
@ -308,15 +355,21 @@
<%
if (!tunnelIsClient) {
if (curPage == 5) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("This is the port that the service is accepting connections on.")%>
</p>
<div id="portField" class="rowItem">
<label for="targetPort" accesskey="P">
<%=intl._t("Port")%>(<span class="accessKey">P</span>):
</label>
</td>
</tr>
<tr>
<td>
<span class="tag"><%=intl._t("Port")%>:</span>
<input type="text" size="6" maxlength="5" id="targetPort" name="targetPort" title="Target Port Number" value="<%=(!"null".equals(request.getParameter("targetPort")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort")) : "" ) %>" class="freetext" />
</div><%
</td>
</tr>
<%
} else {
%><input type="hidden" name="targetPort" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%>" /><%
} /* curPage 5 */
@ -324,16 +377,22 @@
<%
if (tunnelIsClient || "httpbidirserver".equals(tunnelType)) {
if (curPage == 5) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("This is the port that the client tunnel will be accessed from locally.")%>
<%=intl._t("This is also the client port for the HTTPBidir server tunnel.")%>
</p>
<div id="portField" class="rowItem">
<label for="port" accesskey="P">
<span class="accessKey">P</span>ort:
</label>
</td>
</tr>
<tr>
<td>
<span class="tag"><%=intl._t("Port")%>:</span>
<input type="text" size="6" maxlength="5" id="port" name="port" title="Access Port Number" value="<%=(!"null".equals(request.getParameter("port")) ? net.i2p.data.DataHelper.stripHTML(request.getParameter("port")) : "" ) %>" class="freetext" />
</div><%
</td>
</tr>
<%
} else {
%><input type="hidden" name="port" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%>" /><%
} /* curPage 5 */
@ -341,16 +400,20 @@
<%
if ((tunnelIsClient && !"streamrclient".equals(tunnelType)) || "httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) {
if (curPage == 5) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("How do you want this tunnel to be accessed? By just this machine, your entire subnet, or external internet?")%>
<%=intl._t("You will most likely want to just allow 127.0.0.1")%><%
//XXX TODO<%=intl._t("Note that it is relevant to most Client tunnels, and httpbidirserver and streamrserver tunnels.")%><%
//XXX TODO<%=intl._t("So the wording may need to change slightly for the client vs. server tunnels.")%>
//TODO Note that it is relevant to most Client tunnels, and httpbidirserver and streamrserver tunnels.
//TODO So the wording may need to change slightly for the client vs. server tunnels. %>
</p>
<div id="reachField" class="rowItem">
<label for="reachableBy" accesskey="r">
<%=intl._t("Reachable by")%>(<span class="accessKey">R</span>):
</label>
</td>
</tr>
<tr>
<td>
<span class="tag"><%=intl._t("Reachable by")%>:</span>
<select id="reachableBy" name="reachableBy" title="IP for Client Access" class="selectbox">
<%
String clientInterface = request.getParameter("reachableBy");
@ -369,7 +432,9 @@
}
%>
</select>
</div><%
</td>
</tr>
<%
} else {
%><input type="hidden" name="reachableBy" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%>" /><%
} /* curPage 5 */
@ -380,17 +445,22 @@
<% /* Page 6 - Automatic start */
if (curPage == 6) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("The I2P router can automatically start this tunnel for you when the router is started.")%>
<%=intl._t("This can be useful for frequently-used tunnels (especially server tunnels), but for tunnels that are only used occassionally it would mean that the I2P router is creating and maintaining unnecessary tunnels.")%>
</p>
<div id="startupField" class="rowItem">
<label for="startOnLoad" accesskey="a">
<%=intl._t("Auto Start")%>(<span class="accessKey">A</span>):
</label>
</td>
</tr>
<tr>
<td class="options">
<input value="1" type="checkbox" id="startOnLoad" name="startOnLoad" title="Start Tunnel Automatically"<%=("1".equals(request.getParameter("startOnLoad")) ? " checked=\"checked\"" : "")%> class="tickbox" />
<span class="comment"><%=intl._t("(Check the Box for 'YES')")%></span>
</div><%
&nbsp;<%=intl._t("Automatically start tunnel when router starts")%>
</td>
</tr>
<%
} else {
if ("1".equals(request.getParameter("startOnLoad"))) {
%><input type="hidden" name="startOnLoad" value="<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("startOnLoad"))%>" /><%
@ -402,7 +472,10 @@
<% /* Page 7 - Wizard complete */
if (curPage == 7) {
%><p>
%>
<tr>
<td>
<p>
<%=intl._t("The wizard has now collected enough information to create your tunnel.")%>
<%=intl._t("Upon clicking the Save button below, the wizard will set up the tunnel, and take you back to the main I2PTunnel page.")%>
<%
@ -417,7 +490,11 @@
<p>
<%=intl._t("Below is a summary of the options you chose:")%>
</p>
<table>
</td>
</tr>
<tr>
<td id="wizardTable">
<table id="wizardSummary">
<tr><td><%=intl._t("Server or client tunnel?")%></td><td>
<%=(tunnelIsClient ? "Client" : "Server")%>
</td></tr>
@ -440,10 +517,11 @@
Streamr<%
} %>
</td></tr>
<tr><td><%=intl._t("Tunnel name and description")%></td><td>
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%><br />
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%>
</td></tr><%
<tr><td><%=intl._t("Tunnel name")%></td>
<td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("name"))%></td></tr>
<tr><td><%=intl._t("Tunnel description")%></td>
<td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("nofilter_description"))%></td></tr>
<%
if (tunnelIsClient) { %>
<tr><td><%=intl._t("Tunnel destination")%></td><td><%
if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %>
@ -453,20 +531,20 @@
} %>
</td></tr><%
} %>
<tr><td><%=intl._t("Binding address and port")%></td><td><%
<%
if ((tunnelIsClient && "streamrclient".equals(tunnelType)) || (!tunnelIsClient && !"streamrserver".equals(tunnelType))) { %>
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%><br /><%
<tr><td><%=intl._t("Binding address")%></td><td>
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetHost"))%></td></tr><%
}
if (!tunnelIsClient) { %>
<%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%><br /><%
<tr><td><%=intl._t("Tunnel port")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("targetPort"))%></td></tr><%
}
if (tunnelIsClient || "httpbidirserver".equals(tunnelType)) { %>
<br /><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%><%
<tr><td><%=intl._t("Port")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("port"))%></td></tr><%
}
if ((tunnelIsClient && !"streamrclient".equals(tunnelType)) || "httpbidirserver".equals(tunnelType) || "streamrserver".equals(tunnelType)) { %>
<br /><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%><%
<tr><td><%=intl._t("Reachable by")%></td><td><%=net.i2p.data.DataHelper.stripHTML(request.getParameter("reachableBy"))%></td></tr><%
} %>
</td></tr>
<tr><td><%=intl._t("Tunnel auto-start")%></td><td><%
if ("1".equals(request.getParameter("startOnLoad"))) { %>
Yes<%
@ -475,6 +553,10 @@
} %>
</td></tr>
</table>
</td>
</tr>
<tr>
<td class="infohelp">
<p>
<%=intl._t("Alongside these basic settings, there are a number of advanced options for tunnel configuration.")%>
<%=intl._t("The wizard will set reasonably sensible default values for these, but you can view and/or edit these by clicking on the tunnel's name in the main I2PTunnel page.")%>
@ -524,35 +606,33 @@ http://stats.i2p/cgi-bin/jump.cgi?a=" /><%
<input type="hidden" name="totalHour" value="0" />
<input type="hidden" name="totalDay" value="0" />
<input type="hidden" name="maxStreams" value="0" />
<input type="hidden" name="cert" value="0" /><%
<input type="hidden" name="cert" value="0" />
</td>
</tr>
<%
} /* tunnelIsClient */
} /* curPage 7 */
/* End page 7 */ %>
</div>
<div id="globalOperationsPanel" class="panel">
<div class="header"></div>
<div class="footer">
<div class="toolbox">
<tr>
<td class="buttons">
<a class="control" href="list"><%=intl._t("Cancel")%></a>
<% if (curPage != 1 && curPage != 7) {
%><button id="controlPrevious" accesskey="P" class="control" type="submit" name="action" value="Previous page" title="Previous Page"><%=intl._t("Previous")%>(<span class="accessKey">P</span>)</button><%
%><button id="controlPrevious" class="control" type="submit" name="action" value="Previous page" title="Previous Page"><%=intl._t("Previous")%></button><%
} %>
<% if (curPage == 7) {
%><button id="controlSave" accesskey="S" class="control" type="submit" name="action" value="Save changes" title="Save Tunnel"><%=intl._t("Save Tunnel")%>(<span class="accessKey">S</span>)</button><%
%><button id="controlSave" class="control" type="submit" name="action" value="Save changes" title="Save Tunnel"><%=intl._t("Save Tunnel")%></button><%
} else if (curPage == 6) {
%><button id="controlFinish" accesskey="F" class="control" type="submit" name="action" value="Next page" title="Finish Wizard"><%=intl._t("Finish")%>(<span class="accessKey">F</span>)</button><%
%><button id="controlFinish" class="control" type="submit" name="action" value="Next page" title="Finish Wizard"><%=intl._t("Finish")%></button><%
} else {
%><button id="controlNext" accesskey="N" class="control" type="submit" name="action" value="Next page" title="Next Page"><%=intl._t("Next")%>(<span class="accessKey">N</span>)</button><%
%><button id="controlNext" class="control" type="submit" name="action" value="Next page" title="Next Page"><%=intl._t("Next")%></button><%
} %>
</div>
</div>
</td>
</tr>
</table>
</div>
</form>
<div id="pageFooter">
</div>
</body>
</html>

View File

@ -150,12 +150,13 @@ public class QRServlet extends HttpServlet {
if (text != null) {
BufferedImage bi = MatrixToImageWriter.toBufferedImage(matrix);
Graphics2D g = bi.createGraphics();
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
// anti-aliasing and hinting degrade text with 1bit input, so let's turn this off to improve quality
// g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
// g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
// g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
// g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
// g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
// g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
Font font = DEFAULT_LARGE_FONT;
g.setFont(font);
// doesn't work

View File

@ -3,31 +3,132 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Image Generator Webapp</title>
<title>[I2P] Image Generator Webapp</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" href="/themes/console/classic/images/favicon.ico">
<link rel="stylesheet" href="/themes/imagegen/imagegen.css" type="text/css">
</head>
<body>
<h2>Image Generator Webapp</h2>
<p>This is the webapp that creates identification images.</p>
<h2>Identicon Test</h2>
<img src="id?c=-2044886870&amp;s=15" width=15 height=15>
<img src="id?c=-2044886870&amp;s=21" width=21 height=21>
<img src="id?c=-2044886870&amp;s=30" width=30 height=30>
<img src="id?c=-2044886870&amp;s=48" width=48 height=48>
<img src="id?c=-2044886870&amp;s=64" width=64 height=64>
<img src="id?c=-2044886870&amp;s=128" width=128 height=128>
<h1>Image Generator Webapp</h1>
<h2>QR Test</h2>
<img src="qr?c=https%3a%2f%2fgeti2p.net%2f&amp;s=128&t=geti2p.net" width=128 height=128>
<img src="qr?c=https%3a%2f%2fgeti2p.net%2f&amp;s=256&t=geti2p.net" width=256 height=256>
<p>
This is the webapp that creates identification images. They can be found in the
<a href="http://127.0.0.1:7657/susidns/details?h=i2p-projekt.i2p">hostname details section</a>
of the addressbook, in the <a href="http://127.0.0.1:7657/netdb?f=3">Sybils section</a> of
the network database, and you can generate a QR code for your .i2p named website or hidden
service in the edit section of the <a href="http://127.0.0.1:7657/i2ptunnelmgr">Tunnel Manager</a>.
You can use the tools below to generate arbitrary identicons and QR codes.
</p>
<h2>Identicons</h2>
<div id="identicon">
<table cellspacing="10" align="center">
<tr>
<th colspan="4" class="title">Identicons for string: <i>planet.i2p</i></th>
</tr>
<tr>
<th>16x16</th><th>32x32</th><th>64x64</th><th>256x256</th>
</tr>
<tr>
<td><img src="id?c=planet.i2p&amp;s=16" width=16 height=16></td>
<td><img src="id?c=planet.i2p&amp;s=32" width=32 height=32></td>
<td><img src="id?c=planet.i2p&amp;s=64" width=64 height=64></td>
<td rowspan="3"><img src="id?c=planet.i2p&amp;s=256" width=256 height=256></td>
</tr>
<tr><th>22x22</th><th>48x48</th><th>96x96</th></tr>
<tr>
<td><img src="id?c=planet.i2p&amp;s=22" width=22 height=22></td>
<td><img src="id?c=planet.i2p&amp;s=48" width=48 height=48></td>
<td><img src="id?c=planet.i2p&amp;s=96" width=96 height=96></td>
</tr>
</table>
<form action="/imagegen/id" method="get" target="_blank">
<div class="formtitle">Identicon Generator</div>
<input type="text" name="c" required x-moz-errormessage="You need to provide some text for the image generation to work!" placeholder="text to encode" title="Enter text string for conversion">
<select name="s" title="Select image output size">
<option value="16">16 by 16 pixels</option>
<option value="22">22 by 22 pixels</option>
<option value="32">32 by 32 pixels</option>
<option value="48">48 by 48 pixels</option>
<option value="64">64 by 64 pixels</option>
<option value="96">96 by 96 pixels</option>
<option value="128">128 by 128 pixels</option>
<option value="256">256 by 256 pixels</option>
<option value="384">384 by 384 pixels</option>
<option value="512">512 by 512 pixels</option>
</select>
<button>Create Identicon</button>
</form>
</div>
<h2>QR Codes</h2>
<div id="qr">
<table cellspacing="10" align="center">
<tr>
<th colspan="3" class="title">QR Codes for string: <i>https://geti2p.net</i></th>
</tr>
<tr>
<th>128x128</th><th>160x160</th><th>256x256</th>
</tr>
<tr>
<td><img src="qr?c=https%3a%2f%2fgeti2p.net%2f&amp;s=128" width=128 height=128></td>
<td><img src="qr?c=https%3a%2f%2fgeti2p.net%2f&amp;s=160&amp;t=geti2p.net" width=160 height=160></td>
<td><img src="qr?c=https%3a%2f%2fgeti2p.net%2f&amp;s=256&amp;t=geti2p.net" width=256 height=256></td>
</tr>
</table>
<form action="/imagegen/qr" method="get" target="_blank">
<div class="formtitle">QR Code Generator</div>
<input type="text" name="c" required x-moz-errormessage="You need to provide some text for the image generation to work!" placeholder="text to encode" title="Enter text string for conversion">
<input type="text" name="t" placeholder="optional display text" title="Optional text to be displayed underneath the QR code">
<select name="s" title="Select image output size">
<option value="128">128 by 128 pixels</option>
<option value="160">160 by 160 pixels</option>
<option value="256">256 by 256 pixels</option>
<option value="384">384 by 384 pixels</option>
<option value="512">512 by 512 pixels</option>
</select>
<button>Create QR Code</button>
</form>
</div>
<h2>Random Art</h2>
<p>This technique renders an ASCII-Art representation of a digital fingerprint so the human brain can profit from its built-in pattern recognition ability. <span class="reference"><a href="http://people.eecs.berkeley.edu/~dawnsong/papers/randomart.pdf" target="_blank">"Hash Visualization: a New Technique to improve Real-World Security" by Perrig A. and Song D.</a></span></p>
<div id="randomart">
<table>
<tr>
<th colspan="2" class="title">Random Art for I2P address: <i>i2p-projekt.i2p</i></th>
</tr>
<tr>
<th>HTML Test</th><th>UTF-8 Text Test</th>
</tr>
<tr>
<td><iframe src="ra?c=i2p-projekt.i2p&amp;m=html" width=180 height=200><a href="ra?c=i2p-projekt.i2p&amp;m=html">HTML test</a></iframe></td>
<td><iframe src="ra?c=i2p-projekt.i2p&amp;m=text" width=180 height=200><a href="ra?c=i2p-projekt.i2p&amp;m=text">UTF-8 text test</a></iframe></td>
</tr>
</table>
<form action="/imagegen/ra" method="get" target="_blank">
<div class="formtitle">Random Art Generator</div>
<input type="text" name="c" required x-moz-errormessage="You need to provide an I2P address for the image generation to work!" placeholder="[URL].i2p to encode" title="Enter I2P address for conversion">
<input hidden="hidden" name="m" value="html">
<button>Create Random Art</button>
</form>
</div>
<hr>
<div id="nav"><a href="../">Return to I2P Console</a></div>
<h2>Random Art Test</h2>
<iframe src="ra?c=i2p-projekt.i2p&amp;m=html" width=180 height=200>
<a href="ra?c=i2p-projekt.i2p&amp;m=html">HTML test</a>
</iframe>
<iframe src="ra?c=i2p-projekt.i2p&amp;m=text" width=180 height=200>
<a href="ra?c=i2p-projekt.i2p&amp;m=text">UTF-8 text test</a>
</iframe>
</body>
</html>

View File

@ -53,7 +53,7 @@ class BanlistRenderer {
return;
}
buf.append("<ul>");
buf.append("<ul id=\"banlist\">");
for (Map.Entry<Hash, Banlist.Entry> e : entries.entrySet()) {
Hash key = e.getKey();
@ -81,8 +81,8 @@ class BanlistRenderer {
buf.append(_t(entry.cause));
}
if (!key.equals(Hash.FAKE_HASH)) {
buf.append(" (<a href=\"configpeer?peer=").append(key.toBase64())
.append("#unsh\">").append(_t("unban now")).append("</a>)");
buf.append(" <a href=\"configpeer?peer=").append(key.toBase64())
.append("#unsh\">[").append(_t("unban now")).append("]</a>");
}
buf.append("</li>\n");
}

View File

@ -112,7 +112,7 @@ public class ConfigClientsHelper extends HelperBase {
/** clients */
public String getForm1() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table>\n" +
buf.append("<table id=\"clientconfig\">\n" +
"<tr><th align=\"right\">").append(_t("Client")).append("</th><th>")
.append(_t("Run at Startup?")).append("</th><th>")
.append(_t("Control")).append("</th><th align=\"left\">")
@ -198,7 +198,7 @@ public class ConfigClientsHelper extends HelperBase {
/** webapps */
public String getForm2() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table>\n" +
buf.append("<table id=\"webappconfig\">\n" +
"<tr><th align=\"right\">").append(_t("WebApp")).append("</th><th>")
.append(_t("Run at Startup?")).append("</th><th>")
.append(_t("Control")).append("</th><th align=\"left\">")
@ -227,7 +227,7 @@ public class ConfigClientsHelper extends HelperBase {
/** plugins */
public String getForm3() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table>\n" +
buf.append("<table id=\"pluginconfig\">\n" +
"<tr><th align=\"right\">").append(_t("Plugin")).append("</th><th>")
.append(_t("Run at Startup?")).append("</th><th>")
.append(_t("Control")).append("</th><th align=\"left\">")
@ -290,15 +290,17 @@ public class ConfigClientsHelper extends HelperBase {
}
s = stripHTML(appProps, "websiteURL");
if (s != null) {
desc.append("<tr><td>")
.append("<a href=\"").append(s).append("\">").append(_t("Website")).append("</a><td>&nbsp;");
desc.append("<tr><td><b>")
.append(_t("Website")).append("</b></td><td><a href=\"")
.append(s).append("\">").append(s).append("</a>");
}
String updateURL = stripHTML(appProps, "updateURL.su3");
if (updateURL == null)
updateURL = stripHTML(appProps, "updateURL");
if (updateURL != null) {
desc.append("<tr><td>")
.append("<a href=\"").append(updateURL).append("\">").append(_t("Update link")).append("</a><td>&nbsp;");
desc.append("<tr><td><b>")
.append(_t("Update link")).append("</b></td><td><a href=\"")
.append(updateURL).append("\">").append(updateURL).append("</a>");
}
desc.append("</table>");
boolean isRunning = PluginStarter.isPluginRunning(app, _context);

View File

@ -57,9 +57,7 @@ public class ConfigNavHelper extends HelperBase {
*/
public void renderNavBar(String requestURI, boolean graphical) throws IOException {
StringBuilder buf = new StringBuilder(1024);
// TODO fix up the non-light themes
String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME);
boolean span = graphical && (theme == null || theme.equals(CSSHelper.DEFAULT_THEME));
boolean span = graphical;
if (!span)
buf.append("<center>");
List<Tab> tabs = new ArrayList<Tab>(pages.length);
@ -84,9 +82,9 @@ public class ConfigNavHelper extends HelperBase {
buf.append("<a href=\"").append(page).append("\">").append(tabs.get(i).title).append("</a>");
}
if (span)
buf.append(" </span>\n");
buf.append("</span>\n");
else if (i != pages.length - 1)
buf.append(" |\n");
buf.append("&nbsp;&nbsp;\n");
}
if (!span)
buf.append("</center>");

View File

@ -215,25 +215,21 @@ public class ConfigNetHelper extends HelperBase {
}
}
StringBuilder buf = new StringBuilder(128);
buf.append("<div class=\"indent\">");
for (String addr : addrs) {
buf.append("\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<input type=\"checkbox\" class=\"optbox\" value=\"foo\" name=\"addr_");
buf.append("<input type=\"checkbox\" class=\"optbox\" value=\"foo\" name=\"addr_");
buf.append(addr);
buf.append('"');
if (addrs.size() == 1 || configs.contains(addr))
buf.append(CHECKED);
buf.append("> ");
buf.append(addr);
buf.append("<br>");
buf.append("<br>\n");
}
buf.append("\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
if (!addrs.isEmpty()) {
buf.append(_t("Add host name or IP"))
.append(": ");
}
buf.append("<input name=\"udpHost1\" type=\"text\" size=\"16\" >" +
"</div>");
buf.append("<input name=\"udpHost1\" type=\"text\" size=\"16\" >");
return buf.toString();
}

View File

@ -26,7 +26,7 @@ public class ConfigTunnelsHelper extends HelperBase {
cur++;
}
buf.append("<table>\n");
buf.append("<table id=\"tunnelconfig\">\n");
TunnelPoolSettings exploratoryIn = _context.tunnelManager().getInboundSettings();
TunnelPoolSettings exploratoryOut = _context.tunnelManager().getOutboundSettings();
@ -69,7 +69,7 @@ public class ConfigTunnelsHelper extends HelperBase {
boolean advanced = isAdvanced();
buf.append("<tr><th colspan=\"3\"><a name=\"").append(prefix).append("\">");
buf.append("<tr><th colspan=\"3\" class=\"th_title\"><a name=\"").append(prefix).append("\">");
buf.append(name).append("</a></th></tr>\n");
if (in.getLength() <= 0 ||
in.getLength() + in.getLengthVariance() <= 0 ||

View File

@ -9,15 +9,23 @@ public class ConfigUIHelper extends HelperBase {
public String getSettings() {
StringBuilder buf = new StringBuilder(512);
buf.append("<div id=\"availablethemes\">");
String current = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
Set<String> themes = themeSet();
for (String theme : themes) {
buf.append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
buf.append("<div class=\"themechoice\">")
.append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
if (theme.equals(current))
buf.append(CHECKED);
buf.append("value=\"").append(theme).append("\">").append(_t(theme)).append("<br>\n");
buf.append("value=\"").append(theme).append("\">")
.append("<object height=\"48\" width=\"48\" data=\"/themes/console/").append(theme).append("/images/thumbnail.png\">")
.append("<img height=\"48\" width=\"48\" alt=\"\" src=\"/themes/console/images/thumbnail.png\">")
.append("</object><br>")
.append("<div class=\"themelabel\">").append(_t(theme)).append("</div>")
.append("</div>\n");
}
boolean universalTheming = _context.getBooleanProperty(CSSHelper.PROP_UNIVERSAL_THEMING);
buf.append("</div><div id=\"themeoptions\">");
buf.append("<input type=\"checkbox\" name=\"universalTheming\" ");
if (universalTheming)
buf.append(CHECKED);
@ -35,7 +43,7 @@ public class ConfigUIHelper extends HelperBase {
buf.append(CHECKED);
buf.append("value=\"1\">")
.append(_t("Force the mobile console to be used"))
.append("<br>\n");
.append("</div>\n");
return buf.toString();
}
@ -71,6 +79,7 @@ public class ConfigUIHelper extends HelperBase {
* Any language-specific flag added to the icon set must be
* added to the top-level build.xml for the updater.
* As of 0.9.12, ISO 639-2 three-letter codes are supported also.
* Note: To avoid truncation, ensure language name is no longer than 17 chars.
*/
private static final String langs[][] = {
//
@ -111,7 +120,7 @@ public class ConfigUIHelper extends HelperBase {
{ "vi", "vn", _x("Vietnamese"), null },
{ "zh", "cn", _x("Chinese"), null },
{ "zh_TW", "tw", _x("Chinese"), "Taiwan" },
{ "xx", "a1", "Debug: Find untagged strings", null },
{ "xx", "a1", "Untagged strings", null },
};
@ -150,11 +159,12 @@ public class ConfigUIHelper extends HelperBase {
if (lang.equals("xx") && !isAdvanced())
continue;
// we use "lang" so it is set automagically in CSSHelper
buf.append("<input type=\"radio\" class=\"optbox\" name=\"lang\" ");
buf.append("<div class=\"langselect\"><input type=\"radio\" class=\"optbox\" name=\"lang\" ");
if (lang.equals(current))
buf.append(CHECKED);
buf.append("value=\"").append(lang).append("\">")
.append("<img height=\"11\" width=\"16\" alt=\"\" src=\"/flags.jsp?c=").append(langs[i][1]).append("\"> ");
.append("<img height=\"11\" width=\"16\" alt=\"\" src=\"/flags.jsp?c=").append(langs[i][1]).append("\">")
.append("<div class=\"ui_lang\">");
int under = lang.indexOf('_');
String slang = (under > 0) ? lang.substring(0, under) : lang;
buf.append(Messages.getDisplayLanguage(slang, langs[i][2], _context));
@ -164,7 +174,7 @@ public class ConfigUIHelper extends HelperBase {
.append(Messages.getString(name, _context, Messages.COUNTRY_BUNDLE_NAME))
.append(')');
}
buf.append("<br>\n");
buf.append("</div></div>\n");
}
return buf.toString();
}
@ -174,7 +184,7 @@ public class ConfigUIHelper extends HelperBase {
StringBuilder buf = new StringBuilder(512);
ConsolePasswordManager mgr = new ConsolePasswordManager(_context);
Map<String, String> userpw = mgr.getMD5(RouterConsoleRunner.PROP_CONSOLE_PW);
buf.append("<table>");
buf.append("<table id=\"consolepass\">");
if (userpw.isEmpty()) {
buf.append("<tr><td colspan=\"3\">");
buf.append(_t("Add a user and password to enable."));
@ -183,7 +193,7 @@ public class ConfigUIHelper extends HelperBase {
buf.append("<tr><th>")
.append(_t("Remove"))
.append("</th><th>")
.append(_t("User Name"))
.append(_t("Username"))
.append("</th><th>&nbsp;</th></tr>\n");
for (String name : userpw.keySet()) {
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
@ -193,13 +203,13 @@ public class ConfigUIHelper extends HelperBase {
.append("</td></tr>\n");
}
}
buf.append("<tr><td align=\"center\"><b>")
.append(_t("Add")).append(":</b>" +
"</td><td align=\"left\"><input type=\"text\" name=\"name\">" +
"</td><td align=\"left\"><b>");
buf.append(_t("Password")).append(":</b> " +
"<input type=\"password\" size=\"40\" name=\"nofilter_pw\"></td></tr>" +
"</table>\n");
buf.append("<tr><td id=\"pw_adduser\" align=\"left\" colspan=\"3\"><b>")
.append("<b>").append(_t("Username")).append(":</b> ")
.append("<input type=\"text\" name=\"name\">")
.append("<b>").append(_t("Password")).append(":</b> ")
.append("<input type=\"password\" size=\"40\" name=\"nofilter_pw\">")
.append("</td></tr>")
.append("</table>\n");
return buf.toString();
}
}

View File

@ -99,7 +99,7 @@ public class EventLogHelper extends FormHandler {
// So just use the "shared/console nonce".
String nonce = CSSHelper.getNonce();
try {
_out.write("<br><h3>" + _t("Display Events") + "</h3>");
_out.write("<br><h3 id=\"displayevents\">" + _t("Display Events") + "</h3>");
_out.write("<form action=\"events\" method=\"POST\">\n" +
"<input type=\"hidden\" name=\"action\" value=\"save\">\n" +
"<input type=\"hidden\" name=\"nonce\" value=\"" + nonce + "\" >\n");
@ -107,7 +107,7 @@ public class EventLogHelper extends FormHandler {
for (int i = 0; i < _times.length; i++) {
writeOption(_times[i]);
}
_out.write("</select><br>");
_out.write("</select>&nbsp;");
_out.write(_t("Event type") + ": <select name=\"type\">");
// sorted by translated display string
Map<String, String> events = new TreeMap<String, String>(Collator.getInstance());
@ -119,7 +119,7 @@ public class EventLogHelper extends FormHandler {
writeOption(e.getKey(), e.getValue());
}
_out.write("</select>" +
"<hr><div class=\"formaction\"><input type=\"submit\" class=\"accept\" value=\"" + _t("Filter events") + "\"></div></form>");
"&nbsp;<input type=\"submit\" class=\"accept\" value=\"" + _t("Filter events") + "\"></form>");
} catch (IOException ioe) {
ioe.printStackTrace();
}
@ -175,7 +175,7 @@ public class EventLogHelper extends FormHandler {
return _t("No \"{0}\" events found in previous {1}", xev, DataHelper.formatDuration2(_age));
}
StringBuilder buf = new StringBuilder(2048);
buf.append("<table><tr><th>");
buf.append("<table id=\"eventlog\"><tr><th>");
buf.append(_t("Time"));
buf.append("</th><th>");
if (isAll) {

View File

@ -29,7 +29,7 @@ public class FileDumpHelper extends HelperBase {
public String getFileSummary() {
StringBuilder buf = new StringBuilder(16*1024);
buf.append("<table><tr><th>File</th><th>Size</th><th>Date</th><th>SHA 256</th><th>Revision</th>" +
buf.append("<table id=\"jardump\"><tr><th>File</th><th>Size</th><th>Date</th><th>SHA 256</th><th>Revision</th>" +
"<th>JDK</th><th>Built</th><th>By</th><th>Mods</th></tr>");
// jars added in wrapper.config

View File

@ -32,7 +32,7 @@ public class GraphHelper extends FormHandler {
private static final String PROP_REFRESH = "routerconsole.graphRefresh";
private static final String PROP_PERIODS = "routerconsole.graphPeriods";
private static final String PROP_EVENTS = "routerconsole.graphEvents";
public static final int DEFAULT_X = 250;
public static final int DEFAULT_X = 400;
public static final int DEFAULT_Y = 100;
private static final int DEFAULT_REFRESH = 5*60;
private static final int DEFAULT_PERIODS = 60;
@ -232,12 +232,13 @@ public class GraphHelper extends FormHandler {
name = r.getRateStat().getName();
displayName = name;
}
_out.write("<h3>");
_out.write("<h3 id=\"graphinfo\">");
_out.write(_t("{0} for {1}", displayName, DataHelper.formatDuration2(_periodCount * period)));
if (_end > 0)
_out.write(' ' + _t("ending {0} ago", DataHelper.formatDuration2(_end * period)));
_out.write("</h3><img class=\"statimage\" border=\"0\""
_out.write("&nbsp;<a href=\"graphs\">[" + _t("Return to main graphs page") + "]</a></h3>\n"
+ "<div class=\"graphspanel\"><img class=\"statimage\" border=\"0\""
+ " src=\"viewstat.jsp?stat="
+ name
+ "&amp;showEvents=" + _showEvents
@ -246,7 +247,7 @@ public class GraphHelper extends FormHandler {
+ "&amp;end=" + _end
+ "&amp;width=" + _width
+ "&amp;height=" + _height
+ "\"><p>\n");
+ "\"></div><p id=\"graphopts\">\n");
if (_width < MAX_X && _height < MAX_Y) {
_out.write(link(_stat, _showEvents, _periodCount, _end, _width * 3 / 2, _height * 3 / 2));
@ -343,7 +344,7 @@ public class GraphHelper extends FormHandler {
+ "\">";
}
private static final int[] times = { 60, 2*60, 5*60, 10*60, 30*60, 60*60, -1 };
private static final int[] times = { 15, 30, 60, 2*60, 5*60, 10*60, 30*60, 60*60, -1 };
public String getForm() {
if (StatSummarizer.isDisabled())
@ -353,17 +354,18 @@ public class GraphHelper extends FormHandler {
// So just use the "shared/console nonce".
String nonce = CSSHelper.getNonce();
try {
_out.write("<br><h3>" + _t("Configure Graph Display") + " [<a href=\"configstats\">" + _t("Select Stats") + "</a>]</h3>");
_out.write("<br><h3 id=\"graphdisplay\">" + _t("Configure Graph Display") + " <a href=\"configstats\">[" + _t("Select Stats") + "]</a></h3>");
_out.write("<form action=\"graphs\" method=\"POST\">\n" +
"<input type=\"hidden\" name=\"action\" value=\"save\">\n" +
"<table><tr><td><input type=\"hidden\" name=\"action\" value=\"save\">\n" +
"<input type=\"hidden\" name=\"nonce\" value=\"" + nonce + "\" >\n");
_out.write(_t("Periods") + ": <input size=\"5\" style=\"text-align: right;\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\"><br>\n");
_out.write(_t("Plot averages") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : HelperBase.CHECKED) + "> ");
_out.write(_t("or")+ " " +_t("plot events") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? HelperBase.CHECKED : "") + "><br>\n");
_out.write(_t("Image sizes") + ": " + _t("width") + ": <input size=\"4\" style=\"text-align: right;\" type=\"text\" name=\"width\" value=\"" + _width
+ "\"> " + _t("pixels") + ", " + _t("height") + ": <input size=\"4\" style=\"text-align: right;\" type=\"text\" name=\"height\" value=\"" + _height
+ "\"> " + _t("pixels") + "<br>\n");
_out.write(_t("Refresh delay") + ": <select name=\"refreshDelay\">");
_out.write(_t("Display period") + ":</td><td colspan=\"2\"><input size=\"5\" style=\"text-align: right;\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\">" + _t("minutes") + "</td></tr><tr><td>\n");
_out.write(_t("Plot type") + ":</td><td colspan=\"2\">");
_out.write("<input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : HelperBase.CHECKED) + ">" + _t("Averages") + "&nbsp;&nbsp;&nbsp;");
_out.write ("<input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? HelperBase.CHECKED : "") + ">" + _t("Events") + "</td></tr><tr><td>\n");
_out.write(_t("Graph size") + ":</td><td><input size=\"4\" style=\"text-align: right;\" type=\"text\" name=\"width\" value=\"" + _width
+ "\">" + _t("pixels wide") + "&nbsp;&nbsp;&nbsp;<input size=\"4\" style=\"text-align: right;\" type=\"text\" name=\"height\" value=\"" + _height
+ "\">" + _t("pixels high") + "</td><td class=\"infohelp\">" + _t("Note: Dimensions are for graph only (excludes title, labels and legend).") + "</td></tr><tr><td>\n");
_out.write(_t("Refresh delay") + ":</td><td colspan=\"2\"><select name=\"refreshDelay\">");
for (int i = 0; i < times.length; i++) {
_out.write("<option value=\"");
_out.write(Integer.toString(times[i]));
@ -377,14 +379,13 @@ public class GraphHelper extends FormHandler {
_out.write(_t("Never"));
_out.write("</option>\n");
}
_out.write("</select><br>\n" +
_t("Store graph data on disk?") +
" <input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"persistent\"");
_out.write("</select></td></tr><tr><td>\n" + _t("Persistence") +
":</td><td colspan=\"2\"><input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"persistent\"");
boolean persistent = _context.getBooleanPropertyDefaultTrue(SummaryListener.PROP_PERSISTENT);
if (persistent)
_out.write(HelperBase.CHECKED);
_out.write(">" +
"<hr><div class=\"formaction\"><input type=\"submit\" class=\"accept\" value=\"" + _t("Save settings and redraw graphs") + "\"></div></form>");
_out.write(">" + _t("Store graph data on disk") + "</td></tr></table>" +
"<hr><div class=\"formaction\" id=\"graphing\"><input type=\"submit\" class=\"accept\" value=\"" + _t("Save settings and redraw graphs") + "\"></div></form>");
} catch (IOException ioe) {
ioe.printStackTrace();
}

View File

@ -29,48 +29,48 @@ public class HomeHelper extends HelperBase {
static final String DEFAULT_SERVICES =
_x("Addressbook") + S + _x("Manage your I2P hosts file here (I2P domain name resolution)") + S + "/dns" + S + I + "book_addresses.png" + S +
_x("Configure Bandwidth") + S + _x("I2P Bandwidth Configuration") + S + "/config" + S + I + "action_log.png" + S +
_x("Configure Language") + S + _x("Console Language Selection") + S + "/configui" + S + I + "wrench_orange.png" + S +
_x("Configure UI") + S + _x("Select console theme & language & set optional console password") + S + "/configui" + S + I + "wrench_orange.png" + S +
_x("Customize Home Page") + S + _x("I2P Home Page Configuration") + S + "/confighome" + S + I + "home_page.png" + S +
_x("Email") + S + _x("Anonymous webmail client") + S + "/susimail/susimail" + S + I + "email.png" + S +
_x("Help") + S + _x("I2P Router Help") + S + "/help" + S + I + "support.png" + S +
_x("Router Console") + S + _x("I2P Router Console") + S + "/console" + S + I + "toolbox.png" + S +
_x("Torrents") + S + _x("Built-in anonymous BitTorrent Client") + S + "/i2psnark/" + S + I + "magnet.png" + S +
_x("Website") + S + _x("Local web server") + S + "http://127.0.0.1:7658/" + S + I + "server_32x32.png" + S +
_x("Website") + S + _x("Local web server for hosting your own content on I2P") + S + "http://127.0.0.1:7658/" + S + I + "server_32x32.png" + S +
"";
// No commas allowed in text strings!
static final String DEFAULT_FAVORITES =
"anoncoin.i2p" + S + _x("The Anoncoin project") + S + "http://anoncoin.i2p/" + S + I + "anoncoin_32.png" + S +
_x("Bug Reports") + S + _x("Bug tracker") + S + "http://trac.i2p2.i2p/report/1" + S + I + "bug.png" + S +
_x("I2P Bug Reports") + S + _x("Bug tracker") + S + "http://trac.i2p2.i2p/report/1" + S + I + "bug.png" + S +
//"colombo-bt.i2p" + S + _x("The Italian Bittorrent Resource") + S + "http://colombo-bt.i2p/" + S + I + "colomboicon.png" + S +
_x("Dev Forum") + S + _x("Development forum") + S + "http://zzz.i2p/" + S + I + "group_gear.png" + S +
_x("diftracker") + S + _x("Bittorrent tracker") + S + "http://diftracker.i2p/" + S + I + "magnet.png" + S +
"echelon.i2p" + S + _x("I2P Applications") + S + "http://echelon.i2p/" + S + I + "box_open.png" + S +
"exchanged.i2p" + S + _x("Anonymous cryptocurrency exchange") + S + "http://exchanged.i2p/" + S + I + "exchanged.png" + S +
_x("FAQ") + S + _x("Frequently Asked Questions") + S + "http://i2p-projekt.i2p/faq" + S + I + "question.png" + S +
_x("Forum") + S + _x("Community forum") + S + "http://forum.i2p/" + S + I + "group.png" + S +
_x("Anonymous Git Hosting") + S + _x("A public anonymous Git hosting site - supports pulling via Git and HTTP and pushing via SSH") + S + "http://git.repo.i2p/" + S + I + "git-logo.png" + S +
//"hiddengate.i2p" + S + _x("HiddenGate") + S + "http://hiddengate.i2p/" + S + I + "hglogo32.png" + S +
_x("I2P FAQ") + S + _x("Frequently Asked Questions") + S + "http://i2p-projekt.i2p/faq" + S + I + "question.png" + S +
_x("I2P Forum") + S + _x("Community forum") + S + "http://forum.i2p/" + S + I + "group.png" + S +
"git.repo.i2p" + S + _x("A public anonymous Git hosting site - supports pulling via Git and HTTP and pushing via SSH") + S + "http://git.repo.i2p/" + S + I + "git-logo.png" + S +
//"hiddengate [ru]" + S + _x("Russian I2P-related wiki") + S + "http://hiddengate.i2p/" + S + I + "hglogo32.png" + S +
_x("I2P Wiki") + S + _x("Anonymous wiki - share the knowledge") + S + "http://i2pwiki.i2p/" + S + I + "i2pwiki_logo.png" + S +
//"Ident " + _x("Microblog") + S + _x("Your premier microblogging service on I2P") + S + "http://id3nt.i2p/" + S + I + "ident_icon_blue.png" + S +
//_x("Javadocs") + S + _x("Technical documentation") + S + "http://i2p-javadocs.i2p/" + S + I + "education.png" + S +
//"jisko.i2p" + S + _x("Simple and fast microblogging website") + S + "http://jisko.i2p/" + S + I + "jisko_console_icon.png" + S +
//_x("Key Server") + S + _x("OpenPGP Keyserver") + S + "http://keys.i2p/" + S + I + "education.png" + S +
//"killyourtv.i2p" + S + _x("Debian and Tahoe-LAFS repositories") + S + "http://killyourtv.i2p/" + S + I + "television_delete.png" + S +
_x("Free Web Hosting") + S + _x("Free eepsite hosting with PHP and MySQL") + S + "http://open4you.i2p/" + S + I + "open4you-logo.png" + S +
_x("Pastebin") + S + _x("I2P Pastebin") + S + "http://zerobin.i2p/" + S + I + "paste_plain.png" + S +
_x("Open4You") + S + _x("Free eepsite hosting with PHP and MySQL") + S + "http://open4you.i2p/" + S + I + "open4you-logo.png" + S +
_x("Pastebin") + S + _x("Encrypted I2P Pastebin") + S + "http://zerobin.i2p/" + S + I + "paste_plain.png" + S +
_x("Planet I2P") + S + _x("I2P News") + S + "http://planet.i2p/" + S + I + "world.png" + S +
_x("Plugins") + S + _x("Add-on directory") + S + "http://i2pwiki.i2p/index.php?title=Plugins" + S + I + "plugin.png" + S +
_x("I2P Plugins") + S + _x("Add-on directory") + S + "http://i2pwiki.i2p/index.php?title=Plugins" + S + I + "plugin.png" + S +
_x("Postman's Tracker") + S + _x("Bittorrent tracker") + S + "http://tracker2.postman.i2p/" + S + I + "magnet.png" + S +
_x("Project Website") + S + _x("I2P home page") + S + "http://i2p-projekt.i2p/" + S + I + "info_rhombus.png" + S +
//_x("Russian News Feed") + S + "lenta.i2p" + S + "http://lenta.i2p/" + S + I + "lenta_main_logo.png" + S +
//_x("lenta news [ru]") + S + _x("Russian News Feed") + S + "http://lenta.i2p/" + S + I + "lenta_main_logo.png" + S +
//"Salt" + S + "salt.i2p" + S + "http://salt.i2p/" + S + I + "salt_console.png" + S +
"stats.i2p" + S + _x("I2P Network Statistics") + S + "http://stats.i2p/cgi-bin/dashboard.cgi" + S + I + "chart_line.png" + S +
_x("Technical Docs") + S + _x("Technical documentation") + S + "http://i2p-projekt.i2p/how" + S + I + "education.png" + S +
_x("I2P Technical Docs") + S + _x("Technical documentation") + S + "http://i2p-projekt.i2p/how" + S + I + "education.png" + S +
_x("The Tin Hat") + S + _x("Privacy guides and tutorials") + S + "http://secure.thetinhat.i2p/" + S + I + "thetinhat.png" + S +
_x("Trac Wiki") + S + S + "http://trac.i2p2.i2p/" + S + I + "billiard_marker.png" + S +
//_x("Ugha's Wiki") + S + S + "http://ugha.i2p/" + S + I + "billiard_marker.png" + S +
//_x("Sponge's main site") + S + _x("Seedless and the Robert BitTorrent applications") + S + "http://sponge.i2p/" + S + I + "user_astronaut.png" + S +
//"sponge.i2p" + S + _x("Seedless and the Robert BitTorrent applications") + S + "http://sponge.i2p/" + S + I + "user_astronaut.png" + S +
"";
@ -211,9 +211,9 @@ public class HomeHelper extends HelperBase {
private String renderConfig(Collection<App> apps) {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table><tr><th>")
buf.append("<table class=\"homelinkedit\"><tr><th>")
.append(_t("Remove"))
.append("</th><th colspan=\"2\">")
.append("</th><th></th><th>")
.append(_t("Name"))
.append("</th><th>")
.append(_t("URL"))
@ -238,7 +238,7 @@ public class HomeHelper extends HelperBase {
buf.append(url);
buf.append("</a></td></tr>\n");
}
buf.append("<tr><td colspan=\"2\" align=\"center\"><b>")
buf.append("<tr id=\"addnew\"><td colspan=\"2\" align=\"center\"><b>")
.append(_t("Add")).append(":</b>" +
"</td><td align=\"left\"><input type=\"text\" name=\"nofilter_name\"></td>" +
"<td align=\"left\"><input type=\"text\" size=\"40\" name=\"nofilter_url\"></td></tr>");

View File

@ -47,13 +47,16 @@ public class JobQueueHelper extends HelperBase {
int numRunners = _context.jobQueue().getJobs(readyJobs, timedJobs, activeJobs, justFinishedJobs);
StringBuilder buf = new StringBuilder(32*1024);
buf.append("<b><div class=\"joblog\"><h3>").append(_t("I2P Job Queue")).append("</h3><br><div class=\"wideload\">")
buf.append("<div class=\"joblog\">")
.append("<h2 id=\"jobrunners\">")
.append(_t("Job runners")).append(": ").append(numRunners)
.append("</b><br>\n");
.append("</h2>\n");
long now = _context.clock().now();
buf.append("<hr><b>").append(_t("Active jobs")).append(": ").append(activeJobs.size()).append("</b><ol>\n");
buf.append("<h3 id=\"activejobs\">")
.append(_t("Active jobs")).append(": ").append(activeJobs.size())
.append("</h3><ol>");
for (int i = 0; i < activeJobs.size(); i++) {
Job j = activeJobs.get(i);
buf.append("<li>(").append(_t("started {0} ago", DataHelper.formatDuration2(now-j.getTiming().getStartAfter()))).append("): ");
@ -61,7 +64,9 @@ public class JobQueueHelper extends HelperBase {
}
buf.append("</ol>\n");
buf.append("<hr><b>").append(_t("Just finished jobs")).append(": ").append(justFinishedJobs.size()).append("</b><ol>\n");
buf.append("<h3 id=\"finishedjobs\">")
.append(_t("Just finished jobs")).append(": ").append(justFinishedJobs.size())
.append("</h3><ol>");
for (int i = 0; i < justFinishedJobs.size(); i++) {
Job j = justFinishedJobs.get(i);
buf.append("<li>(").append(_t("finished {0} ago", DataHelper.formatDuration2(now-j.getTiming().getActualEnd()))).append("): ");
@ -69,7 +74,9 @@ public class JobQueueHelper extends HelperBase {
}
buf.append("</ol>\n");
buf.append("<hr><b>").append(_t("Ready/waiting jobs")).append(": ").append(readyJobs.size()).append("</b><ol>\n");
buf.append("<h3 id=\"readyjobs\">")
.append(_t("Ready/waiting jobs")).append(": ").append(readyJobs.size())
.append("</h3><ol>");
ObjectCounter<String> counter = new ObjectCounter<String>();
for (int i = 0; i < readyJobs.size(); i++) {
Job j = readyJobs.get(i);
@ -86,7 +93,9 @@ public class JobQueueHelper extends HelperBase {
out.write(buf.toString());
buf.setLength(0);
buf.append("<hr><b>").append(_t("Scheduled jobs")).append(": ").append(timedJobs.size()).append("</b><ol>\n");
buf.append("<h3 id=\"scheduledjobs\">")
.append(_t("Scheduled jobs")).append(": ").append(timedJobs.size())
.append("</h3><ol>");
long prev = Long.MIN_VALUE;
counter.clear();
for (int i = 0; i < timedJobs.size(); i++) {
@ -110,7 +119,9 @@ public class JobQueueHelper extends HelperBase {
out.write(buf.toString());
buf.setLength(0);
buf.append("<hr><b>").append(_t("Total Job Statistics")).append("</b>\n");
buf.append("<h3 id=\"totaljobstats\">")
.append(_t("Total Job Statistics"))
.append("</h3>\n");
getJobStats(buf);
out.write(buf.toString());
}
@ -120,8 +131,8 @@ public class JobQueueHelper extends HelperBase {
List<String> names = new ArrayList<String>(counter.objects());
if (names.size() < 4)
return;
buf.append("<table style=\"width: 30%; margin-left: 100px;\">\n" +
"<tr><th>").append(_t("Job")).append("</th><th>").append(_t("Queued")).append("<th>");
buf.append("<table id=\"schedjobs\" style=\"width: 30%; margin-left: 100px;\">\n" +
"<tr><th>").append(_t("Job")).append("</th><th>").append(_t("Queued")).append("</th></tr>\n");
Collections.sort(names, new JobCountComparator(counter));
for (String name : names) {
buf.append("<tr><td>").append(name)
@ -137,7 +148,7 @@ public class JobQueueHelper extends HelperBase {
* @since 0.8.9
*/
private void getJobStats(StringBuilder buf) {
buf.append("<table>\n" +
buf.append("<div class=\"widescroll\"><table id=\"jobstats\">\n" +
"<tr><th>").append(_t("Job")).append("</th><th>").append(_t("Runs")).append("</th>" +
"<th>").append(_t("Dropped")).append("</th>" +
"<th>").append(_t("Time")).append("</th><th><i>").append(_t("Avg")).append("</i></th><th><i>")

View File

@ -131,7 +131,7 @@ public class LogsHelper extends HelperBase {
return "<p>" + _t("File not found") + ": <b><code>" + f.getAbsolutePath() + "</code></b></p>";
} else {
str = str.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
return "<p>" + _t("File location") + ": <a href=\"/wrapper.log\">" + f.getAbsolutePath() + "</a></p><pre>" + str + "</pre>";
return "<p>" + _t("File location") + ": <a href=\"/wrapper.log\">" + f.getAbsolutePath() + "</a></p></td></tr>\n<tr><td><pre>" + str + "</pre>";
}
}
@ -146,10 +146,10 @@ public class LogsHelper extends HelperBase {
/** formats in reverse order */
private String formatMessages(List<String> msgs) {
if (msgs.isEmpty())
return "<p><i>" + _t("No log messages") + "</i></p>";
return "</td></tr><tr><td><p><i>" + _t("No log messages") + "</i></p>";
boolean colorize = _context.getBooleanPropertyDefaultTrue("routerconsole.logs.color");
StringBuilder buf = new StringBuilder(16*1024);
buf.append("<ul>");
buf.append("</td></tr><tr><td><ul>");
for (int i = msgs.size() - 1; i >= 0; i--) {
String msg = msgs.get(i);
// don't display the dup message if it is last

View File

@ -206,9 +206,7 @@ public class NetDbHelper extends HelperBase {
private void renderNavBar() throws IOException {
StringBuilder buf = new StringBuilder(1024);
buf.append("<div class=\"confignav\" id=\"confignav\">");
// TODO fix up the non-light themes
String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME);
boolean span = _graphical && (theme == null || theme.equals(CSSHelper.DEFAULT_THEME));
boolean span = _graphical;
if (!span)
buf.append("<center>");
int tab = getTab();
@ -229,9 +227,9 @@ public class NetDbHelper extends HelperBase {
buf.append("<a href=\"netdb").append(links[i]).append("\">").append(_t(titles[i])).append("</a>");
}
if (span)
buf.append(" </span>\n");
buf.append("</span>\n");
else if (i != titles.length - 1)
buf.append(" |\n");
buf.append("&nbsp;&nbsp;\n");
}
if (!span)
buf.append("</center>");

View File

@ -228,7 +228,7 @@ class NetDbRenderer {
public void renderLeaseSetHTML(Writer out, boolean debug) throws IOException {
StringBuilder buf = new StringBuilder(4*1024);
if (debug)
buf.append("<p>Debug mode - Sorted by hash distance, closest first</p>\n");
buf.append("<p id=\"debugmode\">Debug mode - Sorted by hash distance, closest first</p>\n");
Hash ourRKey;
Set<LeaseSet> leases;
DecimalFormat fmt;
@ -246,9 +246,52 @@ class NetDbRenderer {
int rapCount = 0;
BigInteger median = null;
int c = 0;
// Summary
FloodfillNetworkDatabaseFacade netdb = (FloodfillNetworkDatabaseFacade)_context.netDb();
if (debug) {
buf.append("<table id=\"leasesetdebug\">\n");
} else {
buf.append("<table id=\"leasesetsummary\">\n");
}
buf.append("<tr><th colspan=\"3\">Leaseset Summary</th>")
.append("<th><a href=\"/configadvanced\" title=\"").append(_t("Manually Configure Floodfill Participation")).append("\">[")
.append(_t("Configure Floodfill Participation"))
.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) {
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(new Date(_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");
}
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");
if (debug) {
buf.append("<tr><td><b>Network data (only valid if floodfill):</b></td><td colspan=\"3\">");
//buf.append("</b></p><p><b>Center of Key Space (router hash): " + ourRKey.toBase64());
if (median != null) {
double log2 = biLog2(median);
buf.append("</td></tr>")
.append("<tr><td><b>Median distance (bits):</b></td><td colspan=\"3\">").append(fmt.format(log2)).append("</td></tr>\n");
// 2 for 4 floodfills... -1 for median
// this can be way off for unknown reasons
int total = (int) Math.round(Math.pow(2, 2 + 256 - 1 - log2));
buf.append("<tr><td><b>Estimated total floodfills:</b></td><td colspan=\"3\">").append(total).append("</td></tr>\n");
buf.append("<tr><td><b>Estimated total leasesets:</b></td><td colspan=\"3\">").append(total * rapCount / 4);
} else {
buf.append("<i>Not floodfill or no data.</i>");
}
buf.append("</td></tr>\n");
}
buf.append("</table>\n");
if (leases.isEmpty()) {
if (!debug)
buf.append("<i>").append(_t("none")).append("</i>");
buf.append("<div id=\"noleasesets\"><i>").append(_t("No Leasesets currently active.")).append("</i></div>");
} else {
if (debug) {
// Find the center of the RAP leasesets
@ -258,109 +301,93 @@ class NetDbRenderer {
}
medianCount = rapCount / 2;
}
long now = _context.clock().now();
for (LeaseSet ls : leases) {
Destination dest = ls.getDestination();
Hash key = dest.calculateHash();
buf.append("<b>").append(_t("LeaseSet")).append(": ").append(key.toBase64()).append("</b>\n");
buf.append("<table class=\"leaseset\">\n")
.append("<tr><th><b>").append(_t("LeaseSet")).append(":</b>&nbsp;<code>").append(key.toBase64()).append("</code></th>");
if (_context.clientManager().isLocal(dest)) {
buf.append(" (<a href=\"tunnels#" + key.toBase64().substring(0,4) + "\">" + _t("Local") + "</a> ");
buf.append("<th><b><a href=\"tunnels#" + key.toBase64().substring(0,4) + "\">" + _t("Local") + "</a> ");
if (! _context.clientManager().shouldPublishLeaseSet(key))
buf.append(_t("Unpublished") + ' ');
buf.append(_t("Destination") + ' ');
buf.append("<b>").append(_t("Destination")).append(":</b> ");
TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(key);
if (in != null && in.getDestinationNickname() != null)
buf.append(in.getDestinationNickname());
else
buf.append(dest.toBase64().substring(0, 6));
buf.append(")<br>\n");
buf.append("</th></tr>\n<tr><td>");
String b32 = dest.toBase32();
buf.append("<a href=\"http://").append(b32).append("\">").append(b32).append("</a><br>\n");
buf.append("<a href=\"http://").append(b32).append("\">").append(b32).append("</a></td>");
String host = _context.namingService().reverseLookup(dest);
if (host == null) {
buf.append("<a href=\"/susidns/addressbook.jsp?book=private&amp;destination=")
.append(dest.toBase64()).append("#add\">").append(_t("Add to local addressbook")).append("</a><br>\n");
buf.append("<td>").append("<a title=\"").append(_t("Add to addressbook"))
.append("\" href=\"/susidns/addressbook.jsp?book=private&amp;destination=")
.append(dest.toBase64()).append("#add\">").append(_t("Add to local addressbook")).append("</a></td>");
}
} else {
buf.append(" (").append(_t("Destination")).append(' ');
buf.append("<th><b>").append(_t("Destination")).append(":</b> ");
String host = _context.namingService().reverseLookup(dest);
if (host != null) {
buf.append("<a href=\"http://").append(host).append("/\">").append(host).append("</a>)<br>\n");
buf.append("<a href=\"http://").append(host).append("/\">").append(host).append("</a></th>");
} else {
String b32 = dest.toBase32();
buf.append(dest.toBase64().substring(0, 6)).append(")<br>\n" +
"<a href=\"http://").append(b32).append("\">").append(b32).append("</a><br>\n" +
"<a href=\"/susidns/addressbook.jsp?book=private&amp;destination=")
.append(dest.toBase64()).append("#add\">").append(_t("Add to local addressbook")).append("</a><br>\n");
buf.append("<code>").append(dest.toBase64().substring(0, 6)).append("</code></th>")
.append("</tr>\n<tr>")
.append("<td><a href=\"http://").append(b32).append("\">").append(b32).append("</a></td>\n")
.append("<td><a title=\"").append(_t("Add to addressbook"))
.append("\" href=\"/susidns/addressbook.jsp?book=private&amp;destination=")
.append(dest.toBase64()).append("#add\">").append(_t("Add to local addressbook")).append("</a></td>");
}
}
buf.append("</tr>\n<tr><td colspan=\"2\">\n");
long exp = ls.getLatestLeaseDate()-now;
if (exp > 0)
buf.append(_t("Expires in {0}", DataHelper.formatDuration2(exp)));
buf.append("<b>").append(_t("Expires in {0}", DataHelper.formatDuration2(exp))).append("</b>");
else
buf.append(_t("Expired {0} ago", DataHelper.formatDuration2(0-exp)));
buf.append("<br>\n");
buf.append("<b>").append(_t("Expired {0} ago", DataHelper.formatDuration2(0-exp))).append("</b>");
buf.append("</td></tr>\n");
if (debug) {
buf.append("RAP? " + ls.getReceivedAsPublished());
buf.append(" RAR? " + ls.getReceivedAsReply());
buf.append("<tr><td colspan=\"2\">");
buf.append("<b>RAP?</b> ").append(ls.getReceivedAsPublished());
buf.append(" <b>RAR?</b> ").append(ls.getReceivedAsReply());
BigInteger dist = HashDistance.getDistance(ourRKey, ls.getRoutingKey());
if (ls.getReceivedAsPublished()) {
if (c++ == medianCount)
median = dist;
}
buf.append(" Dist: <b>").append(fmt.format(biLog2(dist))).append("</b><br>");
buf.append(" <b>Distance: </b><span id=\"distance\">").append(fmt.format(biLog2(dist))).append("</span></b>");
buf.append("</td></tr>\n<tr><td colspan=\"2\">");
//buf.append(dest.toBase32()).append("<br>");
buf.append("Sig type: ").append(dest.getSigningPublicKey().getType()).append("<br>");
buf.append("Routing Key: ").append(ls.getRoutingKey().toBase64());
buf.append("<br>");
buf.append("Encryption Key: ").append(ls.getEncryptionKey().toBase64().substring(0, 20)).append("...<br>");
buf.append("<b>Signature type:</b> ").append(dest.getSigningPublicKey().getType());
buf.append(" <b>Encryption Key:</b> ").append(ls.getEncryptionKey().toBase64().substring(0, 20)).append("&hellip;");
buf.append("</td></tr>\n<tr><td colspan=\"2\">");
buf.append("<b>Routing Key:</b> ").append(ls.getRoutingKey().toBase64());
buf.append("</td></tr>");
}
for (int i = 0; i < ls.getLeaseCount(); i++) {
Lease lease = ls.getLease(i);
buf.append(_t("Lease")).append(' ').append(i + 1).append(": ").append(_t("Gateway")).append(' ');
buf.append("<tr><td colspan=\"2\">");
buf.append("<b>").append(_t("Lease")).append(' ').append(i + 1).append(":</b> ").append(_t("Gateway")).append(' ');
buf.append(_context.commSystem().renderPeerHTML(lease.getGateway()));
buf.append(' ').append(_t("Tunnel")).append(' ').append(lease.getTunnelId().getTunnelId()).append(' ');
if (debug) {
long exl = lease.getEndDate().getTime() - now;
if (exl > 0)
buf.append(_t("Expires in {0}", DataHelper.formatDuration2(exl)));
buf.append("<b>").append(_t("Expires in {0}", DataHelper.formatDuration2(exl))).append("</b>");
else
buf.append(_t("Expired {0} ago", DataHelper.formatDuration2(0-exl)));
buf.append("<b>").append(_t("Expired {0} ago", DataHelper.formatDuration2(0-exl))).append("</b>");
}
buf.append("<br>\n");
buf.append("</td></tr>\n");
}
buf.append("<hr>\n");
buf.append("</table>\n");
out.write(buf.toString());
buf.setLength(0);
} // for each
} // !empty
if (debug) {
FloodfillNetworkDatabaseFacade netdb = (FloodfillNetworkDatabaseFacade)_context.netDb();
buf.append("<p><b>Total Leasesets: ").append(leases.size());
buf.append("</b></p><p><b>Published (RAP) Leasesets: ").append(netdb.getKnownLeaseSets());
buf.append("</b></p><p><b>Mod Data: \"").append(DataHelper.getUTF8(_context.routerKeyGenerator().getModData()))
.append("\" Last Changed: ").append(new Date(_context.routerKeyGenerator().getLastChanged()));
buf.append("</b></p><p><b>Next Mod Data: \"").append(DataHelper.getUTF8(_context.routerKeyGenerator().getNextModData()))
.append("\" Change in: ").append(DataHelper.formatDuration(_context.routerKeyGenerator().getTimeTillMidnight()));
int ff = _context.peerManager().getPeersByCapability(FloodfillNetworkDatabaseFacade.CAPABILITY_FLOODFILL).size();
buf.append("</b></p><p><b>Known Floodfills: ").append(ff);
buf.append("</b></p><p><b>Currently Floodfill? ");
buf.append(netdb.floodfillEnabled() ? "yes" : "no");
buf.append("</b></p><p><b>Network data (only valid if floodfill):");
//buf.append("</b></p><p><b>Center of Key Space (router hash): " + ourRKey.toBase64());
if (median != null) {
double log2 = biLog2(median);
buf.append("</b></p><p><b>Median distance (bits): ").append(fmt.format(log2));
// 2 for 4 floodfills... -1 for median
// this can be way off for unknown reasons
int total = (int) Math.round(Math.pow(2, 2 + 256 - 1 - log2));
buf.append("</b></p><p><b>Estimated total floodfills: ").append(total);
buf.append("</b></p><p><b>Estimated total leasesets: ").append(total * rapCount / 4);
} else {
buf.append("</b></p><p><b>Not floodfill or no data");
}
buf.append("</b></p>");
}
out.write(buf.toString());
out.flush();
}
@ -442,14 +469,14 @@ class NetDbRenderer {
if (!showStats) {
// the summary table
buf.append("<table border=\"0\" cellspacing=\"30\"><tr><th colspan=\"3\">")
buf.append("<table id=\"netdboverview\" border=\"0\" cellspacing=\"30\"><tr><th colspan=\"3\">")
.append(_t("Network Database Router Statistics"))
.append("</th></tr><tr><td style=\"vertical-align: top;\">");
// versions table
List<String> versionList = new ArrayList<String>(versions.objects());
if (!versionList.isEmpty()) {
Collections.sort(versionList, Collections.reverseOrder(new VersionComparator()));
buf.append("<table>\n");
buf.append("<table id=\"netdbversions\">\n");
buf.append("<tr><th>" + _t("Version") + "</th><th>" + _t("Count") + "</th></tr>\n");
for (String routerVersion : versionList) {
int num = versions.count(routerVersion);
@ -468,7 +495,7 @@ class NetDbRenderer {
start = end;
// transports table
buf.append("<table>\n");
buf.append("<table id=\"netdbtransports\">\n");
buf.append("<tr><th align=\"left\">" + _t("Transports") + "</th><th>" + _t("Count") + "</th></tr>\n");
for (int i = 0; i < TNAMES.length; i++) {
int num = transportCount[i];
@ -490,7 +517,7 @@ class NetDbRenderer {
List<String> countryList = new ArrayList<String>(countries.objects());
if (!countryList.isEmpty()) {
Collections.sort(countryList, new CountryComparator());
buf.append("<table>\n");
buf.append("<table id=\"netdbcountrylist\">\n");
buf.append("<tr><th align=\"left\">" + _t("Country") + "</th><th>" + _t("Count") + "</th></tr>\n");
for (String country : countryList) {
int num = countries.count(country);
@ -552,31 +579,41 @@ class NetDbRenderer {
*/
private void renderRouterInfo(StringBuilder buf, RouterInfo info, boolean isUs, boolean full) {
String hash = info.getIdentity().getHash().toBase64();
buf.append("<table><tr><th><a name=\"").append(hash.substring(0, 6)).append("\" ></a>");
buf.append("<table class=\"netdbentry\">")
.append("<tr><th colspan=\"2\"><a name=\"").append(hash.substring(0, 6)).append("\" ></a>");
if (isUs) {
buf.append("<a name=\"our-info\" ></a><b>" + _t("Our info") + ": ").append(hash).append("</b></th></tr><tr><td>\n");
buf.append("<a name=\"our-info\" ></a><b>" + _t("Our info") + ":</b>&nbsp;<code>").append(hash).append("</code></th><th>");
} else {
buf.append("<b>" + _t("Peer info for") + ":</b> ").append(hash).append("\n");
buf.append("<b>" + _t("Peer info for") + ":</b>&nbsp;<code>").append(hash).append("</code></th><th>");
if (!full) {
buf.append("[<a href=\"netdb?r=").append(hash.substring(0, 6)).append("\" >").append(_t("Full entry")).append("</a>]");
buf.append("<a title=\"").append(_t("View extended router info"))
.append("\" class=\"viewfullentry\" href=\"netdb?r=").append(hash.substring(0, 6))
.append("\" >[").append(_t("Full entry")).append("]</a>");
}
buf.append("</th></tr><tr><td>\n");
}
buf.append("</th></tr>\n<tr>");
long age = _context.clock().now() - info.getPublished();
if (isUs && _context.router().isHidden()) {
buf.append("<b>").append(_t("Hidden")).append(", ").append(_t("Updated")).append(":</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<td><b>").append(_t("Hidden")).append(", ").append(_t("Updated")).append(":</b></td>")
.append("<td colspan=\"2\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age)))
.append("</td>");
} else if (age > 0) {
buf.append("<b>").append(_t("Published")).append(":</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<td><b>").append(_t("Published")).append(":</b></td>")
.append("<td colspan=\"2\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age)))
.append("</td>");
} else {
// shouldnt happen
buf.append("<b>" + _t("Published") + ":</b> in ").append(DataHelper.formatDuration2(0-age)).append("???<br>\n");
buf.append("<td colspan=\"2\"><b>").append(_t("Published")).append(":</b> in ").append(DataHelper.formatDuration2(0-age)).append("???</td>");
}
buf.append("</tr>\n<tr><td>");
buf.append("<b>").append(_t("Signing Key")).append(":</b> ")
.append("</td><td colspan=\"2\">")
.append(info.getIdentity().getSigningPublicKey().getType().toString());
buf.append("<br>\n<b>" + _t("Address(es)") + ":</b> ");
buf.append("</td></tr>\n<tr>")
.append("<td><b>" + _t("Address(es)") + ":</b></td>")
.append("<td colspan=\"2\">");
String country = _context.commSystem().getCountry(info.getIdentity().getHash());
if(country != null) {
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase(Locale.US)).append('\"');
@ -598,7 +635,7 @@ class NetDbRenderer {
}
buf.append("</td></tr>\n");
if (full) {
buf.append("<tr><td>" + _t("Stats") + ": <br><code>");
buf.append("<tr><td><b>" + _t("Stats") + ":</b><td colspan=\"2\"><code>");
Map<Object, Object> p = info.getOptionsMap();
for (Map.Entry<Object, Object> e : p.entrySet()) {
String key = (String) e.getKey();

View File

@ -78,13 +78,14 @@ class ProfileOrganizerRenderer {
if (mode < 2) {
//buf.append("<h2>").append(_t("Peer Profiles")).append("</h2>\n<p>");
buf.append("<p id=\"profiles_overview\" class=\"infohelp\">");
buf.append(ngettext("Showing 1 recent profile.", "Showing {0} recent profiles.", order.size())).append('\n');
if (older > 0)
buf.append(ngettext("Hiding 1 older profile.", "Hiding {0} older profiles.", older)).append('\n');
if (standard > 0)
buf.append("<a href=\"/profiles?f=1\">").append(ngettext("Hiding 1 standard profile.", "Hiding {0} standard profiles.", standard)).append("</a>\n");
buf.append("</p>");
buf.append("<table>");
buf.append("<table id=\"profiles\">");
buf.append("<tr>");
buf.append("<th>").append(_t("Peer")).append("</th>");
buf.append("<th>").append(_t("Groups (Caps)")).append("</th>");
@ -197,7 +198,7 @@ class ProfileOrganizerRenderer {
//buf.append("<h2><a name=\"flood\"></a>").append(_t("Floodfill and Integrated Peers"))
// .append(" (").append(integratedPeers.size()).append(")</h2>\n");
buf.append("<table>");
buf.append("<div class=\"widescroll\"><table id=\"floodfills\">");
buf.append("<tr>");
buf.append("<th class=\"smallhead\">").append(_t("Peer")).append("</th>");
buf.append("<th class=\"smallhead\">").append(_t("Caps")).append("</th>");
@ -250,7 +251,7 @@ class ProfileOrganizerRenderer {
}
buf.append("</tr>\n");
}
buf.append("</table>");
buf.append("</table></div>");
////
//// don't bother reindenting
@ -258,21 +259,24 @@ class ProfileOrganizerRenderer {
}
if (mode < 2) {
buf.append("<h3>").append(_t("Thresholds")).append("</h3>");
buf.append("<h3 class=\"tabletitle\">").append(_t("Thresholds")).append("</h3>\n")
.append("<table id=\"thresholds\"><tbody><tr><td>");
buf.append("<p><b>").append(_t("Speed")).append(":</b> ").append(num(_organizer.getSpeedThreshold()))
.append(" (").append(fast).append(' ').append(_t("fast peers")).append(")<br>");
buf.append("<b>").append(_t("Capacity")).append(":</b> ").append(num(_organizer.getCapacityThreshold()))
.append(" (").append(reliable).append(' ').append(_t("high capacity peers")).append(")<br>");
buf.append("<b>").append(_t("Integration")).append(":</b> ").append(num(_organizer.getIntegrationThreshold()))
.append(" (").append(integrated).append(' ').append(_t(" well integrated peers")).append(")</p>");
buf.append("<h3>").append(_t("Definitions")).append("</h3><ul>");
.append(" (").append(integrated).append(' ').append(_t(" well integrated peers")).append(")")
.append("</td></tr></tbody></table>\n");
buf.append("<h3 class=\"tabletitle\">").append(_t("Definitions")).append("</h3>\n")
.append("<table id=\"profile_defs\"><tbody><tr><td><ul>");
buf.append("<li><b>").append(_t("groups")).append("</b>: ").append(_t("as determined by the profile organizer")).append("</li>");
buf.append("<li><b>").append(_t("caps")).append("</b>: ").append(_t("capabilities in the netDb, not used to determine profiles")).append("</li>");
buf.append("<li><b>").append(_t("speed")).append("</b>: ").append(_t("peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel")).append("</li>");
buf.append("<li><b>").append(_t("capacity")).append("</b>: ").append(_t("how many tunnels can we ask them to join in an hour?")).append("</li>");
buf.append("<li><b>").append(_t("integration")).append("</b>: ").append(_t("how many new peers have they told us about lately?")).append("</li>");
buf.append("<li><b>").append(_t("status")).append("</b>: ").append(_t("is the peer banned, or unreachable, or failing tunnel tests?")).append("</li>");
buf.append("</ul>");
buf.append("</ul></td></tr></tbody></table>\n");
////
//// don't bother reindenting

View File

@ -9,7 +9,7 @@ public class ProfilesHelper extends HelperBase {
private static final String titles[] =
{_x("High Capacity"), // 0
_x("Floodfill "), // 1
_x("Floodfill"), // 1
_x("Banned"), // 2
_x("All"), }; // 3
@ -93,9 +93,7 @@ public class ProfilesHelper extends HelperBase {
private void renderNavBar() throws IOException {
StringBuilder buf = new StringBuilder(1024);
buf.append("<div class=\"confignav\" id=\"confignav\">");
// TODO fix up the non-light themes
String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME);
boolean span = _graphical && (theme == null || theme.equals(CSSHelper.DEFAULT_THEME));
boolean span = _graphical;
if (!span)
buf.append("<center>");
int tab = getTab();
@ -112,9 +110,9 @@ public class ProfilesHelper extends HelperBase {
buf.append("<a href=\"profiles").append(links[i]).append("\">").append(_t(titles[i])).append("</a>");
}
if (span)
buf.append(" </span>\n");
buf.append("</span>\n");
else if (i != titles.length - 1)
buf.append(" |\n");
buf.append("&nbsp;&nbsp;\n");
}
if (!span)
buf.append("</center>");

View File

@ -30,11 +30,21 @@ public class StatsGenerator {
public void generateStatsPage(Writer out, boolean showAll) throws IOException {
StringBuilder buf = new StringBuilder(16*1024);
buf.append("<div class=\"joblog\"><form action=\"\">");
buf.append("<select name=\"go\" onChange='location.href=this.value'>");
buf.append("<div class=\"joblog\">\n");
buf.append("<p id=\"gatherstats\">");
buf.append(_t("Statistics gathered during this router's uptime")).append(" (");
long uptime = _context.router().getUptime();
buf.append(DataHelper.formatDuration2(uptime));
buf.append("). ").append( _t("The data gathered is quantized over a 1 minute period, so should just be used as an estimate."));
buf.append(' ').append( _t("These statistics are primarily used for development and debugging."));
buf.append("</p>");
buf.append("<form action=\"\"><b>");
buf.append(_t("Jump to section")).append(":</b> <select name=\"go\" onChange='location.href=this.value'>");
out.write(buf.toString());
buf.setLength(0);
Map<String, SortedSet<String>> unsorted = _context.statManager().getStatsByGroup();
Map<String, Set<String>> groups = new TreeMap<String, Set<String>>(new AlphaComparator());
groups.putAll(unsorted);
@ -56,25 +66,19 @@ public class StatsGenerator {
}
buf.append("</select> <input type=\"submit\" value=\"").append(_t("GO")).append("\" />");
buf.append("</form>");
buf.append(_t("Statistics gathered during this router's uptime")).append(" (");
long uptime = _context.router().getUptime();
buf.append(DataHelper.formatDuration2(uptime));
buf.append("). ").append( _t("The data gathered is quantized over a 1 minute period, so should just be used as an estimate."));
buf.append(' ').append( _t("These statistics are primarily used for development and debugging."));
out.write(buf.toString());
buf.setLength(0);
for (Map.Entry<String, Set<String>> entry : groups.entrySet()) {
String group = entry.getKey();
Set<String> stats = entry.getValue();
buf.append("<h3><a name=\"");
buf.append("<h3 class=\"stats\"><a name=\"");
buf.append(group);
buf.append("\">");
buf.append(_t(group));
buf.append("</a></h3>");
buf.append("<ul>");
buf.append("<ul class=\"statlist\">");
out.write(buf.toString());
buf.setLength(0);
for (String stat : stats) {
@ -82,7 +86,7 @@ public class StatsGenerator {
buf.append(stat);
buf.append("\">");
buf.append(stat);
buf.append("</a></b><br>");
buf.append("</a>:</b>&nbsp;");
if (_context.statManager().isFrequency(stat))
renderFrequency(stat, buf);
else
@ -102,7 +106,7 @@ public class StatsGenerator {
buf.append(freq.getDescription());
buf.append("</i><br>");
if (freq.getEventCount() <= 0) {
buf.append(_t("No lifetime events")).append("<br>\n");
buf.append("<ul><li class=\"noevents\">").append(_t("No lifetime events")).append("</li></ul>\n");
return;
}
long uptime = _context.router().getUptime();
@ -153,7 +157,7 @@ public class StatsGenerator {
buf.append("</i><br>");
}
if (rate.getLifetimeEventCount() <= 0) {
buf.append(_t("No lifetime events")).append("<br>\n");
buf.append("<ul><li class=\"noevents\">").append(_t("No lifetime events")).append("</li></ul>\n");
return;
}
long now = _context.clock().now();
@ -214,7 +218,7 @@ public class StatsGenerator {
buf.append(")");
}
if (curRate.getSummaryListener() != null) {
buf.append(" <a href=\"graph?stat=").append(name)
buf.append("<br><a href=\"graph?stat=").append(name)
.append('.').append(periods[i]);
buf.append("\">").append(_t("Graph Data")).append("</a> - ");
buf.append(" <a href=\"graph?stat=").append(name)

View File

@ -28,7 +28,7 @@ class SummaryBarRenderer {
static final String ALL_SECTIONS[] =
{"HelpAndFAQ", "I2PServices", "I2PInternals", "General", "ShortGeneral", "NetworkReachability",
"UpdateStatus", "RestartStatus", "Peers", "FirewallAndReseedStatus", "Bandwidth", "Tunnels",
"Congestion", "TunnelStatus", "Destinations", "NewsHeadings" };
"Congestion", "TunnelStatus", "Destinations", "NewsHeadings", "Advanced" };
static final Map<String, String> SECTION_NAMES;
static {
@ -49,6 +49,7 @@ class SummaryBarRenderer {
aMap.put("TunnelStatus", "Tunnel Status");
aMap.put("Destinations", "Local Tunnels");
aMap.put("NewsHeadings", "News &amp; Updates");
aMap.put("Advanced", "Advanced");
SECTION_NAMES = Collections.unmodifiableMap(aMap);
}
@ -88,6 +89,8 @@ class SummaryBarRenderer {
buf.append(renderI2PServicesHTML());
else if ("I2PInternals".equals(section))
buf.append(renderI2PInternalsHTML());
else if ("Advanced".equals(section))
buf.append(renderAdvancedHTML());
else if ("General".equals(section))
buf.append(renderGeneralHTML());
else if ("ShortGeneral".equals(section))
@ -139,7 +142,7 @@ class SummaryBarRenderer {
.append(_t("I2P Services"))
.append("</a></h3>\n" +
"<hr class=\"b\"><table><tr><td>" +
"<hr class=\"b\"><table id=\"sb_services\"><tr><td>" +
"<a href=\"/susimail/susimail\" target=\"_blank\" title=\"")
.append(_t("Anonymous webmail client"))
@ -177,7 +180,7 @@ class SummaryBarRenderer {
.append(_t("I2P Internals"))
.append("</a></h3><hr class=\"b\">\n" +
"<table><tr><td>\n" +
"<table id=\"sb_internals\"><tr><td>\n" +
"<a href=\"/tunnels\" target=\"_top\" title=\"")
.append(_t("View existing tunnels and tunnel build status"))
@ -223,13 +226,7 @@ class SummaryBarRenderer {
.append("</a>\n");
}
buf.append("<a href=\"/stats\" target=\"_top\" title=\"")
.append(_t("Textual router performance statistics"))
.append("\">")
.append(nbsp(_t("Stats")))
.append("</a>\n" +
"<a href=\"/dns\" target=\"_top\" title=\"")
buf.append("<a href=\"/dns\" target=\"_top\" title=\"")
.append(_t("Manage your I2P hosts file here (I2P domain name resolution)"))
.append("\">")
.append(nbsp(_t("Addressbook")))
@ -241,12 +238,74 @@ class SummaryBarRenderer {
.append(nbsp(_t("Hidden Services Manager")))
.append("</a>\n");
if (_context.getBooleanProperty(HelperBase.PROP_ADVANCED))
buf.append("<a href=\"/debug\">Debug</a>\n");
buf.append("</td></tr></table>\n");
return buf.toString();
}
public String renderAdvancedHTML() {
StringBuilder buf = new StringBuilder(512);
buf.append("<h3 id=\"advanced\"><a title=\"")
.append(_t("Advanced Configuration"))
.append("\" href=\"/configadvanced\">")
.append(_t("Advanced"))
.append("</a></h3>\n")
.append("<hr class=\"b\"><table id=\"sb_advanced\"><tr><td>")
.append("<a title=\"")
.append(_t("Review active encryption certificates used in console"))
.append("\" href=\"certs\">")
.append(nbsp(_t("Certs")))
.append("</a>\n")
.append("<a title=\"")
.append(_t("View full changelog"))
.append("\" href=\"viewhistory\" target=\"_blank\">")
.append(nbsp(_t("Changelog")))
.append("</a>\n")
.append("<a title=\"")
.append(_t("View router debug information"))
.append("\" href=\"debug\">")
.append(nbsp(_t("Debug")))
.append("</a>\n")
.append("<a title=\"")
.append(_t("Review extended info about installed .jar and .war files"))
.append("\" href=\"jars\">")
.append(nbsp(_t("Jars")))
.append("</a>\n");
File javadoc = new File(_context.getBaseDir(), "docs/javadoc/index.html");
if (javadoc.exists())
buf.append("<a href=\"/javadoc/index.html\" target=\"_blank\">Javadoc</a>\n");
buf.append("</td></tr></table>\n");
buf.append("<a title=\"")
.append(_t("View active leasesets (debug mode)"))
.append("\" href=\"/netdb?l=2\">")
.append(nbsp(_t("Leasesets")))
.append("</a>\n")
.append("<a title=\"")
.append(_t("Signed proof of ownership of this router"))
.append("\" href=\"proof\">")
.append(nbsp(_t("Proof")))
.append("</a>\n")
.append("<a href=\"/stats\" target=\"_top\" title=\"")
.append(_t("Textual router performance statistics"))
.append("\">")
.append(nbsp(_t("Stats")))
.append("</a>\n")
.append("<a title=\"")
.append(_t("Review possible sybils in network database"))
.append("\" href=\"/netdb?f=3\">")
.append(nbsp(_t("Sybils")))
.append("</a>\n")
.append("</td></tr></table>");
return buf.toString();
}
@ -259,7 +318,7 @@ class SummaryBarRenderer {
.append(_t("General"))
.append("</a></h3><hr class=\"b\">\n" +
"<table><tr>" +
"<table id=\"sb_localid\"><tr>" +
"<td align=\"left\"><b title=\"")
.append(_t("Your Local Identity is your unique I2P router identity, similar to an ip address but tailored to I2P. "))
.append(_t("Never disclose this to anyone, as it can reveal your real world ip."))
@ -277,7 +336,7 @@ class SummaryBarRenderer {
.append(_t("show"))
.append("</a></td></tr>\n" +
"</table><table>" + // fix for some rows with a big left side and some with a big right side
"</table><table id=\"sb_version\">" + // fix for some rows with a big left side and some with a big right side
"<tr title=\"")
.append(_t("The version of the I2P software we are running"))
.append("\">" +
@ -288,7 +347,7 @@ class SummaryBarRenderer {
.append(_helper.getVersion())
.append("</td></tr>\n" +
"</table><table>" + // fix for some rows with a big left side and some with a big right side
"</table><table id=\"sb_uptime\">" + // fix for some rows with a big left side and some with a big right side
"<tr title=\"")
.append(_t("How long we've been running for this session"))
.append("\">" +
@ -304,7 +363,7 @@ class SummaryBarRenderer {
public String renderShortGeneralHTML() {
if (_helper == null) return "";
StringBuilder buf = new StringBuilder(512);
buf.append("<table>" +
buf.append("<table id=\"sb_shortgeneral\">" +
"<tr title=\"")
.append(_t("The version of the I2P software we are running"))
.append("\">" +
@ -330,7 +389,7 @@ class SummaryBarRenderer {
public String renderNetworkReachabilityHTML() {
if (_helper == null) return "";
StringBuilder buf = new StringBuilder(512);
buf.append("<h4><a href=\"/confignet#help\" target=\"_top\" title=\"")
buf.append("<h4><a href=\"/help#confignet\" target=\"_top\" title=\"")
.append(_t("Help with configuring your firewall and router for optimal I2P performance"))
.append("\">")
.append(_t("Network"))
@ -387,7 +446,7 @@ class SummaryBarRenderer {
.append(_t("Peers"))
.append("</a></h3><hr class=\"b\">\n" +
"<table>\n" +
"<table id=\"sb_peers\">\n" +
"<tr title=\"")
.append(_t("Peers we've been talking to in the last few minutes/last hour"))
@ -456,7 +515,7 @@ class SummaryBarRenderer {
.append("\" target=\"_top\">")
.append(_t("Bandwidth in/out"))
.append("</a></h3><hr class=\"b\">" +
"<table>\n" +
"<table id=\"sb_bandwidth\">\n" +
"<tr><td align=\"left\"><b>")
.append(DataHelper.formatDuration2(3 * 1000)) // lie and say 3 sec since 1 sec would appear as 1000 ms
@ -500,7 +559,7 @@ class SummaryBarRenderer {
.append("\">")
.append(_t("Tunnels"))
.append("</a></h3><hr class=\"b\">" +
"<table>\n" +
"<table id=\"sb_tunnels\">\n" +
"<tr title=\"")
.append(_t("Used for building and testing tunnels, and communicating with floodfill peers"))
@ -550,7 +609,7 @@ class SummaryBarRenderer {
.append("\">")
.append(_t("Congestion"))
.append("</a></h3><hr class=\"b\">" +
"<table>\n" +
"<table id=\"sb_queue\">\n" +
"<tr title=\"")
.append(_t("Indicates router performance"))

View File

@ -61,6 +61,7 @@ public class SummaryHelper extends HelperBase {
static final String DEFAULT_MINIMAL =
"ShortGeneral" + S +
"Bandwidth" + S +
"NewsHeadings" + S +
"UpdateStatus" + S +
"NetworkReachability" + S +
@ -436,10 +437,10 @@ public class SummaryHelper extends HelperBase {
buf.append("<h3><a href=\"/i2ptunnelmgr\" target=\"_top\" title=\"")
.append(_t("Add/remove/edit &amp; control your client and server tunnels"))
.append("\">").append(_t("Local Tunnels"))
.append("</a></h3><hr class=\"b\"><div class=\"tunnels\">");
.append("</a></h3><hr class=\"b\">");
if (!clients.isEmpty()) {
Collections.sort(clients, new AlphaComparator());
buf.append("<table>");
buf.append("<table id=\"sb_localtunnels\">");
for (Destination client : clients) {
String name = getName(client);
@ -477,7 +478,6 @@ public class SummaryHelper extends HelperBase {
} else {
buf.append("<center><i>").append(_t("none")).append("</i></center>");
}
buf.append("</div>\n");
return buf.toString();
}
@ -696,7 +696,7 @@ public class SummaryHelper extends HelperBase {
String status = NewsHelper.getUpdateStatus();
boolean needSpace = false;
if (status.length() > 0) {
buf.append("<h4>").append(status).append("</h4>\n");
buf.append("<h4 class=\"sb_info\">").append(status).append("</h4>\n");
needSpace = true;
}
String dver = NewsHelper.updateVersionDownloaded();
@ -712,7 +712,7 @@ public class SummaryHelper extends HelperBase {
buf.append("<hr>");
else
needSpace = true;
buf.append("<h4><b>").append(_t("Update downloaded")).append("<br>");
buf.append("<h4 class=\"sb_info\"><b>").append(_t("Update downloaded")).append("<br>");
if (_context.hasWrapper())
buf.append(_t("Click Restart to install"));
else
@ -733,7 +733,7 @@ public class SummaryHelper extends HelperBase {
buf.append("<hr>");
else
needSpace = true;
buf.append("<h4><b>").append(_t("Update available")).append(":<br>");
buf.append("<h4 class=\"sb_info\"><b>").append(_t("Update available")).append(":<br>");
buf.append(_t("Version {0}", getUpdateVersion())).append("<br>");
buf.append(constraint).append("</b></h4>");
avail = false;
@ -745,7 +745,7 @@ public class SummaryHelper extends HelperBase {
buf.append("<hr>");
else
needSpace = true;
buf.append("<h4><b>").append(_t("Update available")).append(":<br>");
buf.append("<h4 class=\"sb_info\"><b>").append(_t("Update available")).append(":<br>");
buf.append(_t("Version {0}", getUnsignedUpdateVersion())).append("<br>");
buf.append(unsignedConstraint).append("</b></h4>");
unsignedAvail = false;
@ -757,7 +757,7 @@ public class SummaryHelper extends HelperBase {
buf.append("<hr>");
else
needSpace = true;
buf.append("<h4><b>").append(_t("Update available")).append(":<br>");
buf.append("<h4 class=\"sb_info\"><b>").append(_t("Update available")).append(":<br>");
buf.append(_t("Version {0}", getDevSU3UpdateVersion())).append("<br>");
buf.append(devSU3Constraint).append("</b></h4>");
devSU3Avail = false;
@ -820,7 +820,7 @@ public class SummaryHelper extends HelperBase {
public String getFirewallAndReseedStatus() {
StringBuilder buf = new StringBuilder(256);
if (showFirewallWarning()) {
buf.append("<h4><a href=\"/confignet\" target=\"_top\" title=\"")
buf.append("<h4 id=\"sb_warning\"><a href=\"/help#configurationhelp\" target=\"_top\" title=\"")
.append(_t("Help with firewall configuration"))
.append("\">")
.append(_t("Check network connection and NAT/firewall"))
@ -928,7 +928,7 @@ public class SummaryHelper extends HelperBase {
String imgPath = CSSHelper.BASE_THEME_PATH + theme + "/images/";
StringBuilder buf = new StringBuilder(2048);
buf.append("<table class=\"sidebarconf\"><tr><th>")
buf.append("<table id=\"sidebarconf\"><tr><th>")
.append(_t("Remove"))
.append("</th><th>")
.append(_t("Name"))
@ -997,8 +997,7 @@ public class SummaryHelper extends HelperBase {
"<input type=\"submit\" name=\"action\" class=\"delete\" value=\"")
.append(_t("Delete selected"))
.append("\"></td><td align=\"left\"><b>")
.append(_t("Add")).append(":</b> " +
"<select name=\"name\">\n" +
.append("<select name=\"name\">\n" +
"<option value=\"\" selected=\"selected\">")
.append(_t("Select a section to add"))
.append("</option>\n");

View File

@ -35,7 +35,9 @@ class SummaryRenderer {
private final Log _log;
private final SummaryListener _listener;
private final I2PAppContext _context;
private static final Color RESTART_BAR_COLOR = new Color(255, 144, 0, 224);
private static final Color AREA_COLOR = new Color(100, 160, 200, 240);
private static final Color LINE_COLOR = new Color(0, 30, 110, 255);
private static final Color RESTART_BAR_COLOR = new Color(223, 13, 13, 255);
public SummaryRenderer(I2PAppContext ctx, SummaryListener lsnr) {
_log = ctx.logManager().getLog(SummaryRenderer.class);
@ -131,8 +133,11 @@ class SummaryRenderer {
small = small.deriveFont(small.getSize2D() + 2.0f);
large = large.deriveFont(Font.PLAIN, large.getSize2D() + 3.0f);
} else {
small = small.deriveFont(small.getSize2D() + 1.0f);
large = large.deriveFont(large.getSize2D() + 1.0f);
// small = small.deriveFont(small.getSize2D() + 1.0f);
// if specified font family is missing, jrobin will use fallback
small = new Font("Droid Sans Mono", Font.PLAIN, 11);
// large = large.deriveFont(large.getSize2D() + 1.0f);
large = new Font("Droid Sans", Font.PLAIN, 13);
}
def.setSmallFont(small);
def.setLargeFont(large);
@ -184,14 +189,14 @@ class SummaryRenderer {
def.datasource(plotName, path, plotName, SummaryListener.CF, _listener.getBackendName());
if (descr.length() > 0) {
def.area(plotName, Color.BLUE, descr + "\\r");
def.area(plotName, AREA_COLOR, descr + "\\l");
} else {
def.area(plotName, Color.BLUE);
def.area(plotName, AREA_COLOR);
}
if (!hideLegend) {
def.gprint(plotName, SummaryListener.CF, _t("avg") + ": %.2f %s");
def.gprint(plotName, "MAX", ' ' + _t("max") + ": %.2f %S");
def.gprint(plotName, "LAST", ' ' + _t("now") + ": %.2f %S\\r");
def.gprint(plotName, SummaryListener.CF, " " + _t("Avg") + ": %.2f%s");
def.gprint(plotName, "MAX", ' ' + _t("Max") + ": %.2f%S");
def.gprint(plotName, "LAST", ' ' + _t("Now") + ": %.2f%S\\l");
}
String plotName2 = null;
if (lsnr2 != null) {
@ -200,25 +205,32 @@ class SummaryRenderer {
String path2 = lsnr2.getData().getPath();
String descr2 = _t(lsnr2.getRate().getRateStat().getDescription());
def.datasource(plotName2, path2, plotName2, SummaryListener.CF, lsnr2.getBackendName());
def.line(plotName2, Color.RED, descr2 + "\\r", 3);
def.line(plotName2, LINE_COLOR, descr2 + "\\l", 2);
if (!hideLegend) {
def.gprint(plotName2, SummaryListener.CF, _t("avg") + ": %.2f %s");
def.gprint(plotName2, "MAX", ' ' + _t("max") + ": %.2f %S");
def.gprint(plotName2, "LAST", ' ' + _t("now") + ": %.2f %S\\r");
def.gprint(plotName2, SummaryListener.CF, " " + _t("Avg") + ": %.2f%s");
def.gprint(plotName2, "MAX", ' ' + _t("Max") + ": %.2f%S");
def.gprint(plotName2, "LAST", ' ' + _t("Now") + ": %.2f%S\\l");
}
}
if (!hideLegend) {
// '07-Jul 21:09 UTC' with month name in the system locale
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM HH:mm");
// '07 Jul 21:09' with month name in the system locale
// TODO: Fix Arabic time display
SimpleDateFormat sdf = new SimpleDateFormat("dd MMM HH:mm");
Map<Long, String> events = ((RouterContext)_context).router().eventLog().getEvents(EventLog.STARTED, start);
for (Map.Entry<Long, String> event : events.entrySet()) {
long started = event.getKey().longValue();
if (started > start && started < end) {
String legend = _t("Restart") + ' ' + sdf.format(new Date(started)) + " UTC " + event.getValue() + "\\r";
def.vrule(started / 1000, RESTART_BAR_COLOR, legend, 4.0f);
// String legend = _t("Restart") + ' ' + sdf.format(new Date(started)) + " UTC " + event.getValue() + "\\l";
if ("ar".equals(lang)) {
String legend = _t("Restart") + ' ' + sdf.format(new Date(started)) + " - " + event.getValue() + "\\l";
def.vrule(started / 1000, RESTART_BAR_COLOR, legend, 2.0f);
} else {
String legend = _t("Restart") + ' ' + sdf.format(new Date(started)) + " [" + event.getValue() + "]\\l";
def.vrule(started / 1000, RESTART_BAR_COLOR, legend, 2.0f);
}
}
}
def.comment(sdf.format(new Date(start)) + " -- " + sdf.format(new Date(end)) + " UTC\\r");
def.comment(sdf.format(new Date(start)) + " " + sdf.format(new Date(end)) + " UTC\\r");
}
if (!showCredit)
def.setShowSignature(false);
@ -227,8 +239,8 @@ class SummaryRenderer {
// (but with the same coordinates, so the values may look pretty skewed)
def.datasource(dsNames[0], path, dsNames[0], "AVERAGE", "MEMORY");
def.datasource(dsNames[1], path, dsNames[1], "AVERAGE", "MEMORY");
def.area(dsNames[0], Color.BLUE, _listener.getRate().getRateStat().getDescription());
def.line(dsNames[1], Color.RED, "Events per period");
def.area(dsNames[0], AREA_COLOR, _listener.getRate().getRateStat().getDescription());
def.line(dsNames[1], LINE_COLOR, "Events per period");
*/
if (hideLegend)
def.setNoLegend(true);

View File

@ -161,15 +161,15 @@ class SybilRenderer {
ris.add(ri);
}
if (ris.isEmpty()) {
out.write("<h3>No known floodfills</h3>");
out.write("<h3 class=\"sybils\">No known floodfills</h3>");
return;
}
StringBuilder buf = new StringBuilder(4*1024);
buf.append("<p><b>This is an experimental network database tool for debugging and analysis. Do not panic even if you see warnings below. " +
buf.append("<p id=\"sybilinfo\"><b>This is an experimental network database tool for debugging and analysis. Do not panic even if you see warnings below. " +
"Possible \"threats\" are summarized at the bottom, however these are unlikely to be real threats. " +
"If you see anything you would like to discuss with the devs, contact us on IRC #i2p-dev.</b></p>" +
"<ul><li><a href=\"#known\">FF Summary</a>" +
"<div id=\"sybilnav\"><ul><li><a href=\"#known\">FF Summary</a>" +
"</li><li><a href=\"#family\">Same Family</a>" +
"</li><li><a href=\"#ourIP\">IP close to us</a>" +
"</li><li><a href=\"#sameIP\">Same IP</a>" +
@ -181,10 +181,10 @@ class SybilRenderer {
"</li><li><a href=\"#dht\">DHT neighbors</a>" +
"</li><li><a href=\"#dest\">Close to our destinations</a>" +
"</li><li><a href=\"#threats\">Highest threats</a>" +
"</li></ul>");
"</li></ul></div>");
renderRouterInfo(buf, _context.router().getRouterInfo(), null, true, false);
buf.append("<h3 id=\"known\">Known Floodfills: ").append(ris.size()).append("</h3>");
buf.append("<h3 id=\"known\" class=\"sybils\">Known Floodfills: ").append(ris.size()).append("</h3>");
double tot = 0;
int count = 200;
@ -196,12 +196,13 @@ class SybilRenderer {
tot += d;
}
double avgMinDist = tot / count;
buf.append("<p>Average closest floodfill distance: " + fmt.format(avgMinDist) + "</p>");
buf.append("<p>Routing Data: \"").append(DataHelper.getUTF8(_context.routerKeyGenerator().getModData()))
.append("\" Last Changed: ").append(new Date(_context.routerKeyGenerator().getLastChanged()));
buf.append("</p><p>Next Routing Data: \"").append(DataHelper.getUTF8(_context.routerKeyGenerator().getNextModData()))
.append("\" Rotates in: ").append(DataHelper.formatDuration(_context.routerKeyGenerator().getTimeTillMidnight()));
buf.append("</p>");
buf.append("<div id=\"sybils_summary\">\n");
buf.append("<b>Average closest floodfill distance:</b> ").append(fmt.format(avgMinDist)).append("<br>\n");
buf.append("<b>Routing Data:</b> \"").append(DataHelper.getUTF8(_context.routerKeyGenerator().getModData()))
.append("\" <b>Last Changed:</b> ").append(new Date(_context.routerKeyGenerator().getLastChanged())).append("<br>\n");
buf.append("<b>Next Routing Data:</b> \"").append(DataHelper.getUTF8(_context.routerKeyGenerator().getNextModData()))
.append("\" <b>Rotates in:</b> ").append(DataHelper.formatDuration(_context.routerKeyGenerator().getTimeTillMidnight())).append("\n");
buf.append("</div>\n");
Map<Hash, Points> points = new HashMap<Hash, Points>(64);
@ -216,20 +217,20 @@ class SybilRenderer {
renderPairDistance(out, buf, ris, points);
// Distance to our router analysis
buf.append("<h3 id=\"ritoday\">Closest Floodfills to Our Routing Key (Where we Store our RI)</h3>");
buf.append("<h3 id=\"ritoday\" class=\"sybils\">Closest Floodfills to Our Routing Key (Where we Store our RI)</h3>");
buf.append("<p><a href=\"/netdb?caps=f&amp;sybil\">See all</a></p>");
renderRouterInfoHTML(out, buf, ourRKey, avgMinDist, ris, points);
RouterKeyGenerator rkgen = _context.routerKeyGenerator();
Hash nkey = rkgen.getNextRoutingKey(us);
buf.append("<h3 id=\"ritmrw\">Closest Floodfills to Tomorrow's Routing Key (Where we will Store our RI)</h3>");
buf.append("<h3 id=\"ritmrw\" class=\"sybils\">Closest Floodfills to Tomorrow's Routing Key (Where we will Store our RI)</h3>");
buf.append("<p><a href=\"/netdb?caps=f&amp;sybil\">See all</a></p>");
renderRouterInfoHTML(out, buf, nkey, avgMinDist, ris, points);
buf.append("<h3 id=\"dht\">Closest Floodfills to Our Router Hash (DHT Neighbors if we are Floodfill)</h3>");
buf.append("<h3 id=\"dht\" class=\"sybils\">Closest Floodfills to Our Router Hash (DHT Neighbors if we are Floodfill)</h3>");
renderRouterInfoHTML(out, buf, us, avgMinDist, ris, points);
// Distance to our published destinations analysis
buf.append("<h3 id=\"dest\">Floodfills Close to Our Destinations</h3>");
buf.append("<h3 id=\"dest\" class=\"sybils\">Floodfills Close to Our Destinations</h3>");
Map<Hash, TunnelPool> clientInboundPools = _context.tunnelManager().getInboundClientPools();
List<Hash> destinations = new ArrayList<Hash>(clientInboundPools.keySet());
boolean debug = _context.getBooleanProperty(HelperBase.PROP_ADVANCED);
@ -245,11 +246,11 @@ class SybilRenderer {
Hash rkey = ls.getRoutingKey();
TunnelPool in = clientInboundPools.get(client);
String name = (in != null) ? in.getSettings().getDestinationNickname() : client.toBase64().substring(0,4);
buf.append("<h3>Closest floodfills to the Routing Key for " + DataHelper.escapeHTML(name) + " (where we store our LS)</h3>");
buf.append("<h3 class=\"sybils\">Closest floodfills to the Routing Key for " + DataHelper.escapeHTML(name) + " (where we store our LS)</h3>");
buf.append("<p><a href=\"/netdb?caps=f&amp;sybil=" + ls.getHash().toBase64() + "\">See all</a></p>");
renderRouterInfoHTML(out, buf, rkey, avgMinDist, ris, points);
nkey = rkgen.getNextRoutingKey(ls.getHash());
buf.append("<h3>Closest floodfills to Tomorrow's Routing Key for " + DataHelper.escapeHTML(name) + " (where we will store our LS)</h3>");
buf.append("<h3 class=\"sybils\">Closest floodfills to Tomorrow's Routing Key for " + DataHelper.escapeHTML(name) + " (where we will store our LS)</h3>");
buf.append("<p><a href=\"/netdb?caps=f&amp;sybil=" + ls.getHash().toBase64() + "\">See all</a></p>");
renderRouterInfoHTML(out, buf, nkey, avgMinDist, ris, points);
}
@ -261,7 +262,7 @@ class SybilRenderer {
if (!points.isEmpty()) {
List<Hash> warns = new ArrayList<Hash>(points.keySet());
Collections.sort(warns, new PointsComparator(points));
buf.append("<h3 id=\"threats\">Routers with Most Threat Points</h3>");
buf.append("<h3 id=\"threats\" class=\"sybils\">Routers with Most Threat Points</h3>");
for (Hash h : warns) {
RouterInfo ri = _context.netDb().lookupRouterInfoLocally(h);
if (ri == null)
@ -270,7 +271,7 @@ class SybilRenderer {
double p = pp.points;
if (p < MIN_DISPLAY_POINTS)
break; // sorted
buf.append("<p><b>Threat Points: " + fmt.format(p) + "</b><ul>");
buf.append("<p class=\"threatpoints\"><b>Threat Points: " + fmt.format(p) + "</b><ul>");
for (String s : pp.reasons) {
buf.append("<li>").append(s).append("</li>");
}
@ -318,9 +319,9 @@ class SybilRenderer {
}
double avg = total / (sz * sz / 2);
buf.append("<h3>Average Floodfill Distance is ").append(fmt.format(avg)).append("</h3>");
buf.append("<h3 class=\"sybils\">Average Floodfill Distance is ").append(fmt.format(avg)).append("</h3>");
buf.append("<h3 id=\"pairs\">Closest Floodfill Pairs by Hash</h3>");
buf.append("<h3 id=\"pairs\" class=\"sybils\">Closest Floodfill Pairs by Hash</h3>");
for (Pair p : pairs) {
double distance = biLog2(p.dist);
double point = MIN_CLOSE - distance;
@ -328,7 +329,7 @@ class SybilRenderer {
break; // sorted;
if (point >= 2) {
// limit display
buf.append("<p><b>Hash Distance: ").append(fmt.format(distance)).append(": </b>");
buf.append("<p class=\"hashdist\"><b>Hash Distance: ").append(fmt.format(distance)).append(": </b>");
buf.append("</p>");
renderRouterInfo(buf, p.r1, null, false, false);
renderRouterInfo(buf, p.r2, null, false, false);
@ -398,14 +399,14 @@ class SybilRenderer {
byte[] ourIP = getIP(us);
if (ourIP == null)
return;
buf.append("<h3 \"ourIP\">Floodfills close to Our IP</h3>");
buf.append("<h3 id=\"ourIP\" class=\"sybils\">Floodfills close to Our IP</h3>");
boolean found = false;
for (RouterInfo info : ris) {
byte[] ip = getIP(info);
if (ip == null)
continue;
if (ip[0] == ourIP[0] && ip[1] == ourIP[1]) {
buf.append("<p><b>");
buf.append("<p id=\"sybil_floodfill\"><b>");
if (ip[2] == ourIP[2]) {
if (ip[3] == ourIP[3]) {
buf.append("Same IP as us");
@ -424,14 +425,14 @@ class SybilRenderer {
}
}
if (!found)
buf.append("<p>None</p>");
buf.append("<p class=\"notfound\">None</p>");
out.write(buf.toString());
out.flush();
buf.setLength(0);
}
private void renderIPGroups32(Writer out, StringBuilder buf, List<RouterInfo> ris, Map<Hash, Points> points) throws IOException {
buf.append("<h3 id=\"sameIP\">Floodfills with the Same IP</h3>");
buf.append("<h3 id=\"sameIP\" class=\"sybils\">Floodfills with the Same IP</h3>");
ObjectCounter<Integer> oc = new ObjectCounter<Integer>();
for (RouterInfo info : ris) {
byte[] ip = getIP(info);
@ -456,7 +457,7 @@ class SybilRenderer {
int i2 = (i >> 8) & 0xff;
int i3 = i & 0xff;
String sip = i0 + "." + i1 + '.' + i2 + '.' + i3;
buf.append("<p><b>").append(count).append(" floodfills with IP <a href=\"/netdb?ip=")
buf.append("<p class=\"sybil floodfill\"><b>").append(count).append(" floodfills with IP <a href=\"/netdb?ip=")
.append(sip).append("&amp;sybil\">").append(sip)
.append("</a>:</b></p>");
for (RouterInfo info : ris) {
@ -478,14 +479,14 @@ class SybilRenderer {
}
}
if (!found)
buf.append("<p>None</p>");
buf.append("<p class=\"notfound\">None</p>");
out.write(buf.toString());
out.flush();
buf.setLength(0);
}
private void renderIPGroups24(Writer out, StringBuilder buf, List<RouterInfo> ris, Map<Hash, Points> points) throws IOException {
buf.append("<h3 id=\"same24\">Floodfills in the Same /24 (2 minimum)</h3>");
buf.append("<h3 id=\"same24\" class=\"sybils\">Floodfills in the Same /24 (2 minimum)</h3>");
ObjectCounter<Integer> oc = new ObjectCounter<Integer>();
for (RouterInfo info : ris) {
byte[] ip = getIP(info);
@ -509,7 +510,7 @@ class SybilRenderer {
int i1 = (i >> 8) & 0xff;
int i2 = i & 0xff;
String sip = i0 + "." + i1 + '.' + i2 + ".0/24";
buf.append("<p><b>").append(count).append(" floodfills with IP <a href=\"/netdb?ip=")
buf.append("<p class=\"sybil floodfill\"><b>").append(count).append(" floodfills with IP <a href=\"/netdb?ip=")
.append(sip).append("&amp;sybil\">").append(sip)
.append("</a>:</b></p>");
for (RouterInfo info : ris) {
@ -529,14 +530,14 @@ class SybilRenderer {
}
}
if (!found)
buf.append("<p>None</p>");
buf.append("<p class=\"notfound\">None</p>");
out.write(buf.toString());
out.flush();
buf.setLength(0);
}
private void renderIPGroups16(Writer out, StringBuilder buf, List<RouterInfo> ris, Map<Hash, Points> points) throws IOException {
buf.append("<h3 id=\"same16\">Floodfills in the Same /16 (4 minimum)</h3>");
buf.append("<h3 id=\"same16\" class=\"sybils\">Floodfills in the Same /16 (4 minimum)</h3>");
ObjectCounter<Integer> oc = new ObjectCounter<Integer>();
for (RouterInfo info : ris) {
byte[] ip = getIP(info);
@ -559,7 +560,7 @@ class SybilRenderer {
int i0 = i >> 8;
int i1 = i & 0xff;
String sip = i0 + "." + i1 + ".0/16";
buf.append("<p><b>").append(count).append(" floodfills with IP <a href=\"/netdb?ip=")
buf.append("<p class=\"sybil floodfill\"><b>").append(count).append(" floodfills with IP <a href=\"/netdb?ip=")
.append(sip).append("&amp;sybil\">").append(sip)
.append("</a></b></p>");
for (RouterInfo info : ris) {
@ -578,14 +579,14 @@ class SybilRenderer {
}
}
if (!found)
buf.append("<p>None</p>");
buf.append("<p class=\"notfound\">None</p>");
out.write(buf.toString());
out.flush();
buf.setLength(0);
}
private void renderIPGroupsFamily(Writer out, StringBuilder buf, List<RouterInfo> ris, Map<Hash, Points> points) throws IOException {
buf.append("<h3>Floodfills in the Same Declared Family</h3>");
buf.append("<h3 id=\"samefamily\" class=\"sybils\">Floodfills in the Same Declared Family</h3>");
ObjectCounter<String> oc = new ObjectCounter<String>();
for (RouterInfo info : ris) {
String fam = info.getOption("family");
@ -601,7 +602,7 @@ class SybilRenderer {
for (String s : foo) {
int count = oc.count(s);
String ss = DataHelper.escapeHTML(s);
buf.append("<p><b>").append(count).append(" floodfills in declared family \"<a href=\"/netdb?fam=")
buf.append("<p class=\"family\"><b>").append(count).append(" floodfills in declared family \"<a href=\"/netdb?fam=")
.append(ss).append("&amp;sybil\">").append(ss).append("</a>\"</b></p>");
for (RouterInfo info : ris) {
String fam = info.getOption("family");
@ -626,7 +627,7 @@ class SybilRenderer {
}
}
if (!found)
buf.append("<p>None</p>");
buf.append("<p class=\"notfound\">None</p>");
out.write(buf.toString());
out.flush();
buf.setLength(0);
@ -753,7 +754,7 @@ class SybilRenderer {
break;
}
double avg = tot / count;
buf.append("<p><b>Totals for " + count + " floodfills: </b>MIN=" + fmt.format(min) + " AVG=" + fmt.format(avg) + " MEDIAN=" + fmt.format(median) + " MAX=" + fmt.format(max) + "</p>\n");
buf.append("<p id=\"sybil_totals\"><b>Totals for " + count + " floodfills: </b>MIN=" + fmt.format(min) + " AVG=" + fmt.format(avg) + " MEDIAN=" + fmt.format(median) + " MAX=" + fmt.format(max) + "</p>\n");
out.write(buf.toString());
out.flush();
buf.setLength(0);
@ -788,35 +789,35 @@ class SybilRenderer {
*/
private double renderRouterInfo(StringBuilder buf, RouterInfo info, Hash us, boolean isUs, boolean full) {
String hash = info.getIdentity().getHash().toBase64();
buf.append("<table><tr><th><a name=\"").append(hash.substring(0, 6)).append("\" ></a>");
buf.append("<table class=\"sybil_routerinfo\"><a name=\"").append(hash.substring(0, 6)).append("\" ></a><tr>");
double distance = 0;
if (isUs) {
buf.append("<a name=\"our-info\" ></a><b>" + _t("Our info") + ": ").append(hash).append("</b></th></tr><tr><td>\n");
buf.append("<th colspan=\"4\"><a name=\"our-info\" ></a><b>" + _t("Our info") + ":</b> <code>").append(hash).append("</code></th></tr>\n");
} else {
buf.append("<b>" + _t("Router") + ":</b> ").append(hash).append("\n");
buf.append("<th colspan=\"2\"><b>" + _t("Router") + ":</b> <code>").append(hash).append("</code>\n");
if (!full) {
buf.append("[<a href=\"netdb?r=").append(hash.substring(0, 6)).append("\" >").append(_t("Full entry")).append("</a>]");
buf.append("</th><th><a title=\"View extended router info\" class=\"viewfullentry\" href=\"netdb?r=").append(hash.substring(0, 6)).append("\" >[").append(_t("Full entry")).append("]</a></th><th>");
}
buf.append("</th><th><img src=\"/imagegen/id?s=32&amp;c=" + hash.replace("=", "%3d") + "\" height=\"32\" width=\"32\"> ");
buf.append("</th></tr><tr><td colspan=\"2\">\n");
buf.append("<img src=\"/imagegen/id?s=32&amp;c=" + hash.replace("=", "%3d") + "\" height=\"32\" width=\"32\"> ");
buf.append("</th></tr>\n");
if (us != null) {
BigInteger dist = HashDistance.getDistance(us, info.getHash());
distance = biLog2(dist);
buf.append("<b>Hash Distance: ").append(fmt.format(distance)).append("</b><br>");
buf.append("<tr><td><b>Hash Distance:</b></td><td colspan=\"3\">").append(fmt.format(distance)).append("</td></tr>\n");
}
}
buf.append("<b>Routing Key: </b>").append(info.getRoutingKey().toBase64()).append("<br>\n");
buf.append("<b>Version: </b>").append(DataHelper.stripHTML(info.getVersion())).append("<br>\n");
buf.append("<b>Caps: </b>").append(DataHelper.stripHTML(info.getCapabilities())).append("<br>\n");
buf.append("<tr><td><b>Routing Key:</b></td><td colspan=\"3\">").append(info.getRoutingKey().toBase64()).append("</td></tr>\n");
buf.append("<tr><td><b>Version:</b></td><td colspan=\"3\">").append(DataHelper.stripHTML(info.getVersion())).append("</td></tr>\n");
buf.append("<tr><td><b>Caps:</b></td><td colspan=\"3\">").append(DataHelper.stripHTML(info.getCapabilities())).append("</td></tr>\n");
String fam = info.getOption("family");
if (fam != null)
buf.append("<b>Family: ").append(DataHelper.escapeHTML(fam)).append("</b><br>\n");
buf.append("<tr><td><b>Family:</b></td><td colspan=\"3\">").append(DataHelper.escapeHTML(fam)).append("</td></tr>\n");
String kls = info.getOption("netdb.knownLeaseSets");
if (kls != null)
buf.append("<b>Lease Sets: </b>").append(DataHelper.stripHTML(kls)).append("<br>\n");
buf.append("<tr><td><b>Lease Sets:</b></td><td colspan=\"3\">").append(DataHelper.stripHTML(kls)).append("</td></tr>\n");
String kr = info.getOption("netdb.knownRouters");
if (kr != null)
buf.append("<b>Routers: </b>").append(DataHelper.stripHTML(kr)).append("<br>\n");
buf.append("<tr><td><b>Routers:</b></td><td colspan=\"3\">").append(DataHelper.stripHTML(kr)).append("</td></tr>\n");
long now = _context.clock().now();
if (!isUs) {
@ -825,46 +826,46 @@ class SybilRenderer {
long heard = prof.getFirstHeardAbout();
if (heard > 0) {
long age = Math.max(now - heard, 1);
buf.append("<b>First heard about:</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>First heard about:</b></td><td colspan=\"3\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
}
heard = prof.getLastHeardAbout();
if (heard > 0) {
long age = Math.max(now - heard, 1);
buf.append("<b>Last heard about:</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>Last heard about:</b></td><td colspan=\"3\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
}
heard = prof.getLastHeardFrom();
if (heard > 0) {
long age = Math.max(now - heard, 1);
buf.append("<b>Last heard from:</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>Last heard from:</b></td><td colspan=\"3\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
}
DBHistory dbh = prof.getDBHistory();
if (dbh != null) {
heard = dbh.getLastLookupSuccessful();
if (heard > 0) {
long age = Math.max(now - heard, 1);
buf.append("<b>Last lookup successful:</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>Last lookup successful:</b></td><td colspan=\"3\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
}
heard = dbh.getLastLookupFailed();
if (heard > 0) {
long age = Math.max(now - heard, 1);
buf.append("<b>Last lookup failed:</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>Last lookup failed:</b></td><td colspan=\"3\"> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
}
heard = dbh.getLastStoreSuccessful();
if (heard > 0) {
long age = Math.max(now - heard, 1);
buf.append("<b>Last store successful:</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>Last store successful:</b></td><td colspan=\"3\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
}
heard = dbh.getLastStoreFailed();
if (heard > 0) {
long age = Math.max(now - heard, 1);
buf.append("<b>Last store failed:</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>Last store failed:</b></td><td colspan=\"3\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
}
}
// any other profile stuff?
@ -872,15 +873,15 @@ class SybilRenderer {
}
long age = Math.max(now - info.getPublished(), 1);
if (isUs && _context.router().isHidden()) {
buf.append("<b>").append(_t("Hidden")).append(", ").append(_t("Updated")).append(":</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>").append(_t("Hidden")).append(", ").append(_t("Updated")).append(":</b></td><td colspan=\"3\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
} else {
buf.append("<b>").append(_t("Published")).append(":</b> ")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("<br>\n");
buf.append("<tr><td><b>").append(_t("Published")).append(":</b></td><td colspan=\"3\">")
.append(_t("{0} ago", DataHelper.formatDuration2(age))).append("</td></tr>\n");
}
buf.append("<b>").append(_t("Signing Key")).append(":</b> ")
.append(info.getIdentity().getSigningPublicKey().getType().toString());
buf.append("<br>\n<b>" + _t("Addresses") + ":</b> ");
buf.append("<tr><td><b>").append(_t("Signing Key")).append(":</b></td><td colspan=\"3\">")
.append(info.getIdentity().getSigningPublicKey().getType().toString()).append("</td></tr>\n");
buf.append("<tr><td><b>" + _t("Addresses") + ":</b></td><td colspan=\"3\">");
String country = _context.commSystem().getCountry(info.getIdentity().getHash());
if(country != null) {
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase(Locale.US)).append('\"');

View File

@ -33,7 +33,7 @@ class TunnelRenderer {
}
public void renderStatusHTML(Writer out) throws IOException {
out.write("<div class=\"wideload\"><h2><a name=\"exploratory\" ></a>" + _t("Exploratory tunnels") + " (<a href=\"/configtunnels#exploratory\">" + _t("configure") + "</a>)</h2>\n");
out.write("<h3 class=\"tabletitle\" id=\"exploratorytunnels\"><a name=\"exploratory\" ></a>" + _t("Exploratory tunnels") + " <a href=\"/configtunnels#exploratory\" title=\"" + _t("Configure tunnels") + "\">[" + _t("configure") + "]</a></h3>\n");
renderPool(out, _context.tunnelManager().getInboundExploratoryPool(), _context.tunnelManager().getOutboundExploratoryPool());
List<Hash> destinations = null;
@ -54,20 +54,20 @@ class TunnelRenderer {
name = outPool.getSettings().getDestinationNickname();
if (name == null)
name = client.toBase64().substring(0,4);
out.write("<h2><a name=\"" + client.toBase64().substring(0,4)
out.write("<h3 class=\"tabletitle\"><a name=\"" + client.toBase64().substring(0,4)
+ "\" ></a>" + _t("Client tunnels for") + ' ' + DataHelper.escapeHTML(_t(name)));
if (isLocal)
out.write(" (<a href=\"/configtunnels#" + client.toBase64().substring(0,4) +"\">" + _t("configure") + "</a>)</h2>\n");
out.write(" <a href=\"/configtunnels#" + client.toBase64().substring(0,4) +"\" title=\"" + _t("Configure tunnels for session") + "\">[" + _t("configure") + "]</a></h3>\n");
else
out.write(" (" + _t("dead") + ")</h2>\n");
out.write(" (" + _t("dead") + ")</h3>\n");
renderPool(out, in, outPool);
}
List<HopConfig> participating = _context.tunnelDispatcher().listParticipatingTunnels();
out.write("<h2><a name=\"participating\"></a>" + _t("Participating tunnels") + "</h2>\n");
out.write("<h3 class=\"tabletitle\"><a name=\"participating\"></a>" + _t("Participating tunnels") + "</h3>\n");
if (!participating.isEmpty()) {
Collections.sort(participating, new TunnelComparator());
out.write("<table><tr><th>" + _t("Receive on") + "</th><th>" + _t("From") + "</th><th>"
out.write("<table class=\"tunneldisplay\"><tr><th>" + _t("Receive on") + "</th><th>" + _t("From") + "</th><th>"
+ _t("Send on") + "</th><th>" + _t("To") + "</th><th>" + _t("Expiration") + "</th>"
+ "<th>" + _t("Usage") + "</th><th>" + _t("Rate") + "</th><th>" + _t("Role") + "</th></tr>\n");
}
@ -136,7 +136,6 @@ class TunnelRenderer {
out.write("<div class=\"statusnotes\"><b>" + _t("none") + "</b></div>\n");
out.write("<div class=\"statusnotes\"><b>" + _t("Lifetime bandwidth usage") + ": " + DataHelper.formatSize2(processed*1024) + "B</b></div>\n");
//renderPeers(out);
out.write("</div>");
}
private static class TunnelComparator implements Comparator<HopConfig>, Serializable {
@ -164,7 +163,7 @@ class TunnelRenderer {
if (info.getLength() > maxLength)
maxLength = info.getLength();
}
out.write("<table><tr><th>" + _t("In/Out") + "</th><th>" + _t("Expiry") + "</th><th>" + _t("Usage") + "</th><th>" + _t("Gateway") + "</th>");
out.write("<table class=\"tunneldisplay\"><tr><th>" + _t("In/Out") + "</th><th>" + _t("Expiry") + "</th><th>" + _t("Usage") + "</th><th>" + _t("Gateway") + "</th>");
if (maxLength > 3) {
out.write("<th align=\"center\" colspan=\"" + (maxLength - 2));
out.write("\">" + _t("Participants") + "</th>");

View File

@ -9,7 +9,7 @@
<%@include file="summaryajax.jsi" %>
</head><body onload="initAjax()">
<%@include file="summary.jsi" %><h1><%=intl._t("Certificates")%></h1>
<div class="main" id="main">
<div class="main" id="certs">
<jsp:useBean class="net.i2p.router.web.CertHelper" id="certhelper" scope="request" />
<jsp:setProperty name="certhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% certhelper.storeWriter(out); %>

View File

@ -15,21 +15,22 @@
<jsp:useBean class="net.i2p.router.web.ConfigNetHelper" id="nethelper" scope="request" />
<jsp:setProperty name="nethelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h1><%=intl._t("I2P Bandwidth Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_bandwidth">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigNetHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>">
<input type="hidden" name="action" value="blah" >
<input type="hidden" name="ratesOnly" value="1" >
<h3><%=intl._t("Bandwidth limiter")%></h3><p>
<img src="/themes/console/images/itoopie_xsm.png" alt="">
<h3 id="bwlimiter" class="tabletitle"><%=intl._t("Bandwidth Limiter")%>&nbsp;<a href="confignet">[<%=intl._t("Advanced Network Configuration")%>]</a></h3>
<table id="bandwidthconfig" class="configtable">
<tr><td class="infohelp" colspan="2">
<b><%=intl._t("I2P will work best if you configure your rates to match the speed of your internet connection.")%></b>
</p>
<div class="wideload"><table><tr><td><input style="text-align: right; width: 5em;" name="inboundrate" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="inboundRate" />" >
</td></tr>
<tr><td><input style="text-align: right; width: 5em;" name="inboundrate" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="inboundRate" />" >
<%=intl._t("KBps In")%>
</td><td>(<jsp:getProperty name="nethelper" property="inboundRateBits" />)</td>
<% /********
@ -55,8 +56,9 @@
</tr><tr>
<td><jsp:getProperty name="nethelper" property="sharePercentageBox" /> <%=intl._t("Share")%></td>
<td>(<jsp:getProperty name="nethelper" property="shareRateBits" />)
</td></tr></table></div>
<p><% int share = nethelper.getShareBandwidth();
</td></tr>
<tr><td class="infohelp" colspan="2">
<% int share = nethelper.getShareBandwidth();
if (share < 12) {
out.print("<b>");
out.print(intl._t("NOTE"));
@ -73,11 +75,11 @@
out.print(intl._t("The higher the share bandwidth the more you improve your anonymity and help the network."));
}
%></p>
<p><a href="confignet"><%=intl._t("Advanced network configuration page")%></a></p><hr>
<div class="formaction">
%></td></tr>
<tr><td class="optionsave" colspan="2">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" class="accept" name="save" value="<%=intl._t("Save changes")%>" >
</div>
</td></tr>
</table>
</form>
</div></div></body></html>
</div></body></html>

View File

@ -16,7 +16,7 @@
<jsp:setProperty name="advancedhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h1><%=intl._t("I2P Advanced Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_advanced">
<%@include file="confignav.jsi" %>
@ -24,9 +24,14 @@
<%@include file="formhandler.jsi" %>
<div class="configure">
<div class="wideload">
<h3><%=intl._t("Floodfill Configuration")%></h3>
<p><%=intl._t("Floodill participation helps the network, but may use more of your computer's resources.")%>
</p><p>
<h3 id="ffconf" class="tabletitle"><%=intl._t("Floodfill Configuration")%></h3>
<form action="" method="POST">
<table id="floodfillconfig" class="configtable">
<tr><td class="infohelp">
<%=intl._t("Floodfill participation helps the network, but may use more of your computer's resources.")%>
</td></tr>
<tr><td>
<%
if (advancedhelper.isFloodfill()) {
%><%=intl._t("This router is currently a floodfill participant.")%><%
@ -34,33 +39,50 @@
%><%=intl._t("This router is not currently a floodfill participant.")%><%
}
%>
</p>
<form action="" method="POST">
</td></tr>
<tr><td>
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="ff" >
<input type="radio" class="optbox" name="ff" value="auto" <%=advancedhelper.getFFChecked(2) %> >
<%=intl._t("Automatic")%><br>
<%=intl._t("Automatic")%>&nbsp;
<input type="radio" class="optbox" name="ff" value="true" <%=advancedhelper.getFFChecked(1) %> >
<%=intl._t("Force On")%><br>
<%=intl._t("Force On")%>&nbsp;
<input type="radio" class="optbox" name="ff" value="false" <%=advancedhelper.getFFChecked(0) %> >
<%=intl._t("Disable")%><br>
<div class="formaction">
<%=intl._t("Disable")%>
</td></tr>
<tr><td class="optionsave" align="right">
<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Save changes")%>" >
</div></form>
<h3><%=intl._t("Advanced I2P Configuration")%></h3>
</td></tr>
</table>
</form>
<h3 id="advancedconfig" class="tabletitle"><%=intl._t("Advanced I2P Configuration")%>&nbsp;<a title="Help with additional configuration settings" href="/help#advancedsettings">[Additional Options]</a></h3><b>
<% if (advancedhelper.isAdvanced()) { %>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<% } // isAdvanced %>
<textarea rows="32" cols="60" name="nofilter_config" wrap="off" spellcheck="false" <% if (!advancedhelper.isAdvanced()) { %>readonly="readonly"<% } %>><jsp:getProperty name="advancedhelper" property="settings" /></textarea><br><hr>
<table class="configtable" id="advconf">
<% if (advancedhelper.isAdvanced()) { %>
<div class="formaction">
<tr><td class="infohelp">
<%=intl._t("NOTE")%>:</b> <%=intl._t("Some changes may require a restart to take effect.")%>
</td></tr>
<% } else { %>
<tr><td>
<%=intl._t("To make changes, edit the file {0}.", "<tt>" + advancedhelper.getConfigFileName() + "</tt>")%>
</td></tr>
<% } // isAdvanced %>
<tr><td class="tabletextarea">
<textarea id="advancedsettings"rows="32" cols="60" name="nofilter_config" wrap="off" spellcheck="false" <% if (!advancedhelper.isAdvanced()) { %>readonly="readonly"<% } %>><jsp:getProperty name="advancedhelper" property="settings" /></textarea>
</td></tr>
<% if (advancedhelper.isAdvanced()) { %>
<tr><td class="optionsave" align="right">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Save changes")%>" >
<br><b><%=intl._t("NOTE")%>:</b> <%=intl._t("Some changes may require a restart to take effect.")%>
</div></form>
<% } else { %>
<%=intl._t("To make changes, edit the file {0}.", "<tt>" + advancedhelper.getConfigFileName() + "</tt>")%>
</td></tr>
<% } // isAdvanced %>
</table>
<% if (advancedhelper.isAdvanced()) { %>
</form>
<% } // isAdvanced %>
</div></div></div></body></html>

View File

@ -21,31 +21,37 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<jsp:setProperty name="clientshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="clientshelper" property="edit" value="<%=request.getParameter(\"edit\")%>" />
<h1><%=intl._t("I2P Client Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_clients">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<h3><%=intl._t("Client Configuration")%></h3><p>
<%=intl._t("The Java clients listed below are started by the router and run in the same JVM.")%><br>
<img src="/themes/console/images/itoopie_xsm.png" alt=""><b><%=intl._t("Be careful changing any settings here. The 'router console' and 'application tunnels' are required for most uses of I2P. Only advanced users should change these.")%></b>
<h3 id="i2pclientconfig"><%=intl._t("Client Configuration")%>&nbsp;
<span class="h3navlinks">
<a href="configi2cp" title="<%=intl._t("Advanced Client Interface Configuration")%>">[I2CP]</a>&nbsp;
<a href="configwebapps" title="<%=intl._t("WebApp Configuration")%>">[WebApps]</a>&nbsp;
<a href="configplugins" title="<%=intl._t("Plugin Configuration")%>">[Plugins]</a>
</span>
</h3>
<p class="infohelp" id="clientconf">
<%=intl._t("The Java clients listed below are started by the router and run in the same JVM.")%>&nbsp;
<%=intl._t("To change other client options, edit the file")%></i><tt>
<%=net.i2p.router.startup.ClientAppConfig.configFile(net.i2p.I2PAppContext.getGlobalContext()).getAbsolutePath()%>.</tt>
<%=intl._t("All changes require restart to take effect.")%>
</p>
<p class="infowarn" id="clientconf">
<b><%=intl._t("Be careful changing any settings here. The 'router console' and 'application tunnels' are required for most uses of I2P. Only advanced users should change these.")%></b>
</p><div class="wideload">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<jsp:getProperty name="clientshelper" property="form1" />
<p><i><%=intl._t("To change other client options, edit the file")%>
<%=net.i2p.router.startup.ClientAppConfig.configFile(net.i2p.I2PAppContext.getGlobalContext()).getAbsolutePath()%>.
<%=intl._t("All changes require restart to take effect.")%></i>
</p><hr><div class="formaction">
<div class="formaction" id="clientsconfig">
<input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
<% if (clientshelper.isClientChangeEnabled() && request.getParameter("edit") == null) { %>
<input type="submit" name="edit" class="add" value="<%=intl._t("Add Client")%>" />
<% } %>
<input type="submit" class="accept" name="action" value="<%=intl._t("Save Client Configuration")%>" />
</div></form></div>
</div><hr>
<p><a href="configi2cp"><%=intl._t("Advanced Client Interface Configuration")%></a></p>
<p><a href="configwebapps"><%=intl._t("WebApp Configuration")%></a></p>
<p><a href="configplugins"><%=intl._t("Plugin Configuration")%></a></p>
</div>
</div></body></html>

View File

@ -14,13 +14,13 @@
<jsp:useBean class="net.i2p.router.web.ConfigFamilyHelper" id="familyHelper" scope="request" />
<jsp:setProperty name="familyHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h1><%=intl._t("I2P Router Family Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_family">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigFamilyHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<p><%=intl._t("Routers in the same family share a family key.")%>
<p class="infohelp"><%=intl._t("Routers in the same family share a family key.")%>
<%=intl._t("To join an existing family, import the private key you exported from a router in the family.")%>
<%=intl._t("To start a new family, enter a family name.")%>
</p>
@ -30,27 +30,35 @@
if (family.length() <= 0) {
// no family yet
%>
<div class="configure">
<table class="configtable" id="joinfamily">
<form action="" method="POST" enctype="multipart/form-data" accept-charset="UTF-8">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Join Existing Router Family")%></h3>
<p><%=intl._t("Import the secret family key that you exported from an existing router in the family.")%>
<p><%=intl._t("Select secret key file")%> :
<tr><th colspan="2"><%=intl._t("Join Existing Router Family")%></th></tr>
<tr><td colspan="2"><%=intl._t("Import the secret family key that you exported from an existing router in the family.")%></td></tr>
<tr>
<td><%=intl._t("Select secret key file")%>:
<input name="file" type="file" value="" />
</p>
<div class="formaction">
</td>
<td class="optionsave">
<input type="submit" name="action" class="download" value="<%=intl._t("Join Existing Router Family")%>" />
</div></form></div>
</td>
</tr>
</form></table>
<div class="configure"><form action="" method="POST">
<table class="configtable" id="newfamily">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Create New Router Family")%></h3>
<p><%=intl._t("Family Name")%> :
<tr><th colspan="2"><%=intl._t("Create New Router Family")%></th></tr>
<tr>
<td><%=intl._t("Family Name")%>:
<input name="family" type="text" size="30" value="" />
</p>
<div class="formaction">
</td>
<td class="optionsave">
<input type="submit" name="action" class="accept" value="<%=intl._t("Create New Router Family")%>" />
</div></form></div>
</td>
</tr>
</form>
</table>
<%
} else {
// family is configured
@ -58,30 +66,36 @@
if (keypw.length() > 0) {
// family is active
%>
<div class="configure">
<table class="configtable" id="exportfamily">
<form action="/exportfamily" method="GET">
<h3><%=intl._t("Export Family Key")%></h3>
<p><%=intl._t("Export the secret family key to be imported into other routers you control.")%>
</p>
<div class="formaction">
<tr><th><%=intl._t("Export Family Key")%></th></tr>
<tr><td><%=intl._t("Export the secret family key to be imported into other routers you control.")%></td></tr>
<tr>
<td class="optionsave">
<input type="submit" name="action" class="go" value="<%=intl._t("Export Family Key")%>" />
</div></form></div>
</td>
</tr>
</form></table>
<%
} else {
// family is not active
%>
<p><b><%=intl._t("Restart required to activate family {0}.", '"' + family + '"')%>
<p class="infohelp"><b><%=intl._t("Restart required to activate family {0}.", '"' + family + '"')%>
<%=intl._t("After restarting, you may export the family key.")%></b></p>
<%
}
%>
<div class="configure"><form action="" method="POST">
<table class="configtable" id="leavefamily">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Leave Router Family")%></h3>
<p><%=intl._t("No longer be a member of the family {0}.", '"' + family + '"')%>
<div class="formaction">
<tr><th colspan="2"><%=intl._t("Leave Router Family")%></th></tr>
<tr><td><%=intl._t("No longer be a member of the family {0}.", '"' + family + '"')%></td>
<td class="optionsave">
<input type="submit" name="action" class="delete" value="<%=intl._t("Leave Router Family")%>" />
</div></form></div>
</td>
</tr>
</form>
</table>
<%
}
%>

View File

@ -18,7 +18,7 @@ input.default {
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Home Page Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_homepage">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigHomeHandler" id="formhandler" scope="request" />
@ -26,24 +26,32 @@ input.default {
<jsp:useBean class="net.i2p.router.web.HomeHelper" id="homehelper" scope="request" />
<jsp:setProperty name="homehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h3><%=intl._t("Default Home Page")%></h3>
<h3 class="tabletitle"><%=intl._t("Default Home Page")%></h3>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="group" value="0">
<table id="oldhome" class="configtable">
<tr>
<td>
<input type="checkbox" name="oldHome" <jsp:getProperty name="homehelper" property="configHome" /> >
<%=intl._t("Use old home page")%>
</td>
<td class="optionsave">
<input type="submit" name="action" class="accept" value="<%=intl._t("Save")%>" >
</td>
</tr>
</table>
</form>
<%
if (homehelper.shouldShowSearch()) {
%>
<h3><%=intl._t("Search Engines")%></h3>
<h3 class="tabletitle"><%=intl._t("Search Engines")%></h3>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="group" value="3">
<jsp:getProperty name="homehelper" property="configSearch" />
<div class="formaction">
<div class="formaction" id="homesearch">
<input type="submit" name="action" class="default" value="<%=intl._t("Add item")%>" >
<input type="submit" name="action" class="delete" value="<%=intl._t("Delete selected")%>" >
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
@ -54,13 +62,12 @@ input.default {
<%
} // shouldShowSearch()
%>
<h3><%=intl._t("Hidden Services of Interest")%></h3>
<h3 class="tabletitle"><%=intl._t("Applications and Configuration")%></h3>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="group" value="1">
<jsp:getProperty name="homehelper" property="configFavorites" />
<div class="formaction">
<input type="hidden" name="group" value="2">
<jsp:getProperty name="homehelper" property="configServices" />
<div class="formaction" id="homeapps">
<input type="submit" name="action" class="default" value="<%=intl._t("Add item")%>" >
<input type="submit" name="action" class="delete" value="<%=intl._t("Delete selected")%>" >
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
@ -69,12 +76,12 @@ input.default {
</div>
</form>
<h3><%=intl._t("Applications and Configuration")%></h3>
<h3 class="tabletitle"><%=intl._t("Hidden Services of Interest")%></h3>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="group" value="2">
<jsp:getProperty name="homehelper" property="configServices" />
<div class="formaction">
<input type="hidden" name="group" value="1">
<jsp:getProperty name="homehelper" property="configFavorites" />
<div class="formaction" id="homesites">
<input type="submit" name="action" class="default" value="<%=intl._t("Add item")%>" >
<input type="submit" name="action" class="delete" value="<%=intl._t("Delete selected")%>" >
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >

View File

@ -21,23 +21,32 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<jsp:setProperty name="clientshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="clientshelper" property="edit" value="<%=request.getParameter(\"edit\")%>" />
<h1><%=intl._t("I2P Client Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_i2cp">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<h3><a name="i2cp"></a><%=intl._t("Advanced Client Interface Configuration")%></h3>
<h3 id="advancedclientconfig"><a name="i2cp"></a><%=intl._t("Advanced Client Interface Configuration")%></h3>
<form action="configi2cp" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<p>
<b><%=intl._t("External I2CP (I2P Client Protocol) Interface Configuration")%></b><br>
<table class="configtable" id="externali2cp">
<tr><td class="infowarn">
<b><%=intl._t("The default settings will work for most people.")%></b>
<%=intl._t("Any changes made here must also be configured in the external client.")%>
<%=intl._t("Many clients do not support SSL or authorization.")%>
<i><%=intl._t("All changes require restart to take effect.")%></i>
</td</tr>
<tr><th><%=intl._t("External I2CP (I2P Client Protocol) Interface Configuration")%></th></tr>
<tr><td>
<input type="radio" class="optbox" name="mode" value="1" <%=clientshelper.i2cpModeChecked(1) %> >
<%=intl._t("Enabled without SSL")%><br>
<input type="radio" class="optbox" name="mode" value="2" <%=clientshelper.i2cpModeChecked(2) %> >
<%=intl._t("Enabled with SSL required")%><br>
<input type="radio" class="optbox" name="mode" value="0" <%=clientshelper.i2cpModeChecked(0) %> >
<%=intl._t("Disabled - Clients outside this Java process may not connect")%><br>
</td</tr>
<tr><td>
<%=intl._t("I2CP Interface")%>:
<select name="interface">
<%
@ -53,23 +62,26 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
out.print("</option>\n");
}
%>
</select><br>
</select>&nbsp;
<%=intl._t("I2CP Port")%>:
<input name="port" type="text" size="5" maxlength="5" value="<jsp:getProperty name="clientshelper" property="port" />" ><br>
<b><%=intl._t("Authorization")%></b><br>
<input name="port" type="text" size="5" maxlength="5" value="<jsp:getProperty name="clientshelper" property="port" />" >
</td></tr>
<tr><th><%=intl._t("Authorization")%></th></tr>
<tr><td>
<input type="checkbox" class="optbox" name="auth" value="true" <jsp:getProperty name="clientshelper" property="auth" /> >
<%=intl._t("Require username and password")%><br>
</td></tr>
<tr><td>
<%=intl._t("Username")%>:
<input name="user" type="text" value="" /><br>
<input name="user" type="text" value="" />&nbsp;
<%=intl._t("Password")%>:
<input name="nofilter_pw" type="password" value="" /><br>
</p><p><img src="/themes/console/images/itoopie_xsm.png" alt=""><b><%=intl._t("The default settings will work for most people.")%></b>
<%=intl._t("Any changes made here must also be configured in the external client.")%>
<%=intl._t("Many clients do not support SSL or authorization.")%>
<i><%=intl._t("All changes require restart to take effect.")%></i>
</p><hr><div class="formaction">
<input name="nofilter_pw" type="password" value="" />
</td></tr>
<tr><td class="optionsave" align="right">
<input type="submit" class="default" name="action" value="<%=intl._t("Save Interface Configuration")%>" />
<input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
<input type="submit" class="accept" name="action" value="<%=intl._t("Save Interface Configuration")%>" />
</div></form>
</td></tr>
</table>
</form>
</div></div></body></html>

View File

@ -11,28 +11,27 @@
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Keyring Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_keyring">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigKeyringHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigKeyringHelper" id="keyringhelper" scope="request" />
<jsp:setProperty name="keyringhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<div class="configure"><h2><%=intl._t("Keyring")%></h2><p>
<p id="keyringhelp" class="infohelp">
<%=intl._t("The router keyring is used to decrypt encrypted leaseSets.")%>
<%=intl._t("The keyring may contain keys for local or remote encrypted destinations.")%></p>
<div class="wideload">
<jsp:getProperty name="keyringhelper" property="summary" />
</div>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Manual Keyring Addition")%></h3><p>
<h3 class="tabletitle"><%=intl._t("Manual Keyring Addition")%></h3>
<table id="addkeyring">
<tr>
<td class="infohelp" colspan="2">
<%=intl._t("Enter keys for encrypted remote destinations here.")%>
<%=intl._t("Keys for local destinations must be entered on the")%> <a href="i2ptunnel/"><%=intl._t("I2PTunnel page")%></a>.
</p>
<div class="wideload">
<table><tr>
</td>
</tr><tr>
<td class="mediumtags" align="right"><%=intl._t("Dest. name, hash, or full key")%>:</td>
<td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off" spellcheck="false"></textarea></td>
</tr><tr>
@ -43,4 +42,4 @@
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="action" class="delete" value="<%=intl._t("Delete key")%>" >
<input type="submit" name="action" class="add" value="<%=intl._t("Add key")%>" >
</td></tr></table></div></form></div></div></body></html>
</td></tr></table></form></div></body></html>

View File

@ -14,40 +14,45 @@
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Logging Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_logging">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigLoggingHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<h3><%=intl._t("Configure I2P Logging Options")%></h3>
<div class="wideload">
<table border="0" cellspacing="5">
<h3 class="tabletitle"><%=intl._t("Configure I2P Logging Options")%>&nbsp;<a title="<%=intl._t("View Router Logs")%>" href="/logs">[<%=intl._t("View Logs")%>]</a></h3>
<table id="loggingoptions" border="0" cellspacing="5">
<tr><td class="mediumtags" align="right"><b><%=intl._t("Log file")%>:</b></td>
<td><input type="text" name="logfilename" size="40" disabled="disabled" title="<%=intl._t("Edit {0} to change", "logger.config")%>" value="<jsp:getProperty name="logginghelper" property="logFilePattern" />" >
<br><p style="margin: 0px 12px"><i><%=intl._t("(the symbol '@' will be replaced during log rotation)")%></i></p></td>
</td>
<td><i><%=intl._t("(the symbol '@' will be replaced during log rotation)")%></i></td>
<td></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Log record format")%>:</b></td>
<td><input type="text" name="logformat" size="20" value="<jsp:getProperty name="logginghelper" property="recordPattern" />" >
<br><p style="margin: 0px 12px"><i><%=intl._t("(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, 'm' = message)")%>
</i></p></td>
</td>
<td><i><%=intl._t("(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, 'm' = message)")%></i></td>
<td></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Log date format")%>:</b></td>
<td><input type="text" name="logdateformat" size="20" value="<jsp:getProperty name="logginghelper" property="datePattern" />" >
<br><p style="margin: 0px 12px"><i><%=intl._t("('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' = second, 'SSS' = millisecond)")%>
</i></p></td>
</td>
<td><i><%=intl._t("('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' = second, 'SSS' = millisecond)")%></i></td>
<td></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Max log file size")%>:</b></td>
<td><input type="text" name="logfilesize" size="10" value="<jsp:getProperty name="logginghelper" property="maxFileSize" />" ><br></td>
<td><input type="text" name="logfilesize" size="10" value="<jsp:getProperty name="logginghelper" property="maxFileSize" />" ></td>
<td></td>
<td></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Default log level")%>:</b></td>
<td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /><br><p style="margin: 0px 12px"><i><%=intl._t("(DEBUG and INFO are not recommended defaults, as they will drastically slow down your router)")%>
</i></p></td>
<td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /></td>
<td><i><%=intl._t("(DEBUG and INFO are not recommended defaults, as they will drastically slow down your router)")%></i></td>
<td></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Log level overrides")%>:</b></td>
<td><jsp:getProperty name="logginghelper" property="logLevelTable" /></td>
<td colspan="3"><jsp:getProperty name="logginghelper" property="logLevelTable" /></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("New override")%>:</b></td>
<td><jsp:getProperty name="logginghelper" property="newClassBox" /></td>
</tr><tr><td colspan="2"><hr></td>
</tr><tr class="tablefooter"><td colspan="2"> <div class="formaction">
<td colspan="3"><jsp:getProperty name="logginghelper" property="newClassBox" /></td>
</tr>
<tr><td class="optionsave" colspan="4">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Save changes")%>" >
</div></td></tr></table></div></form></div></div></body></html>
</td></tr></table></form></div></body></html>

View File

@ -14,23 +14,36 @@
<jsp:useBean class="net.i2p.router.web.ConfigNetHelper" id="nethelper" scope="request" />
<jsp:setProperty name="nethelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h1><%=intl._t("I2P Network Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_network">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigNetHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<h3><%=intl._t("IP and Transport Configuration")%></h3><p>
<img src="/themes/console/images/itoopie_xsm.png" alt="">
<b><%=intl._t("The default settings will work for most people.")%>
<a href="#chelp"><%=intl._t("There is help below.")%></a></b>
</p><p><b><%=intl._t("UPnP Configuration")%>:</b><br>
<h3 id="iptransport" class="tabletitle"><%=intl._t("IP and Transport Configuration")%>&nbsp;<a title="<%=intl._t("Help with router configuration")%>" href="/help#configurationhelp">[<%=intl._t("Configuration Help")%>]</a></h3>
<table id="netconfig" class="configtable">
<tr>
<td class="infohelp">
<b><%=intl._t("The default settings will work for most people.")%></b>
<%=intl._t("Changing these settings will restart your router.")%>
</td>
</tr>
<tr>
<th id="upnpconfig"><%=intl._t("UPnP Configuration")%>&nbsp;<a href="peers#upnp">[<%=intl._t("UPnP Status")%>]</a></th>
</tr>
<tr>
<td>
<input type="checkbox" class="optbox" name="upnp" value="true" <jsp:getProperty name="nethelper" property="upnpChecked" /> >
<%=intl._t("Enable UPnP to open firewall ports")%> - <a href="peers#upnp"><%=intl._t("UPnP status")%></a>
</p><p><b><%=intl._t("IP Configuration")%>:</b><br>
<%=intl._t("Enable UPnP to open firewall ports")%>
</td>
</tr>
<tr>
<th id="ipconfig"><%=intl._t("IP Configuration")%></th>
</tr>
<tr>
<td>
<%=intl._t("Externally reachable hostname or IP address")%>:<br>
<input type="radio" class="optbox" name="udpAutoIP" value="local,upnp,ssu" <%=nethelper.getUdpAutoIPChecked(3) %> >
<%=intl._t("Use all auto-detect methods")%><br>
@ -43,19 +56,34 @@
<input type="radio" class="optbox" name="udpAutoIP" value="hidden" <%=nethelper.getUdpAutoIPChecked(2) %> >
<%=intl._t("Hidden mode - do not publish IP")%> <i><%=intl._t("(prevents participating traffic)")%></i><br>
<input type="radio" class="optbox" name="udpAutoIP" value="fixed" <%=nethelper.getUdpAutoIPChecked(1) %> >
<%=intl._t("Specify hostname or IP")%>:<br>
<%=intl._t("Specify hostname or IP")%>:
<%=nethelper.getAddressSelector() %>
</p><p>
<%=intl._t("Action when IP changes")%>:<br>
</td>
</tr>
<tr>
<th id="ipchange"><%=intl._t("Action when IP changes")%></th>
</tr>
<tr>
<td>
<input type="checkbox" class="optbox" name="laptop" value="true" <jsp:getProperty name="nethelper" property="laptopChecked" /> >
<%=intl._t("Laptop mode - Change router identity and UDP port when IP changes for enhanced anonymity")%>
(<i><%=intl._t("Experimental")%></i>)
</p><p>
<%=intl._t("IPv4 Configuration")%>:<br>
</td>
</tr>
<tr>
<th id="ipv4config"><%=intl._t("IPv4 Configuration")%></th>
</tr>
<tr>
<td>
<input type="checkbox" class="optbox" name="IPv4Firewalled" value="true" <jsp:getProperty name="nethelper" property="IPv4FirewalledChecked" /> >
<%=intl._t("Disable inbound (Firewalled by Carrier-grade NAT or DS-Lite)")%>
</p><p>
<%=intl._t("IPv6 Configuration")%>:<br>
</td>
</tr>
<tr>
<th id="ipv6config"><%=intl._t("IPv6 Configuration")%></th>
</tr>
<tr>
<td>
<input type="checkbox" class="optbox" name="IPv6Firewalled" value="true" <jsp:getProperty name="nethelper" property="IPv6FirewalledChecked" /> >
<%=intl._t("Disable inbound (Firewalled by Carrier-grade NAT or DS-Lite)")%><br>
<input type="radio" class="optbox" name="ipv6" value="false" <%=nethelper.getIPv6Checked("false") %> >
@ -68,12 +96,25 @@
<%=intl._t("Prefer IPv6 over IPv4")%><br>
<input type="radio" class="optbox" name="ipv6" value="only" <%=nethelper.getIPv6Checked("only") %> >
<%=intl._t("Use IPv6 only (disable IPv4)")%>
(<i><%=intl._t("Experimental")%></i>)<br>
</p><p><b><%=intl._t("UDP Configuration:")%></b><br>
(<i><%=intl._t("Experimental")%></i>)
</td>
</tr>
<tr>
<th id="udpconfig"><%=intl._t("UDP Configuration")%></th>
</tr>
<tr>
<td class="infowarn">
<b><%=intl._t("Do not reveal your port numbers to anyone as they can be used to discover your ip address.")%></b>
</td>
</tr>
<tr>
<td>
<%=intl._t("UDP port:")%>
<input name ="udpPort" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="configuredUdpPort" />" ><br>
<input type="checkbox" class="optbox" name="disableUDP" value="disabled" <%=nethelper.getUdpDisabledChecked() %> >
<%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that blocks outbound UDP)")%></i><br>
<%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that blocks outbound UDP)")%></i>
</td>
</tr>
<% /********
<!-- let's keep this simple...
<input type="checkbox" class="optbox" name="requireIntroductions" value="true" <jsp:getProperty name="nethelper" property="requireIntroductionsChecked" /> />
@ -83,8 +124,11 @@
Current External UDP address: <i><jsp:getProperty name="nethelper" property="udpAddress" /></i><br>
-->
*********/ %>
</p><p>
<b><%=intl._t("TCP Configuration")%>:</b><br>
<tr>
<th id="tcpconfig"><%=intl._t("TCP Configuration")%></th>
</tr>
<tr>
<td>
<%=intl._t("Externally reachable hostname or IP address")%>:<br>
<input type="radio" class="optbox" name="ntcpAutoIP" value="true" <%=nethelper.getTcpAutoIPChecked(2) %> >
<%=intl._t("Use auto-detected IP address")%>
@ -98,110 +142,36 @@
<input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(0) %> >
<%=intl._t("Disable inbound (Firewalled)")%><br>
<input type="radio" class="optbox" name="ntcpAutoIP" value="disabled" <%=nethelper.getTcpAutoIPChecked(4) %> >
<%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that throttles or blocks outbound TCP)")%></i><br>
</p><p>
<%=intl._t("Externally reachable TCP port")%>:<br>
<%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that throttles or blocks outbound TCP)")%></i>
</td>
</tr>
<tr>
<th id="externaltcp"><%=intl._t("Externally reachable TCP port")%></th>
</tr>
<tr>
<td>
<input type="radio" class="optbox" name="ntcpAutoPort" value="2" <%=nethelper.getTcpAutoPortChecked(2) %> >
<%=intl._t("Use the same port configured for UDP")%>
<i>(<%=intl._t("currently")%> <jsp:getProperty name="nethelper" property="udpPort" />)</i><br>
<input type="radio" class="optbox" name="ntcpAutoPort" value="1" <%=nethelper.getTcpAutoPortChecked(1) %> >
<%=intl._t("Specify Port")%>:
<input name ="ntcpport" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="ntcpport" />" ><br>
</p><p><b><%=intl._t("Notes")%>: <%=intl._t("a) Do not reveal your port numbers to anyone! b) Changing these settings will restart your router.")%></b></p>
<hr><div class="formaction">
<input name ="ntcpport" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="ntcpport" />" >
</td>
</tr>
<tr>
<td class="optionsave">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" class="accept" name="save" value="<%=intl._t("Save changes")%>" >
</div><h3><a name="chelp"><%=intl._t("Configuration Help")%>:</a></h3><div align="justify"><p>
<%=intl._t("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port is forwarded for both UDP and TCP.")%>
</p><p>
<%=intl._t("If you can, please poke a hole in your firewall to allow unsolicited UDP and TCP packets to reach you.")%>
<%=intl._t("If you can't, I2P supports UPnP (Universal Plug and Play) and UDP hole punching with \"SSU introductions\" to relay traffic.")%>
<%=intl._t("Most of the options above are for special situations, for example where UPnP does not work correctly, or a firewall not under your control is doing harm.")%>
<%=intl._t("Certain firewalls such as symmetric NATs may not work well with I2P.")%>
</p>
</td>
</tr>
</table>
<% /********
<!-- let's keep this simple...
<input type="submit" name="recheckReachability" value="Check network reachability..." />
</p>
-->
*********/ %>
<p>
<%=intl._t("UPnP is used to communicate with Internet Gateway Devices (IGDs) to detect the external IP address and forward ports.")%>
<%=intl._t("UPnP support is beta, and may not work for any number of reasons")%>:
</p>
<ul>
<li class="tidylist"><%=intl._t("No UPnP-compatible device present")%>
<li class="tidylist"><%=intl._t("UPnP disabled on the device")%>
<li class="tidylist"><%=intl._t("Software firewall interference with UPnP")%>
<li class="tidylist"><%=intl._t("Bugs in the device's UPnP implementation")%>
<li class="tidylist"><%=intl._t("Multiple firewall/routers in the internet connection path")%>
<li class="tidylist"><%=intl._t("UPnP device change, reset, or address change")%>
</ul>
<p><a href="peers#upnp"><%=intl._t("Review the UPnP status here.")%></a>
<%=intl._t("UPnP may be enabled or disabled above, but a change requires a router restart to take effect.")%></p>
<p><%=intl._t("Hostnames entered above will be published in the network database.")%>
<%=intl._t("They are <b>not private</b>.")%>
<%=intl._t("Also, <b>do not enter a private IP address</b> like 127.0.0.1 or 192.168.1.1.")%>
<%=intl._t("If you specify the wrong IP address or hostname, or do not properly configure your NAT or firewall, your network performance will degrade substantially.")%>
<%=intl._t("When in doubt, leave the settings at the defaults.")%>
</p>
<h3><a name="help"><%=intl._t("Reachability Help")%>:</a></h3><p>
<%=intl._t("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port is forwarded for both UDP and TCP.")%>
<%=intl._t("If you think you have opened up your firewall and I2P still thinks you are firewalled, remember that you may have multiple firewalls, for example both software packages and external hardware routers.")%>
<%=intl._t("If there is an error, the <a href=\"logs.jsp\">logs</a> may also help diagnose the problem.")%>
</p>
<ul>
<li class="tidylist"><b><%=intl._t("OK")%></b> -
<%=intl._t("Your UDP port does not appear to be firewalled.")%>
<li class="tidylist"><b><%=intl._t("Firewalled")%></b> -
<%=intl._t("Your UDP port appears to be firewalled.")%>
<%=intl._t("As the firewall detection methods are not 100% reliable, this may occasionally be displayed in error.")%>
<%=intl._t("However, if it appears consistently, you should check whether both your external and internal firewalls are open for your port.")%>
<%=intl._t("I2P will work fine when firewalled, there is no reason for concern. When firewalled, the router uses \"introducers\" to relay inbound connections.")%>
<%=intl._t("However, you will get more participating traffic and help the network more if you can open your firewall(s).")%>
<%=intl._t("If you think you have already done so, remember that you may have both a hardware and a software firewall, or be behind an additional, institutional firewall you cannot control.")%>
<%=intl._t("Also, some routers cannot correctly forward both TCP and UDP on a single port, or may have other limitations or bugs that prevent them from passing traffic through to I2P.")%>
<li class="tidylist"><b><%=intl._t("Testing")%></b> -
<%=intl._t("The router is currently testing whether your UDP port is firewalled.")%>
<li class="tidylist"><b><%=intl._t("Hidden")%></b> -
<%=intl._t("The router is not configured to publish its address, therefore it does not expect incoming connections.")%>
<%=intl._t("Hidden mode is automatically enabled for added protection in certain countries.")%>
<li class="tidylist"><b><%=intl._t("WARN - Firewalled and Fast")%></b> -
<%=intl._t("You have configured I2P to share more than 128KBps of bandwidth, but you are firewalled.")%>
<%=intl._t("While I2P will work fine in this configuration, if you really have over 128KBps of bandwidth to share, it will be much more helpful to the network if you open your firewall.")%>
<li class="tidylist"><b><%=intl._t("WARN - Firewalled and Floodfill")%></b> -
<%=intl._t("You have configured I2P to be a floodfill router, but you are firewalled.")%>
<%=intl._t("For best participation as a floodfill router, you should open your firewall.")%>
<li class="tidylist"><b><%=intl._t("WARN - Firewalled with Inbound TCP Enabled")%></b> -
<%=intl._t("You have configured inbound TCP, however your UDP port is firewalled, and therefore it is likely that your TCP port is firewalled as well.")%>
<%=intl._t("If your TCP port is firewalled with inbound TCP enabled, routers will not be able to contact you via TCP, which will hurt the network.")%>
<%=intl._t("Please open your firewall or disable inbound TCP above.")%>
<li class="tidylist"><b><%=intl._t("WARN - Firewalled with UDP Disabled")%></b> -
<%=intl._t("You have configured inbound TCP, however you have disabled UDP.")%>
<%=intl._t("You appear to be firewalled on TCP, therefore your router cannot accept inbound connections.")%>
<%=intl._t("Please open your firewall or enable UDP.")%>
<li class="tidylist"><b><%=intl._t("ERR - Clock Skew")%></b> -
<%=intl._t("Your system's clock is skewed, which will make it difficult to participate in the network.")%>
<%=intl._t("Correct your clock setting if this error persists.")%>
<li class="tidylist"><b><%=intl._t("ERR - Private TCP Address")%></b> -
<%=intl._t("You must never advertise an unroutable IP address such as 127.0.0.1 or 192.168.1.1 as your external address.")%>
<%=intl._t("Correct the address or disable inbound TCP above.")%>
<li class="tidylist"><b><%=intl._t("ERR - SymmetricNAT")%></b> -
<%=intl._t("I2P detected that you are firewalled by a Symmetric NAT.")%>
<%=intl._t("I2P does not work well behind this type of firewall. You will probably not be able to accept inbound connections, which will limit your participation in the network.")%>
<li class="tidylist"><b><%=intl._t("ERR - UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart")%></b> -
<%=intl._t("I2P was unable to bind to the configured port noted on the advanced network configuration page .")%>
<%=intl._t("Check to see if another program is using the configured port. If so, stop that program or configure I2P to use a different port.")%>
<%=intl._t("This may be a transient error, if the other program is no longer using the port.")%>
<%=intl._t("However, a restart is always required after this error.")%>
<li class="tidylist"><b><%=intl._t("ERR - UDP Disabled and Inbound TCP host/port not set")%></b> -
<%=intl._t("You have not configured inbound TCP with a hostname and port above, however you have disabled UDP.")%>
<%=intl._t("Therefore your router cannot accept inbound connections.")%>
<%=intl._t("Please configure a TCP host and port above or enable UDP.")%>
<li class="tidylist"><b><%=intl._t("ERR - Client Manager I2CP Error - check logs")%></b> -
<%=intl._t("This is usually due to a port 7654 conflict. Check the logs to verify.")%>
<%=intl._t("Do you have another I2P instance running? Stop the conflicting program and restart I2P.")%>
</ul><hr>
<% /********
<!--
<b>Dynamic Router Keys: </b>
@ -223,4 +193,4 @@
<br>
-->
*********/ %>
</div></form></div></div></body></html>
</form></div></body></html>

View File

@ -9,7 +9,7 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Peer Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_peers">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigPeerHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
@ -19,42 +19,54 @@
if (request.getParameter("peer") != null)
peer = net.i2p.data.DataHelper.stripHTML(request.getParameter("peer")); // XSS
%>
<div class="configure">
<form action="configpeer" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<a name="sh"> </a>
<a name="unsh"> </a>
<a name="bonus"> </a>
<h2><%=intl._t("Manual Peer Controls")%></h2>
<div class="mediumtags"><p><%=intl._t("Router Hash")%>:
<input type="text" size="55" name="peer" value="<%=peer%>" /></p></div>
<h3><%=intl._t("Manually Ban / Unban a Peer")%></h3>
<p><%=intl._t("Banning will prevent the participation of this peer in tunnels you create.")%></p>
<div class="formaction">
<h3 class="tabletitle"><%=intl._t("Manual Peer Controls")%></h3>
<table class="configtable">
<tr><td colspan="2"><%=intl._t("Router Hash")%>:<input type="text" size="55" name="peer" value="<%=peer%>" /></td></tr>
<tr><th colspan="2"><%=intl._t("Manually Ban / Unban a Peer")%></th></tr>
<tr><td class="infohelp" colspan="2"><%=intl._t("Banning will prevent the participation of this peer in tunnels you create.")%></td></tr>
<tr>
<td class="optionsave" colspan="2">
<input type="submit" name="action" class="delete" value="<%=intl._t("Ban peer until restart")%>" />
<input type="submit" name="action" class="accept" value="<%=intl._t("Unban peer")%>" />
<% if (! "".equals(peer)) { %>
<!-- <font color="blue">&lt;---- click to verify action</font> -->
<% } %>
</div>
<h3><%=intl._t("Adjust Profile Bonuses")%></h3>
<p><%=intl._t("Bonuses may be positive or negative, and affect the peer's inclusion in Fast and High Capacity tiers. Fast peers are used for client tunnels, and High Capacity peers are used for some exploratory tunnels. Current bonuses are displayed on the")%> <a href="profiles"><%=intl._t("profiles page")%></a>.</p>
</td>
</tr>
<tr><th colspan="2"><%=intl._t("Adjust Profile Bonuses")%></th></tr>
<tr>
<td class="infohelp" colspan="2">
<%=intl._t("Bonuses may be positive or negative, and affect the peer's inclusion in Fast and High Capacity tiers. Fast peers are used for client tunnels, and High Capacity peers are used for some exploratory tunnels. Current bonuses are displayed on the")%> <a href="profiles"><%=intl._t("profiles page")%></a>.
</td>
</tr>
<tr>
<% long speed = 0; long capacity = 0;
if (! "".equals(peer)) {
// get existing bonus values?
}
%>
<div class="mediumtags"><p><%=intl._t("Speed")%>:
<td><%=intl._t("Speed")%>:
<input type="text" size="8" name="speed" value="<%=speed%>" />
<%=intl._t("Capacity")%>:
<input type="text" size="8" name="capacity" value="<%=capacity%>" />
<input type="submit" name="action" class="add" value="<%=intl._t("Adjust peer bonuses")%>" /></p></div>
</td>
<td class="optionsave">
<input type="submit" name="action" class="add" value="<%=intl._t("Adjust peer bonuses")%>" />
</td>
</tr>
</table>
</form>
<a name="banlist"> </a><h2><%=intl._t("Banned Peers")%></h2>
<a name="banlist"> </a><h3 id="bannedpeers"><%=intl._t("Banned Peers")%></h3>
<jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
<jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% profilesHelper.storeWriter(out); %>
<jsp:getProperty name="profilesHelper" property="banlistSummary" />
<div class="wideload"><h2><%=intl._t("Banned IPs")%></h2>
<h3 class="tabletitle"><%=intl._t("Banned IPs")%></h3>
<jsp:getProperty name="peerhelper" property="blocklistSummary" />
</div></div></div></body></html>
</div></body></html>

View File

@ -21,7 +21,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<jsp:setProperty name="clientshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="clientshelper" property="edit" value="<%=request.getParameter(\"edit\")%>" />
<h1><%=intl._t("Plugin Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_plugins">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" />
@ -31,13 +31,13 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
if (clientshelper.showPlugins()) {
if (clientshelper.isPluginUpdateEnabled()) {
%>
<h3><a name="pconfig"></a><%=intl._t("Plugin Configuration")%></h3><p>
<h3 id="pluginconfig"><a name="pconfig"></a><%=intl._t("Plugin Configuration")%></h3><p id="pluginconfigtext">
<%=intl._t("The plugins listed below are started by the webConsole client.")%>
</p><div class="wideload">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<jsp:getProperty name="clientshelper" property="form3" />
<div class="formaction">
<div class="formaction" id="pluginconfigactions">
<input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
<input type="submit" name="action" class="accept" value="<%=intl._t("Save Plugin Configuration")%>" />
</div></form></div>
@ -45,38 +45,50 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
} // pluginUpdateEnabled
if (clientshelper.isPluginInstallEnabled()) {
%>
<h3><a name="plugin"></a><%=intl._t("Plugin Installation from URL")%></h3><p>
<h3 id="pluginmanage"><a name="plugin"></a><%=intl._t("Plugin Installation")%></h3><p>
<table id="plugininstall" class="configtable">
<tr><td class="infohelp" colspan="2">
<%=intl._t("Look for available plugins on {0}.", "<a href=\"http://i2pwiki.i2p/index.php?title=Plugins\">i2pwiki.i2p</a>")%>
<%=intl._t("To install a plugin, enter the download URL:")%>
</p>
<div class="wideload">
</td></tr>
<tr><th colspan="2">
<%=intl._t("Installation from URL")%>
</th></tr>
<tr>
<form action="configplugins" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<p>
<input type="text" size="60" name="pluginURL" >
</p><hr><div class="formaction">
<input type="submit" name="action" class="default" value="<%=intl._t("Install Plugin")%>" />
<td>
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
URL:&nbsp;
<input type="text" size="60" name="pluginURL" title="<%=intl._t("To install a plugin, enter the download URL:")%>" >
</td>
<td class="optionsave" align="right">
<input type="submit" name="action" class="default hideme" value="<%=intl._t("Install Plugin")%>" />
<input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
<input type="submit" name="action" class="download" value="<%=intl._t("Install Plugin")%>" />
</div></form></div>
<div class="wideload">
<h3><a name="plugin"></a><%=intl._t("Plugin Installation from File")%></h3>
</td>
</form>
</tr>
<tr><th colspan="2">
<a name="plugin"></a><%=intl._t("Installation from File")%>
</th></tr>
<tr>
<form action="configplugins" method="POST" enctype="multipart/form-data" accept-charset="UTF-8">
<td>
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<p><%=intl._t("Install plugin from file.")%>
<br><%=intl._t("Select xpi2p or su3 file")%> :
<input type="file" name="pluginFile" >
</p><hr><div class="formaction">
<%=intl._t("Select xpi2p or su3 file")%>:&nbsp;
<input type="file" name="pluginFile" accept=".xpi2p,.su3" >
</td>
<td class="optionsave" align="right">
<input type="submit" name="action" class="download" value="<%=intl._t("Install Plugin from File")%>" />
</div></form></div>
</td>
</form>
</tr>
</table>
<%
} // pluginInstallEnabled
if (clientshelper.isPluginUpdateEnabled()) {
%>
<h3><a name="plugin"></a><%=intl._t("Update All Plugins")%></h3>
<div class="formaction">
<h4 id="updateplugins" class="embeddedtitle"><a name="plugin"></a><%=intl._t("Update All Plugins")%></h4>
<div class="formaction" id="pluginupdater">
<form action="configplugins" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="submit" name="action" class="reload" value="<%=intl._t("Update All Installed Plugins")%>" />

View File

@ -14,61 +14,83 @@
<jsp:useBean class="net.i2p.router.web.ConfigReseedHelper" id="reseedHelper" scope="request" />
<jsp:setProperty name="reseedHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h1><%=intl._t("I2P Reseeding Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_reseed">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigReseedHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<p><%=intl._t("Reseeding is the bootstrapping process used to find other routers when you first install I2P, or when your router has too few router references remaining.")%>
<p class="infohelp">
<%=intl._t("Reseeding is the bootstrapping process used to find other routers when you first install I2P, or when your router has too few router references remaining.")%>
<%=intl._t("If reseeding has failed, you should first check your network connection.")%>
<%=intl._t("See {0} for instructions on reseeding manually.", "<a href=\"https://geti2p.net/faq#manual_reseed\">" + intl._t("the FAQ") + "</a>")%>
</p>
<div class="configure"><form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Manual Reseed from URL")%></h3>
<p><%=intl._t("Enter zip or su3 URL")%> :
<input name="url" type="text" size="60" value="" />
<br><%=intl._t("The su3 format is preferred, as it will be verified as signed by a trusted source.")%>
<h3 class="tabletitle"><%=intl._t("Manual Reseed")%></h3>
<table id="manualreseed" class="configtable">
<tr>
<td class="infohelp" colspan="2">
<%=intl._t("The su3 format is preferred, as it will be verified as signed by a trusted source.")%>&nbsp;
<%=intl._t("The zip format is unsigned; use a zip file only from a source that you trust.")%>
</p>
<div class="formaction">
<input type="submit" name="action" class="download" value="<%=intl._t("Reseed from URL")%>" />
</div></form></div>
<div class="configure">
<form action="" method="POST" enctype="multipart/form-data" accept-charset="UTF-8">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Manual Reseed from File")%></h3>
<p><%=intl._t("Select zip or su3 file")%> :
<input name="file" type="file" value="" />
<br><%=intl._t("The su3 format is preferred, as it will be verified as signed by a trusted source.")%>
<%=intl._t("The zip format is unsigned; use a zip file only from a source that you trust.")%>
</p>
<div class="formaction">
<input type="submit" name="action" class="download" value="<%=intl._t("Reseed from file")%>" />
</div></form></div>
<div class="configure">
<form action="/createreseed" method="GET">
<h3><%=intl._t("Create Reseed File")%></h3>
<p><%=intl._t("Create a new reseed zip file you may share for others to reseed manually.")%>
<%=intl._t("This file will never contain your own router's identity or IP.")%>
</p>
<div class="formaction">
<input type="submit" name="action" class="go" value="<%=intl._t("Create reseed file")%>" />
</div></form></div>
<div class="configure">
</td>
<tr>
<th colspan="2"><%=intl._t("Reseed from URL")%></th>
</tr>
<tr>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Reseeding Configuration")%></h3>
<p><b><%=intl._t("The default settings will work for most people.")%></b>
<td>
<%=intl._t("Enter zip or su3 URL")%>:<input name="url" type="text" size="60" value="" />
</td>
<td class="optionsave">
<input type="submit" name="action" class="download" value="<%=intl._t("Reseed from URL")%>" />
</td>
</form>
</tr>
<tr>
<th colspan="2"><%=intl._t("Reseed from File")%></th>
</tr>
<tr>
<form action="" method="POST" enctype="multipart/form-data" accept-charset="UTF-8">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<td>
<%=intl._t("Select zip or su3 file")%>:
<input name="file" type="file" accept=".zip,.su3" value="" />
</td>
<td class="optionsave">
<input type="submit" name="action" class="download" value="<%=intl._t("Reseed from file")%>" />
</td>
</form>
</tr>
<tr>
<th colspan="2">
<%=intl._t("Create Reseed File")%>
</th>
</tr>
<tr>
<td class="infohelp" colspan="2">
<%=intl._t("Create a new reseed zip file you may share for others to reseed manually.")%>&nbsp;
<%=intl._t("This file will never contain your own router's identity or IP.")%>
</td>
</tr>
<tr>
<td class="optionsave" colspan="2">
<form action="/createreseed" method="GET">
<input type="submit" name="action" class="go" value="<%=intl._t("Create reseed file")%>" />
</form>
</td>
</tr>
</table>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3 class="tabletitle"><%=intl._t("Reseeding Configuration")%></h3>
<table id="reseedconfig" class="configtable" border="0" cellspacing="5">
<tr>
<td class="infohelp" colspan="2">
<b><%=intl._t("The default settings will work for most people.")%></b>&nbsp;
<%=intl._t("Change these only if HTTPS is blocked by a restrictive firewall and reseed has failed.")%>
</p>
<div class="wideload">
<table border="0" cellspacing="5">
</td>
</tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Reseed URL Selection")%>:</b></td>
<td><input type="radio" class="optbox" name="mode" value="0" <%=reseedHelper.modeChecked(0) %> >
<b><%=intl._t("Try SSL first then non-SSL")%></b><br>
@ -78,7 +100,7 @@
<b><%=intl._t("Use non-SSL only")%></b></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Reseed URLs")%>:</b></td>
<td><textarea wrap="off" name="reseedURL" cols="60" rows="7" spellcheck="false"><jsp:getProperty name="reseedHelper" property="reseedURL" /></textarea>
<div class="formaction"><input type="submit" name="action" class="reload" value="<%=intl._t("Reset URL list")%>" /></div>
<div class="formaction" id="resetreseed"><input type="submit" name="action" class="reload" value="<%=intl._t("Reset URL list")%>" /></div>
</td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Enable HTTP Proxy?")%></b></td>
@ -111,9 +133,12 @@
<td><input name="nofilter_spassword" type="password" value="<jsp:getProperty name="reseedHelper" property="nofilter_spassword" />" ></td></tr>
-->
</table></div>
<div class="formaction">
<tr>
<td class="optionsave" colspan="2">
<input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
<input type="submit" name="action" class="download" value="<%=intl._t("Save changes and reseed now")%>" />
<input type="submit" name="action" class="accept" value="<%=intl._t("Save changes")%>" />
</div></form></div></div></body></html>
</td>
</tr>
</table>
</form></div></body></html>

View File

@ -11,18 +11,18 @@
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Service Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_service">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigServiceHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Shutdown the router")%></h3>
<p><%=intl._t("Graceful shutdown lets the router satisfy the agreements it has already made before shutting down, but may take a few minutes.")%>
<h3 class="ptitle" id="shutdownrouter"><%=intl._t("Shutdown the router")%></h3>
<p class="infohelp">
<%=intl._t("Graceful shutdown lets the router satisfy the agreements it has already made before shutting down, but may take a few minutes.")%>
<%=intl._t("If you need to kill the router immediately, that option is available as well.")%></p>
<hr><div class="formaction">
<hr><div class="formaction" id="shutdown">
<input type="submit" class="stop" name="action" value="<%=intl._t("Shutdown gracefully")%>" >
<input type="submit" class="stop" name="action" value="<%=intl._t("Shutdown immediately")%>" >
<% if (formhandler.shouldShowCancelGraceful()) { %>
@ -30,19 +30,21 @@
<% } %>
</div>
<% if (System.getProperty("wrapper.version") != null) { %>
<p><%=intl._t("If you want the router to restart itself after shutting down, you can choose one of the following.")%>
<h3 class="ptitle" id="restartrouter"><%=intl._t("Restart the router")%></h3>
<p class="infohelp">
<%=intl._t("If you want the router to restart itself after shutting down, you can choose one of the following.")%>
<%=intl._t("This is useful in some situations - for example, if you changed some settings that client applications only read at startup, such as the routerconsole password or the interface it listens on.")%>
<%=intl._t("A graceful restart will take a few minutes (but your peers will appreciate your patience), while a hard restart does so immediately.")%>
<%=intl._t("After tearing down the router, it will wait 1 minute before starting back up again.")%></p>
<hr><div class="formaction">
<hr><div class="formaction" id="restart">
<input type="submit" class="reload" name="action" value="<%=intl._t("Graceful restart")%>" >
<input type="submit" class="reload" name="action" value="<%=intl._t("Hard restart")%>" >
<% } %></div>
<% if (formhandler.shouldShowSystray()) { %>
<h3><%=intl._t("Systray integration")%></h3>
<p><%=intl._t("Control the system tray icon")%>
<hr><div class="formaction">
<h3 class="ptitle" id="systray"><%=intl._t("Systray integration")%></h3>
<p class="infohelp"><%=intl._t("Control the system tray icon")%></p>
<hr><div class="formaction" id="systray">
<% if (!formhandler.isSystrayEnabled()) { %>
<input type="submit" name="action" class="accept" value="<%=intl._t("Show systray icon")%>" >
<% } else {%>
@ -53,34 +55,37 @@
}
if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) {
%>
<h3><%=intl._t("Run on startup")%></h3>
<p><%=intl._t("You can control whether I2P is run on startup or not by selecting one of the following options - I2P will install (or remove) a service accordingly.")%>
<h3 class="ptitle" id="runonstartup"><%=intl._t("Run on startup")%></h3>
<p class="infohelp">
<%=intl._t("You can control whether I2P is run on startup or not by selecting one of the following options - I2P will install (or remove) a service accordingly.")%>
<%=intl._t("If you prefer the command line, you can also run the ")%> <code>install_i2p_service_winnt.bat</code> (<%=intl._t("or")%>
<code>uninstall_i2p_service_winnt.bat</code>).</p>
<hr><div class="formaction">
<hr><div class="formaction" id="runonstart">
<input type="submit" name="action" class="accept" value="<%=intl._t("Run I2P on startup")%>" >
<input type="submit" name="action" class="cancel" value="<%=intl._t("Don't run I2P on startup")%>" ></div>
<p><b><%=intl._t("Note")%>:</b> <%=intl._t("If you are running I2P as service right now, removing it will shut down your router immediately.")%>
<input type="submit" name="action" class="cancel" value="<%=intl._t("Don't run I2P on startup")%>" ></div>
<p class="infohelp" id="winfoservice"><b>
<%=intl._t("Note")%>:</b> <%=intl._t("If you are running I2P as service right now, removing it will shut down your router immediately.")%>
<%=intl._t("You may want to consider shutting down gracefully, as above, then running uninstall_i2p_service_winnt.bat.")%></p>
<% } %>
<% } %>
<h3><%=intl._t("Debugging")%></h3>
<p><a href="/jobs"><%=intl._t("View the job queue")%></a>
<h3 class="ptitle" id="servicedebug"><%=intl._t("Debugging")%>&nbsp;<a href="/jobs">[<%=intl._t("View the job queue")%>]</a></h3>
<% if (System.getProperty("wrapper.version") != null) { %>
<p><%=intl._t("At times, it may be helpful to debug I2P by getting a thread dump. To do so, please select the following option and review the thread dumped to <a href=\"logs.jsp#servicelogs\">wrapper.log</a>.")%></p>
<hr>
<p class="infohelp">
<%=intl._t("At times, it may be helpful to debug I2P by getting a thread dump. To do so, please select the following option and review the thread dumped to <a href=\"logs.jsp#servicelogs\">wrapper.log</a>.")%></p>
<hr>
<% } %>
<div class="formaction">
<div class="formaction" id="dumpthreads">
<input type="submit" class="reload" name="action" value="<%=intl._t("Force GC")%>" >
<% if (System.getProperty("wrapper.version") != null) { %>
<input type="submit" class="download" name="action" value="<%=intl._t("Dump threads")%>" >
<% } %>
</div>
<h3><%=intl._t("Launch browser on router startup?")%></h3>
<p><%=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")%>
<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")%>
<a href="http://127.0.0.1:7657/">http://127.0.0.1:7657/</a> .</p>
<hr><div class="formaction">
<hr><div class="formaction" id="browserstart">
<input type="submit" class="check" name="action" value="<%=intl._t("View console on startup")%>" >
<input type="submit" class="delete" name="action" value="<%=intl._t("Do not view console on startup")%>" >
</div></form></div></div></body></html>
</div></form></div></body></html>

View File

@ -18,7 +18,7 @@ input.default {
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Summary Bar Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_summarybar">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigSummaryHandler" id="formhandler" scope="request" />
@ -29,21 +29,29 @@ input.default {
<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="summaryhelper" scope="request" />
<jsp:setProperty name="summaryhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h3><%=intl._t("Refresh Interval")%></h3>
<h3 class="tabletitle"><%=intl._t("Refresh Interval")%></h3>
<table class="configtable">
<tr>
<form action="" method="POST">
<td>
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="group" value="0">
<input type="text" name="refreshInterval" value="<jsp:getProperty name="intl" property="refresh" />" >
<%=intl._t("seconds")%>
</td>
<td class="optionsave">
<input type="submit" name="action" class="accept" value="<%=intl._t("Save")%>" >
</td>
</form>
</tr>
</table>
<h3><%=intl._t("Customize Summary Bar")%></h3>
<h3 class="tabletitle"><%=intl._t("Customize Summary Bar")%></h3>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="group" value="2">
<jsp:getProperty name="summaryhelper" property="configTable" />
<div class="formaction">
<div class="formaction" id="sidebardefaults">
<input type="submit" class="reload" name="action" value="<%=intl._t("Restore full default")%>" >
<input type="submit" class="reload" name="action" value="<%=intl._t("Restore minimal default")%>" >
</div>

View File

@ -6,6 +6,7 @@
<html><head>
<%@include file="css.jsi" %>
<%=intl.title("config stats")%>
<noscript><style>.script {display: none;}</style></noscript>
<script src="/js/ajax.js" type="text/javascript"></script>
<%@include file="summaryajax.jsi" %>
<script type="text/javascript">
@ -62,7 +63,7 @@ function toggleAll(category)
</head><body onLoad="init();">
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Stats Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_stats">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigStatsHandler" id="formhandler" scope="request" />
@ -73,8 +74,8 @@ function toggleAll(category)
<form id="statsForm" name="statsForm" action="" method="POST">
<input type="hidden" name="action" value="foo" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<h3><%=intl._t("Configure I2P Stat Collection")%></h3>
<p><%=intl._t("Enable full stats?")%>
<h3 class="ptitle"><%=intl._t("Configure I2P Stat Collection")%>&nbsp;<a class="script" title="<%=intl._t("Toggle full stat collection and all graphing options")%>" href="javascript:void(null);" onclick="toggleAll('*')">[<%=intl._t("toggle all")%>]</a></h3>
<p id="enablefullstats"><b><%=intl._t("Enable full stats?")%></b>
<input type="checkbox" class="optbox" name="isFull" value="true" <%
if (statshelper.getIsFull()) { %>checked="checked" <% } %> >
(<%=intl._t("change requires restart to take effect")%>)<br>
@ -84,22 +85,22 @@ function toggleAll(category)
boolean shouldShowLog = statshelper.shouldShowLog();
if (shouldShowLog) {
%><%=intl._t("Stat file")%>: <input type="text" name="filename" value="<%=statshelper.getFilename()%>" ><br>
%><%=intl._t("Stat file")%>: <input type="text" name="filename" value="<%=statshelper.getFilename()%>" >
Warning - Log with care, stat file grows without limit.<br>
<%
} // shouldShowLog
%><%=intl._t("Filter")%>: (<a href="javascript:void(null);" onclick="toggleAll('*')"><%=intl._t("toggle all")%></a>)<br></p>
%></p>
<div class="wideload">
<table>
<table id="configstats">
<% while (statshelper.hasMoreStats()) {
while (statshelper.groupRequired()) { %>
<tr class="tablefooter">
<td align="left" colspan="3" id=<%=statshelper.getCurrentGroupName()%>>
<tr>
<th align="left" colspan="3" id=<%=statshelper.getCurrentGroupName()%>>
<b><%=intl._t(statshelper.getCurrentGroupName())%></b>
(<a href="javascript:void(null);" onclick="toggleAll('<%=statshelper.getCurrentGroupName()%>')"><%=intl._t("toggle all")%></a>)
</td></tr>
<a class="script" title="<%=intl._t("Toggle section graphing options")%>" href="javascript:void(null);" onclick="toggleAll('<%=statshelper.getCurrentGroupName()%>')">[<%=intl._t("toggle all")%>]</a>
</th></tr>
<tr class="tablefooter">
<%
@ -110,7 +111,7 @@ Warning - Log with care, stat file grows without limit.<br>
} // shouldShowLog
%> <td align="center"><b><%=intl._t("Graph")%></b></td>
%> <td align="center"><b title="<%=intl._t("Select stats for visualization on /graphs")%>"><%=intl._t("Graph")%></b></td>
<td></td></tr>
<%
} // end iterating over required groups for the current stat %>
@ -131,7 +132,7 @@ Warning - Log with care, stat file grows without limit.<br>
<% if (statshelper.getCurrentCanBeGraphed()) { %>
<input type="checkbox" class="optbox <%=statshelper.getCurrentGroupName()%>" name="graphList" value="<%=statshelper.getCurrentGraphName()%>" <%
if (statshelper.getCurrentIsGraphed()) { %>checked="checked" <% } %> ><% } %></td>
<td align="left"><b><%=statshelper.getCurrentStatName()%>:</b><br>
<td align="left"><b><%=statshelper.getCurrentStatName()%>:</b>&nbsp;
<%=statshelper.getCurrentStatDescription()%></td></tr><%
} // end iterating over all stats
@ -145,7 +146,7 @@ Warning - Log with care, stat file grows without limit.<br>
} // shouldShowLog
%> <tr class="tablefooter"><td colspan="3" align="right">
%> <tr class="tablefooter"><td colspan="3" align="right" class="optionsave">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Save changes")%>" >
</td></tr>

View File

@ -14,27 +14,27 @@
<jsp:useBean class="net.i2p.router.web.ConfigTunnelsHelper" id="tunnelshelper" scope="request" />
<jsp:setProperty name="tunnelshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h1><%=intl._t("I2P Tunnel Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_tunnels">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigTunnelsHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure"><p>
<%=intl._t("NOTE")%>:
<p id="tunnelconfig" class="infowarn">
<%=intl._t("The default settings work for most people.")%>
<%=intl._t("There is a fundamental tradeoff between anonymity and performance.")%>
<%=intl._t("Tunnels longer than 3 hops (for example 2 hops + 0-2 hops, 3 hops + 0-1 hops, 3 hops + 0-2 hops), or a high quantity + backup quantity, may severely reduce performance or reliability.")%>
<%=intl._t("High CPU and/or high outbound bandwidth usage may result.")%>
<%=intl._t("Change these settings with care, and adjust them if you have problems.")%>
<div class="wideload">
</p>
<p class="infohelp">
<%=intl._t("Exploratory tunnel setting changes are stored in the router.config file.")%>
<%=intl._t("Client tunnel changes are temporary and are not saved.")%>
<%=intl._t("To make permanent client tunnel changes see the")%>&nbsp;<a href="/i2ptunnelmgr"><%=intl._t("i2ptunnel page")%></a>.
</p>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<jsp:getProperty name="tunnelshelper" property="form" />
<%=intl._t("Note")%>: <%=intl._t("Exploratory tunnel setting changes are stored in the router.config file.")%>
<%=intl._t("Client tunnel changes are temporary and are not saved.")%>
<%=intl._t("To make permanent client tunnel changes see the")%> <a href="i2ptunnel/index.jsp"><%=intl._t("i2ptunnel page")%></a>.
<hr><div class="formaction">
<hr><div class="formaction" id="tunnelconfigsave">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Save changes")%>" >
</div>
</form></div></div></div></body></html>
</div></form></div></body></html>

View File

@ -23,17 +23,18 @@ input.default {
<jsp:setProperty name="uihelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<h1><%=uihelper._t("I2P UI Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_ui">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigUIHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure"><div class="topshimten"><h3><%=uihelper._t("Router Console Theme")%></h3></div>
<h3 id="themeheading"><%=uihelper._t("Router Console Theme")%></h3>
<form action="" method="POST">
<input type="hidden" name="consoleNonce" value="<%=net.i2p.router.web.CSSHelper.getNonce()%>" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<div id ="themesettings">
<%
String userAgent = request.getHeader("User-Agent");
if (userAgent == null || userAgent.contains("Trident/6") || !userAgent.contains("MSIE")) {
@ -45,23 +46,32 @@ input.default {
<%=uihelper._t("If you're not using IE, it's likely that your browser is pretending to be IE; please configure your browser (or proxy) to use a different User Agent string if you'd like to access the console themes.")%>
<% } %>
<jsp:getProperty name="uihelper" property="forceMobileConsole" />
<h3><%=uihelper._t("Router Console Language")%></h3>
<jsp:getProperty name="uihelper" property="langSettings" />
<p><%=uihelper._t("Please contribute to the router console translation project! Contact the developers in #i2p-dev on IRC to help.")%>
</p><hr><div class="formaction">
<hr><div class="formaction" id="themeui">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Apply")%>" >
</div></form>
</div></div></form>
<h3 id="langheading"><%=uihelper._t("Router Console Language")%></h3>
<form action="" method="POST">
<input type="hidden" name="consoleNonce" value="<%=net.i2p.router.web.CSSHelper.getNonce()%>" >
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<input type="hidden" name="action" value="blah" >
<div id="langsettings">
<jsp:getProperty name="uihelper" property="langSettings" />
<p id="helptranslate"><%=uihelper._t("Please contribute to the router console translation project! Contact the developers in #i2p-dev on IRC to help.")%>
</p><hr><div class="formaction" id="langui">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Apply")%>" >
</div></div></form>
<h3><%=uihelper._t("Router Console Password")%></h3>
<h3 id="passwordheading"><%=uihelper._t("Router Console Password")%></h3>
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<jsp:getProperty name="uihelper" property="passwordForm" />
<div class="formaction">
<div class="formaction" id="consolepass">
<input type="submit" name="action" class="default" value="<%=intl._t("Add user")%>" >
<input type="submit" name="action" class="delete" value="<%=intl._t("Delete selected")%>" >
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="action" class="add" value="<%=intl._t("Add user")%>" >
</div>
</form></div>
</form>
</div></body></html>

View File

@ -12,7 +12,7 @@
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Update Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_update">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHandler" id="formhandler" scope="request" />
@ -21,25 +21,22 @@
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<div class="messages">
<jsp:getProperty name="updatehelper" property="newsStatus" /></div>
<div class="configure">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<% /* set hidden default */ %>
<input type="submit" name="action" value="" style="display:none" >
<% if (updatehelper.canInstall()) { %>
<h3><%=intl._t("Check for I2P and news updates")%></h3>
<div class="wideload"><table border="0" cellspacing="5">
<tr><td colspan="2"></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("News &amp; I2P Updates")%>:</b></td>
<h3 class="tabletitle"><%=intl._t("Check for I2P and News Updates")%></h3>
<table id="i2pupdates" class="configtable" border="0" cellspacing="5">
<tr><td class="mediumtags" align="right"><b><%=intl._t("News &amp; I2P Updates")%>:</b></td>
<% } else { %>
<h3><%=intl._t("Check for news updates")%></h3>
<div class="wideload"><table border="0" cellspacing="5">
<table id="i2pupdates" class="configtable" border="0" cellspacing="5">
<tr><td colspan="2"></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("News Updates")%>:</b></td>
<% } // if canInstall %>
<td> <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> <i><%=intl._t("Update In Progress")%></i><br> <% } else { %> <input type="submit" name="action" class="check" value="<%=intl._t("Check for updates")%>" />
<% } %></td></tr>
<tr><td colspan="2"><br></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("News URL")%>:</b></td>
<td><input type="text" size="60" name="newsURL" <% if (!updatehelper.isAdvanced()) { %>readonly="readonly"<% } %> value="<jsp:getProperty name="updatehelper" property="newsURL" />"></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Refresh frequency")%>:</b>
@ -76,8 +73,7 @@
<% } else { %>
<tr><td class="mediumtags" align="center" colspan="2"><b><%=intl._t("Updates will be dispatched via your package manager.")%></b></td></tr>
<% } // if canInstall %>
<tr class="tablefooter"><td colspan="2">
<div class="formaction">
<tr class="tablefooter"><td colspan="2" class="optionsave">
<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
<input type="submit" name="action" class="accept" value="<%=intl._t("Save")%>" >
</div></td></tr></table></div></form></div></div></body></html>
</td></tr></table></form></div></body></html>

View File

@ -21,22 +21,22 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<jsp:setProperty name="clientshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:setProperty name="clientshelper" property="edit" value="<%=request.getParameter(\"edit\")%>" />
<h1><%=intl._t("WebApp Configuration")%></h1>
<div class="main" id="main">
<div class="main" id="config_webapps">
<%@include file="confignav.jsi" %>
<jsp:useBean class="net.i2p.router.web.ConfigClientsHandler" id="formhandler" scope="request" />
<%@include file="formhandler.jsi" %>
<div class="configure">
<h3><a name="webapp"></a><%=intl._t("WebApp Configuration")%></h3><p>
<%=intl._t("The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. They are usually web applications accessible through the router console. They may be complete applications (e.g. i2psnark),front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), or have no web interface at all (e.g. addressbook).")%>
</p><p>
<h3 id="webappconfig"><a name="webapp"></a><%=intl._t("WebApp Configuration")%></h3><p>
<p class="infohelp" id="webappconfigtext">
<%=intl._t("The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. They are usually web applications accessible through the router console. They may be complete applications (e.g. i2psnark),front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), or have no web interface at all (e.g. addressbook).")%>&nbsp;
<%=intl._t("A web app may also be disabled by removing the .war file from the webapps directory; however the .war file and web app will reappear when you update your router to a newer version, so disabling the web app here is the preferred method.")%>
<i><%=intl._t("All changes require restart to take effect.")%></i>
</p><div class="wideload">
<form action="configwebapps" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
<jsp:getProperty name="clientshelper" property="form2" />
<p><i><%=intl._t("All changes require restart to take effect.")%></i>
</p><hr><div class="formaction">
<div class="formaction" id="webappconfigactions">
<input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
<input type="submit" name="action" class="accept" value="<%=intl._t("Save WebApp Configuration")%>" />
</div></form></div>

View File

@ -28,7 +28,7 @@
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="updatehelper" property="newsStatus" /><br>
</div><div class="main" id="main">
</div><div class="main" id="console">
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="contenthelper" scope="request" />
<div class="welcome">
<div class="langbox"> <% /* English, then alphabetical by English name please */ %>

View File

@ -14,7 +14,7 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1>Router Debug</h1>
<div class="main" id="main">
<div class="main" id="debug">
<%
/*
* Quick and easy place to put debugging stuff

View File

@ -31,7 +31,7 @@
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Addressbook")%> <span class="newtab"><a href="/susidns/index" target="_blank" title="<%=intl._t("Open in new tab")%>"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/newtab.png" /></a></span></h1>
<div class="main" id="main">
<div class="main" id="dns">
<iframe src="/susidns/index" width="100%" height="100%" frameborder="0" border="0" name="susidnsframe" id="susidnsframe" onload="setupFrame()" allowtransparency="true">
<%=intl._t("Your browser does not support iFrames.")%>
&nbsp;<a href="/susidns/index"><%=intl._t("Click here to continue.")%></a>

View File

@ -19,7 +19,7 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Event Log")%></h1>
<div class="main" id="main">
<div class="main" id="events">
<div class="eventspanel">
<div class="widepanel">
<jsp:getProperty name="eventHelper" property="allMessages" />

View File

@ -24,10 +24,11 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Performance Graphs")%></h1>
<div class="main" id="main">
<div class="graphspanel">
<div class="main" id="graphs">
<div class="widepanel">
<jsp:getProperty name="graphHelper" property="allMessages" />
<div class="graphspanel">
<jsp:getProperty name="graphHelper" property="images" />
</div>
<jsp:getProperty name="graphHelper" property="form" />
</div></div></div></body></html>
</div></div></body></html>

View File

@ -0,0 +1,41 @@
<h2>Advanced Router Configuration</h2>
<p class="infohelp">The router configuration options listed below are not available in the user interface, usually because they are rarely used or provide access to advanced settings that most users will not need. This is not a comprehensive list. Some settings will require a restart of the router to take effect. Note that all settings are case sensitive. You will need to edit your <code>router.config</code> file to add options, or, once you have added <code>routerconsole.advanced=true</code> to the router.config file, you may edit settings within the console on the <a href="/configadvanced">Advanced Configuration page</a>.</p>
<table id="configinfo"> <!-- sections separated for legibility -->
<tr><th>i2p.vmCommSystem={true|false}</th></tr>
<tr><td>When set to true, I2P runs without network connectivity, which is helpful if you are constantly restarting the router to test code updates as this prevents network disruption.</td></tr>
<tr><th>routerconsole.advanced={true|false}</th></tr>
<tr><td class="infowarn">Only set this to true if you know what you are doing!</td></tr>
<tr><td>When set to true, additional functionality will be enabled in the console and the user will be able to edit settings directly on the <a href="/configadvanced">Advanced Configuration page</a>. Extra display options are provided in the <a href="/netdb">Network Database section</a>, including the Sybil Analysis tool, and there are additional configuration options on the <a href="/configclients">Clients Configuration page</a>. This will also enable the installation of unsigned updates, manual configuration of the news URL, and the installation of plugins. You may also wish to enable the "Advanced" sidebar section on the <a href="/configsidebar">Summary Bar Configuration page</a>.</td></tr>
<tr><th>routerconsole.browser={/path/to/browser}</th></tr>
<tr><td>This setting allows the manual selection of the browser which I2P will launch on startup (if the console is <a href="/configservice#browseronstart">configured</a> to launch a browser on startup), overriding the OS default browser.</td></tr>
<tr><th>router.updateUnsigned={true|false}</th></tr>
<tr><td>If you wish to install unsigned (.zip) I2P updates, this should be added to your <code>router.config</code> file unless you have already configured <code>routerconsole.advanced=true</code>, in which case this option is already provisioned.</td></tr>
<tr><th>router.updateUnsignedURL={url}</th></tr>
<tr><td>This setting allows you to configure the update url for the unsigned update feature, if enabled. The url should end with <code>/i2pupdate.zip</code>. Note: do not install unsigned updates unless you trust the source of the update!</td></tr>
<tr><th>routerconsole.enablePluginInstall={true|false}</th></tr>
<tr><td>When set to true, this enables plugin installation on the <a href="/configplugins">Plugin Configuration page</a>. Setting <code>routerconsole.advanced=true</code> will also enable this feature.</td></tr>
<tr><th>routerconsole.allowUntrustedPlugins={true|false}</th></tr>
<tr><td>Plugins signed with the cryptographic key of the developer are the recommended format, but if you wish to install unsigned plugins you can set this to true. Note that you may still encounter issues attempting to install an unsigned plugin if the developer has included additional checks in the plugin build process.</td></tr>
<tr><th>routerconsole.showSearch={true|false}</th></tr>
<tr><td>When set to true, a configurable search bar will appear on the <a href="/home">console homepage</a>. Additional searches may then be added on the <a href="/confighome">home configuration page</a>.</td></tr>
<tr><th>router.buildHandlerThreads={n}</th></tr>
<tr><td>Allocate number of processor threads for building tunnels. If your processor supports hyperthreading, you may multiply the number of processor cores by 2 to get the maximum number of threads to allocate, otherwise number of processor cores = maximum number of threads available. Note that you may wish to allocate less than the theoretical maximum to ensure you have headroom for other tasks.</td></tr>
<tr><th>router.maxParticipatingTunnels={n}</th></tr>
<tr><td>Determines the maximum number of participating tunnels the router can build. To disable participation completely, set to 0.</td></tr>
<tr><th>router.networkDatabase.flat={true|false}</th></tr>
<tr><td>When set to true, the router info files stored in your profile's netDB directory will not be split into 64 sub-directories.
</table>

View File

@ -0,0 +1,33 @@
<h2><a name="confignet"><%=intl._t("Configuration Help")%></a></h2>
<p>
<%=intl._t("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port is forwarded for both UDP and TCP.")%>&nbsp;<a href="/confignet"><%=intl._t("Network Configuration")%></a>.
</p>
<p>
<%=intl._t("If you can, please poke a hole in your firewall to allow unsolicited UDP and TCP packets to reach you.")%>&nbsp;
<%=intl._t("If you can't, I2P supports UPnP (Universal Plug and Play) and UDP hole punching with \"SSU introductions\" to relay traffic.")%>&nbsp;
<%=intl._t("Most of the options on the Network Configuration page are for special situations, for example where UPnP does not work correctly, or a firewall not under your control is doing harm.")%>&nbsp;
<%=intl._t("Certain firewalls such as symmetric NATs may not work well with I2P.")%>
</p>
<p>
<%=intl._t("UPnP is used to communicate with Internet Gateway Devices (IGDs) to detect the external IP address and forward ports.")%>&nbsp;
<%=intl._t("UPnP support is beta, and may not work for any number of reasons")%>:
</p>
<ul id="upnphelp">
<li class="tidylist"><%=intl._t("No UPnP-compatible device present")%></li>
<li class="tidylist"><%=intl._t("UPnP disabled on the device")%></li>
<li class="tidylist"><%=intl._t("Software firewall interference with UPnP")%></li>
<li class="tidylist"><%=intl._t("Bugs in the device's UPnP implementation")%></li>
<li class="tidylist"><%=intl._t("Multiple firewall/routers in the internet connection path")%></li>
<li class="tidylist"><%=intl._t("UPnP device change, reset, or address change")%></li>
</ul>
<p>
<a href="peers#upnp"><%=intl._t("Review the UPnP status here.")%></a>&nbsp;
<%=intl._t("UPnP may be enabled or disabled on the Network Configuration page, but a change requires a router restart to take effect.")%>
</p>
<p>
<%=intl._t("Hostnames entered on the Network Configuration page will be published in the network database.")%>&nbsp;
<%=intl._t("They are <b>not private</b>.")%>&nbsp;
<%=intl._t("Also, <b>do not enter a private IP address</b> like 127.0.0.1 or 192.168.1.1.")%>&nbsp;
<%=intl._t("If you specify the wrong IP address or hostname, or do not properly configure your NAT or firewall, your network performance will degrade substantially.")%>&nbsp;
<%=intl._t("When in doubt, leave the settings at the defaults.")%>&nbsp;
</p>

View File

@ -0,0 +1,72 @@
<h2><a name="reachability"><%=intl._t("Reachability Help")%></a></h2>
<p>
<%=intl._t("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port is forwarded for both UDP and TCP.")%>&nbsp;
<%=intl._t("If you think you have opened up your firewall and I2P still thinks you are firewalled, remember that you may have multiple firewalls, for example both software packages and external hardware routers.")%>&nbsp;
<%=intl._t("If there is an error, the <a href=\"logs.jsp\">logs</a> may also help diagnose the problem.")%>
</p>
<ul id="reachability">
<li class="tidylist"><b><%=intl._t("OK")%>:</b>
<%=intl._t("Your UDP port does not appear to be firewalled.")%>
</li>
<li class="tidylist"><b><%=intl._t("Firewalled")%>:</b>
<%=intl._t("Your UDP port appears to be firewalled.")%>&nbsp;
<%=intl._t("As the firewall detection methods are not 100% reliable, this may occasionally be displayed in error.")%>&nbsp;
<%=intl._t("However, if it appears consistently, you should check whether both your external and internal firewalls are open for your port.")%>&nbsp;
<%=intl._t("I2P will work fine when firewalled, there is no reason for concern. When firewalled, the router uses \"introducers\" to relay inbound connections.")%>&nbsp;
<%=intl._t("However, you will get more participating traffic and help the network more if you can open your firewall(s).")%>&nbsp;
<%=intl._t("If you think you have already done so, remember that you may have both a hardware and a software firewall, or be behind an additional, institutional firewall you cannot control.")%>&nbsp;
<%=intl._t("Also, some routers cannot correctly forward both TCP and UDP on a single port, or may have other limitations or bugs that prevent them from passing traffic through to I2P.")%>
</li>
<li class="tidylist"><b><%=intl._t("Testing")%>:</b>
<%=intl._t("The router is currently testing whether your UDP port is firewalled.")%>
</li>
<li class="tidylist"><b><%=intl._t("Hidden")%>:</b>
<%=intl._t("The router is not configured to publish its address, therefore it does not expect incoming connections.")%>&nbsp;
<%=intl._t("Hidden mode is automatically enabled for added protection in certain countries.")%>
</li>
<li class="tidylist"><b><%=intl._t("WARN - Firewalled and Fast")%>:</b>
<%=intl._t("You have configured I2P to share more than 128KBps of bandwidth, but you are firewalled.")%>&nbsp;
<%=intl._t("While I2P will work fine in this configuration, if you really have over 128KBps of bandwidth to share, it will be much more helpful to the network if you open your firewall.")%>
</li>
<li class="tidylist"><b><%=intl._t("WARN - Firewalled and Floodfill")%>:</b>
<%=intl._t("You have configured I2P to be a floodfill router, but you are firewalled.")%>&nbsp;
<%=intl._t("For best participation as a floodfill router, you should open your firewall.")%>
</li>
<li class="tidylist"><b><%=intl._t("WARN - Firewalled with Inbound TCP Enabled")%>:</b>
<%=intl._t("You have configured inbound TCP, however your UDP port is firewalled, and therefore it is likely that your TCP port is firewalled as well.")%>
<%=intl._t("If your TCP port is firewalled with inbound TCP enabled, routers will not be able to contact you via TCP, which will hurt the network.")%>
<%=intl._t("Please open your firewall or disable inbound TCP above.")%>
</li>
<li class="tidylist"><b><%=intl._t("WARN - Firewalled with UDP Disabled")%>:</b>
<%=intl._t("You have configured inbound TCP, however you have disabled UDP.")%>&nbsp;
<%=intl._t("You appear to be firewalled on TCP, therefore your router cannot accept inbound connections.")%>&nbsp;
<%=intl._t("Please open your firewall or enable UDP.")%>
</li>
<li class="tidylist"><b><%=intl._t("ERR - Clock Skew")%>:</b>
<%=intl._t("Your system's clock is skewed, which will make it difficult to participate in the network.")%>&nbsp;
<%=intl._t("Correct your clock setting if this error persists.")%>
</li>
<li class="tidylist"><b><%=intl._t("ERR - Private TCP Address")%>:</b>
<%=intl._t("You must never advertise an unroutable IP address such as 127.0.0.1 or 192.168.1.1 as your external address.")%>
<%=intl._t("Correct the address or disable inbound TCP on the Network Configuration page.")%>
</li>
<li class="tidylist"><b><%=intl._t("ERR - SymmetricNAT")%>:</b>
<%=intl._t("I2P detected that you are firewalled by a Symmetric NAT.")%>
<%=intl._t("I2P does not work well behind this type of firewall. You will probably not be able to accept inbound connections, which will limit your participation in the network.")%>
</li>
<li class="tidylist"><b><%=intl._t("ERR - UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart")%>:</b>
<%=intl._t("I2P was unable to bind to the configured port noted on the advanced network configuration page .")%>&nbsp;
<%=intl._t("Check to see if another program is using the configured port. If so, stop that program or configure I2P to use a different port.")%>&nbsp;
<%=intl._t("This may be a transient error, if the other program is no longer using the port.")%>&nbsp;
<%=intl._t("However, a restart is always required after this error.")%>
</li>
<li class="tidylist"><b><%=intl._t("ERR - UDP Disabled and Inbound TCP host/port not set")%>:</b>
<%=intl._t("You have not configured inbound TCP with a hostname and port on the Network Configuration page, however you have disabled UDP.")%>&nbsp;
<%=intl._t("Therefore your router cannot accept inbound connections.")%>&nbsp;
<%=intl._t("Please configure a TCP host and port on the Network Configuration page or enable UDP.")%>
</li>
<li class="tidylist"><b><%=intl._t("ERR - Client Manager I2CP Error - check logs")%>:</b>
<%=intl._t("This is usually due to a port 7654 conflict. Check the logs to verify.")%>&nbsp;
<%=intl._t("Do you have another I2P instance running? Stop the conflicting program and restart I2P.")%>
</li>
</ul>

View File

@ -17,7 +17,7 @@ your computer's time.</li> */
%>
<li class="tidylist"><b>Reachability:</b>
The router's view of whether it can be contacted by other routers.
Further information is on the <a href="confignet#help">configuration page</a>.
See <a href="#confignet">below</a> for more information.
</li></ul><h3>Peers</h3><ul>
<li class="tidylist"><b>Active:</b>
The first number is the number of peers you've sent or received a message from in the last few minutes.
@ -47,20 +47,20 @@ This number is not the total size of the network;
it may vary widely depending on your total bandwidth,
shared bandwidth, and locally-generated traffic.
I2P does not require a router to know every other router.</li>
</ul><h3>Bandwidth in/out</h3><div align="justify">
Should be self-explanatory. All values are in bytes per second, not bits per second.
Change your bandwidth limits on the <a href="confignet#help">configuration page</a>.
Bandwidth is <a href="graphs.jsp">graphed</a> by default.</div>
<h3>Local destinations</h3><div align="justify">
The local applications connecting through your router.
</ul><h3>Bandwidth in/out</h3>
<p>Should be self-explanatory. All values are in bytes per second, not bits per second.
Change your bandwidth limits on the <a href="config">configuration page</a>.
Bandwidth is <a href="graphs.jsp">graphed</a> by default.</p>
<h3>Local destinations</h3>
<p>The local applications connecting through your router.
These may be clients started through <a href="i2ptunnel/index.jsp">I2PTunnel</a>
or external programs connecting through SAM, BOB, or directly to I2CP.
</div><h3>Tunnels in/out</h3><div align="justify">
The actual tunnels are shown on the <a href="tunnels.jsp">the tunnels page</a>.</div><ul>
<li class="tidylist"><div align="justify"><b>Exploratory:</b>
or external programs connecting through SAM, BOB, or directly to I2CP.</p>
<h3>Tunnels in/out</h3>
<p>The actual tunnels are shown on the <a href="tunnels.jsp">the tunnels page</a>.</p>
<ul><li class="tidylist"><b>Exploratory:</b>
Tunnels built by your router and used for communication with the floodfill peers,
building new tunnels, and testing existing tunnels.</div></li>
building new tunnels, and testing existing tunnels.</p></li>
<li class="tidylist"><b>Client:</b>
Tunnels built by your router for each client's use.</li>
<li class="tidylist"><b>Participating:</b>
@ -68,7 +68,7 @@ Tunnels built by other routers through your router.
This may vary widely depending on network demand, your
shared bandwidth, and amount of locally-generated traffic.
The recommended method for limiting participating tunnels is
to change your share percentage on the <a href="confignet#help">configuration page</a>.
to change your share percentage on the <a href="config">configuration page</a>.
You may also limit the total number by setting <tt>router.maxParticipatingTunnels=nnn</tt> on
the <a href="configadvanced.jsp">advanced configuration page</a>. <a href="configstats.jsp#tunnel.participatingTunnels">[Enable graphing]</a>.</li>
<li class="tidylist"><b>Share ratio:</b>
@ -77,8 +77,8 @@ all your exploratory and client tunnels.
A number greater than 1.00 means you are contributing more tunnels to the network than you are using.</li>
</ul>
<h3>Congestion</h3><div align="justify">
Some basic indications of router overload:</div><ul>
<h3>Congestion</h3>
<p>Some basic indications of router overload:</p><ul>
<li class="tidylist"><b>Job lag:</b>
How long jobs are waiting before execution. The job queue is listed on the <a href="jobs.jsp">jobs page</a>.
Unfortunately, there are several other job queues in the router that may be congested,

View File

@ -1,9 +1,11 @@
<h2>Further Assistance</h2>
If you'd like to help improve or translate the documentation, or
help with other aspects of the project, please see the documentation for
<a href="http://i2p-projekt.i2p/en/get-involved">volunteers.</a>
</p><p>Further assistance is available here:</p>
<p>Further assistance is available here:</p>
<ul class="links">
<li class="tidylist"><a href="http://i2p-projekt.i2p/en/faq">FAQ on i2p-projekt.i2p</a></li>
<li class="tidylist"><a href="http://i2p-projekt.i2p/de/faq">Deutsch FAQ</a>.</li></ul>
<br>You may also try the <a href="http://forum.i2p/">I2P forum</a>
or IRC.
<li class="tidylist"><a href="http://i2pwiki.i2p/">I2PWiki</a></li>
<li class="tidylist"><a href="http://forum.i2p/">I2P forum</a></li></ul>
<p>You may also try <a href="http://zzz.i2p">zzz's developer forum</a>,
or <a href="irc://127.0.0.1:6668/i2p">I2P's IRC network</a>.</p>

View File

@ -14,12 +14,15 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1>I2P Router Help &amp; Support</h1>
<div class="main" id="main"><p>
<%@include file="help.jsi" %>
<%@include file="help-legal.jsi" %>
<%@include file="help-sidebar.jsi" %>
<div class="main" id="help"><p>
<div id="volunteer"><%@include file="help.jsi" %></div>
<div id="sidebarhelp"><%@include file="help-sidebar.jsi" %></div>
<div id="configurationhelp"><%@include file="help-configuration.jsi" %></div>
<div id="reachabilityhelp"><%@include file="help-reachability.jsi" %></div>
<div id="advancedsettings"><%@include file="help-advancedsettings.jsi" %></div>
<div id="legal"><%@include file="help-legal.jsi" %></div>
<div id="changelog">
<h2>Change Log</h2>
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="contenthelper" scope="request" />
<% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "history.txt"); %>
@ -27,6 +30,7 @@
<jsp:setProperty name="contenthelper" property="maxLines" value="256" />
<jsp:setProperty name="contenthelper" property="startAtBeginning" value="true" />
<jsp:getProperty name="contenthelper" property="textContent" />
<p id="fullhistory"><a href="/history.txt" target="_blank">View the full change log</a></p>
</div>
<p><a href="/history.txt">View the full change log</a>
</p><hr></div></body></html>
</div></body></html>

View File

@ -14,7 +14,7 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1>I2P مساعدة لوحة التحكم</h1>
<div class="main" id="main" dir="rtl" lang="ar"><p>
<div class="main" id="help" dir="rtl" lang="ar"><p>
اذا رغبت في المساعدة أو ترجمة الوثائق، أو المساعدة في أشياء أخرى، انظر اسفله
<a href="http://i2p-projekt.i2p/ar/get-involved">تطوع</a>

View File

@ -15,7 +15,7 @@
<%@include file="summary.jsi" %>
<!-- Traduction de mars 2011 (magma@mail.i2p) -->
<h1>Aide et assistance du routeur I2P</h1>
<div class="main" id="main"><p>
<div class="main" id="help"><p>
Si vous souhaitez améliorer ou traduire la documentation ou d'autres versants du projet, merci de vous reporter à
la page consacrée aux <a href="http://i2p-projekt.i2p/fr/get-involved">volontaires</a>.
</p>D'autres détails sont disponibles ici:

View File

@ -14,7 +14,7 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1>I2P Router Help &amp; Support</h1>
<div class="main" id="main"><p>
<div class="main" id="help"><p>
Als je wilt helpen om de documentatie te verbeteren of vertalen, of wilt helpen
met andere aspecten van het project, zie dan de documentatie voor
<a href="http://i2p-projekt.i2p/nl/get-involved">vrijwilligers.</a>

View File

@ -16,7 +16,7 @@
<h1>Справка маршрутизатора I2P</h1>
<div class="main" id="main">
<div class="main" id="help">
<p> Если Вы хотите помочь в улучшении или переводе документации, если у Вас есть идеи, как еще помочь проекту, пожалуйста, загляните в раздел документации
<a href="http://i2p-projekt.i2p/ru/get-involved">как стать участником</a>. </p>

View File

@ -53,7 +53,7 @@
} // shouldShowNews()
%>
<div class="main" id="main">
<div class="main" id="home">
<jsp:useBean class="net.i2p.router.web.HomeHelper" id="homehelper" scope="request" />
<jsp:setProperty name="homehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% if (homehelper.shouldShowWelcome()) { %>
@ -99,11 +99,11 @@
if (homehelper.shouldShowSearch()) {
%>
<div class="search">
<form action="/search.jsp" method="POST">
<form action="/search.jsp" target="_blank" method="POST">
<table class="search"><tr><td align="right">
<input size="40" type="text" class="search" name="query" />
</td><td align="left">
<button type="submit" value="search" class="search"><%=intl._t("Search I2P")%></button>
<button type="submit" value="search" class="search"><%=intl._t("Search")%></button>
</td><td align="left">
<jsp:useBean class="net.i2p.router.web.SearchHelper" id="searchhelper" scope="request" />
<jsp:setProperty name="searchhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
@ -115,12 +115,12 @@
} // shouldShowSearch()
%>
<div class="ag2">
<h4 class="app"><%=intl._t("Hidden Services of Interest")%></h4>
<jsp:getProperty name="homehelper" property="favorites" /><br>
<h4 class="app"><%=intl._t("Applications and Configuration")%></h4>
<jsp:getProperty name="homehelper" property="services" /><br>
</div>
<div class="ag2">
<h4 class="app2"><%=intl._t("Applications and Configuration")%></h4>
<jsp:getProperty name="homehelper" property="services" /><br>
<h4 class="app2"><%=intl._t("Hidden Services of Interest")%></h4>
<jsp:getProperty name="homehelper" property="favorites" /><br>
<div class="clearer">&nbsp;</div>
</div>
</div>

View File

@ -53,7 +53,7 @@
<%@include file="summary.jsi" %>
<h1><%=intl._t("Hidden Services Manager")%> <span class="newtab"><a href="/i2ptunnel/" target="_blank" title="<%=intl._t("Open in new tab")%>"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/newtab.png" /></a></span></h1>
<div class="main" id="main">
<div class="main" id="tunnelmgr">
<iframe src="/i2ptunnel/" width="100%" height="100%" frameborder="0" border="0" name="i2ptunnelframe" id="i2ptunnelframe" onload="setupFrame()" allowtransparency="true">
<%=intl._t("Your browser does not support iFrames.")%>
&nbsp;<a href="/i2ptunnel/"><%=intl._t("Click here to continue.")%></a>

View File

@ -9,7 +9,7 @@
<%@include file="summaryajax.jsi" %>
</head><body onload="initAjax()">
<%@include file="summary.jsi" %><h1>Jar File Dump</h1>
<div class="main" id="main">
<div class="main" id="jardump">
<jsp:useBean class="net.i2p.router.web.FileDumpHelper" id="dumpHelper" scope="request" />
<jsp:setProperty name="dumpHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="dumpHelper" property="fileSummary" />

View File

@ -10,9 +10,9 @@
<%@include file="summaryajax.jsi" %>
</head><body onload="initAjax()">
<%@include file="summary.jsi" %><h1><%=intl._t("I2P Router Job Queue")%></h1>
<div class="main" id="main">
<div class="main" id="jobs">
<jsp:useBean class="net.i2p.router.web.JobQueueHelper" id="jobQueueHelper" scope="request" />
<jsp:setProperty name="jobQueueHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% jobQueueHelper.storeWriter(out); %>
<jsp:getProperty name="jobQueueHelper" property="jobQueueSummary" />
<hr></div></body></html>
</div></body></html>

View File

@ -10,9 +10,12 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Router Logs")%></h1>
<div class="main" id="main">
<div class="joblog"><h3><%=intl._t("I2P Version and Running Environment")%></h3><a name="version"> </a>
<p>
<div class="main" id="logs">
<table id="bugreports"><tbody>
<tr><td class="infohelp">
<%=intl._t("Please include this information in bug reports")%>.
<%=intl._t("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%>
<% /* note to translators - both parameters are URLs */
%><%=intl._t("Please report bugs on {0} or {1}.",
"<a href=\"http://trac.i2p2.i2p/newticket\">trac.i2p2.i2p</a>",
@ -20,44 +23,65 @@
<!--
<%=intl._t("You may use the username \"guest\" and password \"guest\" if you do not wish to register.")%>
-->
<p><i><%=intl._t("Please include this information in bug reports")%>:</i>
<p>
<b>I2P version:</b> <%=net.i2p.router.RouterVersion.FULL_VERSION%><br>
<b>Java version:</b> <%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%> (<%=System.getProperty("java.runtime.name")%> <%=System.getProperty("java.runtime.version")%>)<br>
</td></tr>
</tbody></table>
<h3 class="tabletitle"><%=intl._t("I2P Version and Running Environment")%></h3><a name="version"> </a>
<table id="enviro"><tbody>
<tr><td><b>I2P version:</b></td><td><%=net.i2p.router.RouterVersion.FULL_VERSION%></td></tr>
<tr><td><b>Java version:</b></td><td><%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%> (<%=System.getProperty("java.runtime.name")%> <%=System.getProperty("java.runtime.version")%>)</td></tr>
<jsp:useBean class="net.i2p.router.web.LogsHelper" id="logsHelper" scope="request" />
<jsp:setProperty name="logsHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<jsp:getProperty name="logsHelper" property="unavailableCrypto" />
<b>Wrapper version:</b> <%=System.getProperty("wrapper.version", "none")%><br>
<b>Server version:</b> <jsp:getProperty name="logsHelper" property="jettyVersion" /><br>
<b>Servlet version:</b> <%=getServletInfo()%><br>
<b>JSTL version:</b> <jsp:getProperty name="logsHelper" property="jstlVersion" /><br>
<b>Platform:</b> <%=System.getProperty("os.name")%> <%=System.getProperty("os.arch")%> <%=System.getProperty("os.version")%><br>
<tr><td><b>Wrapper version:</b></td><td><%=System.getProperty("wrapper.version", "none")%></td></tr>
<tr><td><b>Server version:</b></td><td><jsp:getProperty name="logsHelper" property="jettyVersion" /></td></tr>
<tr><td><b>Servlet version:</b></td><td><%=getServletInfo()%></td></tr>
<tr><td><b>JSTL version:</b></td><td><jsp:getProperty name="logsHelper" property="jstlVersion" /></td></tr>
<tr><td><b>Platform:</b></td><td><%=System.getProperty("os.name")%> <%=System.getProperty("os.arch")%> <%=System.getProperty("os.version")%></td></tr>
<%
boolean isX86 = net.i2p.util.SystemVersion.isX86();
if (isX86) {
%><b>Jcpuid version:</b> <%=freenet.support.CPUInformation.CPUID.getJcpuidVersion()%><br>
%><tr><td><b>Jcpuid version:</b></td><td><%=freenet.support.CPUInformation.CPUID.getJcpuidVersion()%></td></tr>
<%
}
%><b>Processor:</b>
%><tr><td><b>Processor:</b></td><td>
<%
if (isX86) {
%> <%=net.i2p.util.NativeBigInteger.cpuModel()%>
<%
}
%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)<br>
<b>Jbigi:</b> <%=net.i2p.util.NativeBigInteger.loadStatus()%><br>
<b>Jbigi version:</b> <%=net.i2p.util.NativeBigInteger.getJbigiVersion()%><br>
<b>GMP version:</b> <%=net.i2p.util.NativeBigInteger.getLibGMPVersion()%><br>
<b>Encoding:</b> <%=System.getProperty("file.encoding")%><br>
<b>Charset:</b> <%=java.nio.charset.Charset.defaultCharset().name()%><br>
</p>
<p><%=intl._t("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%></p>
<h3><%=intl._t("Critical Logs")%></h3><a name="criticallogs"> </a>
%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)</td></tr>
<tr><td><b>Jbigi:</b></td><td><%=net.i2p.util.NativeBigInteger.loadStatus()%></td></tr>
<tr><td><b>Jbigi version:</b></td><td><%=net.i2p.util.NativeBigInteger.getJbigiVersion()%></td></tr>
<tr><td><b>GMP version:</b></td><td><%=net.i2p.util.NativeBigInteger.getLibGMPVersion()%></td></tr>
<tr><td><b>Encoding:</b></td><td><%=System.getProperty("file.encoding")%></td></tr>
<tr><td><b>Charset:</b></td><td><%=java.nio.charset.Charset.defaultCharset().name()%></td></tr></tbody></table>
<h3 class="tabletitle"><%=intl._t("Critical Logs")%></h3>
<table id="criticallogs" class="logtable"><tbody>
<tr><td>
<jsp:getProperty name="logsHelper" property="criticalLogs" />
<h3><%=intl._t("Router Logs")%> (<a href="configlogging"><%=intl._t("configure")%></a>)</h3>
</td></tr>
</tbody></table>
<h3 class="tabletitle"><%=intl._t("Router Logs")%>&nbsp;<a title="<%=intl._t("Configure router logging options")%>" href="configlogging">[<%=intl._t("Configure")%>]</a></h3>
<table id="routerlogs" class="logtable"><tbody>
<tr><td>
<jsp:getProperty name="logsHelper" property="logs" />
<h3><%=intl._t("Event Logs")%></h3>
</td></tr>
</tbody></table>
<h3 class="tabletitle"><%=intl._t("Event Logs")%></h3>
<table id="eventlogs" class="logtable"><tbody>
<tr><td>
<p><a href="events"><%=intl._t("View event logs")%></a></p>
<h3><%=intl._t("Service (Wrapper) Logs")%></h3><a name="servicelogs"> </a>
</td></tr>
</tbody></table>
<h3 class="tabletitle" id="servicelogs"><%=intl._t("Service (Wrapper) Logs")%></h3>
<table id="wrapperlogs" class="logtable"><tbody>
<tr><td>
<jsp:getProperty name="logsHelper" property="serviceLogs" />
</div></div></body></html>
</td></tr>
</tbody></table>
</div></body></html>

View File

@ -11,8 +11,7 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Network Database")%></h1>
<div class="main" id="main">
<div class="wideload">
<div class="main" id="netdb">
<jsp:useBean class="net.i2p.router.web.NetDbHelper" id="netdbHelper" scope="request" />
<jsp:setProperty name="netdbHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<%
@ -37,4 +36,4 @@
<jsp:setProperty name="netdbHelper" property="mtu" value="<%=request.getParameter(\"mtu\")%>" />
<jsp:setProperty name="netdbHelper" property="ssucaps" value="<%=request.getParameter(\"ssucaps\")%>" />
<jsp:getProperty name="netdbHelper" property="netDbSummary" />
</div></div></body></html>
</div></body></html>

View File

@ -10,7 +10,7 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1><%=intl._t("Latest News")%></h1>
<div class="main" id="main">
<div class="main" id="news">
<jsp:useBean class="net.i2p.router.web.NewsFeedHelper" id="feedHelper" scope="request" />
<jsp:setProperty name="feedHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% feedHelper.setLimit(0); %>

View File

@ -17,6 +17,6 @@
<jsp:setProperty name="conhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% conhelper.storeWriter(out); %>
<h1>I2P Router &raquo; Old Console</h1>
<div class="main" id="main">
<div class="main" id="oldconsole"><p>
<jsp:getProperty name="conhelper" property="console" />
</div></body></html>
</p></div></body></html>

View File

@ -11,11 +11,11 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Network Peers")%></h1>
<div class="main" id="main"><div class="wideload">
<div class="main" id="peers">
<jsp:useBean class="net.i2p.router.web.PeerHelper" id="peerHelper" scope="request" />
<jsp:setProperty name="peerHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% peerHelper.storeWriter(out); %>
<jsp:setProperty name="peerHelper" property="urlBase" value="peers.jsp" />
<jsp:setProperty name="peerHelper" property="sort" value="<%=request.getParameter(\"sort\") != null ? request.getParameter(\"sort\") : \"\"%>" />
<jsp:getProperty name="peerHelper" property="peerSummary" />
</div></div></body></html>
</div></body></html>

View File

@ -11,7 +11,7 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Network Peer Profiles")%></h1>
<div class="main" id="main"><div class="wideload">
<div class="main" id="profiles"><div class="wideload">
<jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
<jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<%
@ -21,4 +21,4 @@
%>
<jsp:setProperty name="profilesHelper" property="full" value="<%=request.getParameter(\"f\")%>" />
<jsp:getProperty name="profilesHelper" property="summary" />
<hr></div></div></body></html>
</div></div></body></html>

View File

@ -9,8 +9,8 @@
<%@include file="summaryajax.jsi" %>
</head><body onload="initAjax()">
<%@include file="summary.jsi" %><h1>Proof of Ownership</h1>
<div class="main" id="main">
<div class="main" id="proof"><p>
<jsp:useBean class="net.i2p.router.web.ProofHelper" id="proofHelper" scope="request" />
<jsp:setProperty name="proofHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<textarea cols="70" rows="15" wrap="off" readonly="readonly" spellcheck="false"><jsp:getProperty name="proofHelper" property="proof" /></textarea>
</div></body></html>
</p></div></body></html>

View File

@ -15,6 +15,6 @@
<% oldhelper.storeWriter(out); %>
<jsp:setProperty name="oldhelper" property="full" value="<%=request.getParameter(\"f\")%>" />
<h1><%=intl._t("I2P Router Statistics")%></h1>
<div class="main" id="main">
<div class="main" id="stats">
<jsp:getProperty name="oldhelper" property="stats" />
<hr></div></body></html>
</div></body></html>

View File

@ -30,8 +30,8 @@
<%@include file="summary.jsi" %>
<h1><%=intl._t("I2P Torrent Downloader")%> <span class="newtab"><a href="/i2psnark/" target="_blank" title="<%=intl._t("Open in new tab")%>"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/newtab.png" /></a></span></h1>
<div class="main" id="main">
<h1><%=intl._t("I2P Torrent Manager")%> <span class="newtab"><a href="/i2psnark/" target="_blank" title="<%=intl._t("Open in new tab")%>"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/newtab.png" /></a></span></h1>
<div class="main" id="torrents">
<iframe src="/i2psnark/" width="100%" height="100%" frameborder="0" border="0" name="i2psnarkframe" id="i2psnarkframe" onload="setupFrame()" allowtransparency="true">
<%=intl._t("Your browser does not support iFrames.")%>
&nbsp;<a href="/i2psnark/"><%=intl._t("Click here to continue.")%></a>

View File

@ -10,7 +10,7 @@
<%@include file="summaryajax.jsi" %>
</head><body onload="initAjax()">
<%@include file="summary.jsi" %><h1><%=intl._t("I2P Tunnel Summary")%></h1>
<div class="main" id="main">
<div class="main" id="tunnels">
<jsp:useBean class="net.i2p.router.web.TunnelHelper" id="tunnelHelper" scope="request" />
<jsp:setProperty name="tunnelHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% tunnelHelper.storeWriter(out); %>

Some files were not shown because too many files have changed in this diff Show More