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("
\n");
- buf.append("Start automatically? \n");
- buf.append("\n
\n");
- else
- buf.append(" />\n
\n");
}
/**
diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageHelper.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageHelper.java
index 8fbe2f9d3..a8e002497 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageHelper.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageHelper.java
@@ -29,6 +29,7 @@ public class WebEditPageHelper {
private String _i2cpPort;
private String _tunnelDepth;
private String _tunnelCount;
+ private boolean _connectDelay;
private String _customOptions;
private String _proxyList;
private String _port;
@@ -164,6 +165,9 @@ public class WebEditPageHelper {
public void setStartOnLoad(String moo) {
_startOnLoad = true;
}
+ public void setConnectDelay(String moo) {
+ _connectDelay = true;
+ }
/**
* Process the form and display any resulting messages
@@ -252,6 +256,27 @@ public class WebEditPageHelper {
cur.setConfig(config, "");
}
+ if ("httpclient".equals(cur.getType()) || "client".equals(cur.getType())) {
+ // all clients use the same I2CP session, and as such, use the same
+ // I2CP options
+ List controllers = TunnelControllerGroup.getInstance().getControllers();
+ for (int i = 0; i < controllers.size(); i++) {
+ TunnelController c = (TunnelController)controllers.get(i);
+ if (c == cur) continue;
+ if ("httpclient".equals(c.getType()) || "client".equals(c.getType())) {
+ Properties cOpt = c.getConfig("");
+ if (_tunnelCount != null)
+ cOpt.setProperty("option.tunnels.numInbound", _tunnelCount);
+ if (_tunnelDepth != null)
+ cOpt.setProperty("option.tunnels.depthInbound", _tunnelDepth);
+ if (_connectDelay)
+ cOpt.setProperty("option.i2p.streaming.connectDelay", "1000");
+ else
+ cOpt.setProperty("option.i2p.streaming.connectDelay", "0");
+ c.setConfig(cOpt, "");
+ }
+ }
+ }
return getMessages(doSave());
}
@@ -324,6 +349,7 @@ public class WebEditPageHelper {
String val = pair.substring(eq+1);
if ("tunnels.numInbound".equals(key)) continue;
if ("tunnels.depthInbound".equals(key)) continue;
+ if ("i2p.streaming.connectDelay".equals(key)) continue;
config.setProperty("option." + key, val);
}
}
@@ -334,6 +360,10 @@ public class WebEditPageHelper {
config.setProperty("option.tunnels.numInbound", _tunnelCount);
if (_tunnelDepth != null)
config.setProperty("option.tunnels.depthInbound", _tunnelDepth);
+ if (_connectDelay)
+ config.setProperty("option.i2p.streaming.connectDelay", "1000");
+ else
+ config.setProperty("option.i2p.streaming.connectDelay", "0");
}
/**
diff --git a/history.txt b/history.txt
index b4f7cae87..75b533b82 100644
--- a/history.txt
+++ b/history.txt
@@ -1,4 +1,10 @@
-$Id: history.txt,v 1.78 2004/11/21 14:42:57 jrandom Exp $
+$Id: history.txt,v 1.79 2004/11/21 17:31:33 jrandom Exp $
+
+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.
2004-11-21 jrandom
* Only allow small clock skews after the first 10 minutes of operation
diff --git a/installer/resources/i2ptunnel.config b/installer/resources/i2ptunnel.config
index 74bc1a67f..3125bebf6 100644
--- a/installer/resources/i2ptunnel.config
+++ b/installer/resources/i2ptunnel.config
@@ -9,6 +9,7 @@ tunnel.0.i2cpHost=localhost
tunnel.0.i2cpPort=7654
tunnel.0.option.tunnels.depthInbound=2
tunnel.0.option.tunnels.numInbound=2
+tunnel.0.option.i2p.streaming.connectDelay=1000
tunnel.0.startOnLoad=true
# irc
@@ -17,11 +18,12 @@ tunnel.1.description=IRC proxy to access the anonymous irc net
tunnel.1.type=client
tunnel.1.interface=127.0.0.1
tunnel.1.listenPort=6668
-tunnel.1.targetDestination=irc.duck.i2p
+tunnel.1.targetDestination=irc.duck.i2p,irc.baffled.i2p
tunnel.1.i2cpHost=localhost
tunnel.1.i2cpPort=7654
tunnel.1.option.tunnels.depthInbound=2
tunnel.1.option.tunnels.numInbound=2
+tunnel.1.option.i2p.streaming.connectDelay=1000
tunnel.1.startOnLoad=true
# I2P's cvs server
@@ -59,6 +61,7 @@ tunnel.4.listenPort=7659
tunnel.4.name=smtp.postman.i2p
tunnel.4.option.tunnels.depthInbound=2
tunnel.4.option.tunnels.numInbound=2
+tunnel.4.option.i2p.streaming.connectDelay=1000
tunnel.4.startOnLoad=false
tunnel.4.targetDestination=smtp.postman.i2p
tunnel.4.type=client
@@ -72,19 +75,7 @@ tunnel.5.interface=127.0.0.1
tunnel.5.listenPort=7660
tunnel.5.option.tunnels.depthInbound=2
tunnel.5.option.tunnels.numInbound=2
+tunnel.5.option.i2p.streaming.connectDelay=1000
tunnel.5.startOnLoad=false
tunnel.5.targetDestination=pop.postman.i2p
-tunnel.5.type=client
-
-# another irc server, linked with irc.duck.i2p and IIP
-tunnel.6.description=irc.baffled.i2p
-tunnel.6.i2cpHost=localhost
-tunnel.6.i2cpPort=7654
-tunnel.6.interface=localhost
-tunnel.6.listenPort=7661
-tunnel.6.name=irc.baffled.i2p
-tunnel.6.option.tunnels.depthInbound=2
-tunnel.6.option.tunnels.numInbound=2
-tunnel.6.startOnLoad=false
-tunnel.6.targetDestination=irc.baffled.i2p
-tunnel.6.type=client
+tunnel.5.type=client
\ No newline at end of file
diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java
index f53712c3c..31df88dad 100644
--- a/router/java/src/net/i2p/router/RouterVersion.java
+++ b/router/java/src/net/i2p/router/RouterVersion.java
@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
- public final static String ID = "$Revision: 1.83 $ $Date: 2004/11/21 14:42:58 $";
+ public final static String ID = "$Revision: 1.84 $ $Date: 2004/11/21 17:31:33 $";
public final static String VERSION = "0.4.1.4";
- public final static long BUILD = 12;
+ public final static long BUILD = 13;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);