diff --git a/apps/routerconsole/java/bundle-messages.sh b/apps/routerconsole/java/bundle-messages.sh index 6f062912107c2bdcfb92ed26b31f1ea27a39bb4b..ba08c7f1e467954523bf0a9b79072df6512f8517 100755 --- a/apps/routerconsole/java/bundle-messages.sh +++ b/apps/routerconsole/java/bundle-messages.sh @@ -40,6 +40,7 @@ fi ROUTERFILES="\ ../../../router/java/src/net/i2p/router/Blocklist.java \ ../../../router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java \ + ../../../router/java/src/net/i2p/router/sybil/Analysis.java \ ../../../router/java/src/net/i2p/router/tasks/CoalesceStatsEvent.java \ ../../../router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java \ ../../../router/java/src/net/i2p/router/transport/GetBidsJob.java \ diff --git a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java index 7b0e7481ef9a7d67d1210439723f9f377413b7c6..9101a5495d6e4e23604953270b246590e27022d7 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java @@ -35,7 +35,6 @@ import net.i2p.jetty.I2PLogger; import net.i2p.router.RouterContext; import net.i2p.router.app.RouterApp; import net.i2p.router.news.NewsManager; -import net.i2p.router.sybil.Analysis; import net.i2p.router.update.ConsoleUpdateManager; import net.i2p.util.Addresses; import net.i2p.util.FileSuffixFilter; @@ -901,14 +900,6 @@ public class RouterConsoleRunner implements RouterApp { if (_mgr == null) _context.addShutdownTask(new ServerShutdown()); ConfigServiceHandler.registerSignalHandler(_context); - - if (_mgr != null && - //_context.getBooleanProperty(HelperBase.PROP_ADVANCED) && - !SystemVersion.isSlow() && - _context.getProperty(Analysis.PROP_FREQUENCY, Analysis.DEFAULT_FREQUENCY) > 0) { - // registers and starts itself - Analysis.getInstance(_context); - } } /** diff --git a/build.xml b/build.xml index e68e5b240fa918b3734381246c15e59ba4a66342..ab85e1d56f31d8458931628a86665c62db206e9b 100644 --- a/build.xml +++ b/build.xml @@ -973,7 +973,7 @@ <group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:gnu.crypto.*:gnu.getopt:gnu.gettext:com.nettgryppa.security:org.apache.http.conn.ssl:org.apache.http.conn.util:org.apache.http.util:org.json.simple:com.southernstorm.noise.crypto.x25519:com.southernstorm.noise.crypto.chacha20:org.minidns:org.minidns.*" /> <group title="Streaming Library" packages="net.i2p.client.streaming:net.i2p.client.streaming.impl" /> <group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:net.i2p.data.router:org.cybergarage:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters:com.maxmind.*:com.southernstorm.noise.*" /> - <group title="Router Console" packages="net.i2p.router.web:net.i2p.router.web.*:net.i2p.router.update:net.i2p.router.sybil:edu.internet2.ndt:net.i2p.router.news:com.vuze.*" /> + <group title="Router Console" packages="net.i2p.router.web:net.i2p.router.web.*:net.i2p.router.update:edu.internet2.ndt:net.i2p.router.news:com.vuze.*" /> <!-- apps and bridges starting here, alphabetical please --> <group title="Addressbook Application" packages="net.i2p.addressbook:net.i2p.router.naming:net.metanotion:net.metanotion.*" /> <group title="BOB Bridge" packages="net.i2p.BOB" /> diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java index 201729b7b64d2b4c17b9e2ab29de67d89db9066f..bd1c2e98f604874e81dffae3953cede19c225c97 100644 --- a/router/java/src/net/i2p/router/Router.java +++ b/router/java/src/net/i2p/router/Router.java @@ -50,6 +50,7 @@ import net.i2p.router.startup.CreateRouterInfoJob; import net.i2p.router.startup.PortableWorkingDir; import net.i2p.router.startup.StartupJob; import net.i2p.router.startup.WorkingDir; +import net.i2p.router.sybil.Analysis; import net.i2p.router.tasks.*; import net.i2p.router.transport.FIFOBandwidthLimiter; import net.i2p.router.transport.UPnPScannerCallback; @@ -928,6 +929,12 @@ public class Router implements RouterClock.ClockShiftListener { // but just to be safe _context.simpleTimer2().addEvent(r, 0); _context.commSystem().initGeoIP(); + + if (!SystemVersion.isSlow() && + _context.getProperty(Analysis.PROP_FREQUENCY, Analysis.DEFAULT_FREQUENCY) > 0) { + // registers and starts itself + Analysis.getInstance(_context); + } } } diff --git a/apps/routerconsole/java/src/net/i2p/router/sybil/Analysis.java b/router/java/src/net/i2p/router/sybil/Analysis.java similarity index 99% rename from apps/routerconsole/java/src/net/i2p/router/sybil/Analysis.java rename to router/java/src/net/i2p/router/sybil/Analysis.java index cf4a1856cbfc9b9d250090c2d9c7e163ea6ca50d..fc826406b8f00c7be2ee56da65cdf684bb6e07a3 100644 --- a/apps/routerconsole/java/src/net/i2p/router/sybil/Analysis.java +++ b/router/java/src/net/i2p/router/sybil/Analysis.java @@ -33,7 +33,6 @@ import net.i2p.router.peermanager.DBHistory; import net.i2p.router.peermanager.PeerProfile; import net.i2p.router.tunnel.pool.TunnelPool; import net.i2p.router.util.HashDistance; -import net.i2p.router.web.Messages; import net.i2p.stat.Rate; import net.i2p.stat.RateAverages; import net.i2p.stat.RateStat; @@ -41,6 +40,7 @@ import net.i2p.util.Addresses; import net.i2p.util.Log; import net.i2p.util.ObjectCounter; import net.i2p.util.SystemVersion; +import net.i2p.util.Translate; /** * @@ -843,8 +843,10 @@ public class Analysis extends JobImpl implements RouterApp { return Util.biLog2(a); } + private static final String BUNDLE_NAME = "net.i2p.router.web.messages"; + private String _t(String s) { - return Messages.getString(s, _context); + return Translate.getString(s, _context, BUNDLE_NAME); } /** @@ -860,6 +862,6 @@ public class Analysis extends JobImpl implements RouterApp { * Use autoboxing to call with ints, longs, floats, etc. */ private String _t(String s, Object o) { - return Messages.getString(s, o, _context); + return Translate.getString(s, o, _context, BUNDLE_NAME); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/sybil/Pair.java b/router/java/src/net/i2p/router/sybil/Pair.java similarity index 100% rename from apps/routerconsole/java/src/net/i2p/router/sybil/Pair.java rename to router/java/src/net/i2p/router/sybil/Pair.java diff --git a/apps/routerconsole/java/src/net/i2p/router/sybil/PersistSybil.java b/router/java/src/net/i2p/router/sybil/PersistSybil.java similarity index 99% rename from apps/routerconsole/java/src/net/i2p/router/sybil/PersistSybil.java rename to router/java/src/net/i2p/router/sybil/PersistSybil.java index 5e72aacd08f33ceaca424c7752837deffcafe6d7..a79d1a0e8428aeca0712d343649f6b19964e3af8 100644 --- a/apps/routerconsole/java/src/net/i2p/router/sybil/PersistSybil.java +++ b/router/java/src/net/i2p/router/sybil/PersistSybil.java @@ -23,7 +23,6 @@ import net.i2p.data.Base64; import net.i2p.data.DataFormatException; import net.i2p.data.DataHelper; import net.i2p.data.Hash; -import net.i2p.router.web.helpers.SybilRenderer; import net.i2p.util.Log; import net.i2p.util.FileSuffixFilter; import net.i2p.util.SecureDirectory; diff --git a/apps/routerconsole/java/src/net/i2p/router/sybil/Points.java b/router/java/src/net/i2p/router/sybil/Points.java similarity index 100% rename from apps/routerconsole/java/src/net/i2p/router/sybil/Points.java rename to router/java/src/net/i2p/router/sybil/Points.java diff --git a/apps/routerconsole/java/src/net/i2p/router/sybil/Util.java b/router/java/src/net/i2p/router/sybil/Util.java similarity index 100% rename from apps/routerconsole/java/src/net/i2p/router/sybil/Util.java rename to router/java/src/net/i2p/router/sybil/Util.java diff --git a/apps/routerconsole/java/src/net/i2p/router/sybil/package.html b/router/java/src/net/i2p/router/sybil/package.html similarity index 77% rename from apps/routerconsole/java/src/net/i2p/router/sybil/package.html rename to router/java/src/net/i2p/router/sybil/package.html index a1219ceb5c3f59bfea74a913591d2846bb511a46..f8f7e6150b40ceef132170fa8bec5e5c6a4fa745 100644 --- a/apps/routerconsole/java/src/net/i2p/router/sybil/package.html +++ b/router/java/src/net/i2p/router/sybil/package.html @@ -5,5 +5,6 @@ store and load the results. </p> <p> Since 0.9.38. +Moved from console to router in 0.9.49. </p> </body></html>