I2PTunnel: Add option for multihoming optimization

This commit is contained in:
zzz
2015-01-11 17:36:39 +00:00
parent 45b3e44cc2
commit 3270ba840e
3 changed files with 29 additions and 3 deletions

View File

@@ -318,6 +318,11 @@ public class EditBean extends IndexBean {
return getBooleanProperty(tunnel, I2PTunnelHTTPClient.PROP_INTERNAL_SSL);
}
/** @since 0.9.18 */
public boolean getMultihome(int tunnel) {
return getBooleanProperty(tunnel, "shouldBundleReplyInfo");
}
/** all proxy auth @since 0.8.2 */
public boolean getProxyAuth(int tunnel) {
return getProperty(tunnel, I2PTunnelHTTPClientBase.PROP_AUTH, "false") != "false";

View File

@@ -969,6 +969,11 @@ public class IndexBean {
_booleanOptions.add(I2PTunnelHTTPClient.PROP_INTERNAL_SSL);
}
/** @since 0.9.18 */
public void setMultihome(String moo) {
_booleanOptions.add("shouldBundleReplyInfo");
}
/** all proxy auth @since 0.8.2 */
public void setProxyAuth(String s) {
if (s != null)
@@ -1261,18 +1266,20 @@ public class IndexBean {
config.setProperty(TunnelController.PROP_SHARED, _sharedClient + "");
for (String p : _booleanClientOpts)
config.setProperty(OPT + p, "" + _booleanOptions.contains(p));
for (String p : _otherClientOpts)
for (String p : _otherClientOpts) {
if (_otherOptions.containsKey(p))
config.setProperty(OPT + p, _otherOptions.get(p));
}
} else {
// generic server stuff
if (_targetPort != null)
config.setProperty(TunnelController.PROP_TARGET_PORT, _targetPort);
for (String p : _booleanServerOpts)
config.setProperty(OPT + p, "" + _booleanOptions.contains(p));
for (String p : _otherServerOpts)
for (String p : _otherServerOpts) {
if (_otherOptions.containsKey(p))
config.setProperty(OPT + p, _otherOptions.get(p));
}
}
// generic proxy stuff
@@ -1414,7 +1421,8 @@ public class IndexBean {
"i2cp.reduceOnIdle", "i2cp.encryptLeaseSet", PROP_ENABLE_ACCESS_LIST, PROP_ENABLE_BLACKLIST,
I2PTunnelServer.PROP_USE_SSL,
I2PTunnelHTTPServer.OPT_REJECT_INPROXY,
I2PTunnelServer.PROP_UNIQUE_LOCAL
I2PTunnelServer.PROP_UNIQUE_LOCAL,
"shouldBundleReplyInfo"
};
private static final String _otherClientOpts[] = {
"i2cp.reduceIdleTime", "i2cp.reduceQuantity", "i2cp.closeIdleTime",

View File

@@ -435,6 +435,19 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<input value="1" type="checkbox" id="startOnLoad" name="uniqueLocal" title="Use unique IP addresses for each connecting client (local non-SSL servers only)"<%=(editBean.getUniqueLocal(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
</div>
</div>
<div class="rowItem">
<div id="optionsField" class="rowItem">
<label>
<%=intl._("Optimize for Multihoming")%>:
</label>
</div>
<div id="portField" class="rowItem">
<label for="access" accesskey="d">
<%=intl._("Enable")%>:
</label>
<input value="1" type="checkbox" id="startOnLoad" name="multihome" title="Only enable if you are hosting this service on multiple routers"<%=(editBean.getMultihome(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" />
</div>
</div>
<div class="subdivider">
<hr />
</div>