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 String _sharePct;
|
||||
private boolean _ratesOnly;
|
||||
private boolean _udpDisabled;
|
||||
private final Map<String, String> changes = new HashMap();
|
||||
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;
|
||||
}
|
||||
|
||||
/** @since 0.8.13 */
|
||||
public void setDisableUDP(String foo) {
|
||||
_udpDisabled = true;
|
||||
}
|
||||
|
||||
private void recheckReachability() {
|
||||
_context.commSystem().recheckReachability();
|
||||
addFormNotice(_("Rechecking router reachability..."));
|
||||
@@ -270,6 +276,16 @@ public class ConfigNetHandler extends FormHandler {
|
||||
}
|
||||
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) {
|
||||
changes.put(UDPTransport.PROP_FORCE_INTRODUCERS, "true");
|
||||
addFormNotice(_("Requiring SSU introducers"));
|
||||
|
||||
Reference in New Issue
Block a user