From 1caf3e778b995ab45f4afedabf182c95444d285f Mon Sep 17 00:00:00 2001 From: zzz Date: Tue, 21 Apr 2015 14:22:05 +0000 Subject: [PATCH] Router timestamper: - Add country-to-continent mapping - Add continent pool.ntp.org zones as first fallback, this will improve time service for countries that don't have a zone - Don't start threads in constructors - Fix logging, better prevention of initialization loops - Log severe errors to wrapper log also continent.txt file from http://dev.maxmind.com/geoip/legacy/codes/country_continent/ Creative Commons Attribution-ShareAlike 3.0 Unported License http://dev.maxmind.com/geoip/legacy/geolite/ Terms already met in LICENSE.txt --- build.xml | 2 + installer/resources/continents.txt | 255 ++++++++++++++++++ .../java/src/net/i2p/router/RouterClock.java | 13 +- .../src/net/i2p/router/RouterContext.java | 7 +- .../i2p/router/time/RouterTimestamper.java | 135 +++++++--- .../java/src/net/i2p/router/time/Zones.java | 135 ++++++++++ .../src/net/i2p/router/transport/GeoIP.java | 2 +- 7 files changed, 504 insertions(+), 45 deletions(-) create mode 100644 installer/resources/continents.txt create mode 100644 router/java/src/net/i2p/router/time/Zones.java diff --git a/build.xml b/build.xml index 5e513551b2..41161efad8 100644 --- a/build.xml +++ b/build.xml @@ -1405,6 +1405,7 @@ + @@ -1422,6 +1423,7 @@ +