diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java
index 6f906a138..c26eccf47 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java
@@ -283,6 +283,7 @@ public class I2PTunnelRunner extends I2PThread implements I2PSocket.SocketErrorL
//else
// _log.warn("You may ignore this", ex);
} finally {
+ _cache.release(ba);
if (_log.shouldLog(Log.INFO)) {
_log.info(direction + ": done forwarding between "
+ from + " and " + to);
@@ -304,7 +305,6 @@ public class I2PTunnelRunner extends I2PThread implements I2PSocket.SocketErrorL
finishLock.notifyAll();
// the main thread will close sockets etc. now
}
- _cache.release(ba);
}
}
}
diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageFormGenerator.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageFormGenerator.java
index dd6a1db4c..3fcf9312d 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageFormGenerator.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/WebEditPageFormGenerator.java
@@ -61,6 +61,8 @@ class WebEditPageFormGenerator {
buf.append("value=\"squid.i2p\" ");
buf.append("/>
\n");
+ addStreamingOptions(buf, controller);
+
buf.append("
Note: the following options are shared across all client tunnels and");
buf.append(" HTTP proxies
\n");
@@ -84,6 +86,8 @@ class WebEditPageFormGenerator {
buf.append("value=\"").append(controller.getTargetDestination()).append("\" ");
buf.append(" /> (either the hosts.txt name or the full base64 destination)
\n");
+ addStreamingOptions(buf, controller);
+
buf.append("
Note: the following options are shared across all client tunnels and");
buf.append(" HTTP proxies
\n");
@@ -122,6 +126,8 @@ class WebEditPageFormGenerator {
buf.append("");
}
+ addStreamingOptions(buf, controller);
+
addOptions(buf, controller);
buf.append("\n");
buf.append("\n");
@@ -164,6 +170,8 @@ class WebEditPageFormGenerator {
buf.append("");
}
+ addStreamingOptions(buf, controller);
+
addOptions(buf, controller);
buf.append("\n");
buf.append("\n");
@@ -204,8 +212,9 @@ class WebEditPageFormGenerator {
buf.append(" checked=\"true\" />\n
\n");
else
buf.append(" />\n
\n");
+
}
-
+
/**
* Generate the fields asking for what port and interface the tunnel should
* listen on.
@@ -243,6 +252,46 @@ class WebEditPageFormGenerator {
buf.append("\">
\n");
}
+ private static void addStreamingOptions(StringBuffer buf, TunnelController controller) {
+ int connectDelay = 0;
+ int maxWindowSize = -1;
+
+ Properties opts = getOptions(controller);
+ if (opts != null) {
+ String delay = opts.getProperty("i2p.streaming.connectDelay");
+ if (delay != null) {
+ try {
+ connectDelay = Integer.parseInt(delay);
+ } catch (NumberFormatException nfe) {
+ connectDelay = 0;
+ }
+ }
+ String max = opts.getProperty("i2p.streaming.maxWindowSize");
+ if (max != null) {
+ try {
+ maxWindowSize = Integer.parseInt(max);
+ } catch (NumberFormatException nfe) {
+ maxWindowSize = -1;
+ }
+ }
+ }
+
+ 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("Communication profile:");
+ buf.append("
\n");
+ }
+
/**
* Add fields for customizing the I2PSession options, including helpers for
* tunnel depth and count, as well as I2CP host and port.
@@ -253,8 +302,6 @@ class WebEditPageFormGenerator {
private static void addOptions(StringBuffer buf, TunnelController controller) {
int tunnelDepth = 2;
int numTunnels = 2;
- int connectDelay = 0;
- int maxWindowSize = -1;
Properties opts = getOptions(controller);
if (opts != null) {
String depth = opts.getProperty("inbound.length");
@@ -273,22 +320,6 @@ class WebEditPageFormGenerator {
numTunnels = 2;
}
}
- String delay = opts.getProperty("i2p.streaming.connectDelay");
- if (delay != null) {
- try {
- connectDelay = Integer.parseInt(delay);
- } catch (NumberFormatException nfe) {
- connectDelay = 0;
- }
- }
- String max = opts.getProperty("i2p.streaming.maxWindowSize");
- if (max != null) {
- try {
- maxWindowSize = Integer.parseInt(max);
- } catch (NumberFormatException nfe) {
- maxWindowSize = -1;
- }
- }
}
buf.append("Tunnel depth: ");
@@ -328,21 +359,6 @@ 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("Communication profile:");
- buf.append("
\n");
-
buf.append("I2CP host: ");
buf.append("
+
diff --git a/core/java/src/net/i2p/CoreVersion.java b/core/java/src/net/i2p/CoreVersion.java
index 2932641eb..e5ee1813d 100644
--- a/core/java/src/net/i2p/CoreVersion.java
+++ b/core/java/src/net/i2p/CoreVersion.java
@@ -14,8 +14,8 @@ package net.i2p;
*
*/
public class CoreVersion {
- public final static String ID = "$Revision: 1.28 $ $Date: 2005/02/17 17:57:53 $";
- public final static String VERSION = "0.5.0.1";
+ public final static String ID = "$Revision: 1.29 $ $Date: 2005/02/23 00:00:52 $";
+ public final static String VERSION = "0.5.0.2";
public static void main(String args[]) {
System.out.println("I2P Core version: " + VERSION);
diff --git a/history.txt b/history.txt
index 564b1d653..31aa298a5 100644
--- a/history.txt
+++ b/history.txt
@@ -1,11 +1,22 @@
-$Id: history.txt,v 1.163 2005/03/04 01:09:51 jrandom Exp $
+$Id: history.txt,v 1.164 2005/03/04 21:54:42 jrandom Exp $
+
+* 2005-03-06 0.5.0.2 released
+
+2005-03-06 jrandom
+ * Allow the I2PTunnel web interface to select streaming lib options for
+ individual client tunnels, rather than sharing them across all of them,
+ as we do with the session options. This way people can (and should) set
+ the irc proxy to interactive and the eepproxy to bulk.
+ * Added a startRouter.sh script to new installs which simply calls
+ "sh i2prouter start". This should make it clear how people should start
+ I2P.
2005-03-04 jrandom
* Filter HTTP response headers in the eepproxy, forcing Connection: close
so that broken (/malicious) webservers can't allow persistent
connections. All HTTP compliant browsers should now always close the
socket.
- * Enabled the GZIPInputStream's cache (they were'nt cached before)
+ * Enabled the GZIPInputStream's cache (they weren't cached before)
* Make sure our first send is always a SYN (duh)
* Workaround for some buggy compilers
diff --git a/installer/resources/postinstall.bat b/installer/resources/postinstall.bat
index 0b896025c..d1ce099df 100644
--- a/installer/resources/postinstall.bat
+++ b/installer/resources/postinstall.bat
@@ -30,6 +30,7 @@ del /f /q "%INSTALL_PATH%i2prouter"
del /f /q "%INSTALL_PATH%install-headless.txt"
del /f /q "%INSTALL_PATH%osid"
del /f /q "%INSTALL_PATH%postinstall.sh"
+del /f /q "%INSTALL_PATH%startRouter.sh"
:: del /f /q "%INSTALL_PATH%uninstall_i2p_service_unix"
del /f /q "%INSTALL_PATH%icons\*.xpm"
rmdir /q /s "%INSTALL_PATH%lib\wrapper"
@@ -43,6 +44,7 @@ del "%INSTALL_PATH%install_i2p_service_winnt.bat"
del "%INSTALL_PATH%install-headless.txt"
del "%INSTALL_PATH%osid"
del "%INSTALL_PATH%postinstall.sh"
+del "%INSTALL_PATH%startRouter.sh"
:: del "%INSTALL_PATH%uninstall_i2p_service_unix"
del "%INSTALL_PATH%uninstall_i2p_service_winnt.bat"
del "%INSTALL_PATH%icons\*.xpm"
diff --git a/installer/resources/postinstall.sh b/installer/resources/postinstall.sh
index 2bb32b230..35ff2fd6e 100644
--- a/installer/resources/postinstall.sh
+++ b/installer/resources/postinstall.sh
@@ -19,6 +19,7 @@ fi
chmod 744 ./i2prouter
# chmod 744 ./install_i2p_service_unix
chmod 744 ./osid
+chmod 744 ./startRouter.sh
# chmod 744 ./uninstall_i2p_service_unix
ERROR_MSG="Cannot determine operating system type. From the subdirectory in lib/wrapper matching your operating system, please move i2psvc to your base I2P directory, and move the remaining two files to the lib directory."
diff --git a/installer/resources/startRouter.sh b/installer/resources/startRouter.sh
new file mode 100644
index 000000000..f5de1d125
--- /dev/null
+++ b/installer/resources/startRouter.sh
@@ -0,0 +1,2 @@
+# overly redundant, yet perhaps helpful for new users
+sh i2prouter start
\ No newline at end of file
diff --git a/router/java/src/net/i2p/router/MessageValidator.java b/router/java/src/net/i2p/router/MessageValidator.java
index 18713f946..e12417c2d 100644
--- a/router/java/src/net/i2p/router/MessageValidator.java
+++ b/router/java/src/net/i2p/router/MessageValidator.java
@@ -23,6 +23,8 @@ public class MessageValidator {
_context = context;
context.statManager().createRateStat("router.duplicateMessageId", "Note that a duplicate messageId was received", "Router",
new long[] { 10*60*1000l, 60*60*1000l, 3*60*60*1000l, 24*60*60*1000l });
+ context.statManager().createRateStat("router.invalidMessageTime", "Note that a message outside the valid range was received", "Router",
+ new long[] { 10*60*1000l, 60*60*1000l, 3*60*60*1000l, 24*60*60*1000l });
}
@@ -36,10 +38,12 @@ public class MessageValidator {
if (now - Router.CLOCK_FUDGE_FACTOR >= expiration) {
if (_log.shouldLog(Log.WARN))
_log.warn("Rejecting message " + messageId + " because it expired " + (now-expiration) + "ms ago");
+ _context.statManager().addRateData("router.invalidMessageTime", (now-expiration), 0);
return false;
} else if (now + 4*Router.CLOCK_FUDGE_FACTOR < expiration) {
if (_log.shouldLog(Log.WARN))
_log.warn("Rejecting message " + messageId + " because it will expire too far in the future (" + (expiration-now) + "ms)");
+ _context.statManager().addRateData("router.invalidMessageTime", (now-expiration), 0);
return false;
}
diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java
index 87ab848e7..c5d8294a5 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.158 $ $Date: 2005/03/04 01:09:20 $";
- public final static String VERSION = "0.5.0.1";
- public final static long BUILD = 10;
+ public final static String ID = "$Revision: 1.159 $ $Date: 2005/03/04 21:54:43 $";
+ public final static String VERSION = "0.5.0.2";
+ public final static long BUILD = 0;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);
diff --git a/router/java/src/net/i2p/router/StatisticsManager.java b/router/java/src/net/i2p/router/StatisticsManager.java
index e439d4abf..d3e8bb73b 100644
--- a/router/java/src/net/i2p/router/StatisticsManager.java
+++ b/router/java/src/net/i2p/router/StatisticsManager.java
@@ -33,7 +33,7 @@ public class StatisticsManager implements Service {
public final static String PROP_PUBLISH_RANKINGS = "router.publishPeerRankings";
public final static String DEFAULT_PROP_PUBLISH_RANKINGS = "true";
public final static String PROP_MAX_PUBLISHED_PEERS = "router.publishPeerMax";
- public final static int DEFAULT_MAX_PUBLISHED_PEERS = 20;
+ public final static int DEFAULT_MAX_PUBLISHED_PEERS = 10;
private final DecimalFormat _fmt;
private final DecimalFormat _pct;
@@ -102,6 +102,7 @@ public class StatisticsManager implements Service {
stats.putAll(_context.profileManager().summarizePeers(_publishedStats));
includeThroughput(stats);
+ includeRate("router.invalidMessageTime", stats, new long[] { 10*60*1000, 3*60*60*1000 });
includeRate("router.duplicateMessageId", stats, new long[] { 24*60*60*1000 });
includeRate("tunnel.duplicateIV", stats, new long[] { 24*60*60*1000 });
includeRate("tunnel.fragmentedComplete", stats, new long[] { 10*60*1000, 3*60*60*1000 });