* 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.
This commit is contained in:
jrandom
2005-03-07 00:07:27 +00:00
committed by zzz
parent 01979c08b3
commit df6c52fe75
12 changed files with 86 additions and 43 deletions

View File

@ -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);
}
}
}

View File

@ -61,6 +61,8 @@ class WebEditPageFormGenerator {
buf.append("value=\"squid.i2p\" ");
buf.append("/><br />\n");
addStreamingOptions(buf, controller);
buf.append("<hr />Note: the following options are shared across all client tunnels and");
buf.append(" HTTP proxies<br />\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)<br />\n");
addStreamingOptions(buf, controller);
buf.append("<hr />Note: the following options are shared across all client tunnels and");
buf.append(" HTTP proxies<br />\n");
@ -122,6 +126,8 @@ class WebEditPageFormGenerator {
buf.append("<input type=\"hidden\" name=\"privKeyGenerate\" value=\"true\" />");
}
addStreamingOptions(buf, controller);
addOptions(buf, controller);
buf.append("<input type=\"submit\" name=\"action\" value=\"Save\">\n");
buf.append("<input type=\"submit\" name=\"action\" value=\"Remove\">\n");
@ -164,6 +170,8 @@ class WebEditPageFormGenerator {
buf.append("<input type=\"hidden\" name=\"privKeyGenerate\" value=\"true\" />");
}
addStreamingOptions(buf, controller);
addOptions(buf, controller);
buf.append("<input type=\"submit\" name=\"action\" value=\"Save\">\n");
buf.append("<input type=\"submit\" name=\"action\" value=\"Remove\">\n");
@ -204,8 +212,9 @@ class WebEditPageFormGenerator {
buf.append(" checked=\"true\" />\n<br />\n");
else
buf.append(" />\n<br />\n");
}
/**
* Generate the fields asking for what port and interface the tunnel should
* listen on.
@ -243,6 +252,46 @@ class WebEditPageFormGenerator {
buf.append("\"><br />\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("<b>Delay connection briefly? </b> ");
buf.append("<input type=\"checkbox\" name=\"connectDelay\" value=\"");
buf.append((connectDelay > 0 ? connectDelay : 1000)).append("\" ");
if (connectDelay > 0)
buf.append("checked=\"true\" ");
buf.append("/> (useful for brief request/response connections)<br />\n");
buf.append("<b>Communication profile:</b>");
buf.append("<select name=\"profile\">");
if (maxWindowSize <= 0)
buf.append("<option value=\"interactive\">Interactive</option><option value=\"bulk\" selected=\"true\">Bulk</option>");
else
buf.append("<option value=\"interactive\" selected=\"true\">Interactive</option><option value=\"bulk\">Bulk</option>");
buf.append("</select><br />\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("<b>Tunnel depth:</b> ");
@ -328,21 +359,6 @@ class WebEditPageFormGenerator {
}
buf.append("</select><br />\n");
buf.append("<b>Delay connection briefly? </b> ");
buf.append("<input type=\"checkbox\" name=\"connectDelay\" value=\"");
buf.append((connectDelay > 0 ? connectDelay : 1000)).append("\" ");
if (connectDelay > 0)
buf.append("checked=\"true\" ");
buf.append("/> (useful for brief request/response connections)<br />\n");
buf.append("<b>Communication profile:</b>");
buf.append("<select name=\"profile\">");
if (maxWindowSize <= 0)
buf.append("<option value=\"interactive\">Interactive</option><option value=\"bulk\" selected=\"true\">Bulk</option>");
else
buf.append("<option value=\"interactive\" selected=\"true\">Interactive</option><option value=\"bulk\">Bulk</option>");
buf.append("</select><br />\n");
buf.append("<b>I2CP host:</b> ");
buf.append("<input type=\"text\" name=\"clientHost\" size=\"20\" value=\"");
if ( (controller != null) && (controller.getI2CPHost() != null) )

View File

@ -296,6 +296,10 @@ public class WebEditPageHelper {
cOpt.setProperty("option.inbound.length", _tunnelDepth);
cOpt.setProperty("option.outbound.length", _tunnelDepth);
}
// these are per-proxy settings, not per-session settings, and
// as such don't need to be shared. the values are propogated
// to the current tunnel's settings via cur.setConfig above
/*
if (_connectDelay)
cOpt.setProperty("option.i2p.streaming.connectDelay", "1000");
else
@ -304,6 +308,7 @@ public class WebEditPageHelper {
cOpt.setProperty("option.i2p.streaming.maxWindowSize", "1");
else
cOpt.remove("option.i2p.streaming.maxWindowSize");
*/
if (_name != null) {
cOpt.setProperty("option.inbound.nickname", _name);
cOpt.setProperty("option.outbound.nickname", _name);

View File

@ -193,6 +193,7 @@
<copy file="installer/resources/osid" todir="pkg-temp/" />
<copy file="installer/resources/postinstall.bat" todir="pkg-temp/" />
<copy file="installer/resources/postinstall.sh" todir="pkg-temp/" />
<copy file="installer/resources/startRouter.sh" todir="pkg-temp/" />
<copy file="installer/resources/systray.config" todir="pkg-temp/" />
<!-- <copy file="installer/resources/uninstall_i2p_service_unix" todir="pkg-temp/" /> -->
<copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" />

View File

@ -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);

View File

@ -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

View File

@ -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"

View File

@ -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."

View File

@ -0,0 +1,2 @@
# overly redundant, yet perhaps helpful for new users
sh i2prouter start

View File

@ -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;
}

View File

@ -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);

View File

@ -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 });