forked from I2P_Developers/i2p.i2p
* confignet: Add UDP disable option
This commit is contained in:
@ -49,6 +49,7 @@ public class ConfigNetHandler extends FormHandler {
|
|||||||
private boolean _enableLoadTesting;
|
private boolean _enableLoadTesting;
|
||||||
private String _sharePct;
|
private String _sharePct;
|
||||||
private boolean _ratesOnly;
|
private boolean _ratesOnly;
|
||||||
|
private boolean _udpDisabled;
|
||||||
private final Map<String, String> changes = new HashMap();
|
private final Map<String, String> changes = new HashMap();
|
||||||
private static final String PROP_HIDDEN = Router.PROP_HIDDEN_HIDDEN; // see Router for other choice
|
private static final String PROP_HIDDEN = Router.PROP_HIDDEN_HIDDEN; // see Router for other choice
|
||||||
|
|
||||||
@ -130,6 +131,11 @@ public class ConfigNetHandler extends FormHandler {
|
|||||||
_ratesOnly = true;
|
_ratesOnly = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @since 0.8.13 */
|
||||||
|
public void setDisableUDP(String foo) {
|
||||||
|
_udpDisabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void recheckReachability() {
|
private void recheckReachability() {
|
||||||
_context.commSystem().recheckReachability();
|
_context.commSystem().recheckReachability();
|
||||||
addFormNotice(_("Rechecking router reachability..."));
|
addFormNotice(_("Rechecking router reachability..."));
|
||||||
@ -270,6 +276,16 @@ public class ConfigNetHandler extends FormHandler {
|
|||||||
}
|
}
|
||||||
changes.put(UDPTransport.PROP_LAPTOP_MODE, "" + _laptop);
|
changes.put(UDPTransport.PROP_LAPTOP_MODE, "" + _laptop);
|
||||||
|
|
||||||
|
if (_context.getBooleanPropertyDefaultTrue(TransportManager.PROP_ENABLE_UDP) !=
|
||||||
|
!_udpDisabled) {
|
||||||
|
if (_udpDisabled)
|
||||||
|
addFormNotice(_("Disabling UDP"));
|
||||||
|
else
|
||||||
|
addFormNotice(_("Enabling UDP"));
|
||||||
|
restartRequired = true;
|
||||||
|
}
|
||||||
|
changes.put(TransportManager.PROP_ENABLE_UDP, "" + (!_udpDisabled));
|
||||||
|
|
||||||
if (_requireIntroductions) {
|
if (_requireIntroductions) {
|
||||||
changes.put(UDPTransport.PROP_FORCE_INTRODUCERS, "true");
|
changes.put(UDPTransport.PROP_FORCE_INTRODUCERS, "true");
|
||||||
addFormNotice(_("Requiring SSU introducers"));
|
addFormNotice(_("Requiring SSU introducers"));
|
||||||
|
@ -135,6 +135,16 @@ public class ConfigNetHelper extends HelperBase {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* default false, inverse of default true property
|
||||||
|
* @since 0.8.13
|
||||||
|
*/
|
||||||
|
public String getUdpDisabledChecked() {
|
||||||
|
if (!_context.getBooleanPropertyDefaultTrue(TransportManager.PROP_ENABLE_UDP))
|
||||||
|
return CHECKED;
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
public String getRequireIntroductionsChecked() {
|
public String getRequireIntroductionsChecked() {
|
||||||
short status = _context.commSystem().getReachabilityStatus();
|
short status = _context.commSystem().getReachabilityStatus();
|
||||||
switch (status) {
|
switch (status) {
|
||||||
|
@ -68,6 +68,8 @@
|
|||||||
</p><p><b><%=intl._("UDP Configuration:")%></b><br>
|
</p><p><b><%=intl._("UDP Configuration:")%></b><br>
|
||||||
<%=intl._("UDP port:")%>
|
<%=intl._("UDP port:")%>
|
||||||
<input name ="udpPort" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="configuredUdpPort" />" ><br>
|
<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._("Completely disable")%> <i><%=intl._("(select only if behind a firewall that blocks outbound UDP)")%></i><br>
|
||||||
<% /********
|
<% /********
|
||||||
<!-- let's keep this simple...
|
<!-- let's keep this simple...
|
||||||
<input type="checkbox" class="optbox" 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" /> />
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2012-01-27 zzz
|
||||||
|
* Build: Repack release jars with pack200 -r, saves about 1% and
|
||||||
|
might save a little memory at runtime too
|
||||||
|
* confignet: Add UDP disable option
|
||||||
|
* SAM: Remove client demo classes from sam.jar
|
||||||
|
|
||||||
2012-01-26 zzz
|
2012-01-26 zzz
|
||||||
* configclients: Fix form action default
|
* configclients: Fix form action default
|
||||||
* NetDB: Increase min ff to 200
|
* NetDB: Increase min ff to 200
|
||||||
|
Reference in New Issue
Block a user