propagate from branch 'i2p.i2p' (head 247ff5f9bcb20e4aa3ad4aa8702425c315d1d77b)

to branch 'i2p.i2p.str4d.ui' (head d4b5b96ff60f7d8b746c8fc5f0f9c533778a9eda)
This commit is contained in:
str4d
2017-05-18 12:54:13 +00:00
800 changed files with 54764 additions and 10819 deletions

View File

@ -244,6 +244,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

@ -173,7 +173,7 @@ public class Peer implements Comparable<Peer>
if (state != null) {
String r = state.getRequests();
if (r != null)
return sock.toString() + "<br>Requests: " + r;
return sock.toString() + "<br><b>Requests:</b> <span class=\"debugRequests\">" + r + "</span>";
}
return sock.toString();
}

View File

@ -795,14 +795,17 @@ public class SnarkManager implements CompleteListener, ClientApp {
updateConfig();
}
public boolean getUniversalTheming() {
return _context.getBooleanProperty(RC_PROP_UNIVERSAL_THEMING);
}
/**
* Get current theme.
* @return String -- the current theme
*/
public String getTheme() {
String theme = _config.getProperty(PROP_THEME);
boolean universalTheming = _context.getBooleanProperty(RC_PROP_UNIVERSAL_THEMING);
if (universalTheming) {
if (getUniversalTheming()) {
// Fetch routerconsole theme (or use our default if it doesn't exist)
theme = _context.getProperty(RC_PROP_THEME, DEFAULT_THEME);
// Ensure that theme exists
@ -1246,7 +1249,7 @@ public class SnarkManager implements CompleteListener, ClientApp {
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

@ -140,7 +140,7 @@ class DHTTracker {
* Debug info, HTML formatted
*/
public void renderStatusHTML(StringBuilder buf) {
buf.append("DHT tracker: ").append(_torrentCount).append(" torrents ")
buf.append("<b>DHT tracker:</b> ").append(_torrentCount).append(" torrents ")
.append(_peerCount).append(" peers ")
.append(DataHelper.formatDuration(_expireTime)).append(" expiration<br>");
}

View File

@ -682,17 +682,17 @@ 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\"><hr><b>TX:</b> ").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 / ")
"<b>RX:</b> ").append(_rxPkts.get()).append(" pkts / ")
.append(DataHelper.formatSize2(_rxBytes.get())).append("B / ")
.append(DataHelper.formatSize2(_rxBytes.get() * 1000 / uptime)).append("Bps<br>" +
"DHT Peers: ").append( _knownNodes.size()).append("<br>" +
"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>");
"<b>DHT Peers:</b> ").append( _knownNodes.size()).append("<br>" +
"<b>Blacklisted:</b> ").append(_blacklist.size()).append("<br>" +
"<b>Sent tokens:</b> ").append(_outgoingTokens.size()).append("<br>" +
"<b>Rcvd tokens:</b> ").append(_incomingTokens.size()).append("<br>" +
"<b>Pending queries:</b> ").append(_sentQueries.size()).append("<br><br><hr class=\"debug\">");
_tracker.renderStatusHTML(buf);
_knownNodes.renderStatusHTML(buf);
return buf.toString();

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

View File

@ -743,7 +743,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
if (first) {
first = false;
out.write("<br><br><h3>");
out.write("<br><br>\n<div id=\"jumplinks\">\n<h3>");
out.write(_t("Click a link below for an address helper from a jump service"));
out.write("</h3>\n");
} else {
@ -759,7 +759,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
}
}
}
out.write("</div>");
out.write("</div>\n</div>\n");
writeFooter(out);
}
@ -791,7 +791,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
StringBuilder buf = new StringBuilder(128);
buf.append("<div class=\"proxyfooter\"><p><i>I2P HTTP Proxy Server<br>Generated on: ")
.append(new Date().toString())
.append("</i></div></body></html>\n");
.append("</i></div>\n</body>\n</html>\n");
return buf.toString();
}

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" id="messages">
<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" id="servers">
<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,38 @@
<option value="streamrserver">Streamr</option>
</select>
<input class="control" type="submit" value="<%=intl._t("Create")%>" />
</div>
</form>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="panel" id="clients">
<h2><%=intl._t("I2P Client Tunnels")%></h2>
<div id="localClientTunnelList" class="panel">
<div class="header">
<h4><%=intl._t("I2P Client Tunnels")%></h4>
</div>
<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 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 +232,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 +299,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 +325,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,87 +67,95 @@ 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>
<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>
-->
<div class="subdivider">
<hr />
</div>
<%
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");
@ -173,90 +178,135 @@ 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);
props.remove(HostTxtEntry.PROP_OLDNAME);
%><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 {
// If set, use the configured alternate destination as the new alias destination,
@ -282,26 +332,29 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
props2.setProperty(HostTxtEntry.PROP_OLDDEST, b64);
he2.signInner(spk);
he2.sign(spk3);
%><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"><% he2.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" id="localDestination" title="Copy and paste this to the registration site" wrap="off" spellcheck="false"><% he2.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>
<%
} // spk3
} // spk2
%></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);
@ -309,73 +362,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>
<input value="false" type="radio" id="baseType" name="isClient" class="tickbox" />
<label><%=intl._t("Client Tunnel")%></label>
<input value="true" type="radio" id="baseType" name="isClient" class="tickbox" checked="checked" />
</div><%
</td>
</tr>
<tr>
<td class="options">
<span class="multiOption" id="isServer">
<label><input value="false" type="radio" id="baseType" name="isClient" class="tickbox" />
&nbsp;<%=intl._t("Server Tunnel")%></label>
</span>
<span class="multiOption" id="isClient">
<label><input value="true" type="radio" id="baseType" name="isClient" class="tickbox" checked="checked" />
&nbsp;<%=intl._t("Client Tunnel")%></label>
</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>
<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><%
</td>
</tr>
<tr>
<td class="options">
<label><input value="1" type="checkbox" id="startOnLoad" name="startOnLoad" title="Start Tunnel Automatically"<%=("1".equals(request.getParameter("startOnLoad")) ? " checked=\"checked\"" : "")%> class="tickbox" />
&nbsp;<%=intl._t("Automatically start tunnel when router starts")%></label>
</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 Imagegen</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>I2P Identification Image Generator</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 host list and
<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, QR codes and "random art" images.
</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=300 height=300><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=300 height=300><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("\" target=\"_blank\">").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);
@ -325,7 +327,7 @@ public class ConfigClientsHelper extends HelperBase {
boolean showEditButton, boolean showUpdateButton, boolean showStopButton,
boolean showDeleteButton, boolean showStartButton) {
String escapedName = DataHelper.escapeHTML(name);
buf.append("<tr><td class=\"mediumtags\" align=\"right\" width=\"25%\">");
buf.append("<tr><td align=\"right\">");
if (urlify && enabled) {
String link = "/";
if (! RouterConsoleRunner.ROUTERCONSOLE.equals(name))
@ -338,41 +340,40 @@ public class ConfigClientsHelper extends HelperBase {
buf.append("\" >");
} else {
if (name.length() > 0)
buf.append(_t(escapedName));
buf.append("<label for=\"").append(index).append("\">").append(_t(escapedName)).append("</label>");
}
buf.append("</td><td align=\"center\" width=\"10%\"><input type=\"checkbox\" class=\"optbox\" name=\"").append(index).append(".enabled\"");
buf.append("</td><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" id=\"").append(index).append("\" name=\"").append(index).append(".enabled\"");
if (enabled) {
buf.append(CHECKED);
if (ro || preventDisable)
buf.append("disabled=\"disabled\" ");
}
buf.append("></td><td align=\"center\" width=\"15%\">");
// The icons were way too much, so there's an X in each button class,
// remove if you wnat to put them back
buf.append("></td><td align=\"center\">");
if (showStartButton && (!ro) && !edit) {
buf.append("<button type=\"submit\" class=\"Xaccept\" name=\"action\" value=\"Start ").append(index).append("\" >")
buf.append("<button type=\"submit\" title=\"").append(_t("Start")).append("\" class=\"control accept\" name=\"action\" value=\"Start ").append(index).append("\" >")
.append(_t("Start")).append("<span class=hide> ").append(index).append("</span></button>");
}
if (showStopButton && (!edit))
buf.append("<button type=\"submit\" class=\"Xstop\" name=\"action\" value=\"Stop ").append(index).append("\" >")
buf.append("<button type=\"submit\" title=\"").append(_t("Stop")).append("\" class=\"control stop\" name=\"action\" value=\"Stop ").append(index).append("\" >")
.append(_t("Stop")).append("<span class=hide> ").append(index).append("</span></button>");
if (isClientChangeEnabled() && showEditButton && (!edit) && !ro)
buf.append("<button type=\"submit\" class=\"Xadd\" name=\"edit\" value=\"Edit ").append(index).append("\" >")
buf.append("<button type=\"submit\" title=\"").append(_t("Edit")).append("\" class=\"control add\" name=\"edit\" value=\"Edit ").append(index).append("\" >")
.append(_t("Edit")).append("<span class=hide> ").append(index).append("</span></button>");
if (showUpdateButton && (!edit) && !ro) {
buf.append("<button type=\"submit\" class=\"Xcheck\" name=\"action\" value=\"Check ").append(index).append("\" >")
buf.append("<button type=\"submit\" title=\"").append(_t("Check for updates")).append("\" class=\"control check\" name=\"action\" value=\"Check ").append(index).append("\" >")
.append(_t("Check for updates")).append("<span class=hide> ").append(index).append("</span></button>");
buf.append("<button type=\"submit\" class=\"Xdownload\" name=\"action\" value=\"Update ").append(index).append("\" >")
buf.append("<button type=\"submit\" title=\"").append(_t("Update")).append("\" class=\"control download\" name=\"action\" value=\"Update ").append(index).append("\" >")
.append(_t("Update")).append("<span class=hide> ").append(index).append("</span></button>");
}
if (showDeleteButton && (!edit) && !ro) {
buf.append("<button type=\"submit\" class=\"Xdelete\" name=\"action\" value=\"Delete ").append(index)
buf.append("<button type=\"submit\" title=\"").append(_t("Delete")).append("\" class=\"control delete\" name=\"action\" value=\"Delete ").append(index)
.append("\" onclick=\"if (!confirm('")
.append(_t("Are you sure you want to delete {0}?", _t(escapedName)))
.append("')) { return false; }\">")
.append(_t("Delete")).append("<span class=hide> ").append(index).append("</span></button>");
}
buf.append("</td><td align=\"left\" width=\"50%\">");
buf.append("</td><td align=\"left\">");
if (edit && !ro) {
buf.append("<input type=\"text\" size=\"80\" spellcheck=\"false\" name=\"nofilter_desc").append(index).append("\" value=\"");
buf.append(escapedDesc);

View File

@ -42,9 +42,9 @@ public class ConfigLoggingHelper extends HelperBase {
buf.append(prefix).append('=').append(level).append('\n');
}
buf.append("</textarea><br>\n");
buf.append("<p style=\"margin: 0px 12px\"><i>").append(_t("Add additional logging statements above. Example: net.i2p.router.tunnel=WARN")).append("</i><br>");
buf.append("<i>").append(_t("Or put entries in the logger.config file. Example: logger.record.net.i2p.router.tunnel=WARN")).append("</i><br>");
buf.append("<i>").append(_t("Valid levels are DEBUG, INFO, WARN, ERROR, CRIT")).append("</i></p>\n");
buf.append("<p>").append(_t("Add additional logging statements above. Example: net.i2p.router.tunnel=WARN")).append("<br>");
buf.append(_t("Or put entries in the logger.config file. Example: logger.record.net.i2p.router.tunnel=WARN")).append("<br>");
buf.append(_t("Valid levels are DEBUG, INFO, WARN, ERROR, CRIT")).append("</p>\n");
/****
// this is too big and ugly

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

@ -104,7 +104,8 @@ public class ConfigRestartBean {
for (int i = 0; i < s.length; i+= 3) {
buf.append("<button type=\"submit\" name=\"action\" value=\"")
.append(s[i]).append("\" class=\"")
.append(s[i+1]).append("\" >")
.append(s[i+1]).append("\" title=\"")
.append(_t(s[i+2], ctx)).append("\" >")
.append(_t(s[i+2], ctx)).append("</button>\n");
}
buf.append("</form>\n");

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 ||
@ -94,7 +94,7 @@ public class ConfigTunnelsHelper extends HelperBase {
// tunnel depth
int maxLength = advanced ? MAX_ADVANCED_LENGTH : MAX_LENGTH;
buf.append("<tr><td align=\"right\" class=\"mediumtags\">" + _t("Length") + ":</td>\n");
buf.append("<tr><td align=\"right\"><b>" + _t("Length") + ":</b></td>\n");
buf.append("<td align=\"center\"><select name=\"").append(index).append(".depthInbound\">\n");
int now = in.getLength();
renderOptions(buf, 0, maxLength, now, "", HOP);
@ -111,7 +111,7 @@ public class ConfigTunnelsHelper extends HelperBase {
buf.append("</tr>\n");
// tunnel depth variance
buf.append("<tr><td align=\"right\" class=\"mediumtags\">" + _t("Randomization") + ":</td>\n");
buf.append("<tr><td align=\"right\"><b>" + _t("Randomization") + ":</b></td>\n");
buf.append("<td align=\"center\"><select name=\"").append(index).append(".varianceInbound\">\n");
now = in.getLengthVariance();
renderOptions(buf, 0, 0, now, "", HOP);
@ -136,7 +136,7 @@ public class ConfigTunnelsHelper extends HelperBase {
// tunnel quantity
int maxQuantity = advanced ? MAX_ADVANCED_QUANTITY : MAX_QUANTITY;
buf.append("<tr><td align=\"right\" class=\"mediumtags\">" + _t("Quantity") + ":</td>\n");
buf.append("<tr><td align=\"right\"><b>" + _t("Quantity") + ":</b></td>\n");
buf.append("<td align=\"center\"><select name=\"").append(index).append(".quantityInbound\">\n");
now = in.getQuantity();
renderOptions(buf, 1, maxQuantity, now, "", TUNNEL);
@ -154,7 +154,7 @@ public class ConfigTunnelsHelper extends HelperBase {
// tunnel backup quantity
int maxBQuantity = advanced ? MAX_ADVANCED_BACKUP_QUANTITY : MAX_BACKUP_QUANTITY;
buf.append("<tr><td align=\"right\" class=\"mediumtags\">" + _t("Backup quantity") + ":</td>\n");
buf.append("<tr><td align=\"right\"><b>" + _t("Backup quantity") + ":</b></td>\n");
buf.append("<td align=\"center\"><select name=\"").append(index).append(".backupInbound\">\n");
now = in.getBackupQuantity();
renderOptions(buf, 0, maxBQuantity, now, "", TUNNEL);
@ -176,7 +176,7 @@ public class ConfigTunnelsHelper extends HelperBase {
// And let's not display them at all unless they have contents, which should be rare.
Properties props = in.getUnknownOptions();
if (!props.isEmpty()) {
buf.append("<tr><td align=\"right\" class=\"mediumtags\">" + _t("Inbound options") + ":</td>\n" +
buf.append("<tr><td align=\"right\"><b>" + _t("Inbound options") + ":</b></td>\n" +
"<td colspan=\"2\" align=\"center\"><input name=\"").append(index);
buf.append(".inboundOptions\" type=\"text\" size=\"32\" disabled=\"disabled\" " +
"value=\"");
@ -188,7 +188,7 @@ public class ConfigTunnelsHelper extends HelperBase {
}
props = out.getUnknownOptions();
if (!props.isEmpty()) {
buf.append("<tr><td align=\"right\" class=\"mediumtags\">" + _t("Outbound options") + ":</td>\n" +
buf.append("<tr><td align=\"right\"><b>" + _t("Outbound options") + ":</b></td>\n" +
"<td colspan=\"2\" align=\"center\"><input name=\"").append(index);
buf.append(".outboundOptions\" type=\"text\" size=\"32\" disabled=\"disabled\" " +
"value=\"");

View File

@ -9,33 +9,41 @@ 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("<input type=\"checkbox\" name=\"universalTheming\" ");
buf.append("</div><div id=\"themeoptions\">");
buf.append("<label><input type=\"checkbox\" name=\"universalTheming\" ");
if (universalTheming)
buf.append(CHECKED);
buf.append("value=\"1\">")
.append(_t("Set theme universally across all apps"))
.append("<br>\n");
.append("</label><br>\n");
return buf.toString();
}
public String getForceMobileConsole() {
StringBuilder buf = new StringBuilder(256);
boolean forceMobileConsole = _context.getBooleanProperty(CSSHelper.PROP_FORCE_MOBILE_CONSOLE);
buf.append("<input type=\"checkbox\" name=\"forceMobileConsole\" ");
buf.append("<label><input type=\"checkbox\" name=\"forceMobileConsole\" ");
if (forceMobileConsole)
buf.append(CHECKED);
buf.append("value=\"1\">")
.append(_t("Force the mobile console to be used"))
.append("<br>\n");
.append("</label></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,32 +184,38 @@ 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."));
buf.append("</td></tr>");
} else {
buf.append("<tr><th>")
buf.append("<tr><th title=\"")
.append(_t("Mark for deletion"))
.append("\">")
.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_")
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" id=\"")
.append(name)
.append("\"></td><td colspan=\"2\">")
.append("\" name=\"delete_")
.append(name)
.append("</td></tr>\n");
.append("\"></td><td colspan=\"2\"><label for=\"")
.append(name)
.append("\">")
.append(name)
.append("</label></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\">")
.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

@ -76,27 +76,27 @@ public class ConfigUpdateHelper extends HelperBase {
public String getUpdateThroughProxy() {
if (_context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY))
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" checked=\"checked\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" id=\"updateThroughProxy\" checked=\"checked\" >";
else
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" id=\"updateThroughProxy\" >";
}
/** @since 0.9.9 */
public String getNewsThroughProxy() {
if (_context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY_NEWS, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY_NEWS))
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"newsThroughProxy\" checked=\"checked\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"newsThroughProxy\" id=\"newsThroughProxy\" checked=\"checked\" >";
else
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"newsThroughProxy\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"newsThroughProxy\" id=\"newsThroughProxy\" >";
}
public String getUpdateUnsigned() {
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateUnsigned\" " +
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateUnsigned\" id=\"updateUnsigned\" " +
getChecked(ConfigUpdateHandler.PROP_UPDATE_UNSIGNED) + '>';
}
/** @since 0.9.20 */
public String getUpdateDevSU3() {
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateDevSU3\" " +
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateDevSU3\" id=\"updateDevSU3\" " +
getChecked(ConfigUpdateHandler.PROP_UPDATE_DEV_SU3) + '>';
}

View File

@ -99,16 +99,16 @@ 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");
_out.write(_t("Events since") + ": <select name=\"from\">");
"<input type=\"hidden\" name=\"nonce\" value=\"" + nonce + "\" >\n<b>");
_out.write(_t("Events since") + ":</b> <select name=\"from\">");
for (int i = 0; i < _times.length; i++) {
writeOption(_times[i]);
}
_out.write("</select><br>");
_out.write(_t("Event type") + ": <select name=\"type\">");
_out.write("</select>&nbsp;<b>");
_out.write(_t("Event type") + ":</b> <select name=\"type\">");
// sorted by translated display string
Map<String, String> events = new TreeMap<String, String>(Collator.getInstance());
for (int i = 0; i < _events.length; i += 2) {
@ -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("<label><input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : HelperBase.CHECKED) + ">" + _t("Averages") + "</label>&nbsp;&nbsp;&nbsp;");
_out.write ("<label><input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? HelperBase.CHECKED : "") + ">" + _t("Events") + "</label></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\"><label><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") + "</label></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

@ -28,49 +28,50 @@ public class HomeHelper extends HelperBase {
// No commas allowed in text strings!
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 Bandwidth") + S + _x("I2P Bandwidth Configuration") + S + "/config" + S + I + "info/bandwidth.png" + S +
_x("Configure UI") + S + _x("Select console theme & language & set optional console password") + S + "/configui" + S + I + "info/ui.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("Manage Plugins") + S + _x("Install and configure I2P plugins") + S + "/configplugins" + S + I + "plugin.png" + S +
_x("Router Console") + S + _x("I2P Router Console") + S + "/console" + S + I + "info/console.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("Web Server") + 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 +
"";
@ -175,7 +176,7 @@ public class HomeHelper extends HelperBase {
}
private String renderApps(Collection<App> apps) {
String website = _t("Website");
String website = _t("Web Server");
StringBuilder buf = new StringBuilder(1024);
buf.append("<div class=\"appgroup\">");
for (App app : apps) {
@ -187,23 +188,18 @@ public class HomeHelper extends HelperBase {
} else {
url = app.url;
}
buf.append("<div class=\"app\">" +
buf.append("\n<div class=\"app\">\n" +
"<div class=\"appimg\">" +
"<a href=\"").append(url).append("\">" +
"<img class=\"");
// toopie is 54x68, not 16x16, needs special alignment and sizing
if (app.icon.endsWith("/itoopie_sm.png"))
buf.append("app2p");
else
buf.append("app");
buf.append("\" alt=\"\" title=\"").append(app.desc).append("\" src=\"").append(app.icon).append("\"></a>\n" +
"</div>" +
"<table class=\"app\"><tr class=\"app\"><td class=\"app\">" +
// usability: add tabindex -1 so we avoid 2 tabs per app
"<a href=\"").append(url).append("\" tabindex=\"-1\">" +
"<img alt=\"\" title=\"").append(app.desc).append("\" src=\"").append(app.icon).append("\"></a>" +
"</div>\n" +
"<table><tr><td>" +
"<div class=\"applabel\">" +
"<a href=\"").append(url).append("\" title=\"").append(app.desc).append("\">").append(app.name).append("</a>" +
"</div>" +
"</td></tr></table>" +
"</div>\n");
"</td></tr></table>\n" +
"</div>");
}
buf.append("</div>\n");
return buf.toString();
@ -211,21 +207,27 @@ 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 title=\"")
.append(_t("Mark for deletion"))
.append("\">")
.append(_t("Remove"))
.append("</th><th colspan=\"2\">")
.append("</th><th></th><th>")
.append(_t("Name"))
.append("</th><th>")
.append(_t("URL"))
.append("</th></tr>\n");
for (App app : apps) {
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
.append(app.name)
.append("\" id=\"")
.append(app.name)
.append("\"></td><td align=\"center\">");
if (app.icon != null) {
buf.append("<img height=\"16\" alt=\"\" src=\"").append(app.icon).append("\">");
}
buf.append("</td><td align=\"left\">")
buf.append("</td><td align=\"left\"><label for=\"")
.append(app.name)
.append("\">")
.append(DataHelper.escapeHTML(app.name))
.append("</td><td align=\"left\"><a href=\"");
String url = DataHelper.escapeHTML(app.url);
@ -238,7 +240,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

@ -75,7 +75,7 @@ public class LogsHelper extends HelperBase {
*/
public String getLogs() {
String str = formatMessages(_context.logManager().getBuffer().getMostRecentMessages());
return "<p>" + _t("File location") + ": <a href=\"/router.log\">" + _context.logManager().currentFile() + "</a></p>" + str;
return "<p>" + _t("File location") + ": <a href=\"/router.log\" target=\"_blank\">" + _context.logManager().currentFile() + "</a></p>" + str;
}
/**
@ -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\" target=\"_blank\">" + 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,13 +227,13 @@ 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>");
buf.append("</div>");
buf.append("</div>\n");
_out.write(buf.toString());
}
@ -243,23 +241,25 @@ public class NetDbHelper extends HelperBase {
* @since 0.9.28
*/
private void renderLookupForm() throws IOException {
_out.write("<form action=\"/netdb\" method=\"GET\"><p><b>Pick One</b></p>\n" +
"Caps <input type=\"text\" name=\"caps\">e.g. f or XOfR<br>\n" +
"Cost <input type=\"text\" name=\"cost\"><br>\n" +
"Country code <input type=\"text\" name=\"c\">e.g. ru<br>\n" +
"Family <input type=\"text\" name=\"fam\"><br>\n" +
"Hash prefix <input type=\"text\" name=\"r\"><br>\n" +
"IP <input type=\"text\" name=\"ip\">host name, IPv4, or IPv6, /24,/16,/8 suffixes optional for IPv4<br>\n" +
"IPv6 Prefix <input type=\"text\" name=\"ipv6\"><br>\n" +
"MTU <input type=\"text\" name=\"mtu\"><br>\n" +
"Port <input type=\"text\" name=\"port\"><br>\n" +
"Sig Type <input type=\"text\" name=\"type\"><br>\n" +
"SSU Caps <input type=\"text\" name=\"ssucaps\"><br>\n" +
"Version <input type=\"text\" name=\"v\"><br>\n" +
"<p><b>Add Sybil analysis (must pick one above):</b></p>\n" +
"Sybil close to <input type=\"text\" name=\"sybil2\">Router hash, dest hash, b32, or from address book<br>\n" +
"or Sybil close to this router <input type=\"checkbox\" class=\"optbox\" value=\"1\" name=\"sybil\"><br>" +
"<p><input type=\"submit\" class=\"search\" value=\"Lookup\"></p>" +
"</form>\n");
_out.write("<form action=\"/netdb\" method=\"GET\">\n" +
"<table id=\"netdblookup\"><tr><th colspan=\"3\">Network Database Search</th></tr>\n" +
"<tr><td colspan=\"3\" class=\"subheading\"><b>Select one search field <i>only</i>:</b></td></tr>\n" +
"<tr><td>Capabilities:</td><td><input type=\"text\" name=\"caps\"></td><td>e.g. f or XOfR</td></tr>\n" +
"<tr><td>Cost:</td><td><input type=\"text\" name=\"cost\"></td><td></td></tr>\n" +
"<tr><td>Country Code:</td><td><input type=\"text\" name=\"c\"></td><td>e.g. ru</td></tr>\n" +
"<tr><td>Router Family:</td><td><input type=\"text\" name=\"fam\"></td><td></td></tr>\n" +
"<tr><td>Hash Prefix:</td><td><input type=\"text\" name=\"r\"></td><td></td></tr>\n" +
"<tr><td>IP or Hostname:</td><td><input type=\"text\" name=\"ip\"></td><td>host name, IPv4, or IPv6, /24,/16,/8 suffixes optional for IPv4</td></tr>\n" +
"<tr><td>IPv6 Prefix:</td><td><input type=\"text\" name=\"ipv6\"></td><td></td></tr>\n" +
"<tr><td>MTU:</td><td><input type=\"text\" name=\"mtu\"></td><td></td></tr>\n" +
"<tr><td>Port Number:</td><td><input type=\"text\" name=\"port\"></td><td></td></tr>\n" +
"<tr><td>Signature Type:</td><td><input type=\"text\" name=\"type\"></td><td></td></tr>\n" +
"<tr><td>SSU Capabilities:</td><td><input type=\"text\" name=\"ssucaps\"></td><td></td></tr>\n" +
"<tr><td>Router Version:</td><td><input type=\"text\" name=\"v\"></td><td></td></tr>\n" +
"<tr><td colspan=\"3\" class=\"subheading\"><b>Add Sybil analysis (must pick one above):</b></td></tr>\n" +
"<tr><td>Sybil close to:</td><td><input type=\"text\" name=\"sybil2\"></td><td>Router hash, dest hash, b32, or from address book</td>\n" +
"<tr><td><label for=\"closetorouter\">or Sybil close to this router:</label></td><td><input type=\"checkbox\" class=\"optbox\" value=\"1\" name=\"sybil\" id=\"closetorouter\"></td><td></td></tr>\n" +
"<tr><td colspan=\"3\" class=\"optionsave\"><button type=\"submit\" class=\"search\" value=\"Lookup\">Lookup</button></td></tr>\n" +
"</table>\n</form>\n");
}
}

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,12 +517,13 @@ 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);
buf.append("<tr><td><img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase(Locale.US)).append("\"");
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> <a href=\"/netdb?c=").append(country).append("\">");
buf.append("<tr><td><a href=\"/netdb?c=").append(country).append("\">");
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase(Locale.US)).append("\"");
buf.append(" src=\"/flags.jsp?c=").append(country).append("\">");
buf.append(getTranslatedCountry(country));
buf.append("</a></td><td align=\"center\">").append(num).append("</td></tr>\n");
}
@ -552,36 +580,47 @@ 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("<a href=\"/netdb?c=").append(country).append("\">");
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase(Locale.US)).append('\"');
buf.append(" title=\"").append(getTranslatedCountry(country)).append('\"');
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ");
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ").append("</a>");
}
for (RouterAddress addr : info.getAddresses()) {
String style = addr.getTransportStyle();
@ -598,7 +637,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,9 +78,9 @@ public class NewsFeedHelper extends HelperBase {
buf.append("<div class=\"newsentry\"><h3>");
if (entry.updated > 0) {
Date date = new Date(entry.updated);
buf.append("<font size=\"-1\">")
buf.append("<span class=\"newsDate\">")
.append(fmt.format(date))
.append(":</font> ");
.append("</span> ");
}
if (entry.link != null)
buf.append("<a href=\"").append(DataHelper.escapeHTML(entry.link)).append("\">");
@ -88,9 +88,9 @@ public class NewsFeedHelper extends HelperBase {
if (entry.link != null)
buf.append("</a>");
if (entry.authorName != null) {
buf.append(" <font size=\"-2\">(<i>")
.append(Messages.getString("by {0}", DataHelper.escapeHTML(entry.authorName), ctx))
.append("</i>)</font>\n");
buf.append(" <span class=\"newsAuthor\" title=\"Post author\"><i>")
.append(Messages.getString("{0}", DataHelper.escapeHTML(entry.authorName), ctx))
.append("</i></span>\n");
}
buf.append("</h3>\n<div class=\"newscontent\">\n")
.append(entry.content)

View File

@ -286,7 +286,7 @@ public class NewsHelper extends ContentHelper {
public static String status(RouterContext ctx) {
StringBuilder buf = new StringBuilder(128);
long now = ctx.clock().now();
buf.append("<i>");
buf.append("<span id=\"newsStatus\"><i>");
long lastUpdated = lastUpdated(ctx);
long lastFetch = lastChecked(ctx);
if (lastUpdated > 0) {
@ -300,7 +300,7 @@ public class NewsHelper extends ContentHelper {
DataHelper.formatDuration2(now - lastFetch),
ctx));
}
buf.append("</i>");
buf.append("</i></span><span id=\"newsDisplay\">");
String consoleNonce = CSSHelper.getNonce();
if (lastUpdated > 0 && consoleNonce != null) {
if (shouldShowNews(ctx)) {
@ -311,9 +311,9 @@ public class NewsHelper extends ContentHelper {
.append(Messages.getString("Show news", ctx));
}
buf.append("</a>" +
" - <a href=\"/news\">")
" | <a href=\"/news\">")
.append(Messages.getString("Show all news", ctx))
.append("</a>");
.append("</a></span>");
}
return buf.toString();
}

View File

@ -26,7 +26,7 @@ import net.i2p.stat.RateStat;
class ProfileOrganizerRenderer {
private final RouterContext _context;
private final ProfileOrganizer _organizer;
public ProfileOrganizerRenderer(ProfileOrganizer organizer, RouterContext context) {
_context = context;
_organizer = organizer;
@ -38,10 +38,10 @@ class ProfileOrganizerRenderer {
public void renderStatusHTML(Writer out, int mode) throws IOException {
boolean full = mode == 1;
Set<Hash> peers = _organizer.selectAllPeers();
long now = _context.clock().now();
long hideBefore = now - 90*60*1000;
Set<PeerProfile> order = new TreeSet<PeerProfile>(mode == 2 ? new HashComparator() : new ProfileComparator());
int older = 0;
int standard = 0;
@ -66,7 +66,7 @@ class ProfileOrganizerRenderer {
}
order.add(prof);
}
int fast = 0;
int reliable = 0;
int integrated = 0;
@ -78,26 +78,28 @@ 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("<div class=\"widescroll\"><table id=\"profilelist\">");
buf.append("<tr>");
buf.append("<th>").append(_t("Peer")).append("</th>");
buf.append("<th>").append(_t("Groups (Caps)")).append("</th>");
buf.append("<th>").append(_t("Groups")).append("</th>");
buf.append("<th>").append(_t("Caps")).append("</th>");
buf.append("<th>").append(_t("Speed")).append("</th>");
buf.append("<th>").append(_t("Capacity")).append("</th>");
buf.append("<th>").append(_t("Integration")).append("</th>");
buf.append("<th>").append(_t("Status")).append("</th>");
buf.append("<th>&nbsp;</th>");
buf.append("<th>").append(_t("View/Edit")).append("</th>");
buf.append("</tr>");
int prevTier = 1;
for (PeerProfile prof : order) {
Hash peer = prof.getPeer();
int tier = 0;
boolean isIntegrated = false;
if (_organizer.isFast(peer)) {
@ -111,23 +113,23 @@ class ProfileOrganizerRenderer {
} else {
tier = 3;
}
if (_organizer.isWellIntegrated(peer)) {
isIntegrated = true;
integrated++;
}
if (tier != prevTier)
buf.append("<tr><td colspan=\"7\"><hr></td></tr>\n");
buf.append("<tr><td colspan=\"8\"><hr></td></tr>\n");
prevTier = tier;
buf.append("<tr><td align=\"center\" nowrap>");
buf.append(_context.commSystem().renderPeerHTML(peer));
// debug
//if(prof.getIsExpandedDB())
// buf.append(" ** ");
buf.append("</td><td align=\"center\">");
switch (tier) {
case 1: buf.append(_t("Fast, High Capacity")); break;
case 2: buf.append(_t("High Capacity")); break;
@ -138,14 +140,14 @@ class ProfileOrganizerRenderer {
RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer);
if (info != null) {
// prevent HTML injection in the caps and version
buf.append(" (").append(DataHelper.stripHTML(info.getCapabilities()));
buf.append("<td align=\"right\">").append(DataHelper.stripHTML(info.getCapabilities()));
String v = info.getOption("router.version");
if (v != null)
buf.append(' ').append(DataHelper.stripHTML(v));
buf.append(')');
} else {
buf.append("<td align=\"right\"><i>").append(_t("unknown")).append("</i></td>");
}
buf.append("<td align=\"right\">").append(num(prof.getSpeedValue()));
buf.append("</td><td align=\"right\">").append(num(prof.getSpeedValue()));
long bonus = prof.getSpeedBonus();
if (bonus != 0) {
if (bonus > 0)
@ -177,18 +179,19 @@ class ProfileOrganizerRenderer {
if (total / fails <= 10) // hide if < 10%
buf.append(' ').append(fails).append('/').append(total).append(' ').append(_t("Test Fails"));
}
buf.append("&nbsp;</td>");
//buf.append("<td nowrap align=\"center\"><a target=\"_blank\" href=\"dumpprofile.jsp?peer=")
// .append(peer.toBase64().substring(0,6)).append("\">").append(_t("profile")).append("</a>");
buf.append("<td nowrap align=\"center\"><a href=\"viewprofile?peer=")
.append(peer.toBase64()).append("\">").append(_t("profile")).append("</a>");
buf.append("&nbsp;<a href=\"configpeer?peer=").append(peer.toBase64()).append("\">+-</a></td>\n");
buf.append("&nbsp;<a title=\"").append(_t("Configure peer")).append("\" href=\"configpeer?peer=").append(peer.toBase64()).append("\">+-</a></td>\n");
buf.append("</tr>");
// let's not build the whole page in memory (~500 bytes per peer)
out.write(buf.toString());
buf.setLength(0);
}
buf.append("</table>");
buf.append("</table></div>");
////
//// don't bother reindenting
@ -197,7 +200,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 +253,7 @@ class ProfileOrganizerRenderer {
}
buf.append("</tr>\n");
}
buf.append("</table>");
buf.append("</table></div>");
////
//// don't bother reindenting
@ -258,21 +261,81 @@ class ProfileOrganizerRenderer {
}
if (mode < 2) {
buf.append("<h3>").append(_t("Thresholds")).append("</h3>");
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>");
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("<h3 class=\"tabletitle\">").append(_t("Thresholds")).append("</h3>\n")
.append("<table id=\"thresholds\"><tbody>")
.append("<tr><th><b>")
.append(_t("Speed")).append(": </b>").append(num(_organizer.getSpeedThreshold()))
.append("</th><th><b>")
.append(_t("Capacity")).append(": </b>").append(num(_organizer.getCapacityThreshold()))
.append("</th><th><b>")
.append(_t("Integration")).append(": </b>").append(num(_organizer.getIntegrationThreshold()))
.append("</th></tr><tr><td>")
.append(fast).append(' ').append(_t("fast peers"))
.append("</td><td>")
.append(reliable).append(' ').append(_t("high capacity peers"))
.append("</td><td>")
.append(integrated).append(' ').append(_t(" well integrated peers"))
.append("</td></tr></tbody></table>\n");
buf.append("<h3 class=\"tabletitle\">").append(_t("Definitions")).append("</h3>\n")
.append("<table id=\"profile_defs\"><tbody>");
buf.append("<tr><td><b>")
.append(_t("groups")).append(":</b></td><td>").append(_t("as determined by the profile organizer"))
.append("</td></tr>");
buf.append("<tr><td><b>")
.append(_t("caps")).append(":</b></td><td>").append(_t("capabilities in the netDb, not used to determine profiles"))
.append("</td></tr>");
buf.append("<tr id=\"capabilities_key\"><td colspan=\"2\"><table><tbody>");
buf.append("<tr><td>&nbsp;</td>")
.append("<td><b>B:</b></td><td>").append(_t("SSU Testing")).append("</td>")
.append("<td><b>C:</b></td><td>").append(_t("SSU Introducer")).append("</td>")
.append("<td>&nbsp;</td></tr>");
buf.append("<tr><td>&nbsp;</td>")
.append("<td><b>f:</b></td><td>").append(_t("Floodfill")).append("</td>")
.append("<td><b>H:</b></td><td>").append(_t("Hidden")).append("</td>")
.append("<td>&nbsp;</td></tr>");
buf.append("<tr><td>&nbsp;</td>")
.append("<td><b>K:</b></td><td>").append(_t("Under {0} shared bandwidth", "12KBps")).append("</td>")
.append("<td><b>L:</b></td><td>").append(_t("{0} shared bandwidth", "12 - 32KBps")).append("</td>")
.append("<td>&nbsp;</td></tr>");
buf.append("<tr><td>&nbsp;</td>")
.append("<td><b>M:</b></td><td>").append(_t("{0} shared bandwidth", "32 - 64KBps")).append("</td>")
.append("<td><b>N:</b></td><td>").append(_t("{0} shared bandwidth", "64 - 128KBps")).append("</td>")
.append("<td>&nbsp;</td></tr>");
buf.append("<tr><td>&nbsp;</td>")
.append("<td><b>O:</b></td><td>").append(_t("{0} shared bandwidth", "128 - 256KBps")).append("</td>")
.append("<td><b>P:</b></td><td>").append(_t("{0} shared bandwidth", "256 - 2000KBps")).append("</td>")
.append("<td>&nbsp;</td></tr>");
buf.append("<tr><td>&nbsp;</td>")
.append("<td><b>R:</b></td><td>").append(_t("Reachable")).append("</td>")
.append("<td><b>U:</b></td><td>").append(_t("Unreachable")).append("</td>")
.append("<td>&nbsp;</td></tr>");
buf.append("<tr><td>&nbsp;</td>")
.append("<td><b>X:</b></td><td>").append(_t("Over {0} shared bandwidth", "2000KBps")).append("</td>")
.append("<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>");
buf.append("<tr><td>&nbsp;</td><td colspan=\"5\">").append(_t("Note: For P and X bandwidth tiers, O is included for the purpose of backward compatibility in the NetDB."))
.append("</tr>");
buf.append("</tbody></table></td></tr>"); // profile_defs
buf.append("<tr><td><b>")
.append(_t("speed"))
.append(":</b></td><td>")
.append(_t("peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel"))
.append("</td></tr>");
buf.append("<tr><td><b>")
.append(_t("capacity"))
.append(":</b></td><td>")
.append(_t("how many tunnels can we ask them to join in an hour?"))
.append("</td></tr>");
buf.append("<tr><td><b>")
.append(_t("integration"))
.append(":</b></td><td>")
.append(_t("how many new peers have they told us about lately?"))
.append("</td></tr>");
buf.append("<tr><td><b>")
.append(_t("status"))
.append(":</b></td><td>")
.append(_t("is the peer banned, or unreachable, or failing tunnel tests?"))
.append("</td></tr>");
buf.append("</tbody></table>\n"); // thresholds
////
//// don't bother reindenting
@ -282,7 +345,7 @@ class ProfileOrganizerRenderer {
out.write(buf.toString());
out.flush();
}
private class ProfileComparator extends HashComparator {
public int compare(PeerProfile left, PeerProfile right) {
if (_context.profileOrganizer().isFast(left.getPeer())) {
@ -319,7 +382,7 @@ class ProfileOrganizerRenderer {
}
}
}
/**
* Used for floodfill-only page
* As of 0.9.29, sorts in true binary order, not base64 string
@ -329,9 +392,9 @@ class ProfileOrganizerRenderer {
public int compare(PeerProfile left, PeerProfile right) {
return DataHelper.compareTo(left.getPeer().getData(), right.getPeer().getData());
}
}
private final static DecimalFormat _fmt = new DecimalFormat("###,##0.00");
private final static String num(double num) { synchronized (_fmt) { return _fmt.format(num); } }
private final static String NA = HelperBase._x("n/a");
@ -378,6 +441,10 @@ class ProfileOrganizerRenderer {
return Messages.getString(s, _context);
}
private String _t(String s, Object o) {
return Messages.getString(s, o, _context);
}
/** translate (ngettext) @since 0.8.5 */
public String ngettext(String s, String p, int n) {
return Messages.getString(n, s, p, _context);

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))
@ -123,7 +126,7 @@ class SummaryBarRenderer {
public String renderHelpAndFAQHTML() {
StringBuilder buf = new StringBuilder(512);
buf.append("<h3><a href=\"/help\" target=\"_top\" title=\"")
buf.append("<h3 id=\"helpfaq\"><a href=\"/help\" target=\"_top\" title=\"")
.append(_t("I2P Router Help &amp; FAQ"))
.append("\">")
.append(_t("Help &amp; FAQ"))
@ -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"))
@ -160,7 +163,7 @@ class SummaryBarRenderer {
.append("/\" target=\"_blank\" title=\"")
.append(_t("Local web server"))
.append("\">")
.append(nbsp(_t("Website")))
.append(nbsp(_t("Web Server")))
.append("</a>\n")
.append(NavHelper.getClientAppLinks(_context))
@ -177,12 +180,44 @@ 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"))
"<a href=\"/dns\" target=\"_top\" title=\"")
.append(_t("Manage your I2P hosts file here (I2P domain name resolution)"))
.append("\">")
.append(nbsp(_t("Tunnels")))
.append(nbsp(_t("Addressbook")))
.append("</a>\n");
if (!StatSummarizer.isDisabled()) {
buf.append("<a href=\"/graphs\" target=\"_top\" title=\"")
.append(_t("Graph router performance"))
.append("\">")
.append(nbsp(_t("Graphs")))
.append("</a>\n");
}
buf.append("<a href=\"/i2ptunnelmgr\" target=\"_top\" title=\"")
.append(_t("Local Tunnels"))
.append("\">")
.append(nbsp(_t("Hidden Services Manager")))
.append("</a>\n" +
// "<a href=\"/jobs.jsp\" target=\"_top\" title=\"")
// .append(_t("Show the router's workload, and how it's performing"))
// .append("\">")
// .append(_t("Jobs"))
// .append("</a>\n" +
"<a href=\"/logs\" target=\"_top\" title=\"")
.append(_t("Health Report"))
.append("\">")
.append(nbsp(_t("Logs")))
.append("</a>\n" +
"<a href=\"/netdb\" target=\"_top\" title=\"")
.append(_t("Show list of all known I2P routers"))
.append("\">")
.append(nbsp(_t("NetDB")))
.append("</a>\n" +
"<a href=\"/peers\" target=\"_top\" title=\"")
@ -197,56 +232,86 @@ class SummaryBarRenderer {
.append(nbsp(_t("Profiles")))
.append("</a>\n" +
"<a href=\"/netdb\" target=\"_top\" title=\"")
.append(_t("Show list of all known I2P routers"))
"<a href=\"/tunnels\" target=\"_top\" title=\"")
.append(_t("View existing tunnels and tunnel build status"))
.append("\">")
.append(nbsp(_t("NetDB")))
.append("</a>\n" +
"<a href=\"/logs\" target=\"_top\" title=\"")
.append(_t("Health Report"))
.append("\">")
.append(nbsp(_t("Logs")))
.append(nbsp(_t("Tunnels")))
.append("</a>\n");
// "<a href=\"/jobs.jsp\" target=\"_top\" title=\"")
// .append(_t("Show the router's workload, and how it's performing"))
// .append("\">")
// .append(_t("Jobs"))
// .append("</a>\n" +
buf.append("</td></tr></table>\n");
return buf.toString();
}
if (!StatSummarizer.isDisabled()) {
buf.append("<a href=\"/graphs\" target=\"_top\" title=\"")
.append(_t("Graph router performance"))
.append("\">")
.append(nbsp(_t("Graphs")))
.append("</a>\n");
}
public String renderAdvancedHTML() {
StringBuilder buf = new StringBuilder(512);
buf.append("<a href=\"/stats\" target=\"_top\" title=\"")
.append(_t("Textual router performance statistics"))
.append("\">")
.append(nbsp(_t("Stats")))
.append("</a>\n" +
buf.append("<h3 id=\"advanced\"><a title=\"")
.append(_t("Advanced Configuration"))
.append("\" href=\"/configadvanced\">")
.append(_t("Advanced"))
.append("</a></h3>\n")
"<a href=\"/dns\" target=\"_top\" title=\"")
.append(_t("Manage your I2P hosts file here (I2P domain name resolution)"))
.append("\">")
.append(nbsp(_t("Addressbook")))
.append("</a>\n" +
.append("<hr class=\"b\"><table id=\"sb_advanced\"><tr><td>")
"<a href=\"/i2ptunnelmgr\" target=\"_top\" title=\"")
.append(_t("Local Tunnels"))
.append("\">")
.append(nbsp(_t("Hidden Services Manager")))
.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");
if (_context.getBooleanProperty(HelperBase.PROP_ADVANCED))
buf.append("<a href=\"/debug\">Debug</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("Network database search tool"))
.append("\" href=\"/netdb?f=4\">")
.append(nbsp(_t("NetDB Search")))
.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 +324,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 +342,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 +353,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 +369,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 +395,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 +452,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 +521,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 +565,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 +615,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

@ -44,23 +44,24 @@ public class SummaryHelper extends HelperBase {
static final String DEFAULT_FULL =
"HelpAndFAQ" + S +
"ShortGeneral" + S +
"Bandwidth" + S +
"UpdateStatus" + S +
"FirewallAndReseedStatus" + S +
"NetworkReachability" + S +
"I2PServices" + S +
"I2PInternals" + S +
"General" + S +
"NetworkReachability" + S +
"UpdateStatus" + S +
"RestartStatus" + S +
"Peers" + S +
"FirewallAndReseedStatus" + S +
"Bandwidth" + S +
"Tunnels" + S +
"Congestion" + S +
"TunnelStatus" + S +
"Congestion" + S +
"RestartStatus" + S +
"Destinations" + S +
"";
static final String DEFAULT_MINIMAL =
"ShortGeneral" + S +
"Bandwidth" + S +
"NewsHeadings" + S +
"UpdateStatus" + S +
"NetworkReachability" + S +
@ -76,7 +77,7 @@ public class SummaryHelper extends HelperBase {
*/
public String getIdent() {
if (_context == null) return "[no router]";
if (_context.routerHash() != null)
return _context.routerHash().toBase64().substring(0, 4);
else
@ -95,14 +96,14 @@ public class SummaryHelper extends HelperBase {
*/
public String getUptime() {
if (_context == null) return "[no router]";
Router router = _context.router();
if (router == null)
return "[not up]";
else
return DataHelper.formatDuration2(router.getUptime());
}
/**
this displayed offset, not skew - now handled in reachability()
@ -117,17 +118,17 @@ public class SummaryHelper extends HelperBase {
return " (" + DataHelper.formatDuration2(diff) + " " + _t("skew") + ")";
}
**/
/** allowReseed */
public boolean allowReseed() {
return _context.netDb().isInitialized() &&
(_context.netDb().getKnownRouters() < 30) ||
_context.getBooleanProperty("i2p.alwaysAllowReseed");
}
/** subtract one for ourselves, so if we know no other peers it displays zero */
public int getAllPeers() { return Math.max(_context.netDb().getKnownRouters() - 1, 0); }
public String getReachability() {
return reachability(); // + timeSkew();
// testing
@ -192,7 +193,7 @@ public class SummaryHelper extends HelperBase {
return _t(status.toStatusString());
case DISCONNECTED:
return _t("Disconnected - check network cable");
return _t("Disconnected - check network connection");
case HOSED:
return _t("ERR-UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart");
@ -214,7 +215,7 @@ public class SummaryHelper extends HelperBase {
return _t(status.toStatusString());
}
}
/**
* Retrieve amount of used memory.
*
@ -227,7 +228,7 @@ public class SummaryHelper extends HelperBase {
return integerFormatter.format(used) + "KB (" + usedPc + "%)";
}
********/
/**
* How many peers we are talking to now
*
@ -325,14 +326,14 @@ public class SummaryHelper extends HelperBase {
return formatPair(_context.bandwidthLimiter().getReceiveBps(),
_context.bandwidthLimiter().getSendBps());
}
/**
* @return "x.xx / y.yy {K|M}"
*/
public String getFiveMinuteKBps() {
if (_context == null)
return "0 / 0";
RateStat receiveRate = _context.statManager().getRate("bw.recvRate");
double in = 0;
if (receiveRate != null) {
@ -349,14 +350,14 @@ public class SummaryHelper extends HelperBase {
}
return formatPair(in, out);
}
/**
* @return "x.xx / y.yy {K|M}"
*/
public String getLifetimeKBps() {
if (_context == null)
return "0 / 0";
RateStat receiveRate = _context.statManager().getRate("bw.recvRate");
double in;
if (receiveRate == null)
@ -371,7 +372,7 @@ public class SummaryHelper extends HelperBase {
out = sendRate.getLifetimeAverageValue();
return formatPair(in, out);
}
/**
* @return "x.xx / y.yy {K|M}"
*/
@ -405,12 +406,12 @@ public class SummaryHelper extends HelperBase {
public String getInboundTransferred() {
if (_context == null)
return "0";
long received = _context.bandwidthLimiter().getTotalAllocatedInboundBytes();
return DataHelper.formatSize2(received) + 'B';
}
/**
* How much data have we sent since the router started (pretty printed
* string with 2 decimal places and the appropriate units - GB/MB/KB/bytes)
@ -419,11 +420,11 @@ public class SummaryHelper extends HelperBase {
public String getOutboundTransferred() {
if (_context == null)
return "0";
long sent = _context.bandwidthLimiter().getTotalAllocatedOutboundBytes();
return DataHelper.formatSize2(sent) + 'B';
}
/**
* Client destinations connected locally.
*
@ -432,20 +433,20 @@ public class SummaryHelper extends HelperBase {
public String getDestinations() {
// convert the set to a list so we can sort by name and not lose duplicates
List<Destination> clients = new ArrayList<Destination>(_context.clientManager().listClients());
StringBuilder buf = new StringBuilder(512);
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);
Hash h = client.calculateHash();
buf.append("<tr><td align=\"right\"><img src=\"/themes/console/images/");
if (_context.clientManager().shouldPublishLeaseSet(h))
buf.append("server.png\" alt=\"Server\" title=\"").append(_t("Hidden Service")).append("\">");
@ -462,9 +463,9 @@ public class SummaryHelper extends HelperBase {
if (ls != null && _context.tunnelManager().getOutboundClientTunnelCount(h) > 0) {
long timeToExpire = ls.getEarliestLeaseDate() - _context.clock().now();
if (timeToExpire < 0) {
// red or yellow light
// red or yellow light
buf.append("<td><img src=\"/themes/console/images/local_inprogress.png\" alt=\"").append(_t("Rebuilding")).append("&hellip;\" title=\"").append(_t("Leases expired")).append(" ").append(DataHelper.formatDuration2(0-timeToExpire));
buf.append(" ").append(_t("ago")).append(". ").append(_t("Rebuilding")).append("&hellip;\"></td></tr>\n");
buf.append(" ").append(_t("ago")).append(". ").append(_t("Rebuilding")).append("&hellip;\"></td></tr>\n");
} else {
// green light
buf.append("<td><img src=\"/themes/console/images/local_up.png\" alt=\"Ready\" title=\"").append(_t("Ready")).append("\"></td></tr>\n");
@ -478,10 +479,9 @@ public class SummaryHelper extends HelperBase {
} else {
buf.append("<center><i>").append(_t("none")).append("</i></center>");
}
buf.append("</div>\n");
return buf.toString();
}
/**
* Compare translated nicknames - put "shared clients" first in the sort
* Inner class, can't be Serializable
@ -529,7 +529,7 @@ public class SummaryHelper extends HelperBase {
else
return _context.tunnelManager().getFreeTunnelCount();
}
/**
* How many active outbound tunnels we have.
*
@ -540,7 +540,7 @@ public class SummaryHelper extends HelperBase {
else
return _context.tunnelManager().getOutboundTunnelCount();
}
/**
* How many inbound client tunnels we have.
*
@ -551,7 +551,7 @@ public class SummaryHelper extends HelperBase {
else
return _context.tunnelManager().getInboundClientTunnelCount();
}
/**
* How many active outbound client tunnels we have.
*
@ -562,7 +562,7 @@ public class SummaryHelper extends HelperBase {
else
return _context.tunnelManager().getOutboundClientTunnelCount();
}
/**
* How many tunnels we are participating in.
*
@ -591,7 +591,7 @@ public class SummaryHelper extends HelperBase {
public String getJobLag() {
if (_context == null)
return "0";
RateStat rs = _context.statManager().getRate("jobQueue.jobLag");
if (rs == null)
return "0";
@ -603,14 +603,14 @@ public class SummaryHelper extends HelperBase {
* How long it takes us to pump out a message, averaged over the last minute
* (pretty printed with the units attached)
*
*/
*/
public String getMessageDelay() {
if (_context == null)
return "0";
return DataHelper.formatDuration2(_context.throttle().getMessageDelay());
}
/**
* How long it takes us to test our tunnels, averaged over the last 10 minutes
* (pretty printed with the units attached)
@ -619,23 +619,23 @@ public class SummaryHelper extends HelperBase {
public String getTunnelLag() {
if (_context == null)
return "0";
return DataHelper.formatDuration2(_context.throttle().getTunnelLag());
}
public String getTunnelStatus() {
if (_context == null)
return "";
return _context.throttle().getTunnelStatus();
}
public String getInboundBacklog() {
if (_context == null)
return "0";
return String.valueOf(_context.tunnelManager().getInboundBuildQueueSize());
}
/*******
public String getPRNGStatus() {
Rate r = _context.statManager().getRate("prng.bufferWaitTime").getRate(60*1000);
@ -697,7 +697,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();
@ -713,7 +713,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
@ -734,7 +734,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;
@ -746,7 +746,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;
@ -758,7 +758,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;
@ -821,7 +821,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"))
@ -833,7 +833,7 @@ public class SummaryHelper extends HelperBase {
if (allowReseed()) {
if (reseedInProgress) {
// While reseed occurring, show status message instead
buf.append("<i>").append(_context.netDb().reseedChecker().getStatus()).append("</i><br>");
buf.append("<div class=\"sb_notice\"><i>").append(_context.netDb().reseedChecker().getStatus()).append("</i></div>");
} else {
// While no reseed occurring, show reseed link
long nonce = _context.random().nextLong();
@ -843,14 +843,15 @@ public class SummaryHelper extends HelperBase {
String uri = getRequestURI();
buf.append("<p><form action=\"").append(uri).append("\" method=\"POST\">\n");
buf.append("<input type=\"hidden\" name=\"reseedNonce\" value=\"").append(nonce).append("\" >\n");
buf.append("<button type=\"submit\" class=\"reload\" value=\"Reseed\" >").append(_t("Reseed")).append("</button></form></p>\n");
buf.append("<button type=\"submit\" title=\"").append(_t("Attempt to download router reference files (if automatic reseed has failed)"));
buf.append("\" class=\"reload\" value=\"Reseed\" >").append(_t("Reseed")).append("</button></form></p>\n");
}
}
// If a new reseed ain't running, and the last reseed had errors, show error message
if (!reseedInProgress) {
String reseedErrorMessage = _context.netDb().reseedChecker().getError();
if (reseedErrorMessage.length() > 0) {
buf.append("<i>").append(reseedErrorMessage).append("</i><br>");
buf.append("<div class=\"sb_notice\"><i>").append(reseedErrorMessage).append("</i></div>");
}
}
if (buf.length() <= 0)
@ -929,7 +930,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 title=\"Mark section for removal from the sidebar\">")
.append(_t("Remove"))
.append("</th><th>")
.append(_t("Name"))
@ -938,11 +939,15 @@ public class SummaryHelper extends HelperBase {
.append("</th></tr>\n");
for (String section : sections) {
int i = sections.indexOf(section);
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" id=\"")
.append(sectionNames.get(section))
.append("\" name=\"delete_")
.append(i)
.append("\"></td><td align=\"left\">")
.append("\"></td><td align=\"left\"><label for=\"")
.append(sectionNames.get(section))
.append("\">")
.append(_t(sectionNames.get(section)))
.append("</td><td align=\"right\"><input type=\"hidden\" name=\"order_")
.append("</label></td><td align=\"right\"><input type=\"hidden\" name=\"order_")
.append(i).append('_').append(section)
.append("\" value=\"")
.append(i)
@ -997,9 +1002,8 @@ public class SummaryHelper extends HelperBase {
buf.append("<tr><td align=\"center\">" +
"<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("\"></td><td align=\"left\">")
.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("<p><a href=\"/netdb?caps=f&amp;sybil\">See all</a></p>");
buf.append("<h3 id=\"ritoday\" class=\"sybils\">Closest Floodfills to Our Routing Key (Where we Store our RI)</h3>");
buf.append("<p class=\"sybil_info\"><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("<p><a href=\"/netdb?caps=f&amp;sybil\">See all</a></p>");
buf.append("<h3 id=\"ritmrw\" class=\"sybils\">Closest Floodfills to Tomorrow's Routing Key (Where we will Store our RI)</h3>");
buf.append("<p class=\"sybil_info\"><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,12 +246,12 @@ 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("<p><a href=\"/netdb?caps=f&amp;sybil=" + ls.getHash().toBase64() + "\">See all</a></p>");
buf.append("<h3 class=\"sybils\">Closest floodfills to the Routing Key for " + DataHelper.escapeHTML(name) + " (where we store our LS)</h3>");
buf.append("<p class=\"sybil_info\"><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("<p><a href=\"/netdb?caps=f&amp;sybil=" + ls.getHash().toBase64() + "\">See all</a></p>");
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 class=\"sybil_info\"><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_info\"><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_info\"><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_info\"><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_info\"><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,8 +602,8 @@ 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=")
.append(ss).append("&amp;sybil\">").append(ss).append("</a>\"</b></p>");
buf.append("<p class=\"family\"><b>").append(count).append(" floodfills in family:&nbsp;&nbsp;<a href=\"/netdb?fam=")
.append(ss).append("&amp;sybil\">").append(ss).append("</a></b></p>");
for (RouterInfo info : ris) {
String fam = info.getOption("family");
if (fam == null)
@ -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);
@ -727,11 +728,11 @@ class SybilRenderer {
if (i == 0) {
//buf.append("<p><b>Not to worry, but above router is closer than average minimum distance " + fmt.format(avgMinDist) + "</b></p>");
} else if (i == 1) {
buf.append("<p><b>Not to worry, but above routers are closer than average minimum distance " + fmt.format(avgMinDist) + "</b></p>");
buf.append("<p class=\"sybil_info\"><b>Not to worry, but above routers are closer than average minimum distance " + fmt.format(avgMinDist) + "</b></p>");
} else if (i == 2) {
buf.append("<p><b>Possible Sybil Warning - above routers are closer than average minimum distance " + fmt.format(avgMinDist) + "</b></p>");
buf.append("<p class=\"sybil_info\"><b>Possible Sybil Warning - above routers are closer than average minimum distance " + fmt.format(avgMinDist) + "</b></p>");
} else {
buf.append("<p><b>Major Sybil Warning - above router is closer than average minimum distance " + fmt.format(avgMinDist) + "</b></p>");
buf.append("<p class=\"sybil_info\"><b>Major Sybil Warning - above router is closer than average minimum distance " + fmt.format(avgMinDist) + "</b></p>");
}
}
// this is dumb because they are already sorted
@ -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,20 +873,21 @@ 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("<a href=\"/netdb?c=").append(country).append("\">");
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(country.toUpperCase(Locale.US)).append('\"');
buf.append(" title=\"").append(getTranslatedCountry(country)).append('\"');
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ");
buf.append(" src=\"/flags.jsp?c=").append(country).append("\"> ").append("</a>");
}
for (RouterAddress addr : info.getAddresses()) {
String style = addr.getTransportStyle();
@ -920,7 +922,7 @@ class SybilRenderer {
return;
final DecimalFormat fmt = new DecimalFormat("#0.00");
XORComparator<Hash> xor = new XORComparator<Hash>(Hash.FAKE_HASH);
out.write("<h3>Group Distances</h3><table><tr><th>Hash<th>Distance from previous</tr>\n");
out.write("<h3 class=\"tabletitle\">Group Distances</h3><table class=\"sybil_distance\"><tr><th>Hash<th>Distance from previous</tr>\n");
Collections.sort(sybils, xor);
Hash prev = null;
for (Hash h : sybils) {
@ -951,8 +953,8 @@ class SybilRenderer {
prev = null;
final int limit = Math.min(10, sybils.size());
for (int i = start; i <= days; i++) {
out.write("<h3>Distance for " + new Date(now) +
"</h3><table><tr><th>Hash<th>Distance<th>Distance from previous</tr>\n");
out.write("<h3 class=\"tabletitle\">Distance for " + new Date(now) +
"</h3><table class=\"sybil_distance\"><tr><th>Hash<th>Distance<th>Distance from previous</tr>\n");
Hash rkey = rkgen.getRoutingKey(from, now);
xor = new XORComparator<Hash>(rkey);
Collections.sort(sybils, xor);

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 tunnels_participating\"><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");
}
@ -131,12 +131,11 @@ class TunnelRenderer {
if (displayed > DISPLAY_LIMIT)
out.write("<div class=\"statusnotes\"><b>" + _t("Limited display to the {0} tunnels with the highest usage", DISPLAY_LIMIT) + "</b></div>\n");
if (inactive > 0)
out.write("<div class=\"statusnotes\"><b>" + _t("Inactive participating tunnels") + ": " + inactive + "</b></div>\n");
out.write("<div class=\"statusnotes\"><b>" + _t("Inactive participating tunnels") + ":&nbsp;&nbsp;" + inactive + "</b></div>\n");
else if (displayed <= 0)
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");
out.write("<div class=\"statusnotes\"><b>" + _t("Lifetime bandwidth usage") + ":&nbsp;&nbsp;" + DataHelper.formatSize2(processed*1024) + "B</b></div>\n");
//renderPeers(out);
out.write("</div>");
}
private static class TunnelComparator implements Comparator<HopConfig>, Serializable {
@ -164,7 +163,8 @@ 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 tunnels_client\"><tr><th title=\"" + _t("Inbound or outbound?") + ("\">") + _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>");
@ -215,7 +215,7 @@ class TunnelRenderer {
// PooledTunnelCreatorConfig
List<?> pending = in.listPending();
if (!pending.isEmpty()) {
out.write("<div class=\"statusnotes\"><center><b>" + _t("Build in progress") + ": " + pending.size() + " " + _t("inbound") + "</b></center></div>\n");
out.write("<div class=\"statusnotes\"><center><b>" + _t("Build in progress") + ":&nbsp;&nbsp;" + pending.size() + " " + _t("inbound") + "</b></center></div>\n");
live += pending.size();
}
}
@ -223,13 +223,13 @@ class TunnelRenderer {
// PooledTunnelCreatorConfig
List<?> pending = outPool.listPending();
if (!pending.isEmpty()) {
out.write("<div class=\"statusnotes\"><center><b>" + _t("Build in progress") + ": " + pending.size() + " " + _t("outbound") + "</b></center></div>\n");
out.write("<div class=\"statusnotes\"><center><b>" + _t("Build in progress") + ":&nbsp;&nbsp;" + pending.size() + " " + _t("outbound") + "</b></center></div>\n");
live += pending.size();
}
}
if (live <= 0)
out.write("<div class=\"statusnotes\"><center><b>" + _t("No tunnels; waiting for the grace period to end.") + "</b></center></div>\n");
out.write("<div class=\"statusnotes\"><center><b>" + _t("Lifetime bandwidth usage") + ": " +
out.write("<div class=\"statusnotes\"><center><b>" + _t("Lifetime bandwidth usage") + ":&nbsp;&nbsp;" +
DataHelper.formatSize2(processedIn*1024) + "B " + _t("in") + ", " +
DataHelper.formatSize2(processedOut*1024) + "B " + _t("out") + "</b></center></div>");
}

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 class="infohelp">
<%
if (advancedhelper.isFloodfill()) {
%><%=intl._t("This router is currently a floodfill participant.")%><%
@ -34,33 +39,51 @@
%><%=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>
<input type="radio" class="optbox" name="ff" value="true" <%=advancedhelper.getFFChecked(1) %> >
<%=intl._t("Force On")%><br>
<input type="radio" class="optbox" name="ff" value="false" <%=advancedhelper.getFFChecked(0) %> >
<%=intl._t("Disable")%><br>
<div class="formaction">
<b><%=intl._t("Enrollment")%>:</b>
<label><input type="radio" class="optbox" name="ff" value="auto" <%=advancedhelper.getFFChecked(2) %> >
<%=intl._t("Automatic")%></label>&nbsp;
<label><input type="radio" class="optbox" name="ff" value="true" <%=advancedhelper.getFFChecked(1) %> >
<%=intl._t("Force On")%></label>&nbsp;
<label><input type="radio" class="optbox" name="ff" value="false" <%=advancedhelper.getFFChecked(0) %> >
<%=intl._t("Disable")%></label>
</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>
<% 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">
<b><%=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="configplugins" title="<%=intl._t("Plugin Configuration")%>">[Plugins]</a>&nbsp;
<a href="configwebapps" title="<%=intl._t("WebApp Configuration")%>">[WebApps]</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")%>
<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" class="infohelp"><%=intl._t("Import the secret family key that you exported from an existing router in the family.")%></td></tr>
<tr>
<td><b><%=intl._t("Select secret key file")%>:</b>
<input name="file" type="file" value="" />
</p>
<div class="formaction">
<input type="submit" name="action" class="download" value="<%=intl._t("Join Existing Router Family")%>" />
</div></form></div>
</td>
<td class="optionsave">
<input type="submit" name="action" class="download" value="<%=intl._t("Join Family")%>" />
</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><b><%=intl._t("Family Name")%>:</b>
<input name="family" type="text" size="30" value="" />
</p>
<div class="formaction">
<input type="submit" name="action" class="accept" value="<%=intl._t("Create New Router Family")%>" />
</div></form></div>
</td>
<td class="optionsave">
<input type="submit" name="action" class="accept" value="<%=intl._t("Create Family")%>" />
</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 needrestart"><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">
<input type="submit" name="action" class="delete" value="<%=intl._t("Leave Router Family")%>" />
</div></form></div>
<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 Family")%>" />
</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">
<input type="checkbox" name="oldHome" <jsp:getProperty name="homehelper" property="configHome" /> >
<%=intl._t("Use old home page")%>
<table id="oldhome" class="configtable">
<tr>
<td>
<label><input type="checkbox" name="oldHome" <jsp:getProperty name="homehelper" property="configHome" /> >
<%=intl._t("Use old home page")%></label>
</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,24 +21,33 @@ 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>
<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>
<%=intl._t("I2CP Interface")%>:
<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>
<label><input type="radio" class="optbox" name="mode" value="1" <%=clientshelper.i2cpModeChecked(1) %> >
<%=intl._t("Enabled without SSL")%></label><br>
<label><input type="radio" class="optbox" name="mode" value="2" <%=clientshelper.i2cpModeChecked(2) %> >
<%=intl._t("Enabled with SSL required")%></label><br>
<label><input type="radio" class="optbox" name="mode" value="0" <%=clientshelper.i2cpModeChecked(0) %> >
<%=intl._t("Disabled - Clients outside this Java process may not connect")%></label><br>
</td></tr>
<tr><td>
<b><%=intl._t("I2CP Interface")%>:</b>
<select name="interface">
<%
String[] ips = clientshelper.intfcAddresses();
@ -53,23 +62,26 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
out.print("</option>\n");
}
%>
</select><br>
<%=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 type="checkbox" class="optbox" name="auth" value="true" <jsp:getProperty name="clientshelper" property="auth" /> >
<%=intl._t("Require username and password")%><br>
<%=intl._t("Username")%>:
<input name="user" type="text" value="" /><br>
<%=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">
</select>&nbsp;
<b><%=intl._t("I2CP Port")%>:</b>
<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>
<label><input type="checkbox" class="optbox" name="auth" value="true" <jsp:getProperty name="clientshelper" property="auth" /> >
<%=intl._t("Require username and password")%></label><br>
</td></tr>
<tr><td>
<b><%=intl._t("Username")%>:</b>
<input name="user" type="text" value="" />&nbsp;
<b><%=intl._t("Password")%>:</b>
<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,36 +11,35 @@
<%@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 class="mediumtags" align="right"><%=intl._t("Dest. name, hash, or full key")%>:</td>
</td>
</tr><tr>
<td align="right"><b><%=intl._t("Dest. name, hash, or full key")%>:</b></td>
<td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off" spellcheck="false"></textarea></td>
</tr><tr>
<td class="mediumtags" align="right"><%=intl._t("Encryption Key")%>:</td>
<td align="right"><b><%=intl._t("Encryption Key")%>:</b></td>
<td><input type="text" size="55" name="key" ></td>
</tr><tr>
<td align="right" colspan="2">
<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,40 @@
<%@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">
<tr><td class="mediumtags" align="right"><b><%=intl._t("Log file")%>:</b></td>
<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 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>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Log record format")%>:</b></td>
</td>
<td><%=intl._t("(the symbol '@' will be replaced during log rotation)")%></td>
</tr><tr><td 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>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Log date format")%>:</b></td>
</td>
<td><%=intl._t("(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, 'm' = message)")%></td>
</tr><tr><td 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>
</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>
</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>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Log level overrides")%>:</b></td>
<td><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>
<td><%=intl._t("('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' = second, 'SSS' = millisecond)")%></td>
</tr><tr><td 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" />" ></td>
<td></td>
</tr><tr><td align="right"><b><%=intl._t("Default log level")%>:</b></td>
<td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /></td>
<td><%=intl._t("(DEBUG and INFO are not recommended defaults, as they will drastically slow down your router)")%></td>
</tr><tr><td align="right"><b><%=intl._t("Log level overrides")%>:</b></td>
<td colspan="2"><jsp:getProperty name="logginghelper" property="logLevelTable" /></td>
</tr><tr><td align="right"><b><%=intl._t("New override")%>:</b></td>
<td colspan="2"><jsp:getProperty name="logginghelper" property="newClassBox" /></td>
</tr>
<tr><td class="optionsave" colspan="3">
<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,66 +14,107 @@
<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>
<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("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>
<input type="radio" class="optbox" name="udpAutoIP" value="local,ssu" <%=nethelper.getUdpAutoIPChecked(4) %> >
<%=intl._t("Disable UPnP IP address detection")%><br>
<input type="radio" class="optbox" name="udpAutoIP" value="upnp,ssu" <%=nethelper.getUdpAutoIPChecked(5) %> >
<%=intl._t("Ignore local interface IP address")%><br>
<input type="radio" class="optbox" name="udpAutoIP" value="ssu" <%=nethelper.getUdpAutoIPChecked(0) %> >
<%=intl._t("Use SSU IP address detection only")%><br>
<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>
<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>
<label><input type="checkbox" class="optbox" name="upnp" value="true" <jsp:getProperty name="nethelper" property="upnpChecked" /> >
<%=intl._t("Enable UPnP to open firewall ports")%></label>
</td>
</tr>
<tr>
<th id="ipconfig"><%=intl._t("IP Configuration")%></th>
</tr>
<tr>
<td>
<b class="suboption"><%=intl._t("Externally reachable hostname or IP address")%>:</b><br>
<label><input type="radio" class="optbox" name="udpAutoIP" value="local,upnp,ssu" <%=nethelper.getUdpAutoIPChecked(3) %> >
<%=intl._t("Use all auto-detect methods")%></label><br>
<label><input type="radio" class="optbox" name="udpAutoIP" value="local,ssu" <%=nethelper.getUdpAutoIPChecked(4) %> >
<%=intl._t("Disable UPnP IP address detection")%></label><br>
<label><input type="radio" class="optbox" name="udpAutoIP" value="upnp,ssu" <%=nethelper.getUdpAutoIPChecked(5) %> >
<%=intl._t("Ignore local interface IP address")%></label><br>
<label><input type="radio" class="optbox" name="udpAutoIP" value="ssu" <%=nethelper.getUdpAutoIPChecked(0) %> >
<%=intl._t("Use SSU IP address detection only")%></label><br>
<label><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></label><br>
<label><input type="radio" class="optbox" name="udpAutoIP" value="fixed" <%=nethelper.getUdpAutoIPChecked(1) %> >
<%=intl._t("Specify hostname or IP")%>:</label>
<%=nethelper.getAddressSelector() %>
</p><p>
<%=intl._t("Action when IP changes")%>:<br>
<input type="checkbox" class="optbox" name="laptop" value="true" <jsp:getProperty name="nethelper" property="laptopChecked" /> >
</td>
</tr>
<tr>
<th id="ipchange"><%=intl._t("Action when IP changes")%></th>
</tr>
<tr>
<td>
<label><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>
<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>
<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") %> >
<%=intl._t("Disable IPv6")%><br>
<input type="radio" class="optbox" name="ipv6" value="enable" <%=nethelper.getIPv6Checked("enable") %> >
<%=intl._t("Enable IPv6")%><br>
<input type="radio" class="optbox" name="ipv6" value="preferIPv4" <%=nethelper.getIPv6Checked("preferIPv4") %> >
<%=intl._t("Prefer IPv4 over IPv6")%><br>
<input type="radio" class="optbox" name="ipv6" value="preferIPv6" <%=nethelper.getIPv6Checked("preferIPv6") %> >
<%=intl._t("Prefer IPv6 over IPv4")%><br>
<input type="radio" class="optbox" name="ipv6" value="only" <%=nethelper.getIPv6Checked("only") %> >
(<i><%=intl._t("Experimental")%></i>)</label>
</td>
</tr>
<tr>
<th id="ipv4config"><%=intl._t("IPv4 Configuration")%></th>
</tr>
<tr>
<td>
<label><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)")%></label>
</td>
</tr>
<tr>
<th id="ipv6config"><%=intl._t("IPv6 Configuration")%></th>
</tr>
<tr>
<td>
<label><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)")%></label><br>
<label><input type="radio" class="optbox" name="ipv6" value="false" <%=nethelper.getIPv6Checked("false") %> >
<%=intl._t("Disable IPv6")%></label><br>
<label><input type="radio" class="optbox" name="ipv6" value="enable" <%=nethelper.getIPv6Checked("enable") %> >
<%=intl._t("Enable IPv6")%></label><br>
<label><input type="radio" class="optbox" name="ipv6" value="preferIPv4" <%=nethelper.getIPv6Checked("preferIPv4") %> >
<%=intl._t("Prefer IPv4 over IPv6")%></label><br>
<label><input type="radio" class="optbox" name="ipv6" value="preferIPv6" <%=nethelper.getIPv6Checked("preferIPv6") %> >
<%=intl._t("Prefer IPv6 over IPv4")%></label><br>
<label><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>
<%=intl._t("UDP port:")%>
(<i><%=intl._t("Experimental")%></i>)</label>
</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>
<b><%=intl._t("UDP port:")%></b>
<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>
<label><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></label>
</td>
</tr>
<% /********
<!-- let's keep this simple...
<input type="checkbox" class="optbox" name="requireIntroductions" value="true" <jsp:getProperty name="nethelper" property="requireIntroductionsChecked" /> />
@ -83,125 +124,54 @@
Current External UDP address: <i><jsp:getProperty name="nethelper" property="udpAddress" /></i><br>
-->
*********/ %>
</p><p>
<b><%=intl._t("TCP Configuration")%>:</b><br>
<%=intl._t("Externally reachable hostname or IP address")%>:<br>
<input type="radio" class="optbox" name="ntcpAutoIP" value="true" <%=nethelper.getTcpAutoIPChecked(2) %> >
<tr>
<th id="tcpconfig"><%=intl._t("TCP Configuration")%></th>
</tr>
<tr>
<td>
<b class="suboption"><%=intl._t("Externally reachable hostname or IP address")%>:</b><br>
<label><input type="radio" class="optbox" name="ntcpAutoIP" value="true" <%=nethelper.getTcpAutoIPChecked(2) %> >
<%=intl._t("Use auto-detected IP address")%>
<i>(<%=intl._t("currently")%> <jsp:getProperty name="nethelper" property="udpIP" />)</i>
<%=intl._t("if we are not firewalled")%><br>
<input type="radio" class="optbox" name="ntcpAutoIP" value="always" <%=nethelper.getTcpAutoIPChecked(3) %> >
<%=intl._t("Always use auto-detected IP address (Not firewalled)")%><br>
<input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(1) %> >
<%=intl._t("Specify hostname or IP")%>:
<%=intl._t("if we are not firewalled")%></label><br>
<label><input type="radio" class="optbox" name="ntcpAutoIP" value="always" <%=nethelper.getTcpAutoIPChecked(3) %> >
<%=intl._t("Always use auto-detected IP address (Not firewalled)")%></label><br>
<label><input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(1) %> >
<%=intl._t("Specify hostname or IP")%>:</label>
<input name ="ntcphost" type="text" size="16" value="<jsp:getProperty name="nethelper" property="ntcphostname" />" ><br>
<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>
<input type="radio" class="optbox" name="ntcpAutoPort" value="2" <%=nethelper.getTcpAutoPortChecked(2) %> >
<label><input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(0) %> >
<%=intl._t("Disable inbound (Firewalled)")%></label><br>
<label><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></label>
</td>
</tr>
<tr>
<th id="externaltcp"><%=intl._t("Externally reachable TCP port")%></th>
</tr>
<tr>
<td>
<label><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">
<i>(<%=intl._t("currently")%> <jsp:getProperty name="nethelper" property="udpPort" />)</i></label><br>
<label><input type="radio" class="optbox" name="ntcpAutoPort" value="1" <%=nethelper.getTcpAutoPortChecked(1) %> >
<%=intl._t("Specify Port")%>:</label>
<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,53 @@
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"><b><%=intl._t("Router Hash")%>:</b> <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><b><%=intl._t("Speed")%>:</b>
<input type="text" size="8" name="speed" value="<%=speed%>" />
<%=intl._t("Capacity")%>:
<b><%=intl._t("Capacity")%>:</b>
<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="pconfig"><%=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>
<%=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">
<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\" target=\"_blank\">i2pwiki.i2p</a>")%>
</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%>" >
<b>URL:</b>
<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">
<b><%=intl._t("Select xpi2p or su3 file")%>:</b>
<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,106 +14,132 @@
<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>
<b><%=intl._t("Enter zip or su3 URL")%>:</b>
<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>
<b><%=intl._t("Select zip or su3 file")%>:</b>
<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">
<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>
<input type="radio" class="optbox" name="mode" value="1" <%=reseedHelper.modeChecked(1) %> >
<b><%=intl._t("Use SSL only")%></b><br>
<input type="radio" class="optbox" name="mode" value="2" <%=reseedHelper.modeChecked(2) %> >
<b><%=intl._t("Use non-SSL only")%></b></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Reseed URLs")%>:</b></td>
</td>
</tr>
<tr><td align="right"><b><%=intl._t("Reseed URL Selection")%>:</b></td>
<td><label><input type="radio" class="optbox" name="mode" value="0" <%=reseedHelper.modeChecked(0) %> >
<%=intl._t("Try SSL first then non-SSL")%></label><br>
<label><input type="radio" class="optbox" name="mode" value="1" <%=reseedHelper.modeChecked(1) %> >
<%=intl._t("Use SSL only")%></label><br>
<label><input type="radio" class="optbox" name="mode" value="2" <%=reseedHelper.modeChecked(2) %> >
<%=intl._t("Use non-SSL only")%></label></td></tr>
<tr><td 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>
<td><input type="checkbox" class="optbox" name="enable" value="true" <jsp:getProperty name="reseedHelper" property="enable" /> ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("HTTP Proxy Host")%>:</b></td>
<tr><td align="right"><label for="enableproxy"><b><%=intl._t("Enable HTTP Proxy?")%></b></label></td>
<td><input type="checkbox" class="optbox" name="enable" id="enableproxy" value="true" <jsp:getProperty name="reseedHelper" property="enable" /> ></td></tr>
<tr><td align="right"><b><%=intl._t("HTTP Proxy Host")%>:</b></td>
<td><input name="host" type="text" value="<jsp:getProperty name="reseedHelper" property="host" />" ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("HTTP Proxy Port")%>:</b></td>
<tr><td align="right"><b><%=intl._t("HTTP Proxy Port")%>:</b></td>
<td><input name="port" type="text" size="5" maxlength="5" value="<jsp:getProperty name="reseedHelper" property="port" />" ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Use HTTP Proxy Authorization?")%></b></td>
<td><input type="checkbox" class="optbox" name="auth" value="true" <jsp:getProperty name="reseedHelper" property="auth" /> ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("HTTP Proxy Username")%>:</b></td>
<tr><td align="right"><label for="useproxyauth"><b><%=intl._t("Use HTTP Proxy Authorization?")%></b></label></td>
<td><input type="checkbox" class="optbox" name="auth" id="useproxyauth" value="true" <jsp:getProperty name="reseedHelper" property="auth" /> ></td></tr>
<tr><td align="right"><b><%=intl._t("HTTP Proxy Username")%>:</b></td>
<td><input name="username" type="text" value="<jsp:getProperty name="reseedHelper" property="username" />" ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("HTTP Proxy Password")%>:</b></td>
<tr><td align="right"><b><%=intl._t("HTTP Proxy Password")%>:</b></td>
<td><input name="nofilter_password" type="password" value="<jsp:getProperty name="reseedHelper" property="nofilter_password" />" ></td></tr>
<!-- TODO Need SSLEepGet support
<tr><td class="mediumtags" align="right"><b><%=intl._t("Enable HTTPS Proxy?")%></b></td>
<tr><td align="right"><b><%=intl._t("Enable HTTPS Proxy?")%></b></td>
<td><input type="checkbox" class="optbox" name="senable" value="true" <jsp:getProperty name="reseedHelper" property="senable" /> ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("HTTPS Proxy Host")%>:</b></td>
<tr><td align="right"><b><%=intl._t("HTTPS Proxy Host")%>:</b></td>
<td><input name="shost" type="text" value="<jsp:getProperty name="reseedHelper" property="shost" />" ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("HTTPS Proxy Port")%>:</b></td>
<tr><td align="right"><b><%=intl._t("HTTPS Proxy Port")%>:</b></td>
<td><input name="sport" type="text" size="5" maxlength="5" value="<jsp:getProperty name="reseedHelper" property="sport" />" ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Use HTTPS Proxy Authorization?")%></b></td>
<tr><td align="right"><b><%=intl._t("Use HTTPS Proxy Authorization?")%></b></td>
<td><input type="checkbox" class="optbox" name="sauth" value="true" <jsp:getProperty name="reseedHelper" property="sauth" /> ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("HTTPS Proxy Username")%>:</b></td>
<tr><td align="right"><b><%=intl._t("HTTPS Proxy Username")%>:</b></td>
<td><input name="susername" type="text" value="<jsp:getProperty name="reseedHelper" property="susername" />" ></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("HTTPS Proxy Password")%>:</b></td>
<tr><td align="right"><b><%=intl._t("HTTPS Proxy Password")%>:</b></td>
<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,33 +74,33 @@ 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"><label><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>
(<%=intl._t("change requires restart to take effect")%>)</label><br>
<%
// stats.log for devs only and grows without bounds, not recommended
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 %>
@ -119,33 +120,29 @@ Warning - Log with care, stat file grows without limit.<br>
if (shouldShowLog) {
%> <td align="center">
<a name="<%=statshelper.getCurrentStatName()%>"></a>
<input type="checkbox" class="optbox <%=statshelper.getCurrentGroupName()%>" name="statList" value="<%=statshelper.getCurrentStatName()%>" <%
%> <td align="center"><a name="<%=statshelper.getCurrentStatName()%>"></a><input type="checkbox" class="optbox <%=statshelper.getCurrentGroupName()%>" name="statList" value="<%=statshelper.getCurrentStatName()%>" <%
if (statshelper.getCurrentIsLogged()) { %>checked="checked" <% } %> ></td>
<%
} // shouldShowLog
%> <td align="center">
<% 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>
<%=statshelper.getCurrentStatDescription()%></td></tr><%
%> <td align="center"><% if (statshelper.getCurrentCanBeGraphed()) { %><input type="checkbox" class="optbox <%=statshelper.getCurrentGroupName()%>" id="<%=statshelper.getCurrentStatName()%>" name="graphList" value="<%=statshelper.getCurrentGraphName()%>" <%
if (statshelper.getCurrentIsGraphed()) { %>checked="checked" <% } %> ><% } %></td> <% // no whitespace here so we can use td:empty to remove css pointer from inert labels %>
<td align="left"><label for="<%=statshelper.getCurrentStatName()%>"><b><%=statshelper.getCurrentStatName()%>:</b>&nbsp;
<%=statshelper.getCurrentStatDescription()%></label></td></tr><%
} // end iterating over all stats
if (shouldShowLog) {
%> <tr><td colspan="3"></td></tr>
<tr><td align="center"><input type="checkbox" class="optbox" name="explicitFilter" ></td>
<td colspan="2"><%=intl._t("Advanced filter")%>:
<input type="text" name="explicitFilterValue" value="<%=statshelper.getExplicitFilter()%>" size="40" ></td></tr>
<tr><td align="center"><label><input type="checkbox" class="optbox" name="explicitFilter" ></td>
<td colspan="2"><%=intl._t("Advanced filter")%>:</label>
<input type="text" name="explicitFilterValue" value="<%=statshelper.getExplicitFilter()%>" size="40" ></td></tr>
<%
} // 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,63 +21,59 @@
<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 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>
<tr><td 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>
<tr><td 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>
</tr><tr><td align="right"><b><%=intl._t("Refresh frequency")%>:</b>
<td><jsp:getProperty name="updatehelper" property="refreshFrequencySelectBox" /></td></tr>
<% if (updatehelper.canInstall()) { %>
<tr><td class="mediumtags" align="right"><b><%=formhandler._t("Update policy")%>:</b></td>
<tr><td align="right"><b><%=formhandler._t("Update policy")%>:</b></td>
<td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" /></td></tr>
<% } // if canInstall %>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Fetch news through the eepProxy?")%></b></td>
<tr><td align="right"><label for="newsThroughProxy"><b><%=intl._t("Fetch news through the eepProxy?")%></b></label></td>
<td><jsp:getProperty name="updatehelper" property="newsThroughProxy" /></td></tr>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Update through the eepProxy?")%></b></td>
<tr><td align="right"><b><label for="updateThroughProxy"><%=intl._t("Update through the eepProxy?")%></b></label></td>
<td><jsp:getProperty name="updatehelper" property="updateThroughProxy" /></td></tr>
<% if (updatehelper.isAdvanced()) { %>
<tr><td class="mediumtags" align="right"><b><%=intl._t("eepProxy host")%>:</b></td>
<tr><td align="right"><b><%=intl._t("eepProxy host")%>:</b></td>
<td><input type="text" size="10" name="proxyHost" value="<jsp:getProperty name="updatehelper" property="proxyHost" />" /></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("eepProxy port")%>:</b></td>
</tr><tr><td align="right"><b><%=intl._t("eepProxy port")%>:</b></td>
<td><input type="text" size="10" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" /></td></tr>
<% } // if isAdvanced %>
<% if (updatehelper.canInstall()) { %>
<% if (updatehelper.isAdvanced()) { %>
<tr><td class="mediumtags" align="right"><b><%=intl._t("Update URLs")%>:</b></td>
<tr><td align="right"><b><%=intl._t("Update URLs")%>:</b></td>
<td><textarea cols="60" rows="6" name="updateURL" wrap="off" spellcheck="false"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Trusted keys")%>:</b></td>
</tr><tr><td align="right"><b><%=intl._t("Trusted keys")%>:</b></td>
<td><textarea cols="60" rows="6" name="trustedKeys" wrap="off" spellcheck="false"><jsp:getProperty name="updatehelper" property="trustedKeys" /></textarea></td></tr>
<tr><td id="devSU3build" class="mediumtags" align="right"><b><%=intl._t("Update with signed development builds?")%></b></td>
<tr><td id="devSU3build" align="right"><b><label for="updateDevSU3"><%=intl._t("Update with signed development builds?")%></b></label></td>
<td><jsp:getProperty name="updatehelper" property="updateDevSU3" /></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Signed Build URL")%>:</b></td>
</tr><tr><td align="right"><b><%=intl._t("Signed Build URL")%>:</b></td>
<td><input type="text" size="60" name="devSU3URL" value="<jsp:getProperty name="updatehelper" property="devSU3URL" />"></td></tr>
<tr><td id="unsignedbuild" class="mediumtags" align="right"><b><%=intl._t("Update with unsigned development builds?")%></b></td>
<tr><td id="unsignedbuild" align="right"><b><label for="updateUnsigned"><%=intl._t("Update with unsigned development builds?")%></b></label></td>
<td><jsp:getProperty name="updatehelper" property="updateUnsigned" /></td>
</tr><tr><td class="mediumtags" align="right"><b><%=intl._t("Unsigned Build URL")%>:</b></td>
</tr><tr><td align="right"><b><%=intl._t("Unsigned Build URL")%>:</b></td>
<td><input type="text" size="60" name="zipURL" value="<jsp:getProperty name="updatehelper" property="zipURL" />"></td></tr>
<% } // if isAdvanced %>
<% } else { %>
<tr><td class="mediumtags" align="center" colspan="2"><b><%=intl._t("Updates will be dispatched via your package manager.")%></b></td></tr>
<tr><td 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 */ %>
@ -42,7 +42,7 @@
<a href="/console?lang=es&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=es" title="Español" alt="Español"></a>
<a href="/console?lang=fi&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fi" title="Suomi" alt="Suomi"></a>
<a href="/console?lang=fr&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fr" title="Français" alt="Français"></a>
<a href="/console?lang=gl&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=lang_gl" title="Galician" alt=Galician"></a>
<a href="/console?lang=gl&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=lang_gl" title="Galician" alt="Galician"></a>
<a href="/console?lang=el&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=gr" title="ελληνικά" alt="ελληνικά"></a>
<a href="/console?lang=hu&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=hu" title="Magyar" alt="Magyar"></a>
<a href="/console?lang=it&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=it" title="Italiano" alt="Italiano"></a>

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 <a href="/netdb?f=3">Sybil Analysis tool</a>, 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. [Enabled by default]</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 or simultaneous multithreading, 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>
<%=intl._t("UPnP may be enabled or disabled on the Network Configuration page, but a change requires a router restart to take effect.")%>&nbsp;
<a href="peers#upnp">[<%=intl._t("Review the UPnP status here.")%>]</a>
</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,80 @@
<h2>Abridged I2P FAQ</h2>
<p class="infohelp">This is a shortened version of the official FAQ. For the full version, please visit <a href="https://geti2p.net/faq" target="_blank">https://geti2p.net/faq</a> or <a href="http://i2p-projekt.i2p/faq" target="_blank">http://i2p-projekt.i2p/faq</a>.
<h3>My router has been up for several minutes and has zero or very few connections</h3>
<p>If after a few minutes of uptime your router is indicating 0 Active Peers and 0 Known Peers, with a notification in the sidebar that you need to check your network connection, verify that you can access the internet. If your internet connection is functional, you may need to unblock Java in your firewall. Otherwise, you may need to reseed your I2P router. Visit the <a href="/configreseed#reseedconfig">Reseed Configuration page</a> and click the <i>Save Changes and Reseed Now</i> button.</p>
<h3>My router has very few active peers, is this OK?</h3>
<p>If your router has 10 or more active peers, everything is fine. The router should maintain connections to a few peers at all times. The best way to stay "better-connected" to the network is to <a href="/config">share more bandwidth</a>.</p>
<h3 id="addressbooksubs">I'm missing lots of hosts in my addressbook. What are some good subscription links?</h3>
<p>The default subscription is to <code>http://i2p-projekt.i2p/hosts.txt</code> which is seldom updated. If you don't have another subscription, you may often have to use "jump" links which is much slower but ensures that your addressbook is only populated by sites you use (in addition to the default subscription addresses). To speed up browsing on I2P, it's a good idea to add some addressbook subscriptions.</p>
<p>Here are some other public addressbook subscription links. You may wish to add one or two to your <a href="/susidns/subscriptions">susidns subscription list</a>. In the event that addresses conflict in the subscriptions, the lists placed at the top of your susidns configuration will take precedence over those placed further down.</p>
<ul>
<li><code>http://stats.i2p/cgi-bin/newhosts.txt</code></li>
<li><code>http://no.i2p/export/alive-hosts.txt</code></li>
<li><code>http://identiguy.i2p/hosts.txt</code></li>
</ul>
<p>Note that subscribing to a hosts.txt service is an act of trust, as a malicious subscription could give you incorrect addresses, so be careful subscribing to lists from unknown sources. The operators of these services may have various policies for listing hosts. Presence on this list does not imply endorsement.</p>
<h3>How do I access IRC, BitTorrent, or other services on the regular Internet?</h3>
<p>Unless an outproxy has been set up for the service you want to connect to, this is not possible. There are only three types of outproxies running right now: HTTP, HTTPS, and email. Note that there is currently no publicly listed SOCKS outproxy. If this type of service is required, try <a href="https://torproject.org/" target="_blank">Tor</a>.</p>
<h3>How do I configure my browser to access .i2p websites?</h3>
<p>You will need to configure your browser to use the HTTP proxy server (by default on host: <code>127.0.0.1</code> port: <code>4444</code>). See the <a href="https://geti2p.net/en/about/browser-config" target="_blank">Browser Proxy Configuration Guide</a> for a more detailed explanation.</p>
<h3>What is an eepsite?</h3>
<p>An eepsite is a website that is hosted anonymously on the I2P network - you can access it by configuring your web browser to use I2P's HTTP proxy (see above) and browsing to the <code>.i2p</code> suffixed website (e.g. <a href="http://i2p-projekt.i2p" target="_blank">http://i2p-projekt.i2p</a>). Also ensure your browser is configured to resolve DNS remotely when using the proxy to avoid DNS leaks.</p>
<h3>Most of the eepsites are down?</h3>
<p>If you consider every eepsite that has ever been created, yes, most of them are down. People and eepsites come and go. A good way to get started in I2P is check out a list of eepsites that are currently up. <a href="http://identiguy.i2p" target="_blank">http://identiguy.i2p</a> tracks active eepsites.</p>
<h3>How do I connect to IRC within I2P?</h3>
<p>A tunnel to the main IRC server network within I2P, Irc2P, is created when I2P is installed (see the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>), and is automatically started when the I2P router starts. To connect to it, tell your IRC client to connect to server: <code>127.0.0.1</code> port: <code>6668</code>.</p>
<p>XChat-like client users can create a new network with the server <code>127.0.0.1/6668</code> (remember to tick <i>Bypass proxy server</i> if you have a proxy server configured), or you can connect with the command <code>/server 127.0.0.1 6668</code>. Different IRC clients may vary the syntax.</p>
<h3>What ports does I2P use?</h3>
<table id="portfaq">
<tr><th colspan="3">LOCAL PORTS</th></tr>
<tr><td colspan="3" class="infohelp">These are the local I2P port mappings, listening only to local connections by default, except where noted. Unless you require access from other machines, they should only be accessible from localhost.</td></tr>
<tr><th>Port</th><th>Function</th><th>Notes</th></tr>
<tr><td>1900</td><td>UPnP SSDP UDP multicast listener</td><td>Cannot be changed. Binds to all interfaces. Can be disabled on the <a href="/confignet">Network Configuration page</a>.</td></tr>
<tr><td>2827</td><td>BOB bridge</td><td>A higher level socket API for clients. Can be enabled/disabled on the <a href="/configclients">Client Configuration page</a>. Can be changed in the <code>bob.config</code> file. [Disabled by default]</td></tr>
<tr><td>4444</td><td>HTTP proxy</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
<tr><td>4445</td><td>HTTPS proxy</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
<tr><td>6668</td><td>IRC proxy</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
<tr><td>7652</td><td>UPnP HTTP TCP event listener</td><td>Binds to the LAN address. Can be changed with advanced config <code>i2np.upnp.HTTPPort=nnnn</code>. Can be disabled on the <a href="/confignet">Network Configuration page</a>.</td></tr>
<tr><td>7653</td><td>UPnP SSDP UDP search response listener</td><td>Binds to all interfaces. Can be changed with advanced config <code>i2np.upnp.SSDPPort=nnnn</code>. Can be disabled on the <a href="/configclients">Client Configuration page</a>.</td></tr>
<tr><td>7654</td><td>I2P Client Protocol port</td><td>Used by client apps. Can be changed to a different port on the <a href="/configclients">Client Configuration page</a> but this is not recommended. Can be bound to a different interface or all interfaces, or disabled, on the <a href="/configclients">Client Configuration page</a>.</td></tr>
<tr><td>7655</td><td>UDP for SAM bridge</td><td>A higher level socket API for clients. Only opened when a SAM V3 client requests a UDP session. Can be enabled/disabled on the <a href="/configclients"> Client Configuration page</a>. Can be changed in the <code>clients.config</code> file with the SAM command line option <code>sam.udp.port=nnnn</code>.</td></tr>
<tr><td>7656</td><td>SAM bridge</td><td>A higher level socket API for clients. Can be enabled/disabled on the <a href="/configclients">Client Configuration page</a>. Can be changed in the <code>clients.config</code> file. [Disabled by default]</td></tr>
<tr><td>7657</td><td>I2P Router Console (Web interface)</td><td>Can be disabled in the <code>clients.config</code> file. Can also be configured to bind to a specific interface or all interfaces in that file. If you make the Router Console available over the network, you might wish to <a href="/configui#passwordheading">enforce an access password</a> to prevent unauthorized access.</td></tr>
<tr><td>7658</td><td>I2P Web Server</td><td>Can be disabled in the <code>clients.config</code> file. Can also be configured to bind to a specific interface or all interfaces in the <code>jetty.xml</code> file.</td>
</tr>
<tr><td>7659</td><td>Outgoing mail to smtp.postman.i2p</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
<tr><td>7660</td><td>Incoming mail from pop.postman.i2p</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
<tr><td>8998</td><td>mtn.i2p2.i2p (I2P's Monotone DVCS)</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces. [Disabled by default]</td></tr>
<tr><td>31000</td><td>Local connection to wrapper control channel port</td><td>Outbound to 32000 only, does not listen on this port. Starts at 31000 and will increment until 31999 looking for a free port. To change, see the <a href="http://wrapper.tanukisoftware.com/doc/english/prop-port.html" target="_blank">wrapper documentation</a>.</td></tr>
<tr><td>32000</td><td>Local control channel for the service wrapper</td><td>To change, see the <a href="http://wrapper.tanukisoftware.com/doc/english/prop-port.html" target="_blank">wrapper documentation</a>.</td></tr>
<tr><th colspan="3">INTERNET FACING PORTS</th></tr>
<tr><td colspan="3" class="infohelp">I2P selects a random port between 9000 and 31000 to communicate with other routers when the program is run for the first time, or when your external IP address changes when running in <a href="/confignet#ipchange">Laptop Mode</a>. The <a href="/confignet#udpconfig">selected port</a> is shown on the <a href="/confignet">Network Configuration page</a>.</td></tr>
<tr><td colspan="3">Outbound UDP from the <a href="/confignet#udpconfig">random port</a> noted on the Network Configuration page to arbitrary remote UDP ports, allowing replies.</td></tr>
<tr><td colspan="3">Outbound TCP from random high ports to arbitrary remote TCP ports.</td></tr>
<tr><td colspan="3">Inbound UDP to the <a href="/confignet#udpconfig">port</a> noted on the Network Configuration page from arbitrary locations (optional, but recommended).</td></tr>
<tr><td colspan="3">Inbound TCP to the <a href="/confignet#externaltcp">port</a> noted on the Network Configuration page from arbitrary locations (optional, but recommended). <a href="/confignet#tcpconfig">Inbound TCP</a> may be disabled on the Network Configuration page.</td></tr>
<tr><td colspan="3">Outbound UDP on port 123, allowing replies: this is necessary for I2P's internal time sync (via SNTP - querying a random SNTP host in <code>pool.ntp.org</code> or another server you specify).</td></tr></td></tr>
</table>

View File

@ -1,38 +1,34 @@
<h2>Legal stuff</h2>
<p>The I2P router (router.jar) and SDK (i2p.jar) are almost entirely public domain, with
a few notable exceptions:</p>
<p>The I2P router (router.jar) and SDK (i2p.jar) are almost entirely public domain, with a few notable exceptions:</p>
<ul>
<li class="tidylist">ElGamal and DSA code, under the BSD license, written by TheCrypto</li>
<li class="tidylist">SHA256 and HMAC-SHA256, under the MIT license, written by the Legion of the Bouncycastle</li>
<li class="tidylist">AES code, under the Cryptix (MIT) license, written by the Cryptix team</li>
<li class="tidylist">SNTP code, under the BSD license, written by Adam Buckley</li>
<li class="tidylist">The rest is outright public domain, written by jrandom, mihi, hypercubus, oOo,
ugha, duck, shendaras, and others.</li>
<li class="tidylist">SHA256 and HMAC-SHA256, under the MIT license, written by the <a href="https://www.bouncycastle.org/" target="_blank">Legion of the Bouncycastle</a></li>
<li class="tidylist">AES code, under the Cryptix (MIT) license, written by the <a href="http://www.cryptix.org/" target="_blank">Cryptix team</a></li>
<li class="tidylist"><a href="http://support.ntp.org/bin/view/Support/JavaSntpClient" target="_blank">SNTP code</a>, under the BSD license, written by Adam Buckley</li>
<li class="tidylist">The rest is outright public domain, written by jrandom, mihi, hypercubus, oOo, ugha, duck, shendaras, and others.</li>
</ul>
<p>On top of the I2P router are a series of client applications, each with their own set of
licenses and dependencies. This webpage is being served as part of the I2P routerconsole
client application, which is built off a trimmed down <a href="http://jetty.mortbay.com/jetty/index.html">Jetty</a>
instance (trimmed down, as in, we do not include the demo apps or other add-ons, and we simplify configuration),
allowing you to deploy standard JSP/Servlet web applications into your router. Jetty in turn makes use of
Apache's javax.servlet (javax.servlet.jar) implementation.
This product includes software developed by the Apache Software Foundation
(http://www.apache.org/).</p>
<p>On top of the I2P router are a series of client applications, each with their own set of licenses and dependencies:
<p>Another application you can see on this webpage is <a href="http://i2p-projekt.i2p/i2ptunnel">I2PTunnel</a>
(your <a href="i2ptunnel/" target="_blank">web interface</a>) - a GPL'ed application written by mihi that
lets you tunnel normal TCP/IP traffic over I2P (such as the eepproxy and the irc proxy). There is also a
<a href="http://susi.i2p/">susimail</a> web based mail client <a href="susimail/susimail">available</a> on
the console, which is a GPL'ed application written by susi23. The addressbook application, written by
<a href="http://ragnarok.i2p/">Ragnarok</a> helps maintain your hosts.txt files (see ./addressbook/ for
more information).</p>
<ul>
<li class="tidylist"><a href="http://i2p-projekt.i2p/i2ptunnel" target="_blank">I2PTunnel</a> - a GPL'ed application written by mihi
that lets you tunnel normal TCP/IP traffic over I2P (such as the http proxy and the irc proxy), with a <a href="/i2ptunnelmgr">browser-based front end.</a></li>
<li class="tidylist"><a href="/webmail">Susimail</a>, a GPL'ed browser based mail client written by susi23.</li>
<li class="tidylist">The <a href="http://i2p-projekt.i2p/en/docs/naming#addressbook" target="_blank">addressbook application</a>,
written by Ragnarok helps maintain your hosts.txt files, with a <a href="/dns">front end</a> written by susi23.</li>
<li class="tidylist">The <a href="http://i2p-projekt.i2p/en/docs/api/samv3" target="_blank">SAM</a> bridge by human (public domain), an API
which other client applications (such the <a href="http://i2pwiki.i2p/index.php?title=Tahoe-LAFS" target="_blank">I2P Tahoe-LAFS cloud filesystem</a>) can use to interface with I2P.</li>
<li class="tidylist"><a href="http://i2p-projekt.i2p/en/misc/jbigi" target="_blank">jbigi</a> - an optimized library for doing large number calculations which uses the
LGPL licensed <a href="http://swox.com/gmp/" target="_blank">GMP</a> library, tuned for various PC architectures.</li>
<li class="tidylist">Launchers for windows users are built with <a href="http://launch4j.sourceforge.net/" target="_blank">Launch4J</a>,
and the installer is built with <a href="http://www.izforge.com/izpack/" target="_blank">IzPack</a>.</li>
<li class="tidylist">The <a href="/">I2P Router Console</a>, built from a streamlined <a href="http://jetty.mortbay.com/jetty/index.html" target="_blank">Jetty Web Server</a> instance
which allows you to deploy standard JSP/Servlet web applications in your router.</li>
<li class="tidylist">Jetty makes use of Apache's <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/package-summary.html" target="_blank">javax.servlet</a>
(javax.servlet.jar) implementation. This product includes software developed by the <a href="http://www.apache.org/" target="_blank">Apache Software Foundation</a>.</li>
<li class="tidylist">Source for the I2P code and most bundled client applications can be found on our <a href="http://i2p-projekt.i2p/download" target="_blank">download page</a>.</li>
</ul>
<p>The router by default also includes human's public domain <a href="http://i2p-projekt.i2p/sam">SAM</a> bridge,
which other client applications (such the <a href="http://duck.i2p/i2p-bt/">bittorrent port</a>) can use.
There is also an optimized library for doing large number calculations - jbigi - which in turn uses the
LGPL licensed <a href="http://swox.com/gmp/">GMP</a> library, tuned for various PC architectures. Launchers for windows users
are built with <a href="http://launch4j.sourceforge.net/">Launch4J</a>, and the installer is built with
<a href="http://www.izforge.com/izpack/">IzPack</a>. For
details on other applications available, as well as their licenses, please see the
<a href="http://i2p-projekt.i2p/licenses">license policy</a>. Source for the I2P code and most bundled
client applications can be found on our <a href="http://i2p-projekt.i2p/download">download page</a>.</p>
<p>For details on other applications available, as well as their licenses, please see the <a href="http://i2p-projekt.i2p/licenses" target="_blank">
license policy</a>. Additional licenses can be found in the <code>licenses</code> sub-directory of your I2P installation.</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.</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,9 @@
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>
<h2>Further Assistance</h2>
<p>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" target="_blank">volunteers.</a></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://i2p-projekt.i2p/en/faq" target="_blank">FAQ on i2p-projekt.i2p</a></li>
<li class="tidylist"><a href="http://i2pwiki.i2p/" target="_blank">I2PWiki</a></li>
<li class="tidylist"><a href="http://forum.i2p/" target="_blank">I2P forum</a></li></ul>
<p>You may also try <a href="http://zzz.i2p" target="_blank">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,26 @@
</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">
<%@include file="help.jsi" %>
<%@include file="help-legal.jsi" %>
<%@include file="help-sidebar.jsi" %>
<div class="confignav">
<span class="tab"><a href="#sidebarhelp">Sidebar</a></span>
<span class="tab"><a href="#configurationhelp">Configuration</a></span>
<span class="tab"><a href="#reachabilityhelp">Reachability</a></span>
<span class="tab"><a href="#advancedsettings">Advanced Settings</a></span>
<span class="tab"><a href="#faq">FAQ</a></span>
<span class="tab"><a href="#legal">Legal</a></span>
<span class="tab"><a href="#changelog">Change Log</a></span>
</div>
<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="faq"><%@include file="help-faq.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 +41,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,16 +14,30 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1>I2P مساعدة لوحة التحكم</h1>
<div class="main" id="main" dir="rtl" lang="ar"><p>
اذا رغبت في المساعدة أو ترجمة الوثائق، أو المساعدة في أشياء أخرى، انظر اسفله
<a href="http://i2p-projekt.i2p/ar/get-involved">تطوع</a>
</p>المزيد من المساعدة هنا:
<div class="main" id="help" dir="rtl" lang="ar">
<div class="confignav">
<span class="tab"><a href="#sidebarhelp">Sidebar</a></span>
<span class="tab"><a href="#configurationhelp">Configuration</a></span>
<span class="tab"><a href="#reachabilityhelp">Reachability</a></span>
<span class="tab"><a href="#advancedsettings">Advanced Settings</a></span>
<span class="tab"><a href="#faq">FAQ</a></span>
<span class="tab"><a href="#legal">Legal</a></span>
<span class="tab"><a href="#changelog">Change Log</a></span>
</div>
<div id="volunteer">
<h2>مساعدة إضافية</h2>
<p>اذا رغبت في المساعدة أو ترجمة الوثائق، أو المساعدة في أشياء أخرى، انظر اسفله <a href="http://i2p-projekt.i2p/ar/get-involved">تطوع</a></p>
<p>المزيد من المساعدة هنا:</p>
<ul class="links">
<li class="tidylist"><a href="http://i2p-projekt.i2p/ar/faq">ابئلة شائعة i2p-projekt.i2p</a>
<br>يمكن ايضا<a href="http://forum.i2p/">I2P منتدى</a>
او بالدردشة على IRC.</li></ul>
<li class="tidylist"><a href="http://i2p-projekt.i2p/ar/faq">ابئلة شائعة i2p-projekt.i2p</a></li>
<li>يمكن ايضا<a href="http://forum.i2p/">I2P منتدى</a></li>
<li>او بالدردشة على IRC.</li></ul>
</div>
<div id="sidebarhelp">
<h2>شريط المعلومات</h2><p>
يمكن للاحصائات أن
<a href="configstats.jsp">تتغير</a> لكي تظهر على شكل
@ -66,20 +80,19 @@ The full hash is shown on your <a href="netdb.jsp?r=.">صفحة معلومات
هذا العدد ليس حجم الاجمالي للشبكة،
يمكنه ان بتغيير حسب سرعة الاتصال.
</li>
</ul><h3>سرعة الاتصال الداخلي/خارجي</h3><div align="justify">
السرعة ب بايت في الثانية
</ul>
<h3>سرعة الاتصال الداخلي/خارجي</h3>
<p>السرعة ب بايت في الثانية
غير السرعة في <a href="confignet#help">صفحة الاعدادات</a>.
السرعة <a href="graphs.jsp">مرسومة</a> </div>
<h3>الوجهات الداخلية</h3><div align="justify">
الاتصالات الداخلية
البرامج المحلية المتصلة عبر الموجه
<a href="i2ptunnel/index.jsp">I2PTunnel</a>
او برامج خارجية متصلة SAM, BOB, او مباشرة بـ I2CP.
</div><h3>الأنفاق الداخلة/خارجة</h3><div align="justify">
الأنفاق الحالية موجودة في <a href="tunnels.jsp">صفحة الأنفاق</a>.</div><ul>
<li class="tidylist"><div align="justify"><b>تصفح</b>
السرعة <a href="graphs.jsp">مرسومة</a> </p>
<h3>الوجهات الداخلية</h3>
<p>الاتصالات الداخلية البرامج المحلية المتصلة عبر الموجه <a href="i2ptunnel/index.jsp">I2PTunnel</a></p>
<p>او برامج خارجية متصلة SAM, BOB, او مباشرة بـ I2CP.</p>
<h3>الأنفاق الداخلة/خارجة</h3>
<p>الأنفاق الحالية موجودة في <a href="tunnels.jsp">صفحة الأنفاق</a>.</p><ul>
<li class="tidylist"><b>تصفح</b>
الأنفاق المستخدمة من طرف الموجه تستعمل في الاتصال مع النظائر، انشاء انفاق جديدة.
</div></li>
</li>
<li class="tidylist"><b>المستخدمين</b>
الأنفاق المستخدمة من طرف الموجه </li>
<li class="tidylist"><b>المشاركة</b>
@ -93,8 +106,9 @@ the <a href="configadvanced.jsp">صفحة الاعدادات المتقدمة</a
عدد أكبر من 1.00 يعني انك تساهم في الشبكة بعدد اكبر مما تستهلك.</li>
</ul>
<h3>ازدحام</h3><div align="justify">
بعض مشرات ازدحام الموجه</div><ul>
<h3>ازدحام</h3>
<p>بعض مشرات ازدحام الموجه</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,
@ -131,15 +145,22 @@ Your router may accept all requests, accept or reject a percentage of requests,
or reject all requests for a number of reasons, to control
the bandwidth and CPU demands and maintain capacity for
local clients.</li></ul>
</div>
<% /* untranslated */ %>
<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> <% /* untranslated */ %>
<div id="faq"><%@include file="help-faq.jsi" %></div> <% /* untranslated */ %>
<div id="legal">
<h2>Legal stuff</h2><p>The I2P router (router.jar) and SDK (i2p.jar) are almost entirely public domain, with
a few notable exceptions:</p><ul>
<li class="tidylist">ElGamal and DSA code, under the BSD license, written by TheCrypto</li>
<li class="tidylist">SHA256 and HMAC-SHA256, under the MIT license, written by the Legion of the Bouncycastle</li>
<li class="tidylist">AES code, under the Cryptix (MIT) license, written by the Cryptix team</li>
<li class="tidylist">SNTP code, under the BSD license, written by Adam Buckley</li>
<li class="tidylist">The rest is outright public domain, written by jrandom, mihi, hypercubus, oOo,
ugha, duck, shendaras, and others.</li>
<li class="tidylist">The rest is outright public domain, written by jrandom, mihi, hypercubus, oOo, ugha, duck, shendaras, and others.</li>
</ul>
<p>On top of the I2P router are a series of client applications, each with their own set of
@ -169,7 +190,9 @@ details on other applications available, as well as their licenses, please see t
<a href="http://i2p-projekt.i2p/ar/get-involved/develop/licenses">license policy</a>. Source for the I2P code and most bundled
client applications can be found on our <a href="http://i2p-projekt.i2p/ar/download">download page</a>.
.</p>
</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"); %>
@ -178,5 +201,7 @@ client applications can be found on our <a href="http://i2p-projekt.i2p/ar/downl
<jsp:setProperty name="contenthelper" property="startAtBeginning" value="true" />
<jsp:getProperty name="contenthelper" property="textContent" />
<p><a href="/history.txt">View the full change log</a>
</p><hr></div></body></html>
<p id="fullhistory"><a href="/history.txt">View the full change log</a></p>
</div>
</div></body></html>

View File

@ -15,16 +15,31 @@
<%@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>
Si vous souhaitez améliorer ou traduire la documentation ou d'autres versants du projet, merci de vous reporter à
<div class="main" id="help">
<div class="confignav">
<span class="tab"><a href="#sidebarhelp">Barre latérale</a></span>
<span class="tab"><a href="#configurationhelp">Configuration</a></span>
<span class="tab"><a href="#reachabilityhelp">Joignabilité</a></span>
<span class="tab"><a href="#advancedsettings">Réglages avancés</a></span>
<span class="tab"><a href="#faq">FAQ</a></span>
<span class="tab"><a href="#legal">Légal</a></span>
<span class="tab"><a href="#changelog">Historique</a></span>
</div>
<div id="volunteer">
<h2>Assistance Supplémentaire</h2>
<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:
<ul class="links">
<li class="tidylist"><a href="http://i2p-projekt.i2p/en/faq">FAQ en anglais sur i2p-projekt.i2p</a></li>
<li class="tidylist"><a href="http://i2p-projekt.i2p/fr/faq">les FAQ en français</a>.</li></ul>
<br>Il y a aussi le <a href="http://forum.i2p/">forum I2P</a>
et l'IRC.
<li class="tidylist"><a href="http://i2p-projekt.i2p/fr/faq">les FAQ en français</a>.</li>
<li>Il y a aussi le <a href="http://forum.i2p/">forum I2P</a> et l'IRC.</li>
</ul><br>
</div>
<div id="sidebarhelp">
<h2>Informations du panneau de surveillance</h2><p>
Plusieurs des statistiques affichées dans le panneau de surveillance peuvent être
<a href="configstats.jsp">configurées</a> pour être affichées sous forme de <a href="graphs.jsp">graphiques</a> pour
@ -64,19 +79,20 @@ diffusion ("floodfill"). Vos pairs "bien intégrés" sont affichés en bas de la
page <a href="netdb.jsp">base de données du réseau</a>. De moins de 100 à 1000 ou plus. Ce nombre ne représente pas la
taille totale du réseau; il varie en fonction de votre bande passante totale et son rapport de partage, et du trafic
local. I2P n'a pas besoin que chaque routeur connaisse tous les autres.
</li></ul><h3>Bande passante entrée/sortie</h3><div align="justify">
Ça parle tout seul. Toutes les valeurs sont en octets par seconde (o/s), pas en bits par seconde (b/s). Modifiez vos
</li></ul><h3>Bande passante entrée/sortie</h3>
<p>Ça parle tout seul. Toutes les valeurs sont en octets par seconde (o/s), pas en bits par seconde (b/s). Modifiez vos
limites de bande passante sur la page de <a href="confignet#help">configuration</a>.
Le <a href="graphs.jsp">graphique de bande passante</a> est activé par défaut.</div>
Le <a href="graphs.jsp">graphique de bande passante</a> est activé par défaut.</p>
<h3>Destinations locales</h3><div align="justify">
C'est le nom I2P des applications qui se connectent par votre routeur. Elles peuvent être des clients lancés depuis
<h3>Destinations locales</h3>
<p>C'est le nom I2P des applications qui se connectent par votre routeur. Elles peuvent être des clients lancés depuis
<a href="i2ptunnel/index.jsp">I2PTunnel</a> ou des programmes tiers qui se connectent via SAM, BOB ou directement à
I2CP.
</div><h3>TUNNELS:</h3><div align="justify">
Les tunnels actuels sont affichés sur la page <a href="tunnels.jsp">tunnels</a>.</div><ul>
<li class="tidylist"><div align="justify"><b>Exploratoires:</b> tunnels créés par votre routeur et utilisés avec les
pairs diffuseurs pour la création des nouveaux tunnels et le test des tunnels existants.</div></li>
I2CP.</p>
<h3>TUNNELS:</h3>
<p>Les tunnels actuels sont affichés sur la page <a href="tunnels.jsp">tunnels</a>.</p>
<ul>
<li class="tidylist"><b>Exploratoires:</b> tunnels créés par votre routeur et utilisés avec les
pairs diffuseurs pour la création des nouveaux tunnels et le test des tunnels existants.</li>
<li class="tidylist"><b>Clients:</b> tunnels créés par votre routeur pour chaque utilisation cliente.</li>
<li class="tidylist"><b>Participants:</b> les tunnels créés par d'autres routeurs et qui passent par le votre. Leur
nombre dépend largement de la demande du réseau, de votre part de bande passante partagée, et du trafic local.
@ -87,10 +103,12 @@ La méthode recommandée pour limiter leur nombre est de diminuer le rapport de
<li class="tidylist"><b>Rapport de partage:</b> le nombre de tunnels participants que vous routez pour les autres,
divisé par le nombre total de sauts dans tous vos tunnels exploratoires et clients. S'il est supérieur à 1, cela
signifie que vous contribuez à plus de tunnels que vous n'en utilisez.
</li></ul>
</li>
</ul>
<h3>ENCOMBREMENT</h3><div align="justify">
Indications de base sur la charge du routeur:</div><ul>
<h3>ENCOMBREMENT</h3>
<p>Indications de base sur la charge du routeur:</p>
<ul>
<li class="tidylist"><b>Retard de tâches:</b> temps d'attente des tâches avant exécution. La file d'attente est
présentée la pages des <a href="jobs.jsp">tâches</a>. Malheureusement, il y a dans le routeur plusieurs autres files
d'attentes qui ne peuvent être affichées dans la console. Le retard de tâches devrait rester à zéro en permamence. s'il
@ -112,7 +130,14 @@ limite de bande passante partagée.</li>
des demandes de création de tunnels participants provenant d'autres routeurs. Votre routeur peut accepter ou refuser
tout ou partie des requêtes, ou les refuser en totalité pour des raisons prévues telles que le contrôle de la bande
passante et des ressources CPU en vue de préserver les performances des clients locaux.</li></ul>
</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> <% /* untranslated */ %>
<div id="faq"><%@include file="help-faq.jsi" %></div> <% /* untranslated */ %>
<div id="legal">
<h2>Informations légales</h2><p>Le routeur I2P (router.jar) et le SDK (i2p.jar) sont presque entièrement dans le
domaine public, à quelques notobles exceptions près:</p><ul>
<li class="tidylist">Le code ElGamal et DSA, sous licence BSD, écrits par TheCrypto</li>
@ -148,7 +173,9 @@ leurs licences respectives, référez-vous à notre <a href="http://i2p-projekt.
Les sources du code I2P et de la plupart des applications jointes est sur notre page de
<a href="http://i2p-projekt.i2p/fr/download">téléchargements</a>.
.</p>
</div>
<div id="changelog">
<h2>Historique des évolutions</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"); %>
@ -157,5 +184,7 @@ Les sources du code I2P et de la plupart des applications jointes est sur notre
<jsp:setProperty name="contenthelper" property="startAtBeginning" value="true" />
<jsp:getProperty name="contenthelper" property="textContent" />
<p><a href="/history.txt">Historique complet</a>
</p><hr></div></body></html>
<p id="fullhistory"><a href="/history.txt" target="_blank">Historique complet</a>
</p>
</div>
</div></body></html>

View File

@ -14,17 +14,31 @@
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<h1>I2P Router Help &amp; Support</h1>
<div class="main" id="main"><p>
Als je wilt helpen om de documentatie te verbeteren of vertalen, of wilt helpen
<div class="main" id="help">
<div class="confignav">
<span class="tab"><a href="#sidebarhelp">Summary Bar</a></span>
<span class="tab"><a href="#configurationhelp">Configuratie</a></span>
<span class="tab"><a href="#reachabilityhelp">Bereikbaarheid</a></span>
<span class="tab"><a href="#advancedsettings">Geavanceerde Instellingen</a></span>
<span class="tab"><a href="#faq">FAQ</a></span>
<span class="tab"><a href="#legal">Juridische</a></span>
<span class="tab"><a href="#changelog">Geschiedenis</a></span>
</div>
<div id="volunteer">
<h2>Verdere Assistentie</h2>
<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>
</p>Verdere ondersteuning is hier beschikbaar:
</p><p>Verdere ondersteuning is hier beschikbaar:</p>
<ul class="links">
<li class="tidylist"><a href="http://i2p-projekt.i2p/nl/faq">FAQ op i2p-projekt.i2p</a></li>
</ul>
<br>Je kunt ook het <a href="http://forum.i2p/">I2P forum</a>
of IRC proberen.
<li class="tidylist">Je kunt ook het <a href="http://forum.i2p/">I2P forum</a> of IRC proberen.</li>
</ul><br>
</div>
<div id="sidebarhelp">
<h2>Informatie over de Summary Bar</h2><p>
Veel van de statistieken op de summary bar kunnen
<a href="configstats.jsp">geconfigureerd</a> worden om te worden
@ -79,16 +93,17 @@ gedeelde bandbreedte en lokaal gegenereerd verkeer.
Voor I2P is het niet nodig dat een router alle andere routers kent.
</li></ul>
<h3>Bandbreedte in/out</h3><div align="justify">
Dit zou zichzelf moeten verklaren. Alle waarden zijn in bytes per seconde, niet in bits per seconde.
<h3>Bandbreedte in/out</h3>
<p>Dit zou zichzelf moeten verklaren. Alle waarden zijn in bytes per seconde, niet in bits per seconde.
Wijzig je bandbreedte limieten op de <a href="confignet#help">configuratie pagina</a>.
Bandbreedte wordt standaard <a href="graphs.jsp">geplot</a>.</div>
Bandbreedte wordt standaard <a href="graphs.jsp">geplot</a>.</p>
<h3>Tunnels</h3><div align="justify">
De tunnels zelf worden getoond op de <a href="tunnels.jsp">tunnels pagina</a>.</div><ul>
<li class="tidylist"><div align="justify"><b>Onderzoekend:</b>
<h3>Tunnels</h3>
<p>De tunnels zelf worden getoond op de <a href="tunnels.jsp">tunnels pagina</a>.</p>
<ul>
<li class="tidylist"><b>Onderzoekend:</b>
Tunnels gebouwd door je router en gebruikt om te communiceren met de floodfill peers,
voor het bouwen van nieuwe tunnels en testen van bestaande tunnels.</div></li>
voor het bouwen van nieuwe tunnels en testen van bestaande tunnels.</li>
<li class="tidylist"><b>Client:</b>
Tunnels gebouwd door je router voor het gebruik door elke client.</li>
<li class="tidylist"><b>Deelnemend:</b>
@ -102,10 +117,12 @@ de <a href="configadvanced.jsp">geavanceerde configuratie pagina</a>. <a href="c
<li class="tidylist"><b>Share rato:</b>
Het aantal deelnemende tunnels dat je voor andere routeert, gedeeld door het totale aantal hops in al je onderzoekende en client tunnels.
Een aantal groter dan 1.00 betekent dat je meer tunnels aan het netwerk bijdraagt dan je gebruikt.
</li></ul>
</li>
</ul>
<h3>Verstopping</h3><div align="justify">
Een aantal basis indicatoren voor een router overbelasting:</div><ul>
<h3>Verstopping</h3>
<p>Een aantal basis indicatoren voor een router overbelasting:</p>
<ul>
<li class="tidylist"><b>Taak vertraging:</b>
Hoe lang taken moeten wachten voordat ze uitgevoerd worden. De taak wachtrij wordt getoond op de <a href="jobs.jsp">taken pagina</a>.
Helaas zijn er ook verschillende andere taak wachtrijen in de router die verstopt kunnen raken,
@ -141,19 +158,26 @@ Je router kan alle aanvragen accepteren, een percentage accepteren of weigeren,
of alle aanvragen weigeren om verschillende redenen, om de bandbreedte en CPU
gebruik te beheren en capaciteit te houden voor lokale clients.</li></ul>
<h3>Lokale bestemmingen</h3><div align="justify">
De lokale applicaties die door je router verbinden.
<h3>Lokale bestemmingen</h3>
<p>De lokale applicaties die door je router verbinden.
Dit kunnen clients zijn die gestart zijn door <a href="i2ptunnel/index.jsp">I2PTunnel</a>
of externe programma's die verbinden via SAM, BOB of direct met I2CP.
of externe programma's die verbinden via SAM, BOB of direct met I2CP.</p>
</div>
<h2>Juridische zaken</h2><p>De I2P router (router.jar) en SDK (i2p.jar) zijn bijna geheel in het publieke domein, met een aantal noemenswaardige uitzonderingen:</p><ul>
<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> <% /* untranslated */ %>
<div id="faq"><%@include file="help-faq.jsi" %></div> <% /* untranslated */ %>
<div id="legal">
<h2>Juridische zaken</h2>
<p>De I2P router (router.jar) en SDK (i2p.jar) zijn bijna geheel in het publieke domein, met een aantal noemenswaardige uitzonderingen:</p>
<ul>
<li class="tidylist">ElGamal en DSA code, valt onder de BSD licentie, geschreven door TheCrypto</li>
<li class="tidylist">SHA256 en HMAC-SHA256, valt onder de MIT licentie, geschreven door the Legion of the Bouncycastle</li>
<li class="tidylist">AES code, valt onder de MIT licentie, geschreven door het Cryptix team</li>
<li class="tidylist">SNTP code, valt onder de BSD licentie, geschreven door Adam Buckley</li>
<li class="tidylist">De rest is helemaal public domain, geschreven door jrandom, mihi, hypercubus, oOo,
ugha, duck, shendaras, en anderen.</li>
<li class="tidylist">De rest is helemaal public domain, geschreven door jrandom, mihi, hypercubus, oOo, ugha, duck, shendaras, en anderen.</li>
</ul>
<p>Bovenop de I2P router zijn een aantal client applicaties gemaakt, elk met
@ -187,10 +211,12 @@ architecturen. Opstarters voor windows gebruikers zijn gemaakt met <a
href="http://launch4j.sourceforge.net/">Launch4J</a>, en de installer is
gemaakt met <a href="http://www.izforge.com/izpack/">IzPack</a>. Voor details
over andere beschikbare applicaties, en hun licenties, zie het <a
href="http://i2p-projekt.i2p/nl/get-involved/develop/licenses">licentie beleid</a>. Broncode voor I2P en
href="http://i2p-projekt.i2p/nl/get-involved/develop/licenses">licentie beleid</a>. Broncode voor I2P en
de meeste gebundelde client applicaties kan gevonden worden op onze <a
href="http://i2p-projekt.i2p/nl/download">download pagina</a>.</p>
</div>
<div id="changelog">
<h2>Release geschiedenis</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"); %>
@ -199,6 +225,6 @@ href="http://i2p-projekt.i2p/nl/download">download pagina</a>.</p>
<jsp:setProperty name="contenthelper" property="startAtBeginning" value="true" />
<jsp:getProperty name="contenthelper" property="textContent" />
<p>Een completere lijst met wijzigingen is te vinden
in het history.txt bestand in je i2p directory.
</p><hr></div></body></html>
<p id="fullhistory"><a href="/history.txt" target="_blank">Completere lijst met wijzigingen</a></p>
</div>
</div></body></html>

View File

@ -16,15 +16,31 @@
<h1>Справка маршрутизатора I2P</h1>
<div class="main" id="main">
<div class="main" id="help">
<div class="confignav">
<span class="tab"><a href="#sidebarhelp">Боковая панель</a></span>
<span class="tab"><a href="#configurationhelp">Конфигурация</a></span>
<span class="tab"><a href="#reachabilityhelp">Достижимость</a></span>
<span class="tab"><a href="#advancedsettings">Расширенная конфигурация</a></span>
<span class="tab"><a href="#faq">Вопросы-Ответы</a></span>
<span class="tab"><a href="#legal">Юридический</a></span>
<span class="tab"><a href="#changelog">История компании</a></span>
</div>
<div id="volunteer">
<h2>дальнейшая помощь</h2>
<p> Если Вы хотите помочь в улучшении или переводе документации, если у Вас есть идеи, как еще помочь проекту, пожалуйста, загляните в раздел документации
<a href="http://i2p-projekt.i2p/ru/get-involved">как стать участником</a>. </p>
<p>Дальнейшие инструкции доступны в <a href="http://i2p-projekt.i2p/ru/faq">FAQ на i2p-projekt.i2p</a>
<p>Дальнейшие инструкции доступны в <a href="http://i2p-projekt.i2p/ru/faq">FAQ на i2p-projekt.i2p</a></p>
<br>Также, имеет смысл зайти на <a href="http://forum.i2p/">форум I2P</a> и IRC-каналы проекта.</p>
<p>Также, имеет смысл зайти на <a href="http://forum.i2p/">форум I2P</a> и IRC-каналы проекта.</p>
</div>
<div id="sidebarhelp">
<h2>Описание статусной панели</h2>
<p>
@ -78,25 +94,21 @@
<h3>Трафик (входящий/исходящий)</h3>
<div align="justify">
Все значения показаны в байтах/секунду. Настроить ограничения трафика можно на странице <a href="config.jsp">сетевых настроек</a>.
Для трафика по умолчанию включено <a href="graphs.jsp">построение графиков</a>.</div>
<p>Все значения показаны в байтах/секунду. Настроить ограничения трафика можно на странице <a href="config.jsp">сетевых настроек</a>.
Для трафика по умолчанию включено <a href="graphs.jsp">построение графиков</a>.</p>
<h3>Локальные туннели</h3>
<div align="justify">
Локальные приложения, выходящие в I2P сеть через Ваш маршрутизатор. Это могут быть клиенты, запущенные через <a href="i2ptunnel/index.jsp">менеджер туннелей</a>, внешние программы, подключающиеся через интерфейсы SAM, BOB или напрямую через I2CP.
</div>
<p>Локальные приложения, выходящие в I2P сеть через Ваш маршрутизатор. Это могут быть клиенты, запущенные через <a href="i2ptunnel/index.jsp">менеджер туннелей</a>, внешние программы, подключающиеся через интерфейсы SAM, BOB или напрямую через I2CP.</p>
<h3>Туннели (входящие/исходящие)</h3>
<div align="justify">
Список туннелей можно посмотреть на странице <a href="tunnels.jsp">обзор туннелей</a>.</div>
<p>Список туннелей можно посмотреть на странице <a href="tunnels.jsp">обзор туннелей</a>.</p>
<ul>
<li class="tidylist"><div align="justify"><b>Зондирующие:</b>
Туннели, созданные Вашим маршрутизатором для связи с floodfill-пирами, тестирования уже существующих туннелей и построения новых.</div>
<li class="tidylist"><b>Зондирующие:</b>
Туннели, созданные Вашим маршрутизатором для связи с floodfill-пирами, тестирования уже существующих туннелей и построения новых.
</li>
<li class="tidylist"><b>Клиентские:</b>
Туннели, созданные Вашим маршрутизатором для каждого локального клиента.
@ -115,7 +127,7 @@
<h3>Занятость</h3>
<div align="justify">Некоторые базовые индикаторы перегруженности маршрутизатора:</div>
<p>Некоторые базовые индикаторы перегруженности маршрутизатора:</p>
<ul>
<li class="tidylist"><b>Задержка заданий:</b>
@ -145,7 +157,14 @@
Состояние Вашего маршрутизатора по приему или отклонению запросов от других маршрутизаторов о построении туннелей. Ваш маршрутизатор может принимать все запросы, принимать/отклонять часть запросов или отклонять все запросы, в зависимости от сетевой загрузки, нагрузки на процессор и необходимости резервировать полосу пропускания для локальных клиентов.
</li>
</ul>
</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> <% /* untranslated */ %>
<div id="faq"><%@include file="help-faq.jsi" %></div> <% /* untranslated */ %>
<div id="legal">
<h2>Лицензии</h2>
<p>Код I2P-маршрутизатора (router.jar) и его SDK (i2p.jar) находятся в общественном достоянии с некоторыми исключениями:</p>
@ -164,8 +183,9 @@
<p>Ещё одно приложение на этой странице — <a href="http://i2p-projekt.i2p/ru/docs/api/i2ptunnel">I2PTunnel</a> (а тут <a href="i2ptunnel/" target="_blank">его вебинтерфейс</a>). Автор mihi, лицензия GPL. I2PTunnel занимается туннелированнием обычного TCP/IP трафика через I2P (может применяться для eepproxy и irc-прокси). <a href="http://susi.i2p/">susimail</a> — почтовый клиент с <a href="susimail/susimail">вебинтерфейсом</a>, автор susi23, лицензия GPL. Адресная книга помогает управлять содержимым Ваших hosts.txt файлов (подробнее см. ./addressbook/), автор <a href="http://ragnarok.i2p/">Ragnarok</a>.</p>
<p>В поставку маршрутизатора включен <a href="http://i2p-projekt.i2p/ru/docs/api/sam">SAM</a> интерфейс, автор human, приложение в общественном достоянии. SAM предназначен для использования приложениями-клиентами, такими как <a href="http://duck.i2p/i2p-bt/">bittorrent-клиенты</a>. Маршрутизатором используется оптимизированная под разные PC-архитектуры библиотека для вычислений с большими числами jbigi, которая в свою очередь использует библиотеку <a href="http://swox.com/gmp/">GMP</a> (LGPL лицензия). Вспомогательные приложения для Windows созданы с использованием <a href="http://launch4j.sourceforge.net/">Launch4J</a>, а инсталлятор собран при помощи <a href="http://www.izforge.com/izpack/">IzPack</a>. Подробнее о других доступных приложениях и их лицензиях смотрите на странице <a href="http://i2p-projekt.i2p/ru/get-involved/develop/licenses">I2P Software Licenses</a>. Исходный код I2P маршрутизатора и идущих в комплекте приложений можно найти на нашей <a href="http://i2p-projekt.i2p/ru/download">странице загрузки</a>. </p>
</div>
<div id="changelog">
<h2>История версий</h2>
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="contenthelper" scope="request" />
@ -175,5 +195,7 @@
<jsp:setProperty name="contenthelper" property="startAtBeginning" value="true" />
<jsp:getProperty name="contenthelper" property="textContent" />
<p>Более подробный список изменений можно найти в файле history.txt, который находится в директории установки I2P.
</p><hr></div></body></html>
<p id="fullhistory"><a href="/history" target="_blank">Просмотр полной версии</a>
</p>
</div>
</div></body></html>

View File

@ -53,11 +53,11 @@
} // 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()) { %>
<div class="welcome" title="<%=intl._t("Click a flag to select a language. Click 'configure language' below to change it later.")%>">
<div class="welcome" title="<%=intl._t("Click a flag to select a language. Click 'Configure UI' below to change it later.")%>">
<div class="langbox" id="langbox">
<a href="/home?lang=en&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=us" title="English" alt="English"></a>
<a href="/home?lang=ar&amp;consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=lang_ar" title="عربية" alt="عربية"></a>
@ -94,16 +94,16 @@
</div>
<% } // shouldShowWelcome %>
<div class="home" id="home">
<div id="homepanel">
<%
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>

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