diff --git a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java index 559405277..20407a04b 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java +++ b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java @@ -118,10 +118,14 @@ public class SnarkManager implements Snark.CompleteListener { if (!_config.containsKey(PROP_UPLOADERS_TOTAL)) _config.setProperty(PROP_UPLOADERS_TOTAL, "" + Snark.MAX_TOTAL_UPLOADERS); if (!_config.containsKey(PROP_UPBW_MAX)) { - if (_context instanceof RouterContext) - _config.setProperty(PROP_UPBW_MAX, "" + (((RouterContext)_context).bandwidthLimiter().getOutboundKBytesPerSecond() / 2)); - else + try { + if (_context instanceof RouterContext) + _config.setProperty(PROP_UPBW_MAX, "" + (((RouterContext)_context).bandwidthLimiter().getOutboundKBytesPerSecond() / 2)); + else + _config.setProperty(PROP_UPBW_MAX, "" + DEFAULT_MAX_UP_BW); + } catch (NoClassDefFoundError ncdfe) { _config.setProperty(PROP_UPBW_MAX, "" + DEFAULT_MAX_UP_BW); + } } if (!_config.containsKey(PROP_DIR)) _config.setProperty(PROP_DIR, "i2psnark"); diff --git a/apps/i2psnark/java/src/org/klomp/snark/TrackerInfo.java b/apps/i2psnark/java/src/org/klomp/snark/TrackerInfo.java index 6d464f87b..765598fab 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/TrackerInfo.java +++ b/apps/i2psnark/java/src/org/klomp/snark/TrackerInfo.java @@ -95,7 +95,14 @@ public class TrackerInfo Iterator it = l.iterator(); while (it.hasNext()) { - PeerID peerID = new PeerID(((BEValue)it.next()).getMap()); + PeerID peerID; + try { + peerID = new PeerID(((BEValue)it.next()).getMap()); + } catch (InvalidBEncodingException ibe) { + // don't let one bad entry spoil the whole list + Snark.debug("Discarding peer from list: " + ibe, Snark.ERROR); + continue; + } peers.add(new Peer(peerID, my_id, metainfo)); } diff --git a/apps/routerconsole/jsp/configtunnels.jsp b/apps/routerconsole/jsp/configtunnels.jsp index 0b6fcb714..e4559b86c 100644 --- a/apps/routerconsole/jsp/configtunnels.jsp +++ b/apps/routerconsole/jsp/configtunnels.jsp @@ -25,6 +25,15 @@ +

+ NOTE: The default settings work for most people. + There is a fundamental tradeoff between anonymity and performance. + Tunnels longer than 3 hops (for example 2 hops + 0-2 hops, 3 hops + 0-1 hops, 3 hops + 0-2 hops), + or a high quantity + backup quantity, may severely reduce performance or reliability. + High CPU and/or high outbound bandwidth usage may result. + Change these settings with care, and adjust them if you have problems. +

+
<% String prev = System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.noncePrev", prev); diff --git a/build.xml b/build.xml index a6ac3f787..866671d5e 100644 --- a/build.xml +++ b/build.xml @@ -9,6 +9,7 @@ + @@ -17,22 +18,24 @@ + - + + + + + + + - - - - - @@ -91,28 +94,23 @@ - + + + + + + + + - - - - - - - - @@ -304,68 +302,35 @@ + + + - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/history.txt b/history.txt index d2fa66902..0d33ee66d 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,17 @@ +2008-05-26 zzz + * Throttle: Set a default router.maxParticipatingTunnels = 3000 (was none) + * Stats: Add a fake uptime if not publishing stats, to get participating tunnels + * build.xml: + - Add an updateSmall target which includes only the essentials + - Clean up the build file some + - Remove empty eepsite/ and subdirs from i2pupdate.zip + * configtunnels.jsp: Add warning + * i2psnark: Catch a bencode exception (bad peer from tracker) earlier + * i2psnark-standalone: Fix exception http://forum.i2p/viewtopic.php?p=12217 + +2008-05-22 welterde + * Change jetty download location in build script + 2008-05-20 zzz * Reachability: - Call the previously unused profile.tunnelTestFailed() diff --git a/router/java/src/net/i2p/router/RouterThrottleImpl.java b/router/java/src/net/i2p/router/RouterThrottleImpl.java index 8035d89fa..cfe11e8ad 100644 --- a/router/java/src/net/i2p/router/RouterThrottleImpl.java +++ b/router/java/src/net/i2p/router/RouterThrottleImpl.java @@ -32,6 +32,7 @@ class RouterThrottleImpl implements RouterThrottle { private static int THROTTLE_EVENT_LIMIT = 30; private static final String PROP_MAX_TUNNELS = "router.maxParticipatingTunnels"; + private static final String DEFAULT_MAX_TUNNELS = "3000"; // Unless share BW > 300KBps, BW limit will kick in first private static final String PROP_DEFAULT_KBPS_THROTTLE = "router.defaultKBpsThrottle"; /** tunnel acceptance */ @@ -187,7 +188,7 @@ class RouterThrottleImpl implements RouterThrottle { } } - String maxTunnels = _context.getProperty(PROP_MAX_TUNNELS); + String maxTunnels = _context.getProperty(PROP_MAX_TUNNELS, DEFAULT_MAX_TUNNELS); if (maxTunnels != null) { try { int max = Integer.parseInt(maxTunnels); diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 4c90a8a1b..2e12db0e1 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -17,7 +17,7 @@ import net.i2p.CoreVersion; public class RouterVersion { public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $"; public final static String VERSION = "0.6.1.33"; - public final static long BUILD = 7; + public final static long BUILD = 8; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); 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 212dc7d34..4a6620c6e 100644 --- a/router/java/src/net/i2p/router/StatisticsManager.java +++ b/router/java/src/net/i2p/router/StatisticsManager.java @@ -205,6 +205,8 @@ public class StatisticsManager implements Service { _log.debug("Publishing peer rankings"); } else { + // So that we will still get build requests + stats.setProperty("stat_uptime", "90m"); _log.debug("Not publishing peer rankings"); }