i2psnark:

- Increase default to 3 hops (ticket #966)
   - Reduce upload threshold for auto-stop
   - Revert addition of js mime type, it was already in the default
This commit is contained in:
zzz
2014-09-26 14:24:21 +00:00
parent 72f57255f0
commit 2c79853ffe
6 changed files with 19 additions and 11 deletions

View File

@ -544,7 +544,7 @@ public class SnarkManager implements CompleteListener {
if (!_config.containsKey(PROP_I2CP_PORT))
_config.setProperty(PROP_I2CP_PORT, "7654");
if (!_config.containsKey(PROP_I2CP_OPTS))
_config.setProperty(PROP_I2CP_OPTS, "inbound.length=2 inbound.lengthVariance=0 outbound.length=2 outbound.lengthVariance=0 inbound.quantity=3 outbound.quantity=3");
_config.setProperty(PROP_I2CP_OPTS, "inbound.length=3 outbound.length=3 inbound.quantity=3 outbound.quantity=3");
//if (!_config.containsKey(PROP_EEP_HOST))
// _config.setProperty(PROP_EEP_HOST, "127.0.0.1");
//if (!_config.containsKey(PROP_EEP_PORT))

View File

@ -530,7 +530,7 @@ public class TrackerClient implements Runnable {
coordinator.getPeerCount() <= 0 &&
_util.getContext().clock().now() > _startedOn + 2*60*60*1000 &&
snark.getTotalLength() > 0 &&
uploaded >= snark.getTotalLength() * 3 / 2) {
uploaded >= snark.getTotalLength() * 5 / 4) {
if (_log.shouldLog(Log.WARN))
_log.warn("Auto stopping " + snark.getBaseName());
snark.setAutoStoppable(false);

View File

@ -2232,15 +2232,15 @@ public class I2PSnarkServlet extends BasicServlet {
out.write("<tr><td>");
out.write(_("Inbound Settings"));
out.write(":<td>");
out.write(renderOptions(1, 6, options.remove("inbound.quantity"), "inbound.quantity", TUNNEL));
out.write(renderOptions(1, 6, 3, options.remove("inbound.quantity"), "inbound.quantity", TUNNEL));
out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
out.write(renderOptions(0, 4, options.remove("inbound.length"), "inbound.length", HOP));
out.write(renderOptions(0, 4, 3, options.remove("inbound.length"), "inbound.length", HOP));
out.write("<tr><td>");
out.write(_("Outbound Settings"));
out.write(":<td>");
out.write(renderOptions(1, 6, options.remove("outbound.quantity"), "outbound.quantity", TUNNEL));
out.write(renderOptions(1, 6, 3, options.remove("outbound.quantity"), "outbound.quantity", TUNNEL));
out.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
out.write(renderOptions(0, 4, options.remove("outbound.length"), "outbound.length", HOP));
out.write(renderOptions(0, 4, 3, options.remove("outbound.length"), "outbound.length", HOP));
if (!_context.isRouterContext()) {
out.write("<tr><td>");
@ -2393,8 +2393,8 @@ public class I2PSnarkServlet extends BasicServlet {
private static final String DUMMY1 = "1 ";
/** modded from ConfigTunnelsHelper @since 0.7.14 */
private String renderOptions(int min, int max, String strNow, String selName, String name) {
int now = 2;
private String renderOptions(int min, int max, int dflt, String strNow, String selName, String name) {
int now = dflt;
try {
now = Integer.parseInt(strNow);
} catch (Throwable t) {}