diff --git a/LICENSE.txt b/LICENSE.txt index 8c73749bd5ed78db13cff809c9b0f38e73f9cd57..46e5c6ef27fd9365c0b2c4a30103524d2e501a4a 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -172,8 +172,8 @@ Installer: GeoIP Data: (not included in most distribution packages) - This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com/ - See licenses/LICENSE-GeoIP.txt + IP Geolocation by DB-IP https://db-ip.com/ + See https://creativecommons.org/licenses/by/4.0/ Launchers: (not included in distribution packages) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java index 2bfd68a23f017c32890d3cff3a06f2ca13ed717d..ac8fd4fb7f7ab7f4c8f1e422e612675dd1215474 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java @@ -8,6 +8,7 @@ package net.i2p.router.web.helpers; * */ +import java.io.File; import java.io.IOException; import java.io.Serializable; import java.io.Writer; @@ -42,6 +43,7 @@ import net.i2p.router.TunnelPoolSettings; import net.i2p.router.util.HashDistance; // debug import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade; import static net.i2p.router.sybil.Util.biLog2; +import net.i2p.router.transport.GeoIP; import net.i2p.router.web.HelperBase; import net.i2p.router.web.Messages; import net.i2p.router.web.WebAppStarter; @@ -807,6 +809,16 @@ class NetDbRenderer { buf.append(getTranslatedCountry(country)); buf.append("</a></td><td align=\"center\">").append(num).append("</td></tr>\n"); } + // https://db-ip.com/db/download/ip-to-country-lite + String geoDir = _context.getProperty(GeoIP.PROP_GEOIP_DIR, GeoIP.GEOIP_DIR_DEFAULT); + File geoFile = new File(geoDir); + if (!geoFile.isAbsolute()) + geoFile = new File(_context.getBaseDir(), geoDir); + geoFile = new File(geoFile, GeoIP.GEOIP2_FILE_DEFAULT); + if (geoFile.exists()) { + // we'll assume we are using it, ignore case where Debian file is newer + buf.append("<tr><td colspan=\"2\"><font size=\"-2\"><a href=\"https://db-ip.com/\">IP Geolocation by DB-IP</a></font></td></tr>"); + } buf.append("</table>\n"); } diff --git a/core/java/src/net/i2p/time/BuildTime.java b/core/java/src/net/i2p/time/BuildTime.java index 710085f710f17e6b5c495d616dc3f56cd5dacb05..f66acc751c25fa9ee49acce5264c0bc98c8d9bed 100644 --- a/core/java/src/net/i2p/time/BuildTime.java +++ b/core/java/src/net/i2p/time/BuildTime.java @@ -34,10 +34,10 @@ public class BuildTime { private static final long _latestTime; private static final long YEARS_25 = 25L*365*24*60*60*1000; /** update this periodically */ - private static final String EARLIEST = "2020-05-15 12:00:00 UTC"; + private static final String EARLIEST = "2020-08-19 12:00:00 UTC"; // fallback if parse fails ticket #1976 // date -d 202x-xx-xx +%s - private static final long EARLIEST_LONG = 1589515200 * 1000L; + private static final long EARLIEST_LONG = 1597809600 * 1000L; static { // this is the standard format of build.timestamp as set in the top-level build.xml diff --git a/installer/resources/GeoLite2-Country.mmdb.gz b/installer/resources/GeoLite2-Country.mmdb.gz index ef8b815af90094ce249e47a5cd953cec1586cc90..4cc8b4151e5a56b545e83998adc2140686357a2d 100644 Binary files a/installer/resources/GeoLite2-Country.mmdb.gz and b/installer/resources/GeoLite2-Country.mmdb.gz differ diff --git a/licenses/LICENSE-GeoIP.txt b/licenses/LICENSE-GeoIP.txt deleted file mode 100644 index 9daa213398486d5bb8ec3eec92f49a8262db21a7..0000000000000000000000000000000000000000 --- a/licenses/LICENSE-GeoIP.txt +++ /dev/null @@ -1,14 +0,0 @@ -Database and Contents Copyright (c) 2018 MaxMind, Inc. -This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. -To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/. -No changes were made. - -This database incorporates GeoNames [http://www.geonames.org] geographical data, -which is made available under the Creative Commons Attribution 3.0 License. -To view a copy of this license, visit http://www.creativecommons.org/licenses/by/3.0/us/. - -The attribution requirement may be met by including the following in -all advertising and documentation mentioning features of or use of this database: - -"This product includes GeoLite2 data created by MaxMind, available from -http://www.maxmind.com/" diff --git a/router/java/src/net/i2p/router/transport/GeoIP.java b/router/java/src/net/i2p/router/transport/GeoIP.java index 8aac53b33e8e36513a5615ffcb6e25730e603b03..2188074b3a731760d3bcf8f3f053ce319478347d 100644 --- a/router/java/src/net/i2p/router/transport/GeoIP.java +++ b/router/java/src/net/i2p/router/transport/GeoIP.java @@ -73,7 +73,7 @@ public class GeoIP { public static final String PROP_GEOIP_DIR = "geoip.dir"; public static final String GEOIP_DIR_DEFAULT = "geoip"; static final String GEOIP_FILE_DEFAULT = "geoip.txt"; - static final String GEOIP2_FILE_DEFAULT = "GeoLite2-Country.mmdb"; + public static final String GEOIP2_FILE_DEFAULT = "GeoLite2-Country.mmdb"; static final String COUNTRY_FILE_DEFAULT = "countries.txt"; public static final String PROP_IP_COUNTRY = "i2np.lastCountry"; public static final String PROP_DEBIAN_GEOIP = "geoip.dat";