From 6d5fc8ca21810f8ee5d93e7628b59e550499517f Mon Sep 17 00:00:00 2001 From: jrandom Date: Mon, 22 Nov 2004 17:57:16 +0000 Subject: [PATCH] 2004-11-21 jrandom * Update the I2PTunnel web interface to include an option for the new streaming lib (which is ignored until the 0.4.2 release). * Revised the I2PTunnel web interface to keep the I2CP options of client and httpclient tunnels in sync, as they all share the same I2CP session. --- .../i2ptunnel/WebEditPageFormGenerator.java | 36 +++++++++++++++---- .../net/i2p/i2ptunnel/WebEditPageHelper.java | 30 ++++++++++++++++ history.txt | 8 ++++- installer/resources/i2ptunnel.config | 21 ++++------- .../src/net/i2p/router/RouterVersion.java | 4 +-- 5 files changed, 75 insertions(+), 24 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageFormGenerator.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageFormGenerator.java index 1b2c3ac6e..5f13819f9 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageFormGenerator.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageFormGenerator.java @@ -60,6 +60,9 @@ class WebEditPageFormGenerator { buf.append("value=\"squid.i2p\" "); buf.append("/>
\n"); + buf.append("
Note: the following options are shared across all client tunnels and"); + buf.append(" HTTP proxies
\n"); + addOptions(buf, controller); buf.append("\n"); buf.append("\n"); @@ -80,6 +83,9 @@ class WebEditPageFormGenerator { buf.append("value=\"").append(controller.getTargetDestination()).append("\" "); buf.append(" /> (either the hosts.txt name or the full base64 destination)
\n"); + buf.append("
Note: the following options are shared across all client tunnels and"); + buf.append(" HTTP proxies
\n"); + addOptions(buf, controller); buf.append("
\n"); buf.append("\n"); @@ -145,6 +151,13 @@ class WebEditPageFormGenerator { if ( (controller != null) && (controller.getDescription() != null) ) buf.append("value=\"").append(controller.getDescription()).append("\" "); buf.append("/>
\n"); + + buf.append("Start automatically? \n"); + buf.append("\n
\n"); + else + buf.append(" />\n
\n"); } /** @@ -194,6 +207,7 @@ class WebEditPageFormGenerator { private static void addOptions(StringBuffer buf, TunnelController controller) { int tunnelDepth = 2; int numTunnels = 2; + int connectDelay = 0; Properties opts = getOptions(controller); if (opts != null) { String depth = opts.getProperty("tunnels.depthInbound"); @@ -212,6 +226,14 @@ class WebEditPageFormGenerator { numTunnels = 2; } } + String delay = opts.getProperty("i2p.streaming.connectDelay"); + if (delay != null) { + try { + connectDelay = Integer.parseInt(delay); + } catch (NumberFormatException nfe) { + connectDelay = 0; + } + } } buf.append("Tunnel depth: "); @@ -251,6 +273,13 @@ class WebEditPageFormGenerator { } buf.append("
\n"); + buf.append("Delay connection briefly? "); + buf.append(" 0 ? connectDelay : 1000)).append("\" "); + if (connectDelay > 0) + buf.append("checked=\"true\" "); + buf.append("/> (useful for brief request/response connections)
\n"); + buf.append("I2CP host: "); buf.append("