propagate from branch 'i2p.i2p.zzz.test3' (head 1f086d33dd3479afceb025d2da7956d7470fb3e5)

to branch 'i2p.i2p' (head 6959293ce260b9da4d61776717c02e20a0c7b2dd)
This commit is contained in:
zzz
2009-08-07 18:30:04 +00:00
51 changed files with 1229 additions and 453 deletions

View File

@ -55,7 +55,7 @@ public class ConfigClientsHandler extends FormHandler {
else
startWebApp(app);
} else {
addFormError("Unsupported " + _action);
addFormError("Unsupported " + _action + ".");
}
}
@ -70,18 +70,18 @@ public class ConfigClientsHandler extends FormHandler {
ca.disabled = val == null;
}
ClientAppConfig.writeClientAppConfig(_context, clients);
addFormNotice("Client configuration saved successfully - restart required to take effect");
addFormNotice("Client configuration saved successfully - restart required to take effect.");
}
private void startClient(int i) {
List clients = ClientAppConfig.getClientApps(_context);
if (i >= clients.size()) {
addFormError("Bad client index");
addFormError("Bad client index.");
return;
}
ClientAppConfig ca = (ClientAppConfig) clients.get(i);
LoadClientAppsJob.runClient(ca.className, ca.clientName, LoadClientAppsJob.parseArgs(ca.args), _log);
addFormNotice("Client " + ca.clientName + " started");
addFormNotice("Client " + ca.clientName + " started.");
}
private void saveWebAppChanges() {
@ -98,7 +98,7 @@ public class ConfigClientsHandler extends FormHandler {
props.setProperty(name, "" + (val != null));
}
RouterConsoleRunner.storeWebAppProperties(props);
addFormNotice("WebApp configuration saved successfully - restart required to take effect");
addFormNotice("WebApp configuration saved successfully - restart required to take effect.");
}
// Big hack for the moment, not using properties for directory and port
@ -116,14 +116,14 @@ public class ConfigClientsHandler extends FormHandler {
path = new File(path, app + ".war");
s.addWebApplication("/"+ app, path.getAbsolutePath()).start();
// no passwords... initialize(wac);
addFormNotice("WebApp <a href=\"/" + app + "/\">" + app + "</a> started");
addFormNotice("WebApp <a href=\"/" + app + "/\">" + app + "</a> started.");
} catch (Exception ioe) {
addFormError("Failed to start " + app + " " + ioe);
addFormError("Failed to start " + app + " " + ioe + ".");
}
return;
}
}
}
addFormError("Failed to find server");
addFormError("Failed to find server.");
}
}

View File

@ -14,8 +14,8 @@ public class ConfigClientsHelper extends HelperBase {
public String getForm1() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table border=\"1\">\n");
buf.append("<tr><th>Client</th><th>Run at Startup?</th><th>Start Now</th><th>Class and arguments</th></tr>\n");
buf.append("<table>\n");
buf.append("<tr><th align=\"right\">Client</th><th>Run at Startup?</th><th>Start Now</th><th align=\"left\">Class and arguments</th></tr>\n");
List clients = ClientAppConfig.getClientApps(_context);
for (int cur = 0; cur < clients.size(); cur++) {
@ -30,8 +30,8 @@ public class ConfigClientsHelper extends HelperBase {
public String getForm2() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<table border=\"1\">\n");
buf.append("<tr><th>WebApp</th><th>Run at Startup?</th><th>Start Now</th><th>Description</th></tr>\n");
buf.append("<table>\n");
buf.append("<tr><th align=\"right\">WebApp</th><th>Run at Startup?</th><th>Start Now</th><th align=\"left\">Description</th></tr>\n");
Properties props = RouterConsoleRunner.webAppProperties();
Set keys = new TreeSet(props.keySet());
for (Iterator iter = keys.iterator(); iter.hasNext(); ) {
@ -47,7 +47,7 @@ public class ConfigClientsHelper extends HelperBase {
}
private void renderForm(StringBuilder buf, String index, String name, boolean urlify, boolean enabled, boolean ro, String desc) {
buf.append("<tr><td>");
buf.append("<tr><td class=\"mediumtags\" align=\"right\" width=\"25%\">");
if (urlify && enabled) {
String link = "/";
if (! RouterConsoleRunner.ROUTERCONSOLE.equals(name))
@ -56,16 +56,16 @@ public class ConfigClientsHelper extends HelperBase {
} else {
buf.append(name);
}
buf.append("</td><td align=\"center\"><input type=\"checkbox\" name=\"").append(index).append(".enabled\" value=\"true\" ");
buf.append("</td><td align=\"center\" width=\"10%\"><input type=\"checkbox\" class=\"optbox\" name=\"").append(index).append(".enabled\" value=\"true\" ");
if (enabled) {
buf.append("checked=\"true\" ");
if (ro)
buf.append("disabled=\"true\" ");
}
buf.append("/></td><td>&nbsp;");
buf.append("/></td><td align=\"center\" width=\"15%\">");
if (!enabled) {
buf.append("<button type=\"submit\" name=\"action\" value=\"Start ").append(index).append("\" >Start<span class=hide> ").append(index).append("</span></button>");
}
buf.append("&nbsp;</td><td>").append(desc).append("</td></tr>\n");
buf.append("</td><td align=\"left\" width=\"50%\">").append(desc).append("</td></tr>\n");
}
}

View File

@ -47,7 +47,7 @@ public class ConfigTunnelsHandler extends FormHandler {
boolean saveRequired = false;
if (_log.shouldLog(Log.DEBUG))
_log.debug("Saving changes, with props = " + _settings);
_log.debug("Saving changes, with props = " + _settings + ".");
int updated = 0;
int index = 0;
@ -67,7 +67,7 @@ public class ConfigTunnelsHandler extends FormHandler {
try {
client.fromBase64(poolName);
} catch (DataFormatException dfe) {
addFormError("Internal error (pool name could not resolve - " + poolName + ")");
addFormError("Internal error (pool name could not resolve - " + poolName + ").");
index++;
continue;
}
@ -76,7 +76,7 @@ public class ConfigTunnelsHandler extends FormHandler {
}
if ( (in == null) || (out == null) ) {
addFormError("Internal error (pool settings cound not be found for " + poolName + ")");
addFormError("Internal error (pool settings cound not be found for " + poolName + ").");
index++;
continue;
}
@ -131,14 +131,14 @@ public class ConfigTunnelsHandler extends FormHandler {
}
if (updated > 0)
addFormNotice("Updated settings for " + updated + " pools");
addFormNotice("Updated settings for " + updated + " pools.");
if (saveRequired) {
boolean saved = _context.router().saveConfig();
if (saved)
addFormNotice("Exploratory tunnel configuration saved successfully");
addFormNotice("Exploratory tunnel configuration saved successfully.");
else
addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs");
addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs.");
}
}
private static final int getInt(Object val) {

View File

@ -62,18 +62,18 @@ public class ConfigTunnelsHelper extends HelperBase {
in.getLength() + in.getLengthVariance() <= 0 ||
out.getLength() <= 0 ||
out.getLength() + out.getLengthVariance() <= 0)
buf.append("<tr><th colspan=\"3\"><font color=\"red\">ANONYMITY WARNING - Settings include 0-hop tunnels</font></th></tr>");
buf.append("<tr><th colspan=\"3\"><font color=\"red\">ANONYMITY WARNING - Settings include 0-hop tunnels.</font></th></tr>");
else if (in.getLength() <= 1 ||
in.getLength() + in.getLengthVariance() <= 1 ||
out.getLength() <= 1 ||
out.getLength() + out.getLengthVariance() <= 1)
buf.append("<tr><th colspan=\"3\"><font color=\"red\">ANONYMITY WARNING - Settings include 1-hop tunnels</font></th></tr>");
buf.append("<tr><th colspan=\"3\"><font color=\"red\">ANONYMITY WARNING - Settings include 1-hop tunnels.</font></th></tr>");
if (in.getLength() + Math.abs(in.getLengthVariance()) >= WARN_LENGTH ||
out.getLength() + Math.abs(out.getLengthVariance()) >= WARN_LENGTH)
buf.append("<tr><th colspan=\"3\"><font color=\"red\">PERFORMANCE WARNING - Settings include very long tunnels</font></th></tr>");
buf.append("<tr><th colspan=\"3\"><font color=\"red\">PERFORMANCE WARNING - Settings include very long tunnels.</font></th></tr>");
if (in.getQuantity() + in.getBackupQuantity() >= WARN_QUANTITY ||
out.getQuantity() + out.getBackupQuantity() >= WARN_QUANTITY)
buf.append("<tr><th colspan=\"3\"><font color=\"red\">PERFORMANCE WARNING - Settings include high tunnel quantities</font></th></tr>");
buf.append("<tr><th colspan=\"3\"><font color=\"red\">PERFORMANCE WARNING - Settings include high tunnel quantities.</font></th></tr>");
buf.append("<tr><th></th><th><img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"Inbound Tunnels\"/>&nbsp;&nbsp;Inbound</th><th><img src=\"/themes/console/images/outbound.png\" alt=\"Outbound Tunnels\" title=\"Outbound\"/>&nbsp;&nbsp;Outbound</th></tr>\n");

View File

@ -24,8 +24,8 @@ public class ConfigUIHandler extends FormHandler {
else
_context.router().setConfigSetting(CSSHelper.PROP_THEME_NAME, _config);
if (_context.router().saveConfig())
addFormNotice("Theme change successfully saved (<a href=\"configui.jsp\">refresh page to view</a>)");
addFormNotice("Theme change successfully saved (<a href=\"configui.jsp\">refresh page</a> to view).");
else
addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs");
addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs.");
}
}

View File

@ -9,7 +9,7 @@ public class ConfigUIHelper extends HelperBase {
StringBuilder buf = new StringBuilder(512);
String current = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
for (String theme : themes) {
buf.append("<input type=\"radio\" name=\"theme\" ");
buf.append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
if (theme.equals(current))
buf.append("checked=\"true\" ");
buf.append("value=\"").append(theme).append("\"/>").append(theme).append("<br />\n");

View File

@ -42,10 +42,10 @@ public class ConfigUpdateHelper extends HelperBase {
public String getUpdateThroughProxy() {
String proxy = _context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY);
if (Boolean.valueOf(proxy).booleanValue())
return "<input type=\"checkbox\" value=\"true\" name=\"updateThroughProxy\" checked=\"true\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" checked=\"true\" >";
else
return "<input type=\"checkbox\" value=\"true\" name=\"updateThroughProxy\" >";
return "<input type=\"checkbox\" class=\"optbox\" value=\"true\" name=\"updateThroughProxy\" >";
}
private static final long PERIODS[] = new long[] { 12*60*60*1000l, 24*60*60*1000l, 48*60*60*1000l, -1l };

View File

@ -109,13 +109,13 @@ public class GraphHelper extends HelperBase {
_out.write("<p />[<a href=\"configstats.jsp\">Select Stats to Graph</a>]<p />");
_out.write("<form action=\"graphs.jsp\" method=\"GET\">");
_out.write("Periods: <input size=\"3\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\" /><br />\n");
_out.write("Plot averages: <input type=\"radio\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + " /> ");
_out.write("or plot events: <input type=\"radio\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + " /><br />\n");
_out.write("Plot averages: <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + " /> ");
_out.write("or plot events: <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + " /><br />\n");
_out.write("Image sizes: width: <input size=\"4\" type=\"text\" name=\"width\" value=\"" + _width
+ "\" /> pixels, height: <input size=\"4\" type=\"text\" name=\"height\" value=\"" + _height
+ "\" /><br />\n");
_out.write("Refresh delay: <select name=\"refreshDelay\"><option value=\"60\">1 minute</option><option value=\"120\">2 minutes</option><option value=\"300\">5 minutes</option><option value=\"600\">10 minutes</option><option value=\"1800\">30 minutes</option><option value=\"3600\">1 hour</option><option value=\"-1\">Never</option></select><br />\n");
_out.write("<hr /><input type=\"submit\" value=\"Redraw\" /></div>");
_out.write("<hr /><div class=\"formaction\"><input type=\"submit\" value=\"Redraw\" /></div></div>");
} catch (IOException ioe) {
ioe.printStackTrace();
}

View File

@ -30,6 +30,7 @@
<b>I2P will work best if you configure your rates to match the speed of your internet connection.</b>
</p>
<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" />" /> KBps
In <td>(<jsp:getProperty name="nethelper" property="inboundRateBits" />)<br />
@ -49,7 +50,7 @@
-->
<tr><td><jsp:getProperty name="nethelper" property="sharePercentageBox" />
Share <td>(<jsp:getProperty name="nethelper" property="shareRateBits" />)<br />
</table>
</table></div>
</p><p>
<% int share = nethelper.getShareBandwidth();
if (share < 12) {
@ -59,15 +60,14 @@
out.print("It improves your anonymity by creating cover traffic, and helps the network.<br />");
} else {
out.print("You have configured I2P to share<b> " + share + "KBps</b>. ");
out.print("The higher the share bandwidth the more you improve your anonymity and help the network.<br />");
out.print("The higher the share bandwidth the more you improve your anonymity and help the network.<hr />");
}
%>
</p><p>
<input type="submit" name="save" value="Save changes" /> <input type="reset" value="Cancel" /><br />
</p>
<!--
</p><div class="formaction">
<input type="submit" name="save" value="Save changes" /> <input type="reset" value="Cancel" /></div>
<!--
<b>Enable load testing: </b>
<input type="checkbox" name="enableloadtesting" value="true" <jsp:getProperty name="nethelper" property="enableLoadTesting" /> />
<input type="checkbox" class="optbox" name="enableloadtesting" value="true" <jsp:getProperty name="nethelper" property="enableLoadTesting" /> />
<p>If enabled, your router will periodically anonymously probe some of your peers
to see what sort of throughput they can handle. This improves your router's ability
to pick faster peers, but can cost substantial bandwidth. Relevant data from the
@ -80,20 +80,20 @@
<b>The default settings will work for most people. There is <a href="#chelp">help below</a>.</b>
</p><p>
<b>UPnP Configuration:</b><br />
<input type="checkbox" name="upnp" value="true" <jsp:getProperty name="nethelper" property="upnpChecked" /> />
<input type="checkbox" class="optbox" name="upnp" value="true" <jsp:getProperty name="nethelper" property="upnpChecked" /> />
Enable UPnP to open firewall ports - <a href="peers.jsp#upnp">UPnP status</a>
</p><p>
<b>IP Configuration:</b><br />
Externally reachable hostname or IP address:<br />
<input type="radio" name="udpAutoIP" value="local,upnp,ssu" <%=nethelper.getUdpAutoIPChecked(3) %> />
<input type="radio" class="optbox" name="udpAutoIP" value="local,upnp,ssu" <%=nethelper.getUdpAutoIPChecked(3) %> />
Use all auto-detect methods<br />
<input type="radio" name="udpAutoIP" value="local,ssu" <%=nethelper.getUdpAutoIPChecked(4) %> />
<input type="radio" class="optbox" name="udpAutoIP" value="local,ssu" <%=nethelper.getUdpAutoIPChecked(4) %> />
Disable UPnP IP address detection<br />
<input type="radio" name="udpAutoIP" value="upnp,ssu" <%=nethelper.getUdpAutoIPChecked(5) %> />
<input type="radio" class="optbox" name="udpAutoIP" value="upnp,ssu" <%=nethelper.getUdpAutoIPChecked(5) %> />
Ignore local interface IP address<br />
<input type="radio" name="udpAutoIP" value="ssu" <%=nethelper.getUdpAutoIPChecked(0) %> />
<input type="radio" class="optbox" name="udpAutoIP" value="ssu" <%=nethelper.getUdpAutoIPChecked(0) %> />
Use SSU IP address detection only<br />
<input type="radio" name="udpAutoIP" value="fixed" <%=nethelper.getUdpAutoIPChecked(1) %> />
<input type="radio" class="optbox" name="udpAutoIP" value="fixed" <%=nethelper.getUdpAutoIPChecked(1) %> />
Specify hostname or IP:
<input name ="udpHost1" type="text" size="16" value="<jsp:getProperty name="nethelper" property="udphostname" />" />
<% String[] ips = nethelper.getAddresses();
@ -110,14 +110,14 @@
}
%>
<br />
<input type="radio" name="udpAutoIP" value="hidden" <%=nethelper.getUdpAutoIPChecked(2) %> />
<input type="radio" class="optbox" name="udpAutoIP" value="hidden" <%=nethelper.getUdpAutoIPChecked(2) %> />
Hidden mode - do not publish IP <i>(prevents participating traffic)</i><br />
</p><p>
<b>UDP Configuration:</b><br />
UDP port:
<input name ="udpPort" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="configuredUdpPort" />" /><br />
<!-- let's keep this simple...
<input type="checkbox" name="requireIntroductions" value="true" <jsp:getProperty name="nethelper" property="requireIntroductionsChecked" /> />
<input type="checkbox" class="optbox" name="requireIntroductions" value="true" <jsp:getProperty name="nethelper" property="requireIntroductionsChecked" /> />
Require SSU introductions
<i>(Enable if you cannot open your firewall)</i>
</p><p>
@ -126,31 +126,32 @@
</p><p>
<b>TCP Configuration:</b><br />
Externally reachable hostname or IP address:<br />
<input type="radio" name="ntcpAutoIP" value="true" <%=nethelper.getTcpAutoIPChecked(2) %> />
<input type="radio" class="optbox" name="ntcpAutoIP" value="true" <%=nethelper.getTcpAutoIPChecked(2) %> />
Use auto-detected IP address
<i>(currently <jsp:getProperty name="nethelper" property="udpIP" />)</i>
if we are not firewalled<br />
<input type="radio" name="ntcpAutoIP" value="always" <%=nethelper.getTcpAutoIPChecked(3) %> />
<input type="radio" class="optbox" name="ntcpAutoIP" value="always" <%=nethelper.getTcpAutoIPChecked(3) %> />
Always use auto-detected IP address (Not firewalled)<br />
<input type="radio" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(1) %> />
<input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(1) %> />
Specify hostname or IP:
<input name ="ntcphost" type="text" size="16" value="<jsp:getProperty name="nethelper" property="ntcphostname" />" /><br />
<input type="radio" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(0) %> />
<input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(0) %> />
Disable inbound (Firewalled)<br />
<input type="radio" name="ntcpAutoIP" value="disabled" <%=nethelper.getTcpAutoIPChecked(4) %> />
<input type="radio" class="optbox" name="ntcpAutoIP" value="disabled" <%=nethelper.getTcpAutoIPChecked(4) %> />
Completely disable <i>(select only if behind a firewall that throttles or blocks outbound TCP)</i><br />
</p><p>
Externally reachable TCP port:<br />
<input type="radio" name="ntcpAutoPort" value="2" <%=nethelper.getTcpAutoPortChecked(2) %> />
<input type="radio" class="optbox" name="ntcpAutoPort" value="2" <%=nethelper.getTcpAutoPortChecked(2) %> />
Use the same port configured for UDP
<i>(currently <jsp:getProperty name="nethelper" property="udpPort" />)</i><br />
<input type="radio" name="ntcpAutoPort" value="1" <%=nethelper.getTcpAutoPortChecked(1) %> />
<input type="radio" class="optbox" name="ntcpAutoPort" value="1" <%=nethelper.getTcpAutoPortChecked(1) %> />
Specify Port:
<input name ="ntcpport" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="ntcpport" />" /><br />
</p><p><b>Note: Changing these settings will restart your router.</b>
</p>
</p><hr><div class="formaction">
<input type="submit" name="save" value="Save changes" /> <input type="reset" value="Cancel" />
</div>
</div>
<h3><a name="chelp">Configuration Help:</a></h3>
<div align="justify">
<p>
@ -248,7 +249,7 @@
<hr />
<!--
<b>Dynamic Router Keys: </b>
<input type="checkbox" name="dynamicKeys" value="true" <jsp:getProperty name="nethelper" property="dynamicKeysChecked" /> /><br />
<input type="checkbox" class="optbox" name="dynamicKeys" value="true" <jsp:getProperty name="nethelper" property="dynamicKeysChecked" /> /><br />
<p>
This setting causes your router identity to be regenerated every time your IP address
changes. If you have a dynamic IP this option can speed up your reintegration into

View File

@ -16,12 +16,13 @@
<div class="main" id="main">
<%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigAdvancedHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="formhandler" property="allMessages" />
<div class="configure">
<div class="wideload">
<form action="configadvanced.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.noncePrev", prev);
@ -30,15 +31,14 @@
<input type="hidden" name="action" value="blah" />
<h3>Advanced I2P Configuration</h3>
<textarea rows="32" cols="60" name="config" wrap="off"><jsp:getProperty name="advancedhelper" property="settings" /></textarea><br /><hr>
<p align="right">
<div class="formaction">
<input type="submit" name="shouldsave" value="Apply" />
<input type="reset" value="Cancel" />
</p>
<p>
NOTE: Some changes may require a restart to take effect.
</p>
<input type="reset" value="Cancel" /><br />
<b>NOTE:</b> Some changes may require a restart to take effect.
</div>
</form>
</div>
</div>
</div>
</body>
</html>

View File

@ -35,14 +35,13 @@ button span.hide{
<h3>Client Configuration</h3>
<p>
The Java clients listed below are started by the router and run in the same JVM.
</p><p>
</p><p> <div class="wideload">
<jsp:getProperty name="clientshelper" property="form1" />
</p><p>
<i>All changes require restart to take effect. To change other client options, edit the clients.config file.</i>
</p> <hr /><p>
</p> <hr /><div class="formaction">
<input type="submit" name="action" value="Save Client Configuration" />
</p>
<hr />
</div></div>
<h3>WebApp Configuration</h3>
<p>
The Java web applications listed below are started by the webConsole client and run in the same JVM as the router.
@ -54,15 +53,18 @@ button span.hide{
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.
</p><p>
</p><p><div class="wideload">
<jsp:getProperty name="clientshelper" property="form2" />
</p><p><hr>
<input type="submit" name="action" value="Save WebApp Configuration" />
</p><hr><p>
</p>
<p>
<i>All changes require restart to take effect. To change other webapp options, edit the webapps.config file.</i>
</p>
<hr><div class="formaction">
<input type="submit" name="action" value="Save WebApp Configuration" />
</div>
</form>
</div>
</div>
</div>
</body>
</html>

View File

@ -11,7 +11,7 @@
<h1>I2P Keyring Configuration</h1>
<div class="main" id="main">
<%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigKeyringHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
@ -26,8 +26,9 @@
<h3>Keyring</h3>
The router keyring is used to decrypt encrypted leaseSets.
The keyring may contain keys for local or remote encrypted destinations.
<p><jsp:getProperty name="keyringhelper" property="summary" />
</p>
<div class="wideload"><p>
<jsp:getProperty name="keyringhelper" property="summary" />
</p></div>
<hr />
@ -40,22 +41,22 @@
Enter keys for encrypted remote destinations here.
Keys for local destinations must be entered on the <a href="i2ptunnel/index.jsp">I2PTunnel page</a>.
<p>
<div class="wideload">
<table>
<tr>
<td>Dest. name, hash, or full key:
<td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off"></textarea>
<td class="mediumtags" align="right">Dest. name, hash, or full key:</td>
<td><textarea name="peer" cols="44" rows="1" style="height: 3em;" wrap="off"></textarea></td>
<tr>
<td align="right">Session Key:
<td><input type="text" size="55" name="key" />
<td class="mediumtags" align="right">Session Key:</td>
<td><input type="text" size="55" name="key" /></td>
<tr>
<td>
<td><div align="right">
<input type="submit" name="action" value="Add key" />
</div>
<td align="right">
<input type="submit" name="action" value="Add key" /></td>
</table>
</form>
</div>
</div>
</div>
</body>

View File

@ -13,7 +13,7 @@
<h1>I2P Logging Configuration</h1>
<div class="main" id="main">
<%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigLoggingHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="*" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
@ -26,34 +26,35 @@
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigLoggingHandler.nonce")%>" />
<input type="hidden" name="action" value="blah" />
<h3>Configure I2P Logging Options</h3>
<div class="wideload">
<table border="0" cellspacing="5">
<tr>
<td valign="top"><b>Logging filename:</b>
<td class="mediumtags" align="right"><b>Logging filename:</b>
<td><input type="text" name="logfilename" size="40" value="<jsp:getProperty name="logginghelper" property="logFilePattern" />" />
<br /> <i>(the symbol '@' will be replaced during log rotation)</i>
<tr>
<td valign="top"><b>Log record format:</b>
<td class="mediumtags" align="right"><b>Log record format:</b>
<td><input type="text" name="logformat" size="20" value="<jsp:getProperty name="logginghelper" property="recordPattern" />" />
<br /> <i>(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority,
'm' = message)</i>
<tr>
<td valign="top"><b>Log date format:</b>
<td class="mediumtags" align="right"><b>Log date format:</b>
<td><input type="text" name="logdateformat" size="20" value="<jsp:getProperty name="logginghelper" property="datePattern" />" />
<br /> <i>('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss'
= second, 'SSS' = millisecond)</i>
<tr>
<td valign="top"><b>Max log file size:</b>
<td class="mediumtags" align="right"><b>Max log file size:</b>
<td><input type="text" name="logfilesize" size="4" value="<jsp:getProperty name="logginghelper" property="maxFileSize" />" />
<br />
<tr>
<td valign="top"><b>Default log level:</b>
<td class="mediumtags" align="right"><b>Default log level:</b>
<td><jsp:getProperty name="logginghelper" property="defaultLogLevelBox" /> <br /> <i>(DEBUG and INFO are not recommended defaults,
as they will drastically slow down your router)</i>
<tr>
<td valign="top"><b>Log level overrides:</b>
<td class="mediumtags" align="right"><b>Log level overrides:</b>
<td><jsp:getProperty name="logginghelper" property="logLevelTable" />
<tr>
<td colspan="2" valign="top"><hr>
<td colspan="2"><hr>
<tr>
<td>
<td> <div align="right">
@ -64,5 +65,6 @@
</form>
</div>
</div>
</div>
</body>
</html>

View File

@ -37,18 +37,19 @@
<a name="unsh"> </a>
<a name="bonus"> </a>
<h2>Manual Peer Controls</h2>
Router Hash:
<input type="text" size="55" name="peer" value="<%=peer%>" />
<div class="mediumtags">Router Hash:
<input type="text" size="55" name="peer" value="<%=peer%>" /></div>
<h3>Manually Shitlist / Unshitlist a Router</h3>
Shitlisting will prevent the participation of this peer in tunnels you create.
<p>
<hr />
<div class="formaction">
<input type="submit" name="action" value="Shitlist peer until restart" />
<input type="submit" name="action" value="Unshitlist peer" />
<% if (! "".equals(peer)) { %>
<font color="blue">&lt;---- click to verify action</font>
<!-- <font color="blue">&lt;---- click to verify action</font> -->
<% } %>
</p>
<hr />
</div>
<h3>Adjust Profile Bonuses</h3>
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
@ -59,24 +60,24 @@
if (! "".equals(peer)) {
// get existing bonus values?
}
%>
Speed:
%>
<hr />
<div class="mediumtags">Speed:
<input type="text" size="8" name="speed" value="<%=speed%>" />
Capacity:
<input type="text" size="8" name="capacity" value="<%=capacity%>" />
<input type="submit" name="action" value="Adjust peer bonuses" />
<input type="submit" name="action" value="Adjust peer bonuses" /></div>
</p>
</form>
<hr />
<a name="shitlist"> </a>
<jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
<jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="profilesHelper" property="shitlistSummary" />
<hr />
<div class="wideload">
<jsp:getProperty name="peerhelper" property="blocklistSummary" />
</div>
</div>
</div>
</body>

View File

@ -26,11 +26,11 @@
<p>Graceful shutdown lets the router satisfy the agreements it has already made
before shutting down, but may take a few minutes. If you need to kill the
router immediately, that option is available as well.</p>
<hr><div class="formaction">
<input type="submit" name="action" value="Shutdown gracefully" />
<input type="submit" name="action" value="Shutdown immediately" />
<input type="submit" name="action" value="Cancel graceful shutdown" />
<hr>
</div>
<% if (System.getProperty("wrapper.version") != null) { %>
<p>If you want the router to restart itself after shutting down, you can choose one of
the following. This is useful in some situations - for example, if you changed
@ -38,30 +38,32 @@
or the interface it listens on. A graceful restart will take a few minutes (but your peers
will appreciate your patience), while a hard restart does so immediately. After tearing down
the router, it will wait 1 minute before starting back up again.</p>
<hr><div class="formaction">
<input type="submit" name="action" value="Graceful restart" />
<input type="submit" name="action" value="Hard restart" />
<% } %>
<hr>
<% } %></div>
<% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %>
<h3>Systray integration</h3>
<p>On the windows platform, there is a small application to sit in the system
tray, allowing you to view the router's status (later on, I2P client applications
will be able to integrate their own functionality into the system tray as well).
If you are on windows, you can either enable or disable that icon here.</p>
<hr><div class="formaction">
<input type="submit" name="action" value="Show systray icon" />
<input type="submit" name="action" value="Hide systray icon" />
<hr>
</div>
<h3>Run on startup</h3>
<p>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. You can
also run the <code>install_i2p_service_winnt.bat</code> (or
<code>uninstall_i2p_service_winnt.bat</code>) from the command line, if you prefer.</p>
<hr><div class="formaction">
<input type="submit" name="action" value="Run I2P on startup" />
<input type="submit" name="action" value="Don't run I2P on startup" /><br />
<input type="submit" name="action" value="Don't run I2P on startup" /></div>
<p><b>Note:</b> If you are running I2P as service right now, removing it will shut
down your router immediately. You may want to consider shutting down gracefully, as
above, then running uninstall_i2p_service_winnt.bat.</p><hr>
above, then running uninstall_i2p_service_winnt.bat.</p>
<% } %>
<% if (System.getProperty("wrapper.version") != null) { %>
@ -69,17 +71,19 @@
<p>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">
<input type="submit" name="action" value="Dump threads" />
<% } %><hr>
<% } %></div>
<h3>Launch browser on router startup?</h3>
<p>I2P's main configuration interface is this web console, so for your convenience
I2P can launch a web browser pointing at
<a href="http://127.0.0.1:7657/index.jsp">http://127.0.0.1:7657/index.jsp</a> whenever
the router starts up.</p>
<hr><div class="formaction">
<input type="submit" name="action" value="View console on startup" />
<input type="submit" name="action" value="Do not view console on startup" />
</form><hr>
</form></div>
</div>
</div>
</body>

View File

@ -56,7 +56,7 @@ function toggleAll(category)
<h1>I2P Stats Configuration</h1>
<div class="main" id="main">
<%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigStatsHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:setProperty name="formhandler" property="*" />
@ -73,39 +73,39 @@ function toggleAll(category)
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigStatsHandler.nonce")%>" />
<h3>Configure I2P Stat Collection</h3>
Enable full stats?
<input type="checkbox" name="isFull" value="true" <%
<input type="checkbox" class="optbox" name="isFull" value="true" <%
if (statshelper.getIsFull()) { %>checked="true" <% } %>/>
(change requires restart to take effect)<br />
Stat file: <input type="text" name="filename" value="<%=statshelper.getFilename()%>" /><br />
Filter: (<a href="javascript: void(null);" onclick="toggleAll('*')">toggle all</a>)<hr />
<div class="wideload">
<table>
<% while (statshelper.hasMoreStats()) {
while (statshelper.groupRequired()) { %>
<tr><td valign="top" align="left" colspan="3">
<tr class="tablefooter"><td align="left" colspan="3">
<b><%=statshelper.getCurrentGroupName()%></b>
(<a href="javascript: void(null);" onclick="toggleAll('<%=statshelper.getCurrentGroupName()%>')">toggle all</a>)
</td></tr><tr><td>Log</td><td>Graph</td><td></td></tr><%
</td></tr><tr class="tablefooter"><td align="center"><b>Log</b></td><td align="center"><b>Graph</b></td><td></td></tr><%
} // end iterating over required groups for the current stat %>
<tr><td valign="top" align="left">
<tr><td align="center">
<a name="<%=statshelper.getCurrentStatName()%>"></a>
<input id="<%=statshelper.getCurrentGroupName()%>" type="checkbox" name="statList" value="<%=statshelper.getCurrentStatName()%>" <%
<input id="<%=statshelper.getCurrentGroupName()%>" type="checkbox" class="optbox" name="statList" value="<%=statshelper.getCurrentStatName()%>" <%
if (statshelper.getCurrentIsLogged()) { %>checked="true" <% } %>/></td>
<td valign="top" align="left">
<td align="center">
<% if (statshelper.getCurrentCanBeGraphed()) { %>
<input id="<%=statshelper.getCurrentGroupName()%>" type="checkbox" name="graphList" value="<%=statshelper.getCurrentGraphName()%>" <%
<input id="<%=statshelper.getCurrentGroupName()%>" type="checkbox" class="optbox" name="graphList" value="<%=statshelper.getCurrentGraphName()%>" <%
if (statshelper.getCurrentIsGraphed()) { %>checked="true" <% } %>/><% } %></td>
<td valign="top" align="left"><b><%=statshelper.getCurrentStatName()%>:</b><br />
<td align="left"><b><%=statshelper.getCurrentStatName()%>:</b><br />
<%=statshelper.getCurrentStatDescription()%></td></tr><%
} // end iterating over all stats %>
<tr><td colspan="3"><hr /></td></tr>
<tr><td><input type="checkbox" name="explicitFilter" /></td>
<tr><td colspan="3"></td></tr>
<tr><td align="center"><input type="checkbox" class="optbox" name="explicitFilter" /></td>
<td colspan="2">Advanced filter:
<input type="text" name="explicitFilterValue" value="<%=statshelper.getExplicitFilter()%>" size="40" /></td></tr>
<tr><td colspan="3"><hr /></td></tr>
<tr><td><input type="submit" name="shouldsave" value="Save changes" /> </td>
<td><input type="reset" value="Cancel" /></td><td></td></tr></form>
<tr class="tablefooter"><td colspan="3" align="right"><input type="submit" name="shouldsave" value="Save changes" /><input type="reset" value="Cancel" /></td></tr></form>
</table>
</div>
</div>
</div>
</body>
</html>

View File

@ -14,7 +14,6 @@
<h1>I2P Tunnel Configuration</h1>
<div class="main" id="main">
<%@include file="confignav.jsp" %>
<jsp:useBean class="net.i2p.router.web.ConfigTunnelsHandler" id="formhandler" scope="request" />
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:setProperty name="formhandler" property="shouldsave" value="<%=request.getParameter("shouldsave")%>" />
@ -31,7 +30,7 @@
High CPU and/or high outbound bandwidth usage may result.
Change these settings with care, and adjust them if you have problems.
</i></p>
<div class="wideload">
<form action="configtunnels.jsp" method="POST">
<% String prev = System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce");
if (prev != null) System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.noncePrev", prev);
@ -42,9 +41,10 @@
<i>Note - Exploratory tunnel setting changes are stored in the router.config file.</i></br>
<i>Client tunnel changes are temporary and are not saved.</i><br>
<i>To make permanent client tunnel changes see the </i><a href="i2ptunnel/index.jsp">i2ptunnel page</a>.<br>
<hr /> <input type="submit" name="shouldsave" value="Save changes" /> <input type="reset" value="Cancel" />
<hr /><div class="formaction"><input type="submit" name="shouldsave" value="Save changes" /> <input type="reset" value="Cancel" /></div>
</form>
</div>
</div>
</div>
</body>
</html>

View File

@ -34,9 +34,9 @@
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigUIHandler.nonce")%>" />
<input type="hidden" name="action" value="blah" />
<jsp:getProperty name="uihelper" property="settings" />
<hr>
<hr><div class="formaction">
<input type="submit" name="shouldsave" value="Apply" /> <input type="reset" value="Cancel" />
</form>
</form></div>
<% } else { %>
Theme selection disabled for Internet Explorer, sorry.<hr>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.

View File

@ -28,52 +28,49 @@
System.setProperty("net.i2p.router.web.ConfigUpdateHandler.nonce", new java.util.Random().nextLong()+""); %>
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigUpdateHandler.nonce")%>" />
<h3>Check for I2P and news updates</h3>
<table border="0" cellspacing="5">
<div class="wideload"><table border="0" cellspacing="5">
<tr>
<td colspan="2"></tr>
<tr>
<td><b>News:</b></td>
<td class= "mediumtags" align="right"><b>News:</b></td>
<td> <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> <i>Update In Progress</i><br /> <% } else { %> <input type="submit" name="action" value="Check for update now" />
<% } %></tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
<tr>
<td><b>News URL:</b></td>
<td class= "mediumtags" align="right"><b>News URL:</b></td>
<td><input type="text" size="60" name="newsURL" value="<jsp:getProperty name="updatehelper" property="newsURL" />"></td>
</tr>
<tr>
<td><b>Refresh frequency:</b>
<td class= "mediumtags" align="right"><b>Refresh frequency:</b>
<td><jsp:getProperty name="updatehelper" property="refreshFrequencySelectBox" />
<tr>
<td><b>Update policy:</b>
<td class= "mediumtags" align="right"><b>Update policy:</b>
<td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" />
<tr>
<td><b>Update through the eepProxy?</b>
<td class= "mediumtags" align="right"><b>Update through the eepProxy?</b>
<td><jsp:getProperty name="updatehelper" property="updateThroughProxy" />
<tr>
<td><b>eepProxy host:</b>
<td class= "mediumtags" align="right"><b>eepProxy host:</b>
<td><input type="text" size="10" name="proxyHost" value="<jsp:getProperty name="updatehelper" property="proxyHost" />" />
<tr>
<td><b>eepProxy port:</b>
<td class= "mediumtags" align="right"><b>eepProxy port:</b>
<td><input type="text" size="4" name="proxyPort" value="<jsp:getProperty name="updatehelper" property="proxyPort" />" />
<tr>
<td><b>Update URLs:</b>
<td class= "mediumtags" align="right"><b>Update URLs:</b>
<td><textarea name="updateURL" wrap="off"><jsp:getProperty name="updatehelper" property="updateURL" /></textarea>
<tr>
<td><b>Trusted keys:</b>
<td class= "mediumtags" align="right"><b>Trusted keys:</b>
<td><textarea name="trustedKeys" wrap="off"><jsp:getProperty name="updatehelper" property="trustedKeys" /></textarea>
<tr>
<tr>
<td colspan="2"><hr />
<tr>
<tr>
<td>
<td><div align="right">
<td><div class="formaction">
<input type="submit" name="action" value="Save" />
<input type="reset" value="Cancel" />
</div>
</table>
</div>
</form>
</div>
</div>

View File

@ -18,3 +18,4 @@
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="cssHelper" scope="request" />
<jsp:setProperty name="cssHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<link href="<%=cssHelper.getTheme(request.getHeader("User-Agent"))%>console.css" rel="stylesheet" type="text/css" />
<!--[if IE]><link href="/themes/console/classic/ieshim.css" rel="stylesheet" type="text/css" /><![endif]-->

View File

@ -11,6 +11,7 @@
<h1>I2P Performance Graphs</h1>
<div class="main" id="main">
<div class="graphspanel">
<div class="widepanel">
<jsp:useBean class="net.i2p.router.web.GraphHelper" id="graphHelper" scope="request" />
<jsp:setProperty name="graphHelper" property="*" />
<jsp:setProperty name="graphHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
@ -18,5 +19,6 @@
<jsp:getProperty name="graphHelper" property="images" />
<jsp:getProperty name="graphHelper" property="form" />
</div>
</div>
</body>
</html>

View File

@ -10,6 +10,7 @@
<%@include file="summary.jsp" %>
<h1>I2P Network Database Summary</h1>
<div class="main" id="main">
<div class="wideload">
<jsp:useBean class="net.i2p.router.web.NetDbHelper" id="netdbHelper" scope="request" />
<jsp:setProperty name="netdbHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:setProperty name="netdbHelper" property="writer" value="<%=out%>" />
@ -18,6 +19,6 @@
<jsp:setProperty name="netdbHelper" property="lease" value="<%=request.getParameter("l")%>" />
<jsp:getProperty name="netdbHelper" property="netDbSummary" />
</div>
</div>
</body>
</html>

View File

@ -9,7 +9,7 @@
<%@include file="summary.jsp" %>
<h1>I2P Network Peer Profiles</h1>
<div class="main" id="main">
<div class="main" id="main"><div class="wideload">
<jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
<jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="profilesHelper" property="profileSummary" />
@ -17,6 +17,6 @@
<a name="shitlist"> </a>
<jsp:getProperty name="profilesHelper" property="shitlistSummary" />
</div>
</div>
</body>
</html>

View File

@ -62,7 +62,7 @@
if (!shutdownSoon) {
out.print("<hr /><p><form action=\"summaryframe.jsp\" method=\"GET\">\n");
if ("0".equals(d)) {
out.print("<b>Refresh (s):<b> <input size=\"3\" type=\"text\" name=\"refresh\" value=\"60\" />\n");
out.print("<b>Refresh (s):<b> <input size=\"3\" type=\"text\" name=\"refresh\" value=\"60\" align=\"right\" />\n");
out.print("<button type=\"submit\">Enable</button>\n");
} else {
// this will load in the iframe but subsequent pages will not have the iframe

View File

@ -26,9 +26,9 @@
<jsp:getProperty name="linkhelper" property="content" />
<% } else { %>
<u><b>I2P Services</b></u><br />
<a href="susimail/susimail" target="blank">Susimail</a>
<a href="susidns/index.jsp" target="_blank">SusiDNS</a>
<a href="i2psnark/" target="_blank">Torrents</a>
<a href="susidns/index.jsp" target="_blank">Addressbook</a>
<a href="i2psnark/" target="_blank">Torrents</a>
<a href="susimail/susimail" target="blank">Webmail</a>
<a href="http://127.0.0.1:7658/" target="_blank">Webserver</a><hr />
<u><b>I2P Internals</b></u><br />
<a href="i2ptunnel/index.jsp" target="_blank">I2PTunnel</a>