diff --git a/apps/jetty/build.xml b/apps/jetty/build.xml index 3e24fad18..2cce85311 100644 --- a/apps/jetty/build.xml +++ b/apps/jetty/build.xml @@ -545,7 +545,7 @@ - + @@ -609,7 +609,7 @@ - + @@ -626,7 +626,7 @@ - + diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml index 63b8ff54d..c7224b3ba 100644 --- a/apps/ministreaming/java/build.xml +++ b/apps/ministreaming/java/build.xml @@ -84,7 +84,7 @@ - + @@ -193,7 +193,7 @@ - + @@ -209,7 +209,7 @@ - + diff --git a/apps/streaming/java/build.xml b/apps/streaming/java/build.xml index a6e27f945..914867ae9 100644 --- a/apps/streaming/java/build.xml +++ b/apps/streaming/java/build.xml @@ -210,7 +210,7 @@ - + @@ -282,7 +282,7 @@ - + @@ -299,7 +299,7 @@ - + diff --git a/build.xml b/build.xml index bfce629f0..19e66aa23 100644 --- a/build.xml +++ b/build.xml @@ -1085,6 +1085,7 @@ + @@ -1098,8 +1099,41 @@ + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/java/build.xml b/core/java/build.xml index 4bb8bd6b2..2b02912f3 100644 --- a/core/java/build.xml +++ b/core/java/build.xml @@ -120,7 +120,7 @@ - + @@ -228,7 +228,7 @@ - + @@ -245,7 +245,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -368,7 +368,7 @@ - + diff --git a/core/java/src/net/i2p/CoreVersion.java b/core/java/src/net/i2p/CoreVersion.java index 4687ffad2..7f851b27a 100644 --- a/core/java/src/net/i2p/CoreVersion.java +++ b/core/java/src/net/i2p/CoreVersion.java @@ -18,11 +18,13 @@ package net.i2p; public class CoreVersion { /** deprecated */ - public final static String ID = "Monotone"; + public final static String ID = "Git"; /** * The version used when checking for router updates, * and exchanged between router and client over I2CP. + * This is the marketing and user-visible version. + * * If we ever need a point release for a specific * architecture only, append ".1" to VERSION * and leave PUBLISHED_VERSION unchanged. @@ -33,6 +35,11 @@ public class CoreVersion { /** * The version published in the netdb via StatisticsManager. + * This is the API version. + * It must not go to 1.x for several years, because through + * 0.9.49, the Sybil analyzer blocked releases that didn't + * start with "0.9." + * * If we ever need a point release for a specific * architecture only, append ".1" to VERSION * and leave PUBLISHED_VERSION unchanged. @@ -41,7 +48,7 @@ public class CoreVersion { * * @since 0.9.46 */ - public final static String PUBLISHED_VERSION = VERSION; + public final static String PUBLISHED_VERSION = "0.9.49"; /** * For Vuze. @@ -54,6 +61,7 @@ public class CoreVersion { public static void main(String args[]) { System.out.println("I2P Core version: " + VERSION); + System.out.println("I2P API version: " + PUBLISHED_VERSION); System.out.println("ID: " + ID); } } diff --git a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java index cb4190d6c..5d902c302 100644 --- a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java +++ b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java @@ -769,7 +769,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2 auth.setProperty(I2PClient.PROP_USER, _options.getProperty(I2PClient.PROP_USER)); auth.setProperty(I2PClient.PROP_PW, _options.getProperty(I2PClient.PROP_PW)); } - sendMessage_unchecked(new GetDateMessage(CoreVersion.VERSION, auth)); + sendMessage_unchecked(new GetDateMessage(CoreVersion.PUBLISHED_VERSION, auth)); waitForDate(); if (_log.shouldLog(Log.DEBUG)) _log.debug(getPrefix() + "Before producer.connect()"); @@ -1880,7 +1880,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2 */ public String getRouterVersion() { if (_context.isRouterContext()) - return CoreVersion.VERSION; + return CoreVersion.PUBLISHED_VERSION; return _routerVersion; } diff --git a/core/java/src/net/i2p/client/impl/I2PSimpleSession.java b/core/java/src/net/i2p/client/impl/I2PSimpleSession.java index 3c332ae0a..ade2afbe9 100644 --- a/core/java/src/net/i2p/client/impl/I2PSimpleSession.java +++ b/core/java/src/net/i2p/client/impl/I2PSimpleSession.java @@ -123,11 +123,11 @@ public class I2PSimpleSession extends I2PSessionImpl2 { Properties auth = new OrderedProperties(); auth.setProperty(I2PClient.PROP_USER, opts.getProperty(I2PClient.PROP_USER)); auth.setProperty(I2PClient.PROP_PW, opts.getProperty(I2PClient.PROP_PW)); - sendMessage_unchecked(new GetDateMessage(CoreVersion.VERSION, auth)); + sendMessage_unchecked(new GetDateMessage(CoreVersion.PUBLISHED_VERSION, auth)); } else { // we must now send a GetDate even in SimpleSession, or we won't know // what version we are talking with and cannot use HostLookup - sendMessage_unchecked(new GetDateMessage(CoreVersion.VERSION)); + sendMessage_unchecked(new GetDateMessage(CoreVersion.PUBLISHED_VERSION)); } waitForDate(); } diff --git a/router/java/build.xml b/router/java/build.xml index 8ff50285e..22133cb46 100644 --- a/router/java/build.xml +++ b/router/java/build.xml @@ -79,7 +79,7 @@ - + @@ -189,7 +189,7 @@ - + @@ -206,7 +206,7 @@ - + @@ -300,7 +300,7 @@ - + @@ -320,7 +320,7 @@ - + diff --git a/router/java/src/net/i2p/router/client/ClientManager.java b/router/java/src/net/i2p/router/client/ClientManager.java index fc94b17b8..b4757d032 100644 --- a/router/java/src/net/i2p/router/client/ClientManager.java +++ b/router/java/src/net/i2p/router/client/ClientManager.java @@ -835,7 +835,7 @@ class ClientManager { try { // only send version if the client can handle it (0.8.7 or greater) runner.doSend(new SetDateMessage(runner.getClientVersion() != null ? - CoreVersion.VERSION : null)); + CoreVersion.PUBLISHED_VERSION : null)); } catch (I2CPMessageException ime) {} } if (_isStarted) diff --git a/router/java/src/net/i2p/router/sybil/Analysis.java b/router/java/src/net/i2p/router/sybil/Analysis.java index c3f86ae19..a8e655e27 100644 --- a/router/java/src/net/i2p/router/sybil/Analysis.java +++ b/router/java/src/net/i2p/router/sybil/Analysis.java @@ -89,10 +89,12 @@ public class Analysis extends JobImpl implements RouterApp { private static final double PAIR_DISTANCE_FACTOR = 2.0; private static final double OUR_KEY_FACTOR = 4.0; private static final double VERSION_FACTOR = 1.0; - private static final double POINTS_BAD_VERSION = 50.0; + private static final double POINTS_BAD_VERSION = 20.0; private static final double POINTS_UNREACHABLE = 4.0; private static final double POINTS_NEW = 4.0; - private static final double POINTS_BANLIST = 25.0; + // since we're blocking by default now, don't make this too high, + // so we don't always turn a temporary block into a permanent one. + private static final double POINTS_BANLIST = 10.0; public static final boolean DEFAULT_BLOCK = true; public static final double DEFAULT_BLOCK_THRESHOLD = 50.0; public static final long DEFAULT_BLOCK_TIME = 7*24*60*60*1000L; @@ -775,6 +777,7 @@ public class Analysis extends JobImpl implements RouterApp { RouterInfo us = _context.router().getRouterInfo(); if (us == null) return; String ourVer = us.getVersion(); + // TODO do the math once we hit version 1.0.0 if (!ourVer.startsWith("0.9.")) return; ourVer = ourVer.substring(4); int dot = ourVer.indexOf('.'); @@ -793,7 +796,9 @@ public class Analysis extends JobImpl implements RouterApp { addPoints(points, h, POINTS_NONFF, "Non-floodfill"); String hisFullVer = info.getVersion(); if (!hisFullVer.startsWith("0.9.")) { - addPoints(points, h, POINTS_BAD_VERSION, "Strange version " + DataHelper.escapeHTML(hisFullVer)); + if (!hisFullVer.startsWith("1.")) + addPoints(points, h, POINTS_BAD_VERSION, "Strange version " + DataHelper.escapeHTML(hisFullVer)); + // TODO do the math once we hit version 1.0.0 continue; } String hisVer = hisFullVer.substring(4);