forked from I2P_Developers/i2p.i2p
i2ptunnel: Change enc type defaults
ECIES (ratchet) introduced about 4 years ago, and we are still defaulting to both ECIES and ElG in most places. There are four cases: - New install: $I2P/i2ptunnel.config as shipped - New tunnel: i2ptunnel code sets default - Existing tunnel, no enc type config: i2ptunnel code sets default - Existing tunnel, config changed and saved via UI in last 4 years: Setting as in config file Changes: - New install: Change eepsite and IRC client to ECIES-only; shared clients remains both - New tunnel: Change from both to ECIES-only - Existing tunnel, no enc type config: Change servers to ECIES-only; clients remain both - Existing tunnel with enc type config: No defaults, no change
This commit is contained in:
@@ -891,7 +891,7 @@ public class TunnelController implements Logging {
|
||||
if (!_config.containsKey(OPT_BUNDLE_REPLY))
|
||||
_config.setProperty(OPT_BUNDLE_REPLY, "false");
|
||||
if (!_config.containsKey(OPT_ENCTYPE))
|
||||
_config.setProperty(OPT_ENCTYPE, "4,0");
|
||||
_config.setProperty(OPT_ENCTYPE, "4");
|
||||
} else if (!isClient(type)) {
|
||||
// override UI that sets it to false
|
||||
_config.setProperty(OPT_BUNDLE_REPLY, "true");
|
||||
@@ -903,7 +903,7 @@ public class TunnelController implements Logging {
|
||||
if (!_config.containsKey(OPT_LOW_TAGS))
|
||||
_config.setProperty(OPT_LOW_TAGS, "14");
|
||||
if (!_config.containsKey(OPT_ENCTYPE))
|
||||
_config.setProperty(OPT_ENCTYPE, "4,0");
|
||||
_config.setProperty(OPT_ENCTYPE, "4");
|
||||
}
|
||||
// same default logic as in EditBean.getSigType() and GeneralHelper.getSigType()
|
||||
if (!isClient(type) ||
|
||||
|
||||
@@ -790,8 +790,8 @@ public class GeneralHelper {
|
||||
public boolean hasEncType(int tunnel, int encType) {
|
||||
TunnelController tun = getController(tunnel);
|
||||
if (tun == null) {
|
||||
// New clients and servers default to both
|
||||
return encType == 4 || encType == 0;
|
||||
// New clients and servers now default to ECIES-only
|
||||
return encType == 4;
|
||||
}
|
||||
// migration: HTTP proxy and shared clients default to both
|
||||
String type = tun.getType();
|
||||
@@ -806,9 +806,9 @@ public class GeneralHelper {
|
||||
} else if (TunnelController.TYPE_HTTP_SERVER.equals(type) ||
|
||||
TunnelController.TYPE_IRC_SERVER.equals(type) ||
|
||||
TunnelController.TYPE_STREAMR_SERVER.equals(type)) {
|
||||
dflt = "4,0";
|
||||
dflt = "4";
|
||||
} else {
|
||||
dflt = "0";
|
||||
dflt = "4,0";
|
||||
}
|
||||
String senc = getProperty(tunnel, "i2cp.leaseSetEncType", dflt);
|
||||
String[] senca = DataHelper.split(senc, ",");
|
||||
|
||||
@@ -909,9 +909,9 @@ public class TunnelConfig {
|
||||
if (TunnelController.TYPE_HTTP_SERVER.equals(_type) ||
|
||||
TunnelController.TYPE_IRC_SERVER.equals(_type) ||
|
||||
TunnelController.TYPE_STREAMR_SERVER.equals(_type)) {
|
||||
dflt = "4,0";
|
||||
dflt = "4";
|
||||
} else {
|
||||
dflt = "0";
|
||||
dflt = "4,0";
|
||||
}
|
||||
String senc = config.getProperty(OPT + "i2cp.leaseSetEncType", dflt);
|
||||
String slstyp = config.getProperty(OPT + "i2cp.leaseSetType", "0");
|
||||
|
||||
@@ -55,7 +55,7 @@ tunnel.1.option.i2cp.closeIdleTime=1200000
|
||||
tunnel.1.option.i2cp.closeOnIdle=true
|
||||
tunnel.1.option.i2cp.delayOpen=true
|
||||
tunnel.1.option.i2cp.destination.sigType=7
|
||||
tunnel.1.option.i2cp.leaseSetEncType=4,0
|
||||
tunnel.1.option.i2cp.leaseSetEncType=4
|
||||
tunnel.1.option.i2cp.newDestOnResume=false
|
||||
tunnel.1.option.i2cp.reduceIdleTime=600000
|
||||
tunnel.1.option.i2cp.reduceOnIdle=true
|
||||
@@ -82,7 +82,7 @@ tunnel.3.i2cpPort=7654
|
||||
tunnel.3.option.inbound.nickname=eepsite
|
||||
tunnel.3.option.outbound.nickname=eepsite
|
||||
tunnel.3.option.i2cp.destination.sigType=7
|
||||
tunnel.3.option.i2cp.leaseSetEncType=4,0
|
||||
tunnel.3.option.i2cp.leaseSetEncType=4
|
||||
tunnel.3.option.inbound.length=3
|
||||
tunnel.3.option.inbound.lengthVariance=0
|
||||
tunnel.3.option.outbound.length=3
|
||||
|
||||
Reference in New Issue
Block a user