source: apps/routerconsole/jsp/config.jsp @ 4de0b73

Last change on this file since 4de0b73 was 4de0b73, checked in by z3d <z3d@…>, 12 years ago

Ongoing UI enhancements; peers.jsp gets some love.

  • Property mode set to 100644
File size: 16.5 KB
1<%@page contentType="text/html" %>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5<title>I2P Router Console - config networking</title>
6<%@include file="css.jsp" %>
9<%@include file="summary.jsp" %>
11<jsp:useBean class="net.i2p.router.web.ConfigNetHelper" id="nethelper" scope="request" />
12<jsp:setProperty name="nethelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
13<h1>I2P Network Configuration</h1>
14<div class="main" id="main">
15 <%@include file="confignav.jsp" %>
17 <jsp:useBean class="net.i2p.router.web.ConfigNetHandler" id="formhandler" scope="request" />
18 <jsp:setProperty name="formhandler" property="*" />
19 <jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
20 <jsp:getProperty name="formhandler" property="allMessages" />
21<div class="configure">
22 <form action="config.jsp" method="POST">
23 <% String prev = System.getProperty("net.i2p.router.web.ConfigNetHandler.nonce");
24    if (prev != null) System.setProperty("net.i2p.router.web.ConfigNetHandler.noncePrev", prev);
25    System.setProperty("net.i2p.router.web.ConfigNetHandler.nonce", new java.util.Random().nextLong()+""); %>
26 <input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigNetHandler.nonce")%>" />
27 <input type="hidden" name="action" value="blah" />
28 <h3>Bandwidth limiter</h3>
29 <p>
30 <b>I2P will work best if you configure your rates to match the speed of your internet connection.</b>
31 </p>
33    <table>
34    <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
35    In <td>(<jsp:getProperty name="nethelper" property="inboundRateBits" />)<br />
36<!-- let's keep this simple...
37 bursting up to
38    <input name="inboundburstrate" type="text" size="5" value="<jsp:getProperty name="nethelper" property="inboundBurstRate" />" /> KBps for
39    <jsp:getProperty name="nethelper" property="inboundBurstFactorBox" /><br />
41    <tr><td><input style="text-align: right; width: 5em;" name="outboundrate" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="outboundRate" />" /> KBps
42    Out <td>(<jsp:getProperty name="nethelper" property="outboundRateBits" />)<br />
43<!-- let's keep this simple...
44 bursting up to
45    <input name="outboundburstrate" type="text" size="2" value="<jsp:getProperty name="nethelper" property="outboundBurstRate" />" /> KBps for
46  <jsp:getProperty name="nethelper" property="outboundBurstFactorBox" /><br />
47 <i>KBps = kilobytes per second = 1024 bytes per second = 8192 bits per second.<br />
48    A negative rate sets the default.</i><br />
50    <tr><td><jsp:getProperty name="nethelper" property="sharePercentageBox" />
51    Share <td>(<jsp:getProperty name="nethelper" property="shareRateBits" />)<br />
52    </table>
53 </p><p>
54 <% int share = nethelper.getShareBandwidth();
55    if (share < 12) {
56        out.print("<b>NOTE</b>: You have configured I2P to share only " + share + "KBps. ");
57        out.print("I2P requires at least 12KBps to enable sharing. ");
58        out.print("Please enable sharing (participating in tunnels) by configuring more bandwidth. ");
59        out.print("It improves your anonymity by creating cover traffic, and helps the network.<br />");
60    } else {
61        out.print("You have configured I2P to share<b> " + share + "KBps</b>. ");
62        out.print("The higher the share bandwidth the more you improve your anonymity and help the network.<hr />");
63    }
64 %>
65 </p><p>
66 <input type="submit" name="save" value="Save changes" /> <input type="reset" value="Cancel" /><br />
67 </p>
69 <b>Enable load testing: </b>
70<input type="checkbox" class="optbox" name="enableloadtesting" value="true" <jsp:getProperty name="nethelper" property="enableLoadTesting" /> />
71 <p>If enabled, your router will periodically anonymously probe some of your peers
72 to see what sort of throughput they can handle.  This improves your router's ability
73 to pick faster peers, but can cost substantial bandwidth.  Relevant data from the
74 load testing is fed into the profiles as well as the
75 <a href="oldstats.jsp#test.rtt">test.rtt</a> and related stats.</p>
76 <hr />
78 <h3>IP and Transport Configuration</h3>
79 <p>
80 <b>The default settings will work for most people. There is <a href="#chelp">help below</a>.</b>
81 </p><p>
82 <b>UPnP Configuration:</b><br />
83    <input type="checkbox" class="optbox" name="upnp" value="true" <jsp:getProperty name="nethelper" property="upnpChecked" /> />
84    Enable UPnP to open firewall ports - <a href="peers.jsp#upnp">UPnP status</a>
85 </p><p>
86 <b>IP Configuration:</b><br />
87 Externally reachable hostname or IP address:<br />
88    <input type="radio" class="optbox" name="udpAutoIP" value="local,upnp,ssu" <%=nethelper.getUdpAutoIPChecked(3) %> />
89    Use all auto-detect methods<br />
90    <input type="radio" class="optbox" name="udpAutoIP" value="local,ssu" <%=nethelper.getUdpAutoIPChecked(4) %> />
91    Disable UPnP IP address detection<br />
92    <input type="radio" class="optbox" name="udpAutoIP" value="upnp,ssu" <%=nethelper.getUdpAutoIPChecked(5) %> />
93    Ignore local interface IP address<br />
94    <input type="radio" class="optbox" name="udpAutoIP" value="ssu" <%=nethelper.getUdpAutoIPChecked(0) %> />
95    Use SSU IP address detection only<br />
96    <input type="radio" class="optbox" name="udpAutoIP" value="fixed" <%=nethelper.getUdpAutoIPChecked(1) %> />
97    Specify hostname or IP:
98    <input name ="udpHost1" type="text" size="16" value="<jsp:getProperty name="nethelper" property="udphostname" />" />
99    <% String[] ips = nethelper.getAddresses();
100       if (ips.length > 0) {
101           out.print(" or <select name=\"udpHost2\"><option value=\"\" selected=\"true\">Select Interface</option>\n");
102           for (int i = 0; i < ips.length; i++) {
103               out.print("<option value=\"");
104               out.print(ips[i]);
105               out.print("\">");
106               out.print(ips[i]);
107               out.print("</option>\n");
108           }
109           out.print("</select>\n");
110       }
111    %>
112    <br />
113    <input type="radio" class="optbox" name="udpAutoIP" value="hidden" <%=nethelper.getUdpAutoIPChecked(2) %> />
114    Hidden mode - do not publish IP <i>(prevents participating traffic)</i><br />
115 </p><p>
116 <b>UDP Configuration:</b><br />
117 UDP port:
118 <input name ="udpPort" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="configuredUdpPort" />" /><br />
119<!-- let's keep this simple...
120<input type="checkbox" class="optbox" name="requireIntroductions" value="true" <jsp:getProperty name="nethelper" property="requireIntroductionsChecked" /> />
121 Require SSU introductions
122 <i>(Enable if you cannot open your firewall)</i>
123 </p><p>
124 Current External UDP address: <i><jsp:getProperty name="nethelper" property="udpAddress" /></i><br />
126 </p><p>
127 <b>TCP Configuration:</b><br />
128 Externally reachable hostname or IP address:<br />
129    <input type="radio" class="optbox" name="ntcpAutoIP" value="true" <%=nethelper.getTcpAutoIPChecked(2) %> />
130    Use auto-detected IP address
131    <i>(currently <jsp:getProperty name="nethelper" property="udpIP" />)</i>
132    if we are not firewalled<br />
133    <input type="radio" class="optbox" name="ntcpAutoIP" value="always" <%=nethelper.getTcpAutoIPChecked(3) %> />
134    Always use auto-detected IP address (Not firewalled)<br />
135    <input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(1) %> />
136    Specify hostname or IP:
137    <input name ="ntcphost" type="text" size="16" value="<jsp:getProperty name="nethelper" property="ntcphostname" />" /><br />
138    <input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(0) %> />
139    Disable inbound (Firewalled)<br />
140    <input type="radio" class="optbox" name="ntcpAutoIP" value="disabled" <%=nethelper.getTcpAutoIPChecked(4) %> />
141    Completely disable <i>(select only if behind a firewall that throttles or blocks outbound TCP)</i><br />
142 </p><p>
143 Externally reachable TCP port:<br />
144    <input type="radio" class="optbox" name="ntcpAutoPort" value="2" <%=nethelper.getTcpAutoPortChecked(2) %> />
145    Use the same port configured for UDP
146    <i>(currently <jsp:getProperty name="nethelper" property="udpPort" />)</i><br />
147    <input type="radio" class="optbox" name="ntcpAutoPort" value="1" <%=nethelper.getTcpAutoPortChecked(1) %> />
148    Specify Port:
149    <input name ="ntcpport" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="ntcpport" />" /><br />
150 </p><p><b>Note: Changing these settings will restart your router.</b>
151 </p><hr>
152 <input type="submit" name="save" value="Save changes" /> <input type="reset" value="Cancel" />
154<h3><a name="chelp">Configuration Help:</a></h3>
155 <div align="justify">
156 <p>
157 While I2P will work fine behind most firewalls, your speeds and network integration will generally improve
158 if the I2P port (generally 8887) is forwarded for both UDP and TCP.
159 </p><p>
160 If you can, please poke a hole in your firewall to allow unsolicited UDP and TCP packets to reach
161    you.  If you can't, I2P supports UPnP (Universal Plug and Play) and UDP hole punching
162    with "SSU introductions" to relay traffic. Most of the options above are for special situations,
163    for example where UPnP does not work correctly, or a firewall not under your control is doing
164    harm. Certain firewalls such as symmetric NATs may not work well with I2P.
165 </p>
166<!-- let's keep this simple...
167<input type="submit" name="recheckReachability" value="Check network reachability..." />
169 </p><p>
170 UPnP is used to communicate with Internet Gateway Devices (IGDs) to detect the external IP address
171 and forward ports.
172 UPnP support is beta, and may not work for any number of reasons:
173 <ul>
174<li class="tidylist">No UPnP-compatible device present
175<li class="tidylist">UPnP disabled on the device
176<li class="tidylist">Software firewall interference with UPnP
177<li class="tidylist">Bugs in the device's UPnP implementation
178<li class="tidylist">Multiple firewall/routers in the internet connection path
179<li class="tidylist">UPnP device change, reset, or address change
180 </ul><br>
181 Reviewing the <a href="peers.jsp#upnp">UPnP status</a> may help.
182 UPnP may be enabled or disabled above, but a change requires a router restart to take effect.
183 </p><p>Hostnames entered above will be published in the network database.
184    They are <b>not private</b>.
185    Also, <b>do not enter a private IP address</b> like or
186    If you specify the wrong IP address or
187    hostname, or do not properly configure your NAT or firewall, your network performance will degrade
188    substantially.  When in doubt, leave the settings at the defaults.</p>
189 </p>
190<h3><a name="help">Reachability Help:</a></h3>
191 <p>
192 While I2P will work fine behind most firewalls, your speeds and network integration will generally improve
193 if the I2P port (generally 8887) to both UDP and TCP.
194 If you think you have opened up your firewall and I2P still thinks you are firewalled, remember
195 that you may have multiple firewalls, for example both software packages and external hardware routers.
196 If there is an error, the <a href="logs.jsp">logs</a> may also help diagnose the problem.
197 <ul>
198<li class="tidylist"><b>OK</b> - Your UDP port does not appear to be firewalled.
199<li class="tidylist"><b>Firewalled</b> - Your UDP port appears to be firewalled.
200     As the firewall detection methods are not 100% reliable, this may occasionally be displayed in error.
201     However, if it appears consistently, you should check whether both your external and internal
202     firewalls are open on port 8887. I2P will work fine when firewalled, there is no reason for concern.
203     When firewalled, the router uses "introducers" to relay inbound connections.
204     However, you will get more participating traffic and help the network more if you can open your
205     firewall(s). If you think you have already done so, remember that you may have both a hardware
206     and a software firewall, or be behind an additional, institutional firewall you cannot control.
207     Also, some routers cannot correctly forward both TCP and UDP on a single port, or may have other
208     limitations or bugs that prevent them from passing traffic through to I2P.
209<li class="tidylist"><b>Testing</b> - The router is currently testing whether your UDP port is firewalled.
210<li class="tidylist"><b>Hidden</b> - The router is not configured to publish its address,
211     therefore it does not expect incoming connections.
212<li class="tidylist"><b>WARN - Firewalled and Fast</b> - You have configured I2P to share more than 128KBps of bandwidth,
213     but you are firewalled. While I2P will work fine in this configuration, if you really have
214     over 128KBps of bandwidth to share, it will be much more helpful to the network if
215     you open your firewall.
216<li class="tidylist"><b>WARN - Firewalled and Floodfill</b> - You have configured I2P to be a floodfill router, but
217     you are firewalled. For best participation as a floodfill router, you should open your firewall.
218<li class="tidylist"><b>WARN - Firewalled with Inbound TCP Enabled</b> - You have configured inbound TCP, however
219     your UDP port is firewalled, and therefore it is likely that your TCP port is firewalled as well.
220     If your TCP port is firewalled with inbound TCP enabled, routers will not be able to contact
221     you via TCP, which will hurt the network. Please open your firewall or disable inbound TCP above.
222<li class="tidylist"><b>WARN - Firewalled with UDP Disabled</b> -
223     You have configured inbound TCP, however
224     you have disabled UDP. You appear to be firewalled on TCP, therefore your router cannot
225     accept inbound connections.
226     Please open your firewall or enable UDP.
227<li class="tidylist"><b>ERR - Clock Skew</b> - Your system's clock is skewed, which will make it difficult
228     to participate in the network. Correct your clock setting if this error persists.
229<li class="tidylist"><b>ERR - Private TCP Address</b> - You must never advertise an unroutable IP address such as
230 or as your external address. Correct the address or disable inbound TCP above.
231<li class="tidylist"><b>ERR - SymmetricNAT</b> - I2P detected that you are firewalled by a Symmetric NAT.
232     I2P does not work well behind this type of firewall. You will probably not be able to
233     accept inbound connections, which will limit your participation in the network.
234<li class="tidylist"><b>ERR - UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart</b> -
235     I2P was unable to bind to port 8887 or other configured port.
236     Check to see if another program is using port 8887. If so, stop that program or configure
237     I2P to use a different port. This may be a transient error, if the other program is no longer
238     using the port. However, a restart is always required after this error.
239<li class="tidylist"><b>ERR - UDP Disabled and Inbound TCP host/port not set</b> -
240     You have not configured inbound TCP with a hostname and port above, however
241     you have disabled UDP. Therefore your router cannot accept inbound connections.
242     Please configure a TCP host and port above or enable UDP.
243<li class="tidylist"><b>ERR - Client Manager I2CP Error - check logs</b> -
244     This is usually due to a port 7654 conflict. Check the logs to verify. Do you have another I2P instance running?
245     Stop the conflicting program and restart I2P.
246 </ul>
247 </p>
248 <hr />
249      <!--
250 <b>Dynamic Router Keys: </b>
251 <input type="checkbox" class="optbox" name="dynamicKeys" value="true" <jsp:getProperty name="nethelper" property="dynamicKeysChecked" /> /><br />
252 <p>
253 This setting causes your router identity to be regenerated every time your IP address
254 changes. If you have a dynamic IP this option can speed up your reintegration into
255 the network (since people will have shitlisted your old router identity), and, for
256 very weak adversaries, help frustrate trivial
257 <a href="">intersection
258 attacks</a> against the NetDB.  Your different router identities would only be
259 'hidden' among other I2P users at your ISP, and further analysis would link
260 the router identities further.</p>
261 <p>Note that when I2P detects an IP address change, it will automatically
262 initiate a restart in order to rekey and to disconnect from peers before they
263 update their profiles - any long lasting client connections will be disconnected,
264 though such would likely already be the case anyway, since the IP address changed.
265 </p>
266 <hr />
268    </form>
Note: See TracBrowser for help on using the repository browser.