- Implement config save of new IP address options

- Implement local address and UPnP configuration of UDP address
- Limit received port to 1024 minimum
This commit is contained in:
zzz
2009-05-01 00:42:31 +00:00
parent b21e011203
commit 79a963fcab
7 changed files with 146 additions and 71 deletions

View File

@ -67,22 +67,27 @@
<a href="oldstats.jsp#test.rtt">test.rtt</a> and related stats.</p>
<hr />
-->
<b>UDP Configuration:</b><br />
<p>
<b>UPnP Configuration:</b><br />
<input type="checkbox" name="upnp" value="true" <jsp:getProperty name="nethelper" property="upnpChecked" /> />
Enable UPnP to open firewall ports
</p><p>
<b>IP Configuration:</b><br />
Externally reachable hostname or IP address:<br />
<input type="radio" name="udpAutoIP" value="0" <%=nethelper.getUdpAutoIPChecked(0) %> />
Use SSU detection only<br />
<input type="radio" name="udpAutoIP" value="24" <%=nethelper.getUdpAutoIPChecked(24) %> />
<input type="radio" name="udpAutoIP" value="local,upnp,ssu" <%=nethelper.getUdpAutoIPChecked(3) %> />
Use local public address if available, then UPnP detection, then SSU detection<br />
<input type="radio" name="udpAutoIP" value="16" <%=nethelper.getUdpAutoIPChecked(16) %> />
<input type="radio" name="udpAutoIP" value="local,ssu" <%=nethelper.getUdpAutoIPChecked(4) %> />
Use local public address if available, then SSU detection<br />
<input type="radio" name="udpAutoIP" value="8" <%=nethelper.getUdpAutoIPChecked(8) %> />
<input type="radio" name="udpAutoIP" value="upnp,ssu" <%=nethelper.getUdpAutoIPChecked(5) %> />
Use UPnP detection if available, then SSU detection<br />
<input type="radio" name="udpAutoIP" value="1" <%=nethelper.getUdpAutoIPChecked(1) %> />
<input type="radio" name="udpAutoIP" value="ssu" <%=nethelper.getUdpAutoIPChecked(0) %> />
Use SSU detection only<br />
<input type="radio" name="udpAutoIP" value="fixed" <%=nethelper.getUdpAutoIPChecked(1) %> />
Specify hostname or IP:
<input name ="udphost" type="text" size="16" value="<jsp:getProperty name="nethelper" property="udphostname" />" />
<input name ="udpHost1" type="text" size="16" value="<jsp:getProperty name="nethelper" property="udphostname" />" />
<% String[] ips = nethelper.getAddresses();
if (ips.length > 0) {
out.print(" or <select name=\"interface\"><option value=\"\" selected=\"true\">Select Interface</option>\n");
out.print(" or <select name=\"udpHost2\"><option value=\"\" selected=\"true\">Select Interface</option>\n");
for (int i = 0; i < ips.length; i++) {
out.print("<option value=\"");
out.print(ips[i]);
@ -94,14 +99,16 @@
}
%>
<br />
<input type="radio" name="udpAutoIP" value="2" <%=nethelper.getUdpAutoIPChecked(2) %> />
Hidden mode - do not publish IP<i>(not recommended)</i><br />
<input type="radio" name="udpAutoIP" value="hidden" <%=nethelper.getUdpAutoIPChecked(2) %> />
Hidden mode - do not publish IP<i>(not recommended; change restarts router)</i><br />
</p><p>
<b>UDP Configuration:</b><br />
Internal UDP port:
<input name ="udpPort" type="text" size="6" value="<jsp:getProperty name="nethelper" property="configuredUdpPort" />" /><br />
<input type="checkbox" name="requireIntroductions" value="true" <jsp:getProperty name="nethelper" property="requireIntroductionsChecked" /> />
Require SSU introductions
<i>(Enable if you cannot open your firewall)</i>
<p>
</p><p>
Current External UDP address: <i><jsp:getProperty name="nethelper" property="udpAddress" /></i><br />
</p><p>If you can, please poke a hole in your NAT or firewall to allow unsolicited UDP packets to reach
you on your external UDP address. If you can't, I2P now includes supports UDP hole punching
@ -111,8 +118,8 @@
the <i>Reachability: Firewalled</i> line), or you can manually require them here.
Users behind symmetric NATs, such as OpenBSD's pf, are not currently supported.</p>
<input type="submit" name="recheckReachability" value="Check network reachability..." />
<p>
<b>Inbound TCP connection configuration:</b><br />
</p><p>
<b>Inbound TCP Configuration:</b><br />
Externally reachable hostname or IP address:<br />
<input type="radio" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(0) %> />
Disable (Firewalled)<br />
@ -125,7 +132,7 @@
Specify hostname or IP:
<input name ="ntcphost" type="text" size="16" value="<jsp:getProperty name="nethelper" property="ntcphostname" />" />
<i>(dyndns and the like are fine)</i><br />
<p>
</p><p>
Externally reachable TCP port:<br />
<input type="radio" name="ntcpAutoPort" value="2" <%=nethelper.getTcpAutoPortChecked(2) %> />
Use the same port configured for SSU
@ -133,8 +140,8 @@
<input type="radio" name="ntcpAutoPort" value="1" <%=nethelper.getTcpAutoPortChecked(1) %> />
Specify Port:
<input name ="ntcpport" type="text" size="6" value="<jsp:getProperty name="nethelper" property="ntcpport" />" /><br />
<p>A hostname entered here will be published in the network database.
It is <b>not private</b>.
</p><p>Hostnames entered here will be published in the network database.
They are <b>not private</b>.
Also, <b>do not enter a private IP address</b> like 127.0.0.1 or 192.168.1.1.
</p>
<p>You do <i>not</i> need to allow inbound TCP connections - outbound connections work with no
@ -142,11 +149,6 @@
in your NAT or firewall for unsolicited TCP connections. If you specify the wrong IP address or
hostname, or do not properly configure your NAT or firewall, your network performance will degrade
substantially. When in doubt, leave the hostname and port number blank.</p>
<p>
<b>UPnP Configuration:</b><br />
Open firewall port using UPnP:
<input type="checkbox" name="upnp" value="true" <jsp:getProperty name="nethelper" property="upnpChecked" /> /><br />
</p>
<p><b>Note: changing any of these settings will terminate all of your connections and effectively
restart your router.</b>
</p>