diff --git a/apps/BOB/src/net/i2p/BOB/BOB.java b/apps/BOB/src/net/i2p/BOB/BOB.java index c4ef3b23a..e1106c9bb 100644 --- a/apps/BOB/src/net/i2p/BOB/BOB.java +++ b/apps/BOB/src/net/i2p/BOB/BOB.java @@ -338,7 +338,7 @@ public class BOB implements Runnable, ClientApp { if (g) { DoCMDS conn_c = new DoCMDS(spin, lock, server, props, database, _log); - Thread t = new Thread(conn_c); + Thread t = new I2PAppThread(conn_c); t.setName("BOB.DoCMDS " + i); t.start(); i++; diff --git a/apps/BOB/src/net/i2p/BOB/DoCMDS.java b/apps/BOB/src/net/i2p/BOB/DoCMDS.java index 957f0ea3f..7e5bd1014 100644 --- a/apps/BOB/src/net/i2p/BOB/DoCMDS.java +++ b/apps/BOB/src/net/i2p/BOB/DoCMDS.java @@ -25,12 +25,13 @@ import java.util.Locale; import java.util.Properties; import java.util.StringTokenizer; import java.util.concurrent.atomic.AtomicBoolean; + import net.i2p.I2PAppContext; import net.i2p.I2PException; import net.i2p.client.I2PClientFactory; -//import net.i2p.data.DataFormatException; import net.i2p.data.Destination; -//import net.i2p.i2ptunnel.I2PTunnel; +import net.i2p.util.I2PAppThread; + // needed only for debugging. // import java.util.logging.Level; // import java.util.logging.Logger; @@ -1307,7 +1308,7 @@ public class DoCMDS implements Runnable { // wait } tunnel = new MUXlisten(lock, database, nickinfo, _log); - Thread t = new Thread(tunnel); + Thread t = new I2PAppThread(tunnel); t.start(); // try { // Thread.sleep(1000 * 10); // Slow down the startup. diff --git a/apps/BOB/src/net/i2p/BOB/I2Plistener.java b/apps/BOB/src/net/i2p/BOB/I2Plistener.java index f862c7cae..ebe488860 100644 --- a/apps/BOB/src/net/i2p/BOB/I2Plistener.java +++ b/apps/BOB/src/net/i2p/BOB/I2Plistener.java @@ -18,10 +18,12 @@ package net.i2p.BOB; import java.net.ConnectException; import java.net.SocketTimeoutException; import java.util.concurrent.atomic.AtomicBoolean; + import net.i2p.I2PException; import net.i2p.client.streaming.I2PServerSocket; import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocketManager; +import net.i2p.util.I2PAppThread; /** * Listen on I2P and connect to TCP @@ -77,7 +79,7 @@ public class I2Plistener implements Runnable { conn++; // toss the connection to a new thread. I2PtoTCP conn_c = new I2PtoTCP(sessSocket, info, database, lives); - Thread t = new Thread(conn_c, Thread.currentThread().getName() + " I2PtoTCP " + conn); + Thread t = new I2PAppThread(conn_c, Thread.currentThread().getName() + " I2PtoTCP " + conn); t.start(); } diff --git a/apps/BOB/src/net/i2p/BOB/I2PtoTCP.java b/apps/BOB/src/net/i2p/BOB/I2PtoTCP.java index bf699db60..8e1cebb73 100644 --- a/apps/BOB/src/net/i2p/BOB/I2PtoTCP.java +++ b/apps/BOB/src/net/i2p/BOB/I2PtoTCP.java @@ -19,7 +19,9 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; import java.util.concurrent.atomic.AtomicBoolean; + import net.i2p.client.streaming.I2PSocket; +import net.i2p.util.I2PAppThread; /** * Process I2P->TCP @@ -111,8 +113,8 @@ public class I2PtoTCP implements Runnable { // setup to cross the streams TCPio conn_c = new TCPio(in, Iout, lives); // app -> I2P TCPio conn_a = new TCPio(Iin, out, lives); // I2P -> app - t = new Thread(conn_c, Thread.currentThread().getName() + " TCPioA"); - q = new Thread(conn_a, Thread.currentThread().getName() + " TCPioB"); + t = new I2PAppThread(conn_c, Thread.currentThread().getName() + " TCPioA"); + q = new I2PAppThread(conn_a, Thread.currentThread().getName() + " TCPioB"); // Fire! t.start(); q.start(); diff --git a/apps/BOB/src/net/i2p/BOB/MUXlisten.java b/apps/BOB/src/net/i2p/BOB/MUXlisten.java index f330be971..81dbe0845 100644 --- a/apps/BOB/src/net/i2p/BOB/MUXlisten.java +++ b/apps/BOB/src/net/i2p/BOB/MUXlisten.java @@ -21,11 +21,13 @@ import java.net.InetAddress; import java.net.ServerSocket; import java.util.Properties; import java.util.concurrent.atomic.AtomicBoolean; + import net.i2p.I2PException; import net.i2p.client.I2PClient; import net.i2p.client.streaming.I2PServerSocket; import net.i2p.client.streaming.I2PSocketManager; import net.i2p.client.streaming.I2PSocketManagerFactory; +import net.i2p.util.I2PAppThread; import net.i2p.util.Log; /** @@ -201,14 +203,14 @@ public class MUXlisten implements Runnable { // I2P -> TCP SS = socketManager.getServerSocket(); I2Plistener conn = new I2Plistener(SS, socketManager, info, database, _log, lives); - t = new Thread(tg, conn, "BOBI2Plistener " + N); + t = new I2PAppThread(tg, conn, "BOBI2Plistener " + N); t.start(); } if (come_in) { // TCP -> I2P TCPlistener conn = new TCPlistener(listener, socketManager, info, database, _log, lives); - q = new Thread(tg, conn, "BOBTCPlistener " + N); + q = new I2PAppThread(tg, conn, "BOBTCPlistener " + N); q.start(); } diff --git a/apps/BOB/src/net/i2p/BOB/TCPlistener.java b/apps/BOB/src/net/i2p/BOB/TCPlistener.java index 70ff52b14..2ad1b5af6 100644 --- a/apps/BOB/src/net/i2p/BOB/TCPlistener.java +++ b/apps/BOB/src/net/i2p/BOB/TCPlistener.java @@ -20,8 +20,10 @@ import java.net.ServerSocket; import java.net.Socket; import java.net.SocketTimeoutException; import java.util.concurrent.atomic.AtomicBoolean; + import net.i2p.client.streaming.I2PServerSocket; import net.i2p.client.streaming.I2PSocketManager; +import net.i2p.util.I2PAppThread; /** * Listen on TCP port and connect to I2P @@ -75,7 +77,7 @@ public class TCPlistener implements Runnable { conn++; // toss the connection to a new thread. TCPtoI2P conn_c = new TCPtoI2P(socketManager, server, info, database, lives); - Thread t = new Thread(conn_c, Thread.currentThread().getName() + " TCPtoI2P " + conn); + Thread t = new I2PAppThread(conn_c, Thread.currentThread().getName() + " TCPtoI2P " + conn); t.start(); g = false; } diff --git a/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java b/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java index 0ce587257..3f196af28 100644 --- a/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java +++ b/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java @@ -24,13 +24,14 @@ import java.net.NoRouteToHostException; import java.net.Socket; import java.util.Locale; import java.util.concurrent.atomic.AtomicBoolean; + +import net.i2p.I2PAppContext; import net.i2p.I2PException; import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocketManager; import net.i2p.data.DataFormatException; import net.i2p.data.Destination; -//import net.i2p.i2ptunnel.I2PTunnel; -import net.i2p.I2PAppContext; +import net.i2p.util.I2PAppThread; /** * @@ -158,8 +159,8 @@ public class TCPtoI2P implements Runnable { // setup to cross the streams TCPio conn_c = new TCPio(in, Iout, lives); // app -> I2P TCPio conn_a = new TCPio(Iin, out, lives); // I2P -> app - t = new Thread(conn_c, Thread.currentThread().getName() + " TCPioA"); - q = new Thread(conn_a, Thread.currentThread().getName() + " TCPioB"); + t = new I2PAppThread(conn_c, Thread.currentThread().getName() + " TCPioA"); + q = new I2PAppThread(conn_a, Thread.currentThread().getName() + " TCPioB"); // Fire! t.start(); q.start(); diff --git a/apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java b/apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java index 40eeff590..fea030774 100644 --- a/apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/AddressBook.java @@ -27,6 +27,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import java.util.regex.Pattern; import net.i2p.I2PAppContext; import net.i2p.util.EepGet; @@ -49,6 +50,26 @@ class AddressBook { private boolean modified; private static final boolean DEBUG = false; + private static final int MIN_DEST_LENGTH = 516; + private static final int MAX_DEST_LENGTH = MIN_DEST_LENGTH + 100; // longer than any known cert type for now + + /** + * 5-67 chars lower/upper case + */ + private static final Pattern HOST_PATTERN = + Pattern.compile("^[0-9a-zA-Z\\.-]{5,67}$"); + + /** + * 52 chars lower/upper case + * Always ends in 'a' or 'q' + */ + private static final Pattern B32_PATTERN = + Pattern.compile("^[2-7a-zA-Z]{51}[aAqQ]$"); + + /** not a complete qualification, just a quick check */ + private static final Pattern B64_PATTERN = + Pattern.compile("^[0-9a-zA-Z~-]{" + MIN_DEST_LENGTH + ',' + MAX_DEST_LENGTH + "}={0,2}$"); + /** * Construct an AddressBook from the contents of the Map addresses. * @@ -206,9 +227,6 @@ class AddressBook { return "Map containing " + this.addresses.size() + " entries"; } - private static final int MIN_DEST_LENGTH = 516; - private static final int MAX_DEST_LENGTH = MIN_DEST_LENGTH + 100; // longer than any known cert type for now - /** * Do basic validation of the hostname * hostname was already converted to lower case by ConfigParser.parse() @@ -225,9 +243,10 @@ class AddressBook { host.indexOf("..") < 0 && // IDN - basic check, not complete validation (host.indexOf("--") < 0 || host.startsWith("xn--") || host.indexOf(".xn--") > 0) && - host.replaceAll("[a-z0-9.-]", "").length() == 0 && + HOST_PATTERN.matcher(host).matches() && // Base32 spoofing (52chars.i2p) - (! (host.length() == 56 && host.substring(0,52).replaceAll("[a-z2-7]", "").length() == 0)) && + // We didn't do it this way, we use a .b32.i2p suffix, but let's prohibit it anyway + (! (host.length() == 56 && B32_PATTERN.matcher(host.substring(0,52)).matches())) && // ... or maybe we do Base32 this way ... (! host.equals("b32.i2p")) && (! host.endsWith(".b32.i2p")) && @@ -251,7 +270,7 @@ class AddressBook { (dest.length() > MIN_DEST_LENGTH && dest.length() <= MAX_DEST_LENGTH)) && // B64 comes in groups of 2, 3, or 4 chars, but never 1 ((dest.length() % 4) != 1) && - dest.replaceAll("[a-zA-Z0-9~-]", "").length() == 0 + B64_PATTERN.matcher(dest).matches() ; } @@ -337,4 +356,27 @@ class AddressBook { protected void finalize() { delete(); } + +/**** + public static void main(String[] args) { + String[] tests = { "foo.i2p", + "3bnipzzu67cdq2rcygyxz52xhvy6ylokn4zfrk36ywn6pixmaoza.b32.i2p", + "9rhEy4dT9fMlcSOhDzfWRxCV2aen4Zp4eSthOf5f9gVKMa4PtQJ-wEzm2KEYeDXkbM6wEDvMQ6ou4LIniSE6bSAwy7fokiXk5oabels-sJmftnQWRbZyyXEAsLc3gpJJvp9km7kDyZ0z0YGL5tf3S~OaWdptB5tSBOAOjm6ramcYZMWhyUqm~xSL1JyXUqWEHRYwhoDJNL6-L516VpDYVigMBpIwskjeFGcqK8BqWAe0bRwxIiFTPN6Ck8SDzQvS1l1Yj-zfzg3X3gOknzwR8nrHUkjsWtEB6nhbOr8AR21C9Hs0a7MUJvSe2NOuBoNTrtxT76jDruI78JcG5r~WKl6M12yM-SqeBNE9hQn2QCHeHAKju7FdRCbqaZ99IwyjfwvZbkiYYQVN1xlUuGaXrj98XDzK7GORYdH-PrVGfEbMXQ40KLHUWHz8w4tQXAOQrCHEichod0RIzuuxo3XltCWKrf1xGZhkAo9bk2qXi6digCijvYNaKmQdXZYWW~RtAAAA", + "6IZTYacjlXjSAxu-uXEO5oGsj-f4tfePHEvGjs5pu-AMXMwD7-xFdi8kdobDMJp9yRAl96U7yLl~0t9zHeqqYmNeZnDSkTmAcSC2PT45ZJDXBobKi1~a77zuqfPwnzEatYfW3GL1JQAEkAmiwNJoG7ThTZ3zT7W9ekVJpHi9mivpTbaI~rALLfuAg~Mvr60nntZHjqhEZuiU4dTXrmc5nykl~UaMnBdwHL4jKmoN5CotqHyLYZfp74fdD-Oq4SkhuBhU8wkBIM3lz3Ul1o6-s0lNUMdYJq1CyxnyP7jeekdfAlSx4P4sU4M0dPaYvPdOFWPWwBuEh0pCs5Mj01B2xeEBhpV~xSLn6ru5Vq98TrmaR33KHxd76OYYFsWwzVbBuMVSd800XpBghGFucGw01YHYsPh3Afb01sXbf8Nb1bkxCy~DsrmoH4Ww3bpx66JhRTWvg5al3oWlCX51CnJUqaaK~dPL-pBvAyLKIA5aYvl8ca66jtA7AFDxsOb2texBBQAEAAcAAA==", + "te9Ky7XvVcLLr5vQqvfmOasg915P3-ddP3iDqpMMk7v5ufFKobLAX~1k-E4WVsJVlkYvkHVOjxix-uT1IdewKmLd81s5wZtz0GQ3ZC6p0C3S2cOxz7kQqf7QYSR0BrhZC~2du3-GdQO9TqNmsnHrah5lOZf0LN2JFEFPqg8ZB5JNm3JjJeSqePBRk3zAUogNaNK3voB1MVI0ZROKopXAJM4XMERNqI8tIH4ngGtV41SEJJ5pUFrrTx~EiUPqmSEaEA6UDYZiqd23ZlewZ31ExXQj97zvkuhKCoS9A9MNkzZejJhP-TEXWF8~KHur9f51H--EhwZ42Aj69-3GuNjsMdTwglG5zyIfhd2OspxJrXzCPqIV2sXn80IbPgwxHu0CKIJ6X43B5vTyVu87QDI13MIRNGWNZY5KmM5pilGP7jPkOs4xQDo4NHzpuJR5igjWgJIBPU6fI9Pzq~BMzjLiZOMp8xNWey1zKC96L0eX4of1MG~oUvq0qmIHGNa1TlUwBQAEAAEAAA==", + "(*&(*&(*&(*", + "9rhEy4dT9fMlcSOhDzfWRxCV2aen4Zp4eSthOf5f9gVKMa4PtQJ-wEzm2KEYeDXkbM6wEDvMQ6ou4LIniSE6bSAwy7fokiXk5oabels-sJmftnQWRbZyyXEAsLc3gpJJvp9km7kDyZ0z0YGL5tf3S~OaWdptB5tSBOAOjm6ramcYZMWhyUqm~xSL1JyXUqWEHRYwhoDJNL6-L516VpDYVigMBpIwskjeFGcqK8BqWAe0bRwxIiFTPN6Ck8SDzQvS1l1Yj-zfzg3X3gOknzwR8nrHUkjsWtEB6nhbOr8AR21C9Hs0a7MUJvSe2NOuBoNTrtxT76jDruI78JcG5r~WKl6M12yM-SqeBNE9hQn2QCHeHAKju7FdRCbqaZ99IwyjfwvZbkiYYQVN1xlUuGaXrj98XDzK7GORYdH-PrVGfEbMXQ40KLHUWHz8w4tQXAOQrCHEichod0RIzuuxo3XltCWKrf1xGZhkAo9bk2qXi6digCijvYNaKmQdXZYWW~RtAAA", + "6IZTYacjlXjSAxu-uXEO5oGsj-f4tfePHEvGjs5pu-AMXMwD7-xFdi8kdobDMJp9yRAl96U7yLl~0t9zHeqqYmNeZnDSkTmAcSC2PT45ZJDXBobKi1~a77zuqfPwnzEatYfW3GL1JQAEkAmiwNJoG7ThTZ3zT7W9ekVJpHi9mivpTbaI~rALLfuAg~Mvr60nntZHjqhEZuiU4dTXrmc5nykl~UaMnBdwHL4jKmoN5CotqHyLYZfp74fdD-Oq4SkhuBhU8wkBIM3lz3Ul1o6-s0lNUMdYJq1CyxnyP7jeekdfAlSx4P4sU4M0dPaYvPdOFWPWwBuEh0pCs5Mj01B2xeEBhpV~xSLn6ru5Vq98TrmaR33KHxd76OYYFsWwzVbBuMVSd800XpBghGFucGw01YHYsPh3Afb01sXbf8Nb1bkxCy~DsrmoH4Ww3bpx66JhRTWvg5al3oWlCX51CnJUqaaK~dPL-pBvAyLKIA5aYvl8ca66jtA7AFDxsOb2texBBQAEAAcAAA===", + "!e9Ky7XvVcLLr5vQqvfmOasg915P3-ddP3iDqpMMk7v5ufFKobLAX~1k-E4WVsJVlkYvkHVOjxix-uT1IdewKmLd81s5wZtz0GQ3ZC6p0C3S2cOxz7kQqf7QYSR0BrhZC~2du3-GdQO9TqNmsnHrah5lOZf0LN2JFEFPqg8ZB5JNm3JjJeSqePBRk3zAUogNaNK3voB1MVI0ZROKopXAJM4XMERNqI8tIH4ngGtV41SEJJ5pUFrrTx~EiUPqmSEaEA6UDYZiqd23ZlewZ31ExXQj97zvkuhKCoS9A9MNkzZejJhP-TEXWF8~KHur9f51H--EhwZ42Aj69-3GuNjsMdTwglG5zyIfhd2OspxJrXzCPqIV2sXn80IbPgwxHu0CKIJ6X43B5vTyVu87QDI13MIRNGWNZY5KmM5pilGP7jPkOs4xQDo4NHzpuJR5igjWgJIBPU6fI9Pzq~BMzjLiZOMp8xNWey1zKC96L0eX4of1MG~oUvq0qmIHGNa1TlUwBQAEAAEAAA==", + "x" + }; + for (String s : tests) { + test(s); + } + } + + public static void test(String s) { + System.out.println(s + " valid host? " + isValidKey(s) + " valid dest? " + isValidDest(s)); + } +****/ } diff --git a/apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java b/apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java index fe74c7a83..b0689a208 100644 --- a/apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/DaemonThread.java @@ -25,6 +25,7 @@ import java.util.Properties; import net.i2p.I2PAppContext; import net.i2p.client.naming.NamingServiceUpdater; +import net.i2p.util.I2PAppThread; /** * A thread that waits five minutes, then runs the addressbook daemon. @@ -32,7 +33,7 @@ import net.i2p.client.naming.NamingServiceUpdater; * @author Ragnarok * */ -public class DaemonThread extends Thread implements NamingServiceUpdater { +public class DaemonThread extends I2PAppThread implements NamingServiceUpdater { private String[] args; diff --git a/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java index b8b1df28b..74e946f95 100644 --- a/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java +++ b/apps/addressbook/java/src/net/i2p/addressbook/SubscriptionIterator.java @@ -76,7 +76,8 @@ class SubscriptionIterator implements Iterator { public AddressBook next() { Subscription sub = this.subIterator.next(); if (sub.getLastFetched() + this.delay < I2PAppContext.getGlobalContext().clock().now() && - I2PAppContext.getGlobalContext().portMapper().getPort(PortMapper.SVC_HTTP_PROXY) >= 0) { + I2PAppContext.getGlobalContext().portMapper().getPort(PortMapper.SVC_HTTP_PROXY) >= 0 && + !I2PAppContext.getGlobalContext().getBooleanProperty("i2p.vmCommSystem")) { //System.err.println("Fetching addressbook from " + sub.getLocation()); return new AddressBook(sub, this.proxyHost, this.proxyPort); } else { diff --git a/apps/desktopgui/bundle-messages.sh b/apps/desktopgui/bundle-messages.sh index 957199923..6823dde03 100644 --- a/apps/desktopgui/bundle-messages.sh +++ b/apps/desktopgui/bundle-messages.sh @@ -31,7 +31,7 @@ if which find|grep -q -i windows ; then export PATH=.:/bin:/usr/local/bin:$PATH fi # Fast mode - update ondemond -# set LG2 to the language you need in envrionment varibales to enable this +# set LG2 to the language you need in environment variables to enable this # add ../java/ so the refs will work in the po file JPATHS="src" @@ -64,19 +64,19 @@ do echo "Updating the $i file from the tags..." # extract strings from java and jsp files, and update messages.po files # translate calls must be one of the forms: - # _("foo") + # _t("foo") # _x("foo") - # intl._("foo") + # intl._t("foo") # intl.title("foo") - # handler._("foo") - # formhandler._("foo") + # handler._t("foo") + # formhandler._t("foo") # net.i2p.router.web.Messages.getString("foo") # In a jsp, you must use a helper or handler that has the context set. # To start a new translation, copy the header from an old translation to the new .po file, # then ant distclean updater. find $JPATHS -name *.java > $TMPFILE xgettext -f $TMPFILE -F -L java --from-code=UTF-8 --add-comments\ - --keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \ + --keyword=_t --keyword=_x --keyword=intl._ --keyword=intl.title \ --keyword=handler._ --keyword=formhandler._ \ --keyword=net.i2p.router.web.Messages.getString \ -o ${i}t diff --git a/apps/desktopgui/locale/messages_uk.po b/apps/desktopgui/locale/messages_uk.po index c45356c20..3084ecab5 100644 --- a/apps/desktopgui/locale/messages_uk.po +++ b/apps/desktopgui/locale/messages_uk.po @@ -4,7 +4,7 @@ # To contribute translations, see http://www.i2p2.de/newdevelopers # # Translators: -# Denis Blank , 2011 +# Denis Lysenko , 2011 # LinuxChata, 2014 # madjong , 2014 msgid "" @@ -12,9 +12,9 @@ msgstr "" "Project-Id-Version: I2P\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-09 19:27+0000\n" -"PO-Revision-Date: 2014-12-17 17:00+0000\n" -"Last-Translator: madjong \n" -"Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/projects/p/I2P/language/uk_UA/)\n" +"PO-Revision-Date: 2015-08-07 16:31+0000\n" +"Last-Translator: Denis Lysenko \n" +"Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/otf/I2P/language/uk_UA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/apps/desktopgui/src/net/i2p/desktopgui/ExternalTrayManager.java b/apps/desktopgui/src/net/i2p/desktopgui/ExternalTrayManager.java index 6fea46fef..2a3a16b63 100644 --- a/apps/desktopgui/src/net/i2p/desktopgui/ExternalTrayManager.java +++ b/apps/desktopgui/src/net/i2p/desktopgui/ExternalTrayManager.java @@ -20,7 +20,7 @@ public class ExternalTrayManager extends TrayManager { @Override public PopupMenu getMainMenu() { PopupMenu popup = new PopupMenu(); - MenuItem startItem = new MenuItem(_("Start I2P")); + MenuItem startItem = new MenuItem(_t("Start I2P")); startItem.addActionListener(new ActionListener() { @Override @@ -35,7 +35,7 @@ public class ExternalTrayManager extends TrayManager { @Override protected void done() { - trayIcon.displayMessage(_("Starting"), _("I2P is starting!"), TrayIcon.MessageType.INFO); + trayIcon.displayMessage(_t("Starting"), _t("I2P is starting!"), TrayIcon.MessageType.INFO); //Hide the tray icon. //We cannot stop the desktopgui program entirely, //since that risks killing the I2P process as well. diff --git a/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java b/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java index e1247dde6..1cb464308 100644 --- a/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java +++ b/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java @@ -23,7 +23,7 @@ public class InternalTrayManager extends TrayManager { public PopupMenu getMainMenu() { PopupMenu popup = new PopupMenu(); - MenuItem browserLauncher = new MenuItem(_("Launch I2P Browser")); + MenuItem browserLauncher = new MenuItem(_t("Launch I2P Browser")); browserLauncher.addActionListener(new ActionListener() { @Override @@ -47,7 +47,7 @@ public class InternalTrayManager extends TrayManager { }.execute(); } }); - MenuItem desktopguiConfigurationLauncher = new MenuItem(_("Configure desktopgui")); + MenuItem desktopguiConfigurationLauncher = new MenuItem(_t("Configure desktopgui")); desktopguiConfigurationLauncher.addActionListener(new ActionListener() { @Override @@ -64,7 +64,7 @@ public class InternalTrayManager extends TrayManager { } }); - MenuItem restartItem = new MenuItem(_("Restart I2P")); + MenuItem restartItem = new MenuItem(_t("Restart I2P")); restartItem.addActionListener(new ActionListener() { @Override @@ -82,7 +82,7 @@ public class InternalTrayManager extends TrayManager { } }); - MenuItem stopItem = new MenuItem(_("Stop I2P")); + MenuItem stopItem = new MenuItem(_t("Stop I2P")); stopItem.addActionListener(new ActionListener() { @Override diff --git a/apps/desktopgui/src/net/i2p/desktopgui/TrayManager.java b/apps/desktopgui/src/net/i2p/desktopgui/TrayManager.java index f124ee3f6..227050735 100644 --- a/apps/desktopgui/src/net/i2p/desktopgui/TrayManager.java +++ b/apps/desktopgui/src/net/i2p/desktopgui/TrayManager.java @@ -78,7 +78,7 @@ public abstract class TrayManager { return image; } - protected static String _(String s) { - return DesktopguiTranslator._(s); + protected static String _t(String s) { + return DesktopguiTranslator._t(s); } } diff --git a/apps/desktopgui/src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java b/apps/desktopgui/src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java index 1e49f6609..a697c5779 100644 --- a/apps/desktopgui/src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java +++ b/apps/desktopgui/src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java @@ -40,10 +40,10 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame { cancelButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); - setTitle(_("Tray icon configuration")); + setTitle(_t("Tray icon configuration")); desktopguiEnabled.setSelected(true); - desktopguiEnabled.setText(_("Should tray icon be enabled?")); + desktopguiEnabled.setText(_t("Should tray icon be enabled?")); desktopguiEnabled.setActionCommand("shouldDesktopguiBeEnabled"); okButton.setText("OK"); @@ -98,8 +98,8 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame { configureDesktopgui(); }//GEN-LAST:event_okButtonMouseReleased - protected static String _(String s) { - return DesktopguiTranslator._(s); + protected static String _t(String s) { + return DesktopguiTranslator._t(s); } private void configureDesktopgui() { diff --git a/apps/desktopgui/src/net/i2p/desktopgui/i18n/DesktopguiTranslator.java b/apps/desktopgui/src/net/i2p/desktopgui/i18n/DesktopguiTranslator.java index e95cbc01f..3778c4ad9 100644 --- a/apps/desktopgui/src/net/i2p/desktopgui/i18n/DesktopguiTranslator.java +++ b/apps/desktopgui/src/net/i2p/desktopgui/i18n/DesktopguiTranslator.java @@ -16,11 +16,11 @@ public class DesktopguiTranslator { return ctx; } - public static String _(String s) { + public static String _t(String s) { return Translate.getString(s, getRouterContext(), BUNDLE_NAME); } - public static String _(String s, Object o) { + public static String _t(String s, Object o) { return Translate.getString(s, o, getRouterContext(), BUNDLE_NAME); } } diff --git a/apps/i2psnark/COPYING b/apps/i2psnark/COPYING index d60c31a97..a0d98f2a6 100644 --- a/apps/i2psnark/COPYING +++ b/apps/i2psnark/COPYING @@ -1,340 +1 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. +See ../../licenses/LICENSE-GPLv2.txt diff --git a/apps/i2psnark/TODO b/apps/i2psnark/TODO deleted file mode 100644 index 6f89c0f50..000000000 --- a/apps/i2psnark/TODO +++ /dev/null @@ -1,24 +0,0 @@ -- I2PSnark: - - add multitorrent support by checking the metainfo hash in the - PeerAcceptor and feeding it off to the appropriate coordinator - - add a web interface - -- BEncode - - Byte array length indicator can overflow. - - Support really big BigNums (only 256 chars allowed now) - - Better BEValue toString(). Uses stupid heuristic now for debugging. - - Implemented bencoding. - - Remove application level hack to calculate sha1 hash for metainfo - (But can it be done as efficiently?) - -- Storage - - Check file name filter. - -- TrackerClient - - Support undocumented &numwant= request. - -- PeerCoordinator - - Disconnect from other seeds as soon as you are a seed yourself. - -- Text UI - - Make it completely silent. diff --git a/apps/i2psnark/authors.snark b/apps/i2psnark/authors-snark.txt similarity index 100% rename from apps/i2psnark/authors.snark rename to apps/i2psnark/authors-snark.txt diff --git a/apps/i2psnark/changelog.snark b/apps/i2psnark/changelog-snark.txt similarity index 100% rename from apps/i2psnark/changelog.snark rename to apps/i2psnark/changelog-snark.txt diff --git a/apps/i2psnark/java/bundle-messages.sh b/apps/i2psnark/java/bundle-messages.sh index 033e1195b..7ef207a6d 100755 --- a/apps/i2psnark/java/bundle-messages.sh +++ b/apps/i2psnark/java/bundle-messages.sh @@ -30,7 +30,7 @@ if which find|grep -q -i windows ; then export PATH=.:/bin:/usr/local/bin:$PATH fi # Fast mode - update ondemond -# set LG2 to the language you need in envrionment varibales to enable this +# set LG2 to the language you need in environment variables to enable this # add ../java/ so the refs will work in the po file JPATHS="../java/src" @@ -63,13 +63,13 @@ do echo "Updating the $i file from the tags..." # extract strings from java and jsp files, and update messages.po files # translate calls must be one of the forms: - # _("foo") + # _t("foo") # _x("foo") # To start a new translation, copy the header from an old translation to the new .po file, # then ant distclean poupdate. find $JPATHS -name *.java > $TMPFILE xgettext -f $TMPFILE -F -L java --from-code=UTF-8 --add-comments\ - --keyword=_ --keyword=_x \ + --keyword=_t --keyword=_x \ -o ${i}t if [ $? -ne 0 ] then diff --git a/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java b/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java index 85bb97c4d..96f380435 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java +++ b/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java @@ -14,6 +14,7 @@ import java.util.Set; import net.i2p.I2PAppContext; import net.i2p.I2PException; +import net.i2p.client.I2PClient; import net.i2p.client.I2PSession; import net.i2p.client.I2PSessionException; import net.i2p.client.streaming.I2PServerSocket; @@ -135,6 +136,7 @@ public class I2PSnarkUtil { public boolean configured() { return _configured; } + @SuppressWarnings({"unchecked", "rawtypes"}) public void setI2CPConfig(String i2cpHost, int i2cpPort, Map opts) { if (i2cpHost != null) _i2cpHost = i2cpHost; @@ -255,6 +257,8 @@ public class I2PSnarkUtil { opts.setProperty("i2p.streaming.disableRejectLogging", "true"); if (opts.getProperty("i2p.streaming.answerPings") == null) opts.setProperty("i2p.streaming.answerPings", "false"); + if (opts.getProperty(I2PClient.PROP_SIGTYPE) == null) + opts.setProperty(I2PClient.PROP_SIGTYPE, "EdDSA_SHA512_Ed25519"); _manager = I2PSocketManagerFactory.createManager(_i2cpHost, _i2cpPort, opts); _connecting = false; } @@ -657,7 +661,7 @@ public class I2PSnarkUtil { * The {0} will be replaced by the parameter. * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. - * To tranlslate parameter also, use _("foo {0} bar", _("baz")) + * To tranlslate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. * Use autoboxing to call with ints, longs, floats, etc. */ diff --git a/apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java b/apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java index 543753331..a40a68f8d 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java +++ b/apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java @@ -74,10 +74,11 @@ public class MetaInfo * @param files null for single-file torrent * @param lengths null for single-file torrent * @param announce_list may be null + * @param created_by may be null */ MetaInfo(String announce, String name, String name_utf8, List> files, List lengths, int piece_length, byte[] piece_hashes, long length, boolean privateTorrent, - List> announce_list) + List> announce_list, String created_by) { this.announce = announce; this.name = name; @@ -91,7 +92,7 @@ public class MetaInfo this.privateTorrent = privateTorrent; this.announce_list = announce_list; this.comment = null; - this.created_by = null; + this.created_by = created_by; this.creation_date = I2PAppContext.getGlobalContext().clock().now(); // TODO if we add a parameter for other keys diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerCheckerTask.java b/apps/i2psnark/java/src/org/klomp/snark/PeerCheckerTask.java index 430f6c7ae..c2abf6660 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/PeerCheckerTask.java +++ b/apps/i2psnark/java/src/org/klomp/snark/PeerCheckerTask.java @@ -267,7 +267,23 @@ class PeerCheckerTask implements Runnable // close out unused files, but we don't need to do it every time Storage storage = coordinator.getStorage(); - if (storage != null && (_runCount % 4) == 0) { + if (storage != null) { + // The more files a torrent has, the more often we call the cleaner, + // to keep from running out of FDs + int files = storage.getFileCount(); + int skip; + if (files == 1) + skip = 6; + else if (files <= 4) + skip = 4; + else if (files <= 20) + skip = 3; + else if (files <= 50) + skip = 2; + else + skip = 1; + + if ((_runCount % skip) == 0) storage.cleanRAFs(); } diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java index b347b5448..8daf8b030 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java +++ b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java @@ -984,8 +984,9 @@ class PeerCoordinator implements PeerListener } int piece = pp.getPiece(); - synchronized(wantedPieces) - { + // try/catch outside the synch to avoid deadlock in the catch + try { + synchronized(wantedPieces) { Piece p = new Piece(piece); if (!wantedPieces.contains(p)) { @@ -1001,8 +1002,7 @@ class PeerCoordinator implements PeerListener } } - try - { + // try/catch moved outside of synch // this takes forever if complete, as it rechecks if (storage.putPiece(pp)) { @@ -1028,21 +1028,21 @@ class PeerCoordinator implements PeerListener _log.warn("Got BAD piece " + piece + "/" + metainfo.getPieces() + " from " + peer + " for " + metainfo.getName()); return false; // No need to announce BAD piece to peers. } - } - catch (IOException ioe) - { + + wantedPieces.remove(p); + wantedBytes -= metainfo.getPieceLength(p.getId()); + } // synch + } catch (IOException ioe) { String msg = "Error writing storage (piece " + piece + ") for " + metainfo.getName() + ": " + ioe; _log.error(msg, ioe); if (listener != null) { listener.addMessage(msg); listener.addMessage("Fatal storage error: Stopping torrent " + metainfo.getName()); } + // deadlock was here snark.stopTorrent(); throw new RuntimeException(msg, ioe); - } - wantedPieces.remove(p); - wantedBytes -= metainfo.getPieceLength(p.getId()); - } + } // just in case removePartialPiece(piece); diff --git a/apps/i2psnark/java/src/org/klomp/snark/Snark.java b/apps/i2psnark/java/src/org/klomp/snark/Snark.java index 60e8f6189..f8dadb627 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Snark.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Snark.java @@ -745,6 +745,18 @@ public class Snark return storage != null && storage.isChecking(); } + /** + * If checking is in progress, return completion 0.0 ... 1.0, + * else return 1.0. + * @since 0.9.23 + */ + public double getCheckingProgress() { + if (storage != null && storage.isChecking()) + return storage.getCheckingProgress(); + else + return 1.0d; + } + /** * Disk allocation (ballooning) in progress. * @since 0.9.3 @@ -1264,7 +1276,8 @@ public class Snark public void setWantedPieces(Storage storage) { - coordinator.setWantedPieces(); + if (coordinator != null) + coordinator.setWantedPieces(); } ///////////// End StorageListener methods @@ -1273,7 +1286,7 @@ public class Snark /** SnarkSnutdown callback unused */ public void shutdown() { - // Should not be necessary since all non-deamon threads should + // Should not be necessary since all non-daemon threads should // have died. But in reality this does not always happen. //System.exit(0); } diff --git a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java index 771821827..688cf7e95 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java +++ b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java @@ -8,6 +8,7 @@ import java.io.FilenameFilter; import java.io.IOException; import java.io.OutputStream; import java.io.Serializable; +import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -96,6 +97,12 @@ public class SnarkManager implements CompleteListener { private static final String PROP_META_PRIORITY = "priority"; private static final String PROP_META_PRESERVE_NAMES = "preserveFileNames"; private static final String PROP_META_UPLOADED = "uploaded"; + private static final String PROP_META_ADDED = "added"; + private static final String PROP_META_COMPLETED = "completed"; + private static final String PROP_META_MAGNET = "magnet"; + private static final String PROP_META_MAGNET_DN = "magnet_dn"; + private static final String PROP_META_MAGNET_TR = "magnet_tr"; + private static final String PROP_META_MAGNET_DIR = "magnet_dir"; //private static final String PROP_META_BITFIELD_SUFFIX = ".bitfield"; //private static final String PROP_META_PRIORITY_SUFFIX = ".priority"; private static final String PROP_META_MAGNET_PREFIX = "i2psnark.magnet."; @@ -119,6 +126,7 @@ public class SnarkManager implements CompleteListener { public static final String PROP_OPENTRACKERS = "i2psnark.opentrackers"; public static final String PROP_PRIVATETRACKERS = "i2psnark.privatetrackers"; private static final String PROP_USE_DHT = "i2psnark.enableDHT"; + private static final String PROP_SMART_SORT = "i2psnark.smartSort"; public static final int MIN_UP_BW = 10; public static final int DEFAULT_MAX_UP_BW = 25; @@ -333,6 +341,17 @@ public class SnarkManager implements CompleteListener { public boolean shouldAutoStart() { return Boolean.parseBoolean(_config.getProperty(PROP_AUTO_START, DEFAULT_AUTO_START)); } + + /** + * @return default true + * @since 0.9.23 + */ + public boolean isSmartSortEnabled() { + String val = _config.getProperty(PROP_SMART_SORT); + if (val == null) + return true; + return Boolean.parseBoolean(val); + } /**** public String linkPrefix() { @@ -729,19 +748,19 @@ public class SnarkManager implements CompleteListener { /** * all params may be null or need trimming */ - public void updateConfig(String dataDir, boolean filesPublic, boolean autoStart, String refreshDelay, + public void updateConfig(String dataDir, boolean filesPublic, boolean autoStart, boolean smartSort, String refreshDelay, String startDelay, String pageSize, String seedPct, String eepHost, String eepPort, String i2cpHost, String i2cpPort, String i2cpOpts, String upLimit, String upBW, boolean useOpenTrackers, boolean useDHT, String theme) { synchronized(_configLock) { - locked_updateConfig(dataDir, filesPublic, autoStart, refreshDelay, + locked_updateConfig(dataDir, filesPublic, autoStart, smartSort,refreshDelay, startDelay, pageSize, seedPct, eepHost, eepPort, i2cpHost, i2cpPort, i2cpOpts, upLimit, upBW, useOpenTrackers, useDHT, theme); } } - private void locked_updateConfig(String dataDir, boolean filesPublic, boolean autoStart, String refreshDelay, + private void locked_updateConfig(String dataDir, boolean filesPublic, boolean autoStart, boolean smartSort, String refreshDelay, String startDelay, String pageSize, String seedPct, String eepHost, String eepPort, String i2cpHost, String i2cpPort, String i2cpOpts, String upLimit, String upBW, boolean useOpenTrackers, boolean useDHT, String theme) { @@ -769,9 +788,9 @@ public class SnarkManager implements CompleteListener { _util.setMaxUploaders(limit); changed = true; _config.setProperty(PROP_UPLOADERS_TOTAL, Integer.toString(limit)); - addMessage(_("Total uploaders limit changed to {0}", limit)); + addMessage(_t("Total uploaders limit changed to {0}", limit)); } else { - addMessage(_("Minimum total uploaders limit is {0}", Snark.MIN_TOTAL_UPLOADERS)); + addMessage(_t("Minimum total uploaders limit is {0}", Snark.MIN_TOTAL_UPLOADERS)); } } } @@ -783,9 +802,9 @@ public class SnarkManager implements CompleteListener { _util.setMaxUpBW(limit); changed = true; _config.setProperty(PROP_UPBW_MAX, Integer.toString(limit)); - addMessage(_("Up BW limit changed to {0}KBps", limit)); + addMessage(_t("Up BW limit changed to {0}KBps", limit)); } else { - addMessage(_("Minimum up bandwidth limit is {0}KBps", MIN_UP_BW)); + addMessage(_t("Minimum up bandwidth limit is {0}KBps", MIN_UP_BW)); } } } @@ -797,7 +816,7 @@ public class SnarkManager implements CompleteListener { _util.setStartupDelay(minutes); changed = true; _config.setProperty(PROP_STARTUP_DELAY, Integer.toString(minutes)); - addMessage(_("Startup delay changed to {0}", DataHelper.formatDuration2(minutes * (60L * 1000)))); + addMessage(_t("Startup delay changed to {0}", DataHelper.formatDuration2(minutes * (60L * 1000)))); } } @@ -808,9 +827,9 @@ public class SnarkManager implements CompleteListener { changed = true; _config.setProperty(PROP_REFRESH_DELAY, Integer.toString(secs)); if (secs >= 0) - addMessage(_("Refresh time changed to {0}", DataHelper.formatDuration2(secs * 1000))); + addMessage(_t("Refresh time changed to {0}", DataHelper.formatDuration2(secs * 1000))); else - addMessage(_("Refresh disabled")); + addMessage(_t("Refresh disabled")); } } catch (NumberFormatException nfe) {} } @@ -826,7 +845,7 @@ public class SnarkManager implements CompleteListener { changed = true; pageSize = Integer.toString(size); _config.setProperty(PROP_PAGE_SIZE, pageSize); - addMessage(_("Page size changed to {0}", pageSize)); + addMessage(_t("Page size changed to {0}", pageSize)); } } catch (NumberFormatException nfe) {} } @@ -835,18 +854,18 @@ public class SnarkManager implements CompleteListener { dataDir = DataHelper.stripHTML(dataDir.trim()); File dd = new File(dataDir); if (!dd.isAbsolute()) { - addMessage(_("Data directory must be an absolute path") + ": " + dataDir); + addMessage(_t("Data directory must be an absolute path") + ": " + dataDir); } else if (!dd.exists()) { - addMessage(_("Data directory does not exist") + ": " + dataDir); + addMessage(_t("Data directory does not exist") + ": " + dataDir); } else if (!dd.isDirectory()) { - addMessage(_("Not a directory") + ": " + dataDir); + addMessage(_t("Not a directory") + ": " + dataDir); } else if (!dd.canRead()) { - addMessage(_("Unreadable") + ": " + dataDir); + addMessage(_t("Unreadable") + ": " + dataDir); } else { changed = true; interruptMonitor = true; _config.setProperty(PROP_DIR, dataDir); - addMessage(_("Data directory changed to {0}", dataDir)); + addMessage(_t("Data directory changed to {0}", dataDir)); } } @@ -901,37 +920,37 @@ public class SnarkManager implements CompleteListener { p.putAll(opts); _util.setI2CPConfig(i2cpHost, port, p); _util.setMaxUpBW(getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW)); - addMessage(_("I2CP and tunnel changes will take effect after stopping all torrents")); + addMessage(_t("I2CP and tunnel changes will take effect after stopping all torrents")); } else if (!reconnect) { // The usual case, the other two are if not in router context _config.setProperty(PROP_I2CP_OPTS, i2cpOpts.trim()); - addMessage(_("I2CP options changed to {0}", i2cpOpts)); + addMessage(_t("I2CP options changed to {0}", i2cpOpts)); _util.setI2CPConfig(oldI2CPHost, oldI2CPPort, opts); } else { // Won't happen, I2CP host/port, are hidden in the GUI if in router context if (_util.connected()) { _util.disconnect(); - addMessage(_("Disconnecting old I2CP destination")); + addMessage(_t("Disconnecting old I2CP destination")); } - addMessage(_("I2CP settings changed to {0}", i2cpHost + ':' + port + ' ' + i2cpOpts)); + addMessage(_t("I2CP settings changed to {0}", i2cpHost + ':' + port + ' ' + i2cpOpts)); _util.setI2CPConfig(i2cpHost, port, opts); _util.setMaxUpBW(getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW)); boolean ok = _util.connect(); if (!ok) { - addMessage(_("Unable to connect with the new settings, reverting to the old I2CP settings")); + addMessage(_t("Unable to connect with the new settings, reverting to the old I2CP settings")); _util.setI2CPConfig(oldI2CPHost, oldI2CPPort, oldOpts); ok = _util.connect(); if (!ok) - addMessage(_("Unable to reconnect with the old settings!")); + addMessage(_t("Unable to reconnect with the old settings!")); } else { - addMessage(_("Reconnected on the new I2CP destination")); + addMessage(_t("Reconnected on the new I2CP destination")); _config.setProperty(PROP_I2CP_HOST, i2cpHost.trim()); _config.setProperty(PROP_I2CP_PORT, "" + port); _config.setProperty(PROP_I2CP_OPTS, i2cpOpts.trim()); // no PeerAcceptors/I2PServerSockets to deal with, since all snarks are inactive for (Snark snark : _snarks.values()) { if (snark.restartAcceptor()) { - addMessage(_("I2CP listener restarted for \"{0}\"", snark.getBaseName())); + addMessage(_t("I2CP listener restarted for \"{0}\"", snark.getBaseName())); // this is the common ConnectionAcceptor, so we only need to do it once break; } @@ -945,44 +964,54 @@ public class SnarkManager implements CompleteListener { _config.setProperty(PROP_FILES_PUBLIC, Boolean.toString(filesPublic)); _util.setFilesPublic(filesPublic); if (filesPublic) - addMessage(_("New files will be publicly readable")); + addMessage(_t("New files will be publicly readable")); else - addMessage(_("New files will not be publicly readable")); + addMessage(_t("New files will not be publicly readable")); changed = true; } if (shouldAutoStart() != autoStart) { _config.setProperty(PROP_AUTO_START, Boolean.toString(autoStart)); if (autoStart) - addMessage(_("Enabled autostart")); + addMessage(_t("Enabled autostart")); else - addMessage(_("Disabled autostart")); + addMessage(_t("Disabled autostart")); changed = true; } + + if (isSmartSortEnabled() != smartSort) { + _config.setProperty(PROP_SMART_SORT, Boolean.toString(smartSort)); + if (smartSort) + addMessage(_t("Enabled smart sort")); + else + addMessage(_t("Disabled smart sort")); + changed = true; + } + if (_util.shouldUseOpenTrackers() != useOpenTrackers) { _config.setProperty(PROP_USE_OPENTRACKERS, useOpenTrackers + ""); if (useOpenTrackers) - addMessage(_("Enabled open trackers - torrent restart required to take effect.")); + addMessage(_t("Enabled open trackers - torrent restart required to take effect.")); else - addMessage(_("Disabled open trackers - torrent restart required to take effect.")); + addMessage(_t("Disabled open trackers - torrent restart required to take effect.")); _util.setUseOpenTrackers(useOpenTrackers); changed = true; } if (_util.shouldUseDHT() != useDHT) { _config.setProperty(PROP_USE_DHT, Boolean.toString(useDHT)); if (useDHT) - addMessage(_("Enabled DHT.")); + addMessage(_t("Enabled DHT.")); else - addMessage(_("Disabled DHT.")); + addMessage(_t("Disabled DHT.")); if (_util.connected()) - addMessage(_("DHT change requires tunnel shutdown and reopen")); + addMessage(_t("DHT change requires tunnel shutdown and reopen")); _util.setUseDHT(useDHT); changed = true; } if (theme != null) { if(!theme.equals(_config.getProperty(PROP_THEME))) { _config.setProperty(PROP_THEME, theme); - addMessage(_("{0} theme loaded, return to main i2psnark page to view.", theme)); + addMessage(_t("{0} theme loaded, return to main i2psnark page to view.", theme)); changed = true; } } @@ -992,7 +1021,7 @@ public class SnarkManager implements CompleteListener { // Data dir changed. this will stop and remove all old torrents, and add the new ones _monitor.interrupt(); } else { - addMessage(_("Configuration unchanged.")); + addMessage(_t("Configuration unchanged.")); } } @@ -1024,7 +1053,7 @@ public class SnarkManager implements CompleteListener { if (ot == null) ot = getListConfig(PROP_OPENTRACKERS, DEFAULT_OPENTRACKERS); _util.setOpenTrackers(ot); - addMessage(_("Open Tracker list changed - torrent restart required to take effect.")); + addMessage(_t("Open Tracker list changed - torrent restart required to take effect.")); saveConfig(); } @@ -1034,7 +1063,7 @@ public class SnarkManager implements CompleteListener { */ public void savePrivateTrackers(List pt) { setListConfig(PROP_PRIVATETRACKERS, pt); - addMessage(_("Private tracker list changed - affects newly created torrents only.")); + addMessage(_t("Private tracker list changed - affects newly created torrents only.")); saveConfig(); } @@ -1080,12 +1109,12 @@ public class SnarkManager implements CompleteListener { DataHelper.storeProps(_config, _configFile); } } catch (IOException ioe) { - addMessage(_("Unable to save the config to {0}", _configFile.getAbsolutePath())); + addMessage(_t("Unable to save the config to {0}", _configFile.getAbsolutePath())); } } /** hardcoded for sanity. perhaps this should be customizable, for people who increase their ulimit, etc. */ - public static final int MAX_FILES_PER_TORRENT = 512; + public static final int MAX_FILES_PER_TORRENT = 999; /** * Set of canonical .torrent filenames that we are dealing with. @@ -1161,10 +1190,10 @@ public class SnarkManager implements CompleteListener { */ private void addTorrent(String filename, File baseFile, boolean dontAutoStart, File dataDir) { if ((!dontAutoStart) && !_util.connected()) { - addMessage(_("Connecting to I2P")); + addMessage(_t("Connecting to I2P")); boolean ok = _util.connect(); if (!ok) { - addMessage(_("Error connecting to I2P - check your I2CP settings!")); + addMessage(_t("Error connecting to I2P - check your I2CP settings!")); return; } } @@ -1173,7 +1202,7 @@ public class SnarkManager implements CompleteListener { filename = sfile.getCanonicalPath(); } catch (IOException ioe) { _log.error("Unable to add the torrent " + filename, ioe); - addMessage(_("Error: Could not add the torrent {0}", filename) + ": " + ioe); + addMessage(_t("Error: Could not add the torrent {0}", filename) + ": " + ioe); return; } if (dataDir == null) @@ -1196,7 +1225,7 @@ public class SnarkManager implements CompleteListener { fis = new FileInputStream(sfile); } catch (IOException ioe) { // catch this here so we don't try do delete it below - addMessage(_("Cannot open \"{0}\"", sfile.getName()) + ": " + ioe.getMessage()); + addMessage(_t("Cannot open \"{0}\"", sfile.getName()) + ": " + ioe.getMessage()); return; } @@ -1215,53 +1244,59 @@ public class SnarkManager implements CompleteListener { Snark snark = getTorrentByInfoHash(info.getInfoHash()); if (snark != null) { // TODO - if the existing one is a magnet, delete it and add the metainfo instead? - addMessage(_("Torrent with this info hash is already running: {0}", snark.getBaseName())); + addMessage(_t("Torrent with this info hash is already running: {0}", snark.getBaseName())); return; } if (!TrackerClient.isValidAnnounce(info.getAnnounce())) { if (info.isPrivate()) { - addMessage(_("ERROR - No I2P trackers in private torrent \"{0}\"", info.getName())); + addMessage(_t("ERROR - No I2P trackers in private torrent \"{0}\"", info.getName())); } else if (!_util.getOpenTrackers().isEmpty()) { - addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and DHT only.", info.getName())); - //addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers only.", info.getName())); + addMessage(_t("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and DHT only.", info.getName())); + //addMessage(_t("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers only.", info.getName())); } else if (_util.shouldUseDHT()) { - addMessage(_("Warning - No I2P trackers in \"{0}\", and open trackers are disabled, will announce to DHT only.", info.getName())); + addMessage(_t("Warning - No I2P trackers in \"{0}\", and open trackers are disabled, will announce to DHT only.", info.getName())); } else { - addMessage(_("Warning - No I2P trackers in \"{0}\", and DHT and open trackers are disabled, you should enable open trackers or DHT before starting the torrent.", info.getName())); - //addMessage(_("Warning - No I2P Trackers found in \"{0}\". Make sure Open Tracker is enabled before starting this torrent.", info.getName())); + addMessage(_t("Warning - No I2P trackers in \"{0}\", and DHT and open trackers are disabled, you should enable open trackers or DHT before starting the torrent.", info.getName())); + //addMessage(_t("Warning - No I2P Trackers found in \"{0}\". Make sure Open Tracker is enabled before starting this torrent.", info.getName())); dontAutoStart = true; } } String rejectMessage = validateTorrent(info); if (rejectMessage != null) { - sfile.delete(); - addMessage(rejectMessage); - return; - } else { - // TODO load saved closest DHT nodes and pass to the Snark ? - // This may take a LONG time - if (baseFile == null) - baseFile = getSavedBaseFile(info.getInfoHash()); - if (_log.shouldLog(Log.INFO)) - _log.info("New Snark, torrent: " + filename + " base: " + baseFile); - torrent = new Snark(_util, filename, null, -1, null, null, this, - _peerCoordinatorSet, _connectionAcceptor, - false, dataDir.getPath(), baseFile); - loadSavedFilePriorities(torrent); - synchronized (_snarks) { - _snarks.put(filename, torrent); - } + throw new IOException(rejectMessage); + } + + // TODO load saved closest DHT nodes and pass to the Snark ? + // This may take a LONG time + if (baseFile == null) + baseFile = getSavedBaseFile(info.getInfoHash()); + if (_log.shouldLog(Log.INFO)) + _log.info("New Snark, torrent: " + filename + " base: " + baseFile); + torrent = new Snark(_util, filename, null, -1, null, null, this, + _peerCoordinatorSet, _connectionAcceptor, + shouldAutoStart(), dataDir.getPath(), baseFile); + loadSavedFilePriorities(torrent); + synchronized (_snarks) { + _snarks.put(filename, torrent); } } catch (IOException ioe) { - String err = _("Torrent in \"{0}\" is invalid", sfile.getName()) + ": " + ioe.getMessage(); + // close before rename/delete for windows + if (fis != null) try { fis.close(); fis = null; } catch (IOException ioe2) {} + String err = _t("Torrent in \"{0}\" is invalid", sfile.toString()) + ": " + ioe.getMessage(); addMessage(err); _log.error(err, ioe); - if (sfile.exists()) - sfile.delete(); + File rename = new File(filename + ".BAD"); + if (rename.exists()) { + if (sfile.delete()) + addMessage(_t("Torrent file deleted: {0}", sfile.toString())); + } else { + if (FileUtil.rename(sfile, rename)) + addMessage(_t("Torrent file moved from {0} to {1}", sfile.toString(), rename.toString())); + } return; } catch (OutOfMemoryError oom) { - addMessage(_("ERROR - Out of memory, cannot create torrent from {0}", sfile.getName()) + ": " + oom.getMessage()); + addMessage(_t("ERROR - Out of memory, cannot create torrent from {0}", sfile.getName()) + ": " + oom.getMessage()); return; } finally { if (fis != null) try { fis.close(); } catch (IOException ioe) {} @@ -1278,13 +1313,14 @@ public class SnarkManager implements CompleteListener { running = true; } else { running = false; - } + } // Were we running last time? + String link = linkify(torrent); if (!dontAutoStart && shouldAutoStart() && running) { torrent.startTorrent(); - addMessage(_("Torrent added and started: \"{0}\"", torrent.getBaseName())); + addMessageNoEscape(_t("Torrent added and started: {0}", link)); } else { - addMessage(_("Torrent added: \"{0}\"", torrent.getBaseName())); + addMessageNoEscape(_t("Torrent added: {0}", link)); } } @@ -1349,28 +1385,28 @@ public class SnarkManager implements CompleteListener { synchronized (_snarks) { Snark snark = getTorrentByInfoHash(ih); if (snark != null) { - addMessage(_("Torrent with this info hash is already running: {0}", snark.getBaseName())); + addMessage(_t("Torrent with this info hash is already running: {0}", snark.getBaseName())); return null; } // Tell the dir monitor not to delete us _magnets.add(name); if (updateStatus) - saveMagnetStatus(ih); + saveMagnetStatus(ih, dirPath, trackerURL, name); _snarks.put(name, torrent); } if (autoStart) { startTorrent(ih); - addMessage(_("Fetching {0}", name)); + addMessage(_t("Fetching {0}", name)); DHT dht = _util.getDHT(); boolean shouldWarn = _util.connected() && _util.getOpenTrackers().isEmpty() && ((!_util.shouldUseDHT()) || dht == null || dht.size() <= 0); if (shouldWarn) { - addMessage(_("Open trackers are disabled and we have no DHT peers. " + + addMessage(_t("Open trackers are disabled and we have no DHT peers. " + "Fetch of {0} may not succeed until you start another torrent, enable open trackers, or enable DHT.", name)); } } else { - addMessage(_("Adding {0}", name)); + addMessage(_t("Adding {0}", name)); } return torrent; } @@ -1403,7 +1439,7 @@ public class SnarkManager implements CompleteListener { synchronized (_snarks) { Snark snark = getTorrentByInfoHash(torrent.getInfoHash()); if (snark != null) { - addMessage(_("Download already running: {0}", snark.getBaseName())); + addMessage(_t("Download already running: {0}", snark.getBaseName())); return; } String name = torrent.getName(); @@ -1437,7 +1473,7 @@ public class SnarkManager implements CompleteListener { synchronized (_snarks) { Snark snark = getTorrentByInfoHash(metainfo.getInfoHash()); if (snark != null) { - addMessage(_("Torrent with this info hash is already running: {0}", snark.getBaseName())); + addMessage(_t("Torrent with this info hash is already running: {0}", snark.getBaseName())); return false; } else { saveTorrentStatus(metainfo, bitfield, null, baseFile, true, 0, true); // no file priorities @@ -1448,7 +1484,7 @@ public class SnarkManager implements CompleteListener { // hold the lock for a long time addTorrent(filename, baseFile, dontAutoStart); } catch (IOException ioe) { - addMessage(_("Failed to copy torrent file to {0}", filename)); + addMessage(_t("Failed to copy torrent file to {0}", filename)); _log.error("Failed to write torrent file", ioe); return false; } @@ -1474,7 +1510,7 @@ public class SnarkManager implements CompleteListener { synchronized (_snarks) { boolean success = FileUtil.copy(fromfile.getAbsolutePath(), filename, false); if (!success) { - addMessage(_("Failed to copy torrent file to {0}", filename)); + addMessage(_t("Failed to copy torrent file to {0}", filename)); _log.error("Failed to write torrent file to " + filename); return; } @@ -1623,6 +1659,25 @@ public class SnarkManager implements CompleteListener { } return 0; } + + /** + * Get setting for a torrent from the config file. + * @return non-null, rv[0] is added time or 0; rv[1] is completed time or 0 + * @since 0.9.23 + */ + public long[] getSavedAddedAndCompleted(Snark snark) { + long[] rv = new long[2]; + Properties config = getConfig(snark); + if (config != null) { + try { + rv[0] = Long.parseLong(config.getProperty(PROP_META_ADDED)); + } catch (NumberFormatException nfe) {} + try { + rv[1] = Long.parseLong(config.getProperty(PROP_META_COMPLETED)); + } catch (NumberFormatException nfe) {} + } + return rv; + } /** * Save the completion status of a torrent and other data in the config file @@ -1647,6 +1702,7 @@ public class SnarkManager implements CompleteListener { * The status is either a bitfield converted to Base64 or "." for a completed * torrent to save space in the config file and in memory. * + * @param metainfo non-null * @param bitfield non-null * @param priorities may be null * @param base may be null @@ -1661,19 +1717,25 @@ public class SnarkManager implements CompleteListener { private void locked_saveTorrentStatus(MetaInfo metainfo, BitField bitfield, int[] priorities, File base, boolean preserveNames, long uploaded, boolean stopped) { byte[] ih = metainfo.getInfoHash(); + Properties config = getConfig(ih); + String now = Long.toString(System.currentTimeMillis()); + config.setProperty(PROP_META_STAMP, now); + if (config.getProperty(PROP_META_ADDED) == null) + config.setProperty(PROP_META_ADDED, now); String bfs; if (bitfield.complete()) { bfs = "."; + if (config.getProperty(PROP_META_COMPLETED) == null) + config.setProperty(PROP_META_COMPLETED, now); } else { byte[] bf = bitfield.getFieldBytes(); bfs = Base64.encode(bf); + config.remove(PROP_META_COMPLETED); } - boolean running = !stopped; - Properties config = getConfig(ih); - config.setProperty(PROP_META_STAMP, Long.toString(System.currentTimeMillis())); config.setProperty(PROP_META_BITFIELD, bfs); config.setProperty(PROP_META_PRESERVE_NAMES, Boolean.toString(preserveNames)); config.setProperty(PROP_META_UPLOADED, Long.toString(uploaded)); + boolean running = !stopped; config.setProperty(PROP_META_RUNNING, Boolean.toString(running)); if (base != null) config.setProperty(PROP_META_BASE, base.getAbsolutePath()); @@ -1703,15 +1765,28 @@ public class SnarkManager implements CompleteListener { } else { config.remove(PROP_META_PRIORITY); } + // magnet properties, no longer apply, we have the metainfo + config.remove(PROP_META_MAGNET); + config.remove(PROP_META_MAGNET_DIR); + config.remove(PROP_META_MAGNET_DN); + config.remove(PROP_META_MAGNET_TR); // TODO save closest DHT nodes too + locked_saveTorrentStatus(ih, config); + } + /** + * @since 0.9.23 + */ + private void locked_saveTorrentStatus(byte[] ih, Properties config) { File conf = configFile(_configDir, ih); File subdir = conf.getParentFile(); if (!subdir.exists()) subdir.mkdirs(); try { DataHelper.storeProps(config, conf); + if (_log.shouldInfo()) + _log.info("Saved config to " + conf); } catch (IOException ioe) { _log.error("Unable to save the config to " + conf); } @@ -1796,14 +1871,38 @@ public class SnarkManager implements CompleteListener { } /** - * Just remember we have it + * Just remember we have it. + * This used to simply store a line in the config file, + * but now we also save it in its own config file, + * just like other torrents, so we can remember the directory, tracker, etc. + * + * @param dir may be null + * @param trackerURL may be null + * @param dn may be null * @since 0.8.4 */ - public void saveMagnetStatus(byte[] ih) { + public void saveMagnetStatus(byte[] ih, String dir, String trackerURL, String dn) { + // i2psnark.config file String infohash = Base64.encode(ih); infohash = infohash.replace('=', '$'); _config.setProperty(PROP_META_MAGNET_PREFIX + infohash, "."); - saveConfig(); + // its own config file + Properties config = new OrderedProperties(); + config.setProperty(PROP_META_MAGNET, "true"); + if (dir != null) + config.setProperty(PROP_META_MAGNET_DIR, dir); + if (trackerURL != null) + config.setProperty(PROP_META_MAGNET_TR, trackerURL); + if (dn != null) + config.setProperty(PROP_META_MAGNET_DN, dn); + String now = Long.toString(System.currentTimeMillis()); + config.setProperty(PROP_META_ADDED, now); + config.setProperty(PROP_META_STAMP, now); + // save + synchronized (_configLock) { + saveConfig(); + locked_saveTorrentStatus(ih, config); + } } /** @@ -1813,8 +1912,8 @@ public class SnarkManager implements CompleteListener { public void removeMagnetStatus(byte[] ih) { String infohash = Base64.encode(ih); infohash = infohash.replace('=', '$'); - _config.remove(PROP_META_MAGNET_PREFIX + infohash); - saveConfig(); + if (_config.remove(PROP_META_MAGNET_PREFIX + infohash) != null) + saveConfig(); } /** @@ -1825,18 +1924,18 @@ public class SnarkManager implements CompleteListener { private String validateTorrent(MetaInfo info) { List> files = info.getFiles(); if ( (files != null) && (files.size() > MAX_FILES_PER_TORRENT) ) { - return _("Too many files in \"{0}\" ({1}), deleting it!", info.getName(), files.size()); + return _t("Too many files in \"{0}\" ({1})!", info.getName(), files.size()); } else if ( (files == null) && (info.getName().endsWith(".torrent")) ) { - return _("Torrent file \"{0}\" cannot end in \".torrent\", deleting it!", info.getName()); + return _t("Torrent file \"{0}\" cannot end in \".torrent\"!", info.getName()); } else if (info.getPieces() <= 0) { - return _("No pieces in \"{0}\", deleting it!", info.getName()); + return _t("No pieces in \"{0}\"!", info.getName()); } else if (info.getPieces() > Storage.MAX_PIECES) { - return _("Too many pieces in \"{0}\", limit is {1}, deleting it!", info.getName(), Storage.MAX_PIECES); + return _t("Too many pieces in \"{0}\", limit is {1}!", info.getName(), Storage.MAX_PIECES); } else if (info.getPieceLength(0) > Storage.MAX_PIECE_SIZE) { - return _("Pieces are too large in \"{0}\" ({1}B), deleting it.", info.getName(), DataHelper.formatSize2(info.getPieceLength(0))) + ' ' + - _("Limit is {0}B", DataHelper.formatSize2(Storage.MAX_PIECE_SIZE)); + return _t("Pieces are too large in \"{0}\" ({1}B)!", info.getName(), DataHelper.formatSize2(info.getPieceLength(0))) + ' ' + + _t("Limit is {0}B", DataHelper.formatSize2(Storage.MAX_PIECE_SIZE)); } else if (info.getTotalLength() <= 0) { - return _("Torrent \"{0}\" has no data, deleting it!", info.getName()); + return _t("Torrent \"{0}\" has no data!", info.getName()); } else if (info.getTotalLength() > Storage.MAX_TOTAL_SIZE) { System.out.println("torrent info: " + info.toString()); List lengths = info.getLengths(); @@ -1844,7 +1943,7 @@ public class SnarkManager implements CompleteListener { for (int i = 0; i < lengths.size(); i++) System.out.println("File " + i + " is " + lengths.get(i) + " long."); - return _("Torrents larger than {0}B are not supported yet, deleting \"{1}\"", Storage.MAX_TOTAL_SIZE, info.getName()); + return _t("Torrents larger than {0}B are not supported yet \"{1}\"!", Storage.MAX_TOTAL_SIZE, info.getName()); } else { // ok return null; @@ -1861,7 +1960,7 @@ public class SnarkManager implements CompleteListener { filename = sfile.getCanonicalPath(); } catch (IOException ioe) { _log.error("Unable to remove the torrent " + filename, ioe); - addMessage(_("Error: Could not remove the torrent {0}", filename) + ": " + ioe.getMessage()); + addMessage(_t("Error: Could not remove the torrent {0}", filename) + ": " + ioe.getMessage()); return null; } int remaining = 0; @@ -1884,7 +1983,7 @@ public class SnarkManager implements CompleteListener { if (shouldRemove) removeTorrentStatus(torrent); if (!wasStopped) - addMessage(_("Torrent stopped: \"{0}\"", torrent.getBaseName())); + addMessageNoEscape(_t("Torrent stopped: {0}", linkify(torrent))); } return torrent; } @@ -1903,7 +2002,7 @@ public class SnarkManager implements CompleteListener { boolean wasStopped = torrent.isStopped(); torrent.stopTorrent(); if (!wasStopped) - addMessage(_("Torrent stopped: \"{0}\"", torrent.getBaseName())); + addMessageNoEscape(_t("Torrent stopped: {0}", linkify(torrent))); if (shouldRemove) removeTorrentStatus(torrent); } @@ -1923,7 +2022,7 @@ public class SnarkManager implements CompleteListener { File torrentFile = new File(filename); torrentFile.delete(); } - addMessage(_("Torrent removed: \"{0}\"", torrent.getBaseName())); + addMessage(_t("Torrent removed: \"{0}\"", torrent.getBaseName())); } private class DirMonitor implements Runnable { @@ -1931,7 +2030,7 @@ public class SnarkManager implements CompleteListener { // don't bother delaying if auto start is false long delay = (60L * 1000) * getStartupDelayMinutes(); if (delay > 0 && shouldAutoStart()) { - addMessage(_("Adding torrents in {0}", DataHelper.formatDuration2(delay))); + addMessage(_t("Adding torrents in {0}", DataHelper.formatDuration2(delay))); try { Thread.sleep(delay); } catch (InterruptedException ie) {} // Remove that first message if (_messages.size() == 1) @@ -1946,13 +2045,15 @@ public class SnarkManager implements CompleteListener { File dir = getDataDir(); if (_log.shouldLog(Log.DEBUG)) _log.debug("Directory Monitor loop over " + dir.getAbsolutePath()); + boolean ok; try { // Don't let this interfere with .torrent files being added or deleted synchronized (_snarks) { - monitorTorrents(dir); + ok = monitorTorrents(dir); } } catch (Exception e) { _log.error("Error in the DirectoryMonitor", e); + ok = false; } if (doMagnets) { // first run only @@ -1963,10 +2064,14 @@ public class SnarkManager implements CompleteListener { _log.error("Error in the DirectoryMonitor", e); } if (!_snarks.isEmpty()) - addMessage(_("Up bandwidth limit is {0} KBps", _util.getMaxUpBW())); + addMessage(_t("Up bandwidth limit is {0} KBps", _util.getMaxUpBW())); // To fix bug where files were left behind, // but also good for when user removes snarks when i2p is not running - cleanupTorrentStatus(); + // Don't run if there was an error, as we would delete the torrent config + // file(s) and we don't want to do that. We'll do the cleanup the next + // time i2psnark starts. See ticket #1658. + if (ok) + cleanupTorrentStatus(); } try { Thread.sleep(60*1000); } catch (InterruptedException ie) {} } @@ -1983,14 +2088,8 @@ public class SnarkManager implements CompleteListener { Storage storage = snark.getStorage(); if (meta == null || storage == null) return; - StringBuilder buf = new StringBuilder(256); - String base = DataHelper.escapeHTML(storage.getBaseName()); - buf.append("").append(base).append(""); if (snark.getDownloaded() > 0) - addMessageNoEscape(_("Download finished: {0}", buf.toString())); // + " (" + _("size: {0}B", DataHelper.formatSize2(len)) + ')'); + addMessageNoEscape(_t("Download finished: {0}", linkify(snark))); updateStatus(snark); } @@ -2045,11 +2144,11 @@ public class SnarkManager implements CompleteListener { } _magnets.remove(snark.getName()); removeMagnetStatus(snark.getInfoHash()); - addMessage(_("Metainfo received for {0}", snark.getName())); - addMessage(_("Starting up torrent {0}", storage.getBaseName())); + addMessage(_t("Metainfo received for {0}", snark.getName())); + addMessageNoEscape(_t("Starting up torrent {0}", linkify(snark))); return name; } catch (IOException ioe) { - addMessage(_("Failed to copy torrent file to {0}", name)); + addMessage(_t("Failed to copy torrent file to {0}", name)); _log.error("Failed to write torrent file", ioe); } } @@ -2061,7 +2160,7 @@ public class SnarkManager implements CompleteListener { * @since 0.9 */ public void fatal(Snark snark, String error) { - addMessage(_("Error on torrent {0}", snark.getName()) + ": " + error); + addMessage(_t("Error on torrent {0}", snark.getName()) + ": " + error); } /** @@ -2080,29 +2179,67 @@ public class SnarkManager implements CompleteListener { // End Snark.CompleteListeners + /** + * An HTML link to the file if complete and a single file, + * to the directory if not complete or not a single file, + * or simply the unlinkified name of the snark if a magnet + * + * @since 0.9.23 + */ + private String linkify(Snark snark) { + MetaInfo meta = snark.getMetaInfo(); + Storage storage = snark.getStorage(); + if (meta == null || storage == null) + return DataHelper.escapeHTML(snark.getBaseName()); + StringBuilder buf = new StringBuilder(256); + String base = DataHelper.escapeHTML(storage.getBaseName()); + buf.append("").append(base).append(""); + return buf.toString(); + } + /** * Add all magnets from the config file + * * @since 0.8.4 */ private void addMagnets() { - for (Object o : _config.keySet()) { - String k = (String) o; + boolean changed = false; + for (Iterator iter = _config.keySet().iterator(); iter.hasNext(); ) { + String k = (String) iter.next(); if (k.startsWith(PROP_META_MAGNET_PREFIX)) { String b64 = k.substring(PROP_META_MAGNET_PREFIX.length()); b64 = b64.replace('$', '='); byte[] ih = Base64.decode(b64); // ignore value - TODO put tracker URL in value - if (ih != null && ih.length == 20) - addMagnet(_("Magnet") + ' ' + I2PSnarkUtil.toHex(ih), ih, null, false); - // else remove from config? + if (ih != null && ih.length == 20) { + Properties config = getConfig(ih); + String name = config.getProperty(PROP_META_MAGNET_DN); + if (name == null) + name = _t("Magnet") + ' ' + I2PSnarkUtil.toHex(ih); + String tracker = config.getProperty(PROP_META_MAGNET_TR); + String dir = config.getProperty(PROP_META_MAGNET_DIR); + File dirf = (dir != null) ? (new File(dir)) : null; + addMagnet(name, ih, tracker, false, dirf); + } else { + iter.remove(); + changed = true; + } } } + if (changed) + saveConfig(); } /** * caller must synchronize on _snarks + * + * @return success, false if an error adding any torrent. */ - private void monitorTorrents(File dir) { + private boolean monitorTorrents(File dir) { + boolean rv = true; String fileNames[] = dir.list(TorrentFilenameFilter.instance()); List foundNames = new ArrayList(0); if (fileNames != null) { @@ -2124,14 +2261,15 @@ public class SnarkManager implements CompleteListener { // already known. noop } else { if (shouldAutoStart() && !_util.connect()) - addMessage(_("Unable to connect to I2P!")); + addMessage(_t("Unable to connect to I2P!")); try { // Snark.fatal() throws a RuntimeException // don't let one bad torrent kill the whole loop addTorrent(name, null, !shouldAutoStart()); } catch (Exception e) { - addMessage(_("Error: Could not add the torrent {0}", name) + ": " + e); + addMessage(_t("Error: Could not add the torrent {0}", name) + ": " + e); _log.error("Unable to add the torrent " + name, e); + rv = false; } } } @@ -2152,20 +2290,21 @@ public class SnarkManager implements CompleteListener { } } } + return rv; } /** translate */ - private String _(String s) { + private String _t(String s) { return _util.getString(s); } /** translate */ - private String _(String s, Object o) { + private String _t(String s, Object o) { return _util.getString(s, o); } /** translate */ - private String _(String s, Object o, Object o2) { + private String _t(String s, Object o, Object o2) { return _util.getString(s, o, o2); } @@ -2270,28 +2409,36 @@ public class SnarkManager implements CompleteListener { public void startTorrent(byte[] infoHash) { for (Snark snark : _snarks.values()) { if (DataHelper.eq(infoHash, snark.getInfoHash())) { - if (snark.isStarting() || !snark.isStopped()) { - addMessage("Torrent already started"); - return; - } - boolean connected = _util.connected(); - if ((!connected) && !_util.isConnecting()) - addMessage(_("Opening the I2P tunnel")); - addMessage(_("Starting up torrent {0}", snark.getBaseName())); - if (connected) { - snark.startTorrent(); - } else { - // mark it for the UI - snark.setStarting(); - (new I2PAppThread(new ThreadedStarter(snark), "TorrentStarter", true)).start(); - try { Thread.sleep(200); } catch (InterruptedException ie) {} - } + startTorrent(snark); return; } } addMessage("Torrent not found?"); } + /** + * If not connected, thread it, otherwise inline + * @since 0.9.23 + */ + public void startTorrent(Snark snark) { + if (snark.isStarting() || !snark.isStopped()) { + addMessage("Torrent already started"); + return; + } + boolean connected = _util.connected(); + if ((!connected) && !_util.isConnecting()) + addMessage(_t("Opening the I2P tunnel")); + addMessageNoEscape(_t("Starting up torrent {0}", linkify(snark))); + if (connected) { + snark.startTorrent(); + } else { + // mark it for the UI + snark.setStarting(); + (new I2PAppThread(new ThreadedStarter(snark), "TorrentStarter", true)).start(); + try { Thread.sleep(200); } catch (InterruptedException ie) {} + } + } + /** * If not connected, thread it, otherwise inline * @since 0.9.1 @@ -2300,7 +2447,7 @@ public class SnarkManager implements CompleteListener { if (_util.connected()) { startAll(); } else { - addMessage(_("Opening the I2P tunnel and starting all torrents.")); + addMessage(_t("Opening the I2P tunnel and starting all torrents.")); for (Snark snark : _snarks.values()) { // mark it for the UI snark.setStarting(); @@ -2363,7 +2510,7 @@ public class SnarkManager implements CompleteListener { for (Snark snark : _snarks.values()) { if (!snark.isStopped()) { if (count == 0) - addMessage(_("Stopping all torrents and closing the I2P tunnel.")); + addMessage(_t("Stopping all torrents and closing the I2P tunnel.")); count++; if (finalShutdown) snark.stopTorrent(true); @@ -2382,14 +2529,14 @@ public class SnarkManager implements CompleteListener { // Schedule this even for final shutdown, as there's a chance // that it's just this webapp that is stopping. _context.simpleTimer2().addEvent(new Disconnector(), 60*1000); - addMessage(_("Closing I2P tunnel after notifying trackers.")); + addMessage(_t("Closing I2P tunnel after notifying trackers.")); if (finalShutdown) { try { Thread.sleep(5*1000); } catch (InterruptedException ie) {} } } else { _util.disconnect(); _stopping = false; - addMessage(_("I2P tunnel closed.")); + addMessage(_t("I2P tunnel closed.")); } } } @@ -2400,7 +2547,57 @@ public class SnarkManager implements CompleteListener { if (_util.connected()) { _util.disconnect(); _stopping = false; - addMessage(_("I2P tunnel closed.")); + addMessage(_t("I2P tunnel closed.")); + } + } + } + + /** + * Threaded. Torrent must be stopped. + * @since 0.9.23 + */ + public void recheckTorrent(Snark snark) { + if (snark.isStarting() || !snark.isStopped()) { + addMessage("Cannot check " + snark.getBaseName() + ", torrent already started"); + return; + } + Storage storage = snark.getStorage(); + if (storage == null) { + addMessage("Cannot check " + snark.getBaseName() + ", no storage"); + return; + } + (new I2PAppThread(new ThreadedRechecker(snark), "TorrentRechecker", true)).start(); + try { Thread.sleep(200); } catch (InterruptedException ie) {} + } + + /** + * @since 0.9.23 + */ + private class ThreadedRechecker implements Runnable { + private final Snark snark; + /** must have non-null storage */ + public ThreadedRechecker(Snark s) { snark = s; } + public void run() { + try { + if (_log.shouldWarn()) + _log.warn("Starting recheck of " + snark.getBaseName()); + boolean changed = snark.getStorage().recheck(); + if (changed) + updateStatus(snark); + if (_log.shouldWarn()) + _log.warn("Finished recheck of " + snark.getBaseName() + " changed? " + changed); + String link = linkify(snark); + if (changed) { + int pieces = snark.getPieces(); + double completion = (pieces - snark.getNeeded()) / (double) pieces; + String complete = (new DecimalFormat("0.00%")).format(completion); + addMessageNoEscape(_t("Finished recheck of torrent {0}, now {1} complete", link, complete)); + } else { + addMessageNoEscape(_t("Finished recheck of torrent {0}, unchanged", link)); + } + } catch (Exception e) { + _log.error("Error rechecking " + snark.getBaseName(), e); + addMessage(_t("Error checking the torrent {0}", snark.getBaseName()) + ": " + e); } } } diff --git a/apps/i2psnark/java/src/org/klomp/snark/Storage.java b/apps/i2psnark/java/src/org/klomp/snark/Storage.java index 1a4b1fb4c..1edf12b5b 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Storage.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Storage.java @@ -39,6 +39,8 @@ import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; +import gnu.getopt.Getopt; + import net.i2p.I2PAppContext; import net.i2p.crypto.SHA1; import net.i2p.data.ByteArray; @@ -71,11 +73,12 @@ public class Storage implements Closeable private boolean changed; private volatile boolean _isChecking; private final AtomicInteger _allocateCount = new AtomicInteger(); + private final AtomicInteger _checkProgress = new AtomicInteger(); /** The default piece size. */ private static final int DEFAULT_PIECE_SIZE = 256*1024; /** bigger than this will be rejected */ - public static final int MAX_PIECE_SIZE = 8*1024*1024; + public static final int MAX_PIECE_SIZE = 16*1024*1024; /** The maximum number of pieces in a torrent. */ public static final int MAX_PIECES = 10*1024; public static final long MAX_TOTAL_SIZE = MAX_PIECE_SIZE * (long) MAX_PIECES; @@ -83,6 +86,7 @@ public class Storage implements Closeable private static final Map _filterNameCache = new ConcurrentHashMap(); private static final boolean _isWindows = SystemVersion.isWindows(); + private static final boolean _isARM = SystemVersion.isARM(); private static final int BUFSIZE = PeerState.PARTSIZE; private static final ByteCache _cache = ByteCache.getInstance(16, BUFSIZE); @@ -123,10 +127,12 @@ public class Storage implements Closeable * * @param announce may be null * @param listener may be null + * @param created_by may be null * @throws IOException when creating and/or checking files fails. */ public Storage(I2PSnarkUtil util, File baseFile, String announce, List> announce_list, + String created_by, boolean privateTorrent, StorageListener listener) throws IOException { @@ -195,7 +201,7 @@ public class Storage implements Closeable byte[] piece_hashes = fast_digestCreate(); metainfo = new MetaInfo(announce, baseFile.getName(), null, files, lengthsList, piece_size, piece_hashes, total, privateTorrent, - announce_list); + announce_list, created_by); } @@ -307,6 +313,18 @@ public class Storage implements Closeable return _isChecking; } + /** + * If checking is in progress, return completion 0.0 ... 1.0, + * else return 1.0. + * @since 0.9.23 + */ + public double getCheckingProgress() { + if (_isChecking) + return _checkProgress.get() / (double) pieces; + else + return 1.0d; + } + /** * Disk allocation (ballooning) in progress. * Always false on Windows. @@ -337,29 +355,28 @@ public class Storage implements Closeable * @return number of bytes remaining; -1 if unknown file * @since 0.7.14 */ +/**** public long remaining(int fileIndex) { if (fileIndex < 0 || fileIndex >= _torrentFiles.size()) return -1; + if (complete()) + return 0; long bytes = 0; for (int i = 0; i < _torrentFiles.size(); i++) { TorrentFile tf = _torrentFiles.get(i); if (i == fileIndex) { - File f = tf.RAFfile; - if (complete()) - return 0; - int psz = piece_size; long start = bytes; long end = start + tf.length; - int pc = (int) (bytes / psz); + int pc = (int) (bytes / piece_size); long rv = 0; if (!bitfield.get(pc)) - rv = Math.min(psz - (start % psz), tf.length); - for (int j = pc + 1; (((long)j) * psz) < end && j < pieces; j++) { + rv = Math.min(piece_size - (start % piece_size), tf.length); + for (int j = pc + 1; (((long)j) * piece_size) < end && j < pieces; j++) { if (!bitfield.get(j)) { - if (((long)(j+1))*psz < end) - rv += psz; + if (((long)(j+1))*piece_size < end) + rv += piece_size; else - rv += end - (((long)j) * psz); + rv += end - (((long)j) * piece_size); } } return rv; @@ -368,6 +385,40 @@ public class Storage implements Closeable } return -1; } +****/ + + /** + * For efficiency, calculate remaining bytes for all files at once + * + * @return number of bytes remaining for each file, use indexOf() to get index for a file + * @since 0.9.23 + */ + public long[] remaining() { + long[] rv = new long[_torrentFiles.size()]; + if (complete()) + return rv; + long bytes = 0; + for (int i = 0; i < _torrentFiles.size(); i++) { + TorrentFile tf = _torrentFiles.get(i); + long start = bytes; + long end = start + tf.length; + int pc = (int) (bytes / piece_size); + long rvi = 0; + if (!bitfield.get(pc)) + rvi = Math.min(piece_size - (start % piece_size), tf.length); + for (int j = pc + 1; (((long)j) * piece_size) < end && j < pieces; j++) { + if (!bitfield.get(j)) { + if (((long)(j+1))*piece_size < end) + rvi += piece_size; + else + rvi += end - (((long)j) * piece_size); + } + } + rv[i] = rvi; + bytes += tf.length; + } + return rv; + } /** * @param fileIndex as obtained from indexOf @@ -451,9 +502,8 @@ public class Storage implements Closeable int file = 0; long pcEnd = -1; long fileEnd = _torrentFiles.get(0).length - 1; - int psz = piece_size; for (int i = 0; i < rv.length; i++) { - pcEnd += psz; + pcEnd += piece_size; int pri = _torrentFiles.get(file).priority; while (fileEnd <= pcEnd && file < _torrentFiles.size() - 1) { file++; @@ -497,6 +547,9 @@ public class Storage implements Closeable /** * Creates (and/or checks) all files from the metainfo file list. * Only call this once, and only after the constructor with the metainfo. + * Use recheck() to check again later. + * + * @throws IllegalStateException if called more than once */ public void check() throws IOException { @@ -507,6 +560,9 @@ public class Storage implements Closeable * Creates (and/or checks) all files from the metainfo file list. * Use a saved bitfield and timestamp from a config file. * Only call this once, and only after the constructor with the metainfo. + * Use recheck() to check again later. + * + * @throws IllegalStateException if called more than once */ public void check(long savedTime, BitField savedBitField) throws IOException { @@ -764,6 +820,14 @@ public class Storage implements Closeable return rv; } + /** + * Does not include directories. + * @since 0.9.23 + */ + public int getFileCount() { + return _torrentFiles.size(); + } + /** * Includes the base for a multi-file torrent. * Sorted bottom-up for easy deletion. @@ -785,6 +849,24 @@ public class Storage implements Closeable return rv; } + /** + * Blocking. Holds lock. + * Recommend running only when stopped. + * Caller should thread. + * Calls listener.setWantedPieces() on completion if anything changed. + * + * @return true if anything changed, false otherwise + * @since 0.9.23 + */ + public boolean recheck() throws IOException { + int previousNeeded = needed; + checkCreateFiles(true); + boolean changed = previousNeeded != needed; + if (listener != null && changed) + listener.setWantedPieces(this); + return changed; + } + /** * This is called at the beginning, and at presumed completion, * so we have to be careful about locking. @@ -809,6 +891,7 @@ public class Storage implements Closeable private void locked_checkCreateFiles(boolean recheck) throws IOException { + _checkProgress.set(0); // Whether we are resuming or not, // if any of the files already exists we assume we are resuming. boolean resume = false; @@ -825,13 +908,16 @@ public class Storage implements Closeable // Make sure all files are available and of correct length // The files should all exist as they have been created with zero length by createFilesFromNames() + long lengthProgress = 0; for (TorrentFile tf : _torrentFiles) { long length = tf.RAFfile.length(); + lengthProgress += tf.length; if(tf.RAFfile.exists() && length == tf.length) { if (listener != null) listener.storageAllocated(this, length); + _checkProgress.set(0); resume = true; // XXX Could dynamicly check } else if (length == 0) { @@ -843,6 +929,8 @@ public class Storage implements Closeable tf.closeRAF(); } catch (IOException ioe) {} } + if (!resume) + _checkProgress.set((int) (pieces * lengthProgress / total_length)); } else { String msg = "File '" + tf.name + "' exists, but has wrong length (expected " + tf.length + " but found " + length + ") - repairing corruption"; @@ -851,6 +939,7 @@ public class Storage implements Closeable _log.error(msg); changed = true; resume = true; + _checkProgress.set(0); _probablyComplete = false; // to force RW synchronized(tf) { RandomAccessFile raf = tf.checkRAF(); @@ -871,17 +960,16 @@ public class Storage implements Closeable long pieceEnd = 0; for (int i = 0; i < pieces; i++) { + _checkProgress.set(i); int length = getUncheckedPiece(i, piece); boolean correctHash = metainfo.checkPiece(i, piece, 0, length); // close as we go so we don't run out of file descriptors pieceEnd += length; while (fileEnd <= pieceEnd) { TorrentFile tf = _torrentFiles.get(file); - synchronized(tf) { - try { - tf.closeRAF(); - } catch (IOException ioe) {} - } + try { + tf.closeRAF(); + } catch (IOException ioe) {} if (++file >= _torrentFiles.size()) break; fileEnd += _torrentFiles.get(file).length; @@ -897,6 +985,7 @@ public class Storage implements Closeable } } + _checkProgress.set(pieces); _probablyComplete = complete(); // close all the files so we don't end up with a zillion open ones; // we will reopen as needed @@ -953,9 +1042,7 @@ public class Storage implements Closeable for (TorrentFile tf : _torrentFiles) { try { - synchronized(tf) { tf.closeRAF(); - } } catch (IOException ioe) { _log.error("Error closing " + tf, ioe); // gobble gobble @@ -1180,17 +1267,15 @@ public class Storage implements Closeable return length; } - private static final long RAFCloseDelay = 4*60*1000; + private static final long RAF_CLOSE_DELAY = 4*60*1000; /** * Close unused RAFs - call periodically */ public void cleanRAFs() { - long cutoff = System.currentTimeMillis() - RAFCloseDelay; + long cutoff = System.currentTimeMillis() - RAF_CLOSE_DELAY; for (TorrentFile tf : _torrentFiles) { - synchronized(tf) { tf.closeRAF(cutoff); - } } } @@ -1316,7 +1401,9 @@ public class Storage implements Closeable // Windows will zero-fill up to the point of the write, which // will make the file fairly unfragmented, on average, at least until // near the end where it will get exponentially more fragmented. - if (!_isWindows) + // Also don't ballon on ARM, as a proxy for solid state disk, where fragmentation doesn't matter too much. + // Actual detection of SSD is almost impossible. + if (!_isWindows && !_isARM) isSparse = true; } @@ -1373,18 +1460,44 @@ public class Storage implements Closeable * @since 0.9.4 */ public static void main(String[] args) { - if (args.length < 1 || args.length > 2) { - System.err.println("Usage: Storage file-or-dir [announceURL]"); + boolean error = false; + String created_by = null; + String announce = null; + Getopt g = new Getopt("Storage", args, "a:c:"); + try { + int c; + while ((c = g.getopt()) != -1) { + switch (c) { + case 'a': + announce = g.getOptarg(); + break; + + case 'c': + created_by = g.getOptarg(); + break; + + case '?': + case ':': + default: + error = true; + break; + } // switch + } // while + } catch (Exception e) { + e.printStackTrace(); + error = true; + } + if (error || args.length - g.getOptind() != 1) { + System.err.println("Usage: Storage [-a announceURL] [-c created-by] file-or-dir"); System.exit(1); } - File base = new File(args[0]); - String announce = args.length == 2 ? args[1] : null; + File base = new File(args[g.getOptind()]); I2PAppContext ctx = I2PAppContext.getGlobalContext(); I2PSnarkUtil util = new I2PSnarkUtil(ctx); File file = null; FileOutputStream out = null; try { - Storage storage = new Storage(util, base, announce, null, false, null); + Storage storage = new Storage(util, base, announce, null, created_by, false, null); MetaInfo meta = storage.getMetaInfo(); file = new File(storage.getBaseName() + ".torrent"); out = new FileOutputStream(file); diff --git a/apps/i2psnark/java/src/org/klomp/snark/dht/DHTTracker.java b/apps/i2psnark/java/src/org/klomp/snark/dht/DHTTracker.java index 3b7b1d99c..784d8e6bf 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/dht/DHTTracker.java +++ b/apps/i2psnark/java/src/org/klomp/snark/dht/DHTTracker.java @@ -106,6 +106,7 @@ class DHTTracker { * @param noSeeds true if we do not want seeds in the result * @return list or empty list (never null) */ + @SuppressWarnings({"unchecked", "rawtypes"}) List getPeers(InfoHash ih, int max, boolean noSeeds) { Peers peers = _torrents.get(ih); if (peers == null || max <= 0) diff --git a/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java b/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java index 58e0f39fc..0e6da1c22 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java +++ b/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java @@ -243,6 +243,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT { * @param maxWait how long to wait for each to reply (not total) must be > 0 * @param parallel how many outstanding at once (unimplemented, always 1) */ + @SuppressWarnings("unchecked") private void explore(NID target, int maxNodes, long maxWait, int parallel) { List nodes = _knownNodes.findClosest(target, maxNodes); if (nodes.isEmpty()) { @@ -327,6 +328,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT { * @param noSeeds true if we do not want seeds in the result * @return possibly empty (never null) */ + @SuppressWarnings("unchecked") public Collection getPeersAndAnnounce(byte[] ih, int max, long maxWait, int annMax, long annMaxWait, boolean isSeed, boolean noSeeds) { @@ -858,6 +860,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT { * @param repliable true for all but announce * @return null on error */ + @SuppressWarnings("unchecked") private ReplyWaiter sendQuery(NodeInfo nInfo, Map map, boolean repliable) { if (nInfo.equals(_myNodeInfo)) throw new IllegalArgumentException("wtf don't send to ourselves"); @@ -907,6 +910,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT { * @param toPort the query port, we will increment here * @return success */ + @SuppressWarnings("unchecked") private boolean sendResponse(NodeInfo nInfo, MsgID msgID, Map map) { if (nInfo.equals(_myNodeInfo)) throw new IllegalArgumentException("wtf don't send to ourselves"); diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/FetchAndAdd.java b/apps/i2psnark/java/src/org/klomp/snark/web/FetchAndAdd.java index 99e2f62a6..5537b33f1 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/FetchAndAdd.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/FetchAndAdd.java @@ -77,7 +77,7 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl _log = ctx.logManager().getLog(FetchAndAdd.class); _mgr = mgr; _url = url; - _name = _("Download torrent file from {0}", url); + _name = _t("Download torrent file from {0}", url); _dataDir = dataDir; byte[] fake = null; try { @@ -90,7 +90,7 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl * Set off by startTorrent() */ public void run() { - _mgr.addMessageNoEscape(_("Fetching {0}", urlify(_url))); + _mgr.addMessageNoEscape(_t("Fetching {0}", urlify(_url))); File file = get(); if (!_isRunning) // stopped? return; @@ -100,7 +100,7 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl _mgr.deleteMagnet(this); add(file); } else { - _mgr.addMessageNoEscape(_("Torrent was not retrieved from {0}", urlify(_url)) + + _mgr.addMessageNoEscape(_t("Torrent was not retrieved from {0}", urlify(_url)) + ((_failCause != null) ? (": " + DataHelper.stripHTML(_failCause)) : "")); } if (file != null) @@ -127,7 +127,7 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl out.deleteOnExit(); if (!_mgr.util().connected()) { - _mgr.addMessage(_("Opening the I2P tunnel")); + _mgr.addMessage(_t("Opening the I2P tunnel")); if (!_mgr.util().connect()) return null; } @@ -154,7 +154,7 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl * This Snark may then be deleted. */ private void add(File file) { - _mgr.addMessageNoEscape(_("Torrent fetched from {0}", urlify(_url))); + _mgr.addMessageNoEscape(_t("Torrent fetched from {0}", urlify(_url))); FileInputStream in = null; try { in = new FileInputStream(file); @@ -163,7 +163,7 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl try { in.close(); } catch (IOException ioe) {} Snark snark = _mgr.getTorrentByInfoHash(fileInfoHash); if (snark != null) { - _mgr.addMessage(_("Torrent with this info hash is already running: {0}", snark.getBaseName())); + _mgr.addMessage(_t("Torrent with this info hash is already running: {0}", snark.getBaseName())); return; } @@ -175,9 +175,9 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl if (torrentFile.exists()) { if (_mgr.getTorrent(canonical) != null) - _mgr.addMessage(_("Torrent already running: {0}", name)); + _mgr.addMessage(_t("Torrent already running: {0}", name)); else - _mgr.addMessage(_("Torrent already in the queue: {0}", name)); + _mgr.addMessage(_t("Torrent already in the queue: {0}", name)); } else { // This may take a LONG time to create the storage. _mgr.copyAndAddTorrent(file, canonical, _dataDir); @@ -188,9 +188,9 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl throw new IOException("Unknown error - check logs"); } } catch (IOException ioe) { - _mgr.addMessageNoEscape(_("Torrent at {0} was not valid", urlify(_url)) + ": " + DataHelper.stripHTML(ioe.getMessage())); + _mgr.addMessageNoEscape(_t("Torrent at {0} was not valid", urlify(_url)) + ": " + DataHelper.stripHTML(ioe.getMessage())); } catch (OutOfMemoryError oom) { - _mgr.addMessageNoEscape(_("ERROR - Out of memory, cannot create torrent from {0}", urlify(_url)) + ": " + DataHelper.stripHTML(oom.getMessage())); + _mgr.addMessageNoEscape(_t("ERROR - Out of memory, cannot create torrent from {0}", urlify(_url)) + ": " + DataHelper.stripHTML(oom.getMessage())); } finally { try { if (in != null) in.close(); } catch (IOException ioe) {} } @@ -345,11 +345,11 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl // End of EepGet status listeners - private String _(String s) { + private String _t(String s) { return _mgr.util().getString(s); } - private String _(String s, String o) { + private String _t(String s, String o) { return _mgr.util().getString(s, o); } diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java index 4582bba68..b0335f6a8 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; +import java.util.TimeZone; import java.util.TreeMap; import javax.servlet.ServletConfig; @@ -31,6 +32,7 @@ import net.i2p.data.DataHelper; import net.i2p.data.Hash; import net.i2p.util.Log; import net.i2p.util.SecureFile; +import net.i2p.util.Translate; import org.klomp.snark.I2PSnarkUtil; import org.klomp.snark.MagnetURI; @@ -265,14 +267,14 @@ public class I2PSnarkServlet extends BasicServlet { "\n" + ""); if (_contextName.equals(DEFAULT_NAME)) - out.write(_("I2PSnark")); + out.write(_t("I2PSnark")); else out.write(_contextName); out.write(" - "); if (isConfigure) - out.write(_("Configuration")); + out.write(_t("Configuration")); else - out.write(_("Anonymous BitTorrent Client")); + out.write(_t("Anonymous BitTorrent Client")); String peerParam = req.getParameter("p"); if ("2".equals(peerParam)) out.write(" | Debug Mode"); @@ -286,7 +288,7 @@ public class I2PSnarkServlet extends BasicServlet { //out.write("<meta http-equiv=\"refresh\" content=\"" + delay + ";/i2psnark/" + peerString + "\">\n"); out.write("<script src=\"/js/ajax.js\" type=\"text/javascript\"></script>\n" + "<script type=\"text/javascript\">\n" + - "var failMessage = \"<div class=\\\"routerdown\\\"><b>" + _("Router is down") + "<\\/b><\\/div>\";\n" + + "var failMessage = \"<div class=\\\"routerdown\\\"><b>" + _t("Router is down") + "<\\/b><\\/div>\";\n" + "function requestAjax1() { ajax(\"" + _contextPath + "/.ajax/xhr1.html" + peerString.replace("&", "&") + // don't html escape in js "\", \"mainsection\", " + (delay*1000) + "); }\n" + @@ -303,27 +305,27 @@ public class I2PSnarkServlet extends BasicServlet { List<Tracker> sortedTrackers = null; if (isConfigure) { out.write("<div class=\"snarknavbar\"><a href=\"" + _contextPath + "/\" title=\""); - out.write(_("Torrents")); + out.write(_t("Torrents")); out.write("\" class=\"snarkRefresh\">"); out.write(toThemeImg("arrow_refresh")); out.write("  "); if (_contextName.equals(DEFAULT_NAME)) - out.write(_("I2PSnark")); + out.write(_t("I2PSnark")); else out.write(_contextName); out.write("</a>"); } else { out.write("<div class=\"snarknavbar\"><a href=\"" + _contextPath + '/' + peerString + "\" title=\""); - out.write(_("Refresh page")); + out.write(_t("Refresh page")); out.write("\" class=\"snarkRefresh\">"); out.write(toThemeImg("arrow_refresh")); out.write("  "); if (_contextName.equals(DEFAULT_NAME)) - out.write(_("I2PSnark")); + out.write(_t("I2PSnark")); else out.write(_contextName); out.write("</a> <a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkRefresh\" target=\"_blank\">"); - out.write(_("Forum")); + out.write(_t("Forum")); out.write("</a>\n"); sortedTrackers = _manager.getSortedTrackers(); @@ -338,7 +340,7 @@ public class I2PSnarkServlet extends BasicServlet { out.write("</div>\n"); String newURL = req.getParameter("newURL"); if (newURL != null && newURL.trim().length() > 0 && req.getMethod().equals("GET")) - _manager.addMessage(_("Click \"Add torrent\" button to fetch torrent")); + _manager.addMessage(_t("Click \"Add torrent\" button to fetch torrent")); out.write("<div class=\"page\"><div id=\"mainsection\" class=\"mainsection\">"); writeMessages(out, isConfigure, peerString); @@ -391,7 +393,7 @@ public class I2PSnarkServlet extends BasicServlet { else out.write("?"); out.write("action=Clear&nonce=" + _nonce + "\">"); - String tx = _("clear messages"); + String tx = _t("clear messages"); out.write(toThemeImg("delete", tx, tx)); out.write("</a>" + "<ul>"); @@ -446,9 +448,9 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<a href=\"" + _contextPath + '/' + getQueryString(req, null, null, sort)); out.write("\">"); } - String tx = _("Status"); + String tx = _t("Status"); out.write(toThemeImg("status", tx, - showSort ? _("Sort by {0}", tx) + showSort ? _t("Sort by {0}", tx) : tx)); if (showSort) out.write("</a>"); @@ -459,13 +461,13 @@ public class I2PSnarkServlet extends BasicServlet { // disable peer view out.write(getQueryString(req, "", null, null)); out.write("\">"); - tx = _("Hide Peers"); + tx = _t("Hide Peers"); out.write(toThemeImg("hidepeers", tx, tx)); } else { // enable peer view out.write(getQueryString(req, "1", null, null)); out.write("\">"); - tx = _("Show Peers"); + tx = _t("Show Peers"); out.write(toThemeImg("showpeers", tx, tx)); } out.write("</a><br>\n"); @@ -488,9 +490,9 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<a href=\"" + _contextPath + '/' + getQueryString(req, null, null, sort)); out.write("\">"); } - tx = _("Torrent"); + tx = _t("Torrent"); out.write(toThemeImg("torrent", tx, - showSort ? _("Sort by {0}", (isTypeSort ? _("File type") : tx)) + showSort ? _t("Sort by {0}", (isTypeSort ? _t("File type") : tx)) : tx)); if (showSort) out.write("</a>"); @@ -506,10 +508,10 @@ public class I2PSnarkServlet extends BasicServlet { out.write("\">"); } // Translators: Please keep short or translate as " " - tx = _("ETA"); + tx = _t("ETA"); out.write(toThemeImg("eta", tx, - showSort ? _("Sort by {0}", _("Estimated time remaining")) - : _("Estimated time remaining"))); + showSort ? _t("Sort by {0}", _t("Estimated time remaining")) + : _t("Estimated time remaining"))); if (showSort) out.write("</a>"); } @@ -532,10 +534,10 @@ public class I2PSnarkServlet extends BasicServlet { out.write("\">"); } // Translators: Please keep short or translate as " " - tx = _("RX"); + tx = _t("RX"); out.write(toThemeImg("head_rx", tx, - showSort ? _("Sort by {0}", (isDlSort ? _("Downloaded") : _("Size"))) - : _("Downloaded"))); + showSort ? _t("Sort by {0}", (isDlSort ? _t("Downloaded") : _t("Size"))) + : _t("Downloaded"))); if (showSort) out.write("</a>"); out.write("</th>\n<th align=\"right\">"); @@ -563,10 +565,10 @@ public class I2PSnarkServlet extends BasicServlet { out.write("\">"); } // Translators: Please keep short or translate as " " - tx = _("TX"); + tx = _t("TX"); out.write(toThemeImg("head_tx", tx, - showSort ? _("Sort by {0}", (nextRatSort ? _("Upload ratio") : _("Uploaded"))) - : _("Uploaded"))); + showSort ? _t("Sort by {0}", (nextRatSort ? _t("Upload ratio") : _t("Uploaded"))) + : _t("Uploaded"))); if (showSort) out.write("</a>"); } @@ -578,10 +580,10 @@ public class I2PSnarkServlet extends BasicServlet { out.write("\">"); } // Translators: Please keep short or translate as " " - tx = _("RX Rate"); + tx = _t("RX Rate"); out.write(toThemeImg("head_rxspeed", tx, - showSort ? _("Sort by {0}", _("Down Rate")) - : _("Down Rate"))); + showSort ? _t("Sort by {0}", _t("Down Rate")) + : _t("Down Rate"))); if (showSort) out.write("</a>"); } @@ -593,10 +595,10 @@ public class I2PSnarkServlet extends BasicServlet { out.write("\">"); } // Translators: Please keep short or translate as " " - tx = _("TX Rate"); + tx = _t("TX Rate"); out.write(toThemeImg("head_txspeed", tx, - showSort ? _("Sort by {0}", _("Up Rate")) - : _("Up Rate"))); + showSort ? _t("Sort by {0}", _t("Up Rate")) + : _t("Up Rate"))); if (showSort) out.write("</a>"); } @@ -612,9 +614,9 @@ public class I2PSnarkServlet extends BasicServlet { //out.write("<input type=\"image\" name=\"action\" value=\"StopAll\" title=\""); out.write("<input type=\"image\" name=\"action_StopAll\" value=\"foo\" title=\""); } - out.write(_("Stop all torrents and the I2P tunnel")); + out.write(_t("Stop all torrents and the I2P tunnel")); out.write("\" src=\"" + _imgPath + "stop_all.png\" alt=\""); - out.write(_("Stop All")); + out.write(_t("Stop All")); out.write("\">"); if (isDegraded) out.write("</a>"); @@ -626,9 +628,9 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<a href=\"" + _contextPath + "/?action=StartAll&nonce=" + _nonce + "\"><img title=\""); else out.write("<input type=\"image\" name=\"action_StartAll\" value=\"foo\" title=\""); - out.write(_("Start all stopped torrents")); + out.write(_t("Start all stopped torrents")); out.write("\" src=\"" + _imgPath + "start_all.png\" alt=\""); - out.write(_("Start All")); + out.write(_t("Start All")); out.write("\">"); if (isDegraded) out.write("</a>"); @@ -640,9 +642,9 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<a href=\"" + _contextPath + "/?action=StartAll&nonce=" + _nonce + "\"><img title=\""); else out.write("<input type=\"image\" name=\"action_StartAll\" value=\"foo\" title=\""); - out.write(_("Start all torrents and the I2P tunnel")); + out.write(_t("Start all torrents and the I2P tunnel")); out.write("\" src=\"" + _imgPath + "start_all.png\" alt=\""); - out.write(_("Start All")); + out.write(_t("Start All")); out.write("\">"); if (isDegraded) out.write("</a>"); @@ -665,13 +667,13 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<tr class=\"snarkTorrentNoneLoaded\">" + "<td class=\"snarkTorrentNoneLoaded\"" + " colspan=\"11\"><i>"); - out.write(_("No torrents loaded.")); + out.write(_t("No torrents loaded.")); out.write("</i></td></tr>\n"); } else /** if (snarks.size() > 1) */ { out.write("<tfoot><tr>\n" + " <th align=\"left\" colspan=\"6\">"); out.write(" "); - out.write(_("Totals")); + out.write(_t("Totals")); out.write(": "); out.write(ngettext("1 torrent", "{0} torrents", total)); out.write(", "); @@ -692,7 +694,7 @@ public class I2PSnarkServlet extends BasicServlet { if(!IPString.equals("unknown")) { // Only truncate if it's an actual dest out.write("; "); - out.write(_("Dest")); + out.write(_t("Dest")); out.write(": <tt>"); out.write(IPString.substring(0, 4)); out.write("</tt>"); @@ -820,7 +822,7 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<a href=\"" + _contextPath); out.write(getQueryString(req, null, "", null)); out.write("\">"); - out.write(toThemeImg("control_rewind_blue", _("First"), _("First page"))); + out.write(toThemeImg("control_rewind_blue", _t("First"), _t("First page"))); out.write("</a> "); int prev = Math.max(0, start - pageSize); //if (prev > 0) { @@ -830,7 +832,7 @@ public class I2PSnarkServlet extends BasicServlet { String sprev = (prev > 0) ? Integer.toString(prev) : ""; out.write(getQueryString(req, null, sprev, null)); out.write("\">"); - out.write(toThemeImg("control_back_blue", _("Prev"), _("Previous page"))); + out.write(toThemeImg("control_back_blue", _t("Prev"), _t("Previous page"))); out.write("</a> "); } } else { @@ -852,7 +854,7 @@ public class I2PSnarkServlet extends BasicServlet { page = pages; else page = 1 + (start / pageSize); - //out.write(" " + _("Page {0}", page) + thinsp(noThinsp) + pages + " "); + //out.write(" " + _t("Page {0}", page) + thinsp(noThinsp) + pages + " "); out.write("  " + page + thinsp(noThinsp) + pages + "  "); } if (start + pageSize < total) { @@ -863,7 +865,7 @@ public class I2PSnarkServlet extends BasicServlet { out.write(" <a href=\"" + _contextPath); out.write(getQueryString(req, null, Integer.toString(next), null)); out.write("\">"); - out.write(toThemeImg("control_play_blue", _("Next"), _("Next page"))); + out.write(toThemeImg("control_play_blue", _t("Next"), _t("Next page"))); out.write("</a> "); } // Last @@ -871,7 +873,7 @@ public class I2PSnarkServlet extends BasicServlet { out.write(" <a href=\"" + _contextPath); out.write(getQueryString(req, null, Integer.toString(last), null)); out.write("\">"); - out.write(toThemeImg("control_fastforward_blue", _("Last"), _("Last page"))); + out.write(toThemeImg("control_fastforward_blue", _t("Last"), _t("Last page"))); out.write("</a> "); } else { out.write(" " + @@ -917,7 +919,7 @@ public class I2PSnarkServlet extends BasicServlet { if ( (newFile != null) && (newFile.trim().length() > 0) ) f = new File(newFile.trim()); if ( (f != null) && (!f.exists()) ) { - _manager.addMessage(_("Torrent file {0} does not exist", newFile)); + _manager.addMessage(_t("Torrent file {0} does not exist", newFile)); } if ( (f != null) && (f.exists()) ) { // NOTE - All this is disabled - load from local file disabled @@ -928,16 +930,16 @@ public class I2PSnarkServlet extends BasicServlet { if (local.exists()) { if (_manager.getTorrent(canonical) != null) - _manager.addMessage(_("Torrent already running: {0}", newFile)); + _manager.addMessage(_t("Torrent already running: {0}", newFile)); else - _manager.addMessage(_("Torrent already in the queue: {0}", newFile)); + _manager.addMessage(_t("Torrent already in the queue: {0}", newFile)); } else { boolean ok = FileUtil.copy(f.getAbsolutePath(), local.getAbsolutePath(), true); if (ok) { - _manager.addMessage(_("Copying torrent to {0}", local.getAbsolutePath())); + _manager.addMessage(_t("Copying torrent to {0}", local.getAbsolutePath())); _manager.addTorrent(canonical); } else { - _manager.addMessage(_("Unable to copy the torrent to {0}", local.getAbsolutePath()) + ' ' + _("from {0}", f.getAbsolutePath())); + _manager.addMessage(_t("Unable to copy the torrent to {0}", local.getAbsolutePath()) + ' ' + _t("from {0}", f.getAbsolutePath())); } } } catch (IOException ioe) { @@ -953,11 +955,11 @@ public class I2PSnarkServlet extends BasicServlet { if (newDir.length() > 0) { dir = new SecureFile(newDir); if (!dir.isAbsolute()) { - _manager.addMessage(_("Data directory must be an absolute path") + ": " + dir); + _manager.addMessage(_t("Data directory must be an absolute path") + ": " + dir); return; } if (!dir.isDirectory() && !dir.mkdirs()) { - _manager.addMessage(_("Data directory cannot be created") + ": " + dir); + _manager.addMessage(_t("Data directory cannot be created") + ": " + dir); return; } Collection<Snark> snarks = _manager.getTorrents(); @@ -967,7 +969,7 @@ public class I2PSnarkServlet extends BasicServlet { continue; File sbase = storage.getBase(); if (isParentOf(sbase, dir)) { - _manager.addMessage(_("Cannot add torrent {0} inside another torrent: {1}", + _manager.addMessage(_t("Cannot add torrent {0} inside another torrent: {1}", dir.getAbsolutePath(), sbase)); return; } @@ -980,9 +982,15 @@ public class I2PSnarkServlet extends BasicServlet { } else if (newURL.startsWith(MagnetURI.MAGNET) || newURL.startsWith(MagnetURI.MAGGOT)) { addMagnet(newURL, dir); } else if (newURL.length() == 40 && newURL.replaceAll("[a-fA-F0-9]", "").length() == 0) { + // hex + newURL = newURL.toUpperCase(Locale.US); + addMagnet(MagnetURI.MAGNET_FULL + newURL, dir); + } else if (newURL.length() == 32 && newURL.replaceAll("[a-zA-Z2-7]", "").length() == 0) { + // b32 + newURL = newURL.toUpperCase(Locale.US); addMagnet(MagnetURI.MAGNET_FULL + newURL, dir); } else { - _manager.addMessage(_("Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\"", + _manager.addMessage(_t("Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\"", MagnetURI.MAGNET, MagnetURI.MAGGOT)); } } else { @@ -1023,7 +1031,7 @@ public class I2PSnarkServlet extends BasicServlet { // magnet - remove and delete are the same thing // Remove not shown on UI so we shouldn't get here _manager.deleteMagnet(snark); - _manager.addMessage(_("Magnet deleted: {0}", name)); + _manager.addMessage(_t("Magnet deleted: {0}", name)); return; } _manager.stopTorrent(snark, true); @@ -1031,7 +1039,7 @@ public class I2PSnarkServlet extends BasicServlet { // yeah, need to, otherwise it'll get autoadded again (at the moment File f = new File(name); f.delete(); - _manager.addMessage(_("Torrent file deleted: {0}", f.getAbsolutePath())); + _manager.addMessage(_t("Torrent file deleted: {0}", f.getAbsolutePath())); break; } } @@ -1050,15 +1058,15 @@ public class I2PSnarkServlet extends BasicServlet { // magnet - remove and delete are the same thing _manager.deleteMagnet(snark); if (snark instanceof FetchAndAdd) - _manager.addMessage(_("Download deleted: {0}", name)); + _manager.addMessage(_t("Download deleted: {0}", name)); else - _manager.addMessage(_("Magnet deleted: {0}", name)); + _manager.addMessage(_t("Magnet deleted: {0}", name)); return; } _manager.stopTorrent(snark, true); File f = new File(name); f.delete(); - _manager.addMessage(_("Torrent file deleted: {0}", f.getAbsolutePath())); + _manager.addMessage(_t("Torrent file deleted: {0}", f.getAbsolutePath())); Storage storage = snark.getStorage(); if (storage == null) break; @@ -1067,18 +1075,18 @@ public class I2PSnarkServlet extends BasicServlet { for (File df : storage.getFiles()) { // should be only one if (df.delete()) - _manager.addMessage(_("Data file deleted: {0}", df.getAbsolutePath())); + _manager.addMessage(_t("Data file deleted: {0}", df.getAbsolutePath())); else - _manager.addMessage(_("Data file could not be deleted: {0}", df.getAbsolutePath())); + _manager.addMessage(_t("Data file could not be deleted: {0}", df.getAbsolutePath())); } break; } // step 1 delete files for (File df : storage.getFiles()) { if (df.delete()) { - //_manager.addMessage(_("Data file deleted: {0}", df.getAbsolutePath())); + //_manager.addMessage(_t("Data file deleted: {0}", df.getAbsolutePath())); } else { - _manager.addMessage(_("Data file could not be deleted: {0}", df.getAbsolutePath())); + _manager.addMessage(_t("Data file could not be deleted: {0}", df.getAbsolutePath())); } } // step 2 delete dirs bottom-up @@ -1091,17 +1099,17 @@ public class I2PSnarkServlet extends BasicServlet { for (File df : dirs) { if (df.delete()) { ok = true; - //_manager.addMessage(_("Data dir deleted: {0}", df.getAbsolutePath())); + //_manager.addMessage(_t("Data dir deleted: {0}", df.getAbsolutePath())); } else { ok = false; - _manager.addMessage(_("Directory could not be deleted: {0}", df.getAbsolutePath())); + _manager.addMessage(_t("Directory could not be deleted: {0}", df.getAbsolutePath())); if (_log.shouldLog(Log.WARN)) _log.warn("Could not delete dir " + df); } } // step 3 message for base (last one) if (ok) - _manager.addMessage(_("Directory deleted: {0}", storage.getBase())); + _manager.addMessage(_t("Directory deleted: {0}", storage.getBase())); break; } } @@ -1111,6 +1119,7 @@ public class I2PSnarkServlet extends BasicServlet { String dataDir = req.getParameter("nofilter_dataDir"); boolean filesPublic = req.getParameter("filesPublic") != null; boolean autoStart = req.getParameter("autoStart") != null; + boolean smartSort = req.getParameter("smartSort") != null; String seedPct = req.getParameter("seedPct"); String eepHost = req.getParameter("eepHost"); String eepPort = req.getParameter("eepPort"); @@ -1126,7 +1135,7 @@ public class I2PSnarkServlet extends BasicServlet { boolean useDHT = req.getParameter("useDHT") != null; //String openTrackers = req.getParameter("openTrackers"); String theme = req.getParameter("theme"); - _manager.updateConfig(dataDir, filesPublic, autoStart, refreshDel, startupDel, pageSize, + _manager.updateConfig(dataDir, filesPublic, autoStart, smartSort, refreshDel, startupDel, pageSize, seedPct, eepHost, eepPort, i2cpHost, i2cpPort, i2cpOpts, upLimit, upBW, useOpenTrackers, useDHT, theme); // update servlet @@ -1152,18 +1161,18 @@ public class I2PSnarkServlet extends BasicServlet { if (baseFile.exists()) { String torrentName = baseFile.getName(); if (torrentName.toLowerCase(Locale.US).endsWith(".torrent")) { - _manager.addMessage(_("Cannot add a torrent ending in \".torrent\": {0}", baseFile.getAbsolutePath())); + _manager.addMessage(_t("Cannot add a torrent ending in \".torrent\": {0}", baseFile.getAbsolutePath())); return; } Snark snark = _manager.getTorrentByBaseName(torrentName); if (snark != null) { - _manager.addMessage(_("Torrent with this name is already running: {0}", torrentName)); + _manager.addMessage(_t("Torrent with this name is already running: {0}", torrentName)); return; } if (isParentOf(baseFile,_manager.getDataDir()) || isParentOf(baseFile, _manager.util().getContext().getBaseDir()) || isParentOf(baseFile, _manager.util().getContext().getConfigDir())) { - _manager.addMessage(_("Cannot add a torrent including an I2P directory: {0}", baseFile.getAbsolutePath())); + _manager.addMessage(_t("Cannot add a torrent including an I2P directory: {0}", baseFile.getAbsolutePath())); return; } Collection<Snark> snarks = _manager.getTorrents(); @@ -1173,12 +1182,12 @@ public class I2PSnarkServlet extends BasicServlet { continue; File sbase = storage.getBase(); if (isParentOf(sbase, baseFile)) { - _manager.addMessage(_("Cannot add torrent {0} inside another torrent: {1}", + _manager.addMessage(_t("Cannot add torrent {0} inside another torrent: {1}", baseFile.getAbsolutePath(), sbase)); return; } if (isParentOf(baseFile, sbase)) { - _manager.addMessage(_("Cannot add torrent {0} including another torrent: {1}", + _manager.addMessage(_t("Cannot add torrent {0} including another torrent: {1}", baseFile.getAbsolutePath(), sbase)); return; } @@ -1204,7 +1213,7 @@ public class I2PSnarkServlet extends BasicServlet { if (!backupURLs.isEmpty()) { // BEP 12 - Put primary first, then the others, each as the sole entry in their own list if (announceURL == null) { - _manager.addMessage(_("Error - Cannot include alternate trackers without a primary tracker")); + _manager.addMessage(_t("Error - Cannot include alternate trackers without a primary tracker")); return; } backupURLs.add(0, announceURL); @@ -1217,7 +1226,7 @@ public class I2PSnarkServlet extends BasicServlet { hasPublic = true; } if (hasPrivate && hasPublic) { - _manager.addMessage(_("Error - Cannot mix private and public trackers in a torrent")); + _manager.addMessage(_t("Error - Cannot mix private and public trackers in a torrent")); return; } announceList = new ArrayList<List<String>>(backupURLs.size()); @@ -1230,7 +1239,7 @@ public class I2PSnarkServlet extends BasicServlet { // it shouldn't be THAT bad, so keep it in this thread. // TODO thread it for big torrents, perhaps a la FetchAndAdd boolean isPrivate = _manager.getPrivateTrackers().contains(announceURL); - Storage s = new Storage(_manager.util(), baseFile, announceURL, announceList, isPrivate, null); + Storage s = new Storage(_manager.util(), baseFile, announceURL, announceList, null, isPrivate, null); s.close(); // close the files... maybe need a way to pass this Storage to addTorrent rather than starting over MetaInfo info = s.getMetaInfo(); File torrentFile = new File(_manager.getDataDir(), s.getBaseName() + ".torrent"); @@ -1239,18 +1248,18 @@ public class I2PSnarkServlet extends BasicServlet { boolean ok = _manager.addTorrent(info, s.getBitField(), torrentFile.getAbsolutePath(), baseFile, true); if (!ok) return; - _manager.addMessage(_("Torrent created for \"{0}\"", baseFile.getName()) + ": " + torrentFile.getAbsolutePath()); + _manager.addMessage(_t("Torrent created for \"{0}\"", baseFile.getName()) + ": " + torrentFile.getAbsolutePath()); if (announceURL != null && !_manager.util().getOpenTrackers().contains(announceURL)) - _manager.addMessage(_("Many I2P trackers require you to register new torrents before seeding - please do so before starting \"{0}\"", baseFile.getName())); + _manager.addMessage(_t("Many I2P trackers require you to register new torrents before seeding - please do so before starting \"{0}\"", baseFile.getName())); } catch (IOException ioe) { - _manager.addMessage(_("Error creating a torrent for \"{0}\"", baseFile.getAbsolutePath()) + ": " + ioe); + _manager.addMessage(_t("Error creating a torrent for \"{0}\"", baseFile.getAbsolutePath()) + ": " + ioe); _log.error("Error creating a torrent", ioe); } } else { - _manager.addMessage(_("Cannot create a torrent for the nonexistent data: {0}", baseFile.getAbsolutePath())); + _manager.addMessage(_t("Cannot create a torrent for the nonexistent data: {0}", baseFile.getAbsolutePath())); } } else { - _manager.addMessage(_("Error creating torrent - you must enter a file or directory")); + _manager.addMessage(_t("Error creating torrent - you must enter a file or directory")); } } else if ("StopAll".equals(action)) { _manager.stopAllTorrents(false); @@ -1281,7 +1290,7 @@ public class I2PSnarkServlet extends BasicServlet { /** @since 0.9 */ private void processTrackerForm(String action, HttpServletRequest req) { - if (action.equals(_("Delete selected")) || action.equals(_("Save tracker configuration"))) { + if (action.equals(_t("Delete selected")) || action.equals(_t("Save tracker configuration"))) { boolean changed = false; Map<String, Tracker> trackers = _manager.getTrackerMap(); List<String> removed = new ArrayList<String>(); @@ -1298,7 +1307,7 @@ public class I2PSnarkServlet extends BasicServlet { Tracker t; if ((t = trackers.remove(k)) != null) { removed.add(t.announceURL); - _manager.addMessage(_("Removed") + ": " + DataHelper.stripHTML(k)); + _manager.addMessage(_t("Removed") + ": " + DataHelper.stripHTML(k)); changed = true; } } else if (k.startsWith("ttype_")) { @@ -1330,7 +1339,7 @@ public class I2PSnarkServlet extends BasicServlet { if (!priv.equals(oldPriv)) _manager.savePrivateTrackers(priv); - } else if (action.equals(_("Add tracker"))) { + } else if (action.equals(_t("Add tracker"))) { String name = req.getParameter("tname"); String hurl = req.getParameter("thurl"); String aurl = req.getParameter("taurl"); @@ -1353,15 +1362,15 @@ public class I2PSnarkServlet extends BasicServlet { _manager.savePrivateTrackers(newPriv); } } else { - _manager.addMessage(_("Enter valid tracker name and URLs")); + _manager.addMessage(_t("Enter valid tracker name and URLs")); } } else { - _manager.addMessage(_("Enter valid tracker name and URLs")); + _manager.addMessage(_t("Enter valid tracker name and URLs")); } - } else if (action.equals(_("Restore defaults"))) { + } else if (action.equals(_t("Restore defaults"))) { _manager.setDefaultTrackerMap(); _manager.saveOpenTrackers(null); - _manager.addMessage(_("Restored default trackers")); + _manager.addMessage(_t("Restored default trackers")); } else { _manager.addMessage("Unknown POST action: \"" + action + '\"'); } @@ -1394,6 +1403,10 @@ public class I2PSnarkServlet extends BasicServlet { sort = Integer.parseInt(ssort); } catch (NumberFormatException nfe) {} } + if (_manager.isSmartSortEnabled()) + Sorters.setPattern(Translate.getLanguage(_manager.util().getContext())); + else + Sorters.setPattern(null); try { Collections.sort(rv, Sorters.getComparator(sort, this)); } catch (IllegalArgumentException iae) { @@ -1469,38 +1482,40 @@ public class I2PSnarkServlet extends BasicServlet { String rowClass = (row % 2 == 0 ? "snarkTorrentEven" : "snarkTorrentOdd"); String statusString; if (snark.isChecking()) { - statusString = toThemeImg("stalled", "", _("Checking")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Checking"); + statusString = toThemeImg("stalled", "", _t("Checking")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("Checking") + ' ' + + (new DecimalFormat("0.00%")).format(snark.getCheckingProgress()); } else if (snark.isAllocating()) { - statusString = toThemeImg("stalled", "", _("Allocating")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Allocating"); - } else if (err != null && curPeers == 0) { + statusString = toThemeImg("stalled", "", _t("Allocating")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("Allocating"); + } else if (err != null && isRunning && curPeers == 0) { + //} else if (err != null && curPeers == 0) { // Also don't show if seeding... but then we won't see the not-registered error // && remaining != 0 && needed != 0) { // let's only show this if we have no peers, otherwise PEX and DHT should bail us out, user doesn't care //if (isRunning && curPeers > 0 && !showPeers) // statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "trackererror.png\" title=\"" + err + "\"></td>" + - // "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _("Tracker Error") + + // "<td class=\"snarkTorrentStatus " + rowClass + "\">" + _t("Tracker Error") + // ": <a href=\"" + uri + "?p=" + Base64.encode(snark.getInfoHash()) + "\">" + // curPeers + thinsp(noThinsp) + // ngettext("1 peer", "{0} peers", knownPeers) + "</a>"; //else if (isRunning) - if (isRunning) + //if (isRunning) { statusString = toThemeImg("trackererror", "", err) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Tracker Error") + + "<td class=\"snarkTorrentStatus\">" + _t("Tracker Error") + ": " + curPeers + thinsp(noThinsp) + ngettext("1 peer", "{0} peers", knownPeers); - else { - if (err.length() > MAX_DISPLAYED_ERROR_LENGTH) - err = DataHelper.escapeHTML(err.substring(0, MAX_DISPLAYED_ERROR_LENGTH)) + "…"; - else - err = DataHelper.escapeHTML(err); - statusString = toThemeImg("trackererror", "", err) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Tracker Error"); - } + //} else { + // if (err.length() > MAX_DISPLAYED_ERROR_LENGTH) + // err = DataHelper.escapeHTML(err.substring(0, MAX_DISPLAYED_ERROR_LENGTH)) + "…"; + // else + // err = DataHelper.escapeHTML(err); + // statusString = toThemeImg("trackererror", "", err) + "</td>" + + // "<td class=\"snarkTorrentStatus\">" + _t("Tracker Error"); + //} } else if (snark.isStarting()) { - statusString = toThemeImg("stalled", "", _("Starting")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Starting"); + statusString = toThemeImg("stalled", "", _t("Starting")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("Starting"); } else if (remaining == 0 || needed == 0) { // < 0 means no meta size yet // partial complete or seeding if (isRunning) { @@ -1508,11 +1523,11 @@ public class I2PSnarkServlet extends BasicServlet { String txt; if (remaining == 0) { img = "seeding"; - txt = _("Seeding"); + txt = _t("Seeding"); } else { // partial img = "complete"; - txt = _("Complete"); + txt = _t("Complete"); } if (curPeers > 0 && !showPeers) statusString = toThemeImg(img, "", txt) + "</td>" + @@ -1526,42 +1541,42 @@ public class I2PSnarkServlet extends BasicServlet { ": " + curPeers + thinsp(noThinsp) + ngettext("1 peer", "{0} peers", knownPeers); } else { - statusString = toThemeImg("complete", "", _("Complete")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Complete"); + statusString = toThemeImg("complete", "", _t("Complete")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("Complete"); } } else { if (isRunning && curPeers > 0 && downBps > 0 && !showPeers) - statusString = toThemeImg("downloading", "", _("OK")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("OK") + + statusString = toThemeImg("downloading", "", _t("OK")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("OK") + ": <a href=\"" + uri + getQueryString(req, Base64.encode(snark.getInfoHash()), null, null) + "\">" + curPeers + thinsp(noThinsp) + ngettext("1 peer", "{0} peers", knownPeers) + "</a>"; else if (isRunning && curPeers > 0 && downBps > 0) - statusString = toThemeImg("downloading", "", _("OK")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("OK") + + statusString = toThemeImg("downloading", "", _t("OK")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("OK") + ": " + curPeers + thinsp(noThinsp) + ngettext("1 peer", "{0} peers", knownPeers); else if (isRunning && curPeers > 0 && !showPeers) - statusString = toThemeImg("stalled", "", _("Stalled")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Stalled") + + statusString = toThemeImg("stalled", "", _t("Stalled")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("Stalled") + ": <a href=\"" + uri + getQueryString(req, Base64.encode(snark.getInfoHash()), null, null) + "\">" + curPeers + thinsp(noThinsp) + ngettext("1 peer", "{0} peers", knownPeers) + "</a>"; else if (isRunning && curPeers > 0) - statusString = toThemeImg("stalled", "", _("Stalled")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Stalled") + + statusString = toThemeImg("stalled", "", _t("Stalled")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("Stalled") + ": " + curPeers + thinsp(noThinsp) + ngettext("1 peer", "{0} peers", knownPeers); else if (isRunning && knownPeers > 0) - statusString = toThemeImg("nopeers", "", _("No Peers")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("No Peers") + + statusString = toThemeImg("nopeers", "", _t("No Peers")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("No Peers") + ": 0" + thinsp(noThinsp) + knownPeers ; else if (isRunning) - statusString = toThemeImg("nopeers", "", _("No Peers")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("No Peers"); + statusString = toThemeImg("nopeers", "", _t("No Peers")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("No Peers"); else - statusString = toThemeImg("stopped", "", _("Stopped")) + "</td>" + - "<td class=\"snarkTorrentStatus\">" + _("Stopped"); + statusString = toThemeImg("stopped", "", _t("Stopped")) + "</td>" + + "<td class=\"snarkTorrentStatus\">" + _t("Stopped"); } out.write("<tr class=\"" + rowClass + "\">"); @@ -1590,7 +1605,7 @@ public class I2PSnarkServlet extends BasicServlet { // gets us to the details page instead of the file. StringBuilder buf = new StringBuilder(128); buf.append("<a href=\"").append(encodedBaseName) - .append("/\" title=\"").append(_("Torrent details")) + .append("/\" title=\"").append(_t("Torrent details")) .append("\">"); out.write(buf.toString()); } @@ -1625,9 +1640,9 @@ public class I2PSnarkServlet extends BasicServlet { buf.append('/'); buf.append("\" title=\""); if (isMultiFile) - buf.append(_("View files")); + buf.append(_t("View files")); else - buf.append(_("Open file")); + buf.append(_t("Open file")); buf.append("\">"); out.write(buf.toString()); } @@ -1679,9 +1694,9 @@ public class I2PSnarkServlet extends BasicServlet { getQueryString(req, "", null, null).replace("?", "&") + "\"><img title=\""); else out.write("<input type=\"image\" name=\"action_Stop_" + b64 + "\" value=\"foo\" title=\""); - out.write(_("Stop the torrent")); + out.write(_t("Stop the torrent")); out.write("\" src=\"" + _imgPath + "stop.png\" alt=\""); - out.write(_("Stop")); + out.write(_t("Stop")); out.write("\">"); if (isDegraded) out.write("</a>"); @@ -1694,9 +1709,9 @@ public class I2PSnarkServlet extends BasicServlet { getQueryString(req, "", null, null).replace("?", "&") + "\"><img title=\""); else out.write("<input type=\"image\" name=\"action_Start_" + b64 + "\" value=\"foo\" title=\""); - out.write(_("Start the torrent")); + out.write(_t("Start the torrent")); out.write("\" src=\"" + _imgPath + "start.png\" alt=\""); - out.write(_("Start")); + out.write(_t("Start")); out.write("\">"); if (isDegraded) out.write("</a>"); @@ -1709,16 +1724,16 @@ public class I2PSnarkServlet extends BasicServlet { getQueryString(req, "", null, null).replace("?", "&") + "\"><img title=\""); else out.write("<input type=\"image\" name=\"action_Remove_" + b64 + "\" value=\"foo\" title=\""); - out.write(_("Remove the torrent from the active list, deleting the .torrent file")); + out.write(_t("Remove the torrent from the active list, deleting the .torrent file")); out.write("\" onclick=\"if (!confirm('"); // Can't figure out how to escape double quotes inside the onclick string. // Single quotes in translate strings with parameters must be doubled. // Then the remaining single quote must be escaped - out.write(_("Are you sure you want to delete the file \\''{0}\\'' (downloaded data will not be deleted) ?", + out.write(_t("Are you sure you want to delete the file \\''{0}\\'' (downloaded data will not be deleted) ?", escapeJSString(snark.getName()))); out.write("')) { return false; }\""); out.write(" src=\"" + _imgPath + "remove.png\" alt=\""); - out.write(_("Remove")); + out.write(_t("Remove")); out.write("\">"); if (isDegraded) out.write("</a>"); @@ -1731,16 +1746,16 @@ public class I2PSnarkServlet extends BasicServlet { getQueryString(req, "", null, null).replace("?", "&") + "\"><img title=\""); else out.write("<input type=\"image\" name=\"action_Delete_" + b64 + "\" value=\"foo\" title=\""); - out.write(_("Delete the .torrent file and the associated data file(s)")); + out.write(_t("Delete the .torrent file and the associated data file(s)")); out.write("\" onclick=\"if (!confirm('"); // Can't figure out how to escape double quotes inside the onclick string. // Single quotes in translate strings with parameters must be doubled. // Then the remaining single quote must be escaped - out.write(_("Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded data?", + out.write(_t("Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded data?", escapeJSString(fullBasename))); out.write("')) { return false; }\""); out.write(" src=\"" + _imgPath + "delete.png\" alt=\""); - out.write(_("Delete")); + out.write(_t("Delete")); out.write("\">"); if (isDegraded) out.write("</a>"); @@ -1760,7 +1775,7 @@ public class I2PSnarkServlet extends BasicServlet { String ch = pid != null ? pid.toString().substring(0, 4) : "????"; String client; if ("AwMD".equals(ch)) - client = _("I2PSnark"); + client = _t("I2PSnark"); else if ("BFJT".equals(ch)) client = "I2PRufus"; else if ("TTMt".equals(ch)) @@ -1776,7 +1791,7 @@ public class I2PSnarkServlet extends BasicServlet { else if ("LUtU".equals(ch)) client = "KTorrent" + getAzVersion(pid.getID()); else - client = _("Unknown") + " (" + ch + ')'; + client = _t("Unknown") + " (" + ch + ')'; out.write(client + "  <tt>" + peer.toString().substring(5, 9)+ "</tt>"); if (showDebug) out.write(" inactive " + (peer.getInactiveTime() / 1000) + "s"); @@ -1788,7 +1803,7 @@ public class I2PSnarkServlet extends BasicServlet { if (isValid) { pct = (float) (100.0 * peer.completed() / meta.getPieces()); if (pct >= 100.0) - out.write(_("Seed")); + out.write(_t("Seed")); else { String ps = String.valueOf(pct); if (ps.length() > 5) @@ -1811,9 +1826,9 @@ public class I2PSnarkServlet extends BasicServlet { } else { out.write("<span class=\"choked\"><a title=\""); if (!peer.isInteresting()) - out.write(_("Uninteresting (The peer has no pieces we need)")); + out.write(_t("Uninteresting (The peer has no pieces we need)")); else - out.write(_("Choked (The peer is not allowing us to request pieces)")); + out.write(_t("Choked (The peer is not allowing us to request pieces)")); out.write("\">"); out.write(formatSize(peer.getDownloadRate()) + "ps</a></span>"); } @@ -1833,9 +1848,9 @@ public class I2PSnarkServlet extends BasicServlet { } else { out.write("<span class=\"choked\"><a title=\""); if (!peer.isInterested()) - out.write(_("Uninterested (We have no pieces the peer needs)")); + out.write(_t("Uninterested (We have no pieces the peer needs)")); else - out.write(_("Choking (We are not allowing the peer to request pieces)")); + out.write(_t("Choking (We are not allowing the peer to request pieces)")); out.write("\">"); out.write(formatSize(peer.getUploadRate()) + "ps</a></span>"); } @@ -1951,7 +1966,7 @@ public class I2PSnarkServlet extends BasicServlet { StringBuilder buf = new StringBuilder(128); buf.append("<a href=\"").append(baseURL).append("details.php?dllist=1&filelist=1&info_hash=") .append(TrackerClient.urlencode(infohash)) - .append("\" title=\"").append(_("Details at {0} tracker", name)).append("\" target=\"_blank\">"); + .append("\" title=\"").append(_t("Details at {0} tracker", name)).append("\" target=\"_blank\">"); return buf.toString(); } } @@ -1968,7 +1983,7 @@ public class I2PSnarkServlet extends BasicServlet { if (linkUrl != null) { StringBuilder buf = new StringBuilder(128); buf.append(linkUrl); - toThemeImg(buf, "details", _("Info"), ""); + toThemeImg(buf, "details", _t("Info"), ""); buf.append("</a>"); return buf.toString(); } @@ -2041,31 +2056,31 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<div class=\"addtorrentsection\"><span class=\"snarkConfigTitle\">"); out.write(toThemeImg("add")); out.write(' '); - out.write(_("Add Torrent")); + out.write(_t("Add Torrent")); out.write("</span><hr>\n<table border=\"0\"><tr><td>"); - out.write(_("From URL")); + out.write(_t("From URL")); out.write(":<td><input type=\"text\" name=\"nofilter_newURL\" size=\"85\" value=\"" + newURL + "\" spellcheck=\"false\""); out.write(" title=\""); - out.write(_("Enter the torrent file download URL (I2P only), magnet link, maggot link, or info hash")); + out.write(_t("Enter the torrent file download URL (I2P only), magnet link, maggot link, or info hash")); out.write("\"> \n"); // not supporting from file at the moment, since the file name passed isn't always absolute (so it may not resolve) //out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>"); out.write("<input type=\"submit\" class=\"add\" value=\""); - out.write(_("Add torrent")); + out.write(_t("Add torrent")); out.write("\" name=\"foo\" ><br>\n" + "<tr><td>"); - out.write(_("Data dir")); + out.write(_t("Data dir")); out.write(":<td><input type=\"text\" name=\"nofilter_newDir\" size=\"85\" value=\"\" spellcheck=\"false\""); out.write(" title=\""); - out.write(_("Enter the directory to save the data in (default {0})", _manager.getDataDir().getAbsolutePath())); + out.write(_t("Enter the directory to save the data in (default {0})", _manager.getDataDir().getAbsolutePath())); out.write("\"></td></tr>\n"); out.write("<tr><td> <td><span class=\"snarkAddInfo\">"); - out.write(_("You can also copy .torrent files to: {0}.", "<code>" + _manager.getDataDir().getAbsolutePath() + "</code>")); + out.write(_t("You can also copy .torrent files to: {0}.", "<code>" + _manager.getDataDir().getAbsolutePath() + "</code>")); out.write("\n"); - out.write(_("Removing a .torrent will cause it to stop.")); + out.write(_t("Removing a .torrent will cause it to stop.")); out.write("<br></span></table>\n"); out.write("</div></form></div>"); } @@ -2078,24 +2093,24 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<span class=\"snarkConfigTitle\">"); out.write(toThemeImg("create")); out.write(' '); - out.write(_("Create Torrent")); + out.write(_t("Create Torrent")); out.write("</span><hr>\n<table border=\"0\"><tr><td>"); //out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n"); - out.write(_("Data to seed")); + out.write(_t("Data to seed")); out.write(":<td>" + "<input type=\"text\" name=\"nofilter_baseFile\" size=\"85\" value=\"" + "\" spellcheck=\"false\" title=\""); - out.write(_("File or directory to seed (full path or within the directory {0} )", + out.write(_t("File or directory to seed (full path or within the directory {0} )", _manager.getDataDir().getAbsolutePath() + File.separatorChar)); out.write("\" ><tr><td>\n"); - out.write(_("Trackers")); + out.write(_t("Trackers")); out.write(":<td><table style=\"width: 30%;\"><tr><td></td><td align=\"center\">"); - out.write(_("Primary")); + out.write(_t("Primary")); out.write("</td><td align=\"center\">"); - out.write(_("Alternates")); + out.write(_t("Alternates")); out.write("</td><td rowspan=\"0\">" + " <input type=\"submit\" class=\"create\" value=\""); - out.write(_("Create torrent")); + out.write(_t("Create torrent")); out.write("\" name=\"foo\" >" + "</td></tr>\n"); for (Tracker t : sortedTrackers) { @@ -2113,16 +2128,16 @@ public class I2PSnarkServlet extends BasicServlet { out.write("\" value=\"foo\"></td></tr>\n"); } out.write("<tr><td><i>"); - out.write(_("none")); + out.write(_t("none")); out.write("</i></td><td align=\"center\"><input type=\"radio\" name=\"announceURL\" value=\"none\""); if (_lastAnnounceURL == null) out.write(" checked"); out.write("></td><td></td></tr></table>\n"); // make the user add a tracker on the config form now - //out.write(_("or")); + //out.write(_t("or")); //out.write(" <input type=\"text\" name=\"announceURLOther\" size=\"57\" value=\"http://\" " + // "title=\""); - //out.write(_("Specify custom tracker announce URL")); + //out.write(_t("Specify custom tracker announce URL")); //out.write("\" > " + out.write("</td></tr>" + "</table>\n" + @@ -2135,6 +2150,7 @@ public class I2PSnarkServlet extends BasicServlet { String dataDir = _manager.getDataDir().getAbsolutePath(); boolean filesPublic = _manager.areFilesPublic(); boolean autoStart = _manager.shouldAutoStart(); + boolean smartSort = _manager.isSmartSortEnabled(); boolean useOpenTrackers = _manager.util().shouldUseOpenTrackers(); //String openTrackers = _manager.util().getOpenTrackerString(); boolean useDHT = _manager.util().shouldUseDHT(); @@ -2146,32 +2162,40 @@ public class I2PSnarkServlet extends BasicServlet { out.write("<span class=\"snarkConfigTitle\">"); out.write(toThemeImg("config")); out.write(' '); - out.write(_("Configuration")); + out.write(_t("Configuration")); out.write("</span><hr>\n" + "<table border=\"0\"><tr><td>"); - out.write(_("Data directory")); + out.write(_t("Data directory")); out.write(": <td><input name=\"nofilter_dataDir\" size=\"80\" value=\"" + DataHelper.escapeHTML(dataDir) + "\" spellcheck=\"false\"></td>\n" + "<tr><td>"); - out.write(_("Files readable by all")); + out.write(_t("Files readable by all")); out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"filesPublic\" value=\"true\" " + (filesPublic ? "checked " : "") + "title=\""); - out.write(_("If checked, other users may access the downloaded files")); + out.write(_t("If checked, other users may access the downloaded files")); out.write("\" >" + "<tr><td>"); - out.write(_("Auto start torrents")); + out.write(_t("Auto start torrents")); out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"autoStart\" value=\"true\" " + (autoStart ? "checked " : "") + "title=\""); - out.write(_("If checked, automatically start torrents that are added")); + out.write(_t("If checked, automatically start torrents that are added")); out.write("\" >" + "<tr><td>"); - out.write(_("Theme")); + out.write(_t("Smart torrent sorting")); + out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"smartSort\" value=\"true\" " + + (smartSort ? "checked " : "") + + "title=\""); + out.write(_t("If checked, ignore words such as 'the' when sorting")); + out.write("\" >" + + + "<tr><td>"); + out.write(_t("Theme")); out.write(": <td><select name='theme'>"); String theme = _manager.getTheme(); String[] themes = _manager.getThemes(); @@ -2185,7 +2209,7 @@ public class I2PSnarkServlet extends BasicServlet { out.write("</select>\n" + "<tr><td>"); - out.write(_("Refresh time")); + out.write(_t("Refresh time")); out.write(": <td><select name=\"refreshDelay\">"); int delay = _manager.getRefreshDelaySeconds(); for (int i = 0; i < times.length; i++) { @@ -2198,21 +2222,21 @@ public class I2PSnarkServlet extends BasicServlet { if (times[i] > 0) out.write(DataHelper.formatDuration2(times[i] * 1000)); else - out.write(_("Never")); + out.write(_t("Never")); out.write("</option>\n"); } out.write("</select><br>" + "<tr><td>"); - out.write(_("Startup delay")); + out.write(_t("Startup delay")); out.write(": <td><input name=\"startupDelay\" size=\"4\" class=\"r\" value=\"" + _manager.util().getStartupDelay() + "\"> "); - out.write(_("minutes")); + out.write(_t("minutes")); out.write("<br>\n" + "<tr><td>"); - out.write(_("Page size")); + out.write(_t("Page size")); out.write(": <td><input name=\"pageSize\" size=\"4\" maxlength=\"6\" class=\"r\" value=\"" + _manager.getPageSize() + "\"> "); - out.write(_("torrents")); + out.write(_t("torrents")); out.write("<br>\n"); @@ -2236,39 +2260,39 @@ public class I2PSnarkServlet extends BasicServlet { out.write("</select><br>\n"); */ out.write("<tr><td>"); - out.write(_("Total uploader limit")); + out.write(_t("Total uploader limit")); out.write(": <td><input type=\"text\" name=\"upLimit\" class=\"r\" value=\"" + _manager.util().getMaxUploaders() + "\" size=\"4\" maxlength=\"3\" > "); - out.write(_("peers")); + out.write(_t("peers")); out.write("<br>\n" + "<tr><td>"); - out.write(_("Up bandwidth limit")); + out.write(_t("Up bandwidth limit")); out.write(": <td><input type=\"text\" name=\"upBW\" class=\"r\" value=\"" + _manager.util().getMaxUpBW() + "\" size=\"4\" maxlength=\"4\" > KBps <i>"); - out.write(_("Half available bandwidth recommended.")); + out.write(_t("Half available bandwidth recommended.")); out.write(" [<a href=\"/config.jsp\" target=\"blank\">"); - out.write(_("View or change router bandwidth")); + out.write(_t("View or change router bandwidth")); out.write("</a>]</i><br>\n" + "<tr><td>"); - out.write(_("Use open trackers also")); + out.write(_t("Use open trackers also")); out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"useOpenTrackers\" value=\"true\" " + (useOpenTrackers ? "checked " : "") + "title=\""); - out.write(_("If checked, announce torrents to open trackers as well as the tracker listed in the torrent file")); + out.write(_t("If checked, announce torrents to open trackers as well as the tracker listed in the torrent file")); out.write("\" ></td></tr>\n" + "<tr><td>"); - out.write(_("Enable DHT")); + out.write(_t("Enable DHT")); out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"useDHT\" value=\"true\" " + (useDHT ? "checked " : "") + "title=\""); - out.write(_("If checked, use DHT")); + out.write(_t("If checked, use DHT")); out.write("\" ></td></tr>\n"); // "<tr><td>"); - //out.write(_("Open tracker announce URLs")); + //out.write(_t("Open tracker announce URLs")); //out.write(": <td><input type=\"text\" name=\"openTrackers\" value=\"" // + openTrackers + "\" size=\"50\" ><br>\n"); @@ -2280,13 +2304,13 @@ public class I2PSnarkServlet extends BasicServlet { Map<String, String> options = new TreeMap<String, String>(_manager.util().getI2CPOptions()); out.write("<tr><td>"); - out.write(_("Inbound Settings")); + out.write(_t("Inbound Settings")); out.write(":<td>"); out.write(renderOptions(1, 10, 3, options.remove("inbound.quantity"), "inbound.quantity", TUNNEL)); out.write("     "); out.write(renderOptions(0, 4, 3, options.remove("inbound.length"), "inbound.length", HOP)); out.write("<tr><td>"); - out.write(_("Outbound Settings")); + out.write(_t("Outbound Settings")); out.write(":<td>"); out.write(renderOptions(1, 10, 3, options.remove("outbound.quantity"), "outbound.quantity", TUNNEL)); out.write("     "); @@ -2294,12 +2318,12 @@ public class I2PSnarkServlet extends BasicServlet { if (!_context.isRouterContext()) { out.write("<tr><td>"); - out.write(_("I2CP host")); + out.write(_t("I2CP host")); out.write(": <td><input type=\"text\" name=\"i2cpHost\" value=\"" + _manager.util().getI2CPHost() + "\" size=\"15\" > " + "<tr><td>"); - out.write(_("I2CP port")); + out.write(_t("I2CP port")); out.write(": <td><input type=\"text\" name=\"i2cpPort\" class=\"r\" value=\"" + + _manager.util().getI2CPPort() + "\" size=\"5\" maxlength=\"5\" > <br>\n"); } @@ -2314,12 +2338,12 @@ public class I2PSnarkServlet extends BasicServlet { opts.append(key).append('=').append(val).append(' '); } out.write("<tr><td>"); - out.write(_("I2CP options")); + out.write(_t("I2CP options")); out.write(": <td><textarea name=\"i2cpOpts\" cols=\"60\" rows=\"1\" wrap=\"off\" spellcheck=\"false\" >" + opts.toString() + "</textarea><br>\n" + "<tr><td colspan=\"2\"> \n" + // spacer "<tr><td> <td><input type=\"submit\" class=\"accept\" value=\""); - out.write(_("Save configuration")); + out.write(_t("Save configuration")); out.write("\" name=\"foo\" >\n" + "<tr><td colspan=\"2\"> \n" + // spacer "</table></div></div></form>"); @@ -2334,22 +2358,22 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("<span class=\"snarkConfigTitle\">"); toThemeImg(buf, "config"); buf.append(' '); - buf.append(_("Trackers")); + buf.append(_t("Trackers")); buf.append("</span><hr>\n" + "<table class=\"trackerconfig\"><tr><th>") - //.append(_("Remove")) + //.append(_t("Remove")) .append("</th><th>") - .append(_("Name")) + .append(_t("Name")) .append("</th><th>") - .append(_("Website URL")) + .append(_t("Website URL")) .append("</th><th>") - .append(_("Standard")) + .append(_t("Standard")) .append("</th><th>") - .append(_("Open")) + .append(_t("Open")) .append("</th><th>") - .append(_("Private")) + .append(_t("Private")) .append("</th><th>") - .append(_("Announce URL")) + .append(_t("Announce URL")) .append("</th></tr>\n"); List<String> openTrackers = _manager.util().getOpenTrackers(); List<String> privateTrackers = _manager.getPrivateTrackers(); @@ -2361,7 +2385,7 @@ public class I2PSnarkServlet extends BasicServlet { boolean isKnownOpen = _manager.util().isKnownOpenTracker(t.announceURL); boolean isOpen = isKnownOpen || openTrackers.contains(t.announceURL); buf.append("<tr><td><input type=\"checkbox\" class=\"optbox\" name=\"delete_") - .append(name).append("\" title=\"").append(_("Delete")).append("\">" + + .append(name).append("\" title=\"").append(_t("Delete")).append("\">" + "</td><td>").append(name) .append("</td><td>").append(urlify(homeURL, 35)) .append("</td><td><input type=\"radio\" class=\"optbox\" value=\"0\" name=\"ttype_") @@ -2393,7 +2417,7 @@ public class I2PSnarkServlet extends BasicServlet { .append("</td></tr>\n"); } buf.append("<tr><td><b>") - .append(_("Add")).append(":</b></td>" + + .append(_t("Add")).append(":</b></td>" + "<td><input type=\"text\" class=\"trackername\" name=\"tname\" spellcheck=\"false\"></td>" + "<td><input type=\"text\" class=\"trackerhome\" name=\"thurl\" spellcheck=\"false\"></td>" + "<td><input type=\"radio\" class=\"optbox\" value=\"0\" name=\"add_tracker_type\" checked=\"checked\"></td>" + @@ -2402,12 +2426,12 @@ public class I2PSnarkServlet extends BasicServlet { "<td><input type=\"text\" class=\"trackerannounce\" name=\"taurl\" spellcheck=\"false\"></td></tr>\n" + "<tr><td colspan=\"7\"> </td></tr>\n" + // spacer "<tr><td colspan=\"2\"></td><td colspan=\"5\">\n" + - "<input type=\"submit\" name=\"taction\" class=\"default\" value=\"").append(_("Add tracker")).append("\">\n" + - "<input type=\"submit\" name=\"taction\" class=\"delete\" value=\"").append(_("Delete selected")).append("\">\n" + - "<input type=\"submit\" name=\"taction\" class=\"add\" value=\"").append(_("Add tracker")).append("\">\n" + - "<input type=\"submit\" name=\"taction\" class=\"accept\" value=\"").append(_("Save tracker configuration")).append("\">\n" + - // "<input type=\"reset\" class=\"cancel\" value=\"").append(_("Cancel")).append("\">\n" + - "<input type=\"submit\" name=\"taction\" class=\"reload\" value=\"").append(_("Restore defaults")).append("\">\n" + + "<input type=\"submit\" name=\"taction\" class=\"default\" value=\"").append(_t("Add tracker")).append("\">\n" + + "<input type=\"submit\" name=\"taction\" class=\"delete\" value=\"").append(_t("Delete selected")).append("\">\n" + + "<input type=\"submit\" name=\"taction\" class=\"add\" value=\"").append(_t("Add tracker")).append("\">\n" + + "<input type=\"submit\" name=\"taction\" class=\"accept\" value=\"").append(_t("Save tracker configuration")).append("\">\n" + + // "<input type=\"reset\" class=\"cancel\" value=\"").append(_t("Cancel")).append("\">\n" + + "<input type=\"submit\" name=\"taction\" class=\"reload\" value=\"").append(_t("Restore defaults")).append("\">\n" + "</td></tr>" + "<tr><td colspan=\"7\"> </td></tr>\n" + // spacer "</table></div></div></form>\n"); @@ -2419,7 +2443,7 @@ public class I2PSnarkServlet extends BasicServlet { "<span class=\"snarkConfigTitle\"><a href=\"configure\">"); out.write(toThemeImg("config")); out.write(' '); - out.write(_("Configuration")); + out.write(_t("Configuration")); out.write("</a></span></span></div>\n"); } @@ -2436,7 +2460,7 @@ public class I2PSnarkServlet extends BasicServlet { String trackerURL = magnet.getTrackerURL(); _manager.addMagnet(name, ih, trackerURL, true, dataDir); } catch (IllegalArgumentException iae) { - _manager.addMessage(_("Invalid magnet URL {0}", url)); + _manager.addMessage(_t("Invalid magnet URL {0}", url)); } } @@ -2471,17 +2495,17 @@ public class I2PSnarkServlet extends BasicServlet { } /** translate */ - private String _(String s) { + private String _t(String s) { return _manager.util().getString(s); } /** translate */ - private String _(String s, Object o) { + private String _t(String s, Object o) { return _manager.util().getString(s, o); } /** translate */ - private String _(String s, Object o, Object o2) { + private String _t(String s, Object o, Object o2) { return _manager.util().getString(s, o, o2); } @@ -2611,10 +2635,21 @@ public class I2PSnarkServlet extends BasicServlet { String[] val = postParams.get("nonce"); if (val != null) { String nonce = val[0]; - if (String.valueOf(_nonce).equals(nonce)) - savePriorities(snark, postParams); - else + if (String.valueOf(_nonce).equals(nonce)) { + if (postParams.get("savepri") != null) { + savePriorities(snark, postParams); + } else if (postParams.get("stop") != null) { + _manager.stopTorrent(snark, false); + } else if (postParams.get("start") != null) { + _manager.startTorrent(snark); + } else if (postParams.get("recheck") != null) { + _manager.recheckTorrent(snark); + } else { + _manager.addMessage("Unknown command"); + } + } else { _manager.addMessage("Please retry form submission (bad nonce)"); + } } return null; } @@ -2637,6 +2672,7 @@ public class I2PSnarkServlet extends BasicServlet { r = new File(""); } + boolean showStopStart = snark != null; boolean showPriority = snark != null && snark.getStorage() != null && !snark.getStorage().complete() && r.isDirectory(); @@ -2645,7 +2681,7 @@ public class I2PSnarkServlet extends BasicServlet { if (title.endsWith("/")) title = title.substring(0, title.length() - 1); String directory = title; - title = _("Torrent") + ": " + DataHelper.escapeHTML(title); + title = _t("Torrent") + ": " + DataHelper.escapeHTML(title); buf.append(title); buf.append("\n").append(HEADER_A).append(_themePath).append(HEADER_B) .append("\n"); @@ -2659,14 +2695,15 @@ public class I2PSnarkServlet extends BasicServlet { toThemeImg(buf, "arrow_refresh"); buf.append("  "); if (_contextName.equals(DEFAULT_NAME)) - buf.append(_("I2PSnark")); + buf.append(_t("I2PSnark")); else buf.append(_contextName); buf.append("\n"); if (parent) // always true buf.append("
"); - if (showPriority) { + // for stop/start/check + if (showStopStart || showPriority) { buf.append("
\n"); buf.append("\n"); if (sortParam != null) { @@ -2678,7 +2715,7 @@ public class I2PSnarkServlet extends BasicServlet { // first table - torrent info buf.append("\n"); buf.append("\n"); @@ -2688,7 +2725,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("\n"); @@ -2696,7 +2733,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("\n"); @@ -2705,7 +2742,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("\n"); @@ -2724,16 +2761,16 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(trackerLink); else toThemeImg(buf, "details"); - buf.append(" ").append(_("Primary Tracker")).append(": "); + buf.append(" ").append(_t("Primary Tracker")).append(": "); buf.append(getShortTrackerLink(announce, snark.getInfoHash())); buf.append(""); } List> alist = meta.getAnnounceList(); - if (alist != null) { + if (alist != null && !alist.isEmpty()) { buf.append(""); + buf.append("\n"); } } if (meta != null) { String com = meta.getComment(); - if (com != null) { + if (com != null && com.length() > 0) { if (com.length() > 1024) com = com.substring(0, 1024); buf.append("\n"); } long dat = meta.getCreationDate(); + SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + String systemTimeZone = _context.getProperty("i2p.systemTimeZone"); + if (systemTimeZone != null) + fmt.setTimeZone(TimeZone.getTimeZone(systemTimeZone)); if (dat > 0) { - String date = (new SimpleDateFormat("yyyy-MM-dd HH:mm")).format(new Date(dat)); + String date = fmt.format(new Date(dat)); buf.append("\n"); } String cby = meta.getCreatedBy(); - if (cby != null) { + if (cby != null && cby.length() > 0) { if (cby.length() > 128) cby = com.substring(0, 128); buf.append("\n"); } + long[] dates = _manager.getSavedAddedAndCompleted(snark); + if (dates[0] > 0) { + String date = fmt.format(new Date(dates[0])); + buf.append("\n"); + } + if (dates[1] > 0) { + String date = fmt.format(new Date(dates[1])); + buf.append("\n"); + } } if (meta == null || !meta.isPrivate()) { @@ -2791,7 +2851,7 @@ public class I2PSnarkServlet extends BasicServlet { if (announce != null) buf.append("&tr=").append(announce); buf.append("\">") - .append(toImg("magnet", _("Magnet link"))) + .append(toImg("magnet", _t("Magnet link"))) .append("Magnet:\n"); } else { buf.append("\n"); } // We don't have the hash of the torrent file - //buf.append(""); buf.append("\n"); + + // buttons + if (showStopStart) { + buf.append("\n"); + } } else { + // snark == null // shouldn't happen buf.append("
") - .append(_("Torrent")) + .append(_t("Torrent")) .append(": ") .append(DataHelper.escapeHTML(snark.getBaseName())) .append("
"); toThemeImg(buf, "file"); buf.append(" ") - .append(_("Torrent file")) + .append(_t("Torrent file")) .append(": ") .append(DataHelper.escapeHTML(fullPath)) .append("
"); toThemeImg(buf, "file"); buf.append(" ") - .append(_("Data location")) + .append(_t("Data location")) .append(": ") .append(DataHelper.escapeHTML(snark.getStorage().getBase().getPath())) .append("
"); toThemeImg(buf, "details"); buf.append(" ") - .append(_("Info hash")) + .append(_t("Info hash")) .append(": ") .append(hex.toUpperCase(Locale.US)) .append("
"); toThemeImg(buf, "details"); buf.append(" ") - .append(_("Tracker List")).append(": "); + .append(_t("Tracker List")).append(": "); for (List alist2 : alist) { buf.append('['); boolean more = false; @@ -2746,43 +2783,66 @@ public class I2PSnarkServlet extends BasicServlet { } buf.append("] "); } - buf.append("
"); toThemeImg(buf, "details"); buf.append(" ") - .append(_("Comment")).append(": ") + .append(_t("Comment")).append(": ") .append(DataHelper.stripHTML(com)) .append("
"); toThemeImg(buf, "details"); buf.append(" ") - .append(_("Created")).append(": ") - .append(date).append(" UTC") + .append(_t("Created")).append(": ") + .append(date) .append("
"); toThemeImg(buf, "details"); buf.append(" ") - .append(_("Created By")).append(": ") + .append(_t("Created By")).append(": ") .append(DataHelper.stripHTML(cby)) .append("
"); + toThemeImg(buf, "details"); + buf.append(" ") + .append(_t("Added")).append(": ") + .append(date) + .append("
"); + toThemeImg(buf, "details"); + buf.append(" ") + .append(_t("Completed")).append(": ") + .append(date) + .append("
") - .append(_("Private torrent")) + .append(_t("Private torrent")) .append("
").append(_("Maggot link")).append(": ") + //buf.append("
").append(_t("Maggot link")).append(": ") // .append(MAGGOT).append(hex).append(':').append(hex).append("
"); toThemeImg(buf, "size"); buf.append(" ") - .append(_("Size")) + .append(_t("Size")) .append(": ") .append(formatSize(snark.getTotalLength())); int pieces = snark.getPieces(); @@ -2824,16 +2884,16 @@ public class I2PSnarkServlet extends BasicServlet { toThemeImg(buf, "head_rx"); buf.append(" "); if (completion < 1.0) - buf.append(_("Completion")) + buf.append(_t("Completion")) .append(": ") .append((new DecimalFormat("0.00%")).format(completion)); else - buf.append(_("Complete")).append(""); + buf.append(_t("Complete")).append(""); // up ratio buf.append(" "); toThemeImg(buf, "head_tx"); buf.append(" ") - .append(_("Upload ratio")) + .append(_t("Upload ratio")) .append(": "); long uploaded = snark.getUploaded(); if (uploaded > 0) { @@ -2853,7 +2913,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(" "); toThemeImg(buf, "head_rx"); buf.append(" ") - .append(_("Remaining")) + .append(_t("Remaining")) .append(": ") .append(formatSize(needed)); } @@ -2863,24 +2923,54 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(" "); toThemeImg(buf, "file"); buf.append(" ") - .append(_("Files")) + .append(_t("Files")) .append(": ") .append(fileCount); } buf.append(" "); toThemeImg(buf, "file"); buf.append(" ") - .append(_("Pieces")) + .append(_t("Pieces")) .append(": ") .append(pieces); buf.append(" "); toThemeImg(buf, "file"); buf.append(" ") - .append(_("Piece size")) + .append(_t("Piece size")) .append(": ") .append(formatSize(snark.getPieceLength(0))) .append("
"); + toThemeImg(buf, "file"); + if (snark.isChecking()) { + buf.append(" ").append(_t("Checking")).append("… ") + .append((new DecimalFormat("0.00%")).format(snark.getCheckingProgress())) + .append("   ") + .append(_t("Refresh page for results")).append(""); + } else if (snark.isStarting()) { + buf.append(" ").append(_t("Starting")).append("…"); + } else if (snark.isAllocating()) { + buf.append(" ").append(_t("Allocating")).append("…"); + } else { + boolean isRunning = !snark.isStopped(); + buf.append(" \n"); + else + buf.append(_t("Start")).append("\" name=\"start\" class=\"starttorrent\">\n"); + buf.append("   \n"); + else + buf.append("\" class=\"reload\">\n"); + } + buf.append("
Not found
resource=\"").append(r.toString()) .append("\"
base=\"").append(base) @@ -2911,8 +3001,10 @@ public class I2PSnarkServlet extends BasicServlet { Storage storage = snark != null ? snark.getStorage() : null; List fileList = new ArrayList(ls.length); + // precompute remaining for all files for efficiency + long[] remainingArray = (storage != null) ? storage.remaining() : null; for (int i = 0; i < ls.length; i++) { - fileList.add(new Sorters.FileAndIndex(ls[i], storage)); + fileList.add(new Sorters.FileAndIndex(ls[i], storage, remainingArray)); } boolean showSort = fileList.size() > 1; @@ -2930,7 +3022,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("\n"); buf.append("\n") .append("\n\n"); @@ -3030,21 +3122,21 @@ public class I2PSnarkServlet extends BasicServlet { int priority = 0; if (fai.isDirectory) { complete = true; - //status = toImg("tick") + ' ' + _("Directory"); + //status = toImg("tick") + ' ' + _t("Directory"); } else { if (snark == null || snark.getStorage() == null) { // Assume complete, perhaps he removed a completed torrent but kept a bookmark complete = true; - status = toImg("cancel") + ' ' + _("Torrent not found?"); + status = toImg("cancel") + ' ' + _t("Torrent not found?"); } else { long remaining = fai.remaining; if (remaining < 0) { complete = true; - status = toImg("cancel") + ' ' + _("File not found in torrent?"); + status = toImg("cancel") + ' ' + _t("File not found in torrent?"); } else if (remaining == 0 || length <= 0) { complete = true; - status = toImg("tick") + ' ' + _("Complete"); + status = toImg("tick") + ' ' + _t("Complete"); } else { priority = fai.priority; if (priority < 0) @@ -3054,8 +3146,8 @@ public class I2PSnarkServlet extends BasicServlet { else status = toImg("clock_red"); status += " " + - (100 * (length - remaining) / length) + "% " + _("complete") + - " (" + DataHelper.formatSize2(remaining) + "B " + _("remaining") + ")"; + (100 * (length - remaining) / length) + "% " + _t("complete") + + " (" + DataHelper.formatSize2(remaining) + "B " + _t("remaining") + ")"; } } @@ -3077,7 +3169,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("\"\""); } else { - buf.append(toImg(icon, _("Open"))).append(""); + buf.append(toImg(icon, _t("Open"))).append(""); } } else { buf.append(toImg(icon)); @@ -3101,17 +3193,17 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("\n 0) buf.append("checked=\"checked\""); - buf.append('>').append(_("High")); + buf.append('>').append(_t("High")); buf.append("\n').append(_("Normal")); + buf.append('>').append(_t("Normal")); buf.append("\n').append(_("Skip")); + buf.append('>').append(_t("Skip")); showSaveButton = true; } buf.append(""); @@ -3121,17 +3213,18 @@ public class I2PSnarkServlet extends BasicServlet { if (showSaveButton) { buf.append("\n"); } buf.append("
"); - String tx = _("Directory"); + String tx = _t("Directory"); // cycle through sort by name or type String sort; boolean isTypeSort = false; @@ -2950,7 +3042,7 @@ public class I2PSnarkServlet extends BasicServlet { .append(getQueryString(sort)).append("\">"); } toThemeImg(buf, "file", tx, - showSort ? _("Sort by {0}", (isTypeSort ? _("File type") : _("Name"))) + showSort ? _t("Sort by {0}", (isTypeSort ? _t("File type") : _t("Name"))) : tx + ": " + directory); if (showSort) buf.append(""); @@ -2965,9 +3057,9 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(""); } - tx = _("Size"); + tx = _t("Size"); toThemeImg(buf, "size", tx, - showSort ? _("Sort by {0}", tx) : tx); + showSort ? _t("Sort by {0}", tx) : tx); if (showSort) buf.append(""); buf.append(""); @@ -2977,9 +3069,9 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(""); } - tx = _("Status"); + tx = _t("Status"); toThemeImg(buf, "status", tx, - showRemainingSort ? _("Sort by {0}", _("Remaining")) : tx); + showRemainingSort ? _t("Sort by {0}", _t("Remaining")) : tx); if (showRemainingSort) buf.append(""); if (showPriority) { @@ -2989,9 +3081,9 @@ public class I2PSnarkServlet extends BasicServlet { buf.append(""); } - tx = _("Priority"); + tx = _t("Priority"); toThemeImg(buf, "priority", tx, - showSort ? _("Sort by {0}", tx) : tx); + showSort ? _t("Sort by {0}", tx) : tx); if (showSort) buf.append(""); } @@ -3001,7 +3093,7 @@ public class I2PSnarkServlet extends BasicServlet { buf.append("\">"); toThemeImg(buf, "up"); buf.append(' ') - .append(_("Up to higher level directory")) + .append(_t("Up to higher level directory")) .append("
 " + "") - .append(toImg("clock_red")).append(_("Set all high")).append("\n" + + .append(toImg("clock_red")).append(_t("Set all high")).append("\n" + "") - .append(toImg("clock")).append(_("Set all normal")).append("\n" + + .append(toImg("clock")).append(_t("Set all normal")).append("\n" + "") - .append(toImg("cancel")).append(_("Skip all")).append("\n" + - "

\n" + + "

\n" + "
\n"); - if (showPriority) + // for stop/start/check + if (showStopStart || showPriority) buf.append(""); buf.append("\n"); @@ -3202,7 +3295,7 @@ public class I2PSnarkServlet extends BasicServlet { icon = "itoopie_xxsm"; else icon = "compress"; - } else if (mime.equals("application/x-gtar") || + } else if (mime.equals("application/x-gtar") || mime.equals("application/x-xz") || mime.equals("application/compress") || mime.equals("application/gzip") || mime.equals("application/x-7z-compressed") || mime.equals("application/x-rar-compressed") || mime.equals("application/x-tar") || mime.equals("application/x-bzip2")) diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/Sorters.java b/apps/i2psnark/java/src/org/klomp/snark/web/Sorters.java index 3b71cf3f1..964e6d80d 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/Sorters.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/Sorters.java @@ -6,6 +6,8 @@ import java.text.Collator; import java.util.Collections; import java.util.Comparator; import java.util.Locale; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.klomp.snark.MetaInfo; import org.klomp.snark.Snark; @@ -18,6 +20,13 @@ import org.klomp.snark.Storage; */ class Sorters { + /** + * See below + */ + private static final Pattern PATTERN_DE, PATTERN_EN, PATTERN_ES, PATTERN_FR, + PATTERN_IT, PATTERN_NL, PATTERN_PT; + private static Pattern _pattern; + /** * Negative is reverse * @@ -113,8 +122,8 @@ class Sorters { /** - * Sort alphabetically in current locale, ignore case, ignore leading "the " - * (I guess this is worth it, a lot of torrents start with "The " + * Sort alphabetically in current locale, ignore case, ignore leading + * articles such as "the" if the pattern is set by setPattern() * @since 0.7.14 */ private static class TorrentNameComparator implements Comparator, Serializable { @@ -130,13 +139,16 @@ class Sorters { if (l.getStorage() != null && r.getStorage() == null) return 1; String ls = l.getBaseName(); - String llc = ls.toLowerCase(Locale.US); - if (llc.startsWith("the ") || llc.startsWith("the.") || llc.startsWith("the_")) - ls = ls.substring(4); String rs = r.getBaseName(); - String rlc = rs.toLowerCase(Locale.US); - if (rlc.startsWith("the ") || rlc.startsWith("the.") || rlc.startsWith("the_")) - rs = rs.substring(4); + Pattern p = _pattern; + if (p != null) { + Matcher m = p.matcher(ls); + if (m.matches()) + ls = ls.substring(m.group(1).length()); + m = p.matcher(rs); + if (m.matches()) + rs = rs.substring(m.group(1).length()); + } return Collator.getInstance().compare(ls, rs); } } @@ -356,13 +368,14 @@ class Sorters { /** * @param storage may be null + * @param remainingArray precomputed, non-null iff storage is non-null */ - public FileAndIndex(File file, Storage storage) { + public FileAndIndex(File file, Storage storage, long[] remainingArray) { this.file = file; index = storage != null ? storage.indexOf(file) : -1; if (index >= 0) { isDirectory = false; - remaining = storage.remaining(index); + remaining = remainingArray[index]; priority = storage.getPriority(index); } else { isDirectory = file.isDirectory(); @@ -527,4 +540,104 @@ class Sorters { return r.priority - l.priority; } } + + /* + * Match an indefinite or definite article in the language, + * followed by one or more whitespace, '.', or '_'. + * Does not match "partitive" articles. + * + * https://en.wikipedia.org/wiki/Article_%28grammar%29 + * http://www.loc.gov/marc/bibliographic/bdapndxf.html + */ + static { + PATTERN_DE = Pattern.compile( + // can't make the non-capturing innner group work + //"^((?:" + + "^((" + + "der|die|das|des|dem|den|ein|eine|einer|eines|einem|einen" + + ")[\\s\\._]+).*", + Pattern.CASE_INSENSITIVE); + PATTERN_EN = Pattern.compile( + "^((" + + "a|an|the" + + ")[\\s\\._]+).*", + Pattern.CASE_INSENSITIVE); + PATTERN_ES = Pattern.compile( + "^((" + + "el|la|lo|los|las|un|una|unos|unas" + + ")[\\s\\._]+).*", + Pattern.CASE_INSENSITIVE); + PATTERN_FR = Pattern.compile( + // note l' doesn't require whitespace after + "^(l'|((" + + "le|la|les|un|une|des" + + ")[\\s\\._]+)).*", + Pattern.CASE_INSENSITIVE); + PATTERN_IT = Pattern.compile( + // note l' and un' don't require whitespace after + "^(l'|un'|((" + + "il|lo|la|i|gli|le|uno|una|un" + + ")[\\s\\._]+)).*", + Pattern.CASE_INSENSITIVE); + PATTERN_NL = Pattern.compile( + "^((" + + "de|het|het'n|een|een'n" + + ")[\\s\\._]+).*", + Pattern.CASE_INSENSITIVE); + PATTERN_PT = Pattern.compile( + "^((" + + "o|a|os|as|um|uma|uns|umas" + + ")[\\s\\._]+).*", + Pattern.CASE_INSENSITIVE); + } + + /** + * Sets static field, oh well + * @param lang null for none + * @since 0.9.23 + */ + public static void setPattern(String lang) { + Pattern p; + if (lang == null) + p = null; + else if (lang.equals("de")) + p = PATTERN_DE; + else if (lang.equals("en")) + p = PATTERN_EN; + else if (lang.equals("es")) + p = PATTERN_ES; + else if (lang.equals("fr")) + p = PATTERN_FR; + else if (lang.equals("it")) + p = PATTERN_IT; + else if (lang.equals("nl")) + p = PATTERN_NL; + else if (lang.equals("pt")) + p = PATTERN_PT; + else + p = null; + _pattern = p; + } + +/**** + public static final void main(String[] args) { + if (args.length != 2) { + System.out.println("Usage: Sorters lang 'string'"); + System.exit(1); + } + String lang = args[0]; + setPattern(lang); + if (_pattern == null) { + System.out.println("Unsupported " + lang); + System.exit(1); + } + String s = args[1]; + Matcher m = _pattern.matcher(s); + if (m.matches()) { + System.out.println("Match is \"" + m.group(1) + '"'); + } else { + System.out.println("No match for \"" + s + '"'); + } + } +****/ } diff --git a/apps/i2psnark/locale/messages_ar.po b/apps/i2psnark/locale/messages_ar.po index 5410a2daa..502c69b90 100644 --- a/apps/i2psnark/locale/messages_ar.po +++ b/apps/i2psnark/locale/messages_ar.po @@ -826,7 +826,7 @@ msgid "Enter valid tracker name and URLs" msgstr "" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_cs.po b/apps/i2psnark/locale/messages_cs.po index b107d9e86..c2690f07f 100644 --- a/apps/i2psnark/locale/messages_cs.po +++ b/apps/i2psnark/locale/messages_cs.po @@ -817,7 +817,7 @@ msgid "Enter valid tracker name and URLs" msgstr "" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_de.po b/apps/i2psnark/locale/messages_de.po index ad4612891..dcdd0cb11 100644 --- a/apps/i2psnark/locale/messages_de.po +++ b/apps/i2psnark/locale/messages_de.po @@ -12,7 +12,7 @@ # Ettore Atalan , 2014 # foo , 2009 # SteinQuadrat, 2013 -# Lars Schimmer , 2014 +# Lars Schimmer , 2014-2015 # Max Muster , 2014 # mixxy, 2011 # nextloop , 2013 @@ -23,9 +23,9 @@ msgstr "" "Project-Id-Version: I2P\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-07-17 01:09+0000\n" -"PO-Revision-Date: 2015-07-17 01:32+0000\n" -"Last-Translator: kytv \n" -"Language-Team: German (http://www.transifex.com/projects/p/I2P/language/de/)\n" +"PO-Revision-Date: 2015-08-21 21:02+0000\n" +"Last-Translator: Lars Schimmer \n" +"Language-Team: German (http://www.transifex.com/otf/I2P/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -659,7 +659,7 @@ msgstr[1] "{0} DHT-Gegenstellen" #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:695 msgid "Dest" -msgstr "" +msgstr "Ziel" #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:823 msgid "First" @@ -826,7 +826,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Geben Sie einen gültigen Tracker-Namen und die URLs ein" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_en.po b/apps/i2psnark/locale/messages_en.po index d29a692a6..e34056fed 100644 --- a/apps/i2psnark/locale/messages_en.po +++ b/apps/i2psnark/locale/messages_en.po @@ -808,7 +808,7 @@ msgstr "" msgid "Enter valid tracker name and URLs" msgstr "" -#. "\n" + +#. "\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_es.po b/apps/i2psnark/locale/messages_es.po index b173cff24..c7a293fd0 100644 --- a/apps/i2psnark/locale/messages_es.po +++ b/apps/i2psnark/locale/messages_es.po @@ -824,7 +824,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Introduzca nombre y URLs de tracker (rastreador) válidos" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_fr.po b/apps/i2psnark/locale/messages_fr.po index 9aa06fb15..c8987da9a 100644 --- a/apps/i2psnark/locale/messages_fr.po +++ b/apps/i2psnark/locale/messages_fr.po @@ -821,7 +821,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Entrez nom de tracker valide et URLs" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_hu.po b/apps/i2psnark/locale/messages_hu.po index 102974283..6710e744e 100644 --- a/apps/i2psnark/locale/messages_hu.po +++ b/apps/i2psnark/locale/messages_hu.po @@ -814,7 +814,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Adj meg érvényes követő (tracker) nevet és URL címeket" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_it.po b/apps/i2psnark/locale/messages_it.po index 5ad5f6edc..e0315ca19 100644 --- a/apps/i2psnark/locale/messages_it.po +++ b/apps/i2psnark/locale/messages_it.po @@ -818,7 +818,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Inserisci nome e URL validi per il tracker" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_nb.po b/apps/i2psnark/locale/messages_nb.po index dc7cde85e..43d9111cc 100644 --- a/apps/i2psnark/locale/messages_nb.po +++ b/apps/i2psnark/locale/messages_nb.po @@ -813,7 +813,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Skriv inn valid tracker navn og URLer" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_nl.po b/apps/i2psnark/locale/messages_nl.po index 84b867411..20ff93044 100644 --- a/apps/i2psnark/locale/messages_nl.po +++ b/apps/i2psnark/locale/messages_nl.po @@ -816,7 +816,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Geef een geldige trackernaam en URLs in" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_pl.po b/apps/i2psnark/locale/messages_pl.po index 6072b60ec..3a6784054 100644 --- a/apps/i2psnark/locale/messages_pl.po +++ b/apps/i2psnark/locale/messages_pl.po @@ -11,14 +11,15 @@ # polacco , 2012 # seb, 2014 # Smert i2p , 2013 +# Taporpo Ne , 2015 msgid "" msgstr "" "Project-Id-Version: I2P\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-07-17 01:09+0000\n" -"PO-Revision-Date: 2015-07-17 01:32+0000\n" -"Last-Translator: kytv \n" -"Language-Team: Polish (http://www.transifex.com/projects/p/I2P/language/pl/)\n" +"PO-Revision-Date: 2015-09-03 19:18+0000\n" +"Last-Translator: Taporpo Ne \n" +"Language-Team: Polish (http://www.transifex.com/otf/I2P/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -655,7 +656,7 @@ msgstr[2] "{0} peerów DHT" #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:695 msgid "Dest" -msgstr "" +msgstr "Cel" #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:823 msgid "First" @@ -822,7 +823,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Podaj prawidłową nazwę trackera i URL" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_pt.po b/apps/i2psnark/locale/messages_pt.po index 8d356e627..5cd2d6c44 100644 --- a/apps/i2psnark/locale/messages_pt.po +++ b/apps/i2psnark/locale/messages_pt.po @@ -822,7 +822,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Insira um nome válido para o tracker e URLs" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_pt_bR.po b/apps/i2psnark/locale/messages_pt_bR.po index 4b20ea31f..251188047 100644 --- a/apps/i2psnark/locale/messages_pt_bR.po +++ b/apps/i2psnark/locale/messages_pt_bR.po @@ -814,7 +814,7 @@ msgid "Enter valid tracker name and URLs" msgstr "" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_ro.po b/apps/i2psnark/locale/messages_ro.po index 5259dc9c8..d0575dd0f 100644 --- a/apps/i2psnark/locale/messages_ro.po +++ b/apps/i2psnark/locale/messages_ro.po @@ -4,236 +4,243 @@ # To contribute translations, see http://www.i2p2.de/newdevelopers # # Translators: +# Di N., 2015 +# titus , 2015 msgid "" msgstr "" "Project-Id-Version: I2P\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-01 20:06+0000\n" -"PO-Revision-Date: 2013-12-05 15:04+0000\n" -"Last-Translator: polearnik \n" -"Language-Team: Romanian (http://www.transifex.com/projects/p/I2P/language/ro/)\n" +"POT-Creation-Date: 2015-07-17 01:09+0000\n" +"PO-Revision-Date: 2015-07-21 13:47+0000\n" +"Last-Translator: Di N.\n" +"Language-Team: Romanian (http://www.transifex.com/otf/I2P/language/ro/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ro\n" "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" -#: ../java/src/org/klomp/snark/IdleChecker.java:69 -#: ../java/src/org/klomp/snark/SnarkManager.java:1938 -#: ../java/src/org/klomp/snark/SnarkManager.java:1949 +#: ../java/src/org/klomp/snark/IdleChecker.java:75 +msgid "No more torrents running." +msgstr "Nu sunt torrente care rulează" + +#: ../java/src/org/klomp/snark/IdleChecker.java:76 +#: ../java/src/org/klomp/snark/SnarkManager.java:2392 +#: ../java/src/org/klomp/snark/SnarkManager.java:2403 msgid "I2P tunnel closed." msgstr "Tunel I2P închis." #: ../java/src/org/klomp/snark/MagnetURI.java:42 #: ../java/src/org/klomp/snark/MagnetURI.java:52 -#: ../java/src/org/klomp/snark/SnarkManager.java:1644 +#: ../java/src/org/klomp/snark/SnarkManager.java:2096 msgid "Magnet" msgstr "Magnet" -#: ../java/src/org/klomp/snark/SnarkManager.java:504 +#: ../java/src/org/klomp/snark/SnarkManager.java:772 #, java-format msgid "Total uploaders limit changed to {0}" msgstr "Limita totala de incarcare schimbat la {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:506 +#: ../java/src/org/klomp/snark/SnarkManager.java:774 #, java-format msgid "Minimum total uploaders limit is {0}" msgstr "Limita totala minimă de incarcare este {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:518 +#: ../java/src/org/klomp/snark/SnarkManager.java:786 #, java-format msgid "Up BW limit changed to {0}KBps" msgstr "Limita de incarcare BW schimbat la {0} Kbps" -#: ../java/src/org/klomp/snark/SnarkManager.java:520 +#: ../java/src/org/klomp/snark/SnarkManager.java:788 #, java-format msgid "Minimum up bandwidth limit is {0}KBps" msgstr "Limita de lățime de bandă minima la incarcarea este {0} Kbps" -#: ../java/src/org/klomp/snark/SnarkManager.java:532 +#: ../java/src/org/klomp/snark/SnarkManager.java:800 #, java-format msgid "Startup delay changed to {0}" msgstr "Întârziere de pornire schimbat la {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:543 +#: ../java/src/org/klomp/snark/SnarkManager.java:811 #, java-format msgid "Refresh time changed to {0}" msgstr "Actualizarea timpului schimbat la {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:545 +#: ../java/src/org/klomp/snark/SnarkManager.java:813 msgid "Refresh disabled" msgstr "Refresh dezactivat" -#: ../java/src/org/klomp/snark/SnarkManager.java:561 +#: ../java/src/org/klomp/snark/SnarkManager.java:829 #, java-format msgid "Page size changed to {0}" msgstr "Schimbat dimensiunea paginii la {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:570 +#: ../java/src/org/klomp/snark/SnarkManager.java:838 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:956 msgid "Data directory must be an absolute path" msgstr "Dosarul de data de lucru trebuie să fie o cale absolută" -#: ../java/src/org/klomp/snark/SnarkManager.java:572 +#: ../java/src/org/klomp/snark/SnarkManager.java:840 msgid "Data directory does not exist" msgstr "Dosarul de date nu există" -#: ../java/src/org/klomp/snark/SnarkManager.java:574 +#: ../java/src/org/klomp/snark/SnarkManager.java:842 msgid "Not a directory" msgstr "Nu e un dosar" -#: ../java/src/org/klomp/snark/SnarkManager.java:576 +#: ../java/src/org/klomp/snark/SnarkManager.java:844 msgid "Unreadable" msgstr "necitibil" -#: ../java/src/org/klomp/snark/SnarkManager.java:581 +#: ../java/src/org/klomp/snark/SnarkManager.java:849 #, java-format msgid "Data directory changed to {0}" msgstr "Dosarul de date s-a schimbat la {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:636 +#: ../java/src/org/klomp/snark/SnarkManager.java:904 msgid "I2CP and tunnel changes will take effect after stopping all torrents" msgstr "I2CP și tunel modificările vor intra în vigoare după oprirea tuturor torrentele" -#: ../java/src/org/klomp/snark/SnarkManager.java:640 +#: ../java/src/org/klomp/snark/SnarkManager.java:908 #, java-format msgid "I2CP options changed to {0}" msgstr "Opțiuni I2CP schimbat la {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:646 +#: ../java/src/org/klomp/snark/SnarkManager.java:914 msgid "Disconnecting old I2CP destination" msgstr "Deconectarea destinației vechi I2CP" -#: ../java/src/org/klomp/snark/SnarkManager.java:648 +#: ../java/src/org/klomp/snark/SnarkManager.java:916 #, java-format msgid "I2CP settings changed to {0}" msgstr "Opțiuni I2CP schimbat la {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:653 +#: ../java/src/org/klomp/snark/SnarkManager.java:921 msgid "" "Unable to connect with the new settings, reverting to the old I2CP settings" msgstr "Imposibil de a se conecta cu noile setări, revenirea la vechile setări I2CP" -#: ../java/src/org/klomp/snark/SnarkManager.java:657 +#: ../java/src/org/klomp/snark/SnarkManager.java:925 msgid "Unable to reconnect with the old settings!" msgstr "Nu pot să se reconectez cu setările vechi!" -#: ../java/src/org/klomp/snark/SnarkManager.java:659 +#: ../java/src/org/klomp/snark/SnarkManager.java:927 msgid "Reconnected on the new I2CP destination" msgstr "Reconectat la destinație noua I2CP" -#: ../java/src/org/klomp/snark/SnarkManager.java:666 +#: ../java/src/org/klomp/snark/SnarkManager.java:934 #, java-format msgid "I2CP listener restarted for \"{0}\"" msgstr "I2CP ascultător repornit pentru \"{0}\"" -#: ../java/src/org/klomp/snark/SnarkManager.java:680 +#: ../java/src/org/klomp/snark/SnarkManager.java:948 msgid "New files will be publicly readable" msgstr "Fișiere noi vor putea fi citite public" -#: ../java/src/org/klomp/snark/SnarkManager.java:682 +#: ../java/src/org/klomp/snark/SnarkManager.java:950 msgid "New files will not be publicly readable" msgstr "Fișiere noi nu vor putea fi citite public" -#: ../java/src/org/klomp/snark/SnarkManager.java:689 +#: ../java/src/org/klomp/snark/SnarkManager.java:957 msgid "Enabled autostart" msgstr "Activeaza autopornirea" -#: ../java/src/org/klomp/snark/SnarkManager.java:691 +#: ../java/src/org/klomp/snark/SnarkManager.java:959 msgid "Disabled autostart" msgstr "Dezactivează autopornirea" -#: ../java/src/org/klomp/snark/SnarkManager.java:697 +#: ../java/src/org/klomp/snark/SnarkManager.java:965 msgid "Enabled open trackers - torrent restart required to take effect." msgstr "Trackere deschise activat - repornirea torrentui este necesara să aibă efect." -#: ../java/src/org/klomp/snark/SnarkManager.java:699 +#: ../java/src/org/klomp/snark/SnarkManager.java:967 msgid "Disabled open trackers - torrent restart required to take effect." msgstr "Trackere deschise dezactivat - repornirea torrentui este necesara să aibă efect." -#: ../java/src/org/klomp/snark/SnarkManager.java:706 +#: ../java/src/org/klomp/snark/SnarkManager.java:974 msgid "Enabled DHT." msgstr "DHT activat." -#: ../java/src/org/klomp/snark/SnarkManager.java:708 +#: ../java/src/org/klomp/snark/SnarkManager.java:976 msgid "Disabled DHT." msgstr "DHT dezactivat." -#: ../java/src/org/klomp/snark/SnarkManager.java:710 +#: ../java/src/org/klomp/snark/SnarkManager.java:978 msgid "DHT change requires tunnel shutdown and reopen" msgstr "Schimbare DHT necesită oprirea tunel și redeschiderea lui" -#: ../java/src/org/klomp/snark/SnarkManager.java:717 +#: ../java/src/org/klomp/snark/SnarkManager.java:985 #, java-format msgid "{0} theme loaded, return to main i2psnark page to view." msgstr "{0} temă încărcata, a reveni la pagina principală i2psnark pentru a vizualiza." -#: ../java/src/org/klomp/snark/SnarkManager.java:727 +#: ../java/src/org/klomp/snark/SnarkManager.java:995 msgid "Configuration unchanged." msgstr "Configuraţia neschimbată" -#: ../java/src/org/klomp/snark/SnarkManager.java:759 +#: ../java/src/org/klomp/snark/SnarkManager.java:1027 msgid "Open Tracker list changed - torrent restart required to take effect." msgstr "Trackere deschise schimbat - repornirea torrentui este necesara să aibă efect." -#: ../java/src/org/klomp/snark/SnarkManager.java:769 +#: ../java/src/org/klomp/snark/SnarkManager.java:1037 msgid "Private tracker list changed - affects newly created torrents only." msgstr "Lista trackerilor private schimbat - afectează doar nou-create torrente." -#: ../java/src/org/klomp/snark/SnarkManager.java:815 +#: ../java/src/org/klomp/snark/SnarkManager.java:1083 #, java-format msgid "Unable to save the config to {0}" msgstr "Imposibil de a salva configurarea {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:893 +#: ../java/src/org/klomp/snark/SnarkManager.java:1164 msgid "Connecting to I2P" msgstr "Conectarea la I2P" -#: ../java/src/org/klomp/snark/SnarkManager.java:896 +#: ../java/src/org/klomp/snark/SnarkManager.java:1167 msgid "Error connecting to I2P - check your I2CP settings!" msgstr "Eroare la conectarea la I2P - verificați setările I2CP!" -#: ../java/src/org/klomp/snark/SnarkManager.java:905 -#: ../java/src/org/klomp/snark/SnarkManager.java:1681 +#: ../java/src/org/klomp/snark/SnarkManager.java:1176 +#: ../java/src/org/klomp/snark/SnarkManager.java:2133 #, java-format msgid "Error: Could not add the torrent {0}" msgstr "Eroare: Nu sa putut adăuga torentul {0}" #. catch this here so we don't try do delete it below -#: ../java/src/org/klomp/snark/SnarkManager.java:927 +#: ../java/src/org/klomp/snark/SnarkManager.java:1199 #, java-format msgid "Cannot open \"{0}\"" msgstr "Nu se poate deschide \"{0}\"." #. TODO - if the existing one is a magnet, delete it and add the metainfo #. instead? -#: ../java/src/org/klomp/snark/SnarkManager.java:946 -#: ../java/src/org/klomp/snark/SnarkManager.java:1047 -#: ../java/src/org/klomp/snark/SnarkManager.java:1129 -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:159 +#: ../java/src/org/klomp/snark/SnarkManager.java:1218 +#: ../java/src/org/klomp/snark/SnarkManager.java:1352 +#: ../java/src/org/klomp/snark/SnarkManager.java:1440 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:166 #, java-format msgid "Torrent with this info hash is already running: {0}" msgstr "Torrent cu aceste informații hash este deja pornit: {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:952 +#: ../java/src/org/klomp/snark/SnarkManager.java:1224 #, java-format msgid "ERROR - No I2P trackers in private torrent \"{0}\"" msgstr "EROARE - Nu sunt trackere I2P in torrent privat \"{0}\"" -#: ../java/src/org/klomp/snark/SnarkManager.java:954 +#: ../java/src/org/klomp/snark/SnarkManager.java:1226 #, java-format msgid "" "Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and" " DHT only." msgstr "Avertisment - Nu sunt trackere I2P în \"{0}\", va anunța numai la I2P trackers deschise și DHT ." -#: ../java/src/org/klomp/snark/SnarkManager.java:957 +#: ../java/src/org/klomp/snark/SnarkManager.java:1229 #, java-format msgid "" "Warning - No I2P trackers in \"{0}\", and open trackers are disabled, will " "announce to DHT only." msgstr "Avertisment - Nu sunt trackere I2P în \"{0}\", și trackere deschise sunt dezactivate, se va anunța numai prin DHT." -#: ../java/src/org/klomp/snark/SnarkManager.java:959 +#: ../java/src/org/klomp/snark/SnarkManager.java:1231 #, java-format msgid "" "Warning - No I2P trackers in \"{0}\", and DHT and open trackers are " @@ -241,34 +248,34 @@ msgid "" "torrent." msgstr "Avertisment - Nu sunt trackere I2P în \"{0}\", și DHT și trackere deschise sunt dezactivate, ar trebui să permiteti trackere deschise sau DHT înainte de a începe torrent." -#: ../java/src/org/klomp/snark/SnarkManager.java:981 +#: ../java/src/org/klomp/snark/SnarkManager.java:1257 #, java-format msgid "Torrent in \"{0}\" is invalid" msgstr "Torrent în \"{0}\" este incorect" -#: ../java/src/org/klomp/snark/SnarkManager.java:988 -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:183 +#: ../java/src/org/klomp/snark/SnarkManager.java:1264 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:193 #, java-format msgid "ERROR - Out of memory, cannot create torrent from {0}" msgstr "EROARE - Out de memorie, nu se pot crea torrent din {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1000 +#: ../java/src/org/klomp/snark/SnarkManager.java:1285 #, java-format msgid "Torrent added and started: \"{0}\"" msgstr "Torrent adăugat și pornit: \"{0}\"" -#: ../java/src/org/klomp/snark/SnarkManager.java:1002 +#: ../java/src/org/klomp/snark/SnarkManager.java:1287 #, java-format msgid "Torrent added: \"{0}\"" msgstr "Torrent adăugat: \"{0}\"" -#: ../java/src/org/klomp/snark/SnarkManager.java:1058 -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:87 +#: ../java/src/org/klomp/snark/SnarkManager.java:1363 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:93 #, java-format msgid "Fetching {0}" msgstr "Preluarea {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1064 +#: ../java/src/org/klomp/snark/SnarkManager.java:1369 #, java-format msgid "" "Open trackers are disabled and we have no DHT peers. Fetch of {0} may not " @@ -276,311 +283,348 @@ msgid "" "DHT." msgstr "Trackere deschise sunt dezactivate și nu avem colegii DHT. Descarcarea din{0} nu poate reuși până când veți începe un alt torrent, permite trackere deschise, sau permite DHT." -#: ../java/src/org/klomp/snark/SnarkManager.java:1068 +#: ../java/src/org/klomp/snark/SnarkManager.java:1373 #, java-format msgid "Adding {0}" msgstr "Adăugarea {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1100 +#: ../java/src/org/klomp/snark/SnarkManager.java:1406 #, java-format msgid "Download already running: {0}" msgstr "Descarcarea deja rulează: {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1139 -#: ../java/src/org/klomp/snark/SnarkManager.java:1162 -#: ../java/src/org/klomp/snark/SnarkManager.java:1600 +#: ../java/src/org/klomp/snark/SnarkManager.java:1451 +#: ../java/src/org/klomp/snark/SnarkManager.java:1477 +#: ../java/src/org/klomp/snark/SnarkManager.java:2052 #, java-format msgid "Failed to copy torrent file to {0}" msgstr " Copierea fisieurului torent in {0} a esuat" -#: ../java/src/org/klomp/snark/SnarkManager.java:1389 +#: ../java/src/org/klomp/snark/SnarkManager.java:1828 #, java-format msgid "Too many files in \"{0}\" ({1}), deleting it!" msgstr "Prea multe fișiere în \"{0}\" ({1}), ștergeti-le!" -#: ../java/src/org/klomp/snark/SnarkManager.java:1391 +#: ../java/src/org/klomp/snark/SnarkManager.java:1830 #, java-format msgid "Torrent file \"{0}\" cannot end in \".torrent\", deleting it!" msgstr "Torrent \"{0}\" nu se poate termina cu \". Torrent\", ștergeti!" -#: ../java/src/org/klomp/snark/SnarkManager.java:1393 +#: ../java/src/org/klomp/snark/SnarkManager.java:1832 #, java-format msgid "No pieces in \"{0}\", deleting it!" msgstr "Nu sunt piese din \"{0}\", ștergeti!" -#: ../java/src/org/klomp/snark/SnarkManager.java:1395 +#: ../java/src/org/klomp/snark/SnarkManager.java:1834 #, java-format msgid "Too many pieces in \"{0}\", limit is {1}, deleting it!" msgstr "Prea multe piese în \"{0}\", limita este de {1}, ștergeti!" -#: ../java/src/org/klomp/snark/SnarkManager.java:1397 +#: ../java/src/org/klomp/snark/SnarkManager.java:1836 #, java-format msgid "Pieces are too large in \"{0}\" ({1}B), deleting it." msgstr "Piese sunt prea mari în \"{0}\" ({1} B), ștergeti." -#: ../java/src/org/klomp/snark/SnarkManager.java:1398 +#: ../java/src/org/klomp/snark/SnarkManager.java:1837 #, java-format msgid "Limit is {0}B" msgstr "Limita este de {0} B" -#: ../java/src/org/klomp/snark/SnarkManager.java:1400 +#: ../java/src/org/klomp/snark/SnarkManager.java:1839 #, java-format msgid "Torrent \"{0}\" has no data, deleting it!" msgstr "Torrent \"{0}\" nu dispune de date, șterge-o!" -#: ../java/src/org/klomp/snark/SnarkManager.java:1408 +#: ../java/src/org/klomp/snark/SnarkManager.java:1847 #, java-format msgid "Torrents larger than {0}B are not supported yet, deleting \"{1}\"" msgstr "Torrents mai mari de {0} B nu sunt acceptate încă, ștergerea \"{1}\"Torrents mai mari de {0} B nu sunt acceptate încă, ștergerea \"{1}\"" -#: ../java/src/org/klomp/snark/SnarkManager.java:1424 +#: ../java/src/org/klomp/snark/SnarkManager.java:1864 #, java-format msgid "Error: Could not remove the torrent {0}" msgstr "Eroare: Nu am putut șterge torentul {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1445 -#: ../java/src/org/klomp/snark/SnarkManager.java:1463 +#: ../java/src/org/klomp/snark/SnarkManager.java:1887 +#: ../java/src/org/klomp/snark/SnarkManager.java:1906 #, java-format msgid "Torrent stopped: \"{0}\"" msgstr "Torrent oprit: \"{0}\"" -#: ../java/src/org/klomp/snark/SnarkManager.java:1484 +#: ../java/src/org/klomp/snark/SnarkManager.java:1926 #, java-format msgid "Torrent removed: \"{0}\"" msgstr "Torrent sters: \"{0}\"" -#: ../java/src/org/klomp/snark/SnarkManager.java:1492 +#: ../java/src/org/klomp/snark/SnarkManager.java:1934 #, java-format msgid "Adding torrents in {0}" msgstr "Adăugarea torrente în {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1523 +#: ../java/src/org/klomp/snark/SnarkManager.java:1966 #, java-format msgid "Up bandwidth limit is {0} KBps" msgstr "Limita de lățime de bandă la incarcarea este {0} Kbps" -#: ../java/src/org/klomp/snark/SnarkManager.java:1545 +#: ../java/src/org/klomp/snark/SnarkManager.java:1993 #, java-format msgid "Download finished: {0}" msgstr "Descarcare finisata: {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1596 +#: ../java/src/org/klomp/snark/SnarkManager.java:2048 #, java-format msgid "Metainfo received for {0}" msgstr "Metainfo primit pentru {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1597 -#: ../java/src/org/klomp/snark/SnarkManager.java:1826 +#: ../java/src/org/klomp/snark/SnarkManager.java:2049 +#: ../java/src/org/klomp/snark/SnarkManager.java:2280 #, java-format msgid "Starting up torrent {0}" msgstr "Pornirea torrent {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1612 +#: ../java/src/org/klomp/snark/SnarkManager.java:2064 #, java-format msgid "Error on torrent {0}" msgstr "Eroare pe torrent {0}" -#: ../java/src/org/klomp/snark/SnarkManager.java:1675 +#: ../java/src/org/klomp/snark/SnarkManager.java:2127 msgid "Unable to connect to I2P!" msgstr "Nu se poate stabili o conexiune la I2P" -#: ../java/src/org/klomp/snark/SnarkManager.java:1825 -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:124 +#: ../java/src/org/klomp/snark/SnarkManager.java:2279 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:130 msgid "Opening the I2P tunnel" msgstr "Deschiderea tunelului I2P" -#: ../java/src/org/klomp/snark/SnarkManager.java:1849 +#: ../java/src/org/klomp/snark/SnarkManager.java:2303 msgid "Opening the I2P tunnel and starting all torrents." msgstr "Deschiderea tunelului I2P și pornirea tuturor torrentelor." -#: ../java/src/org/klomp/snark/SnarkManager.java:1912 +#: ../java/src/org/klomp/snark/SnarkManager.java:2366 msgid "Stopping all torrents and closing the I2P tunnel." msgstr "Oprirea tuturor torrentelor și inchiderea tunelului I2P" -#: ../java/src/org/klomp/snark/SnarkManager.java:1931 +#: ../java/src/org/klomp/snark/SnarkManager.java:2385 msgid "Closing I2P tunnel after notifying trackers." msgstr "Închiderea tunelului I2P după notificarea trackere." -#: ../java/src/org/klomp/snark/TrackerClient.java:234 +#: ../java/src/org/klomp/snark/TrackerClient.java:245 #, java-format msgid "No valid trackers for {0} - enable opentrackers or DHT?" msgstr "Nu sunt trackere valabile pentru {0} - permite opentrackers sau DHT?" #: ../java/src/org/klomp/snark/UpdateHandler.java:49 -#: ../java/src/org/klomp/snark/UpdateRunner.java:227 +#: ../java/src/org/klomp/snark/UpdateRunner.java:228 msgid "Updating" msgstr "Actualizare" -#: ../java/src/org/klomp/snark/UpdateRunner.java:114 +#: ../java/src/org/klomp/snark/UpdateRunner.java:115 #, java-format msgid "Updating from {0}" msgstr "Actualizarea din {0}" -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:75 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:80 #, java-format msgid "Download torrent file from {0}" msgstr "Descărca fișierul torrent de la {0}" -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:97 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:103 #, java-format msgid "Torrent was not retrieved from {0}" msgstr "Torrent nu a fost preluat de la {0}" -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:150 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:157 #, java-format msgid "Torrent fetched from {0}" msgstr "Torrent preluat de la {0}" -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:171 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:178 #, java-format msgid "Torrent already running: {0}" msgstr "Torrent deja rulează: {0}" -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:173 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:180 #, java-format msgid "Torrent already in the queue: {0}" msgstr "Torrent deja în coada de așteptare: {0}" -#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:181 +#: ../java/src/org/klomp/snark/web/FetchAndAdd.java:191 #, java-format msgid "Torrent at {0} was not valid" msgstr "Torrent la {0} nu a fost valid" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:254 -msgid "I2PSnark - Anonymous BitTorrent Client" -msgstr "I2PSnark - BitTorrent Client Anonim" - -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:267 -msgid "Router is down" -msgstr "Router-ul este deactivat" - -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:284 -msgid "Torrents" -msgstr "Torente" - -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:288 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:298 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1486 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2255 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:268 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:311 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:322 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1763 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2662 msgid "I2PSnark" msgstr "I2PSnark" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:294 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:273 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2149 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2422 +msgid "Configuration" +msgstr "Configurație" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:275 +msgid "Anonymous BitTorrent Client" +msgstr "Client Bittorrent anonim" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:289 +msgid "Router is down" +msgstr "Router-ul este deactivat" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:306 +msgid "Torrents" +msgstr "Torente" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:317 msgid "Refresh page" msgstr "refresh pagina" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:302 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:326 msgid "Forum" msgstr "Forum" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:315 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:341 msgid "Click \"Add torrent\" button to fetch torrent" msgstr "Faceți clic pe \"Adauga torrent\" pentru a aduce torrent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:352 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:353 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:394 msgid "clear messages" msgstr "stergerea mesajelor" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:405 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:407 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2440 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2442 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:449 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2980 msgid "Status" msgstr "Stare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:418 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:420 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:451 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:493 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:511 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:537 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:568 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:583 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:598 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2953 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2970 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2982 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2994 +#, java-format +msgid "Sort by {0}" +msgstr "Sortează după {0}" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:462 msgid "Hide Peers" msgstr "Ascunde utilizatori" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:430 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:432 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:468 msgid "Show Peers" msgstr "Arată utilizatori" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:439 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:441 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2249 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2269 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:491 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2648 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2681 msgid "Torrent" msgstr "Torent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:449 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:493 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2953 +msgid "File type" +msgstr "Tip fișier" + +#. Translators: Please keep short or translate as " " +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:509 +msgid "ETA" +msgstr "eta" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:511 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:512 msgid "Estimated time remaining" msgstr "Estimare timp rămas" #. Translators: Please keep short or translate as " " -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:452 -msgid "ETA" -msgstr "eta" - -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:457 -msgid "Downloaded" -msgstr "Descărcat" - -#. Translators: Please keep short or translate as " " -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:460 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:535 msgid "RX" msgstr "RX" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:465 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:537 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:538 +msgid "Downloaded" +msgstr "Descărcat" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:537 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2818 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2968 +msgid "Size" +msgstr "Dimensiune" + +#. Translators: Please keep short or translate as " " +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:566 +msgid "TX" +msgstr "TX" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:568 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2836 +msgid "Upload ratio" +msgstr "Rată de încărcare" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:568 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:569 msgid "Uploaded" msgstr "Încărcat" #. Translators: Please keep short or translate as " " -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:468 -msgid "TX" -msgstr "TX" +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:581 +msgid "RX Rate" +msgstr "RX Rate" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:474 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:583 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:584 msgid "Down Rate" msgstr "Rata de descarcare " #. Translators: Please keep short or translate as " " -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:477 -msgid "RX Rate" -msgstr "RX Rate" - -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:483 -msgid "Up Rate" -msgstr "Rata de incarcare " - -#. Translators: Please keep short or translate as " " -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:486 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:596 msgid "TX Rate" msgstr "TX Rate" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:501 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:598 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:599 +msgid "Up Rate" +msgstr "Rata de incarcare " + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:615 msgid "Stop all torrents and the I2P tunnel" msgstr "Opreste toate torrentele și tunelul I2P" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:503 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:617 msgid "Stop All" msgstr "Oprește toate" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:515 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:629 msgid "Start all stopped torrents" msgstr "Începeți toate torrentele oprite" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:517 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:531 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:631 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:645 msgid "Start All" msgstr "Pornește toate" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:529 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:643 msgid "Start all torrents and the I2P tunnel" msgstr "Porneste toate torrentele și tunelul I2P" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:555 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:668 msgid "No torrents loaded." msgstr "Niciun torent încărcat." -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:561 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:674 msgid "Totals" msgstr "Totaluri" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:563 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:676 #, java-format msgid "1 torrent" msgid_plural "{0} torrents" @@ -588,7 +632,7 @@ msgstr[0] "1 torrent" msgstr[1] "{0} torrente" msgstr[2] "{0} torrentу" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:568 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:681 #, java-format msgid "1 connected peer" msgid_plural "{0} connected peers" @@ -596,7 +640,7 @@ msgstr[0] "{0} utilizator conectat " msgstr[1] "{0} utilizatori conectati" msgstr[2] "{0} utilizatori conectati" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:575 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:688 #, java-format msgid "1 DHT peer" msgid_plural "{0} DHT peers" @@ -604,174 +648,207 @@ msgstr[0] "1 partener DHT" msgstr[1] "{0} parteneri DHT" msgstr[2] "{0} parteneri DHT" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:611 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:695 +msgid "Dest" +msgstr "Dest" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:823 msgid "First" msgstr "Primul" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:611 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:823 msgid "First page" msgstr "P&rima pagină" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:622 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:833 msgid "Prev" msgstr "Prev" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:622 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:833 msgid "Previous page" msgstr "Pagina anterioară" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:657 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:866 msgid "Next" msgstr "Următorul" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:657 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:866 msgid "Next page" msgstr "Pagina următoare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:667 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:874 msgid "Last" msgstr "Ultimul" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:667 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:874 msgid "Last page" msgstr "Ultima pagină" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:750 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:960 +msgid "Data directory cannot be created" +msgstr "Directorul de date nu poate fi creat" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:970 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1176 +#, java-format +msgid "Cannot add torrent {0} inside another torrent: {1}" +msgstr "Nu se poate adăuga torrentul {0} în interiorul altui torrent: {1}" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:985 #, java-format msgid "Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\"" msgstr "URL incorect: trebuie să înceapă cu \"http://\", \"{0}\", sau \"{1}\"" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:793 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:823 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1026 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1055 #, java-format msgid "Magnet deleted: {0}" msgstr "Magnet sters: {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:801 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:829 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1034 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1061 #, java-format msgid "Torrent file deleted: {0}" msgstr "Fișier torrent șters: {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:821 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1053 #, java-format msgid "Download deleted: {0}" msgstr "Descarcă șterse: {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:835 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1070 #, java-format msgid "Data file deleted: {0}" msgstr "Fișier data șters: {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:837 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:848 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1072 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1081 #, java-format msgid "Data file could not be deleted: {0}" msgstr "Fișier de date nu a putut fi șters: {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:863 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:872 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1097 #, java-format msgid "Directory could not be deleted: {0}" msgstr "Dosarul nu a putut fi sters {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:870 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1104 #, java-format msgid "Directory deleted: {0}" msgstr "Directorii șterse: {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:942 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1155 +#, java-format +msgid "Cannot add a torrent ending in \".torrent\": {0}" +msgstr "Nu se poate adăuga un torrent terminat în \".torrent\": {0}" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1160 +#, java-format +msgid "Torrent with this name is already running: {0}" +msgstr "Torrentul cu acest nume deja rulează: {0}" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1166 +#, java-format +msgid "Cannot add a torrent including an I2P directory: {0}" +msgstr "Nu se poate adăuga un torent ce include un director I2P: {0}" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1181 +#, java-format +msgid "Cannot add torrent {0} including another torrent: {1}" +msgstr "Nu se poate adăuga torrent {0} ce include un alt torrent: {1}" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1207 msgid "Error - Cannot include alternate trackers without a primary tracker" msgstr "Eroare - Nu pot conține trackere alternative fără un tracker primar" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:955 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1220 msgid "Error - Cannot mix private and public trackers in a torrent" msgstr "Eroare - Nu se poate amesteca trackere publice și private într-un torent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:975 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1242 #, java-format msgid "Torrent created for \"{0}\"" msgstr "Torrent creat pentru \"{0}\"" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:977 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1244 #, java-format msgid "" "Many I2P trackers require you to register new torrents before seeding - " "please do so before starting \"{0}\"" msgstr "Multe trackere I2P cer să vă înregistrați torrentele noi înainte de seedat - vă rugăm să faceți acest lucru înainte de a începe \"{0}\"" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:979 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1246 #, java-format msgid "Error creating a torrent for \"{0}\"" msgstr "Eroare la crearea unui torrent pentru \"{0}\"" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:983 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1250 #, java-format msgid "Cannot create a torrent for the nonexistent data: {0}" msgstr "Nu se poate crea un torrent pentru datele inexistente: {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:986 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1253 msgid "Error creating torrent - you must enter a file or directory" msgstr "Eroare la crearea torrent - trebuie să introduceți un fișier sau director" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1017 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2031 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1284 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2406 msgid "Delete selected" msgstr "Șterge pe cel ales" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1017 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2032 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1284 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2408 msgid "Save tracker configuration" msgstr "Salvați configurația tracker" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1034 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1301 msgid "Removed" msgstr "Șters" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1063 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2030 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2035 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1333 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2405 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2407 msgid "Add tracker" msgstr "Adaugă tracker" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1086 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1089 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1356 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1359 msgid "Enter valid tracker name and URLs" msgstr "Introduceți numele tracker valid și URL-uri" #. "\n" + -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1091 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2034 +#. value=\"").append(_t("Cancel")).append("\">\n" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" msgstr "Restabileşte implicitele" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1094 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1364 msgid "Restored default trackers" msgstr "Trackers implicite restaurate" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1215 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1216 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1472 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1473 msgid "Checking" msgstr "Se verifică" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1218 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1219 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1475 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1476 msgid "Allocating" msgstr "Alocare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1233 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1240 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1490 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1499 msgid "Tracker Error" msgstr "Eroare tracker" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1235 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1263 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1268 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1279 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1284 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1290 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1295 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1492 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1522 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1527 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1538 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1543 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1549 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1554 #, java-format msgid "1 peer" msgid_plural "{0} peers" @@ -779,356 +856,366 @@ msgstr[0] "1 partener" msgstr[1] "{0} parteneri" msgstr[2] "{0} parteneri" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1243 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1244 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1502 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1503 msgid "Starting" msgstr "Începere" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1252 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1511 msgid "Seeding" msgstr "Încărcare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1256 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1270 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1271 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2382 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2496 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1515 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1529 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1530 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2831 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3047 msgid "Complete" msgstr "Complet" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1275 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1276 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1281 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1282 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1534 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1535 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1540 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1541 msgid "OK" msgstr "OK" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1286 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1287 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1292 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1293 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1545 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1546 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1551 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1552 msgid "Stalled" msgstr "Întrerupt" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1297 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1298 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1301 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1302 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1556 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1557 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1560 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1561 msgid "No Peers" msgstr "Nu sunt utilizatori" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1304 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1305 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1563 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1564 msgid "Stopped" msgstr "Oprit" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1338 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1593 msgid "Torrent details" msgstr "Detalii torent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1367 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1628 msgid "View files" msgstr "Vizualizare fișierilor" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1369 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1630 msgid "Open file" msgstr "Deschide fișier" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1411 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1682 msgid "Stop the torrent" msgstr "Oprește torentul" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1413 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1684 msgid "Stop" msgstr "Stop" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1425 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1697 msgid "Start the torrent" msgstr "Pornește torentul" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1427 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1699 msgid "Start" msgstr "Start" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1439 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1712 msgid "Remove the torrent from the active list, deleting the .torrent file" msgstr "Scoateți torrent din lista torentelor activi, ștergem fișierul torrent." #. Can't figure out how to escape double quotes inside the onclick string. #. Single quotes in translate strings with parameters must be doubled. #. Then the remaining single quote must be escaped -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1444 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1717 #, java-format msgid "" "Are you sure you want to delete the file \\''{0}\\'' (downloaded data will " "not be deleted) ?" msgstr "Sigur doriți să ștergeți dosarul \\'' {0} \\'' (datele descărcate nu vor fi șterse)?" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1447 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1721 msgid "Remove" msgstr "Șterge" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1459 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1734 msgid "Delete the .torrent file and the associated data file(s)" msgstr "Ștergeți fișierul torrent. Și fișier(e) de date asociat(e)" #. Can't figure out how to escape double quotes inside the onclick string. #. Single quotes in translate strings with parameters must be doubled. #. Then the remaining single quote must be escaped -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1464 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1739 #, java-format msgid "" "Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded " "data?" msgstr "Sigur doriți să ștergeți torrent \\'' {0} \\'' și toate datele descărcate?" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1467 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1997 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1743 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2364 msgid "Delete" msgstr "Șterge" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1502 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1779 msgid "Unknown" msgstr "Necunoscut" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1514 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1791 msgid "Seed" msgstr "Seed" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1537 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1814 msgid "Uninteresting (The peer has no pieces we need)" msgstr "Neinteresante (partener nu are piese de care avem nevoie)" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1539 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1816 msgid "Choked (The peer is not allowing us to request pieces)" msgstr "Înecat (partener nu ne permite să solicitam bucăți)" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1559 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1836 msgid "Uninterested (We have no pieces the peer needs)" msgstr "Neinteresat (Nu avem piese de care are nevoie partener)" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1561 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1838 msgid "Choking (We are not allowing the peer to request pieces)" msgstr "partenerSufocare (Noi nu permitem partenerului solicitarea bucăților)" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1616 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1954 #, java-format msgid "Details at {0} tracker" msgstr "Detalii la tracker {0}" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1633 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1971 msgid "Info" msgstr "Info" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1684 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2044 msgid "Add Torrent" msgstr "Adaugă torent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1686 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2047 msgid "From URL" msgstr "Din URL" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1689 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2050 msgid "" "Enter the torrent file download URL (I2P only), magnet link, maggot link, or" " info hash" msgstr "Introduceți URL-ul de descarcare fișierilor torrent (I2P numai), link-ul magnet, maggot-link, sau info hash" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1694 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2055 msgid "Add torrent" msgstr "Adaugă torent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1697 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2059 +msgid "Data dir" +msgstr "Dir date" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2062 +#, java-format +msgid "Enter the directory to save the data in (default {0})" +msgstr "Introdu directorul în care să se salveze datele (default {0})" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2066 #, java-format msgid "You can also copy .torrent files to: {0}." msgstr "De asemenea, puteți copia fișiere torrent la: {0}." -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1699 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2068 msgid "Removing a .torrent will cause it to stop." msgstr "Stergerea .torrent va face ca acesta să se oprească." -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1722 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2081 msgid "Create Torrent" msgstr "Creează un torent" #. out.write("From file:
\n"); -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1725 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2084 msgid "Data to seed" msgstr "Date pentru seedare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1729 -msgid "File or directory to seed (must be within the specified path)" -msgstr "Fișier sau director de seedare (trebuie să fie în calea specificată)" +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2088 +#, java-format +msgid "File or directory to seed (full path or within the directory {0} )" +msgstr "Fișier sau director de seedare (calea completă sau în director {0} )" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1731 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1975 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2091 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2337 msgid "Trackers" msgstr "Trackere" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1733 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2093 msgid "Primary" msgstr "Primar" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1735 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2095 msgid "Alternates" msgstr "Alternativă" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1738 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2098 msgid "Create torrent" msgstr "Creează un torent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1756 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2116 msgid "none" msgstr "nici unul" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1789 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2046 -msgid "Configuration" -msgstr "Configurație" - -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1793 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2153 msgid "Data directory" msgstr "Dosar cu date" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1797 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2158 msgid "Files readable by all" msgstr "Fișiere lizibile de către toți" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1801 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2162 msgid "If checked, other users may access the downloaded files" msgstr "Dacă este bifată, utilizatorii pot accesa fișierele descărcate" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1805 -msgid "Auto start" -msgstr "Start automat" +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2166 +msgid "Auto start torrents" +msgstr "Pornește automat torrente" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1809 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2170 msgid "If checked, automatically start torrents that are added" msgstr "Dacă este bifată, începe automat torrentele care sunt adăugate" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1813 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2174 msgid "Theme" msgstr "Teme" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1826 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2188 msgid "Refresh time" msgstr "Timp de reîmprospătare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1839 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2201 msgid "Never" msgstr "Niciodată" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1845 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2207 msgid "Startup delay" msgstr "întârziere de pornire" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1847 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2209 msgid "minutes" msgstr "minute" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1851 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2213 msgid "Page size" msgstr "Mărimea paginii" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1853 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2215 msgid "torrents" msgstr "Torente" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1877 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2239 msgid "Total uploader limit" msgstr "Limită totală de încărcare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1880 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2242 msgid "peers" msgstr "Parteneri" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1884 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2246 msgid "Up bandwidth limit" msgstr "limita de incarcare de lățime de bandă" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1887 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2249 msgid "Half available bandwidth recommended." msgstr "Jumătate lățime de bandă disponibilă este recomandat." -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1889 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2251 msgid "View or change router bandwidth" msgstr "Vizualizeaza sau modifica lățime de bandă router" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1893 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2255 msgid "Use open trackers also" msgstr "Utilizați trackere deschise, de asemenea," -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1897 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2259 msgid "" "If checked, announce torrents to open trackers as well as the tracker listed" " in the torrent file" msgstr "Dacă este bifată, anunta torrente pentru a urmări trackere deschise , precum și trackere listate în fișierul torrent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1901 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2263 msgid "Enable DHT" msgstr "Activează DHT" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1905 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2267 msgid "If checked, use DHT" msgstr "Dacă este bifată, utilizați DHT" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1921 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2283 msgid "Inbound Settings" msgstr "Setări de intrare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1927 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2289 msgid "Outbound Settings" msgstr "Setări de ieșire" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1935 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2297 msgid "I2CP host" msgstr "Portul I2CP" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1940 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2302 msgid "I2CP port" msgstr "Portul I2CP" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1955 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2317 msgid "I2CP options" msgstr "Opțiuni I2CP" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1960 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2322 msgid "Save configuration" msgstr "Salvare configurări" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1980 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2342 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2953 msgid "Name" msgstr "Nume" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1982 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2344 msgid "Website URL" msgstr "URL website" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1984 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2530 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2346 +msgid "Standard" +msgstr "Standard" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2348 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3080 msgid "Open" msgstr "Deschis" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1986 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2350 msgid "Private" msgstr "Privat" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1988 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2352 msgid "Announce URL" msgstr "URL de anuntare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2022 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2396 msgid "Add" msgstr "Adaugă" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2062 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2439 #, java-format msgid "Invalid magnet URL {0}" msgstr "URL-ul magnet invalid {0}" #. * dummies for translation -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2070 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2447 #, java-format msgid "1 hop" msgid_plural "{0} hops" @@ -1136,7 +1223,7 @@ msgstr[0] "1 hop" msgstr[1] "{0} hop-uri" msgstr[2] "{0} hop-uri" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2071 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2448 #, java-format msgid "1 tunnel" msgid_plural "{0} tunnels" @@ -1144,106 +1231,119 @@ msgstr[0] "1 tunel" msgstr[1] "{0} tunele" msgstr[2] "{0} tunele" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2278 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2691 msgid "Torrent file" msgstr "Fișier torent" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2291 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2699 +msgid "Data location" +msgstr "Locaţie date" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2708 +msgid "Info hash" +msgstr "Informație index" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2727 msgid "Primary Tracker" msgstr "Tracker primar" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2300 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2736 msgid "Tracker List" msgstr "Lista Tracker" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2324 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2761 msgid "Comment" msgstr "Comentariu" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2333 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2771 msgid "Created" msgstr "Creat" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2343 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2782 msgid "Created By" msgstr "Creat de" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2353 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2794 msgid "Magnet link" msgstr "Legătură Magnet" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2360 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2807 msgid "Private torrent" msgstr "Torrent privat" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2370 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2434 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2436 -msgid "Size" -msgstr "Dimensiune" - -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2377 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2827 msgid "Completion" msgstr "Completare" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2387 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2856 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2982 msgid "Remaining" msgstr "Rămas" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2394 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2866 msgid "Files" msgstr "Fișiere" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2399 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2873 msgid "Pieces" msgstr "Piese:" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2403 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2879 msgid "Piece size" msgstr "Dimensiune piesei" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2426 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2430 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2933 msgid "Directory" msgstr "Dosar" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2447 -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2449 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2992 msgid "Priority" msgstr "Prioritate" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2455 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3004 msgid "Up to higher level directory" msgstr "Spre dosarul de nivel superior" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2485 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3038 msgid "Torrent not found?" msgstr "Torrent nu a fost găsit?" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2493 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3044 msgid "File not found in torrent?" msgstr "Fișierul nu a fost găsit în torrent?" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2506 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3057 msgid "complete" msgstr "încheiat" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2507 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3058 msgid "remaining" msgstr "Rămas" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2556 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3104 msgid "High" msgstr "Ridicat" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2561 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3109 msgid "Normal" msgstr "Normal" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2566 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3114 msgid "Skip" msgstr "Omitere" -#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2575 +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3124 +msgid "Set all high" +msgstr "Configurează toate ca înalte" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3126 +msgid "Set all normal" +msgstr "Configurează toate ca normal" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3128 +msgid "Skip all" +msgstr "Omite tot" + +#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:3129 msgid "Save priorities" msgstr "Salvați priorități" diff --git a/apps/i2psnark/locale/messages_ru.po b/apps/i2psnark/locale/messages_ru.po index 19652c105..92a831679 100644 --- a/apps/i2psnark/locale/messages_ru.po +++ b/apps/i2psnark/locale/messages_ru.po @@ -829,7 +829,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Введите действительное название и URL трекера" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_sk.po b/apps/i2psnark/locale/messages_sk.po index c4780b725..339f35426 100644 --- a/apps/i2psnark/locale/messages_sk.po +++ b/apps/i2psnark/locale/messages_sk.po @@ -816,7 +816,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Zadajte platný názov a URL stopovača" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_sv.po b/apps/i2psnark/locale/messages_sv.po index 7f653edea..ec566c4eb 100644 --- a/apps/i2psnark/locale/messages_sv.po +++ b/apps/i2psnark/locale/messages_sv.po @@ -822,7 +822,7 @@ msgid "Enter valid tracker name and URLs" msgstr "Ange giltigt namn och adresser för trackern " #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_vi.po b/apps/i2psnark/locale/messages_vi.po index cad895268..d7d0e8067 100644 --- a/apps/i2psnark/locale/messages_vi.po +++ b/apps/i2psnark/locale/messages_vi.po @@ -810,7 +810,7 @@ msgid "Enter valid tracker name and URLs" msgstr "" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/locale/messages_zh.po b/apps/i2psnark/locale/messages_zh.po index 5017281a9..cb4216a40 100644 --- a/apps/i2psnark/locale/messages_zh.po +++ b/apps/i2psnark/locale/messages_zh.po @@ -814,7 +814,7 @@ msgid "Enter valid tracker name and URLs" msgstr "请输入有效的 Tracker 名称与链接" #. "\n" + +#. value=\"").append(_t("Cancel")).append("\">\n" + #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1361 #: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2410 msgid "Restore defaults" diff --git a/apps/i2psnark/mime.properties b/apps/i2psnark/mime.properties index 6739efc49..5a1157e0a 100644 --- a/apps/i2psnark/mime.properties +++ b/apps/i2psnark/mime.properties @@ -11,6 +11,7 @@ iso = application/x-iso9660-image m4a = audio/mp4a-latm m4b = audio/mp4a-latm m4v = video/x-m4v +mka = audio/x-matroska mkv = video/x-matroska mobi = application/x-mobipocket-ebook mp4 = video/mp4 @@ -31,3 +32,4 @@ war = application/java-archive webm = video/webm wma = audio/x-ms-wma wmv = video/x-ms-wmv +xz = application/x-xz diff --git a/apps/i2psnark/readme.txt.snark b/apps/i2psnark/readme-snark.txt similarity index 100% rename from apps/i2psnark/readme.txt.snark rename to apps/i2psnark/readme-snark.txt diff --git a/apps/i2psnark/readme-standalone.txt b/apps/i2psnark/readme-standalone.txt index 9bc1ddf66..ced04e941 100644 --- a/apps/i2psnark/readme-standalone.txt +++ b/apps/i2psnark/readme-standalone.txt @@ -1,6 +1,4 @@ -To run I2PSnark from the command line, run "java -jar lib/i2psnark.jar", but -to run it with the web UI, run "launch-i2psnark". I2PSnark is -GPL'ed software, based on Snark (http://www.klomp.org/) to run on top of I2P -(http://www.i2p2.de/) within a webserver (such as the bundled Jetty from -http://jetty.mortbay.org/). For more information about I2PSnark, get in touch -with the folks at http://forum.i2p2.de/ +i2psnark is packaged as a webapp running in the router console. +Command line and standalone operation of i2psnark are not currently supported. +See http://trac.i2p2.i2p/ticket/1191 or http://trac.i2p2.de/ticket/1191 +for the status of restoring standalone support. diff --git a/apps/i2psnark/readme.txt b/apps/i2psnark/readme.txt index 3970e3cba..2680442fa 100644 --- a/apps/i2psnark/readme.txt +++ b/apps/i2psnark/readme.txt @@ -1,11 +1,9 @@ -This is an I2P port of snark [http://klomp.org/snark], a GPL'ed bittorrent client +This is i2psnark, an I2P port of snark http://klomp.org/snark/ , a GPLv2 bittorrent client. +It contains significant enhancements including a web UI and support for +multitorrent, magnet, PEX and DHT. -The build in tracker has been removed for simplicity. +i2psnark is packaged as a webapp running in the router console. -Example usage: - java -jar lib/i2psnark.jar myFile.torrent - -or, a more verbose setting: - java -jar lib/i2psnark.jar --eepproxy 127.0.0.1 4444 \ - --i2cp 127.0.0.1 7654 "inbound.length=2 outbound.length=2" \ - --debug 6 myFile.torrent +See http://i2p-projekt.i2p/en/docs/applications/bittorrent +or https://geti2p.net/en/docs/applications/bittorrent +for the specification of the protocols for bittorrent over I2P. diff --git a/apps/i2ptunnel/java/bundle-messages-proxy.sh b/apps/i2ptunnel/java/bundle-messages-proxy.sh index 8ffdc5a9e..a777a5eed 100755 --- a/apps/i2ptunnel/java/bundle-messages-proxy.sh +++ b/apps/i2ptunnel/java/bundle-messages-proxy.sh @@ -30,7 +30,7 @@ if which find|grep -q -i windows ; then export PATH=.:/bin:/usr/local/bin:$PATH fi # Fast mode - update ondemond -# set LG2 to the language you need in envrionment varibales to enable this +# set LG2 to the language you need in environment variables to enable this # add ../java/ so the refs will work in the po file JPATHS="../java/build/Proxy.java ../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java ../java/src/net/i2p/i2ptunnel/localServer/LocalHTTPServer.java" @@ -62,16 +62,16 @@ do echo "Updating the $i file from the tags..." # extract strings from java and jsp files, and update messages.po files # translate calls must be one of the forms: - # _("foo") + # _t("foo") # _x("foo") - # intl._("foo") + # intl._t("foo") # intl.title("foo") # In a jsp, you must use a helper or handler that has the context set. # To start a new translation, copy the header from an old translation to the new .po file, # then ant distclean updater. find $JPATHS -name *.java > $TMPFILE xgettext -f $TMPFILE -F -L java --from-code=UTF-8 --add-comments\ - --keyword=_ \ + --keyword=_t \ -o ${i}t if [ $? -ne 0 ] then diff --git a/apps/i2ptunnel/java/bundle-messages.sh b/apps/i2ptunnel/java/bundle-messages.sh index a8769f0dc..0b426cb4d 100755 --- a/apps/i2ptunnel/java/bundle-messages.sh +++ b/apps/i2ptunnel/java/bundle-messages.sh @@ -29,7 +29,7 @@ if which find|grep -q -i windows ; then export PATH=.:/bin:/usr/local/bin:$PATH fi # Fast mode - update ondemond -# set LG2 to the language you need in envrionment varibales to enable this +# set LG2 to the language you need in environment variables to enable this # add ../java/ so the refs will work in the po file JPATHS="../java/src/net/i2p/i2ptunnel/web ../jsp/WEB-INF" @@ -61,16 +61,16 @@ do echo "Updating the $i file from the tags..." # extract strings from java and jsp files, and update messages.po files # translate calls must be one of the forms: - # _("foo") + # _t("foo") # _x("foo") - # intl._("foo") + # intl._t("foo") # intl.title("foo") # In a jsp, you must use a helper or handler that has the context set. # To start a new translation, copy the header from an old translation to the new .po file, # then ant distclean updater. find $JPATHS -name *.java > $TMPFILE xgettext -f $TMPFILE -F -L java --from-code=UTF-8 --add-comments\ - --keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \ + --keyword=_t --keyword=_x --keyword=intl._ --keyword=intl.title \ -o ${i}t if [ $? -ne 0 ] then diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java index 83fbb6d0a..2fc344a71 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java @@ -39,7 +39,10 @@ class HTTPResponseOutputStream extends FilterOutputStream { private final byte _buf1[]; protected boolean _gzip; protected long _dataExpected; + /** lower-case, trimmed */ protected String _contentType; + /** lower-case, trimmed */ + protected String _contentEncoding; private static final int CACHE_SIZE = 8*1024; private static final ByteCache _cache = ByteCache.getInstance(8, CACHE_SIZE); @@ -151,7 +154,7 @@ class HTTPResponseOutputStream extends FilterOutputStream { responseLine = (responseLine.trim() + "\r\n"); if (_log.shouldLog(Log.INFO)) _log.info("Response: " + responseLine.trim()); - out.write(responseLine.getBytes()); + out.write(DataHelper.getUTF8(responseLine)); } else { for (int j = lastEnd+1; j < i; j++) { if (_headerBuffer.getData()[j] == ':') { @@ -160,7 +163,7 @@ class HTTPResponseOutputStream extends FilterOutputStream { if ( (keyLen <= 0) || (valLen < 0) ) throw new IOException("Invalid header @ " + j); String key = DataHelper.getUTF8(_headerBuffer.getData(), lastEnd+1, keyLen); - String val = null; + String val; if (valLen == 0) val = ""; else @@ -171,10 +174,10 @@ class HTTPResponseOutputStream extends FilterOutputStream { String lcKey = key.toLowerCase(Locale.US); if ("connection".equals(lcKey)) { - out.write("Connection: close\r\n".getBytes()); + out.write(DataHelper.getASCII("Connection: close\r\n")); connectionSent = true; } else if ("proxy-connection".equals(lcKey)) { - out.write("Proxy-Connection: close\r\n".getBytes()); + out.write(DataHelper.getASCII("Proxy-Connection: close\r\n")); proxyConnectionSent = true; } else if ("content-encoding".equals(lcKey) && "x-i2p-gzip".equals(val.toLowerCase(Locale.US))) { _gzip = true; @@ -189,7 +192,10 @@ class HTTPResponseOutputStream extends FilterOutputStream { } catch (NumberFormatException nfe) {} } else if ("content-type".equals(lcKey)) { // save for compress decision on server side - _contentType = val; + _contentType = val.toLowerCase(Locale.US); + } else if ("content-encoding".equals(lcKey)) { + // save for compress decision on server side + _contentEncoding = val.toLowerCase(Locale.US); } else if ("set-cookie".equals(lcKey)) { String lcVal = val.toLowerCase(Locale.US); if (lcVal.contains("domain=b32.i2p") || @@ -203,7 +209,7 @@ class HTTPResponseOutputStream extends FilterOutputStream { break; } } - out.write((key.trim() + ": " + val.trim() + "\r\n").getBytes()); + out.write(DataHelper.getUTF8(key.trim() + ": " + val + "\r\n")); } break; } @@ -214,9 +220,9 @@ class HTTPResponseOutputStream extends FilterOutputStream { } if (!connectionSent) - out.write("Connection: close\r\n".getBytes()); + out.write(DataHelper.getASCII("Connection: close\r\n")); if (!proxyConnectionSent) - out.write("Proxy-Connection: close\r\n".getBytes()); + out.write(DataHelper.getASCII("Proxy-Connection: close\r\n")); finishHeaders(); @@ -237,7 +243,7 @@ class HTTPResponseOutputStream extends FilterOutputStream { protected boolean shouldCompress() { return _gzip; } protected void finishHeaders() throws IOException { - out.write("\r\n".getBytes()); // end of the headers + out.write(DataHelper.getASCII("\r\n")); // end of the headers } @Override diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index 74fcaccb1..4183ce399 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -631,8 +631,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn String header = getErrorPage("ahelper-notfound", ERR_AHELPER_NOTFOUND); try { out.write(header.getBytes("UTF-8")); - out.write(("

" + _("This seems to be a bad destination:") + " " + ahelperKey + " " + - _("i2paddresshelper cannot help you with a destination like that!") + + out.write(("

" + _t("This seems to be a bad destination:") + " " + ahelperKey + " " + + _t("i2paddresshelper cannot help you with a destination like that!") + "

").getBytes("UTF-8")); writeFooter(out); reader.drain(); @@ -706,7 +706,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn String conflictURL = conflictURI.toASCIIString(); String header = getErrorPage("ahelper-conflict", ERR_AHELPER_CONFLICT); out.write(header.getBytes("UTF-8")); - out.write(_("To visit the destination in your host database, click here. To visit the conflicting addresshelper destination, click here.", + out.write(_t("To visit the destination in your host database, click here. To visit the conflicting addresshelper destination, click here.", trustedURL, conflictURL).getBytes("UTF-8")); out.write("

".getBytes("UTF-8")); writeFooter(out); @@ -881,7 +881,9 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn } else if(lowercaseLine.startsWith("accept")) { // strip the accept-blah headers, as they vary dramatically from // browser to browser - if(!Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_ACCEPT))) { + // But allow Accept-Encoding: gzip, deflate + if(!lowercaseLine.startsWith("accept-encoding: ") && + !Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_ACCEPT))) { line = null; continue; } @@ -933,8 +935,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn // according to rfc2616 s14.3, this *should* force identity, even if // an explicit q=0 for gzip doesn't. tested against orion.i2p, and it // seems to work. - if(!Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_ACCEPT))) - newRequest.append("Accept-Encoding: \r\n"); + //if (!Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_ACCEPT))) + // newRequest.append("Accept-Encoding: \r\n"); if (!usingInternalOutproxy) newRequest.append("X-Accept-Encoding: x-i2p-gzip;q=1.0, identity;q=0.5, deflate;q=0, gzip;q=0, *;q=0\r\n"); } @@ -1116,7 +1118,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn header = getErrorPage("dnfb", ERR_DESTINATION_UNKNOWN); } else if(destination.length() == 60 && destination.toLowerCase(Locale.US).endsWith(".b32.i2p")) { header = getErrorPage("nols", ERR_DESTINATION_UNKNOWN); - extraMessage = _("Destination lease set not found"); + extraMessage = _t("Destination lease set not found"); } else { header = getErrorPage("dnfh", ERR_DESTINATION_UNKNOWN); jumpServers = getTunnel().getClientOptions().getProperty(PROP_JUMP_SERVERS); @@ -1268,31 +1270,31 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn Writer out = new BufferedWriter(new OutputStreamWriter(outs, "UTF-8")); String header = getErrorPage("ahelper-new", ERR_AHELPER_NEW); out.write(header); - out.write(""); + buf.append(""); else if (in.getLength() <= 1 || in.getLength() + in.getLengthVariance() <= 1 || out.getLength() <= 1 || out.getLength() + out.getLengthVariance() <= 1) - buf.append(""); + buf.append(""); if (in.getLength() + Math.abs(in.getLengthVariance()) >= WARN_LENGTH || out.getLength() + Math.abs(out.getLengthVariance()) >= WARN_LENGTH) - buf.append(""); + buf.append(""); if (in.getTotalQuantity() >= WARN_QUANTITY || out.getTotalQuantity() >= WARN_QUANTITY) - buf.append(""); + buf.append(""); - buf.append("\n"); + buf.append("\n"); // buf.append("\n"); // tunnel depth int maxLength = advanced ? MAX_ADVANCED_LENGTH : MAX_LENGTH; - buf.append("\n"); + buf.append("\n"); buf.append("\n"); // tunnel depth variance - buf.append("\n"); + buf.append("\n"); buf.append("\n"); + buf.append("\n"); buf.append("\n"); + buf.append("\n"); buf.append("\n" + + buf.append("\n" + "\n" + + buf.append("\n" + "
" + _("Host") + + out.write("\n"); try { String b32 = Base32.encode(SHA256Generator.getInstance().calculateHash(Base64.decode(ahelperKey)).getData()); - out.write("" + + out.write("" + ""); } catch(Exception e) { } - out.write("
" + _t("Host") + "" + destination + "
" + _("Base 32") + "
" + _t("Base 32") + "" + b32 + ".b32.i2p
" + _("Destination") + "" + + out.write("
" + _t("Destination") + "" + "
\n" + "
" + // FIXME if there is a query remaining it is lost "
" + - "" + + "" + "
\n
" + "\n" + "\n" + "\n" + "
\n"); + _t("Save {0} to router address book and continue to website", destination) + "
\n"); if(_context.namingService().getName().equals("BlockfileNamingService")) { // only blockfile supports multiple books - out.write("

\n"); - out.write("\n"); + out.write("

\n"); + out.write("\n"); } // Firefox (and others?) don't send referer to meta refresh target, which is // what the jump servers use, so this isn't that useful. diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java index 5824f1fc3..5e39cf3b8 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java @@ -684,7 +684,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem out.write(""); if (usingWWWProxy) { out.write("

"); - out.write(_("HTTP Outproxy")); + out.write(_t("HTTP Outproxy")); out.write(": " + wwwProxy); } if (extraMessage != null) { @@ -723,7 +723,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem if (first) { first = false; out.write("

"); - out.write(_("Click a link below for an address helper from a jump service")); + out.write(_t("Click a link below for an address helper from a jump service")); out.write("

\n"); } else { out.write("
"); @@ -733,7 +733,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem out.write(uri); out.write("\">"); // Translators: parameter is a host name - out.write(_("{0} jump service", jumphost)); + out.write(_t("{0} jump service", jumphost)); out.write("\n"); } } @@ -778,7 +778,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem * Translate * @since 0.9.14 moved from I2PTunnelHTTPClient */ - protected String _(String key) { + protected String _t(String key) { return Translate.getString(key, _context, BUNDLE_NAME); } @@ -787,7 +787,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem * {0} * @since 0.9.14 moved from I2PTunnelHTTPClient */ - protected String _(String key, Object o) { + protected String _t(String key, Object o) { return Translate.getString(key, o, _context, BUNDLE_NAME); } @@ -796,7 +796,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem * {0} and {1} * @since 0.9.14 moved from I2PTunnelHTTPClient */ - protected String _(String key, Object o, Object o2) { + protected String _t(String key, Object o, Object o2) { return Translate.getString(key, o, o2, _context, BUNDLE_NAME); } } diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java index 6b3b41720..35dd6f132 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java @@ -419,12 +419,14 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { setEntry(headers, "Connection", "close"); // we keep the enc sent by the browser before clobbering it, since it may have // been x-i2p-gzip - String enc = getEntryOrNull(headers, "Accept-encoding"); - String altEnc = getEntryOrNull(headers, "X-Accept-encoding"); + String enc = getEntryOrNull(headers, "Accept-Encoding"); + String altEnc = getEntryOrNull(headers, "X-Accept-Encoding"); // according to rfc2616 s14.3, this *should* force identity, even if // "identity;q=1, *;q=0" didn't. - setEntry(headers, "Accept-encoding", ""); + // as of 0.9.23, the client passes this header through, and we do the same, + // so if the server and browser can do the compression/decompression, we don't have to + //setEntry(headers, "Accept-Encoding", ""); socket.setReadTimeout(readTimeout); Socket s = getSocket(socket.getPeerDestination().calculateHash(), socket.getLocalPort()); @@ -432,7 +434,7 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { // instead of i2ptunnelrunner, use something that reads the HTTP // request from the socket, modifies the headers, sends the request to the // server, reads the response headers, rewriting to include Content-encoding: x-i2p-gzip - // if it was one of the Accept-encoding: values, and gzip the payload + // if it was one of the Accept-Encoding: values, and gzip the payload boolean allowGZIP = true; String val = opts.getProperty("i2ptunnel.gzip"); if ( (val != null) && (!Boolean.parseBoolean(val)) ) @@ -443,7 +445,7 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { boolean useGZIP = alt || ( (enc != null) && (enc.indexOf("x-i2p-gzip") >= 0) ); // Don't pass this on, outproxies should strip so I2P traffic isn't so obvious but they probably don't if (alt) - headers.remove("X-Accept-encoding"); + headers.remove("X-Accept-Encoding"); String modifiedHeader = formatHeaders(headers, command); if (_log.shouldLog(Log.DEBUG)) @@ -671,6 +673,7 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { /** * Don't compress small responses or images. + * Don't compress things that are already compressed. * Compression is inline but decompression on the client side * creates a new thread. */ @@ -687,7 +690,11 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { (!_contentType.equals("application/x-bzip")) && (!_contentType.equals("application/x-bzip2")) && (!_contentType.equals("application/x-gzip")) && - (!_contentType.equals("application/zip")))); + (!_contentType.equals("application/zip")))) && + (_contentEncoding == null || + ((!_contentEncoding.equals("gzip")) && + (!_contentEncoding.equals("compress")) && + (!_contentEncoding.equals("deflate")))); } @Override @@ -877,9 +884,9 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { String lcName = name.toLowerCase(Locale.US); if ("accept-encoding".equals(lcName)) - name = "Accept-encoding"; + name = "Accept-Encoding"; else if ("x-accept-encoding".equals(lcName)) - name = "X-Accept-encoding"; + name = "X-Accept-Encoding"; else if ("x-forwarded-for".equals(lcName)) name = "X-Forwarded-For"; else if ("x-forwarded-server".equals(lcName)) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/localServer/LocalHTTPServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/localServer/LocalHTTPServer.java index 2d70caed0..15e67de74 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/localServer/LocalHTTPServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/localServer/LocalHTTPServer.java @@ -166,9 +166,9 @@ public abstract class LocalHTTPServer { nsOptions.setProperty("list", book); if (referer != null && referer.startsWith("http")) { String from = "" + referer + ""; - nsOptions.setProperty("s", _("Added via address helper from {0}", from)); + nsOptions.setProperty("s", _t("Added via address helper from {0}", from)); } else { - nsOptions.setProperty("s", _("Added via address helper")); + nsOptions.setProperty("s", _t("Added via address helper")); } boolean success = ns.put(host, dest, nsOptions); writeRedirectPage(out, success, host, book, url); @@ -185,11 +185,11 @@ public abstract class LocalHTTPServer { private static void writeRedirectPage(OutputStream out, boolean success, String host, String book, String url) throws IOException { String tbook; if ("hosts.txt".equals(book)) - tbook = _("router"); + tbook = _t("router"); else if ("userhosts.txt".equals(book)) - tbook = _("master"); + tbook = _t("master"); else if ("privatehosts.txt".equals(book)) - tbook = _("private"); + tbook = _t("private"); else tbook = book; out.write(("HTTP/1.1 200 OK\r\n"+ @@ -198,22 +198,22 @@ public abstract class LocalHTTPServer { "Proxy-Connection: close\r\n"+ "\r\n"+ ""+ - "" + _("Redirecting to {0}", host) + "\n" + + "" + _t("Redirecting to {0}", host) + "\n" + "\n" + "\n" + "\n" + "\n" + "" + "
\n" + "

" + (success ? - _("Saved {0} to the {1} addressbook, redirecting now.", host, tbook) : - _("Failed to save {0} to the {1} addressbook, redirecting now.", host, tbook)) + + _t("Saved {0} to the {1} addressbook, redirecting now.", host, tbook) : + _t("Failed to save {0} to the {1} addressbook, redirecting now.", host, tbook)) + "

\n

" + - _("Click here if you are not redirected automatically.") + + _t("Click here if you are not redirected automatically.") + "

").getBytes("UTF-8")); I2PTunnelHTTPClient.writeFooter(out); out.flush(); @@ -248,17 +248,17 @@ public abstract class LocalHTTPServer { private static final String BUNDLE_NAME = "net.i2p.i2ptunnel.proxy.messages"; /** lang in routerconsole.lang property, else current locale */ - protected static String _(String key) { + protected static String _t(String key) { return Translate.getString(key, I2PAppContext.getGlobalContext(), BUNDLE_NAME); } /** {0} */ - protected static String _(String key, Object o) { + protected static String _t(String key, Object o) { return Translate.getString(key, o, I2PAppContext.getGlobalContext(), BUNDLE_NAME); } /** {0} and {1} */ - protected static String _(String key, Object o, Object o2) { + protected static String _t(String key, Object o, Object o2) { return Translate.getString(key, o, o2, I2PAppContext.getGlobalContext(), BUNDLE_NAME); } diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java index 0cc4e5278..b2b38398e 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java @@ -146,11 +146,11 @@ public class GeneralHelper { List rv = tcg.clearAllMessages(); try { tcg.saveConfig(); - rv.add(0, _("Configuration changes saved", context)); + rv.add(0, _t("Configuration changes saved", context)); } catch (IOException ioe) { Log log = context.logManager().getLog(GeneralHelper.class); log.error("Failed to save config file", ioe); - rv.add(0, _("Failed to save configuration", context) + ": " + ioe.toString()); + rv.add(0, _t("Failed to save configuration", context) + ": " + ioe.toString()); } return rv; } @@ -714,7 +714,7 @@ public class GeneralHelper { return def; } - protected static String _(String key, I2PAppContext context) { - return Messages._(key, context); + protected static String _t(String key, I2PAppContext context) { + return Messages._t(key, context); } } diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java index ebc495098..fb9b137b2 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java @@ -358,7 +358,7 @@ public class EditBean extends IndexBean { public String getI2CPHost(int tunnel) { if (_context.isRouterContext()) - return _("internal"); + return _t("internal"); TunnelController tun = getController(tunnel); if (tun != null) return tun.getI2CPHost(); @@ -368,7 +368,7 @@ public class EditBean extends IndexBean { public String getI2CPPort(int tunnel) { if (_context.isRouterContext()) - return _("internal"); + return _t("internal"); TunnelController tun = getController(tunnel); if (tun != null) return tun.getI2CPPort(); @@ -406,11 +406,11 @@ public class EditBean extends IndexBean { if (i <= 3) { buf.append(" ("); if (i == 1) - buf.append(_("lower bandwidth and reliability")); + buf.append(_t("lower bandwidth and reliability")); else if (i == 2) - buf.append(_("standard bandwidth and reliability")); + buf.append(_t("standard bandwidth and reliability")); else if (i == 3) - buf.append(_("higher bandwidth and reliability")); + buf.append(_t("higher bandwidth and reliability")); buf.append(')'); } buf.append("\n"); diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java index ccb30ca99..15eb3f29e 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java @@ -84,7 +84,7 @@ public class IndexBean { String error; try { tcg = TunnelControllerGroup.getInstance(); - error = tcg == null ? _("Tunnels are not initialized yet, please reload in two minutes.") + error = tcg == null ? _t("Tunnels are not initialized yet, please reload in two minutes.") : null; } catch (IllegalArgumentException iae) { tcg = null; @@ -157,9 +157,9 @@ public class IndexBean { // If passwords are turned on, all is assumed good if (!_context.getBooleanProperty(PROP_PW_ENABLE) && !haveNonce(_curNonce)) - return _("Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.") + return _t("Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.") + ' ' + - _("If the problem persists, verify that you have cookies enabled in your browser."); + _t("If the problem persists, verify that you have cookies enabled in your browser."); if ("Stop all".equals(_action)) return stopAll(); else if ("Start all".equals(_action)) @@ -205,7 +205,7 @@ public class IndexBean { private String reloadConfig() { _group.reloadControllers(); - return _("Configuration reloaded for all tunnels"); + return _t("Configuration reloaded for all tunnels"); } private String start() { @@ -219,7 +219,7 @@ public class IndexBean { try { Thread.sleep(1000); } catch (InterruptedException ie) {} // and give them something to look at in any case // FIXME name will be HTML escaped twice - return _("Starting tunnel") + ' ' + getTunnelName(_tunnel) + "..."; + return _t("Starting tunnel") + ' ' + getTunnelName(_tunnel) + "..."; } private String stop() { @@ -233,7 +233,7 @@ public class IndexBean { try { Thread.sleep(1000); } catch (InterruptedException ie) {} // and give them something to look at in any case // FIXME name will be HTML escaped twice - return _("Stopping tunnel") + ' ' + getTunnelName(_tunnel) + "..."; + return _t("Stopping tunnel") + ' ' + getTunnelName(_tunnel) + "..."; } private String saveChanges() { @@ -322,7 +322,7 @@ public class IndexBean { if (name != null) return DataHelper.escapeHTML(name); else - return _("New Tunnel"); + return _t("New Tunnel"); } /** @@ -342,13 +342,13 @@ public class IndexBean { if (tun != null && tun.getListenPort() != null) { String port = tun.getListenPort(); if (port.length() == 0) - return "" + _("Port not set") + ""; + return "" + _t("Port not set") + ""; int iport = Addresses.getPort(port); if (iport == 0) - return "" + _("Invalid port") + ' ' + port + ""; + return "" + _t("Invalid port") + ' ' + port + ""; if (iport < 1024) return "" + - _("Warning - ports less than 1024 are not recommended") + + _t("Warning - ports less than 1024 are not recommended") + ": " + port + ""; // dup check, O(n**2) List controllers = _group.getControllers(); @@ -357,12 +357,12 @@ public class IndexBean { continue; if (port.equals(controllers.get(i).getListenPort())) return "" + - _("Warning - duplicate port") + + _t("Warning - duplicate port") + ": " + port + ""; } return port; } - return "" + _("Port not set") + ""; + return "" + _t("Port not set") + ""; } public String getTunnelType(int tunnel) { @@ -374,18 +374,18 @@ public class IndexBean { } public String getTypeName(String internalType) { - if (TunnelController.TYPE_STD_CLIENT.equals(internalType)) return _("Standard client"); - else if (TunnelController.TYPE_HTTP_CLIENT.equals(internalType)) return _("HTTP/HTTPS client"); - else if (TunnelController.TYPE_IRC_CLIENT.equals(internalType)) return _("IRC client"); - else if (TunnelController.TYPE_STD_SERVER.equals(internalType)) return _("Standard server"); - else if (TunnelController.TYPE_HTTP_SERVER.equals(internalType)) return _("HTTP server"); - else if (TunnelController.TYPE_SOCKS.equals(internalType)) return _("SOCKS 4/4a/5 proxy"); - else if (TunnelController.TYPE_SOCKS_IRC.equals(internalType)) return _("SOCKS IRC proxy"); - else if (TunnelController.TYPE_CONNECT.equals(internalType)) return _("CONNECT/SSL/HTTPS proxy"); - else if (TunnelController.TYPE_IRC_SERVER.equals(internalType)) return _("IRC server"); - else if (TunnelController.TYPE_STREAMR_CLIENT.equals(internalType)) return _("Streamr client"); - else if (TunnelController.TYPE_STREAMR_SERVER.equals(internalType)) return _("Streamr server"); - else if (TunnelController.TYPE_HTTP_BIDIR_SERVER.equals(internalType)) return _("HTTP bidir"); + if (TunnelController.TYPE_STD_CLIENT.equals(internalType)) return _t("Standard client"); + else if (TunnelController.TYPE_HTTP_CLIENT.equals(internalType)) return _t("HTTP/HTTPS client"); + else if (TunnelController.TYPE_IRC_CLIENT.equals(internalType)) return _t("IRC client"); + else if (TunnelController.TYPE_STD_SERVER.equals(internalType)) return _t("Standard server"); + else if (TunnelController.TYPE_HTTP_SERVER.equals(internalType)) return _t("HTTP server"); + else if (TunnelController.TYPE_SOCKS.equals(internalType)) return _t("SOCKS 4/4a/5 proxy"); + else if (TunnelController.TYPE_SOCKS_IRC.equals(internalType)) return _t("SOCKS IRC proxy"); + else if (TunnelController.TYPE_CONNECT.equals(internalType)) return _t("CONNECT/SSL/HTTPS proxy"); + else if (TunnelController.TYPE_IRC_SERVER.equals(internalType)) return _t("IRC server"); + else if (TunnelController.TYPE_STREAMR_CLIENT.equals(internalType)) return _t("Streamr client"); + else if (TunnelController.TYPE_STREAMR_SERVER.equals(internalType)) return _t("Streamr server"); + else if (TunnelController.TYPE_HTTP_BIDIR_SERVER.equals(internalType)) return _t("HTTP bidir"); else return internalType; } @@ -442,15 +442,15 @@ public class IndexBean { host = tun.getTargetHost(); String port = tun.getTargetPort(); if (host == null || host.length() == 0) - host = "" + _("Host not set") + ""; + host = "" + _t("Host not set") + ""; else if (Addresses.getIP(host) == null) - host = "" + _("Invalid address") + ' ' + host + ""; + host = "" + _t("Invalid address") + ' ' + host + ""; else if (host.indexOf(':') >= 0) host = '[' + host + ']'; if (port == null || port.length() == 0) - port = "" + _("Port not set") + ""; + port = "" + _t("Port not set") + ""; else if (Addresses.getPort(port) == 0) - port = "" + _("Invalid port") + ' ' + port + ""; + port = "" + _t("Invalid port") + ' ' + port + ""; return host + ':' + port; } else return ""; @@ -1074,8 +1074,8 @@ public class IndexBean { } } - protected String _(String key) { - return Messages._(key, _context); + protected String _t(String key) { + return Messages._t(key, _context); } /** translate (ngettext) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/Messages.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/Messages.java index d4a2fb4bd..89e2bfc43 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/Messages.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/Messages.java @@ -16,11 +16,11 @@ public class Messages { } /** lang in routerconsole.lang property, else current locale */ - public String _(String key) { + public String _t(String key) { return Translate.getString(key, _context, BUNDLE_NAME); } - public static String _(String key, I2PAppContext ctx) { + public static String _t(String key, I2PAppContext ctx) { return Translate.getString(key, ctx, BUNDLE_NAME); } @@ -32,11 +32,11 @@ public class Messages { * The {0} will be replaced by the parameter. * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. - * To tranlslate parameter also, use _("foo {0} bar", _("baz")) + * To tranlslate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. * Use autoboxing to call with ints, longs, floats, etc. */ - public String _(String s, Object o) { + public String _t(String s, Object o) { return Translate.getString(s, o, _context, BUNDLE_NAME); } diff --git a/apps/i2ptunnel/jsp/editClient.jsp b/apps/i2ptunnel/jsp/editClient.jsp index c0dd04cf4..3ac7d5454 100644 --- a/apps/i2ptunnel/jsp/editClient.jsp +++ b/apps/i2ptunnel/jsp/editClient.jsp @@ -16,7 +16,7 @@ %> - <%=intl._("Hidden Services Manager")%> - <%=intl._("Edit Client Tunnel")%> + <%=intl._t("Hidden Services Manager")%> - <%=intl._t("Edit Client Tunnel")%> @@ -49,14 +49,14 @@ input.default { width: 1px; height: 1px; visibility: hidden; } if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); - %>

<%=intl._("Edit proxy settings")%>

<% + %>

<%=intl._t("Edit proxy settings")%>

<% } else { tunnelTypeName = editBean.getTypeName(request.getParameter("type")); tunnelType = net.i2p.data.DataHelper.stripHTML(request.getParameter("type")); - %>

<%=intl._("New proxy settings")%>

<% + %>

<%=intl._t("New proxy settings")%>

<% } %> - + <% // these are four keys that are generated automatically on first save, @@ -87,17 +87,17 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
- + <%=tunnelTypeName%>
@@ -108,9 +108,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<% if ("streamrclient".equals(tunnelType)) { %> - + <% } else { %> - + <% } /* streamrclient */ %>
@@ -119,7 +119,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% String value = editBean.getClientPort(curTunnel); if (value == null || "".equals(value.trim())) { out.write(" ("); - out.write(intl._("required")); + out.write(intl._t("required")); out.write(")"); } %> @@ -134,14 +134,14 @@ input.default { width: 1px; height: 1px; visibility: hidden; } String targetHost = editBean.getTargetHost(curTunnel); if (targetHost == null || "".equals(targetHost.trim())) { out.write(" ("); - out.write(intl._("required")); + out.write(intl._t("required")); out.write(")"); } %> <% } else { %> - <%=intl._("Reachable by")%>(R): + <%=intl._t("Reachable by")%>(R): class="tickbox" />
@@ -176,41 +176,41 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %>
<% if ("httpclient".equals(tunnelType)) { %>
<% } // httpclient %>
class="tickbox" /> - <%=intl._("(Check the Box for 'YES')")%> + <%=intl._t("(Check the Box for 'YES')")%>
<% } else if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "streamrclient".equals(tunnelType)) { %>
- (<%=intl._("name, name:port, or destination")%> + (<%=intl._t("name, name:port, or destination")%> <% if ("streamrclient".equals(tunnelType)) { /* deferred resolution unimplemented in streamr client */ %> - - <%=intl._("b32 not recommended")%> + - <%=intl._t("b32 not recommended")%> <% } %> )
@@ -218,26 +218,26 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if (!"streamrclient".equals(tunnelType)) { %>
class="tickbox" /> - <%=intl._("(Share tunnels with other clients and irc/httpclients? Change requires restart of client proxy)")%> + <%=intl._t("(Share tunnels with other clients and irc/httpclients? Change requires restart of client proxy)")%>
<% } // !streamrclient %>
class="tickbox" /> - <%=intl._("(Check the Box for 'YES')")%> + <%=intl._t("(Check the Box for 'YES')")%>
<% if ("ircclient".equals(tunnelType)) { %>
class="tickbox" /> - <%=intl._("(Check the Box for 'YES')")%> + <%=intl._t("(Check the Box for 'YES')")%>
<% } // ircclient %> @@ -247,8 +247,8 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
-

<%=intl._("Advanced networking options")%>


- <%=intl._("(NOTE: when this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!)")%> +

<%=intl._t("Advanced networking options")%>


+ <%=intl._t("(NOTE: when this client proxy is configured to share tunnels, then these options are for all the shared proxy clients!)")%>
@@ -256,42 +256,42 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
- +
<% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0); - %> - - - + %> + + + <% if (tunnelBackupQuantity > 3) { - %> + %> <% } %>
@@ -320,20 +320,20 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if (!"streamrclient".equals(tunnelType)) { %>
class="tickbox" /> - (<%=intl._("for request/response connections")%>) + (<%=intl._t("for request/response connections")%>)
@@ -342,17 +342,17 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% } // !streamrclient %>
- +
readonly="readonly" <% } %> />
readonly="readonly" <% } %> />
@@ -364,12 +364,12 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
class="tickbox" />
@@ -381,24 +381,24 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
class="tickbox" />
@@ -409,31 +409,31 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
class="tickbox" />
- + - +
class="tickbox" /><%=intl._("Enable")%><%=intl._t("Enable")%> class="tickbox" /><%=intl._("Disable")%>
<%=intl._t("Disable")%>
@@ -445,16 +445,16 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if ("client".equals(tunnelType) || "ircclient".equals(tunnelType) || "socksirctunnel".equals(tunnelType) || "sockstunnel".equals(tunnelType)) { %>
- + class="tickbox" />
- +
<% @@ -462,12 +462,12 @@ input.default { width: 1px; height: 1px; visibility: hidden; } if (destb64.length() > 0) { %>
- + <%=editBean.getDestHashBase32(curTunnel)%>
<% } // if destb64 %> @@ -479,31 +479,31 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if ("httpclient".equals(tunnelType)) { %>
- +
- + class="tickbox" />

- +
- + class="tickbox" />

- +
- + class="tickbox" />

- +
- + class="tickbox" />
@@ -516,8 +516,8 @@ input.default { width: 1px; height: 1px; visibility: hidden; } %>
@@ -558,23 +558,23 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if ("httpclient".equals(tunnelType) || "connectclient".equals(tunnelType) || "sockstunnel".equals(tunnelType) || "socksirctunnel".equals(tunnelType)) { %>
- +
class="tickbox" />
@@ -582,23 +582,23 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
- +
class="tickbox" />
@@ -609,7 +609,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; } <% if ("httpclient".equals(tunnelType)) { %>
- +
@@ -621,7 +621,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
@@ -634,9 +634,9 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
diff --git a/apps/i2ptunnel/jsp/editServer.jsp b/apps/i2ptunnel/jsp/editServer.jsp index 0d7c05093..ac3eb48e3 100644 --- a/apps/i2ptunnel/jsp/editServer.jsp +++ b/apps/i2ptunnel/jsp/editServer.jsp @@ -16,7 +16,7 @@ %> - <%=intl._("Hidden Services Manager")%> - <%=intl._("Edit Hidden Service")%> + <%=intl._t("Hidden Services Manager")%> - <%=intl._t("Edit Hidden Service")%> @@ -49,14 +49,14 @@ input.default { width: 1px; height: 1px; visibility: hidden; } if (curTunnel >= 0) { tunnelTypeName = editBean.getTunnelType(curTunnel); tunnelType = editBean.getInternalType(curTunnel); - %>

<%=intl._("Edit server settings")%>

<% + %>

<%=intl._t("Edit server settings")%>

<% } else { tunnelTypeName = editBean.getTypeName(request.getParameter("type")); tunnelType = net.i2p.data.DataHelper.stripHTML(request.getParameter("type")); - %>

<%=intl._("New server settings")%>

<% + %>

<%=intl._t("New server settings")%>

<% } %> - + <% // these are four keys that are generated automatically on first save, @@ -87,26 +87,26 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
- + <%=tunnelTypeName%>
class="tickbox" /> - <%=intl._("(Check the Box for 'YES')")%> + <%=intl._t("(Check the Box for 'YES')")%>
@@ -115,26 +115,26 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<% if ("streamrserver".equals(tunnelType)) { %> - + <% } else { %> - + <% } %>
<% if (!"streamrserver".equals(tunnelType)) { %>
<% } /* !streamrserver */ %>
- +
") - .append(_("Start")).append(" ").append(index).append(""); + .append(_t("Start")).append(" ").append(index).append(""); } if (showStopButton && (!edit)) buf.append(""); + .append(_t("Stop")).append(" ").append(index).append(""); if (isClientChangeEnabled() && showEditButton && (!edit) && !ro) buf.append(""); + .append(_t("Edit")).append(" ").append(index).append(""); if (showUpdateButton && (!edit) && !ro) { buf.append(""); + .append(_t("Check for updates")).append(" ").append(index).append(""); buf.append(""); + .append(_t("Update")).append(" ").append(index).append(""); } if (showDeleteButton && (!edit) && !ro) { buf.append(""); + .append(_t("Delete")).append(" ").append(index).append(""); } buf.append(""); if (edit && !ro) { diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigHomeHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigHomeHandler.java index 5e426988e..f26b182a0 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigHomeHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigHomeHandler.java @@ -18,15 +18,15 @@ public class ConfigHomeHandler extends FormHandler { protected void processForm() { if (_action == null) return; String group = getJettyString("group"); - boolean deleting = _action.equals(_("Delete selected")); - boolean adding = _action.equals(_("Add item")); - boolean restoring = _action.equals(_("Restore defaults")); - if (_action.equals(_("Save")) && "0".equals(group)) { + boolean deleting = _action.equals(_t("Delete selected")); + boolean adding = _action.equals(_t("Add item")); + boolean restoring = _action.equals(_t("Restore defaults")); + if (_action.equals(_t("Save")) && "0".equals(group)) { boolean old = _context.getBooleanProperty(HomeHelper.PROP_OLDHOME); boolean nnew = getJettyString("oldHome") != null; if (old != nnew) { _context.router().saveConfig(HomeHelper.PROP_OLDHOME, "" + nnew); - addFormNotice(_("Home page changed")); + addFormNotice(_t("Home page changed")); } } else if (adding || deleting || restoring) { String prop; @@ -48,7 +48,7 @@ public class ConfigHomeHandler extends FormHandler { //_context.router().saveConfig(prop, dflt); // remove config so user will see updates _context.router().saveConfig(prop, null); - addFormNotice(_("Restored default settings")); + addFormNotice(_t("Restored default settings")); return; } String config = _context.getProperty(prop, dflt); @@ -60,12 +60,12 @@ public class ConfigHomeHandler extends FormHandler { if (adding) { String name = getJettyString("nofilter_name"); if (name == null || name.length() <= 0) { - addFormError(_("No name entered")); + addFormError(_t("No name entered")); return; } String url = getJettyString("nofilter_url"); if (url == null || url.length() <= 0) { - addFormError(_("No URL entered")); + addFormError(_t("No URL entered")); return; } // these would get double-escaped so we can't do it this way... @@ -81,7 +81,7 @@ public class ConfigHomeHandler extends FormHandler { else app = new HomeHelper.App(name, "", url, "/themes/console/images/question.png"); apps.add(app); - addFormNotice(_("Added") + ": " + app.name); + addFormNotice(_t("Added") + ": " + app.name); } else { // deleting Set toDelete = new HashSet(); @@ -98,13 +98,13 @@ public class ConfigHomeHandler extends FormHandler { HomeHelper.App app = iter.next(); if (toDelete.contains(app.name)) { iter.remove(); - addFormNotice(_("Removed") + ": " + app.name); + addFormNotice(_t("Removed") + ": " + app.name); } } } HomeHelper.saveApps(_context, prop, apps, !("3".equals(group))); } else { - //addFormError(_("Unsupported")); + //addFormError(_t("Unsupported")); } } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigKeyringHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigKeyringHandler.java index 97b8cb3a6..b5930895b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigKeyringHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigKeyringHandler.java @@ -15,12 +15,12 @@ public class ConfigKeyringHandler extends FormHandler { @Override protected void processForm() { if (_action == null) return; - boolean adding = _action.equals(_("Add key")); - if (adding || _action.equals(_("Delete key"))) { + boolean adding = _action.equals(_t("Add key")); + if (adding || _action.equals(_t("Delete key"))) { if (_peer == null) - addFormError(_("You must enter a destination")); + addFormError(_t("You must enter a destination")); if (_key == null && adding) - addFormError(_("You must enter a key")); + addFormError(_t("You must enter a key")); if (_peer == null || (_key == null && adding)) return; Hash h = ConvertToHash.getHash(_peer); @@ -31,22 +31,22 @@ public class ConfigKeyringHandler extends FormHandler { } catch (DataFormatException dfe) {} if (h != null && h.getData() != null && sk.getData() != null) { _context.keyRing().put(h, sk); - addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("added to keyring")); + addFormNotice(_t("Key for") + " " + h.toBase64() + " " + _t("added to keyring")); } else { - addFormError(_("Invalid destination or key")); + addFormError(_t("Invalid destination or key")); } } else { // Delete if (h != null && h.getData() != null) { if (_context.keyRing().remove(h) != null) - addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("removed from keyring")); + addFormNotice(_t("Key for") + " " + h.toBase64() + " " + _t("removed from keyring")); else - addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("not found in keyring")); + addFormNotice(_t("Key for") + " " + h.toBase64() + " " + _t("not found in keyring")); } else { - addFormError(_("Invalid destination")); + addFormError(_t("Invalid destination")); } } } else { - //addFormError(_("Unsupported")); + //addFormError(_t("Unsupported")); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHandler.java index e98528a96..5c65011a0 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHandler.java @@ -4,6 +4,8 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.Properties; +import net.i2p.util.LogManager; + /** * Handler to deal with form submissions from the logging config form and act * upon the values. @@ -79,7 +81,7 @@ public class ConfigLoggingHandler extends FormHandler { props.setProperty(_newLogClass, _newLogLevel); _context.logManager().setLimits(props); shouldSave = true; - addFormNotice(_("Log overrides updated")); + addFormNotice(_t("Log overrides updated")); } catch (IOException ioe) { // shouldn't ever happen (BAIS shouldnt cause an IOE) _context.logManager().getLog(ConfigLoggingHandler.class).error("Error reading from the props?", ioe); @@ -113,7 +115,7 @@ public class ConfigLoggingHandler extends FormHandler { } if (_fileSize != null) { - int newBytes = _context.logManager().getFileSize(_fileSize); + int newBytes = LogManager.getFileSize(_fileSize); int oldBytes = _context.logManager().getFileSize(); if (newBytes > 0) { if (oldBytes != newBytes) { @@ -160,7 +162,7 @@ public class ConfigLoggingHandler extends FormHandler { boolean saved = _context.logManager().saveConfig(); if (saved) - addFormNotice(_("Log configuration saved")); + addFormNotice(_t("Log configuration saved")); else addFormError("Error saving the configuration (applied but not saved) - please see the error logs"); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java index aa064e627..1a9354a2d 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigLoggingHelper.java @@ -42,9 +42,9 @@ public class ConfigLoggingHelper extends HelperBase { buf.append(prefix).append('=').append(level).append('\n'); } buf.append("
\n"); - buf.append("").append(_("Add additional logging statements above. Example: net.i2p.router.tunnel=WARN")).append("
"); - buf.append("").append(_("Or put entries in the logger.config file. Example: logger.record.net.i2p.router.tunnel=WARN")).append("
"); - buf.append("").append(_("Valid levels are DEBUG, INFO, WARN, ERROR, CRIT")).append("\n"); + buf.append("").append(_t("Add additional logging statements above. Example: net.i2p.router.tunnel=WARN")).append("
"); + buf.append("").append(_t("Or put entries in the logger.config file. Example: logger.record.net.i2p.router.tunnel=WARN")).append("
"); + buf.append("").append(_t("Valid levels are DEBUG, INFO, WARN, ERROR, CRIT")).append("\n"); /**** // this is too big and ugly @@ -78,11 +78,11 @@ public class ConfigLoggingHelper extends HelperBase { buf.append("\n"); + buf.append('>').append(_t(l)).append("\n"); } if (showRemove) - buf.append(""); + buf.append(""); buf.append("\n"); return buf.toString(); } @@ -119,7 +119,7 @@ public class ConfigLoggingHelper extends HelperBase { StringBuilder buf = new StringBuilder(65536); buf.append("
" + _("ANONYMITY WARNING - Settings include 0-hop tunnels.") + "
" + _t("ANONYMITY WARNING - Settings include 0-hop tunnels.") + "
" + _("ANONYMITY WARNING - Settings include 1-hop tunnels.") + "
" + _t("ANONYMITY WARNING - Settings include 1-hop tunnels.") + "
" + _("PERFORMANCE WARNING - Settings include very long tunnels.") + "
" + _t("PERFORMANCE WARNING - Settings include very long tunnels.") + "
" + _("PERFORMANCE WARNING - Settings include high tunnel quantities.") + "
" + _t("PERFORMANCE WARNING - Settings include high tunnel quantities.") + "
\"Inbound\"  " + _("Inbound") + "\"Outbound  " + _("Outbound") + "
\"Inbound\"  " + _t("Inbound") + "\"Outbound  " + _t("Outbound") + "
InboundOutbound
" + _("Length") + ":
" + _t("Length") + ":
" + _("Randomization") + ":
" + _t("Randomization") + ":
" + _("Quantity") + ":
" + _t("Quantity") + ":
" + _("Backup quantity") + ":
" + _t("Backup quantity") + ":
" + _("Inbound options") + ":
" + _t("Inbound options") + ":" + _("Outbound options") + ":
" + _t("Outbound options") + ":" + - _("Refresh the page to view.") + + _t("Refresh the page to view.") + ""); if (oldForceMobileConsole != _forceMobileConsole) - addFormNoticeNoEscape(_("Mobile console option saved.") + + addFormNoticeNoEscape(_t("Mobile console option saved.") + " " + - _("Refresh the page to view.") + + _t("Refresh the page to view.") + ""); } else { - addFormError(_("Error saving the configuration (applied but not saved) - please see the error logs.")); + addFormError(_t("Error saving the configuration (applied but not saved) - please see the error logs.")); } } private void addUser() { String name = getJettyString("name"); if (name == null || name.length() <= 0) { - addFormError(_("No user name entered")); + addFormError(_t("No user name entered")); return; } String pw = getJettyString("nofilter_pw"); if (pw == null || pw.length() <= 0) { - addFormError(_("No password entered")); + addFormError(_t("No password entered")); return; } ConsolePasswordManager mgr = new ConsolePasswordManager(_context); @@ -90,10 +90,10 @@ public class ConfigUIHandler extends FormHandler { if (mgr.saveMD5(RouterConsoleRunner.PROP_CONSOLE_PW, RouterConsoleRunner.JETTY_REALM, name, pw)) { if (!_context.getBooleanProperty(RouterConsoleRunner.PROP_PW_ENABLE)) _context.router().saveConfig(RouterConsoleRunner.PROP_PW_ENABLE, "true"); - addFormNotice(_("Added user {0}", name)); - addFormError(_("Restart required to take effect")); + addFormNotice(_t("Added user {0}", name)); + addFormError(_t("Restart required to take effect")); } else { - addFormError(_("Error saving the configuration (applied but not saved) - please see the error logs.")); + addFormError(_t("Error saving the configuration (applied but not saved) - please see the error logs.")); } } @@ -108,13 +108,13 @@ public class ConfigUIHandler extends FormHandler { continue; k = k.substring(7); if (mgr.remove(RouterConsoleRunner.PROP_CONSOLE_PW, k)) { - addFormNotice(_("Removed user {0}", k)); + addFormNotice(_t("Removed user {0}", k)); success = true; } else { - addFormError(_("Error saving the configuration (applied but not saved) - please see the error logs.")); + addFormError(_t("Error saving the configuration (applied but not saved) - please see the error logs.")); } } if (success) - addFormError(_("Restart required to take effect")); + addFormError(_t("Restart required to take effect")); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHelper.java index 294cc6dc0..1432de98b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHelper.java @@ -15,14 +15,14 @@ public class ConfigUIHelper extends HelperBase { buf.append("").append(_(theme)).append("
\n"); + buf.append("value=\"").append(theme).append("\">").append(_t(theme)).append("
\n"); } boolean universalTheming = _context.getBooleanProperty(CSSHelper.PROP_UNIVERSAL_THEMING); buf.append("") - .append(_("Set theme universally across all apps")) + .append(_t("Set theme universally across all apps")) .append("
\n"); return buf.toString(); } @@ -34,7 +34,7 @@ public class ConfigUIHelper extends HelperBase { if (forceMobileConsole) buf.append("checked=\"checked\" "); buf.append("value=\"1\">") - .append(_("Force the mobile console to be used")) + .append(_t("Force the mobile console to be used")) .append("
\n"); return buf.toString(); } @@ -163,13 +163,13 @@ public class ConfigUIHelper extends HelperBase { buf.append(""); if (userpw.isEmpty()) { buf.append(""); } else { buf.append("\n"); for (String name : userpw.keySet()) { buf.append("" + "
"); - buf.append(_("Add a user and password to enable.")); + buf.append(_t("Add a user and password to enable.")); buf.append("
") - .append(_("Remove")) + .append(_t("Remove")) .append("") - .append(_("User Name")) + .append(_t("User Name")) .append(" 
") - .append(_("Add")).append(":" + + .append(_t("Add")).append(":" + "" + ""); - buf.append(_("Password")).append(": " + + buf.append(_t("Password")).append(": " + "
\n"); return buf.toString(); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java index 7f8c75dfd..744d99683 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java @@ -157,14 +157,14 @@ public class ConfigUpdateHandler extends FormHandler { protected void processForm() { if (_action == null) return; - if (_action.equals(_("Check for updates"))) { + if (_action.equals(_t("Check for updates"))) { ConsoleUpdateManager mgr = UpdateHandler.updateManager(_context); if (mgr == null) { addFormError("Update manager not registered, cannot check"); return; } if (mgr.isUpdateInProgress() || mgr.isCheckInProgress()) { - addFormError(_("Update or check already in progress")); + addFormError(_t("Update or check already in progress")); return; } @@ -174,7 +174,7 @@ public class ConfigUpdateHandler extends FormHandler { if (shouldProxy && proxyPort == ConfigUpdateHandler.DEFAULT_PROXY_PORT_INT && proxyHost.equals(ConfigUpdateHandler.DEFAULT_PROXY_HOST) && _context.portMapper().getPort(PortMapper.SVC_HTTP_PROXY) < 0) { - addFormError(_("HTTP client proxy tunnel must be running")); + addFormError(_t("HTTP client proxy tunnel must be running")); return; } @@ -187,19 +187,19 @@ public class ConfigUpdateHandler extends FormHandler { a3 = mgr.checkAvailable(ROUTER_UNSIGNED, 40*1000) != null; if (a1 || a2 || a3) { if ( (_updatePolicy == null) || (!_updatePolicy.equals("notify")) ) - addFormNotice(_("Update available, attempting to download now")); + addFormNotice(_t("Update available, attempting to download now")); else - addFormNotice(_("Update available, click button on left to download")); + addFormNotice(_t("Update available, click button on left to download")); // So that update() will post a status to the summary bar before we reload try { Thread.sleep(1000); } catch (InterruptedException ie) {} } else - addFormNotice(_("No update available")); + addFormNotice(_t("No update available")); return; } - if (!_action.equals(_("Save"))) + if (!_action.equals(_t("Save"))) return; Map changes = new HashMap(); @@ -213,26 +213,26 @@ public class ConfigUpdateHandler extends FormHandler { changes.put(PROP_NEWS_URL, _newsURL); // this invalidates the news changes.put(NewsHelper.PROP_LAST_CHECKED, "0"); - addFormNotice(_("Updating news URL to {0}", _newsURL)); + addFormNotice(_t("Updating news URL to {0}", _newsURL)); } else { addFormError("Changing news URL disabled"); } } } - if (_proxyHost != null && _proxyHost.length() > 0 && !_proxyHost.equals(_("internal"))) { + if (_proxyHost != null && _proxyHost.length() > 0 && !_proxyHost.equals(_t("internal"))) { String oldHost = _context.router().getConfigSetting(PROP_PROXY_HOST); if ( (oldHost == null) || (!_proxyHost.equals(oldHost)) ) { changes.put(PROP_PROXY_HOST, _proxyHost); - addFormNotice(_("Updating proxy host to {0}", _proxyHost)); + addFormNotice(_t("Updating proxy host to {0}", _proxyHost)); } } - if (_proxyPort != null && _proxyPort.length() > 0 && !_proxyPort.equals(_("internal"))) { + if (_proxyPort != null && _proxyPort.length() > 0 && !_proxyPort.equals(_t("internal"))) { String oldPort = _context.router().getConfigSetting(PROP_PROXY_PORT); if ( (oldPort == null) || (!_proxyPort.equals(oldPort)) ) { changes.put(PROP_PROXY_PORT, _proxyPort); - addFormNotice(_("Updating proxy port to {0}", _proxyPort)); + addFormNotice(_t("Updating proxy port to {0}", _proxyPort)); } } @@ -248,15 +248,15 @@ public class ConfigUpdateHandler extends FormHandler { try { oldFreq = Long.parseLong(oldFreqStr); } catch (NumberFormatException nfe) {} if (_refreshFrequency != oldFreq) { changes.put(PROP_REFRESH_FREQUENCY, ""+_refreshFrequency); - addFormNoticeNoEscape(_("Updating refresh frequency to {0}", - _refreshFrequency <= 0 ? _("Never") : DataHelper.formatDuration2(_refreshFrequency))); + addFormNoticeNoEscape(_t("Updating refresh frequency to {0}", + _refreshFrequency <= 0 ? _t("Never") : DataHelper.formatDuration2(_refreshFrequency))); } if ( (_updatePolicy != null) && (_updatePolicy.length() > 0) ) { String oldPolicy = _context.router().getConfigSetting(PROP_UPDATE_POLICY); if ( (oldPolicy == null) || (!_updatePolicy.equals(oldPolicy)) ) { changes.put(PROP_UPDATE_POLICY, _updatePolicy); - addFormNotice(_("Updating update policy to {0}", _updatePolicy)); + addFormNotice(_t("Updating update policy to {0}", _updatePolicy)); } } @@ -265,7 +265,7 @@ public class ConfigUpdateHandler extends FormHandler { String oldURL = _context.router().getConfigSetting(PROP_UPDATE_URL); if ( (oldURL == null) || (!_updateURL.equals(oldURL)) ) { changes.put(PROP_UPDATE_URL, _updateURL); - addFormNotice(_("Updating update URLs.")); + addFormNotice(_t("Updating update URLs.")); } } @@ -277,7 +277,7 @@ public class ConfigUpdateHandler extends FormHandler { // note that keys are not validated here and no console error message will be generated if (isAdvanced()) { changes.put(PROP_TRUSTED_KEYS, _trustedKeys); - addFormNotice(_("Updating trusted keys.")); + addFormNotice(_t("Updating trusted keys.")); } else { addFormError("Changing trusted keys disabled"); } @@ -289,7 +289,7 @@ public class ConfigUpdateHandler extends FormHandler { if ( (oldURL == null) || (!_zipURL.equals(oldURL)) ) { if (isAdvanced()) { changes.put(PROP_ZIP_URL, _zipURL); - addFormNotice(_("Updating unsigned update URL to {0}", _zipURL)); + addFormNotice(_t("Updating unsigned update URL to {0}", _zipURL)); } else { addFormError("Changing unsigned update URL disabled"); } @@ -301,7 +301,7 @@ public class ConfigUpdateHandler extends FormHandler { if ( (oldURL == null) || (!_devSU3URL.equals(oldURL)) ) { if (isAdvanced()) { changes.put(PROP_DEV_SU3_URL, _devSU3URL); - addFormNotice(_("Updating signed development build URL to {0}", _devSU3URL)); + addFormNotice(_t("Updating signed development build URL to {0}", _devSU3URL)); } else { addFormError("Changing signed update URL disabled"); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java index 3df84ceb5..93644982f 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHelper.java @@ -51,13 +51,13 @@ public class ConfigUpdateHelper extends HelperBase { public String getProxyHost() { if (isInternal()) - return _("internal") + "\" readonly=\"readonly"; + return _t("internal") + "\" readonly=\"readonly"; return _context.getProperty(ConfigUpdateHandler.PROP_PROXY_HOST, ConfigUpdateHandler.DEFAULT_PROXY_HOST); } public String getProxyPort() { if (isInternal()) - return _("internal") + "\" readonly=\"readonly"; + return _t("internal") + "\" readonly=\"readonly"; return Integer.toString(ConfigUpdateHandler.proxyPort(_context)); } @@ -127,9 +127,9 @@ public class ConfigUpdateHelper extends HelperBase { buf.append("\" selected=\"selected"); if (PERIODS[i] == -1) - buf.append("\">").append(_("Never")).append("\n"); + buf.append("\">").append(_t("Never")).append("\n"); else - buf.append("\">").append(_("Every")).append(' ').append(DataHelper.formatDuration2(PERIODS[i])).append("\n"); + buf.append("\">").append(_t("Every")).append(' ').append(DataHelper.formatDuration2(PERIODS[i])).append("\n"); } buf.append("\n"); return buf.toString(); @@ -147,14 +147,14 @@ public class ConfigUpdateHelper extends HelperBase { buf.append(""); + buf.append('>').append(_t("Notify only")).append(""); buf.append(""); + buf.append('>').append(_t("Download and verify only")).append(""); if (_context.hasWrapper()) { buf.append(""); + buf.append('>').append(_t("Download, verify, and restart")).append(""); } buf.append("\n"); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/EventLogHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/EventLogHelper.java index 492c006e2..f42e1cd6e 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/EventLogHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/EventLogHelper.java @@ -66,7 +66,7 @@ public class EventLogHelper extends FormHandler { public void setContextId(String contextId) { super.setContextId(contextId); for (int i = 0; i < _events.length; i += 2) { - _xevents.put(_events[i], _(_events[i + 1])); + _xevents.put(_events[i], _t(_events[i + 1])); } } @@ -99,27 +99,27 @@ public class EventLogHelper extends FormHandler { // So just use the "shared/console nonce". String nonce = CSSHelper.getNonce(); try { - _out.write("

" + _("Display Events") + "

"); + _out.write("

" + _t("Display Events") + "

"); _out.write("
\n" + "\n" + "\n"); - _out.write(_("Events since") + ": "); for (int i = 0; i < _times.length; i++) { writeOption(_times[i]); } _out.write("
"); - _out.write(_("Event type") + ": "); // sorted by translated display string Map events = new TreeMap(Collator.getInstance()); for (int i = 0; i < _events.length; i += 2) { events.put(_xevents.get(_events[i]), _events[i]); } - writeOption(_("All events"), ALL); + writeOption(_t("All events"), ALL); for (Map.Entry e : events.entrySet()) { writeOption(e.getKey(), e.getValue()); } _out.write("" + - "
"); + "
"); } catch (IOException ioe) { ioe.printStackTrace(); } @@ -145,7 +145,7 @@ public class EventLogHelper extends FormHandler { _out.write(" selected=\"selected\""); _out.write(">"); if (age == 0) - _out.write(_("All events")); + _out.write(_t("All events")); else _out.write(DataHelper.formatDuration2(age)); _out.write("\n"); @@ -167,21 +167,21 @@ public class EventLogHelper extends FormHandler { if (events.isEmpty()) { if (isAll) { if (_age == 0) - return _("No events found"); - return _("No events found in previous {0}", DataHelper.formatDuration2(_age)); + return _t("No events found"); + return _t("No events found in previous {0}", DataHelper.formatDuration2(_age)); } if (_age == 0) - return _("No \"{0}\" events found", xev); - return _("No \"{0}\" events found in previous {1}", xev, DataHelper.formatDuration2(_age)); + return _t("No \"{0}\" events found", xev); + return _t("No \"{0}\" events found in previous {1}", xev, DataHelper.formatDuration2(_age)); } StringBuilder buf = new StringBuilder(2048); buf.append("
"); - buf.append(_("Time")); + buf.append(_t("Time")); buf.append(""); if (isAll) { - buf.append(_("Event")); + buf.append(_t("Event")); buf.append(""); - buf.append(_("Details")); + buf.append(_t("Details")); } else { buf.append(xev); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/FormHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/FormHandler.java index a56f8f7ad..d4bd1d2ff 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/FormHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/FormHandler.java @@ -23,6 +23,7 @@ public abstract class FormHandler { protected RouterContext _context; protected Log _log; /** Not for multipart/form-data, will be null */ + @SuppressWarnings("rawtypes") protected Map _settings; /** Only for multipart/form-data. Warning, parameters are NOT XSS filtered */ protected RequestWrapper _requestWrapper; @@ -63,6 +64,7 @@ public abstract class FormHandler { * * @since 0.9.4 consolidated from numerous FormHandlers */ + @SuppressWarnings({"rawtypes", "unchecked"}) public void setSettings(Map settings) { _settings = new HashMap(settings); } /** @@ -248,9 +250,9 @@ public abstract class FormHandler { } if (!_nonce.equals(_nonce1) && !_nonce.equals(_nonce2)) { - addFormError(_("Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.") + addFormError(_t("Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.") + ' ' + - _("If the problem persists, verify that you have cookies enabled in your browser.")); + _t("If the problem persists, verify that you have cookies enabled in your browser.")); _valid = false; } } @@ -291,28 +293,28 @@ public abstract class FormHandler { } /** translate a string */ - public String _(String s) { + public String _t(String s) { return Messages.getString(s, _context); } /** * translate a string with a parameter - * This is a lot more expensive than _(s), so use sparingly. + * This is a lot more expensive than _t(s), so use sparingly. * * @param s string to be translated containing {0} * The {0} will be replaced by the parameter. * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. - * To tranlslate parameter also, use _("foo {0} bar", _("baz")) + * To tranlslate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. * Use autoboxing to call with ints, longs, floats, etc. */ - public String _(String s, Object o) { + public String _t(String s, Object o) { return Messages.getString(s, o, _context); } /** two params @since 0.8.2 */ - public String _(String s, Object o, Object o2) { + public String _t(String s, Object o, Object o2) { return Messages.getString(s, o, o2, _context); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java index eff8dc3e3..ab35a104a 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java @@ -159,7 +159,7 @@ public class GraphHelper extends FormHandler { + "&w=" + (3 * _width) + "&h=" + (3 * _height) + "\">"); - String title = _("Combined bandwidth graph"); + String title = _t("Combined bandwidth graph"); _out.write("" + _("All times are UTC.") + "

\n"); + //_out.write("

" + _t("All times are UTC.") + "

\n"); } catch (IOException ioe) { ioe.printStackTrace(); } @@ -220,7 +220,7 @@ public class GraphHelper extends FormHandler { if (_stat.equals("bw.combined")) { period = 60000; name = _stat; - displayName = _("Bandwidth usage"); + displayName = _t("Bandwidth usage"); } else { Set rates = StatSummarizer.instance().parseSpecs(_stat); if (rates.size() != 1) { @@ -233,9 +233,9 @@ public class GraphHelper extends FormHandler { displayName = name; } _out.write("

"); - _out.write(_("{0} for {1}", displayName, DataHelper.formatDuration2(_periodCount * period))); + _out.write(_t("{0} for {1}", displayName, DataHelper.formatDuration2(_periodCount * period))); if (_end > 0) - _out.write(' ' + _("ending {0} ago", DataHelper.formatDuration2(_end * period))); + _out.write(' ' + _t("ending {0} ago", DataHelper.formatDuration2(_end * period))); _out.write("

- "); } if (_width > MIN_X && _height > MIN_Y) { _out.write(link(_stat, _showEvents, _periodCount, _end, _width * 2 / 3, _height * 2 / 3)); - _out.write(_("Smaller")); + _out.write(_t("Smaller")); _out.write(" - "); } if (_height < MAX_Y) { _out.write(link(_stat, _showEvents, _periodCount, _end, _width, _height * 3 / 2)); - _out.write(_("Taller")); + _out.write(_t("Taller")); _out.write(" - "); } if (_height > MIN_Y) { _out.write(link(_stat, _showEvents, _periodCount, _end, _width, _height * 2 / 3)); - _out.write(_("Shorter")); + _out.write(_t("Shorter")); _out.write(" - "); } if (_width < MAX_X) { _out.write(link(_stat, _showEvents, _periodCount, _end, _width * 3 / 2, _height)); - _out.write(_("Wider")); + _out.write(_t("Wider")); _out.write(" - "); } if (_width > MIN_X) { _out.write(link(_stat, _showEvents, _periodCount, _end, _width * 2 / 3, _height)); - _out.write(_("Narrower")); + _out.write(_t("Narrower")); _out.write(""); } _out.write("
"); if (_periodCount < MAX_C) { _out.write(link(_stat, _showEvents, _periodCount * 2, _end, _width, _height)); - _out.write(_("Larger interval")); + _out.write(_t("Larger interval")); _out.write(" - "); } if (_periodCount > MIN_C) { _out.write(link(_stat, _showEvents, _periodCount / 2, _end, _width, _height)); - _out.write(_("Smaller interval")); + _out.write(_t("Smaller interval")); _out.write(""); } _out.write("
"); if (_periodCount < MAX_C) { _out.write(link(_stat, _showEvents, _periodCount, _end + _periodCount, _width, _height)); - _out.write(_("Previous interval")); + _out.write(_t("Previous interval")); _out.write(""); } @@ -311,17 +311,17 @@ public class GraphHelper extends FormHandler { if (_periodCount < MAX_C) _out.write(" - "); _out.write(link(_stat, _showEvents, _periodCount, end, _width, _height)); - _out.write(_("Next interval")); + _out.write(_t("Next interval")); _out.write(" "); } _out.write("
"); _out.write(link(_stat, !_showEvents, _periodCount, _end, _width, _height)); if (!_stat.equals("bw.combined")) - _out.write(_showEvents ? _("Plot averages") : _("plot events")); + _out.write(_showEvents ? _t("Plot averages") : _t("plot events")); _out.write(""); - _out.write("

" + _("All times are UTC.") + "

\n"); + _out.write("

" + _t("All times are UTC.") + "

\n"); } catch (IOException ioe) { ioe.printStackTrace(); } @@ -353,17 +353,17 @@ public class GraphHelper extends FormHandler { // So just use the "shared/console nonce". String nonce = CSSHelper.getNonce(); try { - _out.write("

" + _("Configure Graph Display") + " [" + _("Select Stats") + "]

"); + _out.write("

" + _t("Configure Graph Display") + " [" + _t("Select Stats") + "]

"); _out.write("
\n" + "\n" + "\n"); - _out.write(_("Periods") + ":
\n"); - _out.write(_("Plot averages") + ": "); - _out.write(_("or")+ " " +_("plot events") + ":
\n"); - _out.write(_("Image sizes") + ": " + _("width") + ": " + _("pixels") + ", " + _("height") + ": " + _("pixels") + "
\n"); - _out.write(_("Refresh delay") + ":
\n"); + _out.write(_t("Plot averages") + ": "); + _out.write(_t("or")+ " " +_t("plot events") + ":
\n"); + _out.write(_t("Image sizes") + ": " + _t("width") + ": " + _t("pixels") + ", " + _t("height") + ": " + _t("pixels") + "
\n"); + _out.write(_t("Refresh delay") + ":
\n" + - _("Store graph data on disk?") + + _t("Store graph data on disk?") + " " + - "
"); + "
"); } catch (IOException ioe) { ioe.printStackTrace(); } @@ -440,7 +440,7 @@ public class GraphHelper extends FormHandler { changes.put(PROP_EVENTS, "" + _showEvents); changes.put(SummaryListener.PROP_PERSISTENT, "" + _persistent); _context.router().saveConfig(changes, null); - addFormNotice(_("Graph settings saved")); + addFormNotice(_t("Graph settings saved")); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/HelperBase.java b/apps/routerconsole/java/src/net/i2p/router/web/HelperBase.java index ff0dc8059..1c14848dc 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/HelperBase.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/HelperBase.java @@ -44,28 +44,28 @@ public abstract class HelperBase { public void storeWriter(Writer out) { _out = out; } /** translate a string */ - public String _(String s) { + public String _t(String s) { return Messages.getString(s, _context); } /** * translate a string with a parameter - * This is a lot more expensive than _(s), so use sparingly. + * This is a lot more expensive than _t(s), so use sparingly. * * @param s string to be translated containing {0} * The {0} will be replaced by the parameter. * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. - * To tranlslate parameter also, use _("foo {0} bar", _("baz")) + * To tranlslate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. * Use autoboxing to call with ints, longs, floats, etc. */ - public String _(String s, Object o) { + public String _t(String s, Object o) { return Messages.getString(s, o, _context); } /** two params @since 0.7.14 */ - public String _(String s, Object o, Object o2) { + public String _t(String s, Object o, Object o2) { return Messages.getString(s, o, o2, _context); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/HomeHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/HomeHelper.java index 223862576..104c84be5 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/HomeHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/HomeHelper.java @@ -25,6 +25,7 @@ public class HomeHelper extends HelperBase { static final String PROP_OLDHOME = "routerconsole.oldHomePage"; private static final String PROP_SEARCH = "routerconsole.showSearch"; + // No commas allowed in text strings! static final String DEFAULT_SERVICES = _x("Addressbook") + S + _x("Manage your I2P hosts file here (I2P domain name resolution)") + S + "/dns" + S + I + "book_addresses.png" + S + _x("Configure Bandwidth") + S + _x("I2P Bandwidth Configuration") + S + "/config" + S + I + "action_log.png" + S + @@ -37,6 +38,7 @@ public class HomeHelper extends HelperBase { _x("Website") + S + _x("Local web server") + S + "http://127.0.0.1:7658/" + S + I + "server_32x32.png" + S + ""; + // No commas allowed in text strings! static final String DEFAULT_FAVORITES = "anoncoin.i2p" + S + _x("The Anoncoin project") + S + "http://anoncoin.i2p/" + S + I + "anoncoin_32.png" + S + _x("Bug Reports") + S + _x("Bug tracker") + S + "http://trac.i2p2.i2p/report/1" + S + I + "bug.png" + S + @@ -44,10 +46,13 @@ public class HomeHelper extends HelperBase { _x("Dev Forum") + S + _x("Development forum") + S + "http://zzz.i2p/" + S + I + "group_gear.png" + S + _x("diftracker") + S + _x("Bittorrent tracker") + S + "http://diftracker.i2p/" + S + I + "magnet.png" + S + "echelon.i2p" + S + _x("I2P Applications") + S + "http://echelon.i2p/" + S + I + "box_open.png" + S + + "exchanged.i2p" + S + _x("Anonymous cryptocurrency exchange") + S + "http://exchanged.i2p/" + S + I + "exchanged.png" + S + _x("FAQ") + S + _x("Frequently Asked Questions") + S + "http://i2p-projekt.i2p/faq" + S + I + "question.png" + S + _x("Forum") + S + _x("Community forum") + S + "http://forum.i2p/" + S + I + "group.png" + S + _x("Anonymous Git Hosting") + S + _x("A public anonymous Git hosting site - supports pulling via Git and HTTP and pushing via SSH") + S + "http://git.repo.i2p/" + S + I + "git-logo.png" + S + "hiddengate.i2p" + S + _x("HiddenGate") + S + "http://hiddengate.i2p/" + S + I + "hglogo32.png" + S + + // FIXME ********** + _x("I2P Wiki") + S + _x("Anonymous wiki - share the knowledge") + S + "http://i2pwiki.i2p/" + S + I + "errortriangle.png" + S + "Ident " + _x("Microblog") + S + _x("Your premier microblogging service on I2P") + S + "http://id3nt.i2p/" + S + I + "ident_icon_blue.png" + S + _x("Javadocs") + S + _x("Technical documentation") + S + "http://i2p-javadocs.i2p/" + S + I + "education.png" + S + //"jisko.i2p" + S + _x("Simple and fast microblogging website") + S + "http://jisko.i2p/" + S + I + "jisko_console_icon.png" + S + @@ -55,15 +60,17 @@ public class HomeHelper extends HelperBase { "killyourtv.i2p" + S + _x("Debian and Tahoe-LAFS repositories") + S + "http://killyourtv.i2p/" + S + I + "television_delete.png" + S + _x("Free Web Hosting") + S + _x("Free eepsite hosting with PHP and MySQL") + S + "http://open4you.i2p/" + S + I + "open4you-logo.png" + S + _x("Pastebin") + S + _x("I2P Pastebin") + S + "http://pastethis.i2p/" + S + I + "paste_plain.png" + S + - "Planet I2P" + S + _x("I2P News") + S + "http://planet.i2p/" + S + I + "world.png" + S + + _x("Planet I2P") + S + _x("I2P News") + S + "http://planet.i2p/" + S + I + "world.png" + S + _x("Plugins") + S + _x("Add-on directory") + S + "http://plugins.i2p/" + S + I + "plugin.png" + S + _x("Postman's Tracker") + S + _x("Bittorrent tracker") + S + "http://tracker2.postman.i2p/" + S + I + "magnet.png" + S + _x("Project Website") + S + _x("I2P home page") + S + "http://i2p-projekt.i2p/" + S + I + "info_rhombus.png" + S + + // FIXME ********** + _x("Russian News Feed") + S + "lenta.i2p" + S + "http://lenta.i2p/" + S + I + "errortriangle.png" + S + //"Salt" + S + "salt.i2p" + S + "http://salt.i2p/" + S + I + "salt_console.png" + S + "stats.i2p" + S + _x("I2P Network Statistics") + S + "http://stats.i2p/cgi-bin/dashboard.cgi" + S + I + "chart_line.png" + S + _x("Technical Docs") + S + _x("Technical documentation") + S + "http://i2p-projekt.i2p/how" + S + I + "education.png" + S + _x("Trac Wiki") + S + S + "http://trac.i2p2.i2p/" + S + I + "billiard_marker.png" + S + - _x("Ugha's Wiki") + S + S + "http://ugha.i2p/" + S + I + "billiard_marker.png" + S + + //_x("Ugha's Wiki") + S + S + "http://ugha.i2p/" + S + I + "billiard_marker.png" + S + _x("Sponge's main site") + S + _x("Seedless and the Robert BitTorrent applications") + S + "http://sponge.i2p/" + S + I + "user_astronaut.png" + S + ""; @@ -105,9 +112,9 @@ public class HomeHelper extends HelperBase { public String getProxyStatus() { int port = _context.portMapper().getPort(PortMapper.SVC_HTTP_PROXY); if (port <= 0) - return _("The HTTP proxy is not up"); + return _t("The HTTP proxy is not up"); return "\"""; } @@ -168,7 +175,7 @@ public class HomeHelper extends HelperBase { } private String renderApps(Collection apps) { - String website = _("Website"); + String website = _t("Website"); StringBuilder buf = new StringBuilder(1024); buf.append("
"); for (App app : apps) { @@ -205,11 +212,11 @@ public class HomeHelper extends HelperBase { private String renderConfig(Collection apps) { StringBuilder buf = new StringBuilder(1024); buf.append("\n"); for (App app : apps) { buf.append("\n"); } buf.append("" + ""); buf.append("
") - .append(_("Remove")) + .append(_t("Remove")) .append("") - .append(_("Name")) + .append(_t("Name")) .append("") - .append(_("URL")) + .append(_t("URL")) .append("
") - .append(_("Add")).append(":" + + .append(_t("Add")).append(":" + "
\n"); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/JobQueueHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/JobQueueHelper.java index e6dc09a20..7bc28287f 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/JobQueueHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/JobQueueHelper.java @@ -47,29 +47,29 @@ public class JobQueueHelper extends HelperBase { int numRunners = _context.jobQueue().getJobs(readyJobs, timedJobs, activeJobs, justFinishedJobs); StringBuilder buf = new StringBuilder(32*1024); - buf.append("

").append(_("I2P Job Queue")).append("


") - .append(_("Job runners")).append(": ").append(numRunners) + buf.append("

").append(_t("I2P Job Queue")).append("


") + .append(_t("Job runners")).append(": ").append(numRunners) .append("
\n"); long now = _context.clock().now(); - buf.append("
").append(_("Active jobs")).append(": ").append(activeJobs.size()).append("
    \n"); + buf.append("
    ").append(_t("Active jobs")).append(": ").append(activeJobs.size()).append("
      \n"); for (int i = 0; i < activeJobs.size(); i++) { Job j = activeJobs.get(i); - buf.append("
    1. (").append(_("started {0} ago", DataHelper.formatDuration2(now-j.getTiming().getStartAfter()))).append("): "); + buf.append("
    2. (").append(_t("started {0} ago", DataHelper.formatDuration2(now-j.getTiming().getStartAfter()))).append("): "); buf.append(j.toString()).append("
    3. \n"); } buf.append("
    \n"); - buf.append("
    ").append(_("Just finished jobs")).append(": ").append(justFinishedJobs.size()).append("
      \n"); + buf.append("
      ").append(_t("Just finished jobs")).append(": ").append(justFinishedJobs.size()).append("
        \n"); for (int i = 0; i < justFinishedJobs.size(); i++) { Job j = justFinishedJobs.get(i); - buf.append("
      1. (").append(_("finished {0} ago", DataHelper.formatDuration2(now-j.getTiming().getActualEnd()))).append("): "); + buf.append("
      2. (").append(_t("finished {0} ago", DataHelper.formatDuration2(now-j.getTiming().getActualEnd()))).append("): "); buf.append(j.toString()).append("
      3. \n"); } buf.append("
      \n"); - buf.append("
      ").append(_("Ready/waiting jobs")).append(": ").append(readyJobs.size()).append("
        \n"); + buf.append("
        ").append(_t("Ready/waiting jobs")).append(": ").append(readyJobs.size()).append("
          \n"); ObjectCounter counter = new ObjectCounter(); for (int i = 0; i < readyJobs.size(); i++) { Job j = readyJobs.get(i); @@ -86,7 +86,7 @@ public class JobQueueHelper extends HelperBase { out.write(buf.toString()); buf.setLength(0); - buf.append("
          ").append(_("Scheduled jobs")).append(": ").append(timedJobs.size()).append("
            \n"); + buf.append("
            ").append(_t("Scheduled jobs")).append(": ").append(timedJobs.size()).append("
              \n"); long prev = Long.MIN_VALUE; counter.clear(); for (int i = 0; i < timedJobs.size(); i++) { @@ -96,7 +96,7 @@ public class JobQueueHelper extends HelperBase { continue; long time = j.getTiming().getStartAfter() - now; // translators: {0} is a job name, {1} is a time, e.g. 6 min - buf.append("
            1. ").append(_("{0} will start in {1}", j.getName(), DataHelper.formatDuration2(time))); + buf.append("
            2. ").append(_t("{0} will start in {1}", j.getName(), DataHelper.formatDuration2(time))); // debug, don't bother translating if (time < 0) buf.append(" DELAYED"); @@ -110,7 +110,7 @@ public class JobQueueHelper extends HelperBase { out.write(buf.toString()); buf.setLength(0); - buf.append("
              ").append(_("Total Job Statistics")).append("\n"); + buf.append("
              ").append(_t("Total Job Statistics")).append("\n"); getJobStats(buf); out.write(buf.toString()); } @@ -121,7 +121,7 @@ public class JobQueueHelper extends HelperBase { if (names.size() < 4) return; buf.append("\n" + - "
              ").append(_("Job")).append("").append(_("Queued")).append(""); + "
              ").append(_t("Job")).append("").append(_t("Queued")).append(""); Collections.sort(names, new JobCountComparator(counter)); for (String name : names) { buf.append("
              ").append(name) @@ -138,12 +138,12 @@ public class JobQueueHelper extends HelperBase { */ private void getJobStats(StringBuilder buf) { buf.append("\n" + - "" + - "" + - "" + - "\n"); + "" + + "" + + "" + + "\n"); long totRuns = 0; long totDropped = 0; long totExecTime = 0; @@ -194,7 +194,7 @@ public class JobQueueHelper extends HelperBase { } buf.append(""); - buf.append(""); + buf.append(""); buf.append(""); buf.append(""); buf.append(""); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java index 74ce11a19..1343a88cd 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/LocaleWebAppHandler.java @@ -83,6 +83,7 @@ public class LocaleWebAppHandler extends HandlerWrapper if (lang != null && lang.length() > 0 && !lang.equals("en")) { String testPath = pathInContext.substring(0, len - 4) + '_' + lang + ".jsp"; // Do we have a servlet for the new path that isn't the catchall *.jsp? + @SuppressWarnings("rawtypes") Map.Entry servlet = _wac.getServletHandler().getHolderEntry(testPath); if (servlet != null) { String servletPath = (String) servlet.getKey(); @@ -130,7 +131,7 @@ public class LocaleWebAppHandler extends HandlerWrapper /** * Mysteriously removed from Jetty 7 */ - private void setInitParams(Map params) { + private void setInitParams(Map params) { setInitParams(_wac, params); } @@ -138,7 +139,7 @@ public class LocaleWebAppHandler extends HandlerWrapper * @since Jetty 7 */ public static void setInitParams(WebAppContext context, Map params) { - for (Map.Entry e : params.entrySet()) { + for (Map.Entry e : params.entrySet()) { context.setInitParameter((String)e.getKey(), (String)e.getValue()); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/LogsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/LogsHelper.java index e3845df9d..dbed0c82e 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/LogsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/LogsHelper.java @@ -46,7 +46,7 @@ public class LogsHelper extends HelperBase { */ public String getLogs() { String str = formatMessages(_context.logManager().getBuffer().getMostRecentMessages()); - return "

              " + _("File location") + ": " + _context.logManager().currentFile() + "

              " + str; + return "

              " + _t("File location") + ": " + _context.logManager().currentFile() + "

              " + str; } /** @@ -97,10 +97,10 @@ public class LogsHelper extends HelperBase { str = FileUtil.readTextFile(f.getAbsolutePath(), 250, false); } if (str == null) { - return "

              " + _("File not found") + ": " + f.getAbsolutePath() + "

              "; + return "

              " + _t("File not found") + ": " + f.getAbsolutePath() + "

              "; } else { str = str.replace("&", "&").replace("<", "<").replace(">", ">"); - return "

              " + _("File location") + ": " + f.getAbsolutePath() + "

              " + str + "
              "; + return "

              " + _t("File location") + ": " + f.getAbsolutePath() + "

              " + str + "
              "; } } @@ -115,7 +115,7 @@ public class LogsHelper extends HelperBase { /** formats in reverse order */ private String formatMessages(List msgs) { if (msgs.isEmpty()) - return "

              " + _("No log messages") + "

              "; + return "

              " + _t("No log messages") + "

              "; boolean colorize = _context.getBooleanPropertyDefaultTrue("routerconsole.logs.color"); StringBuilder buf = new StringBuilder(16*1024); buf.append("
                "); @@ -138,13 +138,13 @@ public class LogsHelper extends HelperBase { // Homeland Security Advisory System // http://www.dhs.gov/xinfoshare/programs/Copy_of_press_release_0046.shtm // but pink instead of yellow for WARN - if (msg.contains(_("CRIT"))) + if (msg.contains(_t("CRIT"))) color = "#cc0000"; - else if (msg.contains(_("ERROR"))) + else if (msg.contains(_t("ERROR"))) color = "#ff3300"; - else if (msg.contains(_("WARN"))) + else if (msg.contains(_t("WARN"))) color = "#ff00cc"; - else if (msg.contains(_("INFO"))) + else if (msg.contains(_t("INFO"))) color = "#000099"; else color = "#006600"; diff --git a/apps/routerconsole/java/src/net/i2p/router/web/Messages.java b/apps/routerconsole/java/src/net/i2p/router/web/Messages.java index c76f260e8..e138c0ffd 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/Messages.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/Messages.java @@ -24,7 +24,7 @@ public class Messages extends Translate { * The {0} will be replaced by the parameter. * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. - * To tranlslate parameter also, use _("foo {0} bar", _("baz")) + * To tranlslate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. * Use autoboxing to call with ints, longs, floats, etc. */ diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NetDbHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/NetDbHelper.java index 496f49ac1..808297fb5 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NetDbHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NetDbHelper.java @@ -125,12 +125,12 @@ public class NetDbHelper extends HelperBase { // we are there if (span) buf.append(""); - buf.append(_(titles[i])); + buf.append(_t(titles[i])); } else { // we are not there, make a link if (span) buf.append(""); - buf.append("").append(_(titles[i])).append(""); + buf.append("").append(_t(titles[i])).append(""); } if (span) buf.append(" \n"); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java index 89b4a7000..ff6b092a2 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NetDbRenderer.java @@ -35,6 +35,7 @@ import net.i2p.router.RouterContext; import net.i2p.router.TunnelPoolSettings; import net.i2p.router.util.HashDistance; // debug import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade; +import net.i2p.util.Log; import net.i2p.util.ObjectCounter; import net.i2p.util.Translate; import net.i2p.util.VersionComparator; @@ -102,14 +103,14 @@ public class NetDbRenderer { } } if (notFound) { - buf.append(_("Router")).append(' '); + buf.append(_t("Router")).append(' '); if (routerPrefix != null) buf.append(routerPrefix); else if (version != null) buf.append(version); else if (country != null) buf.append(country); - buf.append(' ').append(_("not found in network database")); + buf.append(' ').append(_t("not found in network database")); } } out.write(buf.toString()); @@ -141,24 +142,28 @@ public class NetDbRenderer { int rapCount = 0; BigInteger median = null; int c = 0; - if (debug) { + if (leases.isEmpty()) { + if (!debug) + buf.append("").append(_t("none")).append(""); + } else { + if (debug) { // Find the center of the RAP leasesets for (LeaseSet ls : leases) { if (ls.getReceivedAsPublished()) rapCount++; } medianCount = rapCount / 2; - } - long now = _context.clock().now(); - for (LeaseSet ls : leases) { + } + long now = _context.clock().now(); + for (LeaseSet ls : leases) { Destination dest = ls.getDestination(); Hash key = dest.calculateHash(); - buf.append("").append(_("LeaseSet")).append(": ").append(key.toBase64()).append("\n"); + buf.append("").append(_t("LeaseSet")).append(": ").append(key.toBase64()).append("\n"); if (_context.clientManager().isLocal(dest)) { - buf.append(" (" + _("Local") + " "); + buf.append(" (" + _t("Local") + " "); if (! _context.clientManager().shouldPublishLeaseSet(key)) - buf.append(_("Unpublished") + ' '); - buf.append(_("Destination") + ' '); + buf.append(_t("Unpublished") + ' '); + buf.append(_t("Destination") + ' '); TunnelPoolSettings in = _context.tunnelManager().getInboundSettings(key); if (in != null && in.getDestinationNickname() != null) buf.append(in.getDestinationNickname()); @@ -170,10 +175,10 @@ public class NetDbRenderer { String host = _context.namingService().reverseLookup(dest); if (host == null) { buf.append("").append(_("Add to local addressbook")).append("
                \n"); + .append(dest.toBase64()).append("#add\">").append(_t("Add to local addressbook")).append("
                \n"); } } else { - buf.append(" (").append(_("Destination")).append(' '); + buf.append(" (").append(_t("Destination")).append(' '); String host = _context.namingService().reverseLookup(dest); if (host != null) { buf.append("").append(host).append(")
                \n"); @@ -182,14 +187,14 @@ public class NetDbRenderer { buf.append(dest.toBase64().substring(0, 6)).append(")
                \n" + "").append(b32).append("
                \n" + "").append(_("Add to local addressbook")).append("
                \n"); + .append(dest.toBase64()).append("#add\">").append(_t("Add to local addressbook")).append("
                \n"); } } long exp = ls.getLatestLeaseDate()-now; if (exp > 0) - buf.append(_("Expires in {0}", DataHelper.formatDuration2(exp))); + buf.append(_t("Expires in {0}", DataHelper.formatDuration2(exp))); else - buf.append(_("Expired {0} ago", DataHelper.formatDuration2(0-exp))); + buf.append(_t("Expired {0} ago", DataHelper.formatDuration2(0-exp))); buf.append("
                \n"); if (debug) { buf.append("RAP? " + ls.getReceivedAsPublished()); @@ -208,22 +213,23 @@ public class NetDbRenderer { } for (int i = 0; i < ls.getLeaseCount(); i++) { Lease lease = ls.getLease(i); - buf.append(_("Lease")).append(' ').append(i + 1).append(": ").append(_("Gateway")).append(' '); + buf.append(_t("Lease")).append(' ').append(i + 1).append(": ").append(_t("Gateway")).append(' '); buf.append(_context.commSystem().renderPeerHTML(lease.getGateway())); - buf.append(' ').append(_("Tunnel")).append(' ').append(lease.getTunnelId().getTunnelId()).append(' '); + buf.append(' ').append(_t("Tunnel")).append(' ').append(lease.getTunnelId().getTunnelId()).append(' '); if (debug) { long exl = lease.getEndDate().getTime() - now; if (exl > 0) - buf.append(_("Expires in {0}", DataHelper.formatDuration2(exl))); + buf.append(_t("Expires in {0}", DataHelper.formatDuration2(exl))); else - buf.append(_("Expired {0} ago", DataHelper.formatDuration2(0-exl))); + buf.append(_t("Expired {0} ago", DataHelper.formatDuration2(0-exl))); } buf.append("
                \n"); } buf.append("
                \n"); out.write(buf.toString()); buf.setLength(0); - } + } // for each + } // !empty if (debug) { FloodfillNetworkDatabaseFacade netdb = (FloodfillNetworkDatabaseFacade)_context.netDb(); buf.append("

                Total Leasesets: ").append(leases.size()); @@ -277,10 +283,12 @@ public class NetDbRenderer { */ public void renderStatusHTML(Writer out, int mode) throws IOException { if (!_context.netDb().isInitialized()) { - out.write(_("Not initialized")); + out.write(_t("Not initialized")); out.flush(); return; } + Log log = _context.logManager().getLog(NetDbRenderer.class); + long start = System.currentTimeMillis(); boolean full = mode == 1; boolean shortStats = mode == 2; @@ -319,6 +327,10 @@ public class NetDbRenderer { transportCount[classifyTransports(ri)]++; } } + long end = System.currentTimeMillis(); + if (log.shouldWarn()) + log.warn("part 1 took " + (end - start)); + start = end; // // don't bother to reindent @@ -327,14 +339,14 @@ public class NetDbRenderer { // the summary table buf.append("

              ").append(_("Job")).append("").append(_("Runs")).append("").append(_("Dropped")).append("").append(_("Time")).append("").append(_("Avg")).append("") - .append(_("Max")).append("").append(_("Min")).append("").append(_("Pending")).append("").append(_("Avg")).append("") - .append(_("Max")).append("").append(_("Min")).append("
              ").append(_t("Job")).append("").append(_t("Runs")).append("").append(_t("Dropped")).append("").append(_t("Time")).append("").append(_t("Avg")).append("") + .append(_t("Max")).append("").append(_t("Min")).append("").append(_t("Pending")).append("").append(_t("Avg")).append("") + .append(_t("Max")).append("").append(_t("Min")).append("
              ").append(_("Summary")).append("").append(_t("Summary")).append("").append(totRuns).append("").append(totDropped).append("").append(DataHelper.formatDuration2(totExecTime)).append("
              ") - .append(_("Network Database Router Statistics")) + .append(_t("Network Database Router Statistics")) .append("
              "); // versions table List versionList = new ArrayList(versions.objects()); if (!versionList.isEmpty()) { Collections.sort(versionList, Collections.reverseOrder(new VersionComparator())); buf.append("\n"); - buf.append("\n"); + buf.append("\n"); for (String routerVersion : versionList) { int num = versions.count(routerVersion); String ver = DataHelper.stripHTML(routerVersion); @@ -346,14 +358,18 @@ public class NetDbRenderer { buf.append("
              " + _("Version") + "" + _("Count") + "
              " + _t("Version") + "" + _t("Count") + "
              "); out.write(buf.toString()); buf.setLength(0); + end = System.currentTimeMillis(); + if (log.shouldWarn()) + log.warn("part 2 took " + (end - start)); + start = end; // transports table buf.append("\n"); - buf.append("\n"); + buf.append("\n"); for (int i = 0; i < TNAMES.length; i++) { int num = transportCount[i]; if (num > 0) { - buf.append("\n"); } } @@ -361,13 +377,17 @@ public class NetDbRenderer { buf.append("
              " + _("Transports") + "" + _("Count") + "
              " + _t("Transports") + "" + _t("Count") + "
              ").append(_(TNAMES[i])); + buf.append("
              ").append(_t(TNAMES[i])); buf.append("").append(num).append("
              "); out.write(buf.toString()); buf.setLength(0); + end = System.currentTimeMillis(); + if (log.shouldWarn()) + log.warn("part 3 took " + (end - start)); + start = end; // country table List countryList = new ArrayList(countries.objects()); if (!countryList.isEmpty()) { Collections.sort(countryList, new CountryComparator()); buf.append("\n"); - buf.append("\n"); + buf.append("\n"); for (String country : countryList) { int num = countries.count(country); buf.append("
              " + _("Country") + "" + _("Count") + "
              " + _t("Country") + "" + _t("Count") + "
              \"").append(country.toUpperCase(Locale.US)).append("\"");
              "); + end = System.currentTimeMillis(); + if (log.shouldWarn()) + log.warn("part 4 took " + (end - start)); + start = end; // // don't bother to reindent @@ -426,29 +450,29 @@ public class NetDbRenderer { String hash = info.getIdentity().getHash().toBase64(); buf.append("\n"); if (full) { - buf.append("
              "); if (isUs) { - buf.append("" + _("Our info") + ": ").append(hash).append("
              \n"); + buf.append("" + _t("Our info") + ": ").append(hash).append("
              \n"); } else { - buf.append("" + _("Peer info for") + ": ").append(hash).append("\n"); + buf.append("" + _t("Peer info for") + ": ").append(hash).append("\n"); if (!full) { - buf.append("[").append(_("Full entry")).append("]"); + buf.append("[").append(_t("Full entry")).append("]"); } buf.append("
              \n"); } long age = _context.clock().now() - info.getPublished(); if (isUs && _context.router().isHidden()) { - buf.append("").append(_("Hidden")).append(", ").append(_("Updated")).append(": ") - .append(_("{0} ago", DataHelper.formatDuration2(age))).append("
              \n"); + buf.append("").append(_t("Hidden")).append(", ").append(_t("Updated")).append(": ") + .append(_t("{0} ago", DataHelper.formatDuration2(age))).append("
              \n"); } else if (age > 0) { - buf.append("").append(_("Published")).append(": ") - .append(_("{0} ago", DataHelper.formatDuration2(age))).append("
              \n"); + buf.append("").append(_t("Published")).append(": ") + .append(_t("{0} ago", DataHelper.formatDuration2(age))).append("
              \n"); } else { // shouldnt happen - buf.append("" + _("Published") + ": in ").append(DataHelper.formatDuration2(0-age)).append("???
              \n"); + buf.append("" + _t("Published") + ": in ").append(DataHelper.formatDuration2(0-age)).append("???
              \n"); } - buf.append("").append(_("Signing Key")).append(": ") + buf.append("").append(_t("Signing Key")).append(": ") .append(info.getIdentity().getSigningPublicKey().getType().toString()); - buf.append("
              \n" + _("Address(es)") + ": "); + buf.append("
              \n" + _t("Address(es)") + ": "); String country = _context.commSystem().getCountry(info.getIdentity().getHash()); if(country != null) { buf.append("\"").append(country.toUpperCase(Locale.US)).append('\"');").append(DataHelper.stripHTML(style)).append(": "); int cost = addr.getCost(); if (!((style.equals("SSU") && cost == 5) || (style.equals("NTCP") && cost == 10))) - buf.append('[').append(_("cost")).append('=').append("" + cost).append("] "); + buf.append('[').append(_t("cost")).append('=').append("" + cost).append("] "); Map p = addr.getOptionsMap(); for (Map.Entry e : p.entrySet()) { String name = (String) e.getKey(); String val = (String) e.getValue(); - buf.append('[').append(_(DataHelper.stripHTML(name))).append('=').append(DataHelper.stripHTML(val)).append("] "); + buf.append('[').append(_t(DataHelper.stripHTML(name))).append('=').append(DataHelper.stripHTML(val)).append("] "); } } buf.append("
              " + _("Stats") + ":
              "); + buf.append("
              " + _t("Stats") + ":
              "); Map p = info.getOptionsMap(); for (Map.Entry e : p.entrySet()) { String key = (String) e.getKey(); @@ -514,7 +538,7 @@ public class NetDbRenderer { } /** translate a string */ - private String _(String s) { + private String _t(String s) { return Messages.getString(s, _context); } @@ -525,17 +549,17 @@ public class NetDbRenderer { /** * translate a string with a parameter - * This is a lot more expensive than _(s), so use sparingly. + * This is a lot more expensive than _t(s), so use sparingly. * * @param s string to be translated containing {0} * The {0} will be replaced by the parameter. * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. - * To tranlslate parameter also, use _("foo {0} bar", _("baz")) + * To tranlslate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. * Use autoboxing to call with ints, longs, floats, etc. */ - private String _(String s, Object o) { + private String _t(String s, Object o) { return Messages.getString(s, o, _context); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsFeedHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsFeedHelper.java new file mode 100644 index 000000000..357887f9e --- /dev/null +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsFeedHelper.java @@ -0,0 +1,92 @@ +package net.i2p.router.web; + +import java.text.DateFormat; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.TimeZone; + +import net.i2p.I2PAppContext; +import net.i2p.app.ClientAppManager; +import net.i2p.data.DataHelper; +import net.i2p.router.news.NewsEntry; +import net.i2p.router.news.NewsManager; + + +/** + * HTML-formatted full news entries + * + * @since 0.9.23 + */ +public class NewsFeedHelper extends HelperBase { + + private int _start = 0; + private int _limit = 2; + + /** + * @param limit less than or equal to zero means all + */ + public void setLimit(int limit) { + _limit = limit; + } + + public void setStart(int start) { + _start = start; + } + + public String getEntries() { + return getEntries(_context, _start, _limit); + } + + /** + * @param max less than or equal to zero means all + * @return non-null, "" if none + */ + static String getEntries(I2PAppContext ctx, int start, int max) { + if (max <= 0) + max = Integer.MAX_VALUE; + StringBuilder buf = new StringBuilder(512); + List entries = Collections.emptyList(); + ClientAppManager cmgr = ctx.clientAppManager(); + if (cmgr != null) { + NewsManager nmgr = (NewsManager) cmgr.getRegisteredApp(NewsManager.APP_NAME); + if (nmgr != null) + entries = nmgr.getEntries(); + } + if (!entries.isEmpty()) { + DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT); + // the router sets the JVM time zone to UTC but saves the original here so we can get it + String systemTimeZone = ctx.getProperty("i2p.systemTimeZone"); + if (systemTimeZone != null) + fmt.setTimeZone(TimeZone.getTimeZone(systemTimeZone)); + int i = 0; + for (NewsEntry entry : entries) { + if (i++ < start) + continue; + buf.append("

              "); + if (entry.updated > 0) { + Date date = new Date(entry.updated); + buf.append("") + .append(fmt.format(date)) + .append(": "); + } + if (entry.link != null) + buf.append(""); + buf.append(entry.title); + if (entry.link != null) + buf.append(""); + if (entry.authorName != null) { + buf.append(" (") + .append(Messages.getString("by {0}", DataHelper.escapeHTML(entry.authorName), ctx)) + .append(")\n"); + } + buf.append("

              \n
              \n") + .append(entry.content) + .append("\n
              \n"); + if (i >= start + max) + break; + } + } + return buf.toString(); + } +} diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java index be3b5685b..ee353925a 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsHelper.java @@ -99,6 +99,28 @@ public class NewsHelper extends ContentHelper { return mgr.getUpdateConstraint(ROUTER_SIGNED, ""); } + /** + * Translated message about new version available but constrained + * @return null if none + * @since 0.9.23 + */ + public static String unsignedUpdateConstraint() { + ConsoleUpdateManager mgr = ConsoleUpdateManager.getInstance(); + if (mgr == null) return null; + return mgr.getUpdateConstraint(ROUTER_UNSIGNED, ""); + } + + /** + * Translated message about new version available but constrained + * @return null if none + * @since 0.9.23 + */ + public static String devSU3UpdateConstraint() { + ConsoleUpdateManager mgr = ConsoleUpdateManager.getInstance(); + if (mgr == null) return null; + return mgr.getUpdateConstraint(ROUTER_DEV_SU3, ""); + } + /** * Release update only. * Already downloaded but not installed version. @@ -204,37 +226,12 @@ public class NewsHelper extends ContentHelper { return mgr.getStatus(); } - private static final String BUNDLE_NAME = "net.i2p.router.news.messages"; - /** * If we haven't downloaded news yet, use the translated initial news file */ @Override public String getContent() { - File news = new File(_page); - if (!news.exists()) { - _page = (new File(_context.getBaseDir(), "docs/initialNews/initialNews.xml")).getAbsolutePath(); - // don't use super, translate on-the-fly - Reader reader = null; - try { - char[] buf = new char[512]; - StringBuilder out = new StringBuilder(2048); - reader = new TranslateReader(_context, BUNDLE_NAME, new FileInputStream(_page)); - int len; - while((len = reader.read(buf)) > 0) { - out.append(buf, 0, len); - } - return out.toString(); - } catch (IOException ioe) { - return ""; - } finally { - try { - if (reader != null) - reader.close(); - } catch (IOException foo) {} - } - } - return super.getContent(); + return NewsFeedHelper.getEntries(_context, 0, 2); } /** @@ -312,7 +309,10 @@ public class NewsHelper extends ContentHelper { buf.append(" ") .append(Messages.getString("Show news", ctx)); } - buf.append(""); + buf.append("" + + " - ") + .append(Messages.getString("Show all news", ctx)) + .append(""); } return buf.toString(); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java b/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java index d0a6277e0..386eb664e 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java @@ -157,6 +157,12 @@ public class PluginStarter implements Runnable { Messages.getString("HTTP client proxy tunnel must be running", ctx)); return; } + if (ctx.commSystem().isDummy()) { + mgr.notifyComplete(null, Messages.getString("Plugin update check failed", ctx) + + " - " + + "VM Comm System"); + return; + } Log log = ctx.logManager().getLog(PluginStarter.class); int updated = 0; @@ -258,6 +264,7 @@ public class PluginStarter implements Runnable { * @return true on success * @throws just about anything, caller would be wise to catch Throwable */ + @SuppressWarnings("deprecation") public static boolean startPlugin(RouterContext ctx, String appName) throws Exception { Log log = ctx.logManager().getLog(PluginStarter.class); File pluginDir = new File(ctx.getConfigDir(), PLUGIN_DIR + '/' + appName); @@ -338,9 +345,11 @@ public class PluginStarter implements Runnable { if (tfiles != null) { for (int i = 0; i < tfiles.length; i++) { String name = tfiles[i].getName(); - if (tfiles[i].isDirectory() && (!Arrays.asList(STANDARD_THEMES).contains(tfiles[i]))) + if (tfiles[i].isDirectory() && (!Arrays.asList(STANDARD_THEMES).contains(tfiles[i]))) { + // deprecated ctx.router().setConfigSetting(ConfigUIHelper.PROP_THEME_PFX + name, tfiles[i].getAbsolutePath()); // we don't need to save + } } } @@ -537,7 +546,7 @@ public class PluginStarter implements Runnable { boolean deleted = FileUtil.rmdir(pluginDir, false); Properties props = pluginProperties(); - for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) { + for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) { String name = (String)iter.next(); if (name.startsWith(PREFIX + appName + '.')) iter.remove(); @@ -967,7 +976,7 @@ public class PluginStarter implements Runnable { private static void addPath(URL u) throws Exception { URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class urlClass = URLClassLoader.class; - Method method = urlClass.getDeclaredMethod("addURL", new Class[]{URL.class}); + Method method = urlClass.getDeclaredMethod("addURL", URL.class); method.setAccessible(true); method.invoke(urlClassLoader, new Object[]{u}); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java index ef70b170a..2cb7e311f 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java @@ -75,7 +75,7 @@ class ProfileOrganizerRenderer { //// if (mode < 2) { - //buf.append("

              ").append(_("Peer Profiles")).append("

              \n

              "); + //buf.append("

              ").append(_t("Peer Profiles")).append("

              \n

              "); buf.append(ngettext("Showing 1 recent profile.", "Showing {0} recent profiles.", order.size())).append('\n'); if (older > 0) buf.append(ngettext("Hiding 1 older profile.", "Hiding {0} older profiles.", older)).append('\n'); @@ -84,12 +84,12 @@ class ProfileOrganizerRenderer { buf.append("

              "); buf.append(""); buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); buf.append(""); buf.append(""); int prevTier = 1; @@ -127,12 +127,12 @@ class ProfileOrganizerRenderer { buf.append(""); //buf.append("\n"); buf.append(""); // let's not build the whole page in memory (~500 bytes per peer) @@ -193,26 +193,26 @@ class ProfileOrganizerRenderer { //// } else { - //buf.append("

              ").append(_("Floodfill and Integrated Peers")) + //buf.append("

              ").append(_t("Floodfill and Integrated Peers")) // .append(" (").append(integratedPeers.size()).append(")

              \n"); buf.append("
              ").append(_("Peer")).append("").append(_("Groups (Caps)")).append("").append(_("Speed")).append("").append(_("Capacity")).append("").append(_("Integration")).append("").append(_("Status")).append("").append(_t("Peer")).append("").append(_t("Groups (Caps)")).append("").append(_t("Speed")).append("").append(_t("Capacity")).append("").append(_t("Integration")).append("").append(_t("Status")).append(" 
              "); switch (tier) { - case 1: buf.append(_("Fast, High Capacity")); break; - case 2: buf.append(_("High Capacity")); break; - case 3: buf.append(_("Standard")); break; - default: buf.append(_("Failing")); break; + case 1: buf.append(_t("Fast, High Capacity")); break; + case 2: buf.append(_t("High Capacity")); break; + case 3: buf.append(_t("Standard")); break; + default: buf.append(_t("Failing")); break; } - if (isIntegrated) buf.append(", ").append(_("Integrated")); + if (isIntegrated) buf.append(", ").append(_t("Integrated")); RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer); if (info != null) { // prevent HTML injection in the caps and version @@ -163,9 +163,9 @@ class ProfileOrganizerRenderer { } buf.append("").append(num(prof.getIntegrationValue())); buf.append(""); - if (_context.banlist().isBanlisted(peer)) buf.append(_("Banned")); - if (prof.getIsFailing()) buf.append(' ').append(_("Failing")); - if (_context.commSystem().wasUnreachable(peer)) buf.append(' ').append(_("Unreachable")); + if (_context.banlist().isBanlisted(peer)) buf.append(_t("Banned")); + if (prof.getIsFailing()) buf.append(' ').append(_t("Failing")); + if (_context.commSystem().wasUnreachable(peer)) buf.append(' ').append(_t("Unreachable")); RateAverages ra = RateAverages.getTemp(); Rate failed = prof.getTunnelHistory().getFailedRate().getRate(30*60*1000); long fails = failed.computeAverages(ra, false).getTotalEventCount(); @@ -173,13 +173,13 @@ class ProfileOrganizerRenderer { Rate accepted = prof.getTunnelCreateResponseTime().getRate(30*60*1000); long total = fails + accepted.computeAverages(ra, false).getTotalEventCount(); if (total / fails <= 10) // hide if < 10% - buf.append(' ').append(fails).append('/').append(total).append(' ').append(_("Test Fails")); + buf.append(' ').append(fails).append('/').append(total).append(' ').append(_t("Test Fails")); } buf.append(" ").append(_("profile")).append(""); + // .append(peer.toBase64().substring(0,6)).append("\">").append(_t("profile")).append(""); buf.append("").append(_("profile")).append(""); + .append(peer.toBase64()).append("\">").append(_t("profile")).append(""); buf.append(" +-
              "); buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); - buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); + buf.append(""); buf.append(""); RateAverages ra = RateAverages.getTemp(); for (PeerProfile prof : order) { @@ -244,7 +244,7 @@ class ProfileOrganizerRenderer { buf.append(""); } else { for (int i = 0; i < 6; i++) - buf.append("\n"); } @@ -256,20 +256,20 @@ class ProfileOrganizerRenderer { } if (mode < 2) { - buf.append("

              ").append(_("Thresholds")).append("

              "); - buf.append("

              ").append(_("Speed")).append(": ").append(num(_organizer.getSpeedThreshold())) - .append(" (").append(fast).append(' ').append(_("fast peers")).append(")
              "); - buf.append("").append(_("Capacity")).append(": ").append(num(_organizer.getCapacityThreshold())) - .append(" (").append(reliable).append(' ').append(_("high capacity peers")).append(")
              "); - buf.append("").append(_("Integration")).append(": ").append(num(_organizer.getIntegrationThreshold())) - .append(" (").append(integrated).append(' ').append(_(" well integrated peers")).append(")

              "); - buf.append("

              ").append(_("Definitions")).append("

                "); - buf.append("
              • ").append(_("groups")).append(": ").append(_("as determined by the profile organizer")).append("
              • "); - buf.append("
              • ").append(_("caps")).append(": ").append(_("capabilities in the netDb, not used to determine profiles")).append("
              • "); - buf.append("
              • ").append(_("speed")).append(": ").append(_("peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel")).append("
              • "); - buf.append("
              • ").append(_("capacity")).append(": ").append(_("how many tunnels can we ask them to join in an hour?")).append("
              • "); - buf.append("
              • ").append(_("integration")).append(": ").append(_("how many new peers have they told us about lately?")).append("
              • "); - buf.append("
              • ").append(_("status")).append(": ").append(_("is the peer banned, or unreachable, or failing tunnel tests?")).append("
              • "); + buf.append("

                ").append(_t("Thresholds")).append("

                "); + buf.append("

                ").append(_t("Speed")).append(": ").append(num(_organizer.getSpeedThreshold())) + .append(" (").append(fast).append(' ').append(_t("fast peers")).append(")
                "); + buf.append("").append(_t("Capacity")).append(": ").append(num(_organizer.getCapacityThreshold())) + .append(" (").append(reliable).append(' ').append(_t("high capacity peers")).append(")
                "); + buf.append("").append(_t("Integration")).append(": ").append(num(_organizer.getIntegrationThreshold())) + .append(" (").append(integrated).append(' ').append(_t(" well integrated peers")).append(")

                "); + buf.append("

                ").append(_t("Definitions")).append("

                  "); + buf.append("
                • ").append(_t("groups")).append(": ").append(_t("as determined by the profile organizer")).append("
                • "); + buf.append("
                • ").append(_t("caps")).append(": ").append(_t("capabilities in the netDb, not used to determine profiles")).append("
                • "); + buf.append("
                • ").append(_t("speed")).append(": ").append(_t("peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel")).append("
                • "); + buf.append("
                • ").append(_t("capacity")).append(": ").append(_t("how many tunnels can we ask them to join in an hour?")).append("
                • "); + buf.append("
                • ").append(_t("integration")).append(": ").append(_t("how many new peers have they told us about lately?")).append("
                • "); + buf.append("
                • ").append(_t("status")).append(": ").append(_t("is the peer banned, or unreachable, or failing tunnel tests?")).append("
                • "); buf.append("
                "); //// @@ -336,13 +336,13 @@ class ProfileOrganizerRenderer { private String avg (PeerProfile prof, long rate, RateAverages ra) { RateStat rs = prof.getDbResponseTime(); if (rs == null) - return _(NA); + return _t(NA); Rate r = rs.getRate(rate); if (r == null) - return _(NA); + return _t(NA); r.computeAverages(ra, false); if (ra.getTotalEventCount() == 0) - return _(NA); + return _t(NA); return DataHelper.formatDuration2(Math.round(ra.getAverage())); } @@ -363,12 +363,12 @@ class ProfileOrganizerRenderer { /** @since 0.9.21 */ private String formatInterval(long now, long then) { if (then <= 0) - return _(NA); + return _t(NA); return DataHelper.formatDuration2(now - then); } /** translate a string */ - private String _(String s) { + private String _t(String s) { return Messages.getString(s, _context); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ProfilesHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ProfilesHelper.java index 6645558d5..3236d1f12 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ProfilesHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ProfilesHelper.java @@ -104,12 +104,12 @@ public class ProfilesHelper extends HelperBase { // we are there if (span) buf.append(""); - buf.append(_(titles[i])); + buf.append(_t(titles[i])); } else { // we are not there, make a link if (span) buf.append(""); - buf.append("").append(_(titles[i])).append(""); + buf.append("").append(_t(titles[i])).append(""); } if (span) buf.append(" \n"); 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 0c36391dd..f16cee608 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java @@ -26,8 +26,9 @@ import net.i2p.crypto.KeyStoreUtil; import net.i2p.data.DataHelper; import net.i2p.jetty.I2PLogger; import net.i2p.router.RouterContext; -import net.i2p.router.update.ConsoleUpdateManager; import net.i2p.router.app.RouterApp; +import net.i2p.router.news.NewsManager; +import net.i2p.router.update.ConsoleUpdateManager; import net.i2p.util.Addresses; import net.i2p.util.FileUtil; import net.i2p.util.I2PAppThread; @@ -298,12 +299,12 @@ public class RouterConsoleRunner implements RouterApp { log.logAlways(net.i2p.util.Log.WARN, s); System.out.println("Warning: " + s); if (noJava7) { - s = "Java 7 will be required by mid-2015, please upgrade soon"; + s = "Java 7 will be required by late 2015, please upgrade soon"; log.logAlways(net.i2p.util.Log.WARN, s); System.out.println("Warning: " + s); } if (noPack200) { - s = "Pack200 will be required by mid-2015, please upgrade Java soon"; + s = "Pack200 will be required by late 2015, please upgrade Java soon"; log.logAlways(net.i2p.util.Log.WARN, s); System.out.println("Warning: " + s); } @@ -706,6 +707,8 @@ public class RouterConsoleRunner implements RouterApp { ConsoleUpdateManager um = new ConsoleUpdateManager(_context, _mgr, null); um.start(); + NewsManager nm = new NewsManager(_context, _mgr, null); + nm.startup(); if (PluginStarter.pluginsEnabled(_context)) { t = new I2PAppThread(new PluginStarter(_context), "PluginStarter", true); @@ -757,6 +760,13 @@ public class RouterConsoleRunner implements RouterApp { changes.put(PROP_KEY_PASSWORD, keyPassword); _context.router().saveConfig(changes, null); } catch (Exception e) {} // class cast exception + // export cert, fails silently + File dir = new SecureDirectory(_context.getConfigDir(), "certificates"); + dir.mkdir(); + dir = new SecureDirectory(dir, "console"); + dir.mkdir(); + File certFile = new File(dir, "console.local.crt"); + KeyStoreUtil.exportCert(ks, DEFAULT_KEYSTORE_PASSWORD, "console", certFile); } } if (success) { diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SearchHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/SearchHelper.java index 3ee03289b..e04809d6f 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SearchHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SearchHelper.java @@ -71,7 +71,7 @@ public class SearchHelper extends HelperBase { } } StringBuilder buf = new StringBuilder(1024); - buf.append(""); for (String name : _engines.keySet()) { buf.append("\n"); + buf.append(_t(group)).append("\n"); // let's just do the groups //Set stats = (Set)entry.getValue(); //for (Iterator statIter = stats.iterator(); statIter.hasNext(); ) { @@ -54,14 +54,14 @@ public class StatsGenerator { //out.write(buf.toString()); //buf.setLength(0); } - buf.append(" "); + buf.append(" "); buf.append(""); - buf.append(_("Statistics gathered during this router's uptime")).append(" ("); + buf.append(_t("Statistics gathered during this router's uptime")).append(" ("); long uptime = _context.router().getUptime(); buf.append(DataHelper.formatDuration2(uptime)); - buf.append("). ").append( _("The data gathered is quantized over a 1 minute period, so should just be used as an estimate.")); - buf.append(' ').append( _("These statistics are primarily used for development and debugging.")); + buf.append("). ").append( _t("The data gathered is quantized over a 1 minute period, so should just be used as an estimate.")); + buf.append(' ').append( _t("These statistics are primarily used for development and debugging.")); out.write(buf.toString()); buf.setLength(0); @@ -72,7 +72,7 @@ public class StatsGenerator { buf.append("

                "); - buf.append(_(group)); + buf.append(_t(group)); buf.append("

                "); buf.append("
                  "); out.write(buf.toString()); @@ -102,7 +102,7 @@ public class StatsGenerator { buf.append(freq.getDescription()); buf.append("
                  "); if (freq.getEventCount() <= 0) { - buf.append(_("No lifetime events")).append("
                  \n"); + buf.append(_t("No lifetime events")).append("
                  \n"); return; } long uptime = _context.router().getUptime(); @@ -113,15 +113,15 @@ public class StatsGenerator { if (periods[i] > uptime) break; buf.append("
                • "); - renderPeriod(buf, periods[i], _("frequency")); + renderPeriod(buf, periods[i], _t("frequency")); Frequency curFreq = freq.getFrequency(periods[i]); buf.append(DataHelper.formatDuration2(Math.round(curFreq.getAverageInterval()))); buf.append("; "); - buf.append(_("Rolling average events per period")); + buf.append(_t("Rolling average events per period")); buf.append(": "); buf.append(num(curFreq.getAverageEventsPerPeriod())); buf.append("; "); - buf.append(_("Highest events per period")); + buf.append(_t("Highest events per period")); buf.append(": "); buf.append(num(curFreq.getMaxAverageEventsPerPeriod())); buf.append("; "); @@ -132,12 +132,12 @@ public class StatsGenerator { //} //buf.append(" avg interval between updates: (").append(num(curFreq.getAverageInterval())).append("ms, min "); //buf.append(num(curFreq.getMinAverageInterval())).append("ms)"); - buf.append(_("Lifetime average events per period")).append(": "); + buf.append(_t("Lifetime average events per period")).append(": "); buf.append(num(curFreq.getStrictAverageEventsPerPeriod())); buf.append("
                • \n"); } // Display the strict average - buf.append("
                • ").append(_("Lifetime average frequency")).append(": "); + buf.append("
                • ").append(_t("Lifetime average frequency")).append(": "); buf.append(DataHelper.formatDuration2(freq.getFrequency())); buf.append(" ("); buf.append(ngettext("1 event", "{0} events", (int) freq.getEventCount())); @@ -153,7 +153,7 @@ public class StatsGenerator { buf.append("
                  "); } if (rate.getLifetimeEventCount() <= 0) { - buf.append(_("No lifetime events")).append("
                  \n"); + buf.append(_t("No lifetime events")).append("
                  \n"); return; } long now = _context.clock().now(); @@ -165,12 +165,12 @@ public class StatsGenerator { if (curRate.getLastCoalesceDate() <= curRate.getCreationDate()) break; buf.append("
                • "); - renderPeriod(buf, periods[i], _("rate")); + renderPeriod(buf, periods[i], _t("rate")); if (curRate.getLastEventCount() > 0) { - buf.append(_("Average")).append(": "); + buf.append(_t("Average")).append(": "); buf.append(num(curRate.getAverageValue())); buf.append("; "); - buf.append(_("Highest average")); + buf.append(_t("Highest average")); buf.append(": "); buf.append(num(curRate.getExtremeAverageValue())); buf.append("; "); @@ -199,16 +199,16 @@ public class StatsGenerator { buf.append(ngettext("There was 1 event in this period.", "There were {0} events in this period.", (int)curRate.getLastEventCount())); buf.append(' '); - buf.append(_("The period ended {0} ago.", DataHelper.formatDuration2(now - curRate.getLastCoalesceDate()))); + buf.append(_t("The period ended {0} ago.", DataHelper.formatDuration2(now - curRate.getLastCoalesceDate()))); } else { - buf.append(" ").append(_("No events")).append(" "); + buf.append(" ").append(_t("No events")).append(" "); } long numPeriods = curRate.getLifetimePeriods(); if (numPeriods > 0) { double avgFrequency = curRate.getLifetimeEventCount() / (double)numPeriods; - buf.append(" (").append(_("Average event count")).append(": "); + buf.append(" (").append(_t("Average event count")).append(": "); buf.append(num(avgFrequency)); - buf.append("; ").append(_("Events in peak period")).append(": "); + buf.append("; ").append(_t("Events in peak period")).append(": "); // This isn't really the highest event count, but the event count during the period with the highest total value. buf.append(curRate.getExtremeEventCount()); buf.append(")"); @@ -216,19 +216,19 @@ public class StatsGenerator { if (curRate.getSummaryListener() != null) { buf.append(" ").append(_("Graph Data")).append(" - "); + buf.append("\">").append(_t("Graph Data")).append(" - "); buf.append(" ").append(_("Graph Event Count")).append(""); + buf.append("&showEvents=true\">").append(_t("Graph Event Count")).append(""); // This can really blow up your browser if you click on it //buf.append(" - ").append(_("Export Data as XML")).append(""); + //buf.append("&format=xml\">").append(_t("Export Data as XML")).append(""); } buf.append("
                • \n"); } // Display the strict average - buf.append("
                • ").append(_("Lifetime average value")).append(": "); + buf.append("
                • ").append(_t("Lifetime average value")).append(": "); buf.append(num(rate.getLifetimeAverageValue())); buf.append(" ("); buf.append(ngettext("1 event", "{0} events", (int) rate.getLifetimeEventCount())); @@ -258,19 +258,19 @@ public class StatsGenerator { */ private class AlphaComparator implements Comparator { public int compare(String lhs, String rhs) { - String lname = _(lhs); - String rname = _(rhs); + String lname = _t(lhs); + String rname = _t(rhs); return Collator.getInstance().compare(lname, rname); } } /** translate a string */ - private String _(String s) { + private String _t(String s) { return Messages.getString(s, _context); } /** translate a string */ - private String _(String s, Object o) { + private String _t(String s, Object o) { return Messages.getString(s, o, _context); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index 1dd724e95..002f7983b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -3,15 +3,22 @@ package net.i2p.router.web; import java.io.File; import java.io.IOException; import java.io.Writer; +import java.text.DateFormat; import java.util.Collections; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.TimeZone; +import net.i2p.app.ClientAppManager; import net.i2p.crypto.SigType; import net.i2p.data.DataHelper; import net.i2p.router.RouterContext; +import net.i2p.router.news.NewsEntry; +import net.i2p.router.news.NewsManager; import net.i2p.util.PortMapper; +import net.i2p.util.SystemVersion; /** * Refactored from summarynoframe.jsp to save ~100KB @@ -118,9 +125,9 @@ public class SummaryBarRenderer { public String renderHelpAndFAQHTML() { StringBuilder buf = new StringBuilder(512); buf.append("

                  ") - .append(_("Help & FAQ")) + .append(_t("Help & FAQ")) .append("

                  "); return buf.toString(); } @@ -128,23 +135,23 @@ public class SummaryBarRenderer { public String renderI2PServicesHTML() { StringBuilder buf = new StringBuilder(512); buf.append("

                  ") - .append(_("I2P Services")) + .append(_t("I2P Services")) .append("

                  \n" + "
              ").append(_("Peer")).append("").append(_("Caps")).append("").append(_("Integ. Value")).append("").append(_("Last Heard About")).append("").append(_("Last Heard From")).append("").append(_("Last Good Send")).append("").append(_("Last Bad Send")).append("").append(_("10m Resp. Time")).append("").append(_("1h Resp. Time")).append("").append(_("1d Resp. Time")).append("").append(_("Last Good Lookup")).append("").append(_("Last Bad Lookup")).append("").append(_("Last Good Store")).append("").append(_("Last Bad Store")).append("").append(_("1h Fail Rate")).append("").append(_("1d Fail Rate")).append("").append(_t("Peer")).append("").append(_t("Caps")).append("").append(_t("Integ. Value")).append("").append(_t("Last Heard About")).append("").append(_t("Last Heard From")).append("").append(_t("Last Good Send")).append("").append(_t("Last Bad Send")).append("").append(_t("10m Resp. Time")).append("").append(_t("1h Resp. Time")).append("").append(_t("1d Resp. Time")).append("").append(_t("Last Good Lookup")).append("").append(_t("Last Bad Lookup")).append("").append(_t("Last Good Store")).append("").append(_t("Last Bad Store")).append("").append(_t("1h Fail Rate")).append("").append(_t("1d Fail Rate")).append("
              ").append(davg(dbh, 24*60*60*1000l, ra)).append("").append(_(NA)); + buf.append("").append(_t(NA)); } buf.append("
              " + "") - .append(nbsp(_("Email"))) + .append(nbsp(_t("Email"))) .append("\n" + "") - .append(nbsp(_("Torrents"))) + .append(nbsp(_t("Torrents"))) .append("\n" + "") - .append(nbsp(_("Website"))) + .append(nbsp(_t("Website"))) .append("\n") .append(NavHelper.getClientAppLinks(_context)) @@ -166,73 +173,73 @@ public class SummaryBarRenderer { public String renderI2PInternalsHTML() { StringBuilder buf = new StringBuilder(512); buf.append("

              ") - .append(_("I2P Internals")) + .append(_t("I2P Internals")) .append("


              \n" + "
              \n" + "") - .append(nbsp(_("Tunnels"))) + .append(nbsp(_t("Tunnels"))) .append("\n" + "") - .append(nbsp(_("Peers"))) + .append(nbsp(_t("Peers"))) .append("\n" + "") - .append(nbsp(_("Profiles"))) + .append(nbsp(_t("Profiles"))) .append("\n" + "") - .append(nbsp(_("NetDB"))) + .append(nbsp(_t("NetDB"))) .append("\n" + "") - .append(nbsp(_("Logs"))) + .append(nbsp(_t("Logs"))) .append("\n"); // "") - // .append(_("Jobs")) + // .append(_t("Jobs")) // .append("\n" + if (!StatSummarizer.isDisabled()) { buf.append("") - .append(nbsp(_("Graphs"))) + .append(nbsp(_t("Graphs"))) .append("\n"); } buf.append("") - .append(nbsp(_("Stats"))) + .append(nbsp(_t("Stats"))) .append("\n" + "") - .append(nbsp(_("Addressbook"))) + .append(nbsp(_t("Addressbook"))) .append("\n" + "") - .append(nbsp(_("Hidden Services Manager"))) + .append(nbsp(_t("Hidden Services Manager"))) .append("\n"); if (_context.getBooleanProperty(HelperBase.PROP_ADVANCED)) @@ -248,44 +255,44 @@ public class SummaryBarRenderer { if (_helper == null) return ""; StringBuilder buf = new StringBuilder(512); buf.append("

              ") - .append(_("General")) + .append(_t("General")) .append("


              \n" + "" + "" + "\n" + "" + "" + "\n" + "" + "" + ""); if (sessionObject.folder.getPages() > 1 && i > 30) { @@ -2270,27 +2270,27 @@ public class WebMail extends HttpServlet out.println("\n"); } out.println( "
              ") - .append(_("Local Identity")) + .append(_t("Local Identity")) .append(":" + "") - .append(_("show")) + .append(_t("show")) .append("
              ") - .append(_("Version")) + .append(_t("Version")) .append(":") .append(_helper.getVersion()) .append("
              ") - .append(_("Uptime")) + .append(_t("Uptime")) .append(":") .append(_helper.getUptime()) @@ -298,20 +305,20 @@ public class SummaryBarRenderer { StringBuilder buf = new StringBuilder(512); buf.append("" + "" + "" + "\n" + "" + "" + "\n
              ") - .append(_("Version")) + .append(_t("Version")) .append(":") .append(_helper.getVersion()) .append("
              ") - .append(_("Uptime")) + .append(_t("Uptime")) .append(":") .append(_helper.getUptime()) @@ -323,9 +330,9 @@ public class SummaryBarRenderer { if (_helper == null) return ""; StringBuilder buf = new StringBuilder(512); buf.append("

              ") - .append(_("Network")) + .append(_t("Network")) .append(": ") .append(_helper.getReachability()) .append("

              \n"); @@ -334,11 +341,18 @@ public class SummaryBarRenderer { if ("ru".equals(Messages.getLanguage(_context))) buf.append("-ru"); buf.append("\" target=\"_top\" title=\"") - .append(_("See more information on the wiki")) + .append(_t("See more information on the wiki")) .append("\">") - .append(_("Warning: ECDSA is not available. Update your Java or OS")) + .append(_t("Warning: ECDSA is not available. Update your Java or OS")) .append("\n"); } + if (!SystemVersion.isJava7()) { + buf.append("

              ") + .append(_t("Warning: Java version {0} is no longer supported by I2P.", System.getProperty("java.version"))) + .append(' ') + .append(_t("Update Java to version {0} or higher to receive I2P updates.", "7")) + .append("

              \n"); + } return buf.toString(); } @@ -348,9 +362,9 @@ public class SummaryBarRenderer { if ("".equals(updateStatus)) return ""; StringBuilder buf = new StringBuilder(512); buf.append("

              ") - .append(_("I2P Update")) + .append(_t("I2P Update")) .append("


              \n"); buf.append(updateStatus); return buf.toString(); @@ -367,18 +381,18 @@ public class SummaryBarRenderer { if (_helper == null) return ""; StringBuilder buf = new StringBuilder(512); buf.append("

              ") - .append(_("Peers")) + .append(_t("Peers")) .append("


              \n" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + @@ -437,9 +451,9 @@ public class SummaryBarRenderer { if (_helper == null) return ""; StringBuilder buf = new StringBuilder(512); buf.append("

              ") - .append(_("Bandwidth in/out")) + .append(_t("Bandwidth in/out")) .append("


              " + "
              ") - .append(_("Active")) + .append(_t("Active")) .append(":"); int active = _helper.getActivePeers(); buf.append(active) @@ -387,37 +401,37 @@ public class SummaryBarRenderer { .append("
              ") - .append(_("Fast")) + .append(_t("Fast")) .append(":") .append(_helper.getFastPeers()) .append("
              ") - .append(_("High capacity")) + .append(_t("High capacity")) .append(":") .append(_helper.getHighCapacityPeers()) .append("
              ") - .append(_("Integrated")) + .append(_t("Integrated")) .append(":") .append(_helper.getWellIntegratedPeers()) .append("
              ") - .append(_("Known")) + .append(_t("Known")) .append(":") .append(_helper.getAllPeers()) .append("
              \n" + @@ -459,14 +473,14 @@ public class SummaryBarRenderer { if (_context.router().getUptime() > 2*60*1000) { buf.append("\n"); } buf.append("
              ") - .append(_("Total")) + .append(_t("Total")) .append(":") .append(_helper.getLifetimeKBps()) .append("Bps
              ") - .append(_("Used")) + .append(_t("Used")) .append(":") .append(_helper.getInboundTransferred()) .append(SummaryHelper.THINSP) @@ -481,44 +495,44 @@ public class SummaryBarRenderer { if (_helper == null) return ""; StringBuilder buf = new StringBuilder(512); buf.append("

              ") - .append(_("Tunnels")) + .append(_t("Tunnels")) .append("


              " + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + "" + "\n" + @@ -531,46 +545,46 @@ public class SummaryBarRenderer { if (_helper == null) return ""; StringBuilder buf = new StringBuilder(512); buf.append("

              ") - .append(_("Congestion")) + .append(_t("Congestion")) .append("


              " + "
              ") - .append(_("Exploratory")) + .append(_t("Exploratory")) .append(":") .append(_helper.getInboundTunnels() + _helper.getOutboundTunnels()) .append("
              ") - .append(_("Client")) + .append(_t("Client")) .append(":") .append(_helper.getInboundClientTunnels() + _helper.getOutboundClientTunnels()) .append("
              ") - .append(_("Participating")) + .append(_t("Participating")) .append(":") .append(_helper.getParticipatingTunnels()) .append("
              ") - .append(_("Share ratio")) + .append(_t("Share ratio")) .append(":") .append(_helper.getShareRatio()) .append("
              \n" + "" + "\n" + "" + "\n"); if (!_context.getBooleanPropertyDefaultTrue("router.disableTunnelTesting")) { buf.append("" + "\n"); } buf.append("" + "\n" + @@ -583,7 +597,7 @@ public class SummaryBarRenderer { if (_helper == null) return ""; StringBuilder buf = new StringBuilder(50); buf.append("

              ") - .append(_(_helper.getTunnelStatus())) + .append(_t(_helper.getTunnelStatus())) .append("

              \n"); return buf.toString(); } @@ -604,52 +618,48 @@ public class SummaryBarRenderer { String consoleNonce = CSSHelper.getNonce(); if (consoleNonce != null) { // Set up title and pre-headings stuff. - buf.append("

              ") - .append(_("News & Updates")) + //buf.append("

              ") + buf.append("

              ") + .append(_t("News & Updates")) .append("


              \n"); // Get news content. - String newsContent = newshelper.getContent(); - if (newsContent != "") { + List entries = Collections.emptyList(); + ClientAppManager cmgr = _context.clientAppManager(); + if (cmgr != null) { + NewsManager nmgr = (NewsManager) cmgr.getRegisteredApp(NewsManager.APP_NAME); + if (nmgr != null) + entries = nmgr.getEntries(); + } + if (!entries.isEmpty()) { buf.append("
                \n"); - // Parse news content for headings. - boolean foundEntry = false; - int start = newsContent.indexOf("

                "); - while (start >= 0) { - // Add offset to start: - // 4 - gets rid of

                - // 16 - gets rid of the date as well (assuming form "

                yyyy-mm-dd: Foobarbaz...") - // Don't truncate the "congratulations" in initial news - if (newsContent.length() > start + 16 && - newsContent.substring(start + 4, start + 6).equals("20") && - newsContent.substring(start + 14, start + 16).equals(": ")) - newsContent = newsContent.substring(start+16, newsContent.length()); - else - newsContent = newsContent.substring(start+4, newsContent.length()); - int end = newsContent.indexOf("

                "); - if (end >= 0) { - String heading = newsContent.substring(0, end); - buf.append("
              • ") - .append(heading) - .append("
              • \n"); - foundEntry = true; + DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT); + // the router sets the JVM time zone to UTC but saves the original here so we can get it + String systemTimeZone = _context.getProperty("i2p.systemTimeZone"); + if (systemTimeZone != null) + fmt.setTimeZone(TimeZone.getTimeZone(systemTimeZone)); + int i = 0; + final int max = 2; + for (NewsEntry entry : entries) { + buf.append("
              • "); + if (entry.updated > 0) { + Date date = new Date(entry.updated); + buf.append(fmt.format(date)) + .append(": "); } - start = newsContent.indexOf("

                "); + buf.append(entry.title) + .append("

              • \n"); + if (++i >= max) + break; } buf.append("
              \n"); - // Set up string containing to show news. - String requestURI = _helper.getRequestURI(); - if (requestURI.contains("/home") && !foundEntry) { - buf.append("") - .append(_("Show news")) - .append("\n"); - } + //buf.append("") + // .append(_t("Show all news")) + // .append("\n"); } else { buf.append("
              ") - .append(_("none")) + .append(_t("none")) .append("
              "); } // Add post-headings stuff. @@ -659,10 +669,15 @@ public class SummaryBarRenderer { } /** translate a string */ - private String _(String s) { + private String _t(String s) { return Messages.getString(s, _context); } + /** @since 0.9.23 */ + private String _t(String s, Object o) { + return Messages.getString(s, o, _context); + } + /** * Where the translation is to two words or more, * prevent splitting across lines diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java index 1cd207e45..7e97d9573 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java @@ -114,7 +114,7 @@ public class SummaryHelper extends HelperBase { long diff = Math.abs(ms); if (diff < 3000) return ""; - return " (" + DataHelper.formatDuration2(diff) + " " + _("skew") + ")"; + return " (" + DataHelper.formatDuration2(diff) + " " + _t("skew") + ")"; } **/ @@ -140,19 +140,19 @@ public class SummaryHelper extends HelperBase { return "VM Comm System"; if (_context.router().getUptime() > 60*1000 && (!_context.router().gracefulShutdownInProgress()) && !_context.clientManager().isAlive()) - return _("ERR-Client Manager I2CP Error - check logs"); // not a router problem but the user should know + return _t("ERR-Client Manager I2CP Error - check logs"); // not a router problem but the user should know // Warn based on actual skew from peers, not update status, so if we successfully offset // the clock, we don't complain. //if (!_context.clock().getUpdatedSuccessfully()) long skew = _context.commSystem().getFramedAveragePeerClockSkew(33); // Display the actual skew, not the offset if (Math.abs(skew) > 30*1000) - return _("ERR-Clock Skew of {0}", DataHelper.formatDuration2(Math.abs(skew))); + return _t("ERR-Clock Skew of {0}", DataHelper.formatDuration2(Math.abs(skew))); if (_context.router().isHidden()) - return _("Hidden"); + return _t("Hidden"); RouterInfo routerInfo = _context.router().getRouterInfo(); if (routerInfo == null) - return _("Testing"); + return _t("Testing"); Status status = _context.commSystem().getStatus(); switch (status) { @@ -164,37 +164,37 @@ public class SummaryHelper extends HelperBase { case IPV4_SNAT_IPV6_OK: RouterAddress ra = routerInfo.getTargetAddress("NTCP"); if (ra == null) - return _(status.toStatusString()); + return _t(status.toStatusString()); byte[] ip = ra.getIP(); if (ip == null) - return _("ERR-Unresolved TCP Address"); + return _t("ERR-Unresolved TCP Address"); // TODO set IPv6 arg based on configuration? if (TransportUtil.isPubliclyRoutable(ip, true)) - return _(status.toStatusString()); - return _("ERR-Private TCP Address"); + return _t(status.toStatusString()); + return _t("ERR-Private TCP Address"); case IPV4_SNAT_IPV6_UNKNOWN: case DIFFERENT: - return _("ERR-SymmetricNAT"); + return _t("ERR-SymmetricNAT"); case REJECT_UNSOLICITED: case IPV4_DISABLED_IPV6_FIREWALLED: if (routerInfo.getTargetAddress("NTCP") != null) - return _("WARN-Firewalled with Inbound TCP Enabled"); + return _t("WARN-Firewalled with Inbound TCP Enabled"); // fall through... case IPV4_FIREWALLED_IPV6_OK: case IPV4_FIREWALLED_IPV6_UNKNOWN: if (((FloodfillNetworkDatabaseFacade)_context.netDb()).floodfillEnabled()) - return _("WARN-Firewalled and Floodfill"); + return _t("WARN-Firewalled and Floodfill"); //if (_context.router().getRouterInfo().getCapabilities().indexOf('O') >= 0) - // return _("WARN-Firewalled and Fast"); - return _(status.toStatusString()); + // return _t("WARN-Firewalled and Fast"); + return _t(status.toStatusString()); case DISCONNECTED: - return _("Disconnected - check network cable"); + return _t("Disconnected - check network cable"); case HOSED: - return _("ERR-UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart"); + return _t("ERR-UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart"); case UNKNOWN: case IPV4_UNKNOWN_IPV6_FIREWALLED: @@ -203,14 +203,14 @@ public class SummaryHelper extends HelperBase { ra = routerInfo.getTargetAddress("SSU"); if (ra == null && _context.router().getUptime() > 5*60*1000) { if (getActivePeers() <= 0) - return _("ERR-No Active Peers, Check Network Connection and Firewall"); + return _t("ERR-No Active Peers, Check Network Connection and Firewall"); else if (_context.getProperty(ConfigNetHelper.PROP_I2NP_NTCP_HOSTNAME) == null || _context.getProperty(ConfigNetHelper.PROP_I2NP_NTCP_PORT) == null) - return _("ERR-UDP Disabled and Inbound TCP host/port not set"); + return _t("ERR-UDP Disabled and Inbound TCP host/port not set"); else - return _("WARN-Firewalled with UDP Disabled"); + return _t("WARN-Firewalled with UDP Disabled"); } - return _(status.toStatusString()); + return _t(status.toStatusString()); } } @@ -434,8 +434,8 @@ public class SummaryHelper extends HelperBase { StringBuilder buf = new StringBuilder(512); buf.append("

              ").append(_("Local Tunnels")) + .append(_t("Add/remove/edit & control your client and server tunnels")) + .append("\">").append(_t("Local Tunnels")) .append("


              "); if (!clients.isEmpty()) { Collections.sort(clients, new AlphaComparator()); @@ -447,11 +447,11 @@ public class SummaryHelper extends HelperBase { buf.append("

              \n"); + buf.append("\n"); } else { // green light - buf.append("\n"); + buf.append("\n"); } } else { // yellow light - buf.append("\n"); + buf.append("\n"); } } buf.append("
              ") - .append(_("Job lag")) + .append(_t("Job lag")) .append(":") .append(_helper.getJobLag()) .append("
              ") - .append(_("Message delay")) + .append(_t("Message delay")) .append(":") .append(_helper.getMessageDelay()) .append("
              ") - .append(_("Tunnel lag")) + .append(_t("Tunnel lag")) .append(":") .append(_helper.getTunnelLag()) .append("
              ") - .append(_("Backlog")) + .append(_t("Backlog")) .append(":") .append(_helper.getInboundBacklog()) .append("
              \"Server\""); + buf.append("server.png\" alt=\"Server\" title=\"").append(_t("Hidden Service")).append("\">"); else - buf.append("client.png\" alt=\"Client\" title=\"").append(_("Client")).append("\">"); + buf.append("client.png\" alt=\"Client\" title=\"").append(_t("Client")).append("\">"); buf.append(""); + buf.append("\" target=\"_top\" title=\"").append(_t("Show tunnels")).append("\">"); if (name.length() <= 20) buf.append(DataHelper.escapeHTML(name)); else @@ -462,20 +462,20 @@ public class SummaryHelper extends HelperBase { long timeToExpire = ls.getEarliestLeaseDate() - _context.clock().now(); if (timeToExpire < 0) { // red or yellow light - buf.append("\"").append(_("Rebuilding")).append("…\"
              \"").append(_t("Rebuilding")).append("…\"
              \"Ready\"
              \"Ready\"
              \"").append(_("Building")).append("…\"
              \"").append(_t("Building")).append("…\"
              "); } else { - buf.append("
              ").append(_("none")).append("
              "); + buf.append("
              ").append(_t("none")).append("
              "); } buf.append("\n"); return buf.toString(); @@ -486,7 +486,7 @@ public class SummaryHelper extends HelperBase { * Inner class, can't be Serializable */ private class AlphaComparator implements Comparator { - private final String xsc = _("shared clients"); + private final String xsc = _t("shared clients"); public int compare(Destination lhs, Destination rhs) { String lname = getName(lhs); @@ -511,9 +511,9 @@ public class SummaryHelper extends HelperBase { if (name == null) name = d.calculateHash().toBase64().substring(0,6); else - name = _(name); + name = _t(name); } else { - name = _(name); + name = _t(name); } return name; } @@ -712,18 +712,20 @@ public class SummaryHelper extends HelperBase { buf.append("
              "); else needSpace = true; - buf.append("

              ").append(_("Update downloaded")).append("
              "); + buf.append("

              ").append(_t("Update downloaded")).append("
              "); if (_context.hasWrapper()) - buf.append(_("Click Restart to install")); + buf.append(_t("Click Restart to install")); else - buf.append(_("Click Shutdown and restart to install")); - buf.append(' ').append(_("Version {0}", DataHelper.escapeHTML(dver))); + buf.append(_t("Click Shutdown and restart to install")); + buf.append(' ').append(_t("Version {0}", DataHelper.escapeHTML(dver))); buf.append("

              "); } boolean avail = updateAvailable(); boolean unsignedAvail = unsignedUpdateAvailable(); boolean devSU3Avail = devSU3UpdateAvailable(); String constraint = avail ? NewsHelper.updateConstraint() : null; + String unsignedConstraint = unsignedAvail ? NewsHelper.unsignedUpdateConstraint() : null; + String devSU3Constraint = devSU3Avail ? NewsHelper.devSU3UpdateConstraint() : null; if (avail && constraint != null && !NewsHelper.isUpdateInProgress() && !_context.router().gracefulShutdownInProgress()) { @@ -731,11 +733,35 @@ public class SummaryHelper extends HelperBase { buf.append("
              "); else needSpace = true; - buf.append("

              ").append(_("Update available")).append(":
              "); - buf.append(_("Version {0}", getUpdateVersion())).append("
              "); + buf.append("

              ").append(_t("Update available")).append(":
              "); + buf.append(_t("Version {0}", getUpdateVersion())).append("
              "); buf.append(constraint).append("

              "); avail = false; } + if (unsignedAvail && unsignedConstraint != null && + !NewsHelper.isUpdateInProgress() && + !_context.router().gracefulShutdownInProgress()) { + if (needSpace) + buf.append("
              "); + else + needSpace = true; + buf.append("

              ").append(_t("Update available")).append(":
              "); + buf.append(_t("Version {0}", getUnsignedUpdateVersion())).append("
              "); + buf.append(unsignedConstraint).append("

              "); + unsignedAvail = false; + } + if (devSU3Avail && devSU3Constraint != null && + !NewsHelper.isUpdateInProgress() && + !_context.router().gracefulShutdownInProgress()) { + if (needSpace) + buf.append("
              "); + else + needSpace = true; + buf.append("

              ").append(_t("Update available")).append(":
              "); + buf.append(_t("Version {0}", getDevSU3UpdateVersion())).append("
              "); + buf.append(devSU3Constraint).append("

              "); + devSU3Avail = false; + } if ((avail || unsignedAvail || devSU3Avail) && !NewsHelper.isUpdateInProgress() && !_context.router().gracefulShutdownInProgress() && @@ -755,7 +781,7 @@ public class SummaryHelper extends HelperBase { if (avail) { buf.append("
              \n"); } if (devSU3Avail) { @@ -763,7 +789,7 @@ public class SummaryHelper extends HelperBase { // Note to translators: parameter is a router version, e.g. "0.9.19-16" //
              is optional, to help the browser make the lines even in the button // If the translation is shorter than the English, you should probably not include
              - .append(_("Download Signed
              Development Update
              {0}", getDevSU3UpdateVersion())) + .append(_t("Download Signed
              Development Update
              {0}", getDevSU3UpdateVersion())) .append("
              \n"); } if (unsignedAvail) { @@ -771,7 +797,7 @@ public class SummaryHelper extends HelperBase { // Note to translators: parameter is a date and time, e.g. "02-Mar 20:34 UTC" //
              is optional, to help the browser make the lines even in the button // If the translation is shorter than the English, you should probably not include
              - .append(_("Download Unsigned
              Update {0}", getUnsignedUpdateVersion())) + .append(_t("Download Unsigned
              Update {0}", getUnsignedUpdateVersion())) .append("
              \n"); } buf.append("\n"); @@ -795,9 +821,9 @@ public class SummaryHelper extends HelperBase { StringBuilder buf = new StringBuilder(256); if (showFirewallWarning()) { buf.append("

              ") - .append(_("Check network connection and NAT/firewall")) + .append(_t("Check network connection and NAT/firewall")) .append("

              "); } @@ -816,7 +842,7 @@ public class SummaryHelper extends HelperBase { String uri = getRequestURI(); buf.append("

              \n"); buf.append("\n"); - buf.append("

              \n"); + buf.append("

              \n"); } } // If a new reseed ain't running, and the last reseed had errors, show error message @@ -901,18 +927,18 @@ public class SummaryHelper extends HelperBase { StringBuilder buf = new StringBuilder(2048); buf.append("\n"); for (String section : sections) { int i = sections.indexOf(section); buf.append("\n"); } buf.append("" + "") .append("
              ") - .append(_("Remove")) + .append(_t("Remove")) .append("") - .append(_("Name")) + .append(_t("Name")) .append("") - .append(_("Order")) + .append(_t("Order")) .append("
              ") - .append(_(sectionNames.get(section))) + .append(_t(sectionNames.get(section))) .append("\"")"); buf.append(""); } buf.append(""); @@ -945,34 +971,34 @@ public class SummaryHelper extends HelperBase { buf.append(""); buf.append(""); } buf.append("
              " + "") - .append(_("Add")).append(": " + + .append(_t("Add")).append(": " + "" + "
              \n"); return buf.toString(); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryRenderer.java index 06d6e9af5..d97d185a8 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryRenderer.java @@ -139,9 +139,9 @@ class SummaryRenderer { else p = DataHelper.formatDuration2(period).replace(" ", " "); if (showEvents) - title = name + ' ' + _("events in {0}", p); + title = name + ' ' + _t("events in {0}", p); else - title = name + ' ' + _("averaged for {0}", p); + title = name + ' ' + _t("averaged for {0}", p); def.setTitle(title); } String path = _listener.getData().getPath(); @@ -151,7 +151,7 @@ class SummaryRenderer { if (showEvents) { // include the average event count on the plot plotName = dsNames[1]; - descr = _("Events per period"); + descr = _t("Events per period"); } else { // include the average value plotName = dsNames[0]; @@ -159,12 +159,12 @@ class SummaryRenderer { // (there are over 500 of them) // but the descriptions for the default graphs are tagged in // Strings.java - descr = _(_listener.getRate().getRateStat().getDescription()); + descr = _t(_listener.getRate().getRateStat().getDescription()); } //long started = ((RouterContext)_context).router().getWhenStarted(); //if (started > start && started < end) - // def.vrule(started / 1000, RESTART_BAR_COLOR, _("Restart"), 4.0f); + // def.vrule(started / 1000, RESTART_BAR_COLOR, _t("Restart"), 4.0f); def.datasource(plotName, path, plotName, SummaryListener.CF, _listener.getBackendName()); if (descr.length() > 0) { @@ -173,22 +173,22 @@ class SummaryRenderer { def.area(plotName, Color.BLUE); } if (!hideLegend) { - def.gprint(plotName, SummaryListener.CF, _("avg") + ": %.2f %s"); - def.gprint(plotName, "MAX", ' ' + _("max") + ": %.2f %S"); - def.gprint(plotName, "LAST", ' ' + _("now") + ": %.2f %S\\r"); + def.gprint(plotName, SummaryListener.CF, _t("avg") + ": %.2f %s"); + def.gprint(plotName, "MAX", ' ' + _t("max") + ": %.2f %S"); + def.gprint(plotName, "LAST", ' ' + _t("now") + ": %.2f %S\\r"); } String plotName2 = null; if (lsnr2 != null) { String dsNames2[] = lsnr2.getData().getDsNames(); plotName2 = dsNames2[0]; String path2 = lsnr2.getData().getPath(); - String descr2 = _(lsnr2.getRate().getRateStat().getDescription()); + String descr2 = _t(lsnr2.getRate().getRateStat().getDescription()); def.datasource(plotName2, path2, plotName2, SummaryListener.CF, lsnr2.getBackendName()); def.line(plotName2, Color.RED, descr2 + "\\r", 3); if (!hideLegend) { - def.gprint(plotName2, SummaryListener.CF, _("avg") + ": %.2f %s"); - def.gprint(plotName2, "MAX", ' ' + _("max") + ": %.2f %S"); - def.gprint(plotName2, "LAST", ' ' + _("now") + ": %.2f %S\\r"); + def.gprint(plotName2, SummaryListener.CF, _t("avg") + ": %.2f %s"); + def.gprint(plotName2, "MAX", ' ' + _t("max") + ": %.2f %S"); + def.gprint(plotName2, "LAST", ' ' + _t("now") + ": %.2f %S\\r"); } } if (!hideLegend) { @@ -198,7 +198,7 @@ class SummaryRenderer { for (Map.Entry event : events.entrySet()) { long started = event.getKey().longValue(); if (started > start && started < end) { - String legend = _("Restart") + ' ' + sdf.format(new Date(started)) + " UTC " + event.getValue() + "\\r"; + String legend = _t("Restart") + ' ' + sdf.format(new Date(started)) + " UTC " + event.getValue() + "\\r"; def.vrule(started / 1000, RESTART_BAR_COLOR, legend, 4.0f); } } @@ -271,7 +271,7 @@ class SummaryRenderer { private static final boolean IS_WIN = SystemVersion.isWindows(); /** translate a string */ - private String _(String s) { + private String _t(String s) { // the RRD font doesn't have zh chars, at least on my system // Works on 1.5.9 except on windows if (IS_WIN && "zh".equals(Messages.getLanguage(_context))) @@ -282,7 +282,7 @@ class SummaryRenderer { /** * translate a string with a parameter */ - private String _(String s, String o) { + private String _t(String s, String o) { // the RRD font doesn't have zh chars, at least on my system // Works on 1.5.9 except on windows if (IS_WIN && "zh".equals(Messages.getLanguage(_context))) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java index 9fff49d1e..a761a5ac2 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/TunnelRenderer.java @@ -33,7 +33,7 @@ public class TunnelRenderer { } public void renderStatusHTML(Writer out) throws IOException { - out.write("

              " + _("Exploratory tunnels") + " (" + _("configure") + ")

              \n"); + out.write("

              " + _t("Exploratory tunnels") + " (" + _t("configure") + ")

              \n"); renderPool(out, _context.tunnelManager().getInboundExploratoryPool(), _context.tunnelManager().getOutboundExploratoryPool()); List destinations = null; @@ -57,20 +57,22 @@ public class TunnelRenderer { if (name == null) name = client.toBase64().substring(0,4); out.write("

              " + _("Client tunnels for") + ' ' + DataHelper.escapeHTML(_(name))); + + "\" >" + _t("Client tunnels for") + ' ' + DataHelper.escapeHTML(_t(name))); if (isLocal) - out.write(" (" + _("configure") + ")

              \n"); + out.write(" (" + _t("configure") + ")

              \n"); else - out.write(" (" + _("dead") + ")

              \n"); + out.write(" (" + _t("dead") + ")\n"); renderPool(out, in, outPool); } List participating = _context.tunnelDispatcher().listParticipatingTunnels(); - Collections.sort(participating, new TunnelComparator()); - out.write("

              " + _("Participating tunnels") + "

              \n"); - out.write("" - + "\n"); + out.write("

              " + _t("Participating tunnels") + "

              \n"); + if (!participating.isEmpty()) { + Collections.sort(participating, new TunnelComparator()); + out.write("
              " + _("Receive on") + "" + _("From") + "" - + _("Send on") + "" + _("To") + "" + _("Expiration") + "" + _("Usage") + "" + _("Rate") + "" + _("Role") + "
              " + + "\n"); + } long processed = 0; RateStat rs = _context.statManager().getRate("tunnel.participatingMessageCount"); if (rs != null) @@ -108,7 +110,7 @@ public class TunnelRenderer { if (timeLeft > 0) out.write(""); else - out.write(""); + out.write(""); out.write(""); int lifetime = (int) ((_context.clock().now() - cfg.getCreation()) / 1000); if (lifetime <= 0) @@ -118,18 +120,22 @@ public class TunnelRenderer { int bps = 1024 * cfg.getProcessedMessagesCount() / lifetime; out.write(""); if (cfg.getSendTo() == null) - out.write(""); + out.write(""); else if (cfg.getReceiveFrom() == null) - out.write(""); + out.write(""); else - out.write(""); + out.write(""); out.write("\n"); } - out.write("
              " + _t("Receive on") + "" + _t("From") + "" + + _t("Send on") + "" + _t("To") + "" + _t("Expiration") + "" + _t("Usage") + "" + _t("Rate") + "" + _t("Role") + "
              " + DataHelper.formatDuration2(timeLeft) + "(" + _("grace period") + ")(" + _t("grace period") + ")" + cfg.getProcessedMessagesCount() + " KB" + bps + " Bps" + _("Outbound Endpoint") + "" + _t("Outbound Endpoint") + "" + _("Inbound Gateway") + "" + _t("Inbound Gateway") + "" + _("Participant") + "" + _t("Participant") + "
              \n"); + if (!participating.isEmpty()) + out.write("
              \n"); if (displayed > DISPLAY_LIMIT) - out.write("
              " + _("Limited display to the {0} tunnels with the highest usage", DISPLAY_LIMIT) + "
              \n"); - out.write("
              " + _("Inactive participating tunnels") + ": " + inactive + "
              \n"); - out.write("
              " + _("Lifetime bandwidth usage") + ": " + DataHelper.formatSize2(processed*1024) + "B
              \n"); + out.write("
              " + _t("Limited display to the {0} tunnels with the highest usage", DISPLAY_LIMIT) + "
              \n"); + if (inactive > 0) + out.write("
              " + _t("Inactive participating tunnels") + ": " + inactive + "
              \n"); + else if (displayed <= 0) + out.write("
              " + _t("none") + "
              \n"); + out.write("
              " + _t("Lifetime bandwidth usage") + ": " + DataHelper.formatSize2(processed*1024) + "B
              \n"); //renderPeers(out); out.write(""); } @@ -159,16 +165,16 @@ public class TunnelRenderer { if (info.getLength() > maxLength) maxLength = info.getLength(); } - out.write(""); + out.write("
              " + _("In/Out") + "" + _("Expiry") + "" + _("Usage") + "" + _("Gateway") + "
              "); if (maxLength > 3) { out.write(""); + out.write("\">" + _t("Participants") + ""); } else if (maxLength == 3) { - out.write(""); + out.write(""); } if (maxLength > 1) { - out.write(""); + out.write(""); } out.write("\n"); for (int i = 0; i < tunnels.size(); i++) { @@ -206,24 +212,26 @@ public class TunnelRenderer { } out.write("
              " + _t("In/Out") + "" + _t("Expiry") + "" + _t("Usage") + "" + _t("Gateway") + "" + _("Participants") + "" + _("Participant") + "" + _t("Participant") + "" + _("Endpoint") + "" + _t("Endpoint") + "
              \n"); if (in != null) { - List pending = in.listPending(); + // PooledTunnelCreatorConfig + List pending = in.listPending(); if (!pending.isEmpty()) { - out.write("
              " + _("Build in progress") + ": " + pending.size() + " " + _("inbound") + "
              \n"); + out.write("
              " + _t("Build in progress") + ": " + pending.size() + " " + _t("inbound") + "
              \n"); live += pending.size(); } } if (outPool != null) { - List pending = outPool.listPending(); + // PooledTunnelCreatorConfig + List pending = outPool.listPending(); if (!pending.isEmpty()) { - out.write("
              " + _("Build in progress") + ": " + pending.size() + " " + _("outbound") + "
              \n"); + out.write("
              " + _t("Build in progress") + ": " + pending.size() + " " + _t("outbound") + "
              \n"); live += pending.size(); } } if (live <= 0) - out.write("
              " + _("No tunnels; waiting for the grace period to end.") + "
              \n"); - out.write("
              " + _("Lifetime bandwidth usage") + ": " + - DataHelper.formatSize2(processedIn*1024) + "B " + _("in") + ", " + - DataHelper.formatSize2(processedOut*1024) + "B " + _("out") + "
              "); + out.write("
              " + _t("No tunnels; waiting for the grace period to end.") + "
              \n"); + out.write("
              " + _t("Lifetime bandwidth usage") + ": " + + DataHelper.formatSize2(processedIn*1024) + "B " + _t("in") + ", " + + DataHelper.formatSize2(processedOut*1024) + "B " + _t("out") + "
              "); } /**** @@ -241,8 +249,8 @@ public class TunnelRenderer { List peerList = new ArrayList(peers); Collections.sort(peerList, new CountryComparator(this._context.commSystem())); - out.write("

              " + _("Tunnel Counts By Peer") + "

              \n"); - out.write("\n"); + out.write("

              " + _t("Tunnel Counts By Peer") + "

              \n"); + out.write("
              " + _("Peer") + "" + _("Our Tunnels") + "" + _("% of total") + "" + _("Participating Tunnels") + "" + _("% of total") + "
              \n"); for (Hash h : peerList) { out.write("
              " + _t("Peer") + "" + _t("Our Tunnels") + "" + _t("% of total") + "" + _t("Participating Tunnels") + "" + _t("% of total") + "
              "); out.write(netDbLink(h)); @@ -260,7 +268,7 @@ public class TunnelRenderer { out.write('0'); out.write('\n'); } - out.write("
              " + _("Totals") + " " + tunnelCount); + out.write("
              " + _t("Totals") + " " + tunnelCount); out.write("   " + partCount); out.write("  
              \n"); } @@ -343,12 +351,12 @@ public class TunnelRenderer { } /** translate a string */ - private String _(String s) { + private String _t(String s) { return Messages.getString(s, _context); } /** translate a string */ - public String _(String s, Object o) { + public String _t(String s, Object o) { return Messages.getString(s, o, _context); } } diff --git a/apps/routerconsole/java/strings/Strings.java b/apps/routerconsole/java/strings/Strings.java index 462938017..8254d657b 100644 --- a/apps/routerconsole/java/strings/Strings.java +++ b/apps/routerconsole/java/strings/Strings.java @@ -9,76 +9,76 @@ package dummy; class Dummy { void dummy { // wars for ConfigClientsHelper - _("addressbook"); - _("i2psnark"); - _("i2ptunnel"); - _("susimail"); - _("susidns"); - _("routerconsole"); + _t("addressbook"); + _t("i2psnark"); + _t("i2ptunnel"); + _t("susimail"); + _t("susidns"); + _t("routerconsole"); // clients, taken from clients.config, for ConfigClientsHelper // note that if the wording changes in clients.config, we have to // keep the old string here as well for existing installs - _("Web console"); - _("SAM application bridge"); - _("Application tunnels"); - _("My eepsite web server"); - _("I2P webserver (eepsite)"); - _("Browser launch at startup"); - _("BOB application bridge"); - _("I2P Router Console"); - _("Open Router Console in web browser at startup"); + _t("Web console"); + _t("SAM application bridge"); + _t("Application tunnels"); + _t("My eepsite web server"); + _t("I2P webserver (eepsite)"); + _t("Browser launch at startup"); + _t("BOB application bridge"); + _t("I2P Router Console"); + _t("Open Router Console in web browser at startup"); // tunnel nicknames, taken from i2ptunnel.config so they will display // nicely under 'local destinations' in the summary bar // note that if the wording changes in i2ptunnel.config, we have to // keep the old string here as well for existing installs - _("shared clients"); - _("shared clients (DSA)"); - _("IRC proxy"); - _("eepsite"); - _("I2P webserver"); - _("HTTP Proxy"); + _t("shared clients"); + _t("shared clients (DSA)"); + _t("IRC proxy"); + _t("eepsite"); + _t("I2P webserver"); + _t("HTTP Proxy"); // older names for pre-0.7.4 installs - _("eepProxy"); - _("ircProxy"); + _t("eepProxy"); + _t("ircProxy"); // hardcoded in i2psnark - _("I2PSnark"); + _t("I2PSnark"); // hardcoded in iMule? - _("iMule"); + _t("iMule"); // standard themes for ConfigUIHelper - _("classic"); - _("dark"); - _("light"); - _("midnight"); + _t("classic"); + _t("dark"); + _t("light"); + _t("midnight"); // stat groups for stats.jsp - _("Bandwidth"); - _("BandwidthLimiter"); - _("ClientMessages"); - _("Encryption"); - _("i2cp"); - _("I2PTunnel"); - _("InNetPool"); - _("JobQueue"); - _("NetworkDatabase"); - _("ntcp"); - _("Peers"); - _("Router"); - _("Stream"); - _("Throttle"); - _("Transport"); - _("Tunnels"); - _("udp"); + _t("Bandwidth"); + _t("BandwidthLimiter"); + _t("ClientMessages"); + _t("Encryption"); + _t("i2cp"); + _t("I2PTunnel"); + _t("InNetPool"); + _t("JobQueue"); + _t("NetworkDatabase"); + _t("ntcp"); + _t("Peers"); + _t("Router"); + _t("Stream"); + _t("Throttle"); + _t("Transport"); + _t("Tunnels"); + _t("udp"); // parameters in transport addresses (netdb.jsp) // may or may not be worth translating - _("host"); - _("key"); - _("port"); + _t("host"); + _t("key"); + _t("port"); // capabilities - _("caps"); + _t("caps"); } } diff --git a/apps/routerconsole/jsp/certs.jsp b/apps/routerconsole/jsp/certs.jsp new file mode 100644 index 000000000..3c4e59cf6 --- /dev/null +++ b/apps/routerconsole/jsp/certs.jsp @@ -0,0 +1,17 @@ +<%@page contentType="text/html"%> +<%@page trimDirectiveWhitespaces="true"%> +<%@page pageEncoding="UTF-8"%> + + +<%@include file="css.jsi" %> +<%=intl.title("Certificates")%> + +<%@include file="summaryajax.jsi" %> + +<%@include file="summary.jsi" %>

              <%=intl._t("Certificates")%>

              +
              + +" /> +<% certhelper.storeWriter(out); %> + +
              diff --git a/apps/routerconsole/jsp/config.jsp b/apps/routerconsole/jsp/config.jsp index 538fb8a5f..5e9c0de92 100644 --- a/apps/routerconsole/jsp/config.jsp +++ b/apps/routerconsole/jsp/config.jsp @@ -14,7 +14,7 @@ " /> -

              <%=intl._("I2P Bandwidth Configuration")%>

              +

              <%=intl._t("I2P Bandwidth Configuration")%>

              <%@include file="confignav.jsi" %> @@ -25,12 +25,12 @@ -

              <%=intl._("Bandwidth limiter")%>

              +

              <%=intl._t("Bandwidth limiter")%>

              - <%=intl._("I2P will work best if you configure your rates to match the speed of your internet connection.")%> + <%=intl._t("I2P will work best if you configure your rates to match the speed of your internet connection.")%>

              <% /******** *********/ %> - +
              " > - <%=intl._("KBps In")%> + <%=intl._t("KBps In")%> ()
              <%=intl._("Share")%> <%=intl._t("Share")%> ()

              <% int share = nethelper.getShareBandwidth(); if (share < 12) { out.print(""); - out.print(intl._("NOTE")); + out.print(intl._t("NOTE")); out.print(": "); - out.print(intl._("You have configured I2P to share only {0} KBps.", share)); + out.print(intl._t("You have configured I2P to share only {0} KBps.", share)); out.print("\n"); - out.print(intl._("I2P requires at least 12KBps to enable sharing. ")); - out.print(intl._("Please enable sharing (participating in tunnels) by configuring more bandwidth. ")); - out.print(intl._("It improves your anonymity by creating cover traffic, and helps the network.")); + out.print(intl._t("I2P requires at least 12KBps to enable sharing. ")); + out.print(intl._t("Please enable sharing (participating in tunnels) by configuring more bandwidth. ")); + out.print(intl._t("It improves your anonymity by creating cover traffic, and helps the network.")); } else { - out.print(intl._("You have configured I2P to share {0} KBps.", share)); + out.print(intl._t("You have configured I2P to share {0} KBps.", share)); out.print("\n"); - out.print(intl._("The higher the share bandwidth the more you improve your anonymity and help the network.")); + out.print(intl._t("The higher the share bandwidth the more you improve your anonymity and help the network.")); } %>

              -

              <%=intl._("Advanced network configuration page")%>


              +

              <%=intl._t("Advanced network configuration page")%>


              -" > -" > +" > +" >
              diff --git a/apps/routerconsole/jsp/configadvanced.jsp b/apps/routerconsole/jsp/configadvanced.jsp index 961ac83fa..3ba2deed1 100644 --- a/apps/routerconsole/jsp/configadvanced.jsp +++ b/apps/routerconsole/jsp/configadvanced.jsp @@ -15,7 +15,7 @@ " /> -

              <%=intl._("I2P Advanced Configuration")%>

              +

              <%=intl._t("I2P Advanced Configuration")%>

              <%@include file="confignav.jsi" %> @@ -24,14 +24,14 @@ <%@include file="formhandler.jsi" %>
              -

              <%=intl._("Floodfill Configuration")%>

              -

              <%=intl._("Floodill participation helps the network, but may use more of your computer's resources.")%> +

              <%=intl._t("Floodfill Configuration")%>

              +

              <%=intl._t("Floodill participation helps the network, but may use more of your computer's resources.")%>

              <% if (advancedhelper.isFloodfill()) { -%><%=intl._("This router is currently a floodfill participant.")%><% +%><%=intl._t("This router is currently a floodfill participant.")%><% } else { -%><%=intl._("This router is not currently a floodfill participant.")%><% +%><%=intl._t("This router is not currently a floodfill participant.")%><% } %>

              @@ -39,15 +39,15 @@ > -<%=intl._("Automatic")%>
              +<%=intl._t("Automatic")%>
              > -<%=intl._("Force On")%>
              +<%=intl._t("Force On")%>
              > -<%=intl._("Disable")%>
              +<%=intl._t("Disable")%>
              -" > +" >
              -

              <%=intl._("Advanced I2P Configuration")%>

              +

              <%=intl._t("Advanced I2P Configuration")%>

              <% if (advancedhelper.isAdvanced()) { %>
              @@ -56,11 +56,11 @@

              <% if (advancedhelper.isAdvanced()) { %>
              - " > - " > -
              <%=intl._("NOTE")%>: <%=intl._("Some changes may require a restart to take effect.")%> + " > + " > +
              <%=intl._t("NOTE")%>: <%=intl._t("Some changes may require a restart to take effect.")%>
              <% } else { %> -<%=intl._("To make changes, edit the file {0}.", "" + advancedhelper.getConfigFileName() + "")%> +<%=intl._t("To make changes, edit the file {0}.", "" + advancedhelper.getConfigFileName() + "")%> <% } // isAdvanced %>
              diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp index 65f67daf5..cbb9710d4 100644 --- a/apps/routerconsole/jsp/configclients.jsp +++ b/apps/routerconsole/jsp/configclients.jsp @@ -20,43 +20,43 @@ input.default { width: 1px; height: 1px; visibility: hidden; } " /> " /> -

              <%=intl._("I2P Client Configuration")%>

              +

              <%=intl._t("I2P Client Configuration")%>

              <%@include file="confignav.jsi" %> <%@include file="formhandler.jsi" %>
              -

              <%=intl._("Client Configuration")%>

              - <%=intl._("The Java clients listed below are started by the router and run in the same JVM.")%>
              - <%=intl._("Be careful changing any settings here. The 'router console' and 'application tunnels' are required for most uses of I2P. Only advanced users should change these.")%> +

              <%=intl._t("Client Configuration")%>

              + <%=intl._t("The Java clients listed below are started by the router and run in the same JVM.")%>
              + <%=intl._t("Be careful changing any settings here. The 'router console' and 'application tunnels' are required for most uses of I2P. Only advanced users should change these.")%>

              -

              <%=intl._("To change other client options, edit the file")%> +

              <%=intl._t("To change other client options, edit the file")%> <%=net.i2p.router.startup.ClientAppConfig.configFile(net.i2p.I2PAppContext.getGlobalContext()).getAbsolutePath()%>. - <%=intl._("All changes require restart to take effect.")%> + <%=intl._t("All changes require restart to take effect.")%>


              - " /> + " /> <% if (clientshelper.isClientChangeEnabled() && request.getParameter("edit") == null) { %> - " /> + " /> <% } %> - " /> + " />
              -

              <%=intl._("Advanced Client Interface Configuration")%>

              +

              <%=intl._t("Advanced Client Interface Configuration")%>

              -<%=intl._("External I2CP (I2P Client Protocol) Interface Configuration")%>
              +<%=intl._t("External I2CP (I2P Client Protocol) Interface Configuration")%>
              > -<%=intl._("Enabled without SSL")%>
              +<%=intl._t("Enabled without SSL")%>
              > -<%=intl._("Enabled with SSL required")%>
              +<%=intl._t("Enabled with SSL required")%>
              > -<%=intl._("Disabled - Clients outside this Java process may not connect")%>
              -<%=intl._("I2CP Interface")%>: +<%=intl._t("Disabled - Clients outside this Java process may not connect")%>
              +<%=intl._t("I2CP Interface")%>:
              -<%=intl._("I2CP Port")%>: +<%=intl._t("I2CP Port")%>: " >
              -<%=intl._("Authorization")%>
              +<%=intl._t("Authorization")%>
              > -<%=intl._("Require username and password")%>
              -<%=intl._("Username")%>: +<%=intl._t("Require username and password")%>
              +<%=intl._t("Username")%>:
              -<%=intl._("Password")%>: +<%=intl._t("Password")%>:
              -

              <%=intl._("The default settings will work for most people.")%> -<%=intl._("Any changes made here must also be configured in the external client.")%> -<%=intl._("Many clients do not support SSL or authorization.")%> -<%=intl._("All changes require restart to take effect.")%> +

              <%=intl._t("The default settings will work for most people.")%> +<%=intl._t("Any changes made here must also be configured in the external client.")%> +<%=intl._t("Many clients do not support SSL or authorization.")%> +<%=intl._t("All changes require restart to take effect.")%>


              -" /> -" /> -" /> +" /> +" /> +" />
              -

              <%=intl._("WebApp Configuration")%>

              - <%=intl._("The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. They are usually web applications accessible through the router console. They may be complete applications (e.g. i2psnark),front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), or have no web interface at all (e.g. addressbook).")%> +

              <%=intl._t("WebApp Configuration")%>

              + <%=intl._t("The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. They are usually web applications accessible through the router console. They may be complete applications (e.g. i2psnark),front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), or have no web interface at all (e.g. addressbook).")%>

              - <%=intl._("A web app may also be disabled by removing the .war file from the webapps directory; however the .war file and web app will reappear when you update your router to a newer version, so disabling the web app here is the preferred method.")%> + <%=intl._t("A web app may also be disabled by removing the .war file from the webapps directory; however the .war file and web app will reappear when you update your router to a newer version, so disabling the web app here is the preferred method.")%>

              -

              <%=intl._("All changes require restart to take effect.")%> +

              <%=intl._t("All changes require restart to take effect.")%>


              - " /> - " /> + " /> + " />
              <% if (clientshelper.showPlugins()) { if (clientshelper.isPluginUpdateEnabled()) { %> -

              <%=intl._("Plugin Configuration")%>

              - <%=intl._("The plugins listed below are started by the webConsole client.")%> +

              <%=intl._t("Plugin Configuration")%>

              + <%=intl._t("The plugins listed below are started by the webConsole client.")%>

              - " /> - " /> + " /> + " />
              <% } // pluginUpdateEnabled if (clientshelper.isPluginInstallEnabled()) { %> -

              <%=intl._("Plugin Installation from URL")%>

              - <%=intl._("Look for available plugins on {0}.", "plugins.i2p")%> - <%=intl._("To install a plugin, enter the download URL:")%> +

              <%=intl._t("Plugin Installation from URL")%>

              + <%=intl._t("Look for available plugins on {0}.", "plugins.i2p")%> + <%=intl._t("To install a plugin, enter the download URL:")%>

              @@ -133,31 +133,31 @@ input.default { width: 1px; height: 1px; visibility: hidden; }


              - " /> - " /> - " /> + " /> + " /> + " />
              -

              <%=intl._("Plugin Installation from File")%>

              +

              <%=intl._t("Plugin Installation from File")%>

              -

              <%=intl._("Install plugin from file.")%> -
              <%=intl._("Select xpi2p or su3 file")%> : +

              <%=intl._t("Install plugin from file.")%> +
              <%=intl._t("Select xpi2p or su3 file")%> :


              -" /> +" />
              <% } // pluginInstallEnabled if (clientshelper.isPluginUpdateEnabled()) { %> -

              <%=intl._("Update All Plugins")%>

              +

              <%=intl._t("Update All Plugins")%>

              - " /> + " />
              <% } // pluginUpdateEnabled diff --git a/apps/routerconsole/jsp/confighome.jsp b/apps/routerconsole/jsp/confighome.jsp index bf1f59d45..56be7b8bd 100644 --- a/apps/routerconsole/jsp/confighome.jsp +++ b/apps/routerconsole/jsp/confighome.jsp @@ -17,7 +17,7 @@ input.default { <%@include file="summary.jsi" %> -

              <%=intl._("I2P Home Page Configuration")%>

              +

              <%=intl._t("I2P Home Page Configuration")%>

              <%@include file="confignav.jsi" %> @@ -26,60 +26,60 @@ input.default { " /> -

              <%=intl._("Default Home Page")%>

              +

              <%=intl._t("Default Home Page")%>

              > - <%=intl._("Use old home page")%> - " > + <%=intl._t("Use old home page")%> + " >
              <% if (homehelper.shouldShowSearch()) { %> -

              <%=intl._("Search Engines")%>

              +

              <%=intl._t("Search Engines")%>

              - " > - " > - " > - " > - " > + " > + " > + " > + " > + " >
              <% } // shouldShowSearch() %> -

              <%=intl._("Hidden Services of Interest")%>

              +

              <%=intl._t("Hidden Services of Interest")%>

              - " > - " > - " > - " > - " > + " > + " > + " > + " > + " >
              -

              <%=intl._("Applications and Configuration")%>

              +

              <%=intl._t("Applications and Configuration")%>

              - " > - " > - " > - " > - " > + " > + " > + " > + " > + " >
              diff --git a/apps/routerconsole/jsp/configkeyring.jsp b/apps/routerconsole/jsp/configkeyring.jsp index b2f5ef657..3653a9479 100644 --- a/apps/routerconsole/jsp/configkeyring.jsp +++ b/apps/routerconsole/jsp/configkeyring.jsp @@ -10,7 +10,7 @@ <%@include file="summary.jsi" %> -

              <%=intl._("I2P Keyring Configuration")%>

              +

              <%=intl._t("I2P Keyring Configuration")%>

              <%@include file="confignav.jsi" %> @@ -18,29 +18,29 @@ <%@include file="formhandler.jsi" %> " /> -

              <%=intl._("Keyring")%>

              - <%=intl._("The router keyring is used to decrypt encrypted leaseSets.")%> - <%=intl._("The keyring may contain keys for local or remote encrypted destinations.")%>

              +

              <%=intl._t("Keyring")%>

              + <%=intl._t("The router keyring is used to decrypt encrypted leaseSets.")%> + <%=intl._t("The keyring may contain keys for local or remote encrypted destinations.")%>

              -

              <%=intl._("Manual Keyring Addition")%>

              - <%=intl._("Enter keys for encrypted remote destinations here.")%> - <%=intl._("Keys for local destinations must be entered on the")%> <%=intl._("I2PTunnel page")%>. +

              <%=intl._t("Manual Keyring Addition")%>

              + <%=intl._t("Enter keys for encrypted remote destinations here.")%> + <%=intl._t("Keys for local destinations must be entered on the")%> <%=intl._t("I2PTunnel page")%>.

              - + - +
              <%=intl._("Dest. name, hash, or full key")%>:<%=intl._t("Dest. name, hash, or full key")%>:
              <%=intl._("Encryption Key")%>:<%=intl._t("Encryption Key")%>:
              -" > -" > -" > +" > +" > +" >
              diff --git a/apps/routerconsole/jsp/configlogging.jsp b/apps/routerconsole/jsp/configlogging.jsp index 9e3be5cc7..84f10ac80 100644 --- a/apps/routerconsole/jsp/configlogging.jsp +++ b/apps/routerconsole/jsp/configlogging.jsp @@ -13,7 +13,7 @@ " /> <%@include file="summary.jsi" %> -

              <%=intl._("I2P Logging Configuration")%>

              +

              <%=intl._t("I2P Logging Configuration")%>

              <%@include file="confignav.jsi" %> @@ -23,31 +23,31 @@
              -

              <%=intl._("Configure I2P Logging Options")%>

              +

              <%=intl._t("Configure I2P Logging Options")%>

              - - - + + + - + - + - - + - + - +
              <%=intl._("Log file")%>:" value="" > -
              <%=intl._("(the symbol '@' will be replaced during log rotation)")%>
              <%=intl._("Log record format")%>:
              <%=intl._t("Log file")%>:" value="" > +
              <%=intl._t("(the symbol '@' will be replaced during log rotation)")%>
              <%=intl._t("Log record format")%>: " > -
              <%=intl._("(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, 'm' = message)")%> +
              <%=intl._t("(use 'd' = date, 'c' = class, 't' = thread, 'p' = priority, 'm' = message)")%>
              <%=intl._("Log date format")%>:
              <%=intl._t("Log date format")%>: " > -
              <%=intl._("('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' = second, 'SSS' = millisecond)")%> +
              <%=intl._t("('MM' = month, 'dd' = day, 'HH' = hour, 'mm' = minute, 'ss' = second, 'SSS' = millisecond)")%>
              <%=intl._("Max log file size")%>:
              <%=intl._t("Max log file size")%>: " >
              <%=intl._("Default log level")%>:
              <%=intl._("(DEBUG and INFO are not recommended defaults, as they will drastically slow down your router)")%> +
              <%=intl._t("Default log level")%>:
              <%=intl._t("(DEBUG and INFO are not recommended defaults, as they will drastically slow down your router)")%>
              <%=intl._("Log level overrides")%>:
              <%=intl._t("Log level overrides")%>:
              <%=intl._("New override")%>:
              <%=intl._t("New override")%>:

              - " > - " > + " > + " >
              diff --git a/apps/routerconsole/jsp/confignet.jsp b/apps/routerconsole/jsp/confignet.jsp index 27fdfef7e..7b81518e3 100644 --- a/apps/routerconsole/jsp/confignet.jsp +++ b/apps/routerconsole/jsp/confignet.jsp @@ -13,7 +13,7 @@ " /> -

              <%=intl._("I2P Network Configuration")%>

              +

              <%=intl._t("I2P Network Configuration")%>

              <%@include file="confignav.jsi" %> @@ -23,55 +23,55 @@
              -

              <%=intl._("IP and Transport Configuration")%>

              +

              <%=intl._t("IP and Transport Configuration")%>

              - <%=intl._("The default settings will work for most people.")%> - <%=intl._("There is help below.")%> -

              <%=intl._("UPnP Configuration")%>:
              + <%=intl._t("The default settings will work for most people.")%> + <%=intl._t("There is help below.")%> +

              <%=intl._t("UPnP Configuration")%>:
              > - <%=intl._("Enable UPnP to open firewall ports")%> - <%=intl._("UPnP status")%> -

              <%=intl._("IP Configuration")%>:
              - <%=intl._("Externally reachable hostname or IP address")%>:
              + <%=intl._t("Enable UPnP to open firewall ports")%> - <%=intl._t("UPnP status")%> +

              <%=intl._t("IP Configuration")%>:
              + <%=intl._t("Externally reachable hostname or IP address")%>:
              > - <%=intl._("Use all auto-detect methods")%>
              + <%=intl._t("Use all auto-detect methods")%>
              > - <%=intl._("Disable UPnP IP address detection")%>
              + <%=intl._t("Disable UPnP IP address detection")%>
              > - <%=intl._("Ignore local interface IP address")%>
              + <%=intl._t("Ignore local interface IP address")%>
              > - <%=intl._("Use SSU IP address detection only")%>
              + <%=intl._t("Use SSU IP address detection only")%>
              > - <%=intl._("Hidden mode - do not publish IP")%> <%=intl._("(prevents participating traffic)")%>
              + <%=intl._t("Hidden mode - do not publish IP")%> <%=intl._t("(prevents participating traffic)")%>
              > - <%=intl._("Specify hostname or IP")%>:
              + <%=intl._t("Specify hostname or IP")%>:
              <%=nethelper.getAddressSelector() %>

              - <%=intl._("Action when IP changes")%>:
              + <%=intl._t("Action when IP changes")%>:
              > - <%=intl._("Laptop mode - Change router identity and UDP port when IP changes for enhanced anonymity")%> - (<%=intl._("Experimental")%>) + <%=intl._t("Laptop mode - Change router identity and UDP port when IP changes for enhanced anonymity")%> + (<%=intl._t("Experimental")%>)

              - <%=intl._("IPv4 Configuration")%>:
              + <%=intl._t("IPv4 Configuration")%>:
              > - <%=intl._("Disable inbound (Firewalled by Carrier-grade NAT or DS-Lite)")%> + <%=intl._t("Disable inbound (Firewalled by Carrier-grade NAT or DS-Lite)")%>

              - <%=intl._("IPv6 Configuration")%>:
              + <%=intl._t("IPv6 Configuration")%>:
              > - <%=intl._("Disable IPv6")%>
              + <%=intl._t("Disable IPv6")%>
              > - <%=intl._("Enable IPv6")%>
              + <%=intl._t("Enable IPv6")%>
              > - <%=intl._("Prefer IPv4 over IPv6")%>
              + <%=intl._t("Prefer IPv4 over IPv6")%>
              > - <%=intl._("Prefer IPv6 over IPv4")%>
              + <%=intl._t("Prefer IPv6 over IPv4")%>
              > - <%=intl._("Use IPv6 only (disable IPv4)")%> - (<%=intl._("Experimental")%>)
              -

              <%=intl._("UDP Configuration:")%>
              - <%=intl._("UDP port:")%> + <%=intl._t("Use IPv6 only (disable IPv4)")%> + (<%=intl._t("Experimental")%>)
              +

              <%=intl._t("UDP Configuration:")%>
              + <%=intl._t("UDP port:")%> " >
              > - <%=intl._("Completely disable")%> <%=intl._("(select only if behind a firewall that blocks outbound UDP)")%>
              + <%=intl._t("Completely disable")%> <%=intl._t("(select only if behind a firewall that blocks outbound UDP)")%>
              <% /******** *********/ %>

              - <%=intl._("TCP Configuration")%>:
              - <%=intl._("Externally reachable hostname or IP address")%>:
              + <%=intl._t("TCP Configuration")%>:
              + <%=intl._t("Externally reachable hostname or IP address")%>:
              > - <%=intl._("Use auto-detected IP address")%> - (<%=intl._("currently")%> ) - <%=intl._("if we are not firewalled")%>
              + <%=intl._t("Use auto-detected IP address")%> + (<%=intl._t("currently")%> ) + <%=intl._t("if we are not firewalled")%>
              > - <%=intl._("Always use auto-detected IP address (Not firewalled)")%>
              + <%=intl._t("Always use auto-detected IP address (Not firewalled)")%>
              > - <%=intl._("Specify hostname or IP")%>: + <%=intl._t("Specify hostname or IP")%>: " >
              > - <%=intl._("Disable inbound (Firewalled)")%>
              + <%=intl._t("Disable inbound (Firewalled)")%>
              > - <%=intl._("Completely disable")%> <%=intl._("(select only if behind a firewall that throttles or blocks outbound TCP)")%>
              + <%=intl._t("Completely disable")%> <%=intl._t("(select only if behind a firewall that throttles or blocks outbound TCP)")%>

              - <%=intl._("Externally reachable TCP port")%>:
              + <%=intl._t("Externally reachable TCP port")%>:
              > - <%=intl._("Use the same port configured for UDP")%> - (<%=intl._("currently")%> )
              + <%=intl._t("Use the same port configured for UDP")%> + (<%=intl._t("currently")%> )
              > - <%=intl._("Specify Port")%>: + <%=intl._t("Specify Port")%>: " >
              -

              <%=intl._("Notes")%>: <%=intl._("a) Do not reveal your port numbers to anyone! b) Changing these settings will restart your router.")%>

              +

              <%=intl._t("Notes")%>: <%=intl._t("a) Do not reveal your port numbers to anyone! b) Changing these settings will restart your router.")%>


              -" > -" > -

              <%=intl._("Configuration Help")%>:

              - <%=intl._("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port is forwarded for both UDP and TCP.")%> +" > +" > +

              <%=intl._t("Configuration Help")%>:

              + <%=intl._t("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port is forwarded for both UDP and TCP.")%>

              - <%=intl._("If you can, please poke a hole in your firewall to allow unsolicited UDP and TCP packets to reach you.")%> - <%=intl._("If you can't, I2P supports UPnP (Universal Plug and Play) and UDP hole punching with \"SSU introductions\" to relay traffic.")%> - <%=intl._("Most of the options above are for special situations, for example where UPnP does not work correctly, or a firewall not under your control is doing harm.")%> - <%=intl._("Certain firewalls such as symmetric NATs may not work well with I2P.")%> + <%=intl._t("If you can, please poke a hole in your firewall to allow unsolicited UDP and TCP packets to reach you.")%> + <%=intl._t("If you can't, I2P supports UPnP (Universal Plug and Play) and UDP hole punching with \"SSU introductions\" to relay traffic.")%> + <%=intl._t("Most of the options above are for special situations, for example where UPnP does not work correctly, or a firewall not under your control is doing harm.")%> + <%=intl._t("Certain firewalls such as symmetric NATs may not work well with I2P.")%>

              <% /******** *********/ %>

              - <%=intl._("UPnP is used to communicate with Internet Gateway Devices (IGDs) to detect the external IP address and forward ports.")%> - <%=intl._("UPnP support is beta, and may not work for any number of reasons")%>: + <%=intl._t("UPnP is used to communicate with Internet Gateway Devices (IGDs) to detect the external IP address and forward ports.")%> + <%=intl._t("UPnP support is beta, and may not work for any number of reasons")%>:

                -
              • <%=intl._("No UPnP-compatible device present")%> -
              • <%=intl._("UPnP disabled on the device")%> -
              • <%=intl._("Software firewall interference with UPnP")%> -
              • <%=intl._("Bugs in the device's UPnP implementation")%> -
              • <%=intl._("Multiple firewall/routers in the internet connection path")%> -
              • <%=intl._("UPnP device change, reset, or address change")%> +
              • <%=intl._t("No UPnP-compatible device present")%> +
              • <%=intl._t("UPnP disabled on the device")%> +
              • <%=intl._t("Software firewall interference with UPnP")%> +
              • <%=intl._t("Bugs in the device's UPnP implementation")%> +
              • <%=intl._t("Multiple firewall/routers in the internet connection path")%> +
              • <%=intl._t("UPnP device change, reset, or address change")%>
              -

              <%=intl._("Review the UPnP status here.")%> -<%=intl._("UPnP may be enabled or disabled above, but a change requires a router restart to take effect.")%>

              -

              <%=intl._("Hostnames entered above will be published in the network database.")%> - <%=intl._("They are not private.")%> - <%=intl._("Also, do not enter a private IP address like 127.0.0.1 or 192.168.1.1.")%> - <%=intl._("If you specify the wrong IP address or hostname, or do not properly configure your NAT or firewall, your network performance will degrade substantially.")%> - <%=intl._("When in doubt, leave the settings at the defaults.")%> +

              <%=intl._t("Review the UPnP status here.")%> +<%=intl._t("UPnP may be enabled or disabled above, but a change requires a router restart to take effect.")%>

              +

              <%=intl._t("Hostnames entered above will be published in the network database.")%> + <%=intl._t("They are not private.")%> + <%=intl._t("Also, do not enter a private IP address like 127.0.0.1 or 192.168.1.1.")%> + <%=intl._t("If you specify the wrong IP address or hostname, or do not properly configure your NAT or firewall, your network performance will degrade substantially.")%> + <%=intl._t("When in doubt, leave the settings at the defaults.")%>

              -

              <%=intl._("Reachability Help")%>:

              - <%=intl._("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port is forwarded for both UDP and TCP.")%> - <%=intl._("If you think you have opened up your firewall and I2P still thinks you are firewalled, remember that you may have multiple firewalls, for example both software packages and external hardware routers.")%> - <%=intl._("If there is an error, the logs may also help diagnose the problem.")%> +

              <%=intl._t("Reachability Help")%>:

              + <%=intl._t("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port is forwarded for both UDP and TCP.")%> + <%=intl._t("If you think you have opened up your firewall and I2P still thinks you are firewalled, remember that you may have multiple firewalls, for example both software packages and external hardware routers.")%> + <%=intl._t("If there is an error, the logs may also help diagnose the problem.")%>

                -
              • <%=intl._("OK")%> - - <%=intl._("Your UDP port does not appear to be firewalled.")%> -
              • <%=intl._("Firewalled")%> - - <%=intl._("Your UDP port appears to be firewalled.")%> - <%=intl._("As the firewall detection methods are not 100% reliable, this may occasionally be displayed in error.")%> - <%=intl._("However, if it appears consistently, you should check whether both your external and internal firewalls are open for your port.")%> - <%=intl._("I2P will work fine when firewalled, there is no reason for concern. When firewalled, the router uses \"introducers\" to relay inbound connections.")%> - <%=intl._("However, you will get more participating traffic and help the network more if you can open your firewall(s).")%> - <%=intl._("If you think you have already done so, remember that you may have both a hardware and a software firewall, or be behind an additional, institutional firewall you cannot control.")%> - <%=intl._("Also, some routers cannot correctly forward both TCP and UDP on a single port, or may have other limitations or bugs that prevent them from passing traffic through to I2P.")%> -
              • <%=intl._("Testing")%> - - <%=intl._("The router is currently testing whether your UDP port is firewalled.")%> -
              • <%=intl._("Hidden")%> - - <%=intl._("The router is not configured to publish its address, therefore it does not expect incoming connections.")%> - <%=intl._("Hidden mode is automatically enabled for added protection in certain countries.")%> -
              • <%=intl._("WARN - Firewalled and Fast")%> - - <%=intl._("You have configured I2P to share more than 128KBps of bandwidth, but you are firewalled.")%> - <%=intl._("While I2P will work fine in this configuration, if you really have over 128KBps of bandwidth to share, it will be much more helpful to the network if you open your firewall.")%> -
              • <%=intl._("WARN - Firewalled and Floodfill")%> - - <%=intl._("You have configured I2P to be a floodfill router, but you are firewalled.")%> - <%=intl._("For best participation as a floodfill router, you should open your firewall.")%> -
              • <%=intl._("WARN - Firewalled with Inbound TCP Enabled")%> - - <%=intl._("You have configured inbound TCP, however your UDP port is firewalled, and therefore it is likely that your TCP port is firewalled as well.")%> - <%=intl._("If your TCP port is firewalled with inbound TCP enabled, routers will not be able to contact you via TCP, which will hurt the network.")%> - <%=intl._("Please open your firewall or disable inbound TCP above.")%> -
              • <%=intl._("WARN - Firewalled with UDP Disabled")%> - - <%=intl._("You have configured inbound TCP, however you have disabled UDP.")%> - <%=intl._("You appear to be firewalled on TCP, therefore your router cannot accept inbound connections.")%> - <%=intl._("Please open your firewall or enable UDP.")%> -
              • <%=intl._("ERR - Clock Skew")%> - - <%=intl._("Your system's clock is skewed, which will make it difficult to participate in the network.")%> - <%=intl._("Correct your clock setting if this error persists.")%> -
              • <%=intl._("ERR - Private TCP Address")%> - - <%=intl._("You must never advertise an unroutable IP address such as 127.0.0.1 or 192.168.1.1 as your external address.")%> - <%=intl._("Correct the address or disable inbound TCP above.")%> -
              • <%=intl._("ERR - SymmetricNAT")%> - - <%=intl._("I2P detected that you are firewalled by a Symmetric NAT.")%> - <%=intl._("I2P does not work well behind this type of firewall. You will probably not be able to accept inbound connections, which will limit your participation in the network.")%> -
              • <%=intl._("ERR - UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart")%> - - <%=intl._("I2P was unable to bind to the configured port noted on the advanced network configuration page .")%> - <%=intl._("Check to see if another program is using the configured port. If so, stop that program or configure I2P to use a different port.")%> - <%=intl._("This may be a transient error, if the other program is no longer using the port.")%> - <%=intl._("However, a restart is always required after this error.")%> -
              • <%=intl._("ERR - UDP Disabled and Inbound TCP host/port not set")%> - - <%=intl._("You have not configured inbound TCP with a hostname and port above, however you have disabled UDP.")%> - <%=intl._("Therefore your router cannot accept inbound connections.")%> - <%=intl._("Please configure a TCP host and port above or enable UDP.")%> -
              • <%=intl._("ERR - Client Manager I2CP Error - check logs")%> - - <%=intl._("This is usually due to a port 7654 conflict. Check the logs to verify.")%> - <%=intl._("Do you have another I2P instance running? Stop the conflicting program and restart I2P.")%> +
              • <%=intl._t("OK")%> - + <%=intl._t("Your UDP port does not appear to be firewalled.")%> +
              • <%=intl._t("Firewalled")%> - + <%=intl._t("Your UDP port appears to be firewalled.")%> + <%=intl._t("As the firewall detection methods are not 100% reliable, this may occasionally be displayed in error.")%> + <%=intl._t("However, if it appears consistently, you should check whether both your external and internal firewalls are open for your port.")%> + <%=intl._t("I2P will work fine when firewalled, there is no reason for concern. When firewalled, the router uses \"introducers\" to relay inbound connections.")%> + <%=intl._t("However, you will get more participating traffic and help the network more if you can open your firewall(s).")%> + <%=intl._t("If you think you have already done so, remember that you may have both a hardware and a software firewall, or be behind an additional, institutional firewall you cannot control.")%> + <%=intl._t("Also, some routers cannot correctly forward both TCP and UDP on a single port, or may have other limitations or bugs that prevent them from passing traffic through to I2P.")%> +
              • <%=intl._t("Testing")%> - + <%=intl._t("The router is currently testing whether your UDP port is firewalled.")%> +
              • <%=intl._t("Hidden")%> - + <%=intl._t("The router is not configured to publish its address, therefore it does not expect incoming connections.")%> + <%=intl._t("Hidden mode is automatically enabled for added protection in certain countries.")%> +
              • <%=intl._t("WARN - Firewalled and Fast")%> - + <%=intl._t("You have configured I2P to share more than 128KBps of bandwidth, but you are firewalled.")%> + <%=intl._t("While I2P will work fine in this configuration, if you really have over 128KBps of bandwidth to share, it will be much more helpful to the network if you open your firewall.")%> +
              • <%=intl._t("WARN - Firewalled and Floodfill")%> - + <%=intl._t("You have configured I2P to be a floodfill router, but you are firewalled.")%> + <%=intl._t("For best participation as a floodfill router, you should open your firewall.")%> +
              • <%=intl._t("WARN - Firewalled with Inbound TCP Enabled")%> - + <%=intl._t("You have configured inbound TCP, however your UDP port is firewalled, and therefore it is likely that your TCP port is firewalled as well.")%> + <%=intl._t("If your TCP port is firewalled with inbound TCP enabled, routers will not be able to contact you via TCP, which will hurt the network.")%> + <%=intl._t("Please open your firewall or disable inbound TCP above.")%> +
              • <%=intl._t("WARN - Firewalled with UDP Disabled")%> - + <%=intl._t("You have configured inbound TCP, however you have disabled UDP.")%> + <%=intl._t("You appear to be firewalled on TCP, therefore your router cannot accept inbound connections.")%> + <%=intl._t("Please open your firewall or enable UDP.")%> +
              • <%=intl._t("ERR - Clock Skew")%> - + <%=intl._t("Your system's clock is skewed, which will make it difficult to participate in the network.")%> + <%=intl._t("Correct your clock setting if this error persists.")%> +
              • <%=intl._t("ERR - Private TCP Address")%> - + <%=intl._t("You must never advertise an unroutable IP address such as 127.0.0.1 or 192.168.1.1 as your external address.")%> + <%=intl._t("Correct the address or disable inbound TCP above.")%> +
              • <%=intl._t("ERR - SymmetricNAT")%> - + <%=intl._t("I2P detected that you are firewalled by a Symmetric NAT.")%> + <%=intl._t("I2P does not work well behind this type of firewall. You will probably not be able to accept inbound connections, which will limit your participation in the network.")%> +
              • <%=intl._t("ERR - UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart")%> - + <%=intl._t("I2P was unable to bind to the configured port noted on the advanced network configuration page .")%> + <%=intl._t("Check to see if another program is using the configured port. If so, stop that program or configure I2P to use a different port.")%> + <%=intl._t("This may be a transient error, if the other program is no longer using the port.")%> + <%=intl._t("However, a restart is always required after this error.")%> +
              • <%=intl._t("ERR - UDP Disabled and Inbound TCP host/port not set")%> - + <%=intl._t("You have not configured inbound TCP with a hostname and port above, however you have disabled UDP.")%> + <%=intl._t("Therefore your router cannot accept inbound connections.")%> + <%=intl._t("Please configure a TCP host and port above or enable UDP.")%> +
              • <%=intl._t("ERR - Client Manager I2CP Error - check logs")%> - + <%=intl._t("This is usually due to a port 7654 conflict. Check the logs to verify.")%> + <%=intl._t("Do you have another I2P instance running? Stop the conflicting program and restart I2P.")%>

              <% /******** <% } %>
              -

              <%=intl._("Adjust Profile Bonuses")%>

              -

              <%=intl._("Bonuses may be positive or negative, and affect the peer's inclusion in Fast and High Capacity tiers. Fast peers are used for client tunnels, and High Capacity peers are used for some exploratory tunnels. Current bonuses are displayed on the")%> <%=intl._("profiles page")%>.

              +

              <%=intl._t("Adjust Profile Bonuses")%>

              +

              <%=intl._t("Bonuses may be positive or negative, and affect the peer's inclusion in Fast and High Capacity tiers. Fast peers are used for client tunnels, and High Capacity peers are used for some exploratory tunnels. Current bonuses are displayed on the")%> <%=intl._t("profiles page")%>.

              <% long speed = 0; long capacity = 0; if (! "".equals(peer)) { // get existing bonus values? } %> -

              <%=intl._("Speed")%>: +

              <%=intl._t("Speed")%>: - <%=intl._("Capacity")%>: + <%=intl._t("Capacity")%>: - " />

              + " />

              -

              <%=intl._("Banned Peers")%>

              +

              <%=intl._t("Banned Peers")%>

              " /> <% profilesHelper.storeWriter(out); %> -

              <%=intl._("Banned IPs")%>

              +

              <%=intl._t("Banned IPs")%>


              diff --git a/apps/routerconsole/jsp/configreseed.jsp b/apps/routerconsole/jsp/configreseed.jsp index b78b4cb14..ebc94b9c9 100644 --- a/apps/routerconsole/jsp/configreseed.jsp +++ b/apps/routerconsole/jsp/configreseed.jsp @@ -13,105 +13,107 @@ " /> -

              <%=intl._("I2P Reseeding Configuration")%>

              +

              <%=intl._t("I2P Reseeding Configuration")%>

              <%@include file="confignav.jsi" %> <%@include file="formhandler.jsi" %> -

              <%=intl._("Reseeding is the bootstrapping process used to find other routers when you first install I2P, or when your router has too few router references remaining.")%> -<%=intl._("If reseeding has failed, you should first check your network connection.")%> -<%=intl._("See {0} for instructions on reseeding manually.", "" + intl._("the FAQ") + "")%> +

              <%=intl._t("Reseeding is the bootstrapping process used to find other routers when you first install I2P, or when your router has too few router references remaining.")%> +<%=intl._t("If reseeding has failed, you should first check your network connection.")%> +<%=intl._t("See {0} for instructions on reseeding manually.", "" + intl._t("the FAQ") + "")%>

              -

              <%=intl._("Manual Reseed from URL")%>

              -

              <%=intl._("Enter zip or su3 URL")%> : +

              <%=intl._t("Manual Reseed from URL")%>

              +

              <%=intl._t("Enter zip or su3 URL")%> : -
              <%=intl._("The su3 format is preferred, as it will be verified as signed by a trusted source.")%> -<%=intl._("The zip format is unsigned; use a zip file only from a source that you trust.")%> +
              <%=intl._t("The su3 format is preferred, as it will be verified as signed by a trusted source.")%> +<%=intl._t("The zip format is unsigned; use a zip file only from a source that you trust.")%>

              -" /> +" />
              -

              <%=intl._("Manual Reseed from File")%>

              -

              <%=intl._("Select zip or su3 file")%> : +

              <%=intl._t("Manual Reseed from File")%>

              +

              <%=intl._t("Select zip or su3 file")%> : -
              <%=intl._("The su3 format is preferred, as it will be verified as signed by a trusted source.")%> -<%=intl._("The zip format is unsigned; use a zip file only from a source that you trust.")%> +
              <%=intl._t("The su3 format is preferred, as it will be verified as signed by a trusted source.")%> +<%=intl._t("The zip format is unsigned; use a zip file only from a source that you trust.")%>

              -" /> +" />
              -

              <%=intl._("Create Reseed File")%>

              -

              <%=intl._("Create a new reseed zip file you may share for others to reseed manually.")%> -<%=intl._("This file will never contain your own router's identity or IP.")%> +

              <%=intl._t("Create Reseed File")%>

              +

              <%=intl._t("Create a new reseed zip file you may share for others to reseed manually.")%> +<%=intl._t("This file will never contain your own router's identity or IP.")%>

              -" /> +" />
              -

              <%=intl._("Reseeding Configuration")%>

              -

              <%=intl._("The default settings will work for most people.")%> -<%=intl._("Change these only if HTTPS is blocked by a restrictive firewall and reseed has failed.")%> +

              <%=intl._t("Reseeding Configuration")%>

              +

              <%=intl._t("The default settings will work for most people.")%> +<%=intl._t("Change these only if HTTPS is blocked by a restrictive firewall and reseed has failed.")%>

              - + - - +<%=intl._t("Use non-SSL only")%> + + - + - + - + - + - + - +
              <%=intl._("Reseed URL Selection")%>:
              <%=intl._t("Reseed URL Selection")%>: > -<%=intl._("Try SSL first then non-SSL")%>
              +<%=intl._t("Try SSL first then non-SSL")%>
              > -<%=intl._("Use SSL only")%>
              +<%=intl._t("Use SSL only")%>
              > -<%=intl._("Use non-SSL only")%>
              <%=intl._("Reseed URLs")%>:
              <%=intl._t("Reseed URLs")%>: +
              " />
              +
              <%=intl._("Enable HTTP Proxy?")%>
              <%=intl._t("Enable HTTP Proxy?")%> >
              <%=intl._("HTTP Proxy Host")%>:
              <%=intl._t("HTTP Proxy Host")%>: " >
              <%=intl._("HTTP Proxy Port")%>:
              <%=intl._t("HTTP Proxy Port")%>: " >
              <%=intl._("Use HTTP Proxy Authorization?")%>
              <%=intl._t("Use HTTP Proxy Authorization?")%> >
              <%=intl._("HTTP Proxy Username")%>:
              <%=intl._t("HTTP Proxy Username")%>: " >
              <%=intl._("HTTP Proxy Password")%>:
              <%=intl._t("HTTP Proxy Password")%>: " >
              -" /> -" /> -" /> +" /> +" /> +" />
              diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp index f12c9b95c..987aefdeb 100644 --- a/apps/routerconsole/jsp/configservice.jsp +++ b/apps/routerconsole/jsp/configservice.jsp @@ -10,7 +10,7 @@ <%@include file="summary.jsi" %> -

              <%=intl._("I2P Service Configuration")%>

              +

              <%=intl._t("I2P Service Configuration")%>

              <%@include file="confignav.jsi" %> @@ -19,63 +19,63 @@
              -

              <%=intl._("Shutdown the router")%>

              -

              <%=intl._("Graceful shutdown lets the router satisfy the agreements it has already made before shutting down, but may take a few minutes.")%> - <%=intl._("If you need to kill the router immediately, that option is available as well.")%>

              +

              <%=intl._t("Shutdown the router")%>

              +

              <%=intl._t("Graceful shutdown lets the router satisfy the agreements it has already made before shutting down, but may take a few minutes.")%> + <%=intl._t("If you need to kill the router immediately, that option is available as well.")%>


              - " > - " > + " > + " > <% if (formhandler.shouldShowCancelGraceful()) { %> - " > + " > <% } %>
              <% if (System.getProperty("wrapper.version") != null) { %> -

              <%=intl._("If you want the router to restart itself after shutting down, you can choose one of the following.")%> - <%=intl._("This is useful in some situations - for example, if you changed some settings that client applications only read at startup, such as the routerconsole password or the interface it listens on.")%> - <%=intl._("A graceful restart will take a few minutes (but your peers will appreciate your patience), while a hard restart does so immediately.")%> - <%=intl._("After tearing down the router, it will wait 1 minute before starting back up again.")%>

              +

              <%=intl._t("If you want the router to restart itself after shutting down, you can choose one of the following.")%> + <%=intl._t("This is useful in some situations - for example, if you changed some settings that client applications only read at startup, such as the routerconsole password or the interface it listens on.")%> + <%=intl._t("A graceful restart will take a few minutes (but your peers will appreciate your patience), while a hard restart does so immediately.")%> + <%=intl._t("After tearing down the router, it will wait 1 minute before starting back up again.")%>


              - " > - " > + " > + " > <% } %>
              <% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %> -

              <%=intl._("Systray integration")%>

              -

              <%=intl._("On the windows platform, there is a small application to sit in the system tray, allowing you to view the router's status")%> - <%=intl._("(later on, I2P client applications will be able to integrate their own functionality into the system tray as well).")%> - <%=intl._("If you are on windows, you can either enable or disable that icon here.")%>

              +

              <%=intl._t("Systray integration")%>

              +

              <%=intl._t("On the windows platform, there is a small application to sit in the system tray, allowing you to view the router's status")%> + <%=intl._t("(later on, I2P client applications will be able to integrate their own functionality into the system tray as well).")%> + <%=intl._t("If you are on windows, you can either enable or disable that icon here.")%>


              - " > - " > + " > + " >
              -

              <%=intl._("Run on startup")%>

              -

              <%=intl._("You can control whether I2P is run on startup or not by selecting one of the following options - I2P will install (or remove) a service accordingly.")%> - <%=intl._("If you prefer the command line, you can also run the ")%> install_i2p_service_winnt.bat (<%=intl._("or")%> +

              <%=intl._t("Run on startup")%>

              +

              <%=intl._t("You can control whether I2P is run on startup or not by selecting one of the following options - I2P will install (or remove) a service accordingly.")%> + <%=intl._t("If you prefer the command line, you can also run the ")%> install_i2p_service_winnt.bat (<%=intl._t("or")%> uninstall_i2p_service_winnt.bat).


              - " > -" >
              -

              <%=intl._("Note")%>: <%=intl._("If you are running I2P as service right now, removing it will shut down your router immediately.")%> - <%=intl._("You may want to consider shutting down gracefully, as above, then running uninstall_i2p_service_winnt.bat.")%>

              + " > +" >
              +

              <%=intl._t("Note")%>: <%=intl._t("If you are running I2P as service right now, removing it will shut down your router immediately.")%> + <%=intl._t("You may want to consider shutting down gracefully, as above, then running uninstall_i2p_service_winnt.bat.")%>

              <% } %> -

              <%=intl._("Debugging")%>

              -

              <%=intl._("View the job queue")%> +

              <%=intl._t("Debugging")%>

              +

              <%=intl._t("View the job queue")%> <% if (System.getProperty("wrapper.version") != null) { %> -

              <%=intl._("At times, it may be helpful to debug I2P by getting a thread dump. To do so, please select the following option and review the thread dumped to wrapper.log.")%>

              +

              <%=intl._t("At times, it may be helpful to debug I2P by getting a thread dump. To do so, please select the following option and review the thread dumped to wrapper.log.")%>


              <% } %>
              - " > + " > <% if (System.getProperty("wrapper.version") != null) { %> - " > + " > <% } %>
              -

              <%=intl._("Launch browser on router startup?")%>

              -

              <%=intl._("I2P's main configuration interface is this web console, so for your convenience I2P can launch a web browser on startup pointing at")%> +

              <%=intl._t("Launch browser on router startup?")%>

              +

              <%=intl._t("I2P's main configuration interface is this web console, so for your convenience I2P can launch a web browser on startup pointing at")%> http://127.0.0.1:7657/ .


              - " > - " > + " > + " >
              diff --git a/apps/routerconsole/jsp/configsidebar.jsp b/apps/routerconsole/jsp/configsidebar.jsp index 129feaa10..63c3ed18c 100644 --- a/apps/routerconsole/jsp/configsidebar.jsp +++ b/apps/routerconsole/jsp/configsidebar.jsp @@ -17,7 +17,7 @@ input.default { <%@include file="summary.jsi" %> -

              <%=intl._("I2P Summary Bar Configuration")%>

              +

              <%=intl._t("I2P Summary Bar Configuration")%>

              <%@include file="confignav.jsi" %> @@ -29,23 +29,23 @@ input.default { " /> -

              <%=intl._("Refresh Interval")%>

              +

              <%=intl._t("Refresh Interval")%>

              " > - <%=intl._("seconds")%> - " > + <%=intl._t("seconds")%> + " >
              -

              <%=intl._("Customize Summary Bar")%>

              +

              <%=intl._t("Customize Summary Bar")%>

              - " > - " > + " > + " >
              diff --git a/apps/routerconsole/jsp/configstats.jsp b/apps/routerconsole/jsp/configstats.jsp index 4100a4b1e..802d615e5 100644 --- a/apps/routerconsole/jsp/configstats.jsp +++ b/apps/routerconsole/jsp/configstats.jsp @@ -61,7 +61,7 @@ function toggleAll(category) <%@include file="summary.jsi" %> -

              <%=intl._("I2P Stats Configuration")%>

              +

              <%=intl._t("I2P Stats Configuration")%>

              <%@include file="confignav.jsi" %> @@ -73,44 +73,44 @@ function toggleAll(category)
              -

              <%=intl._("Configure I2P Stat Collection")%>

              -

              <%=intl._("Enable full stats?")%> +

              <%=intl._t("Configure I2P Stat Collection")%>

              +

              <%=intl._t("Enable full stats?")%> checked="checked" <% } %> > - (<%=intl._("change requires restart to take effect")%>)
              + (<%=intl._t("change requires restart to take effect")%>)
              <% // stats.log for devs only and grows without bounds, not recommended boolean shouldShowLog = statshelper.shouldShowLog(); if (shouldShowLog) { -%><%=intl._("Stat file")%>:
              +%><%=intl._t("Stat file")%>:
              Warning - Log with care, stat file grows without limit.
              <% } // shouldShowLog -%><%=intl._("Filter")%>: (<%=intl._("toggle all")%>)

              +%><%=intl._t("Filter")%>: (<%=intl._t("toggle all")%>)

              <% while (statshelper.hasMoreStats()) { while (statshelper.groupRequired()) { %> <% if (shouldShowLog) { -%> +%> <% } // shouldShowLog -%> +%> <% } // end iterating over required groups for the current stat %> @@ -139,14 +139,14 @@ Warning - Log with care, stat file grows without limit.
              %> - <% } // shouldShowLog %>
              > - <%=intl._(statshelper.getCurrentGroupName())%> - (<%=intl._("toggle all")%>) + <%=intl._t(statshelper.getCurrentGroupName())%> + (<%=intl._t("toggle all")%>)
              <%=intl._("Log")%><%=intl._t("Log")%><%=intl._("Graph")%><%=intl._t("Graph")%>
              <%=intl._("Advanced filter")%>: + <%=intl._t("Advanced filter")%>:
              -" > -" > +" > +" >
              diff --git a/apps/routerconsole/jsp/configtunnels.jsp b/apps/routerconsole/jsp/configtunnels.jsp index de82f0027..09a2ceee9 100644 --- a/apps/routerconsole/jsp/configtunnels.jsp +++ b/apps/routerconsole/jsp/configtunnels.jsp @@ -13,28 +13,28 @@ " /> -

              <%=intl._("I2P Tunnel Configuration")%>

              +

              <%=intl._t("I2P Tunnel Configuration")%>

              <%@include file="confignav.jsi" %> <%@include file="formhandler.jsi" %>

              - <%=intl._("NOTE")%>: - <%=intl._("The default settings work for most people.")%> - <%=intl._("There is a fundamental tradeoff between anonymity and performance.")%> - <%=intl._("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.")%> - <%=intl._("High CPU and/or high outbound bandwidth usage may result.")%> - <%=intl._("Change these settings with care, and adjust them if you have problems.")%> + <%=intl._t("NOTE")%>: + <%=intl._t("The default settings work for most people.")%> + <%=intl._t("There is a fundamental tradeoff between anonymity and performance.")%> + <%=intl._t("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.")%> + <%=intl._t("High CPU and/or high outbound bandwidth usage may result.")%> + <%=intl._t("Change these settings with care, and adjust them if you have problems.")%>

              - <%=intl._("Note")%>: <%=intl._("Exploratory tunnel setting changes are stored in the router.config file.")%> - <%=intl._("Client tunnel changes are temporary and are not saved.")%> -<%=intl._("To make permanent client tunnel changes see the")%> <%=intl._("i2ptunnel page")%>. + <%=intl._t("Note")%>: <%=intl._t("Exploratory tunnel setting changes are stored in the router.config file.")%> + <%=intl._t("Client tunnel changes are temporary and are not saved.")%> +<%=intl._t("To make permanent client tunnel changes see the")%> <%=intl._t("i2ptunnel page")%>.
              -" > -" > +" > +" >
              diff --git a/apps/routerconsole/jsp/configui.jsp b/apps/routerconsole/jsp/configui.jsp index 7635ab1e3..96f7bf84c 100644 --- a/apps/routerconsole/jsp/configui.jsp +++ b/apps/routerconsole/jsp/configui.jsp @@ -22,16 +22,16 @@ input.default { " /> -

              <%=uihelper._("I2P UI Configuration")%>

              +

              <%=uihelper._t("I2P UI Configuration")%>

              <%@include file="confignav.jsi" %> <%@include file="formhandler.jsi" %> -

              <%=uihelper._("Router Console Theme")%>

              +

              <%=uihelper._t("Router Console Theme")%>

              - + <% @@ -40,28 +40,28 @@ input.default { %> <% } else { %> -<%=uihelper._("Theme selection disabled for Internet Explorer, sorry.")%> +<%=uihelper._t("Theme selection disabled for Internet Explorer, sorry.")%>
              -<%=uihelper._("If you're not using IE, it's likely that your browser is pretending to be IE; please configure your browser (or proxy) to use a different User Agent string if you'd like to access the console themes.")%> +<%=uihelper._t("If you're not using IE, it's likely that your browser is pretending to be IE; please configure your browser (or proxy) to use a different User Agent string if you'd like to access the console themes.")%> <% } %> -

              <%=uihelper._("Router Console Language")%>

              +

              <%=uihelper._t("Router Console Language")%>

              -

              <%=uihelper._("Please contribute to the router console translation project! Contact the developers in #i2p-dev on IRC to help.")%> +

              <%=uihelper._t("Please contribute to the router console translation project! Contact the developers in #i2p-dev on IRC to help.")%>


              -" > -" > +" > +" >
              -

              <%=uihelper._("Router Console Password")%>

              +

              <%=uihelper._t("Router Console Password")%>

              - " > - " > - " > - " > + " > + " > + " > + " >
              diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp index 1171fbcab..e1e073404 100644 --- a/apps/routerconsole/jsp/configupdate.jsp +++ b/apps/routerconsole/jsp/configupdate.jsp @@ -11,7 +11,7 @@ <%@include file="summary.jsi" %> -

              <%=intl._("I2P Update Configuration")%>

              +

              <%=intl._t("I2P Update Configuration")%>

              <%@include file="confignav.jsi" %> @@ -27,57 +27,57 @@ <% /* set hidden default */ %> <% if (updatehelper.canInstall()) { %> -

              <%=intl._("Check for I2P and news updates")%>

              +

              <%=intl._t("Check for I2P and news updates")%>

              - + <% } else { %> -

              <%=intl._("Check for news updates")%>

              +

              <%=intl._t("Check for news updates")%>

              <%=intl._("News & I2P Updates")%>:
              <%=intl._t("News & I2P Updates")%>:
              - + <% } // if canInstall %> - - + - <% if (updatehelper.canInstall()) { %> - + <% } // if canInstall %> - + - + <% if (updatehelper.isAdvanced()) { %> - + - + <% } // if isAdvanced %> <% if (updatehelper.canInstall()) { %> <% if (updatehelper.isAdvanced()) { %> - + - + - + - + - + - + <% } // if isAdvanced %> <% } else { %> - + <% } // if canInstall %>
              <%=intl._("News Updates")%>:
              <%=intl._t("News Updates")%>: <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> <%=intl._("Update In Progress")%>
              <% } else { %> " /> +
              <% if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false"))) { %> <%=intl._t("Update In Progress")%>
              <% } else { %> " /> <% } %>

              <%=intl._("News URL")%>:
              <%=intl._t("News URL")%>: readonly="readonly"<% } %> value="">
              <%=intl._("Refresh frequency")%>: +
              <%=intl._t("Refresh frequency")%>:
              <%=formhandler._("Update policy")%>:
              <%=formhandler._t("Update policy")%>:
              <%=intl._("Fetch news through the eepProxy?")%>
              <%=intl._t("Fetch news through the eepProxy?")%>
              <%=intl._("Update through the eepProxy?")%>
              <%=intl._t("Update through the eepProxy?")%>
              <%=intl._("eepProxy host")%>:
              <%=intl._t("eepProxy host")%>: " />
              <%=intl._("eepProxy port")%>:
              <%=intl._t("eepProxy port")%>: " />
              <%=intl._("Update URLs")%>:
              <%=intl._t("Update URLs")%>:
              <%=intl._("Trusted keys")%>:
              <%=intl._t("Trusted keys")%>:
              <%=intl._("Update with signed development builds?")%>
              <%=intl._t("Update with signed development builds?")%>
              <%=intl._("Signed Build URL")%>:
              <%=intl._t("Signed Build URL")%>: ">
              <%=intl._("Update with unsigned development builds?")%>
              <%=intl._t("Update with unsigned development builds?")%>
              <%=intl._("Unsigned Build URL")%>:
              <%=intl._t("Unsigned Build URL")%>: ">
              <%=intl._("Updates will be dispatched via your package manager.")%>
              <%=intl._t("Updates will be dispatched via your package manager.")%>
              - " > - " > + " > + " >
              diff --git a/apps/routerconsole/jsp/console.jsp b/apps/routerconsole/jsp/console.jsp index ffed509dd..c61025795 100644 --- a/apps/routerconsole/jsp/console.jsp +++ b/apps/routerconsole/jsp/console.jsp @@ -10,12 +10,12 @@ <%@include file="summaryajax.jsi" %> <% - String consoleNonce = intl.getNonce(); + String consoleNonce = net.i2p.router.web.CSSHelper.getNonce(); %> <%@include file="summary.jsi" %> -

              <%=intl._("I2P Router Console")%>

              +

              <%=intl._t("I2P Router Console")%>

              <% if (newshelper.shouldShowNews()) { @@ -61,7 +61,7 @@ Tiếng Việt
              -

              <%=intl._("Welcome to I2P")%>

              +

              <%=intl._t("Welcome to I2P")%>

              <% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/readme.html"); %> diff --git a/apps/routerconsole/jsp/css.jsi b/apps/routerconsole/jsp/css.jsi index 50c70d875..edae86240 100644 --- a/apps/routerconsole/jsp/css.jsi +++ b/apps/routerconsole/jsp/css.jsi @@ -37,7 +37,7 @@ } String conNonceParam = request.getParameter("consoleNonce"); - if (intl.getNonce().equals(conNonceParam)) { + if (net.i2p.router.web.CSSHelper.getNonce().equals(conNonceParam)) { intl.setLang(request.getParameter("lang")); intl.setNews(request.getParameter("news")); } diff --git a/apps/routerconsole/jsp/dns.jsp b/apps/routerconsole/jsp/dns.jsp index 8080c115b..23a353416 100644 --- a/apps/routerconsole/jsp/dns.jsp +++ b/apps/routerconsole/jsp/dns.jsp @@ -30,11 +30,11 @@ <%@include file="summary.jsi" %> -

              <%=intl._("I2P Addressbook")%> ">images/newtab.png" />

              +

              <%=intl._t("I2P Addressbook")%> ">images/newtab.png" />

              <% diff --git a/apps/routerconsole/jsp/error.jsp b/apps/routerconsole/jsp/error.jsp index 5dfba993e..663b61431 100644 --- a/apps/routerconsole/jsp/error.jsp +++ b/apps/routerconsole/jsp/error.jsp @@ -25,6 +25,6 @@ <%@include file="summary.jsi" %>

              <%=ERROR_CODE%> <%=ERROR_MESSAGE%>

              -<%=intl._("Sorry! You appear to be requesting a non-existent Router Console page or resource.")%>
              -<%=intl._("Error 404")%>: <%=ERROR_URI%> <%=intl._("not found")%>. +<%=intl._t("Sorry! You appear to be requesting a non-existent Router Console page or resource.")%>
              +<%=intl._t("Error 404")%>: <%=ERROR_URI%> <%=intl._t("not found")%>.
              diff --git a/apps/routerconsole/jsp/error500.jsp b/apps/routerconsole/jsp/error500.jsp index 223b4d5de..c56b1f7ea 100644 --- a/apps/routerconsole/jsp/error500.jsp +++ b/apps/routerconsole/jsp/error500.jsp @@ -22,26 +22,26 @@

              <%=ERROR_CODE%> <%=ERROR_MESSAGE%>

              -<%=intl._("Sorry! There has been an internal error.")%> +<%=intl._t("Sorry! There has been an internal error.")%>

              <% /* note to translators - both parameters are URLs */ -%><%=intl._("Please report bugs on {0} or {1}.", +%><%=intl._t("Please report bugs on {0} or {1}.", "trac.i2p2.i2p", "trac.i2p2.de")%> -

              <%=intl._("Please include this information in bug reports")%>: +

              <%=intl._t("Please include this information in bug reports")%>:

              -

              <%=intl._("Error Details")%>

              +

              <%=intl._t("Error Details")%>

              -<%=intl._("Error {0}", ERROR_CODE)%>: <%=ERROR_URI%> <%=ERROR_MESSAGE%> +<%=intl._t("Error {0}", ERROR_CODE)%>: <%=ERROR_URI%> <%=ERROR_MESSAGE%>

              <% if (ERROR_THROWABLE != null) { @@ -56,7 +56,7 @@ } %>

              -

              <%=intl._("I2P Version and Running Environment")%>

              +

              <%=intl._t("I2P Version and Running Environment")%>

              I2P version: <%=net.i2p.router.RouterVersion.FULL_VERSION%>
              Java version: <%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%> (<%=System.getProperty("java.runtime.name")%> <%=System.getProperty("java.runtime.version")%>)
              @@ -71,5 +71,5 @@ Jbigi: <%=net.i2p.util.NativeBigInteger.loadStatus()%>
              Encoding: <%=System.getProperty("file.encoding")%>
              Charset: <%=java.nio.charset.Charset.defaultCharset().name()%>

              -

              <%=intl._("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%>

              +

              <%=intl._t("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%>

              diff --git a/apps/routerconsole/jsp/events.jsp b/apps/routerconsole/jsp/events.jsp index b67aa5dd5..29838e7a7 100644 --- a/apps/routerconsole/jsp/events.jsp +++ b/apps/routerconsole/jsp/events.jsp @@ -18,7 +18,7 @@ <%@include file="summaryajax.jsi" %> <%@include file="summary.jsi" %> -

              <%=intl._("I2P Event Log")%>

              +

              <%=intl._t("I2P Event Log")%>

              diff --git a/apps/routerconsole/jsp/graph.jsp b/apps/routerconsole/jsp/graph.jsp index 92c6f508f..1d5c5bf1f 100644 --- a/apps/routerconsole/jsp/graph.jsp +++ b/apps/routerconsole/jsp/graph.jsp @@ -16,7 +16,7 @@ <%@include file="summaryajax.jsi" %> <%@include file="summary.jsi" %> -

              <%=intl._("I2P Performance Graphs")%>

              +

              <%=intl._t("I2P Performance Graphs")%>

              diff --git a/apps/routerconsole/jsp/graphs.jsp b/apps/routerconsole/jsp/graphs.jsp index 8d4aff752..6cde50131 100644 --- a/apps/routerconsole/jsp/graphs.jsp +++ b/apps/routerconsole/jsp/graphs.jsp @@ -23,7 +23,7 @@ <%@include file="summaryajax.jsi" %> <%@include file="summary.jsi" %> -

              <%=intl._("I2P Performance Graphs")%>

              +

              <%=intl._t("I2P Performance Graphs")%>

              diff --git a/apps/routerconsole/jsp/home.jsp b/apps/routerconsole/jsp/home.jsp index 8553e56e6..eb9887e97 100644 --- a/apps/routerconsole/jsp/home.jsp +++ b/apps/routerconsole/jsp/home.jsp @@ -8,7 +8,7 @@ <%@include file="summaryajax.jsi" %> <% - String consoleNonce = intl.getNonce(); + String consoleNonce = net.i2p.router.web.CSSHelper.getNonce(); %> " /> @@ -23,12 +23,12 @@ -

              <%=intl._("I2P Router Console")%>

              +

              <%=intl._t("I2P Router Console")%>

              <% if (newshelper.shouldShowNews()) { @@ -57,7 +57,7 @@ " /> <% if (homehelper.shouldShowWelcome()) { %> -
              "> +
              ">
              English عربية @@ -87,7 +87,7 @@ Українська Tiếng Việt
              -

              <%=intl._("Welcome to I2P")%>

              +

              <%=intl._t("Welcome to I2P")%>

              <% } // shouldShowWelcome %> @@ -100,7 +100,7 @@ - - - +<% if (book.getEntries().length > 0) { /* Don't show if no results. Can't figure out how to do this with c:if */ %> + + + - + +<% } /* book..getEntries().length() > 0 */ %>
              +<% if (book.getEntries().length > 0) { /* Don't show if no results. Can't figure out how to do this with c:if */ %>

              -" > -" > +" > +" >

              -
              +
              +<% } /* book..getEntries().length() > 0 */ %> + +<% if (book.getEntries().length > 0) { /* Don't show if no results. Can't figure out how to do this with c:if */ %>

              @@ -188,14 +194,15 @@ ${book.loadBookMessages} -" /> +" />

              +<% } /* book..getEntries().length() > 0 */ %> <% /* book.notEmpty */ %>
              -

              <%=intl._("This address book is empty.")%>

              +

              <%=intl._t("This address book is empty.")%>

              @@ -204,16 +211,16 @@ ${book.loadBookMessages}
              -

              <%=intl._("Add new destination")%>:

              +

              <%=intl._t("Add new destination")%>:

              -<%=intl._("Host Name")%> +<%=intl._t("Host Name")%>
              -<%=intl._("Destination")%> +<%=intl._t("Destination")%>

              -" > -" > -" > +" > +" > +" >

              diff --git a/apps/susidns/src/jsp/config.jsp b/apps/susidns/src/jsp/config.jsp index 6a650d3f5..27e57a6e9 100644 --- a/apps/susidns/src/jsp/config.jsp +++ b/apps/susidns/src/jsp/config.jsp @@ -44,24 +44,24 @@ -<%=intl._("configuration")%> - susidns +<%=intl._t("configuration")%> - susidns


              @@ -74,65 +74,65 @@
              -" > -" > +" > +" >
              -

              <%=intl._("Hints")%>

              +

              <%=intl._t("Hints")%>

              1. -<%=intl._("File and directory paths here are relative to the addressbook's working directory, which is normally ~/.i2p/addressbook/ (Linux) or %APPDATA%\\I2P\\addressbook\\ (Windows).")%> +<%=intl._t("File and directory paths here are relative to the addressbook's working directory, which is normally ~/.i2p/addressbook/ (Linux) or %APPDATA%\\I2P\\addressbook\\ (Windows).")%>
              2. -<%=intl._("If you want to manually add lines to an addressbook, add them to the private or master addressbooks.")%> -<%=intl._("The router addressbook and the published addressbook are updated by the addressbook application.")%> +<%=intl._t("If you want to manually add lines to an addressbook, add them to the private or master addressbooks.")%> +<%=intl._t("The router addressbook and the published addressbook are updated by the addressbook application.")%>
              3. -<%=intl._("When you publish your addressbook, ALL destinations from the master and router addressbooks appear there.")%> -<%=intl._("Use the private addressbook for private destinations, these are not published.")%> +<%=intl._t("When you publish your addressbook, ALL destinations from the master and router addressbooks appear there.")%> +<%=intl._t("Use the private addressbook for private destinations, these are not published.")%>
              -

              <%=intl._("Options")%>

              +

              <%=intl._t("Options")%>

              • subscriptions - -<%=intl._("File containing the list of subscriptions URLs (no need to change)")%> +<%=intl._t("File containing the list of subscriptions URLs (no need to change)")%>
              • update_delay - -<%=intl._("Update interval in hours")%> +<%=intl._t("Update interval in hours")%>
              • published_addressbook - -<%=intl._("Your public hosts.txt file (choose a path within your webserver document root)")%> +<%=intl._t("Your public hosts.txt file (choose a path within your webserver document root)")%>
              • router_addressbook - -<%=intl._("Your hosts.txt (don't change)")%> +<%=intl._t("Your hosts.txt (don't change)")%>
              • master_addressbook - -<%=intl._("Your personal addressbook, these hosts will be published")%> +<%=intl._t("Your personal addressbook, these hosts will be published")%>
              • private_addressbook - -<%=intl._("Your private addressbook, it is never published")%> +<%=intl._t("Your private addressbook, it is never published")%>
              • proxy_port - -<%=intl._("Port for your eepProxy (no need to change)")%> +<%=intl._t("Port for your eepProxy (no need to change)")%>
              • proxy_host - -<%=intl._("Hostname for your eepProxy (no need to change)")%> +<%=intl._t("Hostname for your eepProxy (no need to change)")%>
              • should_publish - -<%=intl._("Whether to update the published addressbook")%> +<%=intl._t("Whether to update the published addressbook")%>
              • etags - -<%=intl._("File containing the etags header from the fetched subscription URLs (no need to change)")%> +<%=intl._t("File containing the etags header from the fetched subscription URLs (no need to change)")%>
              • last_modified - -<%=intl._("File containing the modification timestamp for each fetched subscription URL (no need to change)")%> +<%=intl._t("File containing the modification timestamp for each fetched subscription URL (no need to change)")%>
              • log - -<%=intl._("File to log activity to (change to /dev/null if you like)")%> +<%=intl._t("File to log activity to (change to /dev/null if you like)")%>
              • theme - -<%=intl._("Name of the theme to use (defaults to 'light')")%> +<%=intl._t("Name of the theme to use (defaults to 'light')")%>
              diff --git a/apps/susidns/src/jsp/details.jsp b/apps/susidns/src/jsp/details.jsp index 9334e43ca..a5660b677 100644 --- a/apps/susidns/src/jsp/details.jsp +++ b/apps/susidns/src/jsp/details.jsp @@ -42,31 +42,31 @@ -${book.book} <%=intl._("addressbook")%> - susidns +${book.book} <%=intl._t("addressbook")%> - susidns


              -

              <%=intl._("Address book")%>: <%=intl._(book.getBook())%>

              -

              <%=intl._("Storage")%>: ${book.displayName}

              +

              <%=intl._t("Address book")%>: <%=intl._t(book.getBook())%>

              +

              <%=intl._t("Storage")%>: ${book.displayName}

              @@ -85,49 +85,49 @@ - + <% if (addr.isIDN()) { %> - + <% } %> - + - + - - + + - - + + - + - + - + - + - + - + - +
              <%=intl._("Host Name")%><%=intl._t("Host Name")%> <%=addr.getDisplayName()%>
              <%=intl._("Encoded Name")%><%=intl._t("Encoded Name")%> <%=addr.getName()%>
              <%=intl._("Base 32 Address")%><%=intl._t("Base 32 Address")%> <%=b32%>
              <%=intl._("Base 64 Hash")%><%=intl._t("Base 64 Hash")%> <%=addr.getB64()%>
              <%=intl._("Address Helper")%><%=intl._("link")%><%=intl._t("Address Helper")%><%=intl._t("link")%>
              <%=intl._("Public Key")%><%=intl._("ElGamal 2048 bit")%><%=intl._t("Public Key")%><%=intl._t("ElGamal 2048 bit")%>
              <%=intl._("Signing Key")%><%=intl._t("Signing Key")%> <%=addr.getSigType()%>
              <%=intl._("Certificate")%><%=intl._t("Certificate")%> <%=addr.getCert()%>
              <%=intl._("Added Date")%><%=intl._t("Added Date")%> <%=addr.getAdded()%>
              <%=intl._("Source")%><%=intl._t("Source")%> <%=addr.getSource()%>
              <%=intl._("Last Modified")%><%=intl._t("Last Modified")%> <%=addr.getModded()%>
              <%=intl._("Notes")%><%=intl._t("Notes")%> <%=addr.getNotes()%>
              <%=intl._("Destination")%><%=intl._t("Destination")%>
              @@ -138,7 +138,7 @@ -" > +" >

              diff --git a/apps/susidns/src/jsp/index.jsp b/apps/susidns/src/jsp/index.jsp index 505beeec7..67c96c680 100644 --- a/apps/susidns/src/jsp/index.jsp +++ b/apps/susidns/src/jsp/index.jsp @@ -42,7 +42,7 @@ -<%=intl._("Introduction")%> - SusiDNS +<%=intl._t("Introduction")%> - SusiDNS @@ -53,39 +53,39 @@

              -

              <%=intl._("What is the addressbook?")%>

              +

              <%=intl._t("What is the addressbook?")%>

              -<%=intl._("The addressbook application is part of your I2P installation.")%> -<%=intl._("It regularly updates your hosts.txt file from distributed sources or \"subscriptions\".")%> +<%=intl._t("The addressbook application is part of your I2P installation.")%> +<%=intl._t("It regularly updates your hosts.txt file from distributed sources or \"subscriptions\".")%>

              -<%=intl._("In the default configuration, the address book is only subscribed to {0}.", "i2p-projekt.i2p")%> -<%=intl._("Subscribing to additional sites is easy, just add them to your subscriptions file.")%> +<%=intl._t("In the default configuration, the address book is only subscribed to {0}.", "i2p-projekt.i2p")%> +<%=intl._t("Subscribing to additional sites is easy, just add them to your subscriptions file.")%>

              -<%=intl._("For more information on naming in I2P, see the overview.")%> +<%=intl._t("For more information on naming in I2P, see the overview.")%>

              -

              <%=intl._("How does the addressbook application work?")%>

              +

              <%=intl._t("How does the addressbook application work?")%>

              -<%=intl._("The addressbook application regularly polls your subscriptions and merges their content into your \"router\" address book.")%> -<%=intl._("Then it merges your \"master\" address book into the router address book as well.")%> -<%=intl._("If configured, the router address book is now written to the \"published\" address book, which will be publicly available if you are running an eepsite.")%> +<%=intl._t("The addressbook application regularly polls your subscriptions and merges their content into your \"router\" address book.")%> +<%=intl._t("Then it merges your \"master\" address book into the router address book as well.")%> +<%=intl._t("If configured, the router address book is now written to the \"published\" address book, which will be publicly available if you are running an eepsite.")%>

              -<%=intl._("The router also uses a private address book (not shown in the picture), which is not merged or published.")%> -<%=intl._("Hosts in the private address book can be accessed by you but their addresses are never distributed to others.")%> -<%=intl._("The private address book can also be used for aliases of hosts in your other address books.")%> +<%=intl._t("The router also uses a private address book (not shown in the picture), which is not merged or published.")%> +<%=intl._t("Hosts in the private address book can be accessed by you but their addresses are never distributed to others.")%> +<%=intl._t("The private address book can also be used for aliases of hosts in your other address books.")%>

              address book working scheme
              diff --git a/apps/susidns/src/jsp/subscriptions.jsp b/apps/susidns/src/jsp/subscriptions.jsp index db588c6a8..25ec21261 100644 --- a/apps/susidns/src/jsp/subscriptions.jsp +++ b/apps/susidns/src/jsp/subscriptions.jsp @@ -43,24 +43,24 @@ -<%=intl._("subscriptions")%> - susidns +<%=intl._t("subscriptions")%> - susidns


              @@ -73,18 +73,18 @@
              -" > -" > +" > +" >

              -<%=intl._("The subscription file contains a list of i2p URLs.")%> -<%=intl._("The addressbook application regularly checks this list for new eepsites.")%> -<%=intl._("Those URLs refer to published hosts.txt files.")%> -<%=intl._("The default subscription is the hosts.txt from {0}, which is updated infrequently.", "i2p-projekt.i2p")%> -<%=intl._("So it is a good idea to add additional subscriptions to sites that have the latest addresses.")%> -<%=intl._("See the FAQ for a list of subscription URLs.")%> +<%=intl._t("The subscription file contains a list of i2p URLs.")%> +<%=intl._t("The addressbook application regularly checks this list for new eepsites.")%> +<%=intl._t("Those URLs refer to published hosts.txt files.")%> +<%=intl._t("The default subscription is the hosts.txt from {0}, which is updated infrequently.", "i2p-projekt.i2p")%> +<%=intl._t("So it is a good idea to add additional subscriptions to sites that have the latest addresses.")%> +<%=intl._t("See the FAQ for a list of subscription URLs.")%>

              " + _t("No messages") + "
              "); if (i > 0) { out.println( "

              "); if( sessionObject.reallyDelete ) { // TODO ngettext - out.println("

              " + _("Really delete the marked messages?") + - "

              " + button( REALLYDELETE, _("Yes, really delete them!") ) + - "
              " + button( CLEAR, _("Cancel"))); + out.println("

              " + _t("Really delete the marked messages?") + + "

              " + button( REALLYDELETE, _t("Yes, really delete them!") ) + + "
              " + button( CLEAR, _t("Cancel"))); } else { - out.println(button( DELETE, _("Delete Selected") ) + "
              "); + out.println(button( DELETE, _t("Delete Selected") ) + "
              "); out.print( - button( MARKALL, _("Mark All") ) + + button( MARKALL, _t("Mark All") ) + " " + - button( CLEAR, _("Clear All") )); + button( CLEAR, _t("Clear All") )); //"
              " + - //button( INVERT, _("Invert Selection") ) + + //button( INVERT, _t("Invert Selection") ) + //"
              "); } out.print("
              "); // moved to config page //out.print( - // _("Page Size") + ": " + + // _t("Page Size") + ": " + // " " + - // button( SETPAGESIZE, _("Set") ) ); + // button( SETPAGESIZE, _t("Set") ) ); out.print("
              "); - out.print(button(CONFIGURE, _("Settings"))); + out.print(button(CONFIGURE, _t("Settings"))); out.println("
              "); @@ -2299,18 +2299,18 @@ public class WebMail extends HttpServlet /** * first prev next last */ - private static void showPageButtons(PrintWriter out, Folder folder) { + private static void showPageButtons(PrintWriter out, Folder folder) { out.println( "
              " + ( folder.isFirstPage() ? - button2( FIRSTPAGE, _("First") ) + " " + button2( PREVPAGE, _("Previous") ) : - button( FIRSTPAGE, _("First") ) + " " + button( PREVPAGE, _("Previous") ) ) + + button2( FIRSTPAGE, _t("First") ) + " " + button2( PREVPAGE, _t("Previous") ) : + button( FIRSTPAGE, _t("First") ) + " " + button( PREVPAGE, _t("Previous") ) ) + "      " + - _("Page {0} of {1}", folder.getCurrentPage(), folder.getPages()) + + _t("Page {0} of {1}", folder.getCurrentPage(), folder.getPages()) + "      " + ( folder.isLastPage() ? - button2( NEXTPAGE, _("Next") ) + " " + button2( LASTPAGE, _("Last") ) : - button( NEXTPAGE, _("Next") ) + " " + button( LASTPAGE, _("Last") ) ) + button2( NEXTPAGE, _t("Next") ) + " " + button2( LASTPAGE, _t("Last") ) : + button( NEXTPAGE, _t("Next") ) + " " + button( LASTPAGE, _t("Last") ) ) ); } @@ -2322,7 +2322,7 @@ public class WebMail extends HttpServlet private static void showMessage( PrintWriter out, SessionObject sessionObject ) { if( sessionObject.reallyDelete ) { - out.println( "

              " + _("Really delete this message?") + " " + button( REALLYDELETE, _("Yes, really delete it!") ) + "

              " ); + out.println( "

              " + _t("Really delete this message?") + " " + button( REALLYDELETE, _t("Yes, really delete it!") ) + "

              " ); } Mail mail = sessionObject.mailCache.getMail( sessionObject.showUIDL, MailCache.FetchMode.ALL ); if(!RELEASE && mail != null && mail.hasBody()) { @@ -2334,31 +2334,31 @@ public class WebMail extends HttpServlet out.println( "-->" ); } out.println("
              "); - out.println( button( NEW, _("New") ) + spacer + - button( REPLY, _("Reply") ) + - button( REPLYALL, _("Reply All") ) + - button( FORWARD, _("Forward") ) + spacer + - button( SAVE_AS, _("Save As") ) + spacer); + out.println( button( NEW, _t("New") ) + spacer + + button( REPLY, _t("Reply") ) + + button( REPLYALL, _t("Reply All") ) + + button( FORWARD, _t("Forward") ) + spacer + + button( SAVE_AS, _t("Save As") ) + spacer); if (sessionObject.reallyDelete) - out.println(button2(DELETE, _("Delete"))); + out.println(button2(DELETE, _t("Delete"))); else - out.println(button(DELETE, _("Delete"))); + out.println(button(DELETE, _t("Delete"))); out.println("
              " + - ( sessionObject.folder.isFirstElement( sessionObject.showUIDL ) ? button2( PREV, _("Previous") ) : button( PREV, _("Previous") ) ) + spacer + - button( LIST, _("Back to Folder") ) + spacer + - ( sessionObject.folder.isLastElement( sessionObject.showUIDL ) ? button2( NEXT, _("Next") ) : button( NEXT, _("Next") ) )); + ( sessionObject.folder.isFirstElement( sessionObject.showUIDL ) ? button2( PREV, _t("Previous") ) : button( PREV, _t("Previous") ) ) + spacer + + button( LIST, _t("Back to Folder") ) + spacer + + ( sessionObject.folder.isLastElement( sessionObject.showUIDL ) ? button2( NEXT, _t("Next") ) : button( NEXT, _t("Next") ) )); out.println("
              "); //if (Config.hasConfigFile()) - // out.println(button( RELOAD, _("Reload Config") ) + spacer); - //out.println(button( LOGOUT, _("Logout") ) ); + // out.println(button( RELOAD, _t("Reload Config") ) + spacer); + //out.println(button( LOGOUT, _t("Logout") ) ); if( mail != null ) { out.println( "\n" + "\n" + - "\n" + - "\n" + - "\n" + "" ); if( mail.hasPart()) { @@ -2366,11 +2366,11 @@ public class WebMail extends HttpServlet showPart( out, mail.getPart(), 0, SHOW_HTML ); } else { - out.println( "" ); + out.println( "" ); } } else { - out.println( "" ); + out.println( "" ); } out.println( "\n

              " + _("From") + + "
              " + _t("From") + ":" + quoteHTML( mail.sender ) + "
              " + _("Subject") + + "
              " + _t("Subject") + ":" + quoteHTML( mail.formattedSubject ) + "
              " + _("Date") + + "
              " + _t("Date") + ":" + mail.quotedDate + "

              " + _("Could not fetch mail body.") + "

              " + _t("Could not fetch mail body.") + "

              " + _("Could not fetch mail.") + "

              " + _t("Could not fetch mail.") + "


              " ); } @@ -2388,13 +2388,13 @@ public class WebMail extends HttpServlet sz = Config.getProperty(Folder.PAGESIZE, Folder.DEFAULT_PAGESIZE); out.println("
              "); out.println( - _("Folder Page Size") + ": " + " " + - button( SETPAGESIZE, _("Set") ) ); + button( SETPAGESIZE, _t("Set") ) ); out.println("

              "); out.println("

              "); - out.print(_("Advanced Configuration")); + out.print(_t("Advanced Configuration")); Properties config = Config.getProperties(); out.print(":

              "); out.println("
              "); out.println("
              "); - out.println(button(SAVE, _("Save Configuration"))); - out.println(button(CANCEL, _("Cancel"))); + out.println(button(SAVE, _t("Save Configuration"))); + out.println(button(CANCEL, _t("Cancel"))); out.println("
              "); } /** translate */ - private static String _(String s) { + private static String _t(String s) { return Messages.getString(s); } /** translate */ - private static String _(String s, Object o) { + private static String _t(String s, Object o) { return Messages.getString(s, o); } /** translate */ - private static String _(String s, Object o, Object o2) { + private static String _t(String s, Object o, Object o2) { return Messages.getString(s, o, o2); } diff --git a/apps/susimail/src/src/i2p/susi/webmail/pop3/POP3MailBox.java b/apps/susimail/src/src/i2p/susi/webmail/pop3/POP3MailBox.java index f688ddc16..5ed201827 100644 --- a/apps/susimail/src/src/i2p/susi/webmail/pop3/POP3MailBox.java +++ b/apps/susimail/src/src/i2p/susi/webmail/pop3/POP3MailBox.java @@ -99,7 +99,7 @@ public class POP3MailBox implements NewMailListener { sizes = new HashMap(); synchronizer = new Object(); // this appears in the UI so translate - lastLine = _("No response from server"); + lastLine = _t("No response from server"); lastActive = new AtomicLong(System.currentTimeMillis()); lastChecked = new AtomicLong(); delayedDeleter = new DelayedDeleter(this); @@ -665,15 +665,15 @@ public class POP3MailBox implements NewMailListener { idleCloser = new IdleCloser(this); } else { if (lastError.equals("")) - lastError = _("Error connecting to server"); + lastError = _t("Error connecting to server"); close(); } } catch (NumberFormatException e1) { - lastError = _("Error opening mailbox") + ": " + e1; + lastError = _t("Error opening mailbox") + ": " + e1; } catch (IOException e1) { - lastError = _("Error opening mailbox") + ": " + e1.getLocalizedMessage(); + lastError = _t("Error opening mailbox") + ": " + e1.getLocalizedMessage(); } } } @@ -748,7 +748,7 @@ public class POP3MailBox implements NewMailListener { } } else { Debug.debug(Debug.DEBUG, "sendCmd1a: (" + cmd + ") NO RESPONSE"); - lastError = _("No response from server"); + lastError = _t("No response from server"); throw new IOException(lastError); } return result; @@ -790,7 +790,7 @@ public class POP3MailBox implements NewMailListener { String foo = DataHelper.readLine(in); updateActivity(); if (foo == null) { - lastError = _("No response from server"); + lastError = _t("No response from server"); throw new IOException(lastError); } sr.response = foo.trim(); @@ -1022,7 +1022,7 @@ public class POP3MailBox implements NewMailListener { e = e.substring(5); // translate this common error if (e.trim().equals("Login failed.")) - e = _("Login failed"); + e = _t("Login failed"); return e; } @@ -1257,7 +1257,7 @@ public class POP3MailBox implements NewMailListener { } /** translate */ - private static String _(String s) { + private static String _t(String s) { return Messages.getString(s); } } diff --git a/apps/susimail/src/src/i2p/susi/webmail/smtp/SMTPClient.java b/apps/susimail/src/src/i2p/susi/webmail/smtp/SMTPClient.java index f3f755698..046dcbef5 100644 --- a/apps/susimail/src/src/i2p/susi/webmail/smtp/SMTPClient.java +++ b/apps/susimail/src/src/i2p/susi/webmail/smtp/SMTPClient.java @@ -211,7 +211,7 @@ public class SMTPClient { try { socket = new Socket( host, port ); } catch (Exception e) { - error += _("Cannot connect") + ": " + e.getMessage() + '\n'; + error += _t("Cannot connect") + ": " + e.getMessage() + '\n'; ok = false; } try { @@ -222,7 +222,7 @@ public class SMTPClient { socket.setSoTimeout(120*1000); int result = sendCmd(null); if (result != 220) { - error += _("Server refused connection") + " (" + result + ")\n"; + error += _t("Server refused connection") + " (" + result + ")\n"; ok = false; } } @@ -234,7 +234,7 @@ public class SMTPClient { if (r.result == 250) { supportsPipelining = r.recv.contains("PIPELINING"); } else { - error += _("Server refused connection") + " (" + r.result + ")\n"; + error += _t("Server refused connection") + " (" + r.result + ")\n"; ok = false; } } @@ -246,7 +246,7 @@ public class SMTPClient { cmds.add(new SendExpect(base64.encode(user), 334)); cmds.add(new SendExpect(base64.encode(pass), 235)); if (sendCmds(cmds) != 3) { - error += _("Login failed") + '\n'; + error += _t("Login failed") + '\n'; ok = false; } } @@ -259,7 +259,7 @@ public class SMTPClient { cmds.add(new SendExpect("DATA", 354)); if (sendCmds(cmds) != cmds.size()) { // TODO which recipient? - error += _("Mail rejected") + '\n'; + error += _t("Mail rejected") + '\n'; ok = false; } } @@ -273,10 +273,10 @@ public class SMTPClient { if (result == 250) mailSent = true; else - error += _("Error sending mail") + " (" + result + ")\n"; + error += _t("Error sending mail") + " (" + result + ")\n"; } } catch (IOException e) { - error += _("Error sending mail") + ": " + e.getMessage() + '\n'; + error += _t("Error sending mail") + ": " + e.getMessage() + '\n'; } catch (EncodingException e) { error += e.getMessage(); @@ -324,7 +324,7 @@ public class SMTPClient { } /** translate */ - private static String _(String s) { + private static String _t(String s) { return Messages.getString(s); } } diff --git a/build.properties b/build.properties index 195a13c6b..9e219c333 100644 --- a/build.properties +++ b/build.properties @@ -11,7 +11,10 @@ # Note: Include the trailing slash! Don't surround the URL in quotes! javasedocs.url=http://docs.oracle.com/javase/6/docs/api/ javaeedocs.url=http://docs.oracle.com/javaee/6/api/ -jettydocs.url=http://download.eclipse.org/jetty/stable-8/apidocs/ +# The following link is dead, perhaps temporarily, +# perhaps not, as they move 7 and 8 to unsupported status. +#jettydocs.url=http://download.eclipse.org/jetty/stable-8/apidocs/ +jettydocs.url=http://download.eclipse.org/jetty/8.1.17.v20150415/apidocs/ jrobindocs.url=http://docs.i2p-projekt.de/jrobin/javadoc/ wrapperdocs.url=http://wrapper.tanukisoftware.com/jdoc/ # these are only for unit test javadocs diff --git a/build.xml b/build.xml index 8b2ef5085..ea10ca4bb 100644 --- a/build.xml +++ b/build.xml @@ -100,8 +100,11 @@ - + + + + @@ -450,7 +453,7 @@ if (newBuildNumber != 'unknown' && newBuildNumber != null) { echo = project.createTask("echo"); project.setProperty("new.i2p.build.number", newBuildNumber); - echo.setMessage("Build number is now: " + newBuildNumber); + echo.setMessage("Build number is now: " + newBuildNumber + project.getProperty("build.extra")); echo.perform(); } ]]> @@ -1399,6 +1402,9 @@ ---------------- EARLIER HISTORY IS AVAILABLE IN THE SOURCE PACKAGE" + + + @@ -1763,9 +1769,11 @@ since preppkg puts too much stuff in pkg-temp --> + + diff --git a/core/java/src/net/i2p/CoreVersion.java b/core/java/src/net/i2p/CoreVersion.java index 4343c9074..2a1175c6e 100644 --- a/core/java/src/net/i2p/CoreVersion.java +++ b/core/java/src/net/i2p/CoreVersion.java @@ -18,7 +18,7 @@ public class CoreVersion { /** deprecated */ public final static String ID = "Monotone"; - public final static String VERSION = "0.9.21"; + public final static String VERSION = "0.9.22"; /** * For Vuze. diff --git a/core/java/src/net/i2p/I2PAppContext.java b/core/java/src/net/i2p/I2PAppContext.java index b59a40586..bae357260 100644 --- a/core/java/src/net/i2p/I2PAppContext.java +++ b/core/java/src/net/i2p/I2PAppContext.java @@ -84,6 +84,7 @@ public class I2PAppContext { private RandomSource _random; private KeyGenerator _keyGenerator; protected KeyRing _keyRing; // overridden in RouterContext + @SuppressWarnings("deprecation") private SimpleScheduler _simpleScheduler; private SimpleTimer _simpleTimer; private SimpleTimer2 _simpleTimer2; @@ -532,7 +533,7 @@ public class I2PAppContext { * @return set of Strings containing the names of defined system properties */ @SuppressWarnings({ "unchecked", "rawtypes" }) - public Set getPropertyNames() { + public Set getPropertyNames() { // clone to avoid ConcurrentModificationException Set names = new HashSet((Set) (Set) ((Properties) System.getProperties().clone()).keySet()); // TODO-Java6: s/keySet()/stringPropertyNames()/ if (_overrideProps != null) @@ -940,6 +941,7 @@ public class I2PAppContext { * @since 0.9 to replace static instance in the class * @deprecated in 0.9.20, use simpleTimer2() */ + @SuppressWarnings("deprecation") public SimpleScheduler simpleScheduler() { if (!_simpleSchedulerInitialized) initializeSimpleScheduler(); diff --git a/core/java/src/net/i2p/client/I2PSession.java b/core/java/src/net/i2p/client/I2PSession.java index 458b9a892..818cb5983 100644 --- a/core/java/src/net/i2p/client/I2PSession.java +++ b/core/java/src/net/i2p/client/I2PSession.java @@ -18,6 +18,7 @@ import net.i2p.data.Destination; import net.i2p.data.Hash; import net.i2p.data.PrivateKey; import net.i2p.data.SessionKey; +import net.i2p.data.SessionTag; import net.i2p.data.SigningPrivateKey; /** @@ -98,7 +99,7 @@ public interface I2PSession { * objects that were sent along side the given keyUsed. * @return success */ - public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set tagsSent) throws I2PSessionException; + public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set tagsSent) throws I2PSessionException; /** * End-to-End Crypto is disabled, tags and keys are ignored. @@ -106,7 +107,7 @@ public interface I2PSession { * @param tagsSent UNUSED, IGNORED. * @return success */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent) throws I2PSessionException; + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent) throws I2PSessionException; /** * End-to-End Crypto is disabled, tags and keys are ignored. @@ -116,7 +117,7 @@ public interface I2PSession { * @return success * @since 0.7.1 */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire) throws I2PSessionException; + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire) throws I2PSessionException; /** * See I2PSessionMuxedImpl for proto/port details. @@ -133,7 +134,7 @@ public interface I2PSession { * @return success * @since 0.7.1 */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, int proto, int fromPort, int toPort) throws I2PSessionException; /** @@ -152,7 +153,7 @@ public interface I2PSession { * @return success * @since 0.7.1 */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire, + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire, int proto, int fromPort, int toPort) throws I2PSessionException; /** @@ -171,7 +172,7 @@ public interface I2PSession { * @return success * @since 0.8.4 */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire, + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire, int proto, int fromPort, int toPort, int flags) throws I2PSessionException; /** diff --git a/core/java/src/net/i2p/client/impl/I2CPMessageProducer.java b/core/java/src/net/i2p/client/impl/I2CPMessageProducer.java index f44b897a3..bcdd0b4ea 100644 --- a/core/java/src/net/i2p/client/impl/I2CPMessageProducer.java +++ b/core/java/src/net/i2p/client/impl/I2CPMessageProducer.java @@ -132,7 +132,7 @@ class I2CPMessageProducer { * @param newKey unused - no end-to-end crypto */ public void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SessionTag tag, - SessionKey key, Set tags, SessionKey newKey, long expires) throws I2PSessionException { + SessionKey key, Set tags, SessionKey newKey, long expires) throws I2PSessionException { sendMessage(session, dest, nonce, payload, expires, 0); } diff --git a/core/java/src/net/i2p/client/impl/I2PSessionImpl2.java b/core/java/src/net/i2p/client/impl/I2PSessionImpl2.java index 4eddcc30e..e110889be 100644 --- a/core/java/src/net/i2p/client/impl/I2PSessionImpl2.java +++ b/core/java/src/net/i2p/client/impl/I2PSessionImpl2.java @@ -29,6 +29,7 @@ import net.i2p.client.SendMessageStatusListener; import net.i2p.data.DataHelper; import net.i2p.data.Destination; import net.i2p.data.SessionKey; +import net.i2p.data.SessionTag; import net.i2p.data.i2cp.MessageId; import net.i2p.data.i2cp.MessageStatusMessage; import net.i2p.util.Log; @@ -210,17 +211,17 @@ class I2PSessionImpl2 extends I2PSessionImpl { throw new UnsupportedOperationException("Use MuxedImpl"); } /** @throws UnsupportedOperationException always, use MuxedImpl */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, int proto, int fromport, int toport) throws I2PSessionException { throw new UnsupportedOperationException("Use MuxedImpl"); } /** @throws UnsupportedOperationException always, use MuxedImpl */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire, + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire, int proto, int fromport, int toport) throws I2PSessionException { throw new UnsupportedOperationException("Use MuxedImpl"); } /** @throws UnsupportedOperationException always, use MuxedImpl */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire, + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expire, int proto, int fromport, int toport, int flags) throws I2PSessionException { throw new UnsupportedOperationException("Use MuxedImpl"); } @@ -253,7 +254,7 @@ class I2PSessionImpl2 extends I2PSessionImpl { * @param tagsSent unused - no end-to-end crypto */ @Override - public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set tagsSent) throws I2PSessionException { + public boolean sendMessage(Destination dest, byte[] payload, SessionKey keyUsed, Set tagsSent) throws I2PSessionException { return sendMessage(dest, payload, 0, payload.length, keyUsed, tagsSent, 0); } @@ -261,7 +262,7 @@ class I2PSessionImpl2 extends I2PSessionImpl { * @param keyUsed unused - no end-to-end crypto * @param tagsSent unused - no end-to-end crypto */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent) + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent) throws I2PSessionException { return sendMessage(dest, payload, offset, size, keyUsed, tagsSent, 0); } @@ -272,7 +273,7 @@ class I2PSessionImpl2 extends I2PSessionImpl { * @param keyUsed unused - no end-to-end crypto * @param tagsSent unused - no end-to-end crypto */ - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expires) + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, long expires) throws I2PSessionException { if (_log.shouldLog(Log.DEBUG)) _log.debug("sending message"); synchronized (_stateLock) { @@ -339,7 +340,7 @@ class I2PSessionImpl2 extends I2PSessionImpl { * @param keyUsed unused - no end-to-end crypto * @param tagsSent unused - no end-to-end crypto */ - protected boolean sendBestEffort(Destination dest, byte payload[], SessionKey keyUsed, Set tagsSent, long expires) + protected boolean sendBestEffort(Destination dest, byte payload[], SessionKey keyUsed, Set tagsSent, long expires) throws I2PSessionException { return sendBestEffort(dest, payload, expires, 0); } diff --git a/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java b/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java index 46e551e49..6ee2b1e11 100644 --- a/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java +++ b/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java @@ -19,6 +19,7 @@ import net.i2p.client.SendMessageStatusListener; import net.i2p.data.DataHelper; import net.i2p.data.Destination; import net.i2p.data.SessionKey; +import net.i2p.data.SessionTag; import net.i2p.data.i2cp.MessagePayloadMessage; import net.i2p.util.Log; @@ -163,7 +164,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 { */ @Override public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, - SessionKey keyUsed, Set tagsSent, long expires) + SessionKey keyUsed, Set tagsSent, long expires) throws I2PSessionException { return sendMessage(dest, payload, offset, size, keyUsed, tagsSent, 0, PROTO_UNSPECIFIED, PORT_UNSPECIFIED, PORT_UNSPECIFIED); } @@ -173,7 +174,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 { * @param tagsSent unused - no end-to-end crypto */ @Override - public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, + public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, SessionKey keyUsed, Set tagsSent, int proto, int fromport, int toport) throws I2PSessionException { return sendMessage(dest, payload, offset, size, keyUsed, tagsSent, 0, proto, fromport, toport); } @@ -192,7 +193,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 { */ @Override public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, - SessionKey keyUsed, Set tagsSent, long expires, + SessionKey keyUsed, Set tagsSent, long expires, int proto, int fromPort, int toPort) throws I2PSessionException { return sendMessage(dest, payload, offset, size, keyUsed, tagsSent, 0, proto, fromPort, toPort, 0); @@ -213,7 +214,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 { */ @Override public boolean sendMessage(Destination dest, byte[] payload, int offset, int size, - SessionKey keyUsed, Set tagsSent, long expires, + SessionKey keyUsed, Set tagsSent, long expires, int proto, int fromPort, int toPort, int flags) throws I2PSessionException { payload = prepPayload(payload, offset, size, proto, fromPort, toPort); diff --git a/core/java/src/net/i2p/client/naming/BlockfileNamingService.java b/core/java/src/net/i2p/client/naming/BlockfileNamingService.java index ec12eb792..efa8b3e06 100644 --- a/core/java/src/net/i2p/client/naming/BlockfileNamingService.java +++ b/core/java/src/net/i2p/client/naming/BlockfileNamingService.java @@ -621,11 +621,33 @@ public class BlockfileNamingService extends DummyNamingService { ////////// Start NamingService API /* + * + * Will strip a "www." prefix and retry if lookup fails + * + * @param hostname upper/lower case ok * @param options If non-null and contains the key "list", lookup in * that list only, otherwise all lists */ @Override public Destination lookup(String hostname, Properties lookupOptions, Properties storedOptions) { + Destination rv = lookup2(hostname, lookupOptions, storedOptions); + if (rv == null) { + // if hostname starts with "www.", strip and try again + // but not for www.i2p + hostname = hostname.toLowerCase(Locale.US); + if (hostname.startsWith("www.") && hostname.length() > 7) { + hostname = hostname.substring(4); + rv = lookup2(hostname, lookupOptions, storedOptions); + } + } + return rv; + } + + /* + * @param options If non-null and contains the key "list", lookup in + * that list only, otherwise all lists + */ + private Destination lookup2(String hostname, Properties lookupOptions, Properties storedOptions) { String listname = null; if (lookupOptions != null) listname = lookupOptions.getProperty("list"); diff --git a/core/java/src/net/i2p/client/naming/MetaNamingService.java b/core/java/src/net/i2p/client/naming/MetaNamingService.java index ffae355a5..5a4ebd275 100644 --- a/core/java/src/net/i2p/client/naming/MetaNamingService.java +++ b/core/java/src/net/i2p/client/naming/MetaNamingService.java @@ -41,8 +41,8 @@ public class MetaNamingService extends DummyNamingService { while (tok.hasMoreTokens()) { try { Class cls = Class.forName(tok.nextToken()); - Constructor con = cls.getConstructor(new Class[] { I2PAppContext.class }); - addNamingService((NamingService)con.newInstance(new Object[] { context }), false); + Constructor con = cls.getConstructor(I2PAppContext.class); + addNamingService((NamingService)con.newInstance(), false); } catch (Exception ex) { } } diff --git a/core/java/src/net/i2p/client/naming/NamingService.java b/core/java/src/net/i2p/client/naming/NamingService.java index 5a38c9e7f..78e04232d 100644 --- a/core/java/src/net/i2p/client/naming/NamingService.java +++ b/core/java/src/net/i2p/client/naming/NamingService.java @@ -536,8 +536,8 @@ public abstract class NamingService { String impl = context.getProperty(PROP_IMPL, DEFAULT_IMPL); try { Class cls = Class.forName(impl); - Constructor con = cls.getConstructor(new Class[] { I2PAppContext.class }); - instance = (NamingService)con.newInstance(new Object[] { context }); + Constructor con = cls.getConstructor(I2PAppContext.class); + instance = (NamingService)con.newInstance(context); } catch (Exception ex) { Log log = context.logManager().getLog(NamingService.class); // Blockfile may throw RuntimeException but HostsTxt won't diff --git a/core/java/src/net/i2p/client/naming/SingleFileNamingService.java b/core/java/src/net/i2p/client/naming/SingleFileNamingService.java index c331fae01..219c61bbc 100644 --- a/core/java/src/net/i2p/client/naming/SingleFileNamingService.java +++ b/core/java/src/net/i2p/client/naming/SingleFileNamingService.java @@ -77,6 +77,8 @@ public class SingleFileNamingService extends NamingService { } /** + * Will strip a "www." prefix and retry if lookup fails + * * @param hostname case-sensitive; caller should convert to lower case * @param lookupOptions ignored * @param storedOptions ignored @@ -85,6 +87,8 @@ public class SingleFileNamingService extends NamingService { public Destination lookup(String hostname, Properties lookupOptions, Properties storedOptions) { try { String key = getKey(hostname); + if (key == null && hostname.startsWith("www.") && hostname.length() > 7) + key = getKey(hostname.substring(4)); if (key != null) return lookupBase64(key); } catch (Exception ioe) { diff --git a/core/java/src/net/i2p/crypto/CryptixAESEngine.java b/core/java/src/net/i2p/crypto/CryptixAESEngine.java index f7429c6d5..60eb63048 100644 --- a/core/java/src/net/i2p/crypto/CryptixAESEngine.java +++ b/core/java/src/net/i2p/crypto/CryptixAESEngine.java @@ -44,28 +44,7 @@ public class CryptixAESEngine extends AESEngine { /** see test results below */ private static final int MIN_SYSTEM_AES_LENGTH = 704; - private static final boolean USE_SYSTEM_AES; - static { - boolean systemOK = false; - if (hasAESNI()) { - try { - systemOK = Cipher.getMaxAllowedKeyLength("AES") >= 256; - } catch (GeneralSecurityException gse) { - // a NoSuchAlgorithmException - } catch (NoSuchMethodError nsme) { - // JamVM, gij - try { - Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); - SecretKeySpec key = new SecretKeySpec(new byte[32], "AES"); - cipher.init(Cipher.ENCRYPT_MODE, key); - systemOK = true; - } catch (GeneralSecurityException gse) { - } - } - } - USE_SYSTEM_AES = systemOK; - //System.out.println("Using system AES? " + systemOK); - } + private static final boolean USE_SYSTEM_AES = hasAESNI() && CryptoCheck.isUnlimited(); /** * Do we have AES-NI support in the processor and JVM? diff --git a/core/java/src/net/i2p/crypto/CryptoCheck.java b/core/java/src/net/i2p/crypto/CryptoCheck.java new file mode 100644 index 000000000..31eac62dc --- /dev/null +++ b/core/java/src/net/i2p/crypto/CryptoCheck.java @@ -0,0 +1,47 @@ +package net.i2p.crypto; + +import java.security.GeneralSecurityException; +import javax.crypto.Cipher; +import javax.crypto.spec.SecretKeySpec; + +/** + * Moved from CryptixAESEngine and net.i2p.router.tasks.CryptoChecker + * + * @since 0.9.23 + */ +public class CryptoCheck { + + private static final boolean _isUnlimited; + + static { + boolean unlimited = false; + try { + unlimited = Cipher.getMaxAllowedKeyLength("AES") >= 256; + } catch (GeneralSecurityException gse) { + // a NoSuchAlgorithmException + } catch (NoSuchMethodError nsme) { + // JamVM, gij + try { + Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); + SecretKeySpec key = new SecretKeySpec(new byte[32], "AES"); + cipher.init(Cipher.ENCRYPT_MODE, key); + unlimited = true; + } catch (GeneralSecurityException gse) { + } + } + _isUnlimited = unlimited; + } + + private CryptoCheck() {} + + /** + * Do we have unlimited crypto? + */ + public static boolean isUnlimited() { + return _isUnlimited; + } + + public static void main(String args[]) { + System.out.println("Unlimited? " + isUnlimited()); + } +} diff --git a/core/java/src/net/i2p/crypto/CryptoConstants.java b/core/java/src/net/i2p/crypto/CryptoConstants.java index 94facd366..b9e0327dd 100644 --- a/core/java/src/net/i2p/crypto/CryptoConstants.java +++ b/core/java/src/net/i2p/crypto/CryptoConstants.java @@ -92,8 +92,8 @@ public class CryptoConstants { if (ECConstants.isBCAvailable()) { try { Class cls = Class.forName("org.bouncycastle.jce.spec.ElGamalParameterSpec"); - Constructor con = cls.getConstructor(new Class[] {BigInteger.class, BigInteger.class}); - spec = (AlgorithmParameterSpec)con.newInstance(new Object[] {elgp, elgg}); + Constructor con = cls.getConstructor(BigInteger.class, BigInteger.class); + spec = (AlgorithmParameterSpec)con.newInstance(elgp, elgg); //System.out.println("BC ElG spec loaded"); } catch (Exception e) { //System.out.println("BC ElG spec failed"); diff --git a/core/java/src/net/i2p/crypto/ECConstants.java b/core/java/src/net/i2p/crypto/ECConstants.java index affe6e4e8..d9b111e23 100644 --- a/core/java/src/net/i2p/crypto/ECConstants.java +++ b/core/java/src/net/i2p/crypto/ECConstants.java @@ -42,8 +42,8 @@ class ECConstants { if (Security.getProvider("BC") == null) { try { Class cls = Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider"); - Constructor con = cls.getConstructor(new Class[0]); - Provider bc = (Provider)con.newInstance(new Object[0]); + Constructor con = cls.getConstructor(); + Provider bc = (Provider)con.newInstance(); Security.addProvider(bc); log("Added BC provider"); loaded = true; diff --git a/core/java/src/net/i2p/crypto/KeyStoreUtil.java b/core/java/src/net/i2p/crypto/KeyStoreUtil.java index c374ad120..06b73cea8 100644 --- a/core/java/src/net/i2p/crypto/KeyStoreUtil.java +++ b/core/java/src/net/i2p/crypto/KeyStoreUtil.java @@ -501,6 +501,7 @@ public class KeyStoreUtil { l.log(level, msg, t); } +/**** public static void main(String[] args) { try { if (args.length > 0) { @@ -521,4 +522,5 @@ public class KeyStoreUtil { e.printStackTrace(); } } +****/ } diff --git a/core/java/src/net/i2p/crypto/SigType.java b/core/java/src/net/i2p/crypto/SigType.java index ca05f8eed..48ad93e0a 100644 --- a/core/java/src/net/i2p/crypto/SigType.java +++ b/core/java/src/net/i2p/crypto/SigType.java @@ -11,7 +11,9 @@ import java.util.Map; import net.i2p.crypto.eddsa.spec.EdDSANamedCurveTable; import net.i2p.data.Hash; +import net.i2p.data.SigningPrivateKey; import net.i2p.data.SimpleDataStructure; +import net.i2p.util.SystemVersion; /** * Defines the properties for various signature types @@ -193,8 +195,24 @@ public enum SigType { return true; try { getParams(); - if (getBaseAlgorithm() != SigAlgo.EdDSA) - Signature.getInstance(getAlgorithmName()); + if (getBaseAlgorithm() != SigAlgo.EdDSA) { + Signature jsig = Signature.getInstance(getAlgorithmName()); + if (getBaseAlgorithm() == SigAlgo.EC && SystemVersion.isGentoo() ) { + // Do a full keygen/sign test on Gentoo, because it lies. Keygen works but sigs fail. + // https://bugs.gentoo.org/show_bug.cgi?id=528338 + // http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2497 + // http://zzz.i2p/topics/1931 + // Be sure nothing in the code paths below calls isAvailable() + // get an I2P keypair + SimpleDataStructure[] keys = KeyGenerator.getInstance().generateSigningKeys(this); + SigningPrivateKey privKey = (SigningPrivateKey) keys[1]; + // convert privkey back to Java key and sign + jsig.initSign(SigUtil.toJavaECKey(privKey)); + // use the pubkey as random data + jsig.update(keys[0].getData()); + jsig.sign(); + } + } getDigestInstance(); getHashInstance(); } catch (Exception e) { diff --git a/core/java/src/net/i2p/data/ByteArray.java b/core/java/src/net/i2p/data/ByteArray.java index 1801b122e..50670c760 100644 --- a/core/java/src/net/i2p/data/ByteArray.java +++ b/core/java/src/net/i2p/data/ByteArray.java @@ -16,7 +16,7 @@ import java.io.Serializable; * maps, and the like. * */ -public class ByteArray implements Serializable, Comparable { +public class ByteArray implements Serializable, Comparable { private byte[] _data; private int _valid; private int _offset; @@ -85,9 +85,8 @@ public class ByteArray implements Serializable, Comparable { return (llen == rlen) && DataHelper.eq(lhs, loff, rhs, roff, llen); } - public final int compareTo(Object obj) { - if (obj.getClass() != getClass()) throw new ClassCastException("invalid object: " + obj); - return DataHelper.compareTo(_data, ((ByteArray)obj).getData()); + public final int compareTo(ByteArray ba) { + return DataHelper.compareTo(_data, ba.getData()); } @Override diff --git a/core/java/src/net/i2p/data/Certificate.java b/core/java/src/net/i2p/data/Certificate.java index 7b40b5099..aa2624b8a 100644 --- a/core/java/src/net/i2p/data/Certificate.java +++ b/core/java/src/net/i2p/data/Certificate.java @@ -47,16 +47,17 @@ public class Certificate extends DataStructureImpl { public final static int CERTIFICATE_TYPE_KEY = 5; /** - * If null cert, return immutable static instance, else create new + * If null, P256 key, or Ed25519 key cert, return immutable static instance, else create new * @throws DataFormatException if not enough bytes * @since 0.8.3 */ public static Certificate create(byte[] data, int off) throws DataFormatException { int type; byte[] payload; + int length; try { type = data[off] & 0xff; - int length = (int) DataHelper.fromLong(data, off + 1, 2); + length = (int) DataHelper.fromLong(data, off + 1, 2); if (type == 0 && length == 0) return NULL_CERT; // from here down roughly the same as readBytes() below @@ -68,6 +69,12 @@ public class Certificate extends DataStructureImpl { throw new DataFormatException("not enough bytes", aioobe); } if (type == CERTIFICATE_TYPE_KEY) { + if (length == 4) { + if (Arrays.equals(payload, KeyCertificate.Ed25519_PAYLOAD)) + return KeyCertificate.ELG_Ed25519_CERT; + if (Arrays.equals(payload, KeyCertificate.ECDSA256_PAYLOAD)) + return KeyCertificate.ELG_ECDSA256_CERT; + } try { return new KeyCertificate(payload); } catch (DataFormatException dfe) { @@ -78,7 +85,7 @@ public class Certificate extends DataStructureImpl { } /** - * If null cert, return immutable static instance, else create new + * If null, P256 key, or Ed25519 key cert, return immutable static instance, else create new * @since 0.8.3 */ public static Certificate create(InputStream in) throws DataFormatException, IOException { @@ -93,8 +100,15 @@ public class Certificate extends DataStructureImpl { int read = DataHelper.read(in, payload); if (read != length) throw new DataFormatException("Not enough bytes for the payload (read: " + read + " length: " + length + ')'); - if (type == CERTIFICATE_TYPE_KEY) + if (type == CERTIFICATE_TYPE_KEY) { + if (length == 4) { + if (Arrays.equals(payload, KeyCertificate.Ed25519_PAYLOAD)) + return KeyCertificate.ELG_Ed25519_CERT; + if (Arrays.equals(payload, KeyCertificate.ECDSA256_PAYLOAD)) + return KeyCertificate.ELG_ECDSA256_CERT; + } return new KeyCertificate(payload); + } return new Certificate(type, payload); } diff --git a/core/java/src/net/i2p/data/DataHelper.java b/core/java/src/net/i2p/data/DataHelper.java index f35a6ddb6..352529a6e 100644 --- a/core/java/src/net/i2p/data/DataHelper.java +++ b/core/java/src/net/i2p/data/DataHelper.java @@ -1546,7 +1546,7 @@ public class DataHelper { // years t = ngettext("1 year", "{0} years", (int) (ms / (365L * 24 * 60 * 60 * 1000))); } else { - return _("n/a"); + return _t("n/a"); } // Replace minus sign to work around // bug in Chrome (and IE?), line breaks at the minus sign @@ -1593,7 +1593,7 @@ public class DataHelper { // years t = ngettext("1 year", "{0} years", (int) (ms / (365L * 24 * 60 * 60 * 1000))); } else { - return _("n/a"); + return _t("n/a"); } if (ms < 0) t = t.replace("-", "−"); @@ -1602,7 +1602,7 @@ public class DataHelper { private static final String BUNDLE_NAME = "net.i2p.router.web.messages"; - private static String _(String key) { + private static String _t(String key) { return Translate.getString(key, I2PAppContext.getGlobalContext(), BUNDLE_NAME); } diff --git a/core/java/src/net/i2p/data/KeyCertificate.java b/core/java/src/net/i2p/data/KeyCertificate.java index 86078658f..1c35d6c31 100644 --- a/core/java/src/net/i2p/data/KeyCertificate.java +++ b/core/java/src/net/i2p/data/KeyCertificate.java @@ -17,15 +17,41 @@ public class KeyCertificate extends Certificate { public static final int HEADER_LENGTH = 4; + /** @since 0.9.22 pkg private for Certificate.create() */ + static final byte[] Ed25519_PAYLOAD = new byte[] { + 0, (byte) (SigType.EdDSA_SHA512_Ed25519.getCode()), 0, 0 + }; + + /** @since 0.9.22 pkg private for Certificate.create() */ + static final byte[] ECDSA256_PAYLOAD = new byte[] { + 0, (byte) (SigType.ECDSA_SHA256_P256.getCode()), 0, 0 + }; + + /** + * An immutable ElG/ECDSA-P256 certificate. + */ public static final KeyCertificate ELG_ECDSA256_CERT; + + /** + * An immutable ElG/Ed25519 certificate. + * @since 0.9.22 + */ + public static final KeyCertificate ELG_Ed25519_CERT; + static { KeyCertificate kc; try { kc = new ECDSA256Cert(); } catch (DataFormatException dfe) { - kc = null; // won't happen + throw new RuntimeException(dfe); // won't happen } ELG_ECDSA256_CERT = kc; + try { + kc = new Ed25519Cert(); + } catch (DataFormatException dfe) { + throw new RuntimeException(dfe); // won't happen + } + ELG_Ed25519_CERT = kc; } /** @@ -185,19 +211,17 @@ public class KeyCertificate extends Certificate { /** * An immutable ElG/ECDSA-256 certificate. - * @since 0.8.3 */ private static final class ECDSA256Cert extends KeyCertificate { private static final byte[] ECDSA256_DATA = new byte[] { CERTIFICATE_TYPE_KEY, 0, HEADER_LENGTH, 0, (byte) (SigType.ECDSA_SHA256_P256.getCode()), 0, 0 }; private static final int ECDSA256_LENGTH = ECDSA256_DATA.length; - private static final byte[] ECDSA256_PAYLOAD = new byte[] { - 0, (byte) (SigType.ECDSA_SHA256_P256.getCode()), 0, 0 - }; + private final int _hashcode; public ECDSA256Cert() throws DataFormatException { super(ECDSA256_PAYLOAD); + _hashcode = super.hashCode(); } /** @throws RuntimeException always */ @@ -246,7 +270,75 @@ public class KeyCertificate extends Certificate { /** Overridden for efficiency */ @Override public int hashCode() { - return 1234567; + return _hashcode; + } + } + + /** + * An immutable ElG/Ed25519 certificate. + * @since 0.9.22 + */ + private static final class Ed25519Cert extends KeyCertificate { + private static final byte[] ED_DATA = new byte[] { CERTIFICATE_TYPE_KEY, + 0, HEADER_LENGTH, + 0, (byte) SigType.EdDSA_SHA512_Ed25519.getCode(), + 0, 0 + }; + private static final int ED_LENGTH = ED_DATA.length; + private final int _hashcode; + + public Ed25519Cert() throws DataFormatException { + super(Ed25519_PAYLOAD); + _hashcode = super.hashCode(); + } + + /** @throws RuntimeException always */ + @Override + public void setCertificateType(int type) { + throw new RuntimeException("Data already set"); + } + + /** @throws RuntimeException always */ + @Override + public void setPayload(byte[] payload) { + throw new RuntimeException("Data already set"); + } + + /** @throws RuntimeException always */ + @Override + public void readBytes(InputStream in) throws DataFormatException, IOException { + throw new RuntimeException("Data already set"); + } + + /** Overridden for efficiency */ + @Override + public void writeBytes(OutputStream out) throws IOException { + out.write(ED_DATA); + } + + /** Overridden for efficiency */ + @Override + public int writeBytes(byte target[], int offset) { + System.arraycopy(ED_DATA, 0, target, offset, ED_LENGTH); + return ED_LENGTH; + } + + /** @throws RuntimeException always */ + @Override + public int readBytes(byte source[], int offset) throws DataFormatException { + throw new RuntimeException("Data already set"); + } + + /** Overridden for efficiency */ + @Override + public int size() { + return ED_LENGTH; + } + + /** Overridden for efficiency */ + @Override + public int hashCode() { + return _hashcode; } } } diff --git a/core/java/src/net/i2p/data/SDSCache.java b/core/java/src/net/i2p/data/SDSCache.java index ab7768014..f38fe6bbf 100644 --- a/core/java/src/net/i2p/data/SDSCache.java +++ b/core/java/src/net/i2p/data/SDSCache.java @@ -46,7 +46,6 @@ import net.i2p.util.SystemVersion; public class SDSCache { //private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(SDSCache.class); - private static final Class[] conArg = new Class[] { byte[].class }; private static final double MIN_FACTOR = 0.20; private static final double MAX_FACTOR = 5.0; private static final double FACTOR; @@ -74,7 +73,7 @@ public class SDSCache { _cache = new LHMCache>(size); _datalen = len; try { - _rvCon = rvClass.getConstructor(conArg); + _rvCon = rvClass.getConstructor(byte[].class); } catch (NoSuchMethodException e) { throw new RuntimeException("SDSCache init error", e); } diff --git a/core/java/src/net/i2p/kademlia/KBucketSet.java b/core/java/src/net/i2p/kademlia/KBucketSet.java index a2d0610a6..0d5daa223 100644 --- a/core/java/src/net/i2p/kademlia/KBucketSet.java +++ b/core/java/src/net/i2p/kademlia/KBucketSet.java @@ -628,6 +628,7 @@ public class KBucketSet { * @param data size <= SDS length, else throws IAE * Can be 1 bigger if top byte is zero */ + @SuppressWarnings("unchecked") private T makeKey(byte[] data) { int len = _us.length(); int dlen = data.length; diff --git a/core/java/src/net/i2p/util/Addresses.java b/core/java/src/net/i2p/util/Addresses.java index d522167f4..e4a78cc37 100644 --- a/core/java/src/net/i2p/util/Addresses.java +++ b/core/java/src/net/i2p/util/Addresses.java @@ -15,6 +15,8 @@ import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; +import org.apache.http.conn.util.InetAddressUtils; + import net.i2p.I2PAppContext; /** @@ -229,10 +231,10 @@ public abstract class Addresses { I2PAppContext ctx = I2PAppContext.getCurrentContext(); if (ctx != null && ctx.isRouterContext()) { long maxMemory = SystemVersion.getMaxMemory(); - long min = 128; + long min = 256; long max = 4096; - // 512 nominal for 128 MB - size = (int) Math.max(min, Math.min(max, 1 + (maxMemory / (256*1024)))); + // 1024 nominal for 128 MB + size = (int) Math.max(min, Math.min(max, 1 + (maxMemory / (128*1024)))); } else { size = 32; } @@ -260,12 +262,9 @@ public abstract class Addresses { } if (rv == null) { try { - boolean isIPv4 = host.replaceAll("[0-9\\.]", "").length() == 0; - if (isIPv4 && host.replaceAll("[0-9]", "").length() != 3) - return null; rv = InetAddress.getByName(host).getAddress(); - if (isIPv4 || - host.replaceAll("[0-9a-fA-F:]", "").length() == 0) { + if (InetAddressUtils.isIPv4Address(host) || + InetAddressUtils.isIPv6Address(host)) { synchronized (_IPAddress) { _IPAddress.put(host, rv); } diff --git a/core/java/src/net/i2p/util/EepGet.java b/core/java/src/net/i2p/util/EepGet.java index c31184dbd..88cae89fe 100644 --- a/core/java/src/net/i2p/util/EepGet.java +++ b/core/java/src/net/i2p/util/EepGet.java @@ -24,6 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import gnu.getopt.Getopt; @@ -312,22 +314,52 @@ public class EepGet { System.exit(1); } + /** + * Parse URL for a viable filename. + * + * @param url a URL giving the location of an online resource + * @return a filename to save the resource as on local filesystem + */ public static String suggestName(String url) { - int last = url.lastIndexOf('/'); - if ((last < 0) || (url.lastIndexOf('#') > last)) - last = url.lastIndexOf('#'); - if ((last < 0) || (url.lastIndexOf('?') > last)) - last = url.lastIndexOf('?'); - if ((last < 0) || (url.lastIndexOf('=') > last)) - last = url.lastIndexOf('='); + URL nameURL = null; // URL object + String name; // suggested name - String name = null; - if (last >= 0) - name = sanitize(url.substring(last+1)); - if ( (name != null) && (name.length() > 0) ) - return name; - else - return sanitize(url); + try { + nameURL = new URL(url); + } catch (MalformedURLException e) { + System.err.println("Please enter a properly formed URL."); + System.exit(1); + } + + String path = nameURL.getPath(); // discard any URI queries + + // if no file specified, eepget scrapes webpage - use domain as name + Pattern slashes = Pattern.compile("/+"); + Matcher matcher = slashes.matcher(path); + // if empty path or just /'s - nameURL lets multiple /'s through + if (path.equals("") || matcher.matches()) { + name = sanitize(nameURL.getAuthority()); + // if path specified + } else { + int last = path.lastIndexOf('/'); + // if last / not at end of string, use following string as filename + if (last != path.length() - 1) { + name = sanitize(path.substring(last + 1)); + // if there's a trailing / group look for previous / as trim point + } else { + int i = 1; + int slash; + while (true) { + slash = path.lastIndexOf('/', last - i); + if (slash != last - i) { + break; + } + i += 1; + } + name = sanitize(path.substring(slash + 1, path.length() - i)); + } + } + return name; } @@ -755,6 +787,8 @@ public class EepGet { Thread pusher = null; _decompressException = null; if (_isGzippedResponse) { + if (_log.shouldInfo()) + _log.info("Gzipped response, starting decompressor"); PipedInputStream pi = BigPipedInputStream.getInstance(); PipedOutputStream po = new PipedOutputStream(pi); pusher = new I2PAppThread(new Gunzipper(pi, _out), "EepGet Decompressor"); @@ -1096,7 +1130,7 @@ public class EepGet { */ private int handleStatus(String line) { if (_log.shouldLog(Log.DEBUG)) - _log.debug("Status line: [" + line + "]"); + _log.debug("Status line: [" + line.trim() + "]"); String[] toks = line.split(" ", 3); if (toks.length < 2) { if (_log.shouldLog(Log.WARN)) @@ -1160,17 +1194,13 @@ public class EepGet { lookahead[1] = lookahead[2]; lookahead[2] = (byte)cur; } + private static boolean isEndOfHeaders(byte lookahead[]) { - byte first = lookahead[0]; - byte second = lookahead[1]; - byte third = lookahead[2]; - return (isNL(second) && isNL(third)) || // \n\n - (isNL(first) && isNL(third)); // \n\r\n + return lookahead[2] == NL && + (lookahead[0] == NL || lookahead[1] == NL); // \n\n or \n\r\n } - /** we ignore any potential \r, since we trim it on write anyway */ private static final byte NL = '\n'; - private static boolean isNL(byte b) { return (b == NL); } /** * @param timeout may be null @@ -1315,7 +1345,8 @@ public class EepGet { buf.append("Content-length: ").append(_postData.length()).append("\r\n"); // This will be replaced if we are going through I2PTunnelHTTPClient buf.append("Accept-Encoding: "); - if ((!_shouldProxy) && + // as of 0.9.23, the proxy passes the Accept-Encoding header through + if ( /* (!_shouldProxy) && */ // This is kindof a hack, but if we are downloading a gzip file // we don't want to transparently gunzip it and save it as a .gz file. (!path.endsWith(".gz")) && (!path.endsWith(".tgz"))) diff --git a/core/java/src/net/i2p/util/FileUtil.java b/core/java/src/net/i2p/util/FileUtil.java index eeca4416f..296030818 100644 --- a/core/java/src/net/i2p/util/FileUtil.java +++ b/core/java/src/net/i2p/util/FileUtil.java @@ -300,9 +300,9 @@ public class FileUtil { if (!_failedOracle) { try { Class p200 = Class.forName("java.util.jar.Pack200", true, ClassLoader.getSystemClassLoader()); - Method newUnpacker = p200.getMethod("newUnpacker", (Class[]) null); + Method newUnpacker = p200.getMethod("newUnpacker"); Object unpacker = newUnpacker.invoke(null,(Object[]) null); - Method unpack = unpacker.getClass().getMethod("unpack", new Class[] {InputStream.class, JarOutputStream.class}); + Method unpack = unpacker.getClass().getMethod("unpack", InputStream.class, JarOutputStream.class); // throws IOException unpack.invoke(unpacker, new Object[] {in, out}); return; @@ -321,9 +321,9 @@ public class FileUtil { if (!_failedApache) { try { Class p200 = Class.forName("org.apache.harmony.unpack200.Archive", true, ClassLoader.getSystemClassLoader()); - Constructor newUnpacker = p200.getConstructor(new Class[] {InputStream.class, JarOutputStream.class}); - Object unpacker = newUnpacker.newInstance(new Object[] {in, out}); - Method unpack = unpacker.getClass().getMethod("unpack", (Class[]) null); + Constructor newUnpacker = p200.getConstructor(InputStream.class, JarOutputStream.class); + Object unpacker = newUnpacker.newInstance(in, out); + Method unpack = unpacker.getClass().getMethod("unpack"); // throws IOException or Pack200Exception unpack.invoke(unpacker, (Object[]) null); return; diff --git a/core/java/src/net/i2p/util/I2PAppThread.java b/core/java/src/net/i2p/util/I2PAppThread.java index da291d210..ebbe6c06e 100644 --- a/core/java/src/net/i2p/util/I2PAppThread.java +++ b/core/java/src/net/i2p/util/I2PAppThread.java @@ -14,10 +14,13 @@ import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; /** - * Like I2PThread but with per-thread OOM listeners, + * Like {@link I2PThread} but with per-thread OOM listeners, * rather than a static router-wide listener list, * so that an OOM in an app won't call the router listener * to shutdown the whole router. + * + * This is preferred for application use. + * See {@link I2PThread} for features. */ public class I2PAppThread extends I2PThread { @@ -38,9 +41,17 @@ public class I2PAppThread extends I2PThread { public I2PAppThread(Runnable r, String name) { super(r, name); } + public I2PAppThread(Runnable r, String name, boolean isDaemon) { super(r, name, isDaemon); } + + /** + * @since 0.9.23 + */ + public I2PAppThread(ThreadGroup group, Runnable r, String name) { + super(group, r, name); + } @Override protected void fireOOM(OutOfMemoryError oom) { diff --git a/core/java/src/net/i2p/util/I2PSSLSocketFactory.java b/core/java/src/net/i2p/util/I2PSSLSocketFactory.java index 4761ac710..774415f4d 100644 --- a/core/java/src/net/i2p/util/I2PSSLSocketFactory.java +++ b/core/java/src/net/i2p/util/I2PSSLSocketFactory.java @@ -204,7 +204,15 @@ public class I2PSSLSocketFactory { "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", - "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA" + "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", + // following is disabled because it is weak + // see e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1107787 + "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" + // ??? "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" + // + // NOTE: + // If you add anything here, please also add to installer/resources/eepsite/jetty-ssl.xml + // })); /** diff --git a/core/java/src/net/i2p/util/I2PThread.java b/core/java/src/net/i2p/util/I2PThread.java index 22611ee3f..3c08e3639 100644 --- a/core/java/src/net/i2p/util/I2PThread.java +++ b/core/java/src/net/i2p/util/I2PThread.java @@ -14,76 +14,63 @@ import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; /** - * In case its useful later... - * (e.g. w/ native programatic thread dumping, etc) - * - * As of 0.9.21, I2PThreads are initialized to NORM_PRIORITY - * (not the priority of the creating thread). + * Preferred over {@link Thread} for all router uses. + * For applications, {@link I2PAppThread} is preferred. + *

              + * Provides the following features: + *

                + *
              • Logging to wrapper log on unexpected termination in {@link #run()}. + *
              • Notification of OOM to registered listener (the router), + * which will cause logging to the wrapper log and a router restart + *
              • Catching and logging "OOM" caused by thread limit in {@link #start()} + * with distinct message, and does not call the OOM listener. + *
              • As of 0.9.21, initialization to NORM_PRIORITY + * (not the priority of the creating thread). + *
              */ public class I2PThread extends Thread { - /** - * Non-static to avoid refs to old context in Android. - * Probably should just remove all the logging though. - * Logging removed, too much trouble with extra contexts - */ - //private volatile Log _log; + private static final Set _listeners = new CopyOnWriteArraySet(); - //private String _name; - //private Exception _createdBy; public I2PThread() { super(); setPriority(NORM_PRIORITY); - //if ( (_log == null) || (_log.shouldLog(Log.DEBUG)) ) - // _createdBy = new Exception("Created by"); } public I2PThread(String name) { super(name); setPriority(NORM_PRIORITY); - //if ( (_log == null) || (_log.shouldLog(Log.DEBUG)) ) - // _createdBy = new Exception("Created by"); } public I2PThread(Runnable r) { super(r); setPriority(NORM_PRIORITY); - //if ( (_log == null) || (_log.shouldLog(Log.DEBUG)) ) - // _createdBy = new Exception("Created by"); } public I2PThread(Runnable r, String name) { super(r, name); setPriority(NORM_PRIORITY); - //if ( (_log == null) || (_log.shouldLog(Log.DEBUG)) ) - // _createdBy = new Exception("Created by"); } + public I2PThread(Runnable r, String name, boolean isDaemon) { super(r, name); setDaemon(isDaemon); setPriority(NORM_PRIORITY); - //if ( (_log == null) || (_log.shouldLog(Log.DEBUG)) ) - // _createdBy = new Exception("Created by"); } public I2PThread(ThreadGroup g, Runnable r) { super(g, r); setPriority(NORM_PRIORITY); - //if ( (_log == null) || (_log.shouldLog(Log.DEBUG)) ) - // _createdBy = new Exception("Created by"); } -/**** - private void log(int level, String msg) { log(level, msg, null); } - - private void log(int level, String msg, Throwable t) { - // we cant assume log is created - if (_log == null) _log = new Log(I2PThread.class); - if (_log.shouldLog(level)) - _log.log(level, msg, t); + /** + * @since 0.9.23 + */ + public I2PThread(ThreadGroup group, Runnable r, String name) { + super(group, r, name); + setPriority(NORM_PRIORITY); } -****/ - + /** * Overridden to provide useful info to users on OOM, and to prevent * shutting down the whole JVM for what is most likely not a heap issue. @@ -109,19 +96,9 @@ public class I2PThread extends Thread { @Override public void run() { - //_name = Thread.currentThread().getName(); - //log(Log.INFO, "New thread started" + (isDaemon() ? " (daemon): " : ": ") + _name, _createdBy); try { super.run(); } catch (Throwable t) { - /**** - try { - log(Log.CRIT, "Thread terminated unexpectedly: " + getName(), t); - } catch (Throwable woof) { - System.err.println("Died within the OOM itself"); - t.printStackTrace(); - } - ****/ if (t instanceof OutOfMemoryError) { fireOOM((OutOfMemoryError)t); } else { @@ -129,18 +106,8 @@ public class I2PThread extends Thread { t.printStackTrace(); } } - // This creates a new I2PAppContext after it was deleted - // in Router.finalShutdown() via RouterContext.killGlobalContext() - //log(Log.INFO, "Thread finished normally: " + _name); } -/**** - protected void finalize() throws Throwable { - //log(Log.DEBUG, "Thread finalized: " + _name); - super.finalize(); - } -****/ - protected void fireOOM(OutOfMemoryError oom) { for (OOMEventListener listener : _listeners) listener.outOfMemory(oom); diff --git a/core/java/src/net/i2p/util/LogManager.java b/core/java/src/net/i2p/util/LogManager.java index f2df0a881..ca2476de8 100644 --- a/core/java/src/net/i2p/util/LogManager.java +++ b/core/java/src/net/i2p/util/LogManager.java @@ -763,7 +763,7 @@ public class LogManager implements Flushable { private static final AtomicInteger __id = new AtomicInteger(); - private class ShutdownHook extends Thread { + private class ShutdownHook extends I2PAppThread { private final int _id; public ShutdownHook() { _id = __id.incrementAndGet(); diff --git a/core/java/src/net/i2p/util/LogWriterBase.java b/core/java/src/net/i2p/util/LogWriterBase.java index 053cccdc6..b9b98e10d 100644 --- a/core/java/src/net/i2p/util/LogWriterBase.java +++ b/core/java/src/net/i2p/util/LogWriterBase.java @@ -67,10 +67,12 @@ abstract class LogWriterBase implements Runnable { public void run() { _write = true; + // don't bother on Android + final boolean shouldReadConfig = !SystemVersion.isAndroid(); try { while (_write) { flushRecords(); - if (_write) + if (_write && shouldReadConfig) rereadConfig(); } } catch (Exception e) { @@ -145,7 +147,7 @@ abstract class LogWriterBase implements Runnable { private String dupMessage(int dupCount, LogRecord lastRecord, boolean reverse) { String arrows = reverse ? "↓↓↓" : "^^^"; return LogRecordFormatter.getWhen(_manager, lastRecord) + ' ' + arrows + ' ' + - _(dupCount, "1 similar message omitted", "{0} similar messages omitted") + ' ' + arrows + '\n'; + _t(dupCount, "1 similar message omitted", "{0} similar messages omitted") + ' ' + arrows + '\n'; } private static final String BUNDLE_NAME = "net.i2p.router.web.messages"; @@ -154,7 +156,7 @@ abstract class LogWriterBase implements Runnable { * gettext * @since 0.9.3 */ - private String _(int a, String b, String c) { + private String _t(int a, String b, String c) { return Translate.getString(a, b, c, _manager.getContext(), BUNDLE_NAME); } diff --git a/core/java/src/net/i2p/util/PortMapper.java b/core/java/src/net/i2p/util/PortMapper.java index 816020433..e73399b19 100644 --- a/core/java/src/net/i2p/util/PortMapper.java +++ b/core/java/src/net/i2p/util/PortMapper.java @@ -33,6 +33,8 @@ public class PortMapper { public static final String SVC_BOB = "BOB"; /** not necessary, already in config? */ public static final String SVC_I2CP = "I2CP"; + /** @since 0.9.23 */ + public static final String SVC_I2CP_SSL = "I2CP-SSL"; /** * @param context unused for now @@ -109,7 +111,7 @@ public class PortMapper { * @since 0.9.20 */ public void renderStatusHTML(Writer out) throws IOException { - List services = new ArrayList(_dir.keySet()); + List services = new ArrayList(_dir.keySet()); out.write("

              Port Mapper

              ServiceHostPort\n"); Collections.sort(services); for (String s : services) { diff --git a/core/java/src/net/i2p/util/ShellCommand.java b/core/java/src/net/i2p/util/ShellCommand.java index 70de62ea8..955830fe1 100644 --- a/core/java/src/net/i2p/util/ShellCommand.java +++ b/core/java/src/net/i2p/util/ShellCommand.java @@ -51,7 +51,7 @@ public class ShellCommand { * * @author hypercubus */ - private class CommandThread extends Thread { + private class CommandThread extends I2PAppThread { private final boolean consumeOutput; private final Object shellCommand; private final Result result; @@ -84,7 +84,7 @@ public class ShellCommand { * * @author hypercubus */ - private static class StreamConsumer extends Thread { + private static class StreamConsumer extends I2PAppThread { private final BufferedReader bufferedReader; public StreamConsumer(InputStream inputStream) { @@ -115,7 +115,7 @@ public class ShellCommand { * * @author hypercubus */ - private static class StreamReader extends Thread { + private static class StreamReader extends I2PAppThread { private final BufferedReader bufferedReader; public StreamReader(InputStream inputStream) { @@ -149,7 +149,7 @@ public class ShellCommand { * * @author hypercubus */ - private static class StreamWriter extends Thread { + private static class StreamWriter extends I2PAppThread { private final BufferedWriter bufferedWriter; public StreamWriter(OutputStream outputStream) { diff --git a/core/java/src/net/i2p/util/SimpleTimer2.java b/core/java/src/net/i2p/util/SimpleTimer2.java index ec4f2528d..e8dcc2fcb 100644 --- a/core/java/src/net/i2p/util/SimpleTimer2.java +++ b/core/java/src/net/i2p/util/SimpleTimer2.java @@ -6,6 +6,7 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.ThreadFactory; +import java.util.concurrent.atomic.AtomicInteger; import net.i2p.I2PAppContext; @@ -38,7 +39,7 @@ public class SimpleTimer2 { private static final int MAX_THREADS = 4; private final ScheduledThreadPoolExecutor _executor; private final String _name; - private volatile int _count; + private final AtomicInteger _count = new AtomicInteger(); private final int _threads; /** @@ -102,7 +103,7 @@ public class SimpleTimer2 { super.afterExecute(r, t); if (t != null) { // shoudn't happen, caught in RunnableEvent.run() Log log = I2PAppContext.getGlobalContext().logManager().getLog(SimpleTimer2.class); - log.log(Log.CRIT, "wtf, event borked: " + r, t); + log.log(Log.CRIT, "event borked: " + r, t); } } } @@ -110,18 +111,19 @@ public class SimpleTimer2 { private class CustomThreadFactory implements ThreadFactory { public Thread newThread(Runnable r) { Thread rv = Executors.defaultThreadFactory().newThread(r); - rv.setName(_name + ' ' + (++_count) + '/' + _threads); + rv.setName(_name + ' ' + _count.incrementAndGet() + '/' + _threads); // Uncomment this to test threadgrouping, but we should be all safe now that the constructor preallocates! // String name = rv.getThreadGroup().getName(); // if(!name.equals("main")) { // (new Exception("OWCH! DAMN! Wrong ThreadGroup `" + name +"', `" + rv.getName() + "'")).printStackTrace(); // } rv.setDaemon(true); + rv.setPriority(Thread.NORM_PRIORITY + 1); return rv; } } - private ScheduledFuture schedule(TimedEvent t, long timeoutMs) { + private ScheduledFuture schedule(TimedEvent t, long timeoutMs) { return _executor.schedule(t, timeoutMs, TimeUnit.MILLISECONDS); } @@ -164,7 +166,8 @@ public class SimpleTimer2 { * New code should use SimpleTimer2.TimedEvent. * * @since 0.9.20 - * @param timeoutMs run first and subsequent iterations of this event every timeoutMs ms + * @param timeoutMs run subsequent iterations of this event every timeoutMs ms, 5000 minimum + * @throws IllegalArgumentException if timeoutMs less than 5000 */ public void addPeriodicEvent(final SimpleTimer.TimedEvent event, final long timeoutMs) { addPeriodicEvent(event, timeoutMs, timeoutMs); @@ -183,7 +186,8 @@ public class SimpleTimer2 { * * @since 0.9.20 * @param delay run the first iteration of this event after delay ms - * @param timeoutMs run subsequent iterations of this event every timeoutMs ms + * @param timeoutMs run subsequent iterations of this event every timeoutMs ms, 5000 minimum + * @throws IllegalArgumentException if timeoutMs less than 5000 */ public void addPeriodicEvent(final SimpleTimer.TimedEvent event, final long delay, final long timeoutMs) { @@ -245,7 +249,7 @@ public class SimpleTimer2 { private final SimpleTimer2 _pool; private int _fuzz; protected static final int DEFAULT_FUZZ = 3; - private ScheduledFuture _future; // _executor.remove() doesn't work so we have to use this + private ScheduledFuture _future; // _executor.remove() doesn't work so we have to use this // ... and I expect cancelling this way is more efficient /** state of the current event. All access should be under lock. */ @@ -254,6 +258,8 @@ public class SimpleTimer2 { private long _nextRun; /** whether this was scheduled during RUNNING state. LOCKING: this */ private boolean _rescheduleAfterRun; + /** whether this was cancelled during RUNNING state. LOCKING: this */ + private boolean _cancelAfterRun; /** must call schedule() later */ public TimedEvent(SimpleTimer2 pool) { @@ -286,12 +292,17 @@ public class SimpleTimer2 { public synchronized void schedule(long timeoutMs) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Scheduling: " + this + " timeout = " + timeoutMs + " state: " + _state); - if (timeoutMs <= 0 && _log.shouldLog(Log.WARN)) + if (timeoutMs <= 0) { + // streaming timers do call with timeoutMs == 0 + if (timeoutMs < 0 && _log.shouldLog(Log.WARN)) + _log.warn("Timeout <= 0: " + this + " timeout = " + timeoutMs + " state: " + _state); timeoutMs = 1; // otherwise we may execute before _future is updated, which is fine // except it triggers 'early execution' warning logging + } // always set absolute time of execution _nextRun = timeoutMs + System.currentTimeMillis(); + _cancelAfterRun = false; switch(_state) { case RUNNING: @@ -352,11 +363,13 @@ public class SimpleTimer2 { * @param timeoutMs */ public synchronized void forceReschedule(long timeoutMs) { - cancel(); + // don't cancel while running! + if (_state == TimedEventState.SCHEDULED) + cancel(); schedule(timeoutMs); } - /** returns true if cancelled */ + /** @return true if cancelled */ public synchronized boolean cancel() { // always clear _rescheduleAfterRun = false; @@ -365,7 +378,9 @@ public class SimpleTimer2 { case CANCELLED: // fall through case IDLE: break; // my preference is to throw IllegalState here, but let it be. - case RUNNING: // fall through + case RUNNING: + _cancelAfterRun = true; + return true; case SCHEDULED: boolean cancelled = _future.cancel(false); if (cancelled) @@ -378,27 +393,38 @@ public class SimpleTimer2 { } public void run() { + try { + run2(); + } catch (RuntimeException re) { + _log.error("timer error", re); + throw re; + } + } + + private void run2() { if (_log.shouldLog(Log.DEBUG)) _log.debug("Running: " + this); long before = System.currentTimeMillis(); long delay = 0; synchronized(this) { if (_rescheduleAfterRun) - throw new IllegalStateException("rescheduleAfterRun cannot be true here"); + throw new IllegalStateException(this + " rescheduleAfterRun cannot be true here"); switch(_state) { case CANCELLED: return; // goodbye case IDLE: // fall through case RUNNING: - throw new IllegalStateException("not possible to be in " + _state); - case SCHEDULED: // proceed, switch to IDLE in case I need to reschedule - _state = TimedEventState.IDLE; + throw new IllegalStateException(this + " not possible to be in " + _state); + case SCHEDULED: + // proceed, will switch to IDLE to reschedule } // if I was rescheduled by the user, re-submit myself to the executor. - int difference = (int)(_nextRun - before); // careful with long uptimes + long difference = _nextRun - before; // careful with long uptimes if (difference > _fuzz) { + // proceed, switch to IDLE to reschedule + _state = TimedEventState.IDLE; schedule(difference); return; } @@ -411,12 +437,14 @@ public class SimpleTimer2 { if (_future != null) delay = _future.getDelay(TimeUnit.MILLISECONDS); else if (_log.shouldLog(Log.WARN)) - _log.warn(_pool + " wtf, no _future " + this); + _log.warn(_pool + " no _future " + this); // This can be an incorrect warning especially after a schedule(0) - if (_log.shouldLog(Log.WARN) && delay > 100) - _log.warn(_pool + " wtf, early execution " + delay + ": " + this); - else if (_log.shouldLog(Log.WARN) && delay < -1000) - _log.warn(" wtf, late execution " + (0 - delay) + ": " + this + _pool.debug()); + if (_log.shouldWarn()) { + if (delay > 100) + _log.warn(_pool + " early execution " + delay + ": " + this); + else if (delay < -1000) + _log.warn(" late execution " + (0 - delay) + ": " + this + _pool.debug()); + } try { timeReached(); } catch (Throwable t) { @@ -426,22 +454,27 @@ public class SimpleTimer2 { switch(_state) { case SCHEDULED: // fall through case IDLE: - throw new IllegalStateException("can't be " + _state); + throw new IllegalStateException(this + " can't be " + _state); case CANCELLED: break; // nothing case RUNNING: - _state = TimedEventState.IDLE; - // do we need to reschedule? - if (_rescheduleAfterRun) { - _rescheduleAfterRun = false; - schedule(_nextRun - System.currentTimeMillis()); + if (_cancelAfterRun) { + _cancelAfterRun = false; + _state = TimedEventState.CANCELLED; + } else { + _state = TimedEventState.IDLE; + // do we need to reschedule? + if (_rescheduleAfterRun) { + _rescheduleAfterRun = false; + schedule(_nextRun - System.currentTimeMillis()); + } } } } } long time = System.currentTimeMillis() - before; if (time > 500 && _log.shouldLog(Log.WARN)) - _log.warn(_pool + " wtf, event execution took " + time + ": " + this); + _log.warn(_pool + " event execution took " + time + ": " + this); if (_log.shouldLog(Log.INFO)) { // this call is slow - iterates through a HashMap - // would be better to have a local AtomicLong if we care @@ -470,6 +503,7 @@ public class SimpleTimer2 { return _executor.getCompletedTaskCount(); } + /** warning - slow */ private String debug() { _executor.purge(); // Remove cancelled tasks from the queue so we get a good queue size stat return @@ -490,10 +524,13 @@ public class SimpleTimer2 { * Schedule periodic event * * @param delay run the first iteration of this event after delay ms - * @param timeoutMs run subsequent iterations of this event every timeoutMs ms + * @param timeoutMs run subsequent iterations of this event every timeoutMs ms, 5000 minimum + * @throws IllegalArgumentException if timeoutMs less than 5000 */ public PeriodicTimedEvent(SimpleTimer2 pool, long delay, long timeoutMs) { super(pool, delay); + if (timeoutMs < 5000) + throw new IllegalArgumentException("timeout minimum 5000"); _timeoutMs = timeoutMs; } diff --git a/core/java/src/net/i2p/util/SystemVersion.java b/core/java/src/net/i2p/util/SystemVersion.java index 6650cf479..3e5e56e7c 100644 --- a/core/java/src/net/i2p/util/SystemVersion.java +++ b/core/java/src/net/i2p/util/SystemVersion.java @@ -18,6 +18,8 @@ public abstract class SystemVersion { private static final boolean _isArm = System.getProperty("os.arch").startsWith("arm"); private static final boolean _isX86 = System.getProperty("os.arch").contains("86") || System.getProperty("os.arch").equals("amd64"); + private static final boolean _isGentoo = System.getProperty("os.version").contains("gentoo") || + System.getProperty("os.version").contains("hardened"); // Funtoo private static final boolean _isAndroid; private static final boolean _isApache; private static final boolean _isGNU; @@ -27,6 +29,7 @@ public abstract class SystemVersion { private static final boolean _oneDotSix; private static final boolean _oneDotSeven; private static final boolean _oneDotEight; + private static final boolean _oneDotNine; private static final int _androidSDK; static { @@ -62,10 +65,12 @@ public abstract class SystemVersion { _oneDotSix = _androidSDK >= 9; _oneDotSeven = _androidSDK >= 19; _oneDotEight = false; + _oneDotNine = false; } else { _oneDotSix = VersionComparator.comp(System.getProperty("java.version"), "1.6") >= 0; _oneDotSeven = _oneDotSix && VersionComparator.comp(System.getProperty("java.version"), "1.7") >= 0; _oneDotEight = _oneDotSeven && VersionComparator.comp(System.getProperty("java.version"), "1.8") >= 0; + _oneDotNine = _oneDotEight && VersionComparator.comp(System.getProperty("java.version"), "1.9") >= 0; } } @@ -95,6 +100,13 @@ public abstract class SystemVersion { return _isGNU; } + /** + * @since 0.9.23 + */ + public static boolean isGentoo() { + return _isGentoo; + } + /** * @since 0.9.8 */ @@ -139,6 +151,15 @@ public abstract class SystemVersion { return _oneDotEight; } + /** + * + * @return true if Java 1.9 or higher, false for Android. + * @since 0.9.23 + */ + public static boolean isJava9() { + return _oneDotNine; + } + /** * This isn't always correct. * http://stackoverflow.com/questions/807263/how-do-i-detect-which-kind-of-jre-is-installed-32bit-vs-64bit diff --git a/core/java/src/net/i2p/util/Translate.java b/core/java/src/net/i2p/util/Translate.java index d83036d02..3b5ab1b53 100644 --- a/core/java/src/net/i2p/util/Translate.java +++ b/core/java/src/net/i2p/util/Translate.java @@ -65,7 +65,7 @@ public abstract class Translate { * The {0} will be replaced by the parameter. * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. - * To tranlslate parameter also, use _("foo {0} bar", _("baz")) + * To tranlslate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. * Use autoboxing to call with ints, longs, floats, etc. */ diff --git a/core/java/src/net/i2p/util/TranslateReader.java b/core/java/src/net/i2p/util/TranslateReader.java index bc26bbe59..171edd4a8 100644 --- a/core/java/src/net/i2p/util/TranslateReader.java +++ b/core/java/src/net/i2p/util/TranslateReader.java @@ -351,7 +351,7 @@ public class TranslateReader extends FilterReader { public void tag(List args) { if (args.size() <= 0) return; - _out.print("\t_("); + _out.print("\t_t("); for (int i = 0; i < args.size(); i++) { if (i > 0) _out.print(", "); @@ -373,6 +373,9 @@ public class TranslateReader extends FilterReader { } } + /** + * Do not comment out, used to extract tags as a part of the build process. + */ public static void main(String[] args) { try { if (args.length >= 2 && args[0].equals("test")) diff --git a/history.txt b/history.txt index 3dd700a2f..9d421fc45 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,144 @@ +2015-11-04 zzz + * Threads: More conversions to I2PAppThread + * Timers: Improve OutboundMessageRegistry locking (ticket #1694) + +2015-11-02 z3r0fox + * EepGet: Fix command line filename selection (ticket #1616) + +2015-11-01 zzz + * Utils: Double IP lookup cache size (ticket #1700) + +2015-10-31 zzz + * Convert remaining Threads to I2PThread or I2PAppThread + * UPnP: Fix deadlock in callbacks (ticket #1699) + +2015-10-30 zzz + * Router: Fix cascading I2CP error (ticket #1692) + +2015-10-21 zzz + * i2psnark: More consistency and torrent links in messages + * Router: Increase timer thread priority + +2015-10-17 zzz + * Crypto: + - Consolidate duplicate unlimited strength crypto check code + - Disable TLS_DHE_DSS_WITH_AES_128_CBC_SHA + +2015-10-16 zzz + * Console: Add Java 6 warning to summary bar + * i2psnark: + - Fix deadlock (ticket #1432) + - Add "smart sort" option, set sort based on language (tickets #637, #1303) + - Don't balloon files on ARM (ticket #1684) + +2015-10-14 zzz + * Update: + - Require Java 7 to download dev builds (ticket #1669) + - Fix persistence of the available dev version + +2015-10-13 zzz + * Startup: Delete our old RI from netDB when rekeying + +2015-10-11 zzz + * Crypto: Test for broken Gentoo ECDSA support + +2015-10-10 zzz + * i2psnark: Increase max piece size to 16 MB, max files to 999, + close files faster based on file count (tickets #1626, #1671) + * JobQueue: Only adjust timing for negative clock shifts + * NamingServices: Add support for lookups prefixed with "www." + * Startup: Increase rekey probability + +2015-10-08 zzz + * SimpleTimer2: Additional fix for uncaught IllegalStateException + affecting streaming timers (ticket #1672) + +2015-10-02 zzz + * Router: Don't check config files for reload on Android + +2015-09-28 zzz + * Addressbook: Fix isValidDest() for EC/Ed dests + * i2psnark: Support adding plain base 32 hashes + * Susimail: Hide headers and buttons if search results are empty + +2015-09-27 dg + * Router: Fix soft restarts for 'massive' clock jumps (over +150s or -61s) and recover from standby + and hibernate (ticket #1014). + +2015-09-27 zzz + * Console: + - Export SSL cert on creation + - New /certs page to show local SSL certs + - Show 'none' if no leasesets + * SimpleTimer2: Fix bug in forceReschedule() that caused subsequent uncaught IllegalStateException, + affected streaming timers + * Streaming: Move throttler from context timer to streaming timer + * Tunnels: Use max of 2 not-failing peers in an exploratory tunnel, + use high cap for the rest; change outbound exploratory + default length from 2 + 0-1 to 3+0. + * Util: Speed up IP address validation by using Apache's implementation (ticket #1198) + +2015-09-25 dg + * Rename _() for translation to _t() for Java 9 compatibility (ticket #1456) + +2015-09-24 zzz + - Rename bad .torrent files instead of deleting them + +2015-09-20 dg + * /configreseed: Add 'Reset URL list' button for revert to default hosts (ticket #1554, thanks dzirtt@gmail.com) + +2015-09-19 zzz + * i2psnark: Add recheck/start/stop buttons to details page (ticket #372) + +2015-09-18 zzz + * EepGet: + - Send Accept-Encoding: gzip even when proxied + - Fix man page (ticket #1631) + * i2psnark: + - Don't display "Tracker Error" if torrent is stopped (ticket #1654) + - Improve directory listing efficiency (ticket #1079) + * i2ptunnel: + - Pass Accept-Encoding header through HTTP client and server proxies, + to allow end-to-end compression + - Don't do transparent response compression if response + Content-Encoding indicates it is already compressed + * Streaming: Move remaining timers from the context to streaming's SimpleTimer2 + +2015-09-17 zzz + * i2psnark: + - Store magnet parameters across restart (ticket #1485) + - Don't delete torrent config file after error on initial startup (tickets #1575, #1658) + +2015-09-16 zzz + * Build: + - Include geoip in update files for next release + - Add created-by string to release torrents + * i2psnark: + - Store torrent added and completed times in config files, display on details page + - Add metainfo creation command line support for created-by string + * Profiles: Bias slightly away from floodfills + +2015-09-15 zzz + * Console: + - Store news feed items separately on disk in XML, like a real feed reader + - Limit display to 2 news items in summary bar, /home and /console + - New /news page to show all news (ticket #1425) + +* 2015-09-12 0.9.22 released + +2015-09-11 kytv + * Updates to geoip.txt and geoipv6.dat.gz based on Maxmind GeoLite Country + database from 2015-09-02. + * Translation updates pulled from Transifex + +2015-09-04 zzz + * UPnP: Fix "content not allowed in trailing section" + (tickets #481, #1653) + +2015-08-31 zzz + * Data: Cache P256 and Ed255i9 key certificates + * i2psnark: Change default sig type to Ed25519 + 2015-08-29 zzz * Router: - Change default RI sig type to Ed25519, with a 10% chance od diff --git a/installer/install.xml b/installer/install.xml index 582e0c284..f7cdcfbbd 100644 --- a/installer/install.xml +++ b/installer/install.xml @@ -4,7 +4,7 @@ i2p - 0.9.21 + 0.9.22 diff --git a/installer/resources/certificates/reseed/j_at_torontocrypto.org.crt b/installer/resources/certificates/reseed/j_at_torontocrypto.org.crt new file mode 100644 index 000000000..4a2789ec0 --- /dev/null +++ b/installer/resources/certificates/reseed/j_at_torontocrypto.org.crt @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF7TCCA9egAwIBAgIQJpzITX40IacsYOr3X98gPzALBgkqhkiG9w0BAQswczEL +MAkGA1UEBhMCWFgxHjAcBgNVBAoTFUkyUCBBbm9ueW1vdXMgTmV0d29yazEMMAoG +A1UECxMDSTJQMQswCQYDVQQHEwJYWDELMAkGA1UECRMCWFgxHDAaBgNVBAMME2pA +dG9yb250b2NyeXB0by5vcmcwHhcNMTUwOTIyMjIxNTMzWhcNMjUwOTIyMjIxNTMz +WjBzMQswCQYDVQQGEwJYWDEeMBwGA1UEChMVSTJQIEFub255bW91cyBOZXR3b3Jr +MQwwCgYDVQQLEwNJMlAxCzAJBgNVBAcTAlhYMQswCQYDVQQJEwJYWDEcMBoGA1UE +AwwTakB0b3JvbnRvY3J5cHRvLm9yZzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC +AgoCggIBAKbQH61RibAeLRemYah/071wPid99vpPoVxJMwFc/42kbnpSFHUiXRYP +WMkzqPmdZRkr9BNqt3Fa19IiMQbJ49yKRh9+HPJ09b88r2Z75wo71b4eq4Ohd8/4 +pSfn7zPCxtqvBh79N0e6O1jC7I01WkXaQfRN1BpIpRT/80H7muWOHoN/AFbJL2KK +eRx+G1hsHqn3pBcsq5QV+bAQdpzxYYYKHn/EPFYk9LM3p1F2uWOQDN0UU+rINvpw +JIR+cvk/bTpPpMCQrYIXdn4hxgCX7KeKYvsFpTieMmGU0omFGWMRc5nm23REpm1N +cU7Oj8kUIW9YbCMzR4KT/x6h1BwRS4L9Hq/ofQM+vDXff3zvcw7MMmVpgU/jh/9I +XNc6A3IBHfpJaxIzhk7UfOZX6k1kyeXjXA8Gr5FvA9Ap9eH7KVFXeyaYq1gTWrGA +MPvgY6dNAH7OFXtqZUGrIAqyWnbaxEsO1HWyRYitCM91LI5gFURUwQPzo2ewgshq +0uGaO+2J61fM9cb8aKOU8Yaa4N04sZfu85k402Kr7bP/DE7Hv9K0+U5ZtbCJxrOU +z5YgbfCrh/iwFti8VP8wFv29S1d6Kqj9OVroM1ns9aNwqyYsMbj/STe8BBRncxuw +lkf69FXxyaGtyfc9ry8enkL8QYyzbVDRXw01yogwToZ8Mc/PinI7AgMBAAGjgYAw +fjAOBgNVHQ8BAf8EBAMCAIQwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMB +MA8GA1UdEwEB/wQFMAMBAf8wHAYDVR0OBBUEE2pAdG9yb250b2NyeXB0by5vcmcw +HgYDVR0jBBcwFYATakB0b3JvbnRvY3J5cHRvLm9yZzALBgkqhkiG9w0BAQsDggIB +AJGmZv3TKCwuNafmPUCvvJV6PwdBqYdVX270pLI2IjPa5sE+dDiCrrrH5tVsoUfY +1xAy0eclic3SCu2DdQxicYFIsyN91oyZWljnVuOWDRQoyeGvcwN3FN8WQZ/VnoX/ +b4Xtx0D3HsQjLXfzk0AzSXp9TP9/orMR5bkWiqhUhXvlb7XhpZ+p9/8N0D7bjcaJ +74Rn6g3sS+/wKJ0c7h5R3+mRNPW1SecbfQFN/GkgDQxZscvmbRsCG03IRQeYpqt2 +M8KA5KXu/H6ZU5XlC6+VI7vf6yWWPf3s8CRBDgfYtI7uRFkfwJLsTBZCOFoyQe+F +CIZZj4lg6f46FHMekbPouw+g2B+2QNdW+fZqdVLAXbuN2xMsVakZn5X9iBfanNmN +t5QH4T81SZb9ZIJSD+L0lKiMw1klbaYYPp2mjwbo42DhsezcJX3TKXhMe3qkYZ3I +E0a9Kq4TmoWAkdycT1oH51wmybwWc3ix7rXbUe8h6KgBEXqJV60ybX7iacrq9WgG +xIr5hnSUEGZtMcdhEA4oD319h+8j/UjXKgWwuuNExpSnARbwQTbPJ/PLD6mQVpHv +jL2S9nbb1r/GmRdzCpHVwLGczUJvwfjAZ8bDCONSGHzuzw8lgpdRpdeWCLfQzXyo +mjh0U8QNpeHEMdQhmnaYa8WJ83DTnO7pwaoYqjeDQ9yM +-----END CERTIFICATE----- diff --git a/installer/resources/certificates/ssl/193.150.121.66.crt b/installer/resources/certificates/ssl/193.150.121.66.crt deleted file mode 100644 index 450581d23..000000000 --- a/installer/resources/certificates/ssl/193.150.121.66.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDgDCCAmgCCQCAKEkFUJcEezANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UEBhMC -Tk8xDTALBgNVBAgMBE9zbG8xDTALBgNVBAcMBE9zbG8xDDAKBgNVBAoMA0kyUDEM -MAoGA1UECwwDSTJQMRcwFQYDVQQDDA4xOTMuMTUwLjEyMS42NjEfMB0GCSqGSIb3 -DQEJARYQbWVlaEBpMnBtYWlsLm9yZzAeFw0xMzA2MjcxODM2MjhaFw0yMDA2MjUx -ODM2MjhaMIGBMQswCQYDVQQGEwJOTzENMAsGA1UECAwET3NsbzENMAsGA1UEBwwE -T3NsbzEMMAoGA1UECgwDSTJQMQwwCgYDVQQLDANJMlAxFzAVBgNVBAMMDjE5My4x -NTAuMTIxLjY2MR8wHQYJKoZIhvcNAQkBFhBtZWVoQGkycG1haWwub3JnMIIBIjAN -BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuBuFY4ZFvsbr5l1/s/GeUBLIWQLB -nqrRkonrwCyxgjSnnG1uz/Z5nf6QDUjiVnFKMXenLaDn4KCmEi4LjWQllhK9r6pj -BRkR7C0DTHq7WqfyvWnGSZZsOJDiH2vLlivV8N9oGdjxvv0N9No3AJcsmLYrxSLi -6/JF8xZ2HGuT/oWW6aWvpIOKpIqti865BJw5P5KgYAS24J8vHRFM3FA4dfLNTBA2 -IGqPqYLQA+2zfOC4z01aArmcYnT1iJLT7krgKnr/BXdJfGQ2GjxkRSt8IwB6WmXA -byz6QdNYM/0eubi102/zpD/DrySTU2kc8xKjknGUqBJvVdsL+iLK98uJrQIDAQAB -MA0GCSqGSIb3DQEBBQUAA4IBAQCTimMu3X7+ztXxlIFhwGh42GfMjeBYT0NHOLAy -ZtQNRqhNvkl3jZ4ERPLxP99+bcAfCX0wgVpgD32OWEZopwveRyMImP8HfFr4NnZ+ -edbM37fRYiVJv57kbi6O0rhEC7J5JF+fnCaZVLCuvYIrIXTdxTjvxuLhyan6Ej7V -7iGDJ8t16tpLVJgcXfRg+dvAa6aDOK6x3w78j0bvh6rhvpOd9sW/Nk3LBKP4Xgkx -PHkqm3hNfDIu8Hubeav9SA1kLVMS/uce52VyYMEDauObfC65ds0GRmCtYhZqMvj+ -FFCbssLraVJE9Hi/ZKGu33jNngDCG+wG+nmleksMYE1yTSRt ------END CERTIFICATE----- diff --git a/installer/resources/certificates/ssl/link.mx24.eu.crt b/installer/resources/certificates/ssl/link.mx24.eu.crt deleted file mode 100644 index 8e0d910fc..000000000 --- a/installer/resources/certificates/ssl/link.mx24.eu.crt +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEDzCCAvegAwIBAgIJAMsPNG1k0yV4MA0GCSqGSIb3DQEBCwUAMIGdMQswCQYD -VQQGEwJERTEVMBMGA1UECAwMbGluay5teDI0LmV1MRUwEwYDVQQHDAxsaW5rLm14 -MjQuZXUxFTATBgNVBAoMDGxpbmsubXgyNC5ldTEVMBMGA1UECwwMbGluay5teDI0 -LmV1MRUwEwYDVQQDDAxsaW5rLm14MjQuZXUxGzAZBgkqhkiG9w0BCQEWDGxpbmsu -bXgyNC5ldTAeFw0xNDExMTkxOTE4NTRaFw0yMDA1MTExOTE4NTRaMIGdMQswCQYD -VQQGEwJERTEVMBMGA1UECAwMbGluay5teDI0LmV1MRUwEwYDVQQHDAxsaW5rLm14 -MjQuZXUxFTATBgNVBAoMDGxpbmsubXgyNC5ldTEVMBMGA1UECwwMbGluay5teDI0 -LmV1MRUwEwYDVQQDDAxsaW5rLm14MjQuZXUxGzAZBgkqhkiG9w0BCQEWDGxpbmsu -bXgyNC5ldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL8modDBRkyh -SHSm92pTfguO3F6n5ocsBJ4vaVoosYq3ILCsapjqmynMHZUef6gEB7+Gn5cKXsH2 -JaKOeb8DHrOFCaxfj187x1QfZj1UNMQblx2T9q4th12tqp+k4JuLwgemr+2uAUpM -xx/uHRJXD0hf67+fHQFYNVfa+WvT46xlKGsWDQ0LBsA/z4YGnyeaV4PrS5nj3euA -IbdfDj7rJea3bfhSqYA1ZH1cquKlsXOOYO5cIcXsa5dxDWX51QS+i7+ocph+JN1X -dRh6ZirE9OXZVXwXXVRnJSYjgBlP/DQBdE7YkE1R3LyCVZsgxJaaLV/ujijOIK61 -SqEhHvFNRe0CAwEAAaNQME4wHQYDVR0OBBYEFB6XRz6VZlrAE+3xL6AyKrkq+y2X -MB8GA1UdIwQYMBaAFB6XRz6VZlrAE+3xL6AyKrkq+y2XMAwGA1UdEwQFMAMBAf8w -DQYJKoZIhvcNAQELBQADggEBADhxBA5GHisDVf5a+1hIi7FBGBjJJLqzlaKh+bFB -gTCYfk3F4wYzndr1HpdCZSSYDtY3mXFNMWQCpwvwvy1DM+9AMRY68wKNXHa/WypW -zQSqTfEH8cdaIXUALB7pdWFVr3rx0f7/8I0Gj/ByUbJ94rzd22vduX5riY0Rag6B -dPtW0M9bJrC1AIjexzDcStupj9v/ceGYZQYC4zb2tZ7Ek/6q+vei8TxWZjku7Dl4 -YRPXXufyB24uQ1hJVy2fSyIJ63tIRJoEFLBNaKDOB53i10xLWBcsJpXKY57AOQMn -flqW4HG8uGJ/o1WjhiOB9eI7T9toy08zNzt+kSI/blFIoek= ------END CERTIFICATE----- diff --git a/installer/resources/certificates/ssl/user.mx24.eu.crt b/installer/resources/certificates/ssl/user.mx24.eu.crt new file mode 100644 index 000000000..38c68ab5b --- /dev/null +++ b/installer/resources/certificates/ssl/user.mx24.eu.crt @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICwDCCAkagAwIBAgIJAKXCoCBjd/C0MAoGCCqGSM49BAMEMIGdMQswCQYDVQQG +EwJERTEVMBMGA1UECAwMdXNlci5teDI0LmV1MRUwEwYDVQQHDAx1c2VyLm14MjQu +ZXUxFTATBgNVBAoMDHVzZXIubXgyNC5ldTEVMBMGA1UECwwMdXNlci5teDI0LmV1 +MRUwEwYDVQQDDAx1c2VyLm14MjQuZXUxGzAZBgkqhkiG9w0BCQEWDHVzZXIubXgy +NC5ldTAeFw0xNTA5MDMxNjMyNDVaFw0yMTAyMjMxNjMyNDVaMIGdMQswCQYDVQQG +EwJERTEVMBMGA1UECAwMdXNlci5teDI0LmV1MRUwEwYDVQQHDAx1c2VyLm14MjQu +ZXUxFTATBgNVBAoMDHVzZXIubXgyNC5ldTEVMBMGA1UECwwMdXNlci5teDI0LmV1 +MRUwEwYDVQQDDAx1c2VyLm14MjQuZXUxGzAZBgkqhkiG9w0BCQEWDHVzZXIubXgy +NC5ldTB2MBAGByqGSM49AgEGBSuBBAAiA2IABPlKs5fYTqVhIOMiR6U9U4TimxS3 +P5NBDVzeeIAgbw5KBC8UImScZVt9g4V1wQe5kPs7TxA2BfanAPZ+ekQiRRvMVQxD +bSlRYupEWhq5BrJI6Lq/HDc7VJe9UUWffWKUoKNQME4wHQYDVR0OBBYEFBGJ0Yr+ +PZXnrk5RafQEALUpAU6ZMB8GA1UdIwQYMBaAFBGJ0Yr+PZXnrk5RafQEALUpAU6Z +MAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwQDaAAwZQIxAPcovePHMCosrAQNzS5i +VDUiyPNLOxHyRBm79yKXGl13LxysB6OK+2M7t8j8E/udBwIwXVVjxN6aSgXYTJ7d +p+Hg/2CuBMwf41/ENRcYQA+oGS9bU6A+7U9KJ1xTWWoqsUEs +-----END CERTIFICATE----- diff --git a/installer/resources/checklist.txt b/installer/resources/checklist.txt index 80f4c8336..b12e50e97 100644 --- a/installer/resources/checklist.txt +++ b/installer/resources/checklist.txt @@ -1,11 +1,36 @@ Release checklist ----------------- +One week before: + Make announcement on Transifex with checkin deadline + + +A day or two before: +Write the release announcement and push to Transifex: + Checkout i2p.newsxml branch + See README for setup + ./create_new_entry.sh + tx push -s + mtn ci + Make announcement on Transifex asking for news translation + + Ensure all translation updates are imported from Transifex Sync with mtn.i2p2.i2p -Start with a clean checkout mtn -d i2p.mtn co --branch=i2p.i2p -Copy over override.properties to set build.built-by -Double-check trust list +Start with a clean checkout mtn -d i2p.mtn co --branch=i2p.i2p /path/to/releasedir +You may build with Java 7 or higher, but ensure you have the Java 6 JRE installed for the bootclasspath + +Create override.properties with (adjust as necessary): +----------- +release.privkey=/path/to/private-signing.key +release.privkey.su3=/path/to/su3keystore.ks +release.gpg.keyid=0xnnnnnnnn +release.signer.su3=xxx@mail.i2p +build.built-by=xxx +javac.compilerargs=-bootclasspath /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/jce.jar +----------- + +Copy latest trust list _MTN/monotonerc from website or some other workspace Change revision in: history.txt @@ -14,6 +39,8 @@ Change revision in: router/java/src/net/i2p/router/RouterVersion.java (change to BUILD = 0 and EXTRA = "") +mtn ci + Review the complete diff from the last release: mtn diff -r t:i2p-0.9.(xx-1) > out.diff vi out.diff @@ -27,10 +54,6 @@ NOTE: These tasks are now automated by 'ant release' Build and tag: ant pkg - mtn ci - mtn tag h: i2p-0.x.xx - mtn cert t:i2p-0.x.xx branch i2p.i2p.release - Sync with mtn.i2p2.i2p Create signed update files with: export I2P=~/i2p @@ -66,15 +89,30 @@ Generate PGP signatures: (end of tasks automated by 'ant release') ========================================= -Add magnet links to news.xml +Now test. +If all goes well: + mtn tag h: i2p-0.x.xx + mtn cert t:i2p-0.x.xx branch i2p.i2p.release + mtn sync (with e.g. mtn.killyourtv.i2p) -Seed update torrents +Add magnet links, change release dates and release number in to old-format news.xml, +and distribute to news hosts +In the i2p.newsxml branch, edit magnet links, release dates and release number in data/releases.json, and check in + +Add update torrents to tracker2.postman.i2p and start seeding (su2 and su3) Notify the following people: All in-network update hosts PPA maintainer news.xml maintainer backup news.xml maintainer + website files maintainer + +Update Trac: + Add milestone and version dates + Increment milestone and version defaults + +Wait for website files to be updated Website files to change: Sync with mtn.i2p-projekt.i2p @@ -85,14 +123,11 @@ Website files to change: New release announcement - see i2p2www/blog/README for instructions Sync with mtn.i2p-projekt.i2p +Wait for a few update hosts to be ready +Tell news hosts to flip the switch +Wait for debian packages to be ready + Announce on: #i2p, #i2p-dev (also on freenode side) forum.i2p twitter - freshmeat.net - launchpad.net - alt.privacy.anon-server - -Update Trac: - Add milestone and version dates - Increment milestone and version defaults diff --git a/installer/resources/eepsite/jetty-ssl.xml b/installer/resources/eepsite/jetty-ssl.xml index 7562828cc..b14ca0976 100644 --- a/installer/resources/eepsite/jetty-ssl.xml +++ b/installer/resources/eepsite/jetty-ssl.xml @@ -248,6 +248,8 @@ TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA + TLS_DHE_DSS_WITH_AES_128_CBC_SHA + diff --git a/installer/resources/geoip.txt b/installer/resources/geoip.txt index e52eb5ac1..e2d1037c6 100644 --- a/installer/resources/geoip.txt +++ b/installer/resources/geoip.txt @@ -1,5 +1,5 @@ # Last updated based on Maxmind GeoLite Country -# dated 2015-07-24 +# dated 2015-09-02 # Script borrowed from Tor # # wget http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip @@ -649,7 +649,9 @@ 86837248,86839295,ES 86839296,86843391,GB 86847488,86849535,GB -86849536,86851583,CZ +86849536,86850559,CZ +86850560,86851327,NL +86851328,86851583,CZ 86851584,86855679,NL 86855680,86859775,RU 86859776,86863871,DE @@ -1239,9 +1241,7 @@ 93893120,93893375,NL 93893376,93893631,US 93893632,93893887,AU -93893888,93894399,US -93894400,93894655,GB -93894656,93896703,US +93893888,93896703,US 93896704,93904895,GB 93904896,93906943,LV 93906944,93908991,BA @@ -1533,7 +1533,8 @@ 96756744,96756751,NL 96756752,96757639,FR 96757640,96757643,CH -96757644,96757663,FR +96757644,96757647,SE +96757648,96757663,FR 96757664,96757667,SE 96757668,96757883,FR 96757884,96757887,ES @@ -1611,7 +1612,7 @@ 96778260,96778859,FR 96778860,96778863,NL 96778864,96778867,CZ -96778868,96778871,NL +96778868,96778871,BE 96778872,96778991,FR 96778992,96779007,DE 96779008,96779011,PT @@ -1623,7 +1624,9 @@ 96779520,96779523,NL 96779524,96779839,FR 96779840,96779903,NL -96779904,96782911,FR +96779904,96782199,FR +96782200,96782207,CZ +96782208,96782911,FR 96782912,96782915,LT 96782916,96783299,FR 96783300,96783303,ES @@ -1726,7 +1729,9 @@ 98992432,98992639,US 98992640,98993151,DE 98993152,98993175,US -98993176,99024895,DE +98993176,98998527,DE +98998528,98998783,GB +98998784,99024895,DE 99024896,99025167,GB 99025168,99025279,DE 99025280,99025407,US @@ -1801,7 +1806,9 @@ 100329472,100331519,RU 100331520,100335615,TR 100335616,100401151,KZ -100532224,100559255,RO +100532224,100548872,RO +100548873,100548873,TR +100548874,100559255,RO 100559256,100559263,EG 100559264,100559551,RO 100559552,100559615,GB @@ -1837,7 +1844,17 @@ 100646912,100647679,RU 100647680,100647711,TR 100647712,100663295,RU -100663296,134738943,US +100663296,134221823,US +134221824,134221824,DE +134221825,134222335,US +134222336,134222336,DE +134222337,134223871,US +134223872,134223872,GB +134223873,134224383,US +134224384,134224384,GB +134224385,134247423,US +134247424,134247424,DE +134247425,134738943,US 134738944,134739199,CA 134739200,135192575,US 135192576,135200767,MX @@ -2074,7 +2091,8 @@ 289642752,289652735,US 289652736,289653759,NL 289653760,289654271,DE -289654272,289656831,US +289654272,289655807,US +289655808,289656831,DE 289656832,289657855,BE 289657856,289658879,AE 289658880,289659903,GB @@ -2761,7 +2779,9 @@ 400911616,400911871,CR 400911872,400912127,US 400912128,400912383,SG -400912384,401130495,US +400912384,401129727,US +401129728,401129983,FR +401129984,401130495,US 401130496,401130751,DE 401130752,401137151,US 401137152,401137663,GB @@ -2815,7 +2835,8 @@ 402128896,402169855,CA 402169856,402223103,US 402223104,402227199,CA -402227200,402239301,US +402227200,402231295,US +402235392,402239301,US 402239302,402239302,CA 402239303,402239473,US 402239474,402239474,CA @@ -2829,8 +2850,8 @@ 402399232,402403327,CA 402403328,402415615,US 402415616,402416639,CA -402416640,402416895,US -402416896,402417663,CA +402416640,402417151,US +402417152,402417663,CA 402417664,402550015,US 402550016,402550271,CA 402550272,402550783,GB @@ -3430,7 +3451,9 @@ 521058304,521060351,IT 521060352,521074687,RO 521074688,521074943,EG -521074944,521075455,RO +521074944,521075199,RO +521075200,521075327,FR +521075328,521075455,RO 521075456,521075711,EG 521075712,521076479,RO 521076480,521076735,IN @@ -4118,7 +4141,9 @@ 533856256,533858303,FR 533858304,533858751,TR 533858752,533858815,AT -533858816,533859647,TR +533858816,533858895,TR +533858896,533858903,AT +533858904,533859647,TR 533859648,533859663,AT 533859664,533860351,TR 533862400,533864447,GB @@ -4207,11 +4232,7 @@ 534519552,534519807,NL 534519808,534521855,US 534521856,534522367,DE -534522368,534522879,NL -534522880,534523034,DE -534523035,534523035,NL -534523036,534523135,DE -534523136,534523391,NL +534522368,534523391,NL 534523392,534523903,DE 534523904,534530047,US 534530048,534538239,ES @@ -4256,7 +4277,9 @@ 539623424,539624577,NL 539624578,539624578,EU 539624579,539627519,NL -539627520,539629975,GB +539627520,539629455,GB +539629456,539629463,BE +539629464,539629975,GB 539629976,539629983,DE 539629984,539630975,GB 539630976,539630983,PT @@ -4657,7 +4680,9 @@ 624574464,624590847,NL 624590848,624625848,FR 624625849,624625849,CA -624625850,624640527,FR +624625850,624640255,FR +624640256,624640259,GB +624640260,624640527,FR 624640528,624640543,GB 624640544,624640759,FR 624640760,624640767,NL @@ -4741,7 +4766,9 @@ 624665952,624665955,NL 624665956,624666167,FR 624666168,624666168,GB -624666169,624666219,FR +624666169,624666172,FR +624666173,624666173,GB +624666174,624666219,FR 624666220,624666223,DE 624666224,624666695,FR 624666696,624666703,DE @@ -4892,7 +4919,7 @@ 624738304,624740351,NL 624740352,624742399,DE 624742400,624746495,RU -624746496,624754687,BG +624746496,624754687,US 624754688,624787455,AZ 624787456,624791551,DE 624791552,624795647,ES @@ -5224,11 +5251,14 @@ 630997504,630997759,MD 630997760,630998271,RO 630998272,630998783,MD -630998784,631001087,RO +630998784,630999039,RO +630999040,630999295,CN +630999296,631001087,RO 631001088,631005183,MD 631005184,631006207,IT 631006208,631007231,MD -631007232,631009279,RO +631007232,631007487,KR +631007488,631009279,RO 631009280,631017471,IR 631017472,631018495,MD 631018496,631019519,IT @@ -5236,10 +5266,14 @@ 631023616,631024639,IT 631024640,631024895,RO 631024896,631025151,GB -631025152,631029759,RO +631025152,631027711,RO +631027712,631027967,KR +631027968,631029759,RO 631029760,631033855,SE 631033856,631034879,IT -631034880,631039999,RO +631034880,631035903,RO +631035904,631036159,JP +631036160,631039999,RO 631040000,631043071,MD 631043072,631043839,RO 631043840,631045119,MD @@ -5467,7 +5501,9 @@ 635860992,635863039,BE 635863040,635893503,RU 635893504,635893759,AZ -635893760,635895807,RU +635893760,635894527,RU +635894528,635894783,KZ +635894784,635895807,RU 635895808,635961343,KW 635961344,635994111,GE 635994112,636026879,RU @@ -6102,7 +6138,11 @@ 700284928,700301311,GH 700301312,700309503,CD 700309504,700313599,DJ -700313600,700317695,US +700313600,700315584,US +700315585,700315585,DJ +700315586,700317478,US +700317479,700317479,DJ +700317480,700317695,US 700317696,700325887,NG 700325888,700334079,ZW 700334080,700335103,BJ @@ -6164,7 +6204,9 @@ 700593152,700594175,NG 700594176,700595199,A2 700595200,700596223,CD -700596224,700645375,A2 +700596224,700598783,A2 +700598784,700599039,CG +700599040,700645375,A2 700645376,700710911,ZA 700710912,700776447,EG 700776448,700841983,RW @@ -6523,7 +6565,9 @@ 711166592,711169311,JP 711169312,711169327,IN 711169328,711173119,JP -711173120,711173375,SG +711173120,711173210,SG +711173211,711173211,ID +711173212,711173375,SG 711173376,711196671,JP 711196672,711458815,CN 711458816,711983103,IN @@ -6713,7 +6757,7 @@ 736403456,736404479,KR 736405504,736408575,IN 736408576,736409599,CN -736409600,736410623,NZ +736409600,736410623,US 736410624,736411647,CN 736411648,736412671,NP 736412672,736413695,TH @@ -6743,7 +6787,6 @@ 736441344,736442367,HK 736442368,736443391,CN 736443392,736445439,AU -736445440,736446463,JP 736446464,736447487,IN 736447488,736448511,TH 736448512,736449535,IN @@ -6859,7 +6902,38 @@ 736621568,736622591,JP 736622592,736624639,IN 736624640,736886783,JP -736886784,737149951,CN +736886784,737096703,CN +737096704,737099775,IN +737099776,737100799,HK +737100800,737101823,IN +737101824,737102847,BD +737102848,737104895,IN +737104896,737106943,HK +737106944,737108991,NZ +737108992,737110015,SG +737110016,737111039,JP +737111040,737113087,IN +737113088,737115135,CN +737115136,737118207,IN +737118208,737119231,AU +737119232,737119999,NL +737120000,737121279,IN +737121280,737122303,VN +737122304,737123327,IN +737123328,737126399,HK +737126400,737127423,IN +737127424,737129471,CN +737129472,737130495,NZ +737130496,737132543,VN +737132544,737139711,IN +737139712,737141759,VN +737141760,737142783,IN +737142784,737143039,HK +737143040,737143807,MY +737143808,737146879,IN +737146880,737147903,NZ +737147904,737148927,MY +737148928,737149951,CN 737149952,737151999,IN 737152000,737154047,HK 737154048,737155071,MY @@ -6938,7 +7012,7 @@ 737308672,737309695,KR 737309696,737312767,IN 737312768,737313791,HK -737313792,737315839,JP +737314816,737315839,JP 737315840,737316863,HK 737316864,737324031,CN 737324032,737325055,HK @@ -7063,7 +7137,31 @@ 737539072,737540095,BD 737540096,737541119,ID 737541120,737542143,SG -737542144,737574911,CN +737542144,737567743,CN +737567744,737570815,IN +737570816,737571839,SG +737571840,737572863,HK +737572864,737574911,IN +737574912,737575935,JP +737575936,737576959,HK +737576960,737581055,IN +737581056,737582079,KR +737582080,737584127,IN +737584128,737585151,MY +737585152,737587199,HK +737587200,737588223,MY +737588224,737589247,KR +737589248,737590271,TH +737590272,737591295,TW +737591296,737593343,JP +737593344,737594367,BD +737594368,737596415,HK +737596416,737597439,CN +737597440,737598463,TW +737598464,737600511,PK +737600512,737601535,CN +737601536,737602559,AU +737602560,737607679,IN 737607680,737608703,HK 737608704,737610751,CN 737610752,737611775,ID @@ -7420,7 +7518,15 @@ 738195456,738197503,KR 738197504,747175935,US 747175936,747241471,NL -747241472,757186559,US +747241472,757071871,US +757071872,757088255,NL +757088256,757090303,US +757090304,757104639,NL +757104640,757106687,US +757106688,757133311,NL +757133312,757135359,AU +757135360,757137407,JP +757137408,757186559,US 757186560,757190655,CA 757190656,757600255,US 757600256,757604351,CA @@ -7443,7 +7549,9 @@ 757714176,757714431,JP 757714432,757716735,US 757716736,757716991,NZ -757716992,757729279,US +757716992,757721599,US +757721600,757721855,PH +757721856,757729279,US 757729280,757731327,CA 757731328,757733375,US 757733376,757734399,CA @@ -7460,9 +7568,10 @@ 757761792,757762047,US 757762048,757762303,MV 757762304,757762559,JP -757762560,757762815,US +757762560,757762815,PH 757762816,757763071,CD -757763072,757763583,US +757763072,757763327,US +757763328,757763583,PA 757763584,757763839,MN 757763840,757764095,US 757764096,757764351,ZW @@ -7494,9 +7603,7 @@ 757773056,757773311,MR 757773312,757774335,US 757774336,757774591,LR -757774592,757775359,US -757775360,757775487,SZ -757775488,757776639,US +757774592,757776639,US 757776640,757776767,GQ 757776768,757777919,US 757777920,757778047,LS @@ -7522,11 +7629,25 @@ 757790976,757791231,WS 757791232,757858303,US 757858304,757956607,CA -757956608,757956863,AU -757956864,758683647,US +757956608,757956863,HK +757956864,757957631,US +757957632,757957887,JP +757957888,757958399,US +757958400,757958655,DE +757958656,757959679,US +757959680,757959935,IT +757959936,757961471,US +757961472,757961727,HK +757961728,757965311,US +757965312,757965567,IN +757965568,758682111,US +758682112,758682367,PH +758682368,758683647,US 758683648,758683903,HK 758683904,758684159,SG -758684160,758685183,US +758684160,758684671,US +758684672,758684927,BR +758684928,758685183,IN 758685184,758685439,AU 758685440,758685695,JP 758685696,758691839,US @@ -7548,7 +7669,8 @@ 758876160,758876415,AU 758876416,758876671,US 758876672,758876927,SD -758876928,758877439,US +758876928,758877183,MH +758877184,758877439,US 758877440,758877695,KZ 758877696,758877951,IR 758877952,758878207,PG @@ -7847,7 +7969,8 @@ 762472448,762473471,CN 762473472,762475519,JP 762475520,762475775,AU -762475776,762476543,ID +762475776,762476031,HK +762476032,762476543,ID 762476544,762478591,PK 762478592,762479615,KR 762479616,762480639,PK @@ -8096,7 +8219,7 @@ 762876928,762877951,SG 762877952,762879231,HK 762879232,762879487,JP -762879488,762879743,SG +762879488,762879743,HK 762879744,762879999,CN 762880000,762881023,IN 762881024,762882047,CN @@ -8148,7 +8271,8 @@ 762950656,762951679,AU 762951680,762952703,JP 762952704,762953727,IN -762953728,762958847,HK +762953728,762957823,HK +762957824,762958847,AU 762958848,762959871,CN 762959872,762960895,ID 762960896,762964991,IN @@ -8199,12 +8323,96 @@ 763103232,763104255,HK 763104256,763105279,BD 763105280,763106303,PH -763106304,763111423,CN +763106304,763107327,CN +763107328,763108351,HK +763108352,763111423,CN 763111424,763112447,AU 763112448,763113471,CN 763113472,763114495,IN +763114496,763115519,AU +763115520,763116543,PH +763116544,763117567,JP +763117568,763118591,HK +763118592,763119615,CN +763119616,763120639,HK +763120640,763122687,CN +763122688,763125759,VN +763125760,763126783,IN +763126784,763127807,CN +763127808,763129343,IN +763129344,763129855,AU +763129856,763130879,HK +763130880,763132927,IN +763132928,763133951,CN +763133952,763134975,IN +763134976,763135999,HK +763136000,763137023,JP +763137024,763142143,IN +763142144,763143167,HK +763143168,763144191,AU +763144192,763145215,BD +763145216,763147263,CN +763147264,763152383,IN +763152384,763153407,AU +763153408,763154431,JP +763154432,763155455,CN +763155456,763156479,AU +763156480,763158527,JP +763158528,763164671,IN +763164672,763166719,CN +763166720,763169791,HK +763169792,763171839,CN +763171840,763172863,SG +763172864,763175935,CN +763175936,763177983,IN +763177984,763179007,CN +763179008,763180031,HK +763180032,763182079,CN +763182080,763183103,IN +763183104,763184127,HK +763184128,763185151,IN +763185152,763186175,HK +763186176,763194367,CN +763194368,763196415,HK +763196416,763197439,IN +763197440,763199487,AU +763199488,763201535,IN +763201536,763202559,CN +763202560,763207679,IN +763207680,763209727,HK +763209728,763210751,NZ +763210752,763214847,IN +763214848,763215871,JP +763215872,763217919,SG +763217920,763220991,VN +763220992,763222015,IN +763222016,763223039,HK +763223040,763224063,BD +763224064,763225087,AF +763225088,763226111,TH +763226112,763227135,KR +763227136,763228159,VN +763228160,763229183,JP +763229184,763229439,NZ +763229440,763230207,IN +763230208,763231231,PH +763231232,763232255,IN +763232256,763234303,HK +763234304,763235327,IN +763235328,763236351,HK +763236352,763238399,IN +763238400,763239423,AU +763239424,763243519,IN +763243520,763244543,AU +763244544,763246591,CN +763246592,763247615,ID +763247616,763248639,SG +763248640,763250687,IN +763250688,763251711,AU +763251712,763252735,HK 767557632,768606207,ZA 768606208,768868351,GH +768868352,769130495,ZM 769130496,769392639,MA 770703360,771227647,EG 771751936,771817471,RU @@ -10103,15 +10311,16 @@ 839339608,839339609,A1 839339610,839340031,US 839340032,839341055,ES -839341056,839348223,US +839341056,839342079,US +839342080,839343103,DE +839343104,839348223,US 839348224,839348479,DE 839348480,839348735,AT 839348736,839348991,GB 839348992,839349247,AT 839349248,839350271,DE 839350272,839351295,NL -839351296,839351807,US -839351808,839352063,DE +839351296,839352063,DE 839352064,839352319,US 839352320,839357439,NL 839357440,839358463,FR @@ -10183,22 +10392,26 @@ 871038976,871104511,SA 871104512,872153087,GB 872153088,872284159,SA -872284160,872415231,FR +872284160,872288871,FR +872288872,872288875,DE +872288876,872290111,FR +872290112,872290143,ES +872290144,872415231,FR 872415232,873463807,US 873463808,873725951,IE 873725952,874250239,US -874250240,874315775,DE -874315776,876609535,US -876609536,876642303,AU -876642304,876871679,US +874250240,874381311,DE +874381312,876609535,US +876609536,876675071,AU +876675072,876871679,US 876871680,877002751,JP 877002752,877264895,US 877264896,877330431,SG 877330432,877395967,US 877395968,877428735,SG -877428736,878510079,US -878510080,878518271,DE -878518272,878650367,US +877428736,878649855,US +878649856,878650111,JP +878650112,878650367,SG 878650368,878651391,AU 878651392,878655487,US 878655488,878656511,JP @@ -10753,7 +10966,9 @@ 1023238144,1023246335,ID 1023246336,1023279103,CN 1023279104,1023311871,IN -1023311872,1023328255,US +1023311872,1023317503,US +1023317504,1023317759,IN +1023317760,1023328255,US 1023328256,1023344639,JP 1023344640,1023410175,CN 1023410176,1023672319,IN @@ -10811,13 +11026,11 @@ 1024365056,1024365311,AP 1024365312,1024365567,JP 1024365568,1024365823,SG -1024365824,1024368639,JP -1024368640,1024369407,MY -1024369408,1024371199,JP +1024365824,1024371199,JP 1024371200,1024371455,PH 1024371456,1024372543,JP -1024372544,1024372607,HK -1024372608,1024373263,JP +1024372544,1024372639,HK +1024372640,1024373263,JP 1024373264,1024373279,HK 1024373280,1024376831,JP 1024376832,1024378879,PH @@ -10834,7 +11047,7 @@ 1025294592,1025294847,SG 1025294848,1025295103,TH 1025295104,1025295615,CN -1025295616,1025295871,MY +1025295616,1025295871,PH 1025295872,1025296127,GB 1025296128,1025296639,FR 1025296640,1025296895,MY @@ -11560,7 +11773,9 @@ 1049030656,1049031679,DE 1049031680,1049031743,EU 1049031744,1049031871,DE -1049031872,1049034751,EU +1049031872,1049032093,EU +1049032094,1049032094,DE +1049032095,1049034751,EU 1049034752,1049067519,EG 1049067520,1049100287,DK 1049100288,1049231359,GB @@ -11568,7 +11783,9 @@ 1049296896,1049362431,EG 1049362432,1049366527,GB 1049366528,1049368575,DE -1049368576,1049369983,GB +1049368576,1049368656,GB +1049368657,1049368657,DE +1049368658,1049369983,GB 1049369984,1049370047,DE 1049370048,1049370623,GB 1049370624,1049378815,AT @@ -13080,7 +13297,9 @@ 1080024320,1080024575,CA 1080024576,1080033279,US 1080033280,1080164351,KY -1080164352,1080295423,CA +1080164352,1080225791,CA +1080225792,1080229887,US +1080229888,1080295423,CA 1080295424,1080498664,US 1080498665,1080498665,EU 1080498666,1080501503,US @@ -13258,7 +13477,9 @@ 1087444224,1087444479,GB 1087444480,1087465727,US 1087465728,1087465983,AU -1087465984,1087496703,US +1087465984,1087466883,US +1087466884,1087466887,GB +1087466888,1087496703,US 1087496704,1087496959,CA 1087496960,1087501567,US 1087501568,1087501695,HK @@ -13304,9 +13525,13 @@ 1088012768,1088012775,PR 1088012776,1088684031,US 1088684032,1088946175,CA -1088946176,1089057279,US +1088946176,1089055999,US +1089056000,1089056255,AP +1089056256,1089057279,US 1089057280,1089057535,EU -1089057536,1089167359,US +1089057536,1089151231,US +1089151232,1089151487,NL +1089151488,1089167359,US 1089167360,1089171455,CA 1089171456,1089171967,A2 1089171968,1089172735,US @@ -13496,7 +13721,9 @@ 1093966164,1093966164,NL 1093966165,1093966216,US 1093966217,1093966217,NL -1093966218,1094074879,US +1093966218,1093984294,US +1093984295,1093984295,IE +1093984296,1094074879,US 1094074880,1094075167,BR 1094075168,1094088959,US 1094088960,1094089023,PR @@ -13550,7 +13777,9 @@ 1098070272,1098070279,GR 1098070280,1098070295,US 1098070296,1098070303,BE -1098070304,1101121535,US +1098070304,1098891623,US +1098891624,1098891631,AU +1098891632,1101121535,US 1101121536,1101121791,EC 1101121792,1101182975,US 1101182976,1101183487,YE @@ -13730,7 +13959,9 @@ 1108525056,1108541439,CA 1108541440,1109688319,US 1109688320,1109696511,CA -1109696512,1109707007,US +1109696512,1109705727,US +1109705728,1109705983,CG +1109705984,1109707007,US 1109707008,1109707263,JM 1109707264,1109707519,US 1109707520,1109707775,MW @@ -13836,10 +14067,15 @@ 1112539136,1112870911,US 1112871936,1112873983,US 1112873984,1112875007,CA -1112875008,1112907775,US +1112875008,1112875519,US +1112875520,1112875775,CA +1112875776,1112889855,US +1112890112,1112890367,CA +1112890368,1112907775,US 1112907776,1112907783,CA 1112907784,1112931327,US 1112931328,1112931839,CA +1112931840,1112932095,US 1112932352,1113591807,US 1113591808,1113595903,CA 1113595904,1113596415,CL @@ -13856,9 +14092,10 @@ 1113603328,1113603583,GT 1113603584,1113603839,US 1113603840,1113604095,CA -1113604096,1113643202,US -1113643203,1113643237,CH -1113643238,1113657343,US +1113604096,1113636863,US +1113636864,1113645055,SG +1113645056,1113653247,ID +1113653248,1113657343,US 1113657344,1113661439,CA 1113661440,1113669631,US 1113669632,1113677823,CA @@ -13969,7 +14206,9 @@ 1117458912,1117458943,GB 1117458944,1117460223,US 1117460224,1117460287,GB -1117460288,1117470719,US +1117460288,1117460991,US +1117460992,1117461247,GB +1117461248,1117470719,US 1117470720,1117471231,CA 1117471232,1117480191,US 1117480192,1117480255,CA @@ -14696,6 +14935,7 @@ 1158427648,1158428159,CA 1158428160,1158428415,US 1158428672,1158440959,US +1158440960,1158441215,CA 1158441216,1158441471,US 1158441472,1158441983,CA 1158441984,1158443007,DM @@ -14871,11 +15111,17 @@ 1161427456,1161428223,AG 1161428224,1161428991,KN 1161428992,1161429247,US -1161429248,1161429503,CA +1161429248,1161429375,CA +1161429376,1161429407,US +1161429408,1161429503,CA 1161429504,1161429951,US 1161429952,1161430015,CA 1161430016,1161430783,US -1161430784,1161431039,CA +1161430784,1161430879,CA +1161430880,1161430911,US +1161430912,1161430943,CA +1161430944,1161430975,US +1161430976,1161431039,CA 1161431040,1161433087,A2 1161433088,1161437183,CA 1161437184,1161453567,US @@ -15031,7 +15277,9 @@ 1163538464,1163538479,CA 1163538480,1163538575,US 1163538576,1163538591,CA -1163538592,1163540351,US +1163538592,1163539199,US +1163539200,1163539455,CA +1163539456,1163540351,US 1163540352,1163540479,CA 1163540480,1163540735,US 1163540736,1163541503,CA @@ -15506,7 +15754,13 @@ 1211334656,1211367935,US 1211367936,1211368191,CA 1211368192,1211368447,EE -1211368448,1211432959,US +1211368448,1211390981,US +1211390982,1211390982,DE +1211390983,1211390989,US +1211390990,1211390990,DE +1211390991,1211391216,US +1211391217,1211391217,IT +1211391218,1211432959,US 1211432960,1211473919,CA 1211473920,1211596799,US 1211596800,1211605999,CA @@ -15788,7 +16042,9 @@ 1249720600,1249720607,IT 1249720608,1249720663,GB 1249720664,1249720671,SE -1249720672,1249720831,GB +1249720672,1249720711,GB +1249720712,1249720719,NL +1249720720,1249720831,GB 1249720832,1249721343,US 1249721344,1249721351,AT 1249721352,1249721359,BE @@ -15920,7 +16176,9 @@ 1264718720,1264718847,CA 1264718848,1264719103,US 1264719104,1264719871,CA -1264719872,1264762879,US +1264719872,1264746527,US +1264746528,1264746543,CA +1264746544,1264762879,US 1264762880,1264763391,CA 1264763392,1264763647,IE 1264763648,1264766975,CA @@ -16339,7 +16597,9 @@ 1297178112,1297178367,QA 1297178368,1297178623,RO 1297178624,1297178879,NL -1297178880,1297182719,RO +1297178880,1297181951,RO +1297181952,1297182463,DE +1297182464,1297182719,RO 1297182720,1297184767,ES 1297184768,1297185279,BZ 1297185280,1297190143,RO @@ -16870,7 +17130,12 @@ 1310707968,1310708223,PL 1310708224,1310708479,RU 1310708480,1310708735,GB -1310708736,1310709247,IE +1310708736,1310708927,IE +1310708928,1310708943,GB +1310708944,1310709199,IE +1310709200,1310709215,DE +1310709216,1310709231,NL +1310709232,1310709247,IE 1310709248,1310709759,PL 1310709760,1310711807,RU 1310711808,1310713855,LT @@ -17428,7 +17693,9 @@ 1334725632,1334726143,SE 1334726144,1334726399,LU 1334726400,1334726655,SE -1334726656,1334734847,RU +1334726656,1334730239,RU +1334730240,1334730495,KZ +1334730496,1334734847,RU 1334734848,1334738943,LT 1334738944,1334743039,CH 1334743040,1334747135,CZ @@ -17441,7 +17708,9 @@ 1334779904,1334783999,UA 1334784000,1334788095,AT 1334788096,1334792191,RU -1334792192,1334794239,GB +1334792192,1334793320,GB +1334793321,1334793321,IR +1334793322,1334794239,GB 1334794240,1334796287,ES 1334796288,1334800383,ME 1334800384,1334804479,IT @@ -17760,8 +18029,8 @@ 1347010560,1347014655,RU 1347014656,1347018751,GG 1347018752,1347022847,IT -1347022848,1347026943,AT -1347026944,1347035135,GB +1347022848,1347024895,AT +1347024896,1347035135,GB 1347035136,1347039231,CZ 1347039232,1347043327,RO 1347043328,1347047423,FR @@ -18383,7 +18652,9 @@ 1353262296,1353262303,US 1353262304,1353271567,GB 1353271568,1353271575,AT -1353271576,1353271727,GB +1353271576,1353271711,GB +1353271712,1353271719,AT +1353271720,1353271727,GB 1353271728,1353271743,AT 1353271744,1353271775,GB 1353271776,1353271807,AT @@ -18478,7 +18749,9 @@ 1357318160,1357318191,GB 1357318192,1357318399,EU 1357318400,1357318655,FR -1357318656,1357321023,EU +1357318656,1357318911,EU +1357318912,1357319167,DE +1357319168,1357321023,EU 1357321024,1357321087,KE 1357321088,1357321983,EU 1357321984,1357322239,GB @@ -18488,8 +18761,8 @@ 1357323008,1357323015,CG 1357323016,1357323519,EU 1357323520,1357323775,GB -1357323776,1357323783,FI -1357323784,1357324287,EU +1357323776,1357323791,FI +1357323792,1357324287,EU 1357324288,1357325311,GB 1357325312,1357326335,EU 1357326336,1357326337,ES @@ -18534,8 +18807,10 @@ 1357348416,1357348479,EU 1357348480,1357348607,ES 1357348608,1357350399,EU -1357350400,1357350591,GB -1357350592,1357351167,EU +1357350400,1357350607,GB +1357350608,1357350655,EU +1357350656,1357350783,GB +1357350784,1357351167,EU 1357351168,1357351423,PL 1357351424,1357360063,EU 1357360064,1357360127,GB @@ -18566,11 +18841,11 @@ 1357373556,1357373567,EU 1357373568,1357373695,GB 1357373696,1357373951,EU -1357373952,1357375103,GB -1357375104,1357377535,EU +1357373952,1357375135,GB +1357375136,1357377535,EU 1357377536,1357377671,FR -1357377672,1357377791,EU -1357377792,1357378559,FR +1357377672,1357377695,EU +1357377696,1357378559,FR 1357378560,1357381631,EU 1357381632,1357414399,NO 1357414400,1357447167,LV @@ -18964,7 +19239,9 @@ 1359036416,1359052799,GB 1359052800,1359101951,RU 1359101952,1359118335,GB -1359118336,1359119199,DE +1359118336,1359118655,DE +1359118656,1359118719,GR +1359118720,1359119199,DE 1359119200,1359119231,NL 1359119232,1359119359,DE 1359119360,1359120383,NL @@ -19239,9 +19516,13 @@ 1360986270,1360986270,US 1360986271,1360986299,GB 1360986300,1360986300,US -1360986301,1360986367,GB +1360986301,1360986356,GB +1360986357,1360986358,US +1360986359,1360986367,GB 1360986368,1360986399,US -1360986400,1360992255,GB +1360986400,1360986631,GB +1360986632,1360986635,US +1360986636,1360992255,GB 1360992256,1360992511,DE 1360992512,1360994303,GB 1360994304,1360998399,CZ @@ -19858,7 +20139,9 @@ 1383497728,1383505919,RU 1383505920,1383514111,SA 1383514112,1383522303,FI -1383522304,1383530495,BG +1383522304,1383523839,BG +1383523840,1383524095,GB +1383524096,1383530495,BG 1383530496,1383538687,DE 1383538688,1383546879,IT 1383546880,1383555071,BG @@ -19938,7 +20221,11 @@ 1385275392,1385283583,IT 1385283584,1385286143,DE 1385286144,1385287679,GB -1385287680,1385291775,EU +1385287680,1385290631,EU +1385290632,1385290632,IS +1385290633,1385291343,EU +1385291344,1385291344,IS +1385291345,1385291775,EU 1385291776,1385299967,TR 1385299968,1385308159,BG 1385308160,1385312255,RU @@ -19996,7 +20283,9 @@ 1386217472,1386283007,PL 1386283008,1386348543,NL 1386348544,1386414079,RU -1386414080,1386448895,GB +1386414080,1386438399,GB +1386438400,1386438655,FR +1386438656,1386448895,GB 1386448896,1386450943,IL 1386450944,1386479615,GB 1386479616,1386545151,NO @@ -21527,7 +21816,9 @@ 1431994368,1432002559,AT 1432002560,1432010751,HU 1432010752,1432018943,UA -1432018944,1432027135,GB +1432018944,1432024063,GB +1432024064,1432025087,DE +1432025088,1432027135,GB 1432027136,1432035327,IE 1432035328,1432043519,GB 1432043520,1432051711,ES @@ -21622,7 +21913,7 @@ 1433731072,1433739263,PL 1433739264,1433747455,GE 1433747456,1433755647,RU -1433755648,1433763839,EE +1433755648,1433763839,KZ 1433763840,1433772031,FR 1433772032,1433788415,SE 1433796608,1433804799,GB @@ -21822,9 +22113,7 @@ 1438878208,1438885887,RU 1438885888,1438889983,LT 1438889984,1438892031,RU -1438892032,1438893823,IS -1438893824,1438894079,CH -1438894080,1438896127,IS +1438892032,1438896127,CH 1438896128,1438900223,AQ 1438900224,1438908415,CH 1438908416,1438924799,GR @@ -21900,7 +22189,9 @@ 1439467520,1439468031,DK 1439468032,1439468543,RO 1439468544,1439469567,ES -1439469568,1439477759,RO +1439469568,1439475711,RO +1439475712,1439475967,IN +1439475968,1439477759,RO 1439477760,1439479807,MD 1439479808,1439482367,RO 1439482368,1439482879,DK @@ -22171,7 +22462,7 @@ 1449778688,1449779455,RO 1449779456,1449779711,GB 1449779712,1449779967,RO -1449779968,1449780223,EU +1449779968,1449780223,RU 1449780224,1449780479,RO 1449780480,1449780991,GB 1449780992,1449781247,RO @@ -22197,7 +22488,7 @@ 1449811968,1449812223,DK 1449812224,1449812991,RO 1449812992,1449813503,GB -1449813504,1449813759,EU +1449813504,1449813759,RU 1449813760,1449814271,RO 1449814272,1449815039,GB 1449815040,1449815295,RO @@ -23167,7 +23458,9 @@ 1495313152,1495313407,MD 1495313408,1495316991,RO 1495316992,1495317503,IT -1495317504,1495319295,RO +1495317504,1495319039,RO +1495319040,1495319167,FR +1495319168,1495319295,RO 1495319296,1495319551,SE 1495319552,1495320063,IR 1495320064,1495326719,RO @@ -23194,7 +23487,8 @@ 1495351296,1495351551,GB 1495351552,1495351807,MD 1495351808,1495352319,IQ -1495352320,1495352831,RO +1495352320,1495352447,FR +1495352448,1495352831,RO 1495352832,1495353087,FI 1495353088,1495362559,RO 1495362560,1495363583,ES @@ -23230,9 +23524,7 @@ 1495406080,1495408639,RO 1495408640,1495416831,IR 1495416832,1495418879,MD -1495418880,1495419391,RO -1495419392,1495419903,EU -1495419904,1495422975,RO +1495418880,1495422975,RO 1495422976,1495423487,IR 1495423488,1495424511,RO 1495424512,1495425023,IR @@ -23246,7 +23538,9 @@ 1495428864,1495429119,DE 1495429120,1495433215,RO 1495433216,1495441407,IR -1495441408,1495442943,RO +1495441408,1495442431,RO +1495442432,1495442559,FR +1495442560,1495442943,RO 1495442944,1495443199,AE 1495443200,1495443455,RO 1495443456,1495443967,IR @@ -23290,7 +23584,9 @@ 1495498368,1495498495,BD 1495498496,1495499775,RO 1495499776,1495500287,IR -1495500288,1495505151,RO +1495500288,1495502847,RO +1495502848,1495503871,PL +1495503872,1495505151,RO 1495505152,1495505407,GB 1495505408,1495505919,RO 1495505920,1495506431,IR @@ -23304,7 +23600,8 @@ 1495511552,1495511807,LT 1495511808,1495515647,RO 1495515648,1495516159,IR -1495516160,1495516671,RO +1495516160,1495516287,FR +1495516288,1495516671,RO 1495516672,1495516927,GR 1495516928,1495517183,RO 1495517184,1495518207,MD @@ -23327,7 +23624,9 @@ 1495554560,1495555071,SE 1495555072,1495556095,RO 1495556096,1495560191,IR -1495560192,1495566847,RO +1495560192,1495566335,RO +1495566336,1495566591,GB +1495566592,1495566847,RO 1495566848,1495567359,GB 1495567360,1495571455,RO 1495571456,1495572479,MD @@ -23357,8 +23656,8 @@ 1495623168,1495623679,IR 1495623680,1495624191,MD 1495624192,1495630079,RO -1495630080,1495631359,GB -1495631360,1495632127,RO +1495630080,1495631615,GB +1495631616,1495632127,RO 1495632128,1495632639,MD 1495632640,1495642111,RO 1495642112,1495644159,SE @@ -23403,7 +23702,9 @@ 1495760128,1495760895,RO 1495760896,1495762943,DE 1495762944,1495763967,GB -1495763968,1495765503,RO +1495763968,1495764735,RO +1495764736,1495764991,AU +1495764992,1495765503,RO 1495765504,1495765759,GB 1495765760,1495766015,NL 1495766016,1495767039,RO @@ -23424,7 +23725,9 @@ 1495791360,1495791615,GB 1495791616,1495793663,RO 1495793664,1495794687,DE -1495794688,1495795455,RO +1495794688,1495795199,RO +1495795200,1495795327,FR +1495795328,1495795455,RO 1495795456,1495795711,RU 1495795712,1495803391,RO 1495803392,1495803903,IR @@ -23504,7 +23807,11 @@ 1495970816,1495971839,MD 1495971840,1495983103,RO 1495983104,1495983615,IR -1495983616,1495990271,RO +1495983616,1495985663,RO +1495985664,1495985791,FR +1495985792,1495985919,RO +1495985920,1495986175,JP +1495986176,1495990271,RO 1495990272,1495994367,IR 1495994368,1495998463,RO 1495998464,1495998719,SG @@ -23518,7 +23825,9 @@ 1496012800,1496016895,IR 1496016896,1496018943,RO 1496018944,1496019967,FR -1496019968,1496036863,RO +1496019968,1496020735,RO +1496020736,1496020991,AU +1496020992,1496036863,RO 1496036864,1496037375,IR 1496037376,1496038399,RO 1496038400,1496038911,IR @@ -23534,7 +23843,9 @@ 1496057856,1496058111,DE 1496058112,1496066815,RO 1496066816,1496067071,QA -1496067072,1496084479,RO +1496067072,1496073983,RO +1496073984,1496074239,ES +1496074240,1496084479,RO 1496084480,1496084991,IR 1496084992,1496085247,MD 1496085248,1496086015,RO @@ -23580,7 +23891,9 @@ 1496197120,1496197631,MD 1496197632,1496198143,RO 1496198144,1496198655,IR -1496198656,1496202239,RO +1496198656,1496198911,RO +1496198912,1496199167,GB +1496199168,1496202239,RO 1496202240,1496202751,IR 1496202752,1496203263,RO 1496203264,1496205311,IT @@ -23590,7 +23903,9 @@ 1496213504,1496215551,IT 1496215552,1496216319,RO 1496216320,1496216575,MD -1496216576,1496228863,RO +1496216576,1496221695,RO +1496221696,1496223743,ES +1496223744,1496228863,RO 1496228864,1496229887,MD 1496229888,1496231935,RO 1496231936,1496233983,PS @@ -23621,9 +23936,7 @@ 1499856896,1499987967,CZ 1499987968,1499996159,AT 1499996160,1500004351,GB -1500004352,1500008447,RU -1500008448,1500012543,IR -1500012544,1500020735,RU +1500004352,1500020735,RU 1500020736,1500028927,IS 1500028928,1500037119,NL 1500037120,1500045311,DK @@ -24085,7 +24398,9 @@ 1506410496,1506422063,DE 1506422064,1506422079,GB 1506422080,1506443263,DE -1506443264,1506444757,GB +1506443264,1506444397,GB +1506444398,1506444398,DE +1506444399,1506444757,GB 1506444758,1506444758,DE 1506444759,1506445103,GB 1506445104,1506445119,DE @@ -24135,7 +24450,9 @@ 1506463680,1506463695,DE 1506463696,1506464895,GB 1506464896,1506464911,NL -1506464912,1506465023,GB +1506464912,1506464999,GB +1506465000,1506465007,NL +1506465008,1506465023,GB 1506465024,1506465187,EU 1506465188,1506465188,NL 1506465189,1506465279,EU @@ -24147,11 +24464,15 @@ 1506469664,1506469695,IT 1506469696,1506469759,GB 1506469760,1506469775,IT -1506469776,1506471983,GB +1506469776,1506471871,GB +1506471872,1506471903,IT +1506471904,1506471983,GB 1506471984,1506471999,NL 1506472000,1506472031,GB 1506472032,1506472047,NL -1506472048,1506476031,GB +1506472048,1506475873,GB +1506475874,1506475874,DE +1506475875,1506476031,GB 1506476032,1506508799,KW 1506508800,1506541567,CZ 1506541568,1506574335,RU @@ -25405,7 +25726,6 @@ 1539560960,1539561471,UA 1539561472,1539561983,RO 1539561984,1539563007,DE -1539563008,1539563519,RU 1539563520,1539564031,SE 1539564032,1539564543,KZ 1539564544,1539565055,GB @@ -27107,7 +27427,6 @@ 1540654080,1540654335,EU 1540654336,1540654591,RU 1540654592,1540654847,SI -1540654848,1540655103,RU 1540655104,1540655359,AT 1540655360,1540655615,RU 1540655616,1540655871,GB @@ -27120,7 +27439,7 @@ 1540658176,1540658431,RO 1540658432,1540659199,RU 1540659200,1540659455,FR -1540659456,1540659967,UA +1540659712,1540659967,UA 1540659968,1540660223,PL 1540660224,1540660479,RU 1540660480,1540660735,FR @@ -27919,10 +28238,9 @@ 1541010944,1541011199,CY 1541011200,1541011455,CH 1541011456,1541011711,FI -1541011712,1541011967,RU 1541012224,1541012479,DE 1541012480,1541012735,FI -1541012736,1541013247,UA +1541012992,1541013247,UA 1541013248,1541013503,SI 1541013504,1541014527,RO 1541014528,1541015551,AM @@ -28301,7 +28619,6 @@ 1541232128,1541232639,RU 1541232640,1541233151,PL 1541233152,1541233663,RU -1541233664,1541234175,SK 1541234176,1541234687,RO 1541234688,1541235199,NL 1541235200,1541235455,RU @@ -28454,7 +28771,6 @@ 1541347584,1541347839,RU 1541347840,1541348095,SI 1541348096,1541348351,UA -1541348352,1541348607,RU 1541348608,1541348863,HR 1541348864,1541349119,UA 1541349120,1541349375,PL @@ -29444,7 +29760,6 @@ 1541904384,1541904639,PL 1541904640,1541904895,SE 1541904896,1541905407,GB -1541905408,1541905663,RU 1541905664,1541905919,PL 1541905920,1541906431,RS 1541906432,1541906687,UA @@ -29634,7 +29949,7 @@ 1542017792,1542018047,GB 1542018048,1542019071,DE 1542019072,1542019327,RU -1542019328,1542020095,UA +1542019584,1542020095,UA 1542020096,1542021119,RU 1542021120,1542023167,UA 1542023168,1542023423,PL @@ -29762,7 +30077,7 @@ 1542106112,1542107135,RU 1542107136,1542107391,PL 1542107392,1542107903,RU -1542107904,1542108159,SK +1542107904,1542108159,AT 1542108160,1542109183,RU 1542109184,1542109695,GB 1542109696,1542110207,PL @@ -29801,7 +30116,6 @@ 1542124800,1542125567,PL 1542125568,1542126591,CZ 1542126592,1542127103,PL -1542127360,1542127615,RU 1542127616,1542128127,PL 1542128128,1542128383,RU 1542128384,1542129151,RO @@ -29988,7 +30302,8 @@ 1542237184,1542238207,PL 1542238208,1542239743,RU 1542239744,1542239999,HU -1542240000,1542240767,RU +1542240000,1542240255,RU +1542240256,1542240767,UA 1542240768,1542241023,DK 1542241024,1542241279,GB 1542241280,1542241535,LV @@ -30163,7 +30478,7 @@ 1542343680,1542344447,PL 1542344448,1542345727,RU 1542345984,1542346239,PL -1542346240,1542348287,RU +1542346240,1542347775,RU 1542348288,1542348799,MD 1542348800,1542349823,RU 1542349824,1542350847,UA @@ -30737,7 +31052,8 @@ 1546006528,1546008575,UA 1546008576,1546014719,BY 1546014720,1546015743,RU -1546015744,1546027007,CZ +1546015744,1546018815,CZ +1546018816,1546027007,UA 1546027008,1546059775,RU 1546059776,1546063871,SE 1546063872,1546067967,DE @@ -31096,7 +31412,9 @@ 1558056104,1558079407,FR 1558079408,1558079415,PL 1558079416,1558079423,GB -1558079424,1558081175,FR +1558079424,1558079871,FR +1558079872,1558079887,GB +1558079888,1558081175,FR 1558081176,1558081183,BE 1558081184,1558083775,FR 1558083776,1558083791,DE @@ -31128,7 +31446,9 @@ 1558122496,1558123007,SG 1558123008,1558123519,RU 1558123520,1558125567,LU -1558125568,1558147071,AT +1558125568,1558141439,AT +1558141440,1558141695,CY +1558141696,1558147071,AT 1558147072,1558147327,LU 1558147328,1558147583,AT 1558147584,1558147839,RU @@ -31503,16 +31823,22 @@ 1567826176,1567826431,DE 1567826432,1567827455,RO 1567827456,1567827711,BG -1567827712,1567833087,RO +1567827712,1567832831,RO +1567832832,1567833087,GB 1567833088,1567833599,NL 1567833600,1567834111,IT 1567834112,1567838207,RO 1567838208,1567842303,A1 -1567842304,1567852543,RO +1567842304,1567842815,FR +1567842816,1567852543,RO 1567852544,1567856639,MD 1567856640,1567858687,RO 1567858688,1567860735,SE -1567860736,1567871999,RO +1567860736,1567866879,RO +1567866880,1567867135,IN +1567867136,1567869183,RO +1567869184,1567869439,NL +1567869440,1567871999,RO 1567872000,1567873023,ES 1567873024,1567879167,MD 1567879168,1567883263,RO @@ -31539,11 +31865,14 @@ 1568024320,1568038911,RO 1568038912,1568059391,IR 1568059392,1568060415,RO -1568060416,1568062463,MD -1568062464,1568088063,RO +1568060416,1568063487,MD +1568063488,1568083967,RO +1568083968,1568084223,CN +1568084224,1568088063,RO 1568088064,1568104447,IR 1568104448,1568106495,MD -1568106496,1568108543,RO +1568106496,1568107519,RO +1568107520,1568108543,MD 1568108544,1568109055,GB 1568109056,1568110079,RO 1568110080,1568111103,GB @@ -31640,7 +31969,7 @@ 1571422208,1571422463,CZ 1571422464,1571422719,UA 1571422720,1571423231,RU -1571423232,1571423487,CZ +1571423232,1571423487,UA 1571423488,1571423999,RU 1571424000,1571424255,KZ 1571424256,1571424511,KG @@ -31654,7 +31983,9 @@ 1571425233,1571425279,CZ 1571425280,1571425535,RU 1571425536,1571425791,NL -1571425792,1571426047,CZ +1571425792,1571425871,CZ +1571425872,1571425872,RU +1571425873,1571426047,CZ 1571426048,1571426303,UA 1571426304,1571428607,CZ 1571428608,1571428863,UA @@ -31712,16 +32043,17 @@ 1571469312,1571469823,BY 1571469824,1571470335,CZ 1571470336,1571470847,UA -1571470848,1571471103,RU -1571471104,1571471359,CZ -1571471360,1571475455,RU +1571470848,1571475455,RU 1571475456,1571476479,CZ 1571476480,1571479551,RU 1571479552,1571483647,CZ 1571483648,1571484159,RU 1571484160,1571487743,CZ -1571487744,1571489791,SK -1571489792,1571490303,CZ +1571487744,1571489023,SK +1571489024,1571489279,UA +1571489280,1571489535,BY +1571489536,1571490047,RU +1571490048,1571490303,CZ 1571490304,1571491071,RU 1571491072,1571491327,CZ 1571491328,1571495935,UA @@ -31734,7 +32066,9 @@ 1571514368,1571520511,BY 1571520512,1571522047,UA 1571522048,1571522815,RU -1571522816,1571524607,CZ +1571522816,1571524095,CZ +1571524096,1571524351,RU +1571524352,1571524607,CZ 1571524608,1571526655,RU 1571526656,1571528191,CZ 1571528192,1571528703,UA @@ -31757,8 +32091,8 @@ 1571535872,1571538943,RU 1571538944,1571539967,CZ 1571539968,1571540223,UA -1571540224,1571540694,CZ -1571540695,1571540695,RU +1571540224,1571540693,CZ +1571540694,1571540695,RU 1571540696,1571540696,CZ 1571540697,1571540697,RU 1571540698,1571540991,CZ @@ -32194,11 +32528,9 @@ 1578614404,1578614423,FR 1578614424,1578614427,IS 1578614428,1578614431,LV -1578614432,1578614435,BG -1578614436,1578614459,FR +1578614432,1578614459,FR 1578614460,1578614463,NO -1578614464,1578614467,FR -1578614468,1578614471,AT +1578614464,1578614471,FR 1578614472,1578614475,SI 1578614476,1578614479,UA 1578614480,1578614495,FR @@ -32645,14 +32977,17 @@ 1588658176,1588659199,RO 1588659200,1588659711,NL 1588659712,1588664319,RO -1588664320,1588664831,VG +1588664320,1588664575,TH +1588664576,1588664831,VG 1588664832,1588673535,RO 1588673536,1588674559,MD 1588674560,1588676607,RO 1588676608,1588678655,IR 1588678656,1588684799,RO -1588684800,1588685311,VG -1588685312,1588689919,RO +1588684800,1588685055,TH +1588685056,1588685311,VG +1588685312,1588689663,RO +1588689664,1588689919,RU 1588689920,1588690687,GB 1588690688,1588723711,RO 1588723712,1588854783,UA @@ -32969,7 +33304,9 @@ 1596858880,1596859391,RU 1596859392,1596862463,CZ 1596862464,1596876799,RU -1596876800,1596881919,CZ +1596876800,1596878079,CZ +1596878080,1596878335,RU +1596878336,1596881919,CZ 1596881920,1596887295,RU 1596887296,1596887551,KZ 1596887552,1596888063,UA @@ -32986,7 +33323,8 @@ 1596901376,1596907519,BY 1596907520,1596909567,RU 1596909568,1596911615,KZ -1596911616,1596915711,RU +1596911616,1596911871,BY +1596911872,1596915711,RU 1596915712,1596923903,UA 1596923904,1596925951,CZ 1596925952,1596932095,RU @@ -33348,7 +33686,10 @@ 1603215360,1603219455,DE 1603219456,1603223551,CH 1603223552,1603223807,FR -1603223808,1603227647,GB +1603223808,1603226255,GB +1603226256,1603226263,DE +1603226264,1603226271,NL +1603226272,1603227647,GB 1603227648,1603231743,AT 1603231744,1603235839,IT 1603235840,1603239935,RU @@ -33378,7 +33719,9 @@ 1604059136,1604075519,MK 1604075520,1604091903,RU 1604091904,1604108287,BA -1604108288,1604141055,DE +1604108288,1604120575,DE +1604120576,1604122623,PL +1604122624,1604141055,DE 1604141056,1604157439,IT 1604157440,1604190207,FR 1604190208,1604206591,UA @@ -33500,7 +33843,9 @@ 1605125277,1605125375,DE 1605125376,1605125903,GB 1605125904,1605125919,DE -1605125920,1605130239,GB +1605125920,1605126701,GB +1605126702,1605126702,US +1605126703,1605130239,GB 1605130240,1605130271,NL 1605130272,1605131263,GB 1605131264,1605131519,DE @@ -33614,7 +33959,9 @@ 1607636480,1607639039,EU 1607639040,1607640805,IT 1607640806,1607640806,CH -1607640807,1607647231,IT +1607640807,1607642388,IT +1607642389,1607642389,NL +1607642390,1607647231,IT 1607647232,1607651327,DE 1607651328,1607655423,FR 1607655424,1607663615,IT @@ -33711,7 +34058,8 @@ 1611116544,1611117567,NL 1611117568,1611128831,US 1611128832,1611130879,NL -1611130880,1611227135,US +1611130880,1611218943,US +1611218944,1611227135,KH 1611227136,1611235327,CA 1611235328,1611251711,SG 1611251712,1611662335,US @@ -34133,7 +34481,9 @@ 1728346624,1728347135,AU 1728347136,1728347147,SG 1728347148,1728347148,AP -1728347149,1728347421,SG +1728347149,1728347416,SG +1728347417,1728347417,AP +1728347418,1728347421,SG 1728347422,1728347422,AP 1728347423,1728348159,SG 1728348160,1728349183,VN @@ -34478,7 +34828,8 @@ 1728684032,1728685055,AU 1728685056,1728686079,JP 1728686080,1728687103,AU -1728687104,1728689407,JP +1728687104,1728688127,JP +1728689152,1728689407,JP 1728689408,1728689663,BD 1728689664,1728689919,PK 1728690176,1728691199,BD @@ -34611,7 +34962,7 @@ 1728812544,1728813055,SG 1728813056,1728814079,IN 1728814080,1728815103,JP -1728816128,1728817151,AU +1728815104,1728817151,AU 1728818176,1728819199,VN 1728819200,1728819711,ID 1728819712,1728819967,NZ @@ -34656,7 +35007,7 @@ 1728848896,1728849919,AU 1728849920,1728850943,PK 1728850944,1728851967,BD -1728851968,1728854015,JP +1728852992,1728854015,JP 1728854016,1728854527,AU 1728854528,1728854783,PK 1728854784,1728855039,AU @@ -34717,12 +35068,10 @@ 1728902400,1728902655,IN 1728902912,1728903167,BD 1728903168,1728905215,KR -1728905472,1728905727,PK 1728905728,1728906239,IN 1728907264,1728908287,NZ 1728909312,1728912383,JP 1728912384,1728913407,TH -1728913408,1728914431,PH 1728914432,1728915199,ID 1728915200,1728915455,NZ 1728915456,1728917503,JP @@ -34784,9 +35133,7 @@ 1728973824,1728974847,JP 1728974848,1728976383,ID 1728976384,1728976895,AU -1728976896,1728977151,AF 1728977920,1728978943,MY -1728978944,1728979967,JP 1728979968,1728980991,MN 1728980992,1728982015,AU 1728982016,1728982527,ID @@ -35340,7 +35687,6 @@ 1729546240,1729546495,JP 1729546496,1729547263,HK 1729548288,1729549311,AU -1729549312,1729550335,JP 1729550336,1729551359,MY 1729551360,1729552383,KR 1729552384,1729553407,AU @@ -35648,7 +35994,6 @@ 1729864704,1729866751,IN 1729866752,1729867775,AU 1729867776,1729869823,HK -1729869824,1729870847,JP 1729870848,1729871871,AU 1729871872,1729872895,JP 1729872896,1729873919,AU @@ -35831,7 +36176,7 @@ 1730043904,1730044927,CN 1730044928,1730046975,HK 1730046976,1730047999,KR -1730048000,1730049023,ID +1730048000,1730049023,TL 1730050048,1730050303,AU 1730050304,1730050559,SG 1730050560,1730051071,ID @@ -35922,7 +36267,62 @@ 1730147328,1730148351,JP 1730148352,1730149375,ID 1730149376,1730150399,JP -1730150400,1730412543,CN +1730150400,1730360319,CN +1730360320,1730361343,IN +1730361344,1730362367,SG +1730362368,1730363391,JP +1730363392,1730364415,VN +1730364416,1730365439,IN +1730365440,1730367487,HK +1730367488,1730368511,AU +1730368512,1730369535,HK +1730369536,1730370047,NZ +1730370048,1730370303,IN +1730370304,1730370559,JP +1730370560,1730371583,AU +1730371584,1730372607,TH +1730372608,1730373631,IN +1730373632,1730374655,CN +1730374656,1730375679,BD +1730375680,1730376191,AU +1730376192,1730376703,VU +1730376704,1730377727,CN +1730377728,1730378239,IN +1730378240,1730378495,HK +1730378496,1730378751,IN +1730378752,1730379775,HK +1730379776,1730380799,AU +1730380800,1730381823,IN +1730381824,1730382847,MY +1730382848,1730383359,ID +1730383360,1730383615,IN +1730383616,1730383871,MY +1730383872,1730385919,HK +1730385920,1730386943,AU +1730386944,1730387967,BD +1730387968,1730389503,IN +1730389504,1730390015,AF +1730390016,1730391039,BD +1730391040,1730392063,HK +1730392064,1730393087,AU +1730393088,1730394111,SG +1730394112,1730395135,HK +1730395136,1730396159,JP +1730396160,1730398207,IN +1730398208,1730399231,CN +1730399232,1730400255,TW +1730400256,1730402303,PK +1730402304,1730402559,NZ +1730402560,1730402815,IN +1730402816,1730403071,ID +1730403072,1730403327,AU +1730403328,1730404351,CN +1730404352,1730406399,AU +1730406400,1730407423,IN +1730407424,1730408447,ID +1730408448,1730410495,IN +1730410496,1730411519,SG +1730411520,1730412543,HK 1730412544,1730414591,AU 1730414592,1730415615,ID 1730415616,1730416127,AU @@ -36500,7 +36900,7 @@ 1731182592,1731183615,VN 1731183616,1731184639,IN 1731184640,1731185663,CN -1731185664,1731186687,NZ +1731185664,1731186687,US 1731186688,1731187711,SG 1731187712,1731188735,CN 1731188736,1731189759,IN @@ -37280,7 +37680,9 @@ 1732124160,1732124671,PH 1732124672,1732126719,AU 1732126720,1732127743,IN -1732127744,1732129791,HK +1732127744,1732128767,HK +1732128768,1732129023,SG +1732129024,1732129791,HK 1732129792,1732130815,CN 1732130816,1732134911,IN 1732134912,1732140031,CN @@ -37358,7 +37760,121 @@ 1740676096,1740677119,BD 1740677120,1740678143,HK 1740678144,1740679167,CN -1740679168,1740681215,IN +1740679168,1740680447,IN +1740680448,1740680703,AU +1740680704,1740680959,MM +1740680960,1740681215,AU +1740681216,1740682239,HK +1740682240,1740683263,KH +1740683264,1740684287,PH +1740684288,1740685311,CN +1740685312,1740686591,AU +1740686592,1740686847,NZ +1740686848,1740687359,IN +1740687360,1740688383,HK +1740688384,1740689407,IN +1740689408,1740692479,CN +1740692480,1740693503,IN +1740693504,1740694527,HK +1740694528,1740696575,JP +1740696576,1740697599,VN +1740697600,1740698623,NZ +1740698624,1740700671,IN +1740700672,1740701695,CN +1740701696,1740702719,IN +1740702720,1740703743,MX +1740703744,1740704255,NZ +1740704256,1740704767,AU +1740704768,1740705791,JP +1740705792,1740706047,NZ +1740706048,1740706303,AU +1740706304,1740706559,PK +1740706560,1740706815,ID +1740706816,1740709887,IN +1740709888,1740710911,HK +1740710912,1740711423,IN +1740711424,1740711935,NZ +1740711936,1740713983,CN +1740713984,1740719103,IN +1740719104,1740720127,HK +1740720128,1740721151,JP +1740721152,1740721407,AU +1740721408,1740721663,IN +1740721664,1740721919,AU +1740721920,1740722175,IN +1740722176,1740723199,AU +1740723200,1740731391,IN +1740731392,1740732415,ID +1740732416,1740734463,CN +1740734464,1740736511,HK +1740736512,1740737535,NZ +1740737536,1740740607,CN +1740740608,1740742655,IN +1740742656,1740743679,CN +1740743680,1740743935,NZ +1740743936,1740744191,PH +1740744192,1740744703,AU +1740744704,1740745727,BD +1740745728,1740746751,HK +1740746752,1740747775,JP +1740747776,1740748799,KH +1740748800,1740749823,JP +1740749824,1740751871,CN +1740751872,1740753919,IN +1740753920,1740754943,KH +1740754944,1740755967,AU +1740755968,1740764159,CN +1740764160,1740766207,HK +1740766208,1740767231,IN +1740767232,1740769279,AU +1740769280,1740771327,IN +1740771328,1740772351,CN +1740772352,1740776447,IN +1740776448,1740777471,HK +1740777472,1740777983,JP +1740777984,1740778495,HK +1740778496,1740779519,IN +1740779520,1740780543,AU +1740780544,1740784639,IN +1740784640,1740784895,AU +1740784896,1740785663,IN +1740785664,1740786687,JP +1740786688,1740787711,SG +1740787712,1740788735,MY +1740788736,1740789759,KH +1740789760,1740790783,IN +1740791808,1740792831,IN +1740792832,1740794879,HK +1740794880,1740795903,KR +1740795904,1740796159,NZ +1740796160,1740798207,IN +1740798208,1740798463,AU +1740798464,1740798975,IN +1740798976,1740799999,AU +1740800000,1740800511,IN +1740800512,1740800767,ID +1740800768,1740805119,IN +1740805120,1740806143,HK +1740806144,1740809215,IN +1740809216,1740810239,JP +1740810240,1740811263,IN +1740811264,1740812287,ID +1740812288,1740813311,MN +1740813312,1740814335,IN +1740815360,1740816383,VN +1740816384,1740821503,IN +1740821504,1740822015,HK +1740822016,1740822527,AU +1740822528,1740825599,IN +1740825600,1740825855,SG +1740825856,1740826111,AU +1740826112,1740826623,CN +1740826624,1740827647,IN +1740827648,1740828671,HK +1740828672,1740829695,IN +1740829696,1740830719,HK +1740830720,1740831743,IN +1740831744,1740832767,KR 1742734336,1742735359,IN 1742735360,1742736383,JP 1742736384,1742737407,PK @@ -37794,7 +38310,6 @@ 1743201280,1743202303,PH 1743202304,1743204351,IN 1743204352,1743205375,TW -1743205376,1743206399,JP 1743206400,1743207423,HK 1743207424,1743208447,KH 1743208448,1743210495,CN @@ -37831,7 +38346,6 @@ 1743237120,1743238143,BD 1743238144,1743240191,CN 1743240192,1743241215,SG -1743241216,1743242239,JP 1743242240,1743244287,ID 1743244288,1743245311,AU 1743245312,1743248383,IN @@ -37848,8 +38362,9 @@ 1743256576,1743258623,HK 1743258624,1743259647,CN 1743259648,1743260671,IN -1743260672,1743261695,JP -1743261696,1743262719,HK +1743260672,1743261703,JP +1743261704,1743261711,PH +1743261712,1743262719,HK 1743262720,1743264767,IN 1743264768,1743265279,MY 1743265280,1743265535,ID @@ -37880,12 +38395,10 @@ 1743296512,1743297535,NP 1743297536,1743298303,NZ 1743298304,1743299583,AU -1743299584,1743300607,KH 1743300608,1743301631,AU 1743301632,1743303679,IN 1743303680,1743304703,NZ 1743304704,1743305727,IN -1743305728,1743306751,JP 1743306752,1743307775,KH 1743307776,1743308799,AU 1743308800,1743309823,JP @@ -37940,7 +38453,6 @@ 1743355904,1743356927,CN 1743356928,1743357951,NZ 1743357952,1743358975,CN -1743358976,1743359487,AF 1743359488,1743361023,ID 1743361024,1743362047,AU 1743362048,1743364095,ID @@ -37972,13 +38484,11 @@ 1743387648,1743388671,JP 1743388672,1743389695,CN 1743389696,1743390719,KR -1743390720,1743391743,JP 1743391744,1743391999,PK 1743392000,1743392767,AU 1743392768,1743393791,HK 1743393792,1743394815,CN 1743394816,1743395839,BD -1743395840,1743396863,JP 1743396864,1743397887,HK 1743397888,1743398911,VN 1743398912,1743399935,TW @@ -37987,7 +38497,6 @@ 1743403008,1743404031,CN 1743404032,1743405055,AU 1743405056,1743407103,IN -1743407104,1743408127,JP 1743408128,1743410175,TW 1743410176,1743411199,SG 1743411200,1743412223,VN @@ -38026,7 +38535,7 @@ 1743446016,1743448063,TW 1743448064,1743449087,AU 1743449088,1743451135,IN -1743451136,1743452159,HK +1743451136,1743452159,CN 1743452160,1743453183,AU 1743453184,1743454207,ID 1743454208,1743455231,IN @@ -38082,7 +38591,31 @@ 1743506944,1743507455,IN 1743507456,1743509503,VN 1743509504,1743510527,HK -1743510528,1743552511,CN +1743510528,1743545343,CN +1743545344,1743546367,HK +1743546368,1743549951,IN +1743549952,1743550207,AU +1743550208,1743550463,SG +1743550464,1743551487,CN +1743551488,1743552511,IN +1743552512,1743553535,JP +1743553536,1743554559,PK +1743554560,1743555583,HK +1743555584,1743557631,JP +1743557632,1743558655,ID +1743558656,1743560703,IN +1743560704,1743561215,ID +1743561216,1743561727,AU +1743561728,1743564799,IN +1743564800,1743565823,PH +1743565824,1743566847,JP +1743566848,1743567871,CN +1743567872,1743569151,ID +1743569152,1743569919,IN +1743569920,1743570943,SG +1743570944,1743574015,IN +1743574016,1743575039,AU +1743575040,1743576063,HK 1743585280,1743589375,CN 1743589376,1743590399,AU 1743590400,1743591423,KR @@ -38455,7 +38988,7 @@ 1744041984,1744043007,TW 1744043008,1744044031,CN 1744044032,1744045055,HK -1744045056,1744047103,SG +1744046080,1744047103,SG 1744047104,1744048127,BD 1744048128,1744049151,CN 1744049152,1744050175,BD @@ -38721,7 +39254,7 @@ 1744315392,1744316415,HK 1744316416,1744317439,KH 1744317440,1744318463,AU -1744318464,1744320511,JP +1744318464,1744319487,JP 1744320512,1744321535,ID 1744321536,1744322559,IN 1744322560,1744323583,CN @@ -38753,9 +39286,8 @@ 1744354304,1744354559,AU 1744354560,1744355327,NZ 1744355328,1744356351,CN -1744356352,1744357375,JP 1744357376,1744357631,NZ -1744357632,1744358399,AU +1744357632,1744357887,AU 1744358400,1744359423,BD 1744359424,1744360447,IN 1744360448,1744361471,CN @@ -38766,7 +39298,7 @@ 1744367616,1744368639,HK 1744368640,1744369663,IN 1744369664,1744369919,ID -1744369920,1744370431,AU +1744369920,1744370175,AU 1744370432,1744370687,JP 1744370688,1744371711,HK 1744371712,1744372735,BD @@ -38827,7 +39359,6 @@ 1744434176,1744435199,CN 1744435200,1744436223,IN 1744436224,1744437247,CN -1744438272,1744439295,JP 1744439296,1744439807,AU 1744439808,1744440319,IN 1744440320,1744441343,HK @@ -38879,7 +39410,6 @@ 1744490496,1744491519,IN 1744491520,1744492543,AU 1744492544,1744493567,CN -1744493568,1744494079,AU 1744494080,1744494591,PK 1744494592,1744495615,CN 1744495616,1744497663,NZ @@ -38975,7 +39505,8 @@ 1744597124,1744597124,US 1744597125,1744597151,SG 1744597152,1744597183,IN -1744597184,1744598015,SG +1744597184,1744597215,JP +1744597216,1744598015,SG 1744599040,1744601087,JP 1744602112,1744603135,HK 1744603136,1744604159,JP @@ -39114,7 +39645,6 @@ 1744747520,1744748543,CN 1744749056,1744749567,NZ 1744749568,1744749823,CN -1744749824,1744750591,AU 1744750592,1744752639,IN 1744752640,1744753663,HK 1744753664,1744754687,SG @@ -39334,7 +39864,10 @@ 1750581248,1750597631,NL 1750597632,1750705151,US 1750705152,1750724607,NL -1750724608,1753251839,US +1750724608,1751505919,US +1751505920,1751506175,IN +1751506176,1751506431,HK +1751506432,1753251839,US 1753251840,1753252095,MN 1753252096,1753252351,SY 1753252352,1753252607,BY @@ -39370,9 +39903,13 @@ 1753489664,1753490175,US 1753490176,1753490431,AU 1753490432,1753490687,IL -1753490688,1753517567,US +1753490688,1753494527,US +1753494528,1753494783,IL +1753494784,1753517567,US 1753517568,1753517823,NO -1753517824,1753735167,US +1753517824,1753522431,US +1753522432,1753522687,FR +1753522688,1753735167,US 1753735168,1753743359,IE 1753743360,1754136575,US 1754136576,1754169343,CA @@ -39395,7 +39932,10 @@ 1754209536,1754209791,BR 1754209792,1754210047,AR 1754210048,1754210303,BJ -1754210304,1754230783,US +1754210304,1754223615,US +1754223616,1754223623,MX +1754223624,1754223631,AU +1754223632,1754230783,US 1754230784,1754234879,VG 1754234880,1754251519,US 1754251520,1754251775,LY @@ -39545,7 +40085,7 @@ 1755824128,1755824383,TV 1755824384,1755824639,SY 1755824640,1755824895,ZW -1755824896,1755825151,TG +1755824896,1755825151,US 1755825152,1755825407,GM 1755825408,1755825663,AO 1755825664,1755825919,LB @@ -39970,7 +40510,9 @@ 1761019648,1761019903,VE 1761019904,1761023231,US 1761023232,1761023487,JP -1761023488,1761044479,US +1761023488,1761043711,US +1761043712,1761043967,PH +1761043968,1761044479,US 1761044480,1761044735,AU 1761044736,1761046527,US 1761046528,1761046783,JP @@ -39982,15 +40524,27 @@ 1761181696,1761181951,MX 1761181952,1761183743,US 1761183744,1761183999,AU -1761184000,1761185791,US +1761184000,1761185023,US +1761185024,1761185279,RU +1761185280,1761185535,US +1761185536,1761185791,AE 1761185792,1761186047,MX -1761186048,1761187327,US +1761186048,1761186815,US +1761186816,1761187071,MX +1761187072,1761187327,US 1761187328,1761187583,PK -1761187584,1761189887,US +1761187584,1761188095,US +1761188096,1761188351,RU +1761188352,1761189887,US 1761189888,1761190143,JP -1761190144,1761192703,US +1761190144,1761191679,US +1761191680,1761191935,MX +1761191936,1761192703,US 1761192704,1761192959,AU -1761192960,1761195007,US +1761192960,1761194239,US +1761194240,1761194495,PH +1761194496,1761194751,HK +1761194752,1761195007,US 1761195008,1761195263,HK 1761195264,1761198079,US 1761198080,1761214463,CA @@ -40028,7 +40582,9 @@ 1761262336,1761262591,PK 1761262592,1761262847,US 1761262848,1761263103,RU -1761263104,1761273599,US +1761263104,1761273087,US +1761273088,1761273343,PH +1761273344,1761273599,US 1761273600,1761273855,AU 1761273856,1761275391,US 1761275392,1761275647,JP @@ -40305,7 +40861,7 @@ 1805253120,1805253375,DE 1805253376,1805253631,GB 1805253632,1805253887,DE -1805253888,1805254143,GB +1805253888,1805254143,US 1805254144,1805254399,DE 1805254400,1805254655,GB 1805254656,1805582335,US @@ -40899,7 +41455,153 @@ 1836023808,1836040191,RU 1836040192,1836048383,GB 1836048384,1836056575,RS -1836056576,1836580863,IT +1836056576,1836450337,IT +1836450338,1836450338,CN +1836450339,1836450371,IT +1836450372,1836450372,CN +1836450373,1836450450,IT +1836450451,1836450451,CN +1836450452,1836450470,IT +1836450471,1836450471,CN +1836450472,1836450511,IT +1836450512,1836450512,CN +1836450513,1836450869,IT +1836450870,1836450870,CN +1836450871,1836450881,IT +1836450882,1836450882,CN +1836450883,1836450883,IT +1836450884,1836450884,CN +1836450885,1836450926,IT +1836450927,1836450927,CN +1836450928,1836450931,IT +1836450932,1836450932,CN +1836450933,1836450940,IT +1836450941,1836450941,CN +1836450942,1836450955,IT +1836450956,1836450956,CN +1836450957,1836451346,IT +1836451347,1836451348,CN +1836451349,1836451350,IT +1836451351,1836451351,CN +1836451352,1836451406,IT +1836451407,1836451407,CN +1836451408,1836451417,IT +1836451418,1836451418,CN +1836451419,1836451461,IT +1836451462,1836451462,CN +1836451463,1836451463,IT +1836451464,1836451464,CN +1836451465,1836451521,IT +1836451522,1836451522,CN +1836451523,1836452122,IT +1836452123,1836452123,CN +1836452124,1836452147,IT +1836452148,1836452148,CN +1836452149,1836452186,IT +1836452187,1836452187,CN +1836452188,1836452315,IT +1836452316,1836452316,CN +1836452317,1836452343,IT +1836452344,1836452345,CN +1836452346,1836452445,IT +1836452446,1836452446,CN +1836452447,1836452447,IT +1836452448,1836452448,CN +1836452449,1836452450,IT +1836452451,1836452451,CN +1836452452,1836452546,IT +1836452547,1836452547,CN +1836452548,1836452751,IT +1836452752,1836452752,CN +1836452753,1836452755,IT +1836452756,1836452757,CN +1836452758,1836453483,IT +1836453484,1836453484,CN +1836453485,1836453539,IT +1836453540,1836453540,CN +1836453541,1836453573,IT +1836453574,1836453574,CN +1836453575,1836454695,IT +1836454696,1836454696,CN +1836454697,1836454740,IT +1836454741,1836454741,CN +1836454742,1836454755,IT +1836454756,1836454756,CN +1836454757,1836455219,IT +1836455220,1836455220,CN +1836455221,1836455228,IT +1836455229,1836455229,CN +1836455230,1836455233,IT +1836455234,1836455234,CN +1836455235,1836455263,IT +1836455264,1836455264,CN +1836455265,1836455272,IT +1836455273,1836455274,CN +1836455275,1836455281,IT +1836455282,1836455282,CN +1836455283,1836455305,IT +1836455306,1836455306,CN +1836455307,1836455309,IT +1836455310,1836455310,CN +1836455311,1836455378,IT +1836455379,1836455379,CN +1836455380,1836455454,IT +1836455455,1836455455,CN +1836455456,1836455458,IT +1836455459,1836455460,CN +1836455461,1836455516,IT +1836455517,1836455517,CN +1836455518,1836455546,IT +1836455547,1836455547,CN +1836455548,1836455556,IT +1836455557,1836455557,CN +1836455558,1836455562,IT +1836455563,1836455563,CN +1836455564,1836455565,IT +1836455566,1836455566,CN +1836455567,1836455568,IT +1836455569,1836455570,CN +1836455571,1836455589,IT +1836455590,1836455590,CN +1836455591,1836455631,IT +1836455632,1836455632,CN +1836455633,1836455987,IT +1836455988,1836455988,CN +1836455989,1836455993,IT +1836455994,1836455995,CN +1836455996,1836455997,IT +1836455998,1836455998,CN +1836455999,1836456001,IT +1836456002,1836456002,CN +1836456003,1836456021,IT +1836456022,1836456022,CN +1836456023,1836456097,IT +1836456098,1836456098,CN +1836456099,1836456117,IT +1836456118,1836456118,CN +1836456119,1836456131,IT +1836456132,1836456135,CN +1836456136,1836456136,IT +1836456137,1836456137,CN +1836456138,1836458047,IT +1836458048,1836458048,CN +1836458049,1836459294,IT +1836459295,1836459295,CN +1836459296,1836459383,IT +1836459384,1836459384,CN +1836459385,1836459399,IT +1836459400,1836459400,CN +1836459401,1836466454,IT +1836466455,1836466455,CN +1836466456,1836466465,IT +1836466466,1836466466,CN +1836466467,1836466529,IT +1836466530,1836466530,CN +1836466531,1836466532,IT +1836466533,1836466533,CN +1836466534,1836466551,IT +1836466552,1836466552,CN +1836466553,1836580863,IT 1836580864,1836597247,RU 1836597248,1836598271,LU 1836598272,1836605439,FR @@ -40929,7 +41631,9 @@ 1836794595,1836794595,FR 1836794596,1836797951,GB 1836797952,1836798207,DE -1836798208,1836810239,GB +1836798208,1836807087,GB +1836807088,1836807088,CN +1836807089,1836810239,GB 1836810240,1836826623,RU 1836826624,1836843007,CZ 1836843008,1836875775,RU @@ -40947,7 +41651,77 @@ 1837056000,1837072383,IQ 1837072384,1837088767,RU 1837088768,1837105151,SI -1837105152,1838153727,BE +1837105152,1837500953,BE +1837500954,1837500954,CN +1837500955,1837501019,BE +1837501020,1837501020,CN +1837501021,1837501040,BE +1837501041,1837501041,CN +1837501042,1837501119,BE +1837501120,1837501120,CN +1837501121,1837501584,BE +1837501585,1837501585,CN +1837501586,1837501588,BE +1837501589,1837501589,CN +1837501590,1837501623,BE +1837501624,1837501624,CN +1837501625,1837501643,BE +1837501644,1837501644,CN +1837501645,1837501998,BE +1837501999,1837501999,CN +1837502000,1837502022,BE +1837502023,1837502023,CN +1837502024,1837502041,BE +1837502042,1837502042,CN +1837502043,1837502052,BE +1837502053,1837502053,CN +1837502054,1837502126,BE +1837502127,1837502127,CN +1837502128,1837502164,BE +1837502165,1837502165,CN +1837502166,1837502539,BE +1837502540,1837502540,CN +1837502541,1837502574,BE +1837502575,1837502575,CN +1837502576,1837502606,BE +1837502607,1837502607,CN +1837502608,1837502610,BE +1837502611,1837502611,CN +1837502612,1837502639,BE +1837502640,1837502640,CN +1837502641,1837502702,BE +1837502703,1837502703,CN +1837502704,1837502818,BE +1837502819,1837502819,CN +1837502820,1837502913,BE +1837502914,1837502914,CN +1837502915,1837502931,BE +1837502932,1837502932,CN +1837502933,1837503116,BE +1837503117,1837503117,CN +1837503118,1837503125,BE +1837503126,1837503127,CN +1837503128,1837503129,BE +1837503130,1837503131,CN +1837503132,1837503136,BE +1837503137,1837503137,CN +1837503138,1837503153,BE +1837503154,1837503154,CN +1837503155,1837503156,BE +1837503157,1837503157,CN +1837503158,1837503163,BE +1837503164,1837503165,CN +1837503166,1837503166,BE +1837503167,1837503167,CN +1837503168,1837503175,BE +1837503176,1837503176,CN +1837503177,1837503184,BE +1837503185,1837503185,CN +1837503186,1837503186,BE +1837503187,1837503187,CN +1837503188,1837503188,BE +1837503189,1837503189,CN +1837503190,1838153727,BE 1838153728,1839202303,GB 1839202304,1839235071,BG 1839235072,1839267839,IL @@ -40972,7 +41746,11 @@ 1839603712,1839618047,RO 1839618048,1839628287,SA 1839628288,1839661055,RO -1839661056,1839693823,UA +1839661056,1839686655,UA +1839686656,1839687167,ES +1839687168,1839693055,UA +1839693056,1839693311,ES +1839693312,1839693823,UA 1839693824,1839726591,RU 1839726592,1839759359,IT 1839759360,1839792127,RU @@ -41396,9 +42174,13 @@ 1844903936,1844969471,NO 1844969472,1845006335,RU 1845006336,1845010431,KZ -1845010432,1845025535,RU +1845010432,1845022719,RU +1845022720,1845023743,KZ +1845023744,1845025535,RU 1845025536,1845025791,KZ -1845025792,1845029887,RU +1845025792,1845027583,RU +1845027584,1845027839,ES +1845027840,1845029887,RU 1845029888,1845030143,KZ 1845030144,1845030911,RU 1845030912,1845031935,GE @@ -42289,7 +43071,9 @@ 1946173696,1946173951,TW 1946173952,1946174463,SG 1946174464,1946174719,TW -1946174720,1946176511,SG +1946174720,1946175487,SG +1946175488,1946175615,HK +1946175616,1946176511,SG 1946176512,1946176639,AU 1946176640,1946176767,PH 1946176768,1946178047,SG @@ -42301,7 +43085,6 @@ 1946189824,1946222591,JP 1946222592,1946943487,CN 1946943488,1946951679,JP -1946951680,1946953727,BD 1946953728,1946955775,ID 1946955776,1946957823,SG 1946957824,1946959871,NZ @@ -42494,9 +43277,7 @@ 1962622976,1962639359,CN 1962639360,1962658815,NZ 1962658816,1962659839,HK -1962659840,1962660863,SG -1962660864,1962661375,HK -1962661376,1962663935,SG +1962659840,1962663935,SG 1962663936,1962672127,HK 1962672128,1962803199,CN 1962803200,1962827775,JP @@ -42932,9 +43713,11 @@ 2001854944,2001854951,CN 2001854952,2001855231,SG 2001855232,2001855263,US -2001855264,2001855775,SG -2001855776,2001855791,US -2001855792,2001857439,SG +2001855264,2001855743,SG +2001855744,2001855999,HK +2001856000,2001857255,SG +2001857256,2001857263,A1 +2001857264,2001857439,SG 2001857440,2001857471,US 2001857472,2001857791,SG 2001857792,2001858047,HK @@ -42942,12 +43725,22 @@ 2001858336,2001858367,US 2001858368,2001858639,SG 2001858640,2001858655,US -2001858656,2001860031,SG +2001858656,2001859071,SG +2001859072,2001859327,HK +2001859328,2001860031,SG 2001860032,2001860047,HK 2001860048,2001860351,SG 2001860352,2001860607,HK -2001860608,2001862079,SG -2001862080,2001862143,US +2001860608,2001860655,SG +2001860656,2001860671,US +2001860672,2001860991,SG +2001860992,2001861007,US +2001861008,2001861263,SG +2001861264,2001861279,US +2001861280,2001862079,SG +2001862080,2001862124,US +2001862125,2001862125,HK +2001862126,2001862143,US 2001862144,2001862655,SG 2001862656,2001864703,AU 2001864704,2001870847,JP @@ -44022,7 +44815,7 @@ 2153398272,2153406463,US 2153406464,2153407487,JP 2153407488,2153407743,HK -2153407744,2153407999,US +2153407744,2153407999,AE 2153408000,2153408511,BR 2153408512,2153408767,AU 2153408768,2153409023,PA @@ -44139,7 +44932,9 @@ 2163638528,2163671039,DE 2163671040,2163867647,US 2163867648,2163933183,AU -2163933184,2164981759,US +2163933184,2164260863,US +2164260864,2164326399,CM +2164326400,2164981759,US 2164981760,2165112831,GB 2165112832,2165178367,DE 2165178368,2165309439,US @@ -44220,7 +45015,9 @@ 2177105920,2177302527,US 2177302528,2177368063,FR 2177368064,2177695743,US +2177695744,2177703935,UG 2177703936,2177712127,ZA +2177728512,2177744895,ZA 2177744896,2177761279,BW 2177761280,2177826815,DE 2177826816,2177892351,US @@ -44337,7 +45134,15 @@ 2188509184,2188574719,US 2188574720,2188640255,NL 2188640256,2188705791,AU -2188705792,2188724463,EU +2188705792,2188706153,EU +2188706154,2188706154,SI +2188706155,2188718161,EU +2188718162,2188718162,SI +2188718163,2188718337,EU +2188718338,2188718338,AT +2188718339,2188718473,EU +2188718474,2188718474,AT +2188718475,2188724463,EU 2188724464,2188724464,NL 2188724465,2188724991,EU 2188724992,2188725247,RS @@ -44404,7 +45209,9 @@ 2193205248,2193207295,FR 2193207296,2193209343,CZ 2193209344,2193211391,FR -2193211392,2193227775,BG +2193211392,2193223423,BG +2193223424,2193223679,GB +2193223680,2193227775,BG 2193227776,2193293311,IT 2193293312,2193358847,US 2193358848,2193424383,FI @@ -45788,7 +46595,7 @@ 2323042304,2323045375,AR 2323045376,2323054591,BR 2323054592,2323120127,CA -2323120128,2323185663,FR +2323120128,2323185663,US 2323185664,2323186687,BR 2323186688,2323187711,CO 2323187712,2323188735,BR @@ -45828,18 +46635,22 @@ 2323279872,2323283967,BR 2323283968,2323284991,AR 2323284992,2323288063,BR +2323288064,2323289087,MX 2323289088,2323291135,BR 2323291136,2323292159,AR 2323292160,2323293183,PY 2323293184,2323298303,BR +2323298304,2323299327,PY 2323299328,2323300351,AR 2323300352,2323301375,HN +2323301376,2323302399,BR 2323302400,2323303423,CO 2323303424,2323308543,BR 2323308544,2323309567,CL 2323309568,2323310591,AR 2323310592,2323313663,BR 2323313664,2323314687,CR +2323314688,2323315711,BR 2323315712,2323316735,MX 2323316736,2323382271,US 2323382272,2323447807,NO @@ -45859,37 +46670,65 @@ 2327379968,2327380991,MX 2327380992,2327383039,BR 2327383040,2327384063,CL -2327384064,2327396351,BR -2327397376,2327398399,VE +2327384064,2327387135,BR +2327387136,2327388159,NI +2327388160,2327396351,BR +2327396352,2327398399,VE 2327398400,2327399423,BR +2327399424,2327400447,BZ 2327400448,2327401471,AR 2327401472,2327406591,BR 2327406592,2327407615,NI 2327407616,2327408639,BR 2327408640,2327409663,AR -2327411712,2327412735,BR -2327413760,2327414783,BR +2327409664,2327410687,PE +2327410688,2327414783,BR +2327414784,2327415807,EC 2327415808,2327416831,AR 2327416832,2327432191,BR 2327432192,2327433215,AR 2327433216,2327434239,BQ 2327434240,2327437311,BR 2327437312,2327438335,MX -2327438336,2327440383,BR +2327438336,2327443455,BR 2327443456,2327444479,CR -2327445504,2327446527,BR +2327444480,2327446527,BR 2327446528,2327447551,VE +2327447552,2327448575,CL +2327448576,2327449599,PA +2327449600,2327450623,BR 2327450624,2327451647,CO 2327451648,2327452671,BR -2327453696,2327459839,BR +2327452672,2327453695,MX +2327453696,2327460863,BR 2327460864,2327461887,PY -2327463936,2327464959,BR -2327465984,2327468031,BR +2327461888,2327462911,MX +2327462912,2327468031,BR 2327468032,2327469055,PA -2327469056,2327474175,BR -2327478272,2327480319,BR +2327469056,2327471103,BR +2327471104,2327472127,MX +2327472128,2327476223,BR +2327476224,2327477247,CL +2327477248,2327480319,BR 2327480320,2327481343,HN 2327481344,2327482367,AR +2327482368,2327483391,BR +2327483392,2327485439,AR +2327485440,2327486463,BR +2327486464,2327487487,AR +2327487488,2327490559,BR +2327490560,2327491583,VE +2327491584,2327493631,BR +2327493632,2327494655,CO +2327494656,2327496703,BR +2327496704,2327497727,MX +2327497728,2327498751,BR +2327498752,2327499775,HN +2327499776,2327501823,AR +2327501824,2327507967,BR +2327507968,2327508991,AR +2327508992,2327510015,SV +2327510016,2327511039,AR 2327511040,2327838719,CH 2327838720,2327969791,US 2327969792,2328035327,AU @@ -45902,6 +46741,27 @@ 2328363008,2328494079,DE 2328494080,2328559615,US 2328559616,2328625151,BE +2328625152,2328627199,AR +2328627200,2328628223,BR +2328628224,2328629247,BZ +2328629248,2328635391,BR +2328635392,2328636415,AR +2328636416,2328652799,BR +2328652800,2328653823,PA +2328653824,2328664063,BR +2328664064,2328667135,AR +2328667136,2328668159,BR +2328668160,2328669183,MX +2328669184,2328671231,BR +2328671232,2328672255,HN +2328672256,2328677375,BR +2328677376,2328678399,MX +2328678400,2328680447,BR +2328680448,2328681471,AR +2328681472,2328683519,BR +2328684544,2328685567,BR +2328685568,2328686591,VE +2328686592,2328687615,BR 2328690688,2328756223,BE 2328756224,2328797439,CH 2328797440,2328797695,AU @@ -45914,6 +46774,32 @@ 2329411584,2329477119,FI 2329477120,2329542655,AU 2329542656,2329608191,CA +2329609216,2329610239,AR +2329610240,2329611263,PY +2329612288,2329613311,AR +2329613312,2329614335,BR +2329615360,2329617407,BR +2329617408,2329618431,MX +2329618432,2329619455,AR +2329619456,2329622527,BR +2329623552,2329624575,AR +2329624576,2329626623,BR +2329626624,2329627647,HN +2329627648,2329628671,BR +2329628672,2329629695,AR +2329629696,2329638911,BR +2329638912,2329639935,HN +2329639936,2329644031,BR +2329644032,2329645055,CW +2329645056,2329649151,BR +2329649152,2329650175,AR +2329650176,2329651199,BR +2329653248,2329662463,BR +2329662464,2329664511,AR +2329664512,2329666559,BR +2329666560,2329667583,CL +2329668608,2329671679,BR +2329671680,2329672703,AR 2329673728,2329739263,US 2329739264,2329804799,CH 2329804800,2329870335,DE @@ -45946,6 +46832,15 @@ 2331639808,2331770879,GB 2331836416,2331901951,GB 2331901952,2331967487,US +2331967488,2331980799,BR +2331980800,2331981823,PA +2331981824,2331982847,BR +2331982848,2331983871,MX +2331983872,2331992063,BR +2331993088,2331994111,CL +2331994112,2332006399,BR +2332006400,2332007423,SV +2332016640,2332020735,BR 2332033024,2332098559,ID 2332098560,2332622847,DE 2332622848,2332688383,CN @@ -46052,7 +46947,9 @@ 2342518784,2342584319,FR 2342584320,2342649856,US 2342649857,2342658047,SG -2342658048,2342700247,US +2342658048,2342682623,US +2342682624,2342690815,DE +2342690816,2342700247,US 2342700248,2342700248,GB 2342700249,2342715391,US 2342715392,2342780927,AU @@ -46194,8 +47091,8 @@ 2365587456,2365589503,JO 2365589504,2365590527,US 2365590528,2365591039,NO -2365591040,2365591455,EU -2365591456,2365591551,NO +2365591040,2365591295,EU +2365591296,2365591551,NO 2365591552,2365593599,DE 2365593600,2365595647,NL 2365595648,2365603839,GB @@ -46526,25 +47423,31 @@ 2391015424,2391277567,CA 2391277568,2391343103,US 2391343104,2391998463,CA -2391998464,2392002047,US +2391998464,2392002303,US 2392002304,2392010751,CA 2392010752,2392011263,US 2392011264,2392011519,CA -2392011776,2392012799,CA -2392012800,2392013823,US +2392011776,2392012543,CA +2392012544,2392014079,US 2392014080,2392014335,CA -2392015360,2392015615,CA +2392015360,2392015871,CA 2392015872,2392017407,US 2392017408,2392017663,CA +2392017920,2392018431,US 2392018432,2392018687,CA -2392018944,2392019967,CA +2392018688,2392018943,US +2392018944,2392019199,CA +2392019200,2392019455,US +2392019456,2392019967,CA 2392019968,2392021759,US 2392021760,2392022015,NL 2392022016,2392022271,FR 2392022272,2392022527,DE 2392022528,2392022783,GB 2392022784,2392023039,US -2392023040,2392025087,CA +2392023040,2392024319,CA +2392024320,2392024575,US +2392024576,2392025087,VI 2392025088,2392063999,US 2392064000,2392096767,CA 2392096768,2392129535,US @@ -46965,8 +47868,7 @@ 2449420288,2449422335,DE 2449422336,2449424383,DK 2449424384,2449440767,OM -2449440768,2449441279,NL -2449441280,2449442815,RO +2449440768,2449442815,NL 2449442816,2449444863,RU 2449444864,2449448959,SK 2449448960,2449457151,KZ @@ -47585,7 +48487,9 @@ 2500149504,2500149759,GB 2500149760,2500150655,US 2500150656,2500150719,GB -2500150720,2500161023,US +2500150720,2500155647,US +2500155648,2500155903,GB +2500155904,2500161023,US 2500161024,2500162047,GB 2500162048,2500162559,US 2500162560,2500162815,GB @@ -47727,7 +48631,9 @@ 2501574656,2501640191,KZ 2501640192,2502033407,US 2502033408,2502037503,LU -2502037504,2503016447,US +2502037504,2502041599,US +2502041600,2502043647,ES +2502043648,2503016447,US 2503016448,2503147519,IL 2503147520,2503671807,US 2503671808,2503737343,NL @@ -47901,11 +48807,19 @@ 2513070560,2513070591,ES 2513070592,2513070623,FR 2513070624,2513070655,ES -2513070656,2513079250,FR +2513070656,2513076471,FR +2513076472,2513076479,ES +2513076480,2513078367,FR +2513078368,2513078371,GB +2513078372,2513079250,FR 2513079251,2513079254,ES 2513079255,2513081327,FR 2513081328,2513081343,ES -2513081344,2513108991,FR +2513081344,2513082561,FR +2513082562,2513082562,GB +2513082563,2513102899,FR +2513102900,2513102903,CZ +2513102904,2513108991,FR 2513108992,2513502207,DE 2513502208,2513567743,NO 2513567744,2513600511,GR @@ -48040,7 +48954,7 @@ 2525060096,2525061119,AU 2525061120,2525062143,TW 2525062144,2525071359,IN -2525071360,2525072383,HK +2525071360,2525072383,CN 2525072384,2525073407,MN 2525073408,2525075455,IN 2525075456,2525076479,CN @@ -48164,7 +49078,9 @@ 2538606032,2538606039,ES 2538606040,2538606043,FR 2538606044,2538606047,DE -2538606048,2538619359,FR +2538606048,2538606403,FR +2538606404,2538606407,GB +2538606408,2538619359,FR 2538619360,2538619375,ES 2538619376,2538619431,FR 2538619432,2538619435,DE @@ -48279,7 +49195,6 @@ 2547523584,2547535871,GB 2547535872,2547548159,BG 2547548160,2547580927,NO -2547580928,2547646463,DE 2548039680,2548563967,GB 2548563968,2548826111,IR 2548826112,2548829695,AT @@ -48495,7 +49410,12 @@ 2572943360,2572951551,DE 2572951552,2572953599,US 2572953600,2572953855,BY -2572953856,2572955647,DE +2572953856,2572954111,HK +2572954112,2572954367,DE +2572954368,2572954623,HK +2572954624,2572954879,AU +2572954880,2572955135,HK +2572955136,2572955647,DE 2572955648,2572959743,BR 2572959744,2572968447,DE 2572968448,2572968959,CZ @@ -48727,7 +49647,9 @@ 2586714880,2586715135,NL 2586715136,2586716159,US 2586716160,2586716671,ES -2586716672,2586733567,US +2586716672,2586717183,US +2586717184,2586717439,ES +2586717440,2586733567,US 2586733568,2586733823,LT 2586733824,2586734591,US 2586734592,2586735615,LT @@ -48810,8 +49732,8 @@ 2587525120,2587542527,US 2587542528,2587544575,ES 2587544576,2587545599,US -2587545600,2587547647,ES -2587547648,2587582463,US +2587545600,2587549695,ES +2587549696,2587582463,US 2587582464,2587586559,NL 2587586560,2587592703,US 2587592704,2587594751,GB @@ -48872,7 +49794,8 @@ 2588303360,2588311551,CM 2588311552,2588315647,ZA 2588315648,2588317695,BW -2588317696,2588318207,MU +2588317696,2588317951,ZA +2588317952,2588318207,MU 2588318208,2588318719,ZA 2588318720,2588319743,UG 2588319744,2588327935,SC @@ -49136,7 +50059,7 @@ 2616885530,2616918015,DE 2616983552,2617049087,US 2617049088,2617114623,IT -2617114880,2617115135,US +2617114624,2617115135,US 2617115136,2617115647,CA 2617115648,2617123839,US 2617123840,2617124095,DE @@ -49192,7 +50115,7 @@ 2617166336,2617166591,KH 2617166592,2617166847,TJ 2617166848,2617167103,KG -2617167104,2617167359,IS +2617167104,2617167359,IN 2617167360,2617167615,DK 2617167616,2617167871,IL 2617167872,2617168127,PL @@ -49237,7 +50160,7 @@ 2617177856,2617178111,BE 2617178112,2617178367,IM 2617178368,2617178623,BN -2617178624,2617178879,AD +2617178624,2617178879,US 2617178880,2617179135,LT 2617179136,2617179391,MD 2617179392,2617179647,SI @@ -49321,7 +50244,7 @@ 2627076096,2627141631,NL 2627141632,2627469311,US 2627469312,2627731455,TZ -2627731456,2629828607,EG +2627731456,2631925759,EG 2634022912,2634088447,CN 2634088448,2635202559,JP 2635202560,2635268095,CN @@ -49369,7 +50292,10 @@ 2640445440,2640510975,US 2640510976,2640576511,FR 2640576512,2640642047,EC -2640642048,2641952767,JP +2640642048,2641928191,JP +2641928192,2641936383,SG +2641936384,2641944575,US +2641944576,2641952767,JP 2641952768,2642018303,US 2642018304,2642083839,CN 2642083840,2642149375,US @@ -49743,7 +50669,9 @@ 2674130944,2674147327,GB 2674147328,2674163711,NL 2674163712,2674175999,GB -2674176000,2674192383,US +2674176000,2674177286,US +2674177287,2674177287,GB +2674177288,2674192383,US 2674192384,2674196479,CH 2674196480,2674249727,GB 2674249728,2674251775,US @@ -49883,7 +50811,9 @@ 2680487936,2680553471,GB 2680553472,2680684543,US 2680684544,2680750079,SE -2680750080,2681012223,US +2680750080,2680881151,US +2680881152,2680897535,CA +2680897536,2681012223,US 2681012224,2681077759,PL 2681077760,2681143295,CA 2681143296,2681208831,AU @@ -50074,7 +51004,8 @@ 2697789440,2697854975,US 2697854976,2697889791,AU 2697889792,2697891839,US -2697891840,2697892863,AU +2697891840,2697892095,GB +2697892096,2697892863,AU 2697892864,2697894399,US 2697894400,2697920511,AU 2697920512,2698117119,US @@ -50096,7 +51027,10 @@ 2699296768,2699362303,FR 2699362304,2699624447,US 2699624448,2699689983,JP -2699755520,2700935167,JP +2699755520,2700214271,JP +2700214272,2700247039,NA +2700247040,2700263423,UG +2700279808,2700935167,JP 2700935168,2701066239,US 2701066240,2701131775,BG 2701131776,2701132543,HN @@ -50506,7 +51440,9 @@ 2732549120,2732550143,CA 2732550144,2732580863,US 2732580864,2732582911,CA -2732582912,2733903871,US +2732582912,2733882879,US +2733882880,2733883135,CA +2733883136,2733903871,US 2733903872,2733904895,PR 2733904896,2733907967,CA 2733907968,2733911039,US @@ -51049,7 +51985,8 @@ 2773286912,2773745663,US 2773745664,2773794815,NZ 2773794816,2773798911,IN -2773798912,2773807103,NZ +2773798912,2773805055,NZ +2773805056,2773807103,JP 2773807104,2773811199,IN 2773811200,2773876735,US 2773876736,2773942271,AU @@ -51192,6 +52129,7 @@ 2784362496,2784428031,KR 2784428032,2784952063,US 2784952064,2784952319,NL +2784952320,2785017855,ZA 2785017856,2785804287,US 2785804288,2786066431,CH 2786066432,2788163583,US @@ -51536,7 +52474,7 @@ 2835087360,2835152895,AU 2835152896,2835161087,LR 2835161088,2835169279,ZW -2835169280,2835173375,ZA +2835169280,2835177471,ZA 2835177472,2835181567,DZ 2835181568,2835183615,NG 2835183616,2835185663,ZA @@ -51629,6 +52567,13 @@ 2851019776,2851020799,ZA 2851020800,2851021823,AO 2851021824,2851022847,EG +2851022848,2851023871,CM +2851023872,2851024895,ZA +2851024896,2851025919,NG +2851025920,2851026943,GH +2851026944,2851027967,DZ +2851027968,2851028991,ZA +2851028992,2851030015,CI 2851078144,2851995647,US 2852061184,2852062207,ZA 2852062208,2852063231,CM @@ -52000,7 +52945,11 @@ 2886667264,2886729727,US 2887778304,2891034623,US 2891034624,2891036671,CA -2891036672,2891120639,US +2891036672,2891056383,US +2891056384,2891056639,ES +2891056640,2891058943,US +2891058944,2891059199,FR +2891059200,2891120639,US 2891251712,2891272191,US 2891272192,2891274239,CA 2891274240,2891282431,US @@ -52022,14 +52971,30 @@ 2891843328,2891843839,SE 2891843840,2891844095,GB 2891844096,2891845119,FR -2891845120,2891845631,DE -2891845632,2891848959,US +2891845120,2891846399,DE +2891846400,2891846911,CH +2891846912,2891847679,NL +2891847680,2891847935,SG +2891847936,2891848447,MY +2891848448,2891848959,JP 2891848960,2891849471,BN -2891849472,2891857919,US +2891849472,2891849983,PH +2891849984,2891850495,TH +2891850496,2891850751,SG +2891850752,2891854335,US +2891854336,2891855615,NL +2891855616,2891856127,SE +2891856128,2891856383,LU +2891856384,2891857919,US 2891857920,2891858175,ES 2891858176,2891858431,TR 2891858432,2891858687,RO -2891858688,2891871231,US +2891858688,2891862527,US +2891862528,2891863039,KR +2891863040,2891863551,AU +2891863552,2891864063,JP +2891864064,2891864575,SG +2891864576,2891871231,US 2891871232,2891871487,CA 2891871488,2891974655,US 2891974656,2891976703,CA @@ -52047,11 +53012,17 @@ 2892068864,2892069887,CA 2892069888,2892070911,US 2892070912,2892103679,CA -2892103680,2892140543,US +2892103680,2892120831,US +2892120832,2892121087,CA +2892121088,2892140543,US 2892140544,2892144895,CA 2892144896,2892145407,US 2892145408,2892145663,CA -2892145664,2892171263,US +2892145664,2892146943,US +2892146944,2892147199,NL +2892147200,2892149503,US +2892149504,2892149759,NL +2892149760,2892171263,US 2892171264,2892172287,CA 2892172288,2892174335,US 2892174336,2892177407,CA @@ -52066,7 +53037,14 @@ 2892464128,2892496895,CA 2892496896,2892906495,US 2892906496,2892910591,CA -2892910592,2893676543,US +2892910592,2892988415,US +2892988416,2892988671,SC +2892988672,2892988927,PA +2892988928,2892989183,SA +2892989184,2892989439,PE +2892989440,2892989695,CO +2892989696,2892989951,VE +2892989952,2893676543,US 2893676544,2893807615,CA 2893807616,2894921727,US 2894921728,2895118335,GB @@ -52126,7 +53104,9 @@ 2905345280,2905345535,AU 2905345536,2905346815,US 2905346816,2905347071,JP -2905347072,2905348863,US +2905347072,2905348095,US +2905348096,2905348351,PH +2905348352,2905348863,US 2905348864,2905349119,NZ 2905349120,2905387519,US 2905387520,2905388031,CA @@ -52178,7 +53158,9 @@ 2915528768,2915528791,NL 2915528792,2915528863,US 2915528864,2915528879,NL -2915528880,2915795013,US +2915528880,2915528927,US +2915528928,2915528943,NL +2915528944,2915795013,US 2915795014,2915795014,MX 2915795015,2915894575,US 2915894576,2915894591,CA @@ -52474,7 +53456,9 @@ 2928201984,2928202239,JP 2928202240,2928204799,US 2928204800,2928205055,NZ -2928205056,2928226303,US +2928205056,2928206335,US +2928206336,2928206591,PH +2928206592,2928226303,US 2928226304,2928230399,CA 2928230400,2928261375,US 2928261376,2928261887,CA @@ -52812,7 +53796,9 @@ 2954843760,2954843771,ES 2954843772,2954844147,FR 2954844148,2954844151,DE -2954844152,2954844999,FR +2954844152,2954844192,FR +2954844193,2954844193,NL +2954844194,2954844999,FR 2954845000,2954845003,ES 2954845004,2954845183,FR 2954845184,2954845199,DE @@ -52865,7 +53851,9 @@ 2954870904,2954870907,ES 2954870908,2954874431,FR 2954874432,2954874447,GB -2954874448,2954875879,FR +2954874448,2954874655,FR +2954874656,2954874663,DE +2954874664,2954875879,FR 2954875880,2954875883,ES 2954875884,2954876871,FR 2954876872,2954876875,ES @@ -52945,7 +53933,7 @@ 2956500992,2956503039,NL 2956503040,2956504063,CY 2956504064,2956504319,CH -2956504320,2956504575,RU +2956504320,2956504575,NL 2956504576,2956504831,A1 2956504832,2956505087,RU 2956505088,2956506111,NL @@ -53518,7 +54506,7 @@ 2967345152,2967347199,ES 2967347200,2967351295,HR 2967351296,2967355391,FR -2967355392,2967363583,RO +2967355392,2967363583,ES 2967363584,2967371775,SE 2967371776,2967388159,KZ 2967388160,2967392255,RU @@ -53855,7 +54843,9 @@ 2988465216,2988465219,ES 2988465220,2988465559,FR 2988465560,2988465563,ES -2988465564,2988476415,FR +2988465564,2988466098,FR +2988466099,2988466099,BE +2988466100,2988476415,FR 2988476416,2988478463,IT 2988478464,2988478579,FR 2988478580,2988478583,DE @@ -54139,7 +55129,11 @@ 2989883392,2989948927,UA 2989948928,2990014463,FI 2990014464,2990079999,PL -2990080000,2990145535,RU +2990080000,2990096895,RU +2990096896,2990097023,KZ +2990097024,2990097151,RU +2990097152,2990097279,KZ +2990097280,2990145535,RU 2990145536,2990211071,SI 2990211072,2990276607,GR 2990276608,2990342143,ES @@ -55398,9 +56392,13 @@ 3025612896,3025613063,SG 3025613064,3025616895,IN 3025616896,3025617439,SG -3025617440,3025618943,IN +3025617440,3025617447,IN +3025617448,3025617455,SG +3025617456,3025618943,IN 3025618944,3025619519,SG -3025619520,3025620991,IN +3025619520,3025619583,IN +3025619584,3025619711,SG +3025619712,3025620991,IN 3025620992,3025621247,PH 3025621248,3025621503,IN 3025621504,3025621759,PH @@ -55408,7 +56406,8 @@ 3025623056,3025623087,SG 3025623088,3025623295,IN 3025623296,3025623551,JP -3025623552,3025625343,IN +3025623552,3025623807,SG +3025623808,3025625343,IN 3025625344,3025625375,SG 3025625376,3025625391,IN 3025625392,3025625395,CA @@ -55434,11 +56433,10 @@ 3025631240,3025631247,AU 3025631248,3025631747,IN 3025631748,3025631767,HK -3025631768,3025632255,IN -3025632256,3025632271,SG -3025632272,3025632287,IN -3025632288,3025632383,SG -3025632384,3025632511,IN +3025631768,3025631999,IN +3025632000,3025632255,HK +3025632256,3025632399,SG +3025632400,3025632511,IN 3025632512,3025632767,SG 3025632768,3025633535,IN 3025633536,3025633791,HK @@ -55467,7 +56465,9 @@ 3025639536,3025639551,HK 3025639552,3025639679,SG 3025639680,3025639807,HK -3025639808,3025640191,IN +3025639808,3025639839,IN +3025639840,3025639871,HK +3025639872,3025640191,IN 3025640192,3025640447,JP 3025640448,3025640799,MY 3025640800,3025641727,IN @@ -55752,21 +56752,29 @@ 3039395840,3039411199,BZ 3039411200,3039412223,US 3039412224,3039412735,CL -3039412736,3039414015,BR +3039412736,3039412991,BR +3039412992,3039413247,US +3039413248,3039414015,BR 3039414016,3039414271,CL -3039414272,3039414527,BR -3039414528,3039414783,CL -3039414784,3039415039,BR +3039414272,3039415039,BR 3039415040,3039415295,CL 3039415296,3039416319,BR -3039416320,3039416713,CL +3039416320,3039416591,CL +3039416592,3039416607,SG +3039416608,3039416713,CL 3039416714,3039416715,US -3039416716,3039416735,CL +3039416716,3039416719,SG +3039416720,3039416735,CL 3039416736,3039416739,US -3039416740,3039416831,CL +3039416740,3039416741,SG +3039416742,3039416831,CL 3039416832,3039417599,BR 3039417600,3039417855,CL -3039417856,3039420415,BR +3039417856,3039419583,BR +3039419584,3039419647,SG +3039419648,3039419839,BR +3039419840,3039419903,SG +3039419904,3039420415,BR 3039420416,3039428607,AR 3039428608,3039559679,CL 3039559680,3039821823,AR @@ -56024,7 +57032,79 @@ 3050778368,3050778623,US 3050778624,3050778639,TR 3050778640,3050778879,BR -3050778880,3050831871,US +3050778880,3050800383,US +3050800384,3050800399,AL +3050800400,3050800415,AD +3050800416,3050800431,AI +3050800432,3050800447,AG +3050800448,3050800463,AR +3050800464,3050800479,AM +3050800480,3050800495,AZ +3050800496,3050800511,BS +3050800512,3050800639,US +3050800640,3050800655,BB +3050800656,3050800671,BY +3050800672,3050800687,BZ +3050800688,3050800703,BM +3050800704,3050800719,BO +3050800720,3050800735,BA +3050800736,3050800751,VG +3050800752,3050800767,KY +3050800768,3050800895,US +3050800896,3050800911,CN +3050800912,3050800927,CO +3050800928,3050800943,GG +3050800944,3050800959,CU +3050800960,3050800975,CY +3050800976,3050800991,DK +3050800992,3050801007,DO +3050801008,3050801023,EC +3050801024,3050801151,US +3050801152,3050801167,EG +3050801168,3050801183,GQ +3050801184,3050801199,GF +3050801200,3050801215,PF +3050801216,3050801231,GE +3050801232,3050801247,SV +3050801248,3050801263,GD +3050801264,3050801279,GT +3050801280,3050801407,US +3050801408,3050801423,HN +3050801424,3050801439,IR +3050801440,3050801455,JM +3050801456,3050801471,JO +3050801472,3050801487,KG +3050801488,3050801503,LB +3050801504,3050801519,LI +3050801520,3050801535,MG +3050801536,3050801663,US +3050801664,3050801679,MT +3050801680,3050801695,MQ +3050801696,3050801711,MU +3050801712,3050801727,MX +3050801728,3050801743,MC +3050801744,3050801759,ME +3050801760,3050801775,NC +3050801776,3050801791,NI +3050801792,3050802175,US +3050802176,3050802191,OM +3050802192,3050802207,PK +3050802208,3050802223,PE +3050802224,3050802239,PH +3050802240,3050802255,PR +3050802256,3050802271,QA +3050802272,3050802287,LC +3050802288,3050802303,RS +3050802304,3050802431,US +3050802432,3050802447,SC +3050802448,3050802463,SI +3050802464,3050802479,KR +3050802480,3050802495,LK +3050802496,3050802511,TW +3050802512,3050802527,TT +3050802528,3050802543,UY +3050802544,3050802559,VE +3050802560,3050831871,US 3050831872,3051356159,BR 3051356160,3051372543,CR 3051372544,3051372799,PA @@ -56221,6 +57301,7 @@ 3068723200,3068919807,TW 3068919808,3068948479,JP 3068948480,3068949503,VN +3068949504,3068950527,AU 3068950528,3068952575,NZ 3068952576,3068985343,CN 3068985344,3068986367,HK @@ -56320,13 +57401,23 @@ 3082174464,3082178559,BZ 3082178560,3082178823,HK 3082178824,3082178824,SG -3082178825,3082179583,HK +3082178825,3082179047,HK +3082179048,3082179055,SG +3082179056,3082179583,HK 3082179584,3082181631,IN 3082181632,3082182655,ID 3082182656,3082190847,LA 3082190848,3082289151,JP 3082289152,3087007743,CN -3087007744,3088605183,US +3087007744,3088449535,US +3088449536,3088462847,TH +3088462848,3088463103,US +3088463104,3088474111,TH +3088474112,3088478207,US +3088478208,3088489471,TH +3088489472,3088489727,US +3088489728,3088506879,TH +3088506880,3088605183,US 3088605184,3088609279,NL 3088609280,3088629759,US 3088629760,3088633855,NL @@ -56392,7 +57483,9 @@ 3090387968,3090388479,NL 3090388480,3090389503,US 3090389504,3090389631,CA -3090389632,3090415103,US +3090389632,3090401791,US +3090401792,3090402047,IN +3090402048,3090415103,US 3090415104,3090415615,NL 3090415616,3091202047,US 3091202048,3091726335,CA @@ -56400,7 +57493,9 @@ 3091955712,3091959807,CA 3091959808,3091976191,US 3091976192,3091980287,CA -3091980288,3092559359,US +3091980288,3092381695,US +3092381696,3092439039,TH +3092439040,3092559359,US 3092559360,3092559615,NL 3092559616,3092567039,US 3092567040,3092568063,NL @@ -56454,7 +57549,19 @@ 3093282816,3093299199,CA 3093299200,3093908991,US 3093908992,3093909247,PR -3093909248,3094020095,US +3093909248,3093909528,US +3093909529,3093909529,AT +3093909530,3093909597,US +3093909598,3093909598,DE +3093909599,3093909656,US +3093909657,3093909657,FR +3093909658,3093909812,US +3093909813,3093909813,AT +3093909814,3093943785,US +3093943786,3093943786,CZ +3093943787,3093945989,US +3093945990,3093945990,AT +3093945991,3094020095,US 3094020096,3094023303,CA 3094023304,3094023311,BD 3094023312,3094032759,CA @@ -56491,18 +57598,7 @@ 3098107136,3098107391,FR 3098107392,3098107647,EU 3098107648,3098107903,SE -3098107904,3098108159,US -3098108160,3098108415,IL -3098108416,3098108671,US -3098108672,3098108927,SG -3098108928,3098109183,JP -3098109184,3098109439,AU -3098109440,3098109695,HK -3098109696,3098110719,QA -3098110720,3098111743,IT -3098111744,3098113023,US -3098113024,3098113535,AU -3098113536,3098148863,US +3098107904,3098148863,US 3098148864,3098165247,JM 3098165248,3098181631,US 3098181632,3098185727,CA @@ -56561,6 +57657,9 @@ 3103861760,3103862015,ME 3103862016,3103862271,MD 3103862272,3103862527,IT +3103862528,3103862783,FR +3103862784,3103863039,DE +3103863040,3103863295,RU 3103916032,3103917055,CH 3103917056,3103918079,IT 3103918080,3103919103,DE @@ -56573,7 +57672,9 @@ 3103924224,3103924479,DE 3103924480,3103925247,RU 3103925248,3103926271,PL -3103926272,3103927295,CZ +3103926272,3103926783,CZ +3103926784,3103927039,SK +3103927040,3103927295,CZ 3103927296,3103929343,NL 3103929344,3103930367,BE 3103930368,3103931391,DE @@ -57593,7 +58694,24 @@ 3105008640,3105009663,CH 3105009664,3105010687,PL 3105010688,3105011711,AT -3105011712,3105012735,CY +3105011712,3105012229,CY +3105012230,3105012230,US +3105012231,3105012231,CY +3105012232,3105012235,US +3105012236,3105012257,CY +3105012258,3105012258,US +3105012259,3105012259,CY +3105012260,3105012267,US +3105012268,3105012485,CY +3105012486,3105012486,GB +3105012487,3105012487,CY +3105012488,3105012491,GB +3105012492,3105012543,CY +3105012544,3105012557,DE +3105012558,3105012559,US +3105012560,3105012560,CY +3105012561,3105012563,DE +3105012564,3105012735,CY 3105012736,3105013759,GL 3105013760,3105014783,SE 3105014784,3105015807,ES @@ -58704,7 +59822,9 @@ 3106146304,3106147327,GB 3106147328,3106148351,FR 3106148352,3106149375,AT -3106149376,3106150399,EU +3106149376,3106149631,EU +3106149632,3106149887,DE +3106149888,3106150399,EU 3106150400,3106151423,GB 3106151424,3106152447,NO 3106152448,3106153471,GB @@ -58851,7 +59971,8 @@ 3106299904,3106300927,GB 3106300928,3106301951,NL 3106301952,3106302975,GB -3106302976,3106303999,CZ +3106302976,3106303231,A2 +3106303232,3106303999,CZ 3106304000,3106305023,GB 3106305024,3106306047,DE 3106306048,3106307071,NO @@ -59158,7 +60279,9 @@ 3106599936,3106601983,CH 3106601984,3106603007,DE 3106603008,3106604031,BE -3106604032,3106605055,DE +3106604032,3106604543,DE +3106604544,3106604799,RU +3106604800,3106605055,DE 3106605056,3106606079,RU 3106606080,3106607103,AT 3106607104,3106608127,IT @@ -59272,7 +60395,9 @@ 3106716672,3106717695,CZ 3106717696,3106718719,TR 3106718720,3106719743,CH -3106719744,3106720767,DE +3106719744,3106720245,DE +3106720246,3106720246,US +3106720247,3106720767,DE 3106720768,3106722815,AT 3106722816,3106723839,IT 3106723840,3106724863,PL @@ -59618,7 +60743,7 @@ 3107085312,3107086335,NL 3107086336,3107087359,EE 3107087360,3107088383,IE -3107088384,3107089407,NL +3107088384,3107089407,BR 3107089408,3107090431,IT 3107090432,3107091455,FR 3107091456,3107092479,ES @@ -59732,7 +60857,6 @@ 3107204096,3107205119,FR 3107205120,3107206143,BG 3107206144,3107207167,NL -3107207168,3107208191,DE 3107208192,3107209215,NL 3107209216,3107210239,IT 3107210240,3107213311,RU @@ -59746,7 +60870,9 @@ 3107220480,3107221503,GB 3107221504,3107222527,IT 3107222528,3107223551,IQ -3107223552,3107224575,AT +3107223552,3107224063,AT +3107224064,3107224319,DE +3107224320,3107224575,AT 3107224576,3107225599,FR 3107225600,3107226623,AZ 3107226624,3107227647,RU @@ -59832,7 +60958,9 @@ 3107316736,3107317759,KG 3107317760,3107318783,RU 3107318784,3107318799,IE -3107318800,3107319807,NL +3107318800,3107319039,NL +3107319040,3107319295,GB +3107319296,3107319807,NL 3107319808,3107320831,OM 3107320832,3107321855,SA 3107321856,3107322879,NL @@ -60344,10 +61472,7 @@ 3107826688,3107827711,RU 3107827712,3107828735,FR 3107828736,3107829759,IT -3107829760,3107830783,FR -3107830784,3107831639,GB -3107831640,3107831643,FR -3107831644,3107831807,GB +3107829760,3107831807,FR 3107831808,3107832831,RU 3107832832,3107833855,NL 3107833856,3107834879,PS @@ -61555,7 +62680,9 @@ 3109128224,3109128231,DK 3109128232,3109128239,SE 3109128240,3109128247,IS -3109128248,3109128503,NL +3109128248,3109128319,NL +3109128320,3109128383,GB +3109128384,3109128503,NL 3109128504,3109128511,IE 3109128512,3109128719,NL 3109128720,3109128727,GB @@ -61564,7 +62691,9 @@ 3109128744,3109128751,SE 3109128752,3109128759,IE 3109128760,3109128760,IT -3109128761,3109128975,NL +3109128761,3109128831,NL +3109128832,3109128895,BE +3109128896,3109128975,NL 3109128976,3109128983,DK 3109128984,3109128991,SE 3109128992,3109128999,IT @@ -62578,7 +63707,9 @@ 3110182912,3110183935,GB 3110183936,3110184959,RU 3110184960,3110185983,ES -3110185984,3110189055,DE +3110185984,3110187007,DE +3110187008,3110187263,BE +3110187264,3110189055,DE 3110189056,3110190079,FR 3110190080,3110193151,NO 3110193152,3110194175,RU @@ -62955,7 +64086,8 @@ 3110594560,3110595583,DE 3110595584,3110596607,NL 3110596608,3110597631,SE -3110597632,3110600703,RU +3110597632,3110599679,IR +3110599680,3110600703,RU 3110600704,3110601727,GR 3110601728,3110602751,RU 3110602752,3110603775,NL @@ -63008,10 +64140,9 @@ 3110656000,3110657023,GB 3110657024,3110658047,GI 3110658048,3110659071,AT -3110659072,3110660095,IR -3110660096,3110661119,RU +3110659072,3110661119,IR 3110661120,3110662143,ES -3110662144,3110663167,RU +3110662144,3110663167,IR 3110663168,3110664191,LB 3110664192,3110665215,RU 3110665216,3110666239,LB @@ -63110,9 +64241,9 @@ 3110763520,3110764543,AD 3110764544,3110765567,RU 3110765568,3110766591,PL -3110766592,3110767615,RU +3110766592,3110767615,IR 3110767616,3110768639,RS -3110768640,3110769663,RU +3110768640,3110769663,IR 3110769664,3110770687,DE 3110770688,3110771711,NL 3110771712,3110772735,KZ @@ -63146,8 +64277,7 @@ 3110801408,3110802431,ES 3110802432,3110803455,DE 3110803456,3110804479,NL -3110804480,3110805503,RU -3110805504,3110806527,IR +3110804480,3110806527,IR 3110806528,3110809599,NL 3110809600,3110810623,LB 3110810624,3110811647,DE @@ -63188,18 +64318,19 @@ 3110853632,3110854655,DE 3110854656,3110855679,NL 3110855680,3110856703,GB -3110856704,3110857727,KW +3110856704,3110857727,FR 3110857728,3110858751,IT 3110858752,3110859775,RU 3110859776,3110861823,IR -3110861824,3110864895,RU +3110861824,3110862847,UA +3110862848,3110864895,RU 3110864896,3110865919,DE 3110865920,3110866943,GB 3110866944,3110868991,RU 3110868992,3110870015,PS 3110870016,3110871039,CZ 3110871040,3110872063,FR -3110872064,3110873087,ES +3110872064,3110873087,MD 3110873088,3110874111,IE 3110874112,3110875135,GB 3110875136,3110876159,PL @@ -63221,23 +64352,25 @@ 3110894592,3110895615,TR 3110895616,3110896639,IE 3110896640,3110897663,GB -3110897664,3110898687,ES +3110897664,3110898687,MD 3110898688,3110899711,BG -3110899712,3110900735,ES +3110899712,3110900735,MD 3110900736,3110901759,TR -3110901760,3110902783,ES +3110901760,3110902783,MD 3110902784,3110903807,TR -3110903808,3110905855,RU +3110903808,3110904831,RU +3110904832,3110905855,IR 3110905856,3110906879,GB 3110906880,3110907903,DE 3110907904,3110908927,GB -3110908928,3110909951,ES +3110908928,3110909951,MD 3110909952,3110910975,DE 3110910976,3110911999,BG 3110912000,3110914047,RU 3110914048,3110915071,AT 3110915072,3110916095,ES -3110916096,3110918143,RU +3110916096,3110917119,RU +3110917120,3110918143,UA 3110918144,3110919167,DE 3110919168,3110920191,RU 3110920192,3110921215,NL @@ -63295,7 +64428,7 @@ 3110977536,3110978559,JO 3110978560,3110979583,DE 3110979584,3110980607,FR -3110980608,3110982655,RU +3110980608,3110982655,UA 3110982656,3110983679,RO 3110983680,3110984703,PL 3110984704,3110985727,IT @@ -63312,6 +64445,324 @@ 3110996992,3110998015,DE 3110998016,3110999039,ES 3110999040,3111000063,IT +3111000064,3111001087,RO +3111001088,3111002111,IR +3111002112,3111003135,DE +3111003136,3111004159,GG +3111004160,3111005183,DE +3111005184,3111006207,RU +3111006208,3111007231,PL +3111007232,3111008255,GB +3111008256,3111009279,RU +3111009280,3111010303,BG +3111010304,3111012351,ES +3111012352,3111013375,CH +3111013376,3111014399,ES +3111014400,3111015423,DK +3111015424,3111016447,FR +3111016448,3111017471,CH +3111017472,3111018495,NL +3111018496,3111019519,FR +3111019520,3111020543,CH +3111020544,3111021567,SY +3111021568,3111022591,IL +3111022592,3111023615,NL +3111023616,3111024639,IT +3111024640,3111025663,AT +3111025664,3111026687,DE +3111026688,3111027711,RU +3111027712,3111028735,UA +3111028736,3111029759,AT +3111029760,3111031807,SK +3111031808,3111032831,NO +3111032832,3111033855,DE +3111033856,3111035903,ES +3111035904,3111036927,GE +3111036928,3111037951,RU +3111037952,3111038975,NL +3111038976,3111041023,GB +3111041024,3111042047,CH +3111042048,3111043071,GB +3111043072,3111044095,FR +3111044096,3111045119,CH +3111045120,3111046143,NL +3111046144,3111047167,CZ +3111047168,3111048191,RU +3111048192,3111049215,ES +3111049216,3111050239,IR +3111050240,3111051263,CH +3111051264,3111052287,ES +3111052288,3111053311,IR +3111053312,3111054335,SA +3111054336,3111055359,IR +3111055360,3111056383,TR +3111056384,3111057407,IR +3111057408,3111058431,GB +3111058432,3111059455,IR +3111059456,3111060479,ES +3111060480,3111061503,LB +3111061504,3111063551,IR +3111063552,3111064575,FR +3111064576,3111065599,GB +3111065600,3111066623,RU +3111066624,3111067647,NL +3111067648,3111068671,DE +3111068672,3111069695,IS +3111069696,3111070719,IR +3111070720,3111071743,FR +3111071744,3111072767,UA +3111072768,3111074815,FR +3111074816,3111075839,DE +3111075840,3111076863,IR +3111076864,3111077887,AZ +3111077888,3111078911,NL +3111078912,3111079935,IT +3111079936,3111080959,NL +3111080960,3111081983,RU +3111081984,3111083007,HU +3111083008,3111084031,UA +3111084032,3111085055,CZ +3111085056,3111086079,RU +3111086080,3111087103,KZ +3111087104,3111088127,CZ +3111088128,3111089151,IE +3111089152,3111090175,UA +3111090176,3111091199,NL +3111091200,3111092223,AT +3111092224,3111093247,IR +3111093248,3111094271,PL +3111094272,3111095295,IR +3111095296,3111096319,IE +3111096320,3111097343,AT +3111097344,3111098367,ES +3111098368,3111099391,SE +3111099392,3111100415,CH +3111100416,3111101439,LB +3111101440,3111102463,UA +3111102464,3111103487,DE +3111103488,3111104511,DK +3111104512,3111105535,CH +3111105536,3111106559,LT +3111106560,3111107583,ES +3111107584,3111108607,HR +3111108608,3111109631,DE +3111109632,3111110655,BE +3111110656,3111111679,NL +3111111680,3111112703,BE +3111112704,3111113727,HU +3111113728,3111114751,BG +3111114752,3111115775,RU +3111115776,3111116799,DE +3111116800,3111117823,GB +3111117824,3111118847,ES +3111118848,3111119871,TR +3111119872,3111120895,FR +3111120896,3111121919,SE +3111121920,3111122943,TR +3111122944,3111123967,IT +3111123968,3111126015,ES +3111126016,3111127039,IT +3111127040,3111128063,CH +3111128064,3111129087,UA +3111129088,3111130111,FR +3111130112,3111131135,RS +3111131136,3111132159,NO +3111132160,3111133183,CZ +3111133184,3111135231,IR +3111135232,3111136255,PL +3111136256,3111137279,DE +3111137280,3111138303,LI +3111138304,3111139327,CH +3111139328,3111140351,RU +3111140352,3111141375,IT +3111141376,3111142399,NL +3111142400,3111143423,DE +3111143424,3111144447,CH +3111144448,3111145471,ES +3111145472,3111146495,RU +3111146496,3111149567,IT +3111149568,3111150591,GB +3111150592,3111151615,RU +3111151616,3111152639,OM +3111152640,3111153663,NL +3111153664,3111154687,SE +3111154688,3111155711,PL +3111155712,3111156735,UA +3111156736,3111157759,DE +3111157760,3111158783,IR +3111158784,3111159807,CH +3111159808,3111160831,SE +3111160832,3111161855,RU +3111161856,3111162879,IS +3111162880,3111163903,IR +3111163904,3111164927,DE +3111164928,3111165951,HU +3111165952,3111166975,GB +3111166976,3111167999,CZ +3111168000,3111169023,IR +3111169024,3111170047,UA +3111170048,3111171071,DE +3111171072,3111172095,PL +3111172096,3111173119,RO +3111173120,3111174143,IQ +3111174144,3111175167,AZ +3111175168,3111176191,IT +3111176192,3111177215,YE +3111177216,3111178239,IS +3111178240,3111179263,DK +3111179264,3111180287,IT +3111180288,3111181311,DE +3111181312,3111182335,GB +3111182336,3111183359,RU +3111183360,3111184383,FR +3111184384,3111185407,IQ +3111185408,3111186431,RU +3111186432,3111189503,GB +3111189504,3111190527,DE +3111190528,3111191551,GB +3111191552,3111192575,DE +3111192576,3111193599,TR +3111193600,3111194623,RU +3111194624,3111195647,GB +3111195648,3111196671,CH +3111196672,3111197695,GB +3111197696,3111198719,RU +3111198720,3111199743,PL +3111199744,3111200767,KZ +3111200768,3111201791,ES +3111201792,3111202815,SK +3111202816,3111203839,FR +3111203840,3111204863,NL +3111204864,3111205887,IR +3111205888,3111206911,GB +3111206912,3111207935,FR +3111207936,3111208959,GB +3111208960,3111211007,RU +3111211008,3111212031,GB +3111212032,3111214079,NL +3111214080,3111215103,GB +3111215104,3111216127,SE +3111216128,3111217151,AT +3111217152,3111218175,IR +3111218176,3111219199,RU +3111219200,3111220223,IR +3111220224,3111221247,RU +3111221248,3111223295,DE +3111223296,3111224319,GB +3111224320,3111225343,KZ +3111225344,3111226367,RU +3111226368,3111227391,PT +3111227392,3111228415,DE +3111228416,3111230463,IR +3111230464,3111231487,PT +3111231488,3111232511,FR +3111232512,3111233535,DE +3111233536,3111234559,LV +3111234560,3111235583,NL +3111235584,3111236607,SE +3111236608,3111237631,GB +3111237632,3111238655,ES +3111238656,3111239679,GB +3111239680,3111240703,ES +3111240704,3111241727,NL +3111241728,3111242751,RU +3111242752,3111243775,GB +3111243776,3111244799,RU +3111244800,3111245823,NL +3111245824,3111246847,GB +3111246848,3111247871,TR +3111247872,3111248895,NL +3111248896,3111249919,DK +3111249920,3111250943,IE +3111250944,3111251967,ES +3111251968,3111252991,GB +3111252992,3111254015,RU +3111254016,3111255039,IE +3111255040,3111256063,EE +3111256064,3111257087,IT +3111257088,3111259135,FR +3111259136,3111261183,DE +3111261184,3111262207,TR +3111262208,3111266303,NL +3111266304,3111267327,DE +3111267328,3111268351,DK +3111268352,3111269375,BE +3111269376,3111270399,RO +3111270400,3111271423,NO +3111271424,3111272447,NL +3111272448,3111273471,ES +3111273472,3111274495,SA +3111274496,3111275519,IR +3111275520,3111276543,NL +3111276544,3111277567,IT +3111277568,3111278591,RO +3111278592,3111279615,LB +3111279616,3111280639,PL +3111280640,3111281663,GB +3111281664,3111282687,FR +3111282688,3111283711,SE +3111283712,3111284735,IT +3111284736,3111285759,AL +3111285760,3111286783,IT +3111286784,3111287807,IL +3111287808,3111288831,DE +3111288832,3111289855,FR +3111289856,3111290879,DE +3111290880,3111291903,UA +3111291904,3111292927,NL +3111292928,3111293951,SI +3111293952,3111294975,GB +3111294976,3111295999,US +3111296000,3111297023,NL +3111297024,3111298047,IE +3111298048,3111299071,NL +3111299072,3111300095,DE +3111300096,3111301119,ES +3111301120,3111302143,EE +3111302144,3111303167,BG +3111303168,3111304191,NL +3111304192,3111305215,IR +3111305216,3111306239,TR +3111306240,3111307263,NL +3111307264,3111308287,DE +3111308288,3111309311,GB +3111309312,3111310335,CH +3111310336,3111313407,DE +3111313408,3111314431,AT +3111314432,3111315455,GB +3111315456,3111316479,IT +3111316480,3111317503,NL +3111317504,3111318527,SY +3111318528,3111319551,RU +3111319552,3111320575,SE +3111320576,3111321599,LB +3111321600,3111322623,CZ +3111322624,3111323647,GE +3111323648,3111324671,CZ +3111324672,3111325695,MT +3111325696,3111326719,FI +3111326720,3111327743,HU +3111327744,3111328767,DE +3111328768,3111329791,RO +3111329792,3111330815,NL +3111330816,3111331839,UA +3111331840,3111332863,TR +3111332864,3111333887,PL +3111333888,3111334911,DE +3111334912,3111335935,ES +3111335936,3111336959,HR +3111336960,3111337983,GB +3111337984,3111339007,RO +3111339008,3111340031,GB +3111340032,3111341055,CZ +3111341056,3111342079,IR +3111342080,3111343103,DE +3111343104,3111344127,GB +3111344128,3111345151,NL +3111345152,3111346175,RO +3111346176,3111347199,RU +3111347200,3111348223,LB +3111348224,3111349247,DE 3113710318,3113710318,CA 3120562176,3120594943,CO 3120594944,3120599039,AR @@ -64128,7 +65579,9 @@ 3164973424,3164973663,FR 3164973664,3164973695,GB 3164973696,3164974335,FR -3164974336,3164974463,GB +3164974336,3164974437,GB +3164974438,3164974438,IT +3164974439,3164974463,GB 3164974464,3164974527,FR 3164974528,3164974559,ES 3164974560,3164974651,FR @@ -64224,9 +65677,7 @@ 3167784960,3167797247,IR 3167797248,3167798271,MD 3167798272,3167799295,RO -3167799296,3167800319,MD -3167800320,3167801343,RO -3167801344,3167803391,MD +3167799296,3167803391,MD 3167803392,3167804159,RO 3167804160,3167804415,ES 3167804416,3167805439,GB @@ -64293,7 +65744,9 @@ 3168018688,3168020479,RO 3168020480,3168022527,MD 3168022528,3168034815,IR -3168034816,3168038911,RO +3168034816,3168037887,RO +3168037888,3168038399,SE +3168038400,3168038911,RO 3168038912,3168039935,MD 3168039936,3168040959,BE 3168040960,3168050431,RO @@ -64341,15 +65794,19 @@ 3168137472,3168137727,MD 3168137728,3168137983,EU 3168137984,3168138239,NL -3168138240,3168139263,RO +3168138240,3168139263,MD 3168139264,3168141311,GB 3168141312,3168143615,RO 3168143616,3168143871,UA -3168143872,3168145151,RO +3168143872,3168144383,RO +3168144384,3168144639,SG +3168144640,3168145151,RO 3168145152,3168145407,UA 3168145408,3168147455,RO 3168147456,3168147967,FR -3168147968,3168155135,RO +3168147968,3168154111,RO +3168154112,3168154367,SG +3168154368,3168155135,RO 3168155136,3168155391,IT 3168155392,3168156671,RO 3168156672,3168157695,MD @@ -64393,13 +65850,16 @@ 3168239616,3168243711,IR 3168243712,3168247807,RO 3168247808,3168264191,IR -3168264192,3168265983,RO +3168264192,3168265727,RO +3168265728,3168265855,FR +3168265856,3168265983,RO 3168265984,3168266239,GR -3168266240,3168268287,RO -3168268288,3168269311,MD +3168266240,3168267263,RO +3168267264,3168269311,MD 3168269312,3168270591,RO 3168270592,3168270847,MD -3168270848,3168272383,RO +3168270848,3168271359,RO +3168271360,3168272383,MD 3168272384,3168534527,IT 3168534528,3168796671,GB 3168796672,3168829439,FR @@ -64436,7 +65896,9 @@ 3169648640,3169714175,MD 3169714176,3169779711,FI 3169779712,3169845247,UA -3169845248,3169863167,RO +3169845248,3169854463,RO +3169854464,3169854719,ES +3169854720,3169863167,RO 3169863168,3169863423,MD 3169863424,3169869823,RO 3169869824,3169878015,MD @@ -64451,7 +65913,9 @@ 3169899264,3169899391,CN 3169899392,3169899519,TW 3169899520,3169899775,IR -3169899776,3169905663,RO +3169899776,3169902079,RO +3169902080,3169902591,SE +3169902592,3169905663,RO 3169905664,3169906687,ES 3169906688,3169913855,RO 3169913856,3169914111,GB @@ -65134,7 +66598,8 @@ 3194806272,3194814463,AR 3194814464,3194818559,PA 3194818560,3194830847,AR -3194830848,3194839039,PA +3194830848,3194831871,BR +3194831872,3194839039,PA 3194839040,3194863615,CO 3194863616,3194871807,HN 3194871808,3194879999,BO @@ -65221,7 +66686,9 @@ 3195205632,3195206655,PE 3195206656,3195207679,CL 3195207680,3195211775,GT -3195211776,3195215871,BZ +3195211776,3195214988,BZ +3195214989,3195214989,RU +3195214990,3195215871,BZ 3195215872,3195224063,AR 3195224064,3195232255,PA 3195232256,3195234559,CR @@ -67146,7 +68613,7 @@ 3226141952,3226143487,CA 3226143488,3226143743,US 3226143744,3226146559,CA -3226146560,3226146815,FR +3226146560,3226146815,US 3226146816,3226156543,CA 3226156544,3226156799,US 3226156800,3226157567,CA @@ -67177,8 +68644,8 @@ 3226237696,3226240255,DE 3226240256,3226240511,US 3226240512,3226241535,DE -3226241536,3226241791,AT -3226241792,3226248447,DE +3226241536,3226241791,NL +3226241792,3226248191,DE 3226248448,3226248703,IE 3226248704,3226250495,DE 3226250496,3226251263,US @@ -68122,11 +69589,12 @@ 3228406016,3228406271,US 3228406272,3228406527,IN 3228406528,3228407039,FR -3228407040,3228424703,DE +3228407296,3228424447,DE 3228424704,3228424959,US -3228425216,3228430847,DE +3228425216,3228430335,DE +3228430592,3228430847,DE 3228430848,3228431103,MU -3228431360,3228434431,DE +3228431872,3228434431,DE 3228434432,3228456191,US 3228456192,3228456447,CA 3228456448,3228457471,US @@ -68927,6 +70395,7 @@ 3231093248,3231093503,NL 3231093504,3231101183,US 3231101184,3231103231,GB +3231103232,3231103487,CA 3231103488,3231103999,US 3231104000,3231104255,NO 3231104256,3231104767,DE @@ -68953,8 +70422,7 @@ 3231113984,3231115775,GB 3231115776,3231116799,AU 3231116800,3231117055,HU -3231117056,3231118335,US -3231118592,3231118847,US +3231117056,3231118847,US 3231118848,3231119103,AU 3231119104,3231119359,US 3231119360,3231119615,GB @@ -69028,6 +70496,7 @@ 3231225600,3231225855,DE 3231225856,3231226879,US 3231226880,3231227135,GB +3231227136,3231227391,US 3231227392,3231227647,CA 3231227648,3231228927,US 3231228928,3231229183,PR @@ -69045,7 +70514,9 @@ 3231237632,3231241215,US 3231241216,3231241471,AU 3231241472,3231241727,CA -3231241728,3231248639,US +3231241728,3231244287,US +3231244288,3231244543,CA +3231244544,3231248639,US 3231248640,3231248895,NL 3231248896,3231249407,US 3231249408,3231249663,GB @@ -69407,7 +70878,7 @@ 3231906048,3231907839,RU 3231907840,3231912959,US 3231912960,3231913215,AP -3231913472,3231916031,US +3231913216,3231916031,US 3231916032,3231948799,FI 3231948800,3231973375,US 3231973376,3232038911,AT @@ -69496,26 +70967,27 @@ 3232407040,3232407551,SG 3232407552,3232432383,US 3232432384,3232433663,EU -3232433920,3232440319,US +3232433664,3232440319,US 3232440320,3232448511,CA 3232448512,3232461311,US 3232461312,3232461823,CA 3232461824,3232462847,US 3232462848,3232464895,BB 3232464896,3232483327,GB -3232483328,3232555007,US -3232555264,3232555775,US +3232483328,3232555775,US 3232555776,3232557055,JP 3232557056,3232557311,AU 3232557312,3232557567,US -3232557568,3232560127,JP +3232557568,3232559103,JP +3232559104,3232559359,US +3232559360,3232560127,JP 3232560896,3232561663,US 3232561664,3232561919,CA 3232561920,3232562431,US 3232562432,3232562687,NL 3232562688,3232562943,CA -3232562944,3232563199,US -3232563200,3232564479,GB +3232562944,3232563455,US +3232563456,3232564479,GB 3232564480,3232567295,US 3232567296,3232569599,NZ 3232569600,3232570367,US @@ -69587,7 +71059,9 @@ 3233484800,3233487359,ES 3233487360,3233487871,US 3233487872,3233488895,CA -3233488896,3233548799,US +3233488896,3233546751,US +3233546752,3233547007,CA +3233547008,3233548799,US 3233548800,3233549055,NL 3233549056,3233549311,BR 3233549312,3233557247,US @@ -69604,7 +71078,8 @@ 3233564928,3233566719,JP 3233567744,3233567999,US 3233568000,3233568767,JP -3233568768,3233569791,AU +3233568768,3233569023,CA +3233569024,3233569535,AU 3233569792,3233570047,JP 3233570048,3233570815,US 3233570816,3233571071,GB @@ -69618,9 +71093,9 @@ 3233575680,3233575935,AU 3233575936,3233576191,RU 3233576192,3233576447,GB -3233576448,3233576959,US -3233576960,3233577983,NL -3233577984,3233578239,US +3233576448,3233577215,US +3233577216,3233577727,NL +3233577728,3233578239,US 3233578240,3233578495,NL 3233578496,3233578751,US 3233578752,3233579007,NL @@ -69656,7 +71131,7 @@ 3233607168,3233607935,US 3233607936,3233608191,AU 3233608192,3233609727,HU -3233609728,3233611775,US +3233609728,3233612031,US 3233612032,3233612287,NL 3233612288,3233613823,US 3233613824,3233614847,GB @@ -69711,7 +71186,8 @@ 3233654272,3233655551,GB 3233655552,3233663487,US 3233663488,3233663999,NL -3233664000,3233665023,US +3233664000,3233664255,CA +3233664256,3233665023,US 3233665024,3233666047,AU 3233666048,3233668863,US 3233668864,3233669119,AU @@ -69719,7 +71195,9 @@ 3233670400,3233670655,AU 3233671168,3233676031,US 3233676032,3233676287,NL -3233676288,3233684991,US +3233676288,3233677311,US +3233677312,3233677567,CA +3233677568,3233684991,US 3233684992,3233685247,MX 3233685248,3233685503,BR 3233685504,3233688575,US @@ -69737,7 +71215,7 @@ 3233694976,3233695231,FR 3233695232,3233696511,US 3233696512,3233696767,CA -3233696768,3233701375,US +3233696768,3233701631,US 3233701632,3233701887,NL 3233701888,3233704959,US 3233704960,3233705215,NZ @@ -69833,19 +71311,19 @@ 3233936640,3233936895,EU 3233936896,3233939455,US 3233939456,3234004991,FI +3234004992,3234005247,US 3234005248,3234005503,GB 3234005504,3234005759,AU +3234005760,3234006015,CA 3234006016,3234007039,US 3234007040,3234007295,NL 3234007296,3234007551,US 3234007552,3234007807,AU 3234007808,3234008063,US 3234008064,3234008831,NZ -3234008832,3234013183,US -3234013440,3234013695,US +3234008832,3234013695,US 3234013696,3234013951,AU -3234013952,3234014207,US -3234014464,3234014975,US +3234013952,3234014975,US 3234014976,3234015487,AU 3234015488,3234015743,US 3234015744,3234015999,IE @@ -69860,7 +71338,7 @@ 3234031360,3234031871,US 3234031872,3234032127,GB 3234032128,3234032383,NL -3234032384,3234032895,US +3234032384,3234033151,US 3234033152,3234033407,NL 3234033408,3234033663,US 3234033664,3234033919,AU @@ -69882,15 +71360,21 @@ 3234054912,3234055167,NL 3234055168,3234055423,US 3234055424,3234055679,AU -3234055680,3234061055,US +3234055680,3234056959,US +3234056960,3234057215,CA +3234057216,3234061055,US 3234061056,3234061311,AU 3234061312,3234064639,US 3234064640,3234064895,AU 3234064896,3234065407,US 3234065408,3234065663,NL 3234065664,3234065919,BR -3234065920,3234070527,US -3234070528,3234110463,FR +3234065920,3234069247,US +3234069248,3234069503,CA +3234069504,3234070271,US +3234070272,3234070527,CA +3234070528,3234070783,US +3234070784,3234110463,FR 3234110464,3234128455,US 3234128456,3234128463,GB 3234128464,3234130695,US @@ -69900,7 +71384,9 @@ 3234131192,3234136063,US 3234136064,3234150911,CA 3234150912,3234151423,US -3234151424,3234159615,CA +3234151424,3234158847,CA +3234158848,3234159103,US +3234159104,3234159615,CA 3234159616,3234160127,US 3234160128,3234164991,CA 3234164992,3234165247,US @@ -69912,10 +71398,14 @@ 3234176000,3234177279,US 3234177280,3234187007,CA 3234187008,3234187519,US -3234187520,3234192383,CA +3234187520,3234189055,CA +3234189056,3234189311,US +3234189312,3234192383,CA 3234192384,3234193663,US -3234193664,3234201599,CA -3234201600,3234203647,US +3234193664,3234198783,CA +3234198784,3234199039,US +3234199040,3234201343,CA +3234201344,3234203647,US 3234203648,3234205183,BR 3234205184,3234205439,AR 3234205440,3234205695,BR @@ -69933,7 +71423,9 @@ 3234238976,3234239231,MY 3234239232,3234240255,US 3234240256,3234240511,EU -3234240512,3234270207,US +3234240512,3234267135,US +3234267136,3234267391,CA +3234267392,3234270207,US 3234270208,3234271231,CA 3234271232,3234275327,PT 3234275328,3234279423,AU @@ -69949,7 +71441,11 @@ 3234340096,3234340351,IN 3234340352,3234349055,US 3234349056,3234353151,NZ -3234353152,3234549759,US +3234353152,3234529279,US +3234529280,3234529535,PR +3234529536,3234538751,US +3234538752,3234539007,TC +3234539520,3234549759,US 3234549760,3234550015,RU 3234553856,3234554367,US 3234554624,3234554879,AU @@ -69978,29 +71474,30 @@ 3234583808,3234584063,AU 3234584064,3234584575,US 3234584576,3234584831,AU -3234584832,3234585343,US -3234585600,3234587391,US +3234584832,3234587391,US 3234587392,3234587647,NL 3234587648,3234588671,US 3234588672,3234588927,AU 3234588928,3234589439,US 3234589440,3234589695,AU -3234589696,3234592511,US +3234589696,3234590463,US +3234590464,3234590719,CA +3234590720,3234592511,US 3234592512,3234592767,AU -3234592768,3234725887,US +3234592768,3234726143,US 3234726144,3234726399,CA 3234726400,3234726911,US 3234726912,3234727935,CA 3234727936,3234733055,US 3234733056,3234733311,CA -3234733312,3234739455,US +3234733312,3234739711,US 3234739712,3234740223,CA 3234740224,3234745599,US 3234745600,3234746879,GB 3234746880,3234747903,US 3234747904,3234748159,NL -3234748160,3234749439,US -3234749440,3234750463,CA +3234748160,3234749695,US +3234749696,3234750207,CA 3234750464,3234751999,US 3234752000,3234752255,AU 3234752256,3234753535,US @@ -70012,12 +71509,12 @@ 3234764800,3234766335,NZ 3234766336,3234772223,US 3234772224,3234772479,CA -3234772480,3234772735,US -3234772992,3234781439,US +3234772480,3234781439,US 3234781440,3234781951,CA 3234781952,3234782719,US 3234782720,3234783999,IL 3234784000,3234794495,US +3234794496,3234794751,CA 3234794752,3234795007,US 3234795008,3234795263,NL 3234795264,3234799359,US @@ -70030,7 +71527,7 @@ 3234801664,3234802431,EC 3234802432,3234803711,US 3234803712,3234803967,PR -3234804224,3234806783,US +3234803968,3234806783,US 3234806784,3234807295,CA 3234807552,3234807807,US 3234807808,3234808063,AU @@ -70043,8 +71540,7 @@ 3234816000,3234816767,AU 3234816768,3234820351,US 3234820352,3234820607,AU -3234820608,3234820863,US -3234821120,3234821887,US +3234820608,3234821887,US 3234821888,3234822655,AU 3234822656,3234826751,US 3234826752,3234827007,CA @@ -70076,17 +71572,19 @@ 3234853888,3234854143,EC 3234854144,3234854911,US 3234854912,3234855167,AU -3234855168,3234855935,US -3234856192,3234856447,US +3234855168,3234856447,US 3234856448,3234856703,AU -3234856960,3234861055,CA -3234861056,3234988031,US -3234988032,3234991103,CA -3234991104,3235004415,US +3234856704,3234857215,US +3234857216,3234861055,CA +3234861056,3234988287,US +3234988288,3234990847,CA +3234990848,3235004415,US 3235004416,3235021823,CA 3235021824,3235026943,US 3235026944,3235027967,CA -3235027968,3235045375,US +3235027968,3235044375,US +3235044376,3235044383,GB +3235044384,3235045375,US 3235045376,3235045887,CA 3235045888,3235065343,US 3235065344,3235065855,CA @@ -70103,10 +71601,16 @@ 3235389440,3235389951,VE 3235389952,3235512319,US 3235512320,3235577855,JP -3235577856,3235643391,CA -3235643392,3235774463,US -3235774464,3235776767,CA -3235777024,3235800319,US +3235577856,3235643135,CA +3235643136,3235745791,US +3235745792,3235745792,DE +3235745793,3235747839,US +3235747840,3235748095,GB +3235748096,3235748351,US +3235748352,3235748607,GB +3235748608,3235774719,US +3235774720,3235776767,CA +3235776768,3235800575,US 3235800576,3235801087,CA 3235801088,3235807231,US 3235807232,3235839999,CA @@ -70184,7 +71688,8 @@ 3236044800,3236052991,CA 3236052992,3236069375,US 3236069376,3236102143,CA -3236102144,3236106239,PH +3236102144,3236102399,US +3236102400,3236106239,PH 3236106240,3236140031,US 3236140032,3236142079,CA 3236142080,3236142335,US @@ -70195,8 +71700,8 @@ 3236143007,3236143103,CA 3236143104,3236163519,US 3236163520,3236163583,IE -3236163584,3236167679,US -3236167680,3236175871,CA +3236163584,3236167935,US +3236167936,3236175871,CA 3236175872,3236200447,US 3236200448,3236233215,MY 3236233216,3236237567,US @@ -70211,13 +71716,17 @@ 3236312320,3236312575,GH 3236312576,3236312831,GR 3236312832,3236313087,QA -3236313088,3236368127,US +3236313088,3236365567,US +3236365568,3236365823,CA +3236365824,3236368127,US 3236368128,3236368383,AU 3236368384,3236372991,US 3236372992,3236373247,AU -3236373504,3236379391,US +3236373248,3236373503,US +3236373504,3236373759,BS +3236373760,3236379391,US 3236379392,3236379647,AU -3236379648,3236380927,US +3236379648,3236381183,US 3236381184,3236381439,CA 3236381440,3236381695,NL 3236381696,3236383999,US @@ -70236,7 +71745,7 @@ 3236395008,3236395519,BR 3236395520,3236396799,US 3236396800,3236397055,AU -3236397056,3236398591,US +3236397056,3236398847,US 3236398848,3236399359,AU 3236399616,3236400127,US 3236400128,3236400383,CL @@ -70250,14 +71759,15 @@ 3236409088,3236409599,BR 3236409600,3236411135,US 3236411136,3236411391,AU -3236411392,3236413695,US +3236411392,3236412415,US +3236412416,3236412671,CA +3236412672,3236413695,US 3236413696,3236413951,AU 3236413952,3236416255,US 3236416256,3236416511,AU 3236416512,3236418303,US 3236418304,3236418815,AU -3236418816,3236419071,US -3236419328,3236419583,US +3236418816,3236419583,US 3236419584,3236419839,AU 3236419840,3236420095,US 3236420096,3236420351,AU @@ -70266,16 +71776,18 @@ 3236425216,3236427519,US 3236427520,3236427775,CA 3236427776,3236428031,AU -3236428288,3236429311,US +3236428032,3236429311,US 3236429312,3236429567,MU -3236429824,3236438015,US +3236429568,3236438015,US 3236446208,3236447487,US 3236447488,3236447743,AP 3236447744,3236450047,US 3236450048,3236450303,EU 3236450304,3236462591,US 3236462592,3236470783,AU -3236470784,3236566783,US +3236470784,3236560895,US +3236560896,3236561151,CA +3236561152,3236566783,US 3236566784,3236567039,CA 3236567040,3236575743,US 3236575744,3236575999,AU @@ -70286,8 +71798,9 @@ 3236604928,3236610047,US 3236610560,3236611071,US 3236611072,3236612095,CA -3236612096,3236617471,US -3236617728,3236617983,US +3236612096,3236613119,US +3236613120,3236613375,CA +3236613376,3236617983,US 3236617984,3236619775,CA 3236619776,3236620031,US 3236620032,3236620287,AU @@ -70295,7 +71808,7 @@ 3236623616,3236623871,AU 3236623872,3236625919,US 3236625920,3236626175,CA -3236626432,3236638719,US +3236626176,3236638719,US 3236638720,3236642815,BB 3236642816,3236659199,US 3236659200,3236691967,CA @@ -70329,9 +71842,9 @@ 3236787968,3236788223,JP 3236788224,3236788479,US 3236788480,3236789503,GB -3236789504,3236823039,US -3236823040,3236826111,CH -3236826112,3236827135,CA +3236789504,3236823295,US +3236823296,3236825855,CH +3236825856,3236827135,CA 3236827136,3236828415,US 3236828416,3236828671,A1 3236828672,3236958207,US @@ -70395,14 +71908,13 @@ 3237325056,3237325311,NL 3237325312,3237325823,US 3237325824,3237326079,CA -3237326080,3237328127,US -3237328384,3237328639,US +3237326080,3237328639,US 3237328640,3237328895,CA 3237328896,3237329151,US 3237329152,3237329407,NZ 3237329664,3237330943,US 3237330944,3237331199,AU -3237331456,3237331711,US +3237331200,3237331711,US 3237331968,3237332223,AU 3237332224,3237335039,US 3237335040,3237335295,AU @@ -70419,7 +71931,9 @@ 3237346304,3237366015,US 3237366016,3237366271,AU 3237366272,3237412863,US -3237412864,3237415935,GB +3237412864,3237413119,CA +3237413120,3237415679,GB +3237415680,3237415935,US 3237415936,3237416959,CA 3237416960,3237478399,US 3237478400,3237511167,LK @@ -70441,7 +71955,7 @@ 3237613568,3237614591,CA 3237614592,3237615615,US 3237615616,3237616895,CA -3237617152,3237622015,US +3237616896,3237622015,US 3237622016,3237622271,AP 3237622272,3237634601,US 3237634602,3237634603,EU @@ -70449,7 +71963,9 @@ 3237647104,3237647359,AU 3237647360,3237655039,US 3237655040,3237655551,IN -3237655552,3237681663,US +3237655552,3237675007,US +3237675008,3237675263,CA +3237675264,3237681663,US 3237681664,3237682943,CA 3237682944,3237684991,US 3237684992,3237685247,CL @@ -70470,6 +71986,7 @@ 3237725184,3237725439,CA 3237725440,3237725695,US 3237725696,3237726207,CA +3237726208,3237726463,US 3237726464,3237726719,AU 3237726720,3237726975,GH 3237726976,3237727231,US @@ -70501,7 +72018,7 @@ 3237870592,3237870847,DE 3237870848,3237870975,KR 3237870976,3237871103,JP -3237871104,3237871231,PH +3237871104,3237871231,TH 3237871232,3237871359,TW 3237871360,3237871487,SG 3237871488,3237871615,MY @@ -72712,7 +74229,6 @@ 3244919296,3244919551,SE 3244919552,3244919807,DE 3244919808,3244920063,RO -3244920064,3244920319,RU 3244920320,3244920575,SK 3244920576,3244920831,PL 3244920832,3244921087,NL @@ -73689,7 +75205,11 @@ 3248624384,3248624639,US 3248624640,3248624895,DK 3248624896,3248625151,AP -3248625152,3248719871,DK +3248625152,3248626175,DK +3248626176,3248626176,EU +3248626177,3248626190,DK +3248626191,3248626191,US +3248626192,3248719871,DK 3248719872,3248720127,EU 3248720128,3248748543,DK 3248748544,3248748573,EU @@ -74331,9 +75851,7 @@ 3250748416,3250749439,UA 3250749440,3250749695,GH 3250749696,3250749951,EU -3250750464,3250750537,FR -3250750538,3250750541,EU -3250750542,3250751487,FR +3250750464,3250751487,FR 3250751488,3250751743,DE 3250752000,3250752511,CH 3250752512,3250753023,BG @@ -74440,7 +75958,6 @@ 3251151360,3251151615,DE 3251151872,3251152127,NL 3251152128,3251152639,RO -3251152640,3251152895,UA 3251152896,3251153151,RU 3251153408,3251153663,TR 3251153664,3251153919,FR @@ -74663,7 +76180,9 @@ 3251272448,3251272703,AT 3251272704,3251272959,DE 3251272960,3251273471,FR -3251273472,3251290111,DE +3251273472,3251286015,DE +3251286016,3251288063,US +3251288064,3251290111,SG 3251290112,3251302399,GB 3251302400,3251306239,LI 3251306240,3251306495,EU @@ -75312,11 +76831,17 @@ 3253767676,3253767679,DE 3253767680,3253767711,GB 3253767712,3253767743,DE -3253767744,3253770983,GB +3253767744,3253768565,GB +3253768566,3253768566,DE +3253768567,3253770983,GB 3253770984,3253770984,DE 3253770985,3253771199,GB 3253771200,3253771263,IE -3253771264,3253773055,GB +3253771264,3253772063,GB +3253772064,3253772095,DE +3253772096,3253772191,GB +3253772192,3253772207,DE +3253772208,3253773055,GB 3253773056,3253773311,DE 3253773312,3253796863,GB 3253796864,3253862399,SE @@ -76032,7 +77557,6 @@ 3255615488,3255623679,DE 3255623680,3255631871,BG 3255631872,3255659519,NL -3255659776,3255660031,NL 3255660288,3255660543,GR 3255660544,3255666175,NL 3255666432,3255666687,DE @@ -77987,7 +79511,6 @@ 3264660992,3264661503,CH 3264661504,3264662015,GB 3264662016,3264662527,RU -3264662528,3264663039,UA 3264663040,3264663551,PL 3264663552,3264664063,NL 3264664064,3264664575,DE @@ -79183,7 +80706,6 @@ 3270980864,3270981631,RU 3270981632,3270981887,IT 3270981888,3270982143,AT -3270982144,3270982399,RU 3270982400,3270982655,TR 3270982656,3270982911,UA 3270982912,3270983167,DK @@ -79490,8 +81012,8 @@ 3272217152,3272217215,EU 3272217216,3272217279,BE 3272217280,3272217303,DE -3272217304,3272217319,BE -3272217320,3272217343,EU +3272217304,3272217327,BE +3272217328,3272217343,EU 3272217344,3272217599,GB 3272217600,3272217631,CH 3272217632,3272217855,EU @@ -80916,7 +82438,6 @@ 3275510400,3275510463,NL 3275510464,3275510527,GB 3275510528,3275510559,PL -3275510560,3275510591,DE 3275510592,3275510623,CY 3275510624,3275510655,EE 3275510656,3275510687,FR @@ -81472,7 +82993,9 @@ 3276876384,3276876415,NL 3276876416,3276880427,GB 3276880428,3276880431,DK -3276880432,3276882047,GB +3276880432,3276881811,GB +3276881812,3276881815,FR +3276881816,3276882047,GB 3276882048,3276882687,IT 3276882688,3276883077,GB 3276883078,3276883078,IT @@ -81480,7 +83003,9 @@ 3276883712,3276883839,IT 3276883840,3276886363,GB 3276886364,3276886367,DE -3276886368,3276890175,GB +3276886368,3276886649,GB +3276886650,3276886650,DE +3276886651,3276890175,GB 3276890176,3276890191,US 3276890192,3276892159,GB 3276892160,3276893183,IT @@ -81518,7 +83043,9 @@ 3276912880,3276912895,IT 3276912896,3276917231,GB 3276917232,3276917247,FR -3276917248,3276919375,GB +3276917248,3276919061,GB +3276919062,3276919062,DE +3276919063,3276919375,GB 3276919376,3276919391,DE 3276919392,3276919471,GB 3276919472,3276919479,DE @@ -81690,11 +83217,10 @@ 3277374464,3277375999,RU 3277376000,3277376511,NL 3277376512,3277377023,RO -3277377024,3277378559,RU +3277377024,3277378047,RU 3277378560,3277379071,HR 3277379072,3277379583,UZ 3277379584,3277380095,RS -3277380096,3277380607,RO 3277380608,3277381119,RU 3277381120,3277381631,KW 3277381632,3277382143,RU @@ -83046,7 +84572,9 @@ 3284016384,3284016639,CH 3284016640,3284017151,DK 3284017152,3284025343,GR -3284025344,3284028287,GB +3284025344,3284028139,GB +3284028140,3284028143,US +3284028144,3284028287,GB 3284028288,3284028319,US 3284028320,3284029183,GB 3284029184,3284029199,US @@ -83055,7 +84583,9 @@ 3284030480,3284030495,FR 3284030496,3284030615,GB 3284030616,3284030623,SE -3284030624,3284033535,GB +3284030624,3284030991,GB +3284030992,3284031007,FR +3284031008,3284033535,GB 3284033536,3284041727,RU 3284041728,3284041983,DK 3284041984,3284042239,SI @@ -83302,7 +84832,6 @@ 3285098496,3285114879,GB 3285114880,3285115903,RU 3285115904,3285116415,SI -3285116416,3285116927,CZ 3285116928,3285117439,UA 3285117952,3285118463,FR 3285118464,3285118975,UA @@ -83612,7 +85141,9 @@ 3285964800,3285964935,DE 3285964936,3285965055,EU 3285965056,3285965567,DE -3285965568,3285975039,EU +3285965568,3285968895,EU +3285968896,3285970943,GB +3285970944,3285975039,EU 3285975040,3286013695,FR 3286013696,3286013951,RE 3286013952,3286106111,FR @@ -83721,7 +85252,6 @@ 3286423808,3286424063,CZ 3286424064,3286424319,LV 3286424320,3286424575,FR -3286424576,3286424831,UA 3286424832,3286425087,TR 3286425088,3286425343,RU 3286425344,3286425599,IT @@ -83988,7 +85518,6 @@ 3287444480,3287444991,PL 3287445504,3287446527,UA 3287446528,3287447039,PL -3287447040,3287447551,IL 3287447552,3287448063,DK 3287448064,3287448575,GB 3287448576,3287449087,PL @@ -84536,6 +86065,8 @@ 3289212928,3289213183,ZM 3289213184,3289213439,TZ 3289213440,3289213951,ZA +3289213952,3289214207,MA +3289214208,3289214463,AO 3289214976,3289215231,NG 3289215232,3289217279,ZA 3289217280,3289217535,KE @@ -84558,6 +86089,7 @@ 3289233920,3289234175,TZ 3289234176,3289235199,ZA 3289235200,3289235455,KE +3289235456,3289237503,GH 3289237504,3289237759,ZA 3289238528,3289238783,AO 3289238784,3289239039,ZA @@ -84573,8 +86105,10 @@ 3289248768,3289249023,EG 3289249024,3289249279,NG 3289249280,3289250815,ZA +3289250816,3289251071,GH 3289251072,3289251327,EG 3289251328,3289251583,ZA +3289251584,3289251839,KE 3289251840,3289319423,ZA 3289319424,3289319679,A2 3289319680,3289319935,ZA @@ -84652,6 +86186,7 @@ 3290423296,3290427391,NA 3290427392,3290431487,ZA 3290431488,3290433535,JM +3290435584,3290439679,DZ 3290439680,3290447871,TT 3290447872,3290456063,AR 3290456064,3290460159,MZ @@ -84849,6 +86384,7 @@ 3300925440,3300929535,MG 3300933632,3300950015,MU 3300953088,3300954111,MU +3300954112,3300958207,NG 3300966400,3301113855,ZA 3301113856,3301138431,NG 3301138432,3301140479,ZA @@ -84904,6 +86440,7 @@ 3301474304,3301490687,MA 3301490688,3301494783,ZA 3301494784,3301498879,ZM +3301502976,3301507071,MA 3301507328,3301507583,MU 3301507584,3301507839,GH 3301507840,3301508095,EG @@ -84993,6 +86530,7 @@ 3302545408,3302545919,CD 3302545920,3302546431,TZ 3302546432,3302546943,SL +3302546944,3302547455,KE 3302548480,3302548991,GH 3302548992,3302549503,ZA 3302549504,3302550015,KE @@ -85614,6 +87152,7 @@ 3325131776,3325132031,AU 3325132032,3325132799,US 3325132800,3325133823,CO +3325133824,3325134335,BR 3325134336,3325136127,US 3325136128,3325136383,CA 3325136384,3325142015,US @@ -85986,8 +87525,7 @@ 3330640896,3330641151,CH 3330641152,3330646527,US 3330646528,3330647295,CA -3330647296,3330647807,US -3330648064,3330649599,US +3330647296,3330649599,US 3330649600,3330649855,CA 3330649856,3330662911,US 3330662912,3330663167,GB @@ -86119,6 +87657,7 @@ 3332492032,3332500735,CA 3332500736,3332500991,US 3332500992,3332501247,CA +3332501248,3332501503,US 3332501504,3332503039,CA 3332503040,3332503551,US 3332503552,3332505343,CA @@ -86175,8 +87714,8 @@ 3332876288,3332882431,US 3332882432,3332890623,KN 3332890624,3332897279,US -3332897280,3332898559,CA -3332898560,3332899071,US +3332897280,3332898815,CA +3332898816,3332899071,US 3332899072,3332906495,CA 3332906496,3332909567,US 3332909568,3332922879,CA @@ -86272,7 +87811,9 @@ 3334007552,3334007807,EU 3334007808,3334020095,US 3334020096,3334021119,CA -3334021120,3334138623,US +3334021120,3334068479,US +3334068480,3334068735,CA +3334068736,3334138623,US 3334138624,3334138879,BM 3334138880,3334187775,US 3334187776,3334188031,BM @@ -86527,7 +88068,11 @@ 3338935040,3338935295,GB 3338935296,3338964991,US 3338964992,3338965247,CA -3338965248,3339075583,US +3338965248,3338976767,US +3338976768,3338977023,CA +3338977024,3338993407,US +3338993408,3338993663,CA +3338993664,3339075583,US 3339075584,3339076863,GB 3339076864,3339077631,JP 3339077632,3339077887,SG @@ -86570,11 +88115,13 @@ 3339261952,3339263999,HK 3339264000,3339327999,US 3339328512,3339329535,CA -3339329536,3339337727,US -3339337984,3339338239,US +3339329536,3339338239,US 3339338240,3339338495,CA -3339338496,3339669503,US +3339338496,3339342847,US +3339342848,3339343103,CA +3339343104,3339669503,US 3339669504,3339671807,CA +3339671808,3339672063,US 3339672576,3339679487,US 3339679488,3339679743,CN 3339679744,3339707391,US @@ -86646,7 +88193,9 @@ 3340677120,3340679167,CA 3340679168,3340694783,US 3340694784,3340695039,CA -3340695040,3340852479,US +3340695040,3340851455,US +3340851456,3340851711,CA +3340851712,3340852479,US 3340852736,3340853247,CA 3340853248,3340857343,US 3340857344,3340858367,CA @@ -86698,9 +88247,10 @@ 3341518848,3341520895,CA 3341520896,3341521663,US 3341521664,3341531135,CA -3341531136,3341534207,US -3341534976,3341537279,CA -3341537280,3341546239,US +3341531136,3341533951,US +3341533952,3341534207,CA +3341534976,3341536767,CA +3341536768,3341546239,US 3341546240,3341547007,CA 3341547008,3341547519,CH 3341547520,3341549567,CA @@ -87184,7 +88734,9 @@ 3351043584,3351044095,CA 3351044096,3351047167,US 3351047168,3351047679,A1 -3351047680,3351071743,US +3351047680,3351058943,US +3351058944,3351059455,CA +3351059456,3351071743,US 3351071744,3351072767,CA 3351072768,3351074815,US 3351074816,3351076863,CA @@ -87321,6 +88873,7 @@ 3351441408,3351441919,US 3351441920,3351442175,CA 3351442176,3351474687,US +3351474688,3351475199,CA 3351475200,3351475711,US 3351475712,3351475967,IS 3351475968,3351483391,US @@ -87395,7 +88948,9 @@ 3352563200,3352563455,US 3352563456,3352573951,CA 3352573952,3352574463,US -3352574464,3352583935,CA +3352574464,3352581631,CA +3352581632,3352582143,US +3352582144,3352583935,CA 3352583936,3352584191,US 3352584192,3352591359,CA 3352591360,3352591615,US @@ -87487,12 +89042,11 @@ 3354955776,3354956031,AR 3354956032,3354972159,US 3354972160,3354972415,CA -3354972416,3355013119,US -3355013120,3355017215,CA +3354972416,3355012607,US +3355012608,3355017215,CA 3355017216,3355052287,US 3355052288,3355053311,CA -3355053312,3355053567,US -3355054080,3355249151,US +3355053312,3355249151,US 3355249152,3355249663,CA 3355249664,3355260927,US 3355260928,3355262719,CA @@ -87724,7 +89278,9 @@ 3355918336,3355923455,EC 3355923456,3355924479,UY 3355924480,3355926527,TT -3355926528,3355930623,PA +3355926528,3355927039,NL +3355927040,3355928063,US +3355928064,3355930623,PA 3355930624,3355934719,BR 3355934720,3355939839,AR 3355939840,3355940863,SR @@ -87749,30 +89305,31 @@ 3356052480,3356053247,BR 3356053248,3356054015,CL 3356054016,3356054527,US -3356054528,3356057599,BR +3356054528,3356056575,BR +3356056832,3356057087,BR +3356057088,3356057343,CO +3356057344,3356057599,BR 3356057600,3356057855,EC 3356057856,3356059135,CL 3356059136,3356060671,BR 3356060672,3356061695,CL 3356061696,3356062463,BR 3356062464,3356062719,JM -3356062720,3356062975,BR -3356062976,3356063231,CR -3356063232,3356063743,BR +3356062720,3356063743,CR 3356064000,3356064255,BR 3356064256,3356064511,CL -3356064768,3356065791,BR +3356064512,3356065791,BR 3356065792,3356066047,CL 3356066048,3356069119,BR 3356069120,3356069631,CL -3356069888,3356070143,BR +3356069632,3356070143,BR 3356070144,3356070655,CL 3356070656,3356070911,AR 3356070912,3356071423,BR 3356071424,3356072447,CL 3356073216,3356073471,AR -3356073472,3356075007,BR -3356075008,3356076287,BO +3356073472,3356075263,BR +3356075264,3356076287,BO 3356076288,3356078079,BR 3356078080,3356078335,EC 3356078336,3356079359,CL @@ -88034,6 +89591,7 @@ 3357007872,3357011967,BR 3357011968,3357016063,MX 3357016064,3357018623,CO +3357018624,3357019135,BR 3357019136,3357020159,CL 3357020160,3357032447,CO 3357032448,3357040639,BR @@ -88987,11 +90545,13 @@ 3367840768,3367841791,HN 3367841792,3368052991,BR 3368052992,3368053247,PE -3368053760,3368086015,BR +3368053760,3368086527,BR 3368086528,3368087551,CR 3368087552,3368157183,BR 3368157184,3368173567,MX -3368173568,3370188799,BR +3368173568,3368601799,BR +3368601800,3368601800,A1 +3368601801,3370188799,BR 3370188800,3370196991,MX 3370196992,3370214399,BR 3370214400,3370215423,AR @@ -89063,7 +90623,9 @@ 3380833792,3380834303,SV 3380834304,3380834815,MX 3380834816,3380835071,CO +3380835072,3380835327,NI 3380835328,3380835839,MX +3380835840,3380836351,AR 3380836352,3380836607,MX 3380836608,3380836863,PE 3380836864,3380837375,SV @@ -89837,7 +91399,9 @@ 3391094784,3391192063,JP 3391192064,3391192319,AP 3391192320,3391356927,JP -3391356928,3391444479,NZ +3391356928,3391441407,NZ +3391441408,3391441663,PH +3391441664,3391444479,NZ 3391444480,3391444991,VN 3391444992,3391453183,NZ 3391453184,3391453439,ID @@ -91215,7 +92779,6 @@ 3398684672,3398688767,JP 3398688768,3398705151,ID 3398705152,3398709247,CN -3398709248,3398711295,AU 3398713344,3398729727,CN 3398729728,3398737919,AU 3398737920,3398742015,SG @@ -91420,7 +92983,9 @@ 3399999488,3400000475,SG 3400000476,3400000479,US 3400000480,3400000487,AU -3400000488,3400006143,SG +3400000488,3400002303,SG +3400002304,3400002367,HK +3400002368,3400006143,SG 3400006144,3400006399,AP 3400006400,3400007679,SG 3400007680,3400024063,AU @@ -91552,7 +93117,9 @@ 3400648816,3400648831,HK 3400648832,3400649943,SG 3400649944,3400649951,HK -3400649952,3400650409,SG +3400649952,3400650143,SG +3400650144,3400650159,HK +3400650160,3400650409,SG 3400650410,3400650410,AU 3400650411,3400650751,SG 3400650752,3400654847,AU @@ -92072,7 +93639,8 @@ 3406737408,3406737663,ID 3406737664,3406739199,AU 3406739200,3406739455,ID -3406739456,3406741503,HK +3406739456,3406740991,HK +3406740992,3406741503,SG 3406741504,3406741759,CN 3406741760,3406742015,AU 3406742016,3406742527,CN @@ -93119,8 +94687,8 @@ 3409455104,3409455359,CN 3409455360,3409456639,AU 3409456640,3409456895,CN -3409456896,3409457151,AU -3409457152,3409459199,HK +3409456896,3409457152,AU +3409457153,3409459199,HK 3409459200,3409462271,AU 3409462272,3409462783,CN 3409462784,3409465855,AU @@ -93288,7 +94856,6 @@ 3410903040,3410911231,HK 3410911232,3410915327,TH 3410915328,3410919423,ID -3410919424,3410923519,IN 3410927616,3410931711,NP 3410931712,3410935807,TW 3410935808,3410939903,MY @@ -93322,7 +94889,8 @@ 3411051008,3411051263,PK 3411051264,3411051519,SG 3411051520,3411052543,CN -3411052544,3411054591,HK +3411052544,3411052544,JP +3411052545,3411054591,HK 3411054592,3411058687,CN 3411058688,3411062783,AU 3411062784,3411064831,HK @@ -93470,7 +95038,9 @@ 3411857408,3411859249,JP 3411859250,3411859251,AU 3411859252,3411859711,JP -3411859712,3411860223,AP +3411859712,3411859815,AP +3411859816,3411859816,CN +3411859817,3411860223,AP 3411860224,3411861503,JP 3411861504,3411869695,AU 3411869696,3411943423,CN @@ -94171,7 +95741,6 @@ 3418273792,3418275839,ID 3418275840,3418279935,AU 3418279936,3418281983,NZ -3418281984,3418282239,IN 3418282240,3418282495,AU 3418282496,3418283519,PH 3418283520,3418284031,AU @@ -94393,7 +95962,7 @@ 3420032256,3420032511,AU 3420032512,3420033023,NZ 3420033024,3420034047,IN -3420034048,3420036095,AU +3420034048,3420035071,AU 3420036096,3420037119,JP 3420037120,3420037631,AU 3420039168,3420040191,KH @@ -94416,7 +95985,9 @@ 3420366960,3420366975,KR 3420366976,3420367359,AU 3420367360,3420367615,AP -3420367616,3420370559,AU +3420367616,3420369007,AU +3420369008,3420369023,HK +3420369024,3420370559,AU 3420370560,3420370575,JP 3420370576,3420372991,AU 3420372992,3420374527,HK @@ -95310,7 +96881,11 @@ 3448987648,3448989695,IN 3448989696,3448990719,HK 3448990720,3448991743,IN -3448991744,3449159679,US +3448991744,3449098751,US +3449098752,3449099263,DE +3449099264,3449100799,US +3449100800,3449101311,AU +3449101312,3449159679,US 3449159680,3449160703,CA 3449160704,3449161471,US 3449161472,3449163519,CA @@ -95838,8 +97413,8 @@ 3454664448,3454672895,US 3454672896,3454681087,CA 3454681088,3454727935,US -3454727936,3454727951,JP -3454727952,3454730239,US +3454727936,3454728191,JP +3454728192,3454730239,US 3454730240,3454732287,EC 3454732288,3454796031,US 3454796032,3454808831,CA @@ -96180,8 +97755,10 @@ 3459620864,3459622911,US 3459624960,3459629055,BM 3459629056,3459686399,US -3459686400,3459688447,NL -3459688448,3459731455,US +3459686400,3459688479,NL +3459688480,3459689215,US +3459689216,3459689471,NL +3459689472,3459731455,US 3459731456,3459735551,CA 3459735552,3459745535,US 3459745536,3459745791,IT @@ -96477,7 +98054,7 @@ 3464171776,3464172031,US 3464172032,3464173567,CA 3464173568,3464173823,US -3464173824,3464174591,CA +3464173824,3464175103,CA 3464175104,3464175359,US 3464175360,3464180735,CA 3464180736,3464200703,US @@ -96633,7 +98210,9 @@ 3466938812,3466958079,US 3466958080,3466958335,CA 3466958336,3467051007,US -3467051008,3467116543,CA +3467051008,3467068927,CA +3467068928,3467069439,US +3467069440,3467116543,CA 3467116544,3467378687,US 3467378688,3467444223,CA 3467444224,3467554815,US @@ -96767,7 +98346,9 @@ 3469186304,3469186559,MX 3469186560,3469893631,US 3469893632,3469901823,CA -3469901824,3470131199,US +3469901824,3469989887,US +3469989888,3469990399,CA +3469990400,3470131199,US 3470131200,3470135295,AG 3470135296,3470137343,LC 3470137344,3470139391,VG @@ -96931,9 +98512,7 @@ 3476545536,3476547583,A2 3476547584,3476881407,US 3476881408,3476946943,CA -3476946944,3477312511,US -3477312512,3477312767,A1 -3477312768,3478114303,US +3476946944,3478114303,US 3478114304,3478118399,PE 3478118400,3478192127,US 3478192128,3478257663,CA @@ -97091,7 +98670,9 @@ 3481843456,3481843711,GB 3481843712,3481958271,US 3481958272,3481958399,NL -3481958400,3481964575,US +3481958400,3481959020,US +3481959021,3481959021,GB +3481959022,3481964575,US 3481964576,3481964579,IE 3481964580,3481993791,US 3481993792,3481993799,CA @@ -97971,7 +99552,9 @@ 3495375872,3495376895,CA 3495376896,3495399423,US 3495399424,3495400447,KN -3495400448,3495412735,US +3495400448,3495406335,US +3495406336,3495406591,LB +3495406592,3495412735,US 3495412736,3495413759,CA 3495413760,3495429119,US 3495429120,3495430143,CA @@ -98626,7 +100209,9 @@ 3510268928,3510269951,US 3510269952,3510270719,LY 3510270720,3510270975,SY -3510270976,3510321151,US +3510270976,3510284298,US +3510284299,3510284299,SG +3510284300,3510321151,US 3510321152,3510321663,VG 3510321664,3510321919,AG 3510321920,3510322175,KN @@ -98891,10 +100476,7 @@ 3515222272,3515224831,TR 3515224832,3515301887,US 3515301888,3515318271,CA -3515318272,3515326463,US -3515334656,3515339519,US -3515339520,3515339775,A1 -3515339776,3515358975,US +3515318272,3515358975,US 3515358976,3515359231,MX 3515359232,3515596799,US 3515596800,3515613183,CA @@ -99479,9 +101061,9 @@ 3534758976,3534759039,PH 3534759040,3534759167,AU 3534759168,3534759183,JP -3534759184,3534760703,AU -3534760704,3534760711,NZ -3534760712,3534761983,AU +3534759184,3534760447,AU +3534760448,3534760959,NZ +3534760960,3534761983,AU 3534761984,3534763775,HK 3534763776,3534764031,AP 3534764032,3534863443,HK @@ -99931,7 +101513,9 @@ 3559153664,3559178239,GB 3559178240,3559186431,LB 3559186432,3559194623,RU -3559194624,3559202815,SE +3559194624,3559200255,SE +3559200256,3559200511,FI +3559200512,3559202815,SE 3559202816,3559211007,DE 3559211008,3559219199,SK 3559219200,3559227391,SE @@ -100035,7 +101619,8 @@ 3559940096,3559948287,DE 3559948288,3559956479,RU 3559956480,3559964671,IT -3559964672,3559981055,RU +3559964672,3559976959,RU +3559976960,3559981055,HU 3559981056,3559989247,EE 3559989248,3559997439,PL 3559997440,3560005631,KE @@ -102288,7 +103873,9 @@ 3583410176,3583418367,SE 3583418368,3583426559,TN 3583426560,3583428607,CV -3583428608,3583434751,CI +3583428608,3583430655,CI +3583430656,3583432703,ZA +3583432704,3583434751,CI 3583434752,3583442943,AT 3583442944,3583451135,RU 3583451136,3583459327,IL @@ -102588,12 +104175,32 @@ 3585597440,3585605631,RU 3585605632,3585613823,PL 3585613824,3585622015,EE -3585630208,3585638399,IL +3585630208,3585632255,IL +3585632256,3585632511,GB +3585632512,3585632639,NL +3585632640,3585632767,IL +3585632768,3585633535,GB +3585633536,3585634047,IT +3585634048,3585634303,IL +3585634304,3585634559,IT +3585634560,3585634687,IL +3585634688,3585634815,NL +3585634816,3585635071,IT +3585635072,3585635199,NL +3585635200,3585635455,IL +3585635456,3585635711,NL +3585635712,3585635967,IL +3585635968,3585636095,NL +3585636096,3585637375,IL +3585637376,3585637503,NL +3585637504,3585638399,IL 3585638400,3585646591,RU 3585646592,3585654783,SA 3585654784,3585662975,NO 3585662976,3585671167,BY -3585671168,3585679359,SE +3585671168,3585675306,SE +3585675307,3585675307,DK +3585675308,3585679359,SE 3585679360,3585687551,FI 3585687552,3585695743,DE 3585695744,3585703935,A2 @@ -102726,11 +104333,15 @@ 3586680512,3586680519,GB 3586680520,3586681471,FR 3586681472,3586681487,GB -3586681488,3586681615,FR +3586681488,3586681527,FR +3586681528,3586681535,GB +3586681536,3586681615,FR 3586681616,3586681631,CZ 3586681632,3586682239,FR 3586682240,3586682367,US -3586682368,3586682879,FR +3586682368,3586682415,FR +3586682416,3586682423,DE +3586682424,3586682879,FR 3586682880,3586686975,US 3586686976,3586703359,SE 3586703360,3586719743,CH @@ -103068,7 +104679,9 @@ 3590234112,3590242303,GB 3590242304,3590244351,US 3590244352,3590244607,DE -3590244608,3590245311,FR +3590244608,3590245263,FR +3590245264,3590245271,GB +3590245272,3590245311,FR 3590245312,3590245439,US 3590245440,3590247048,FR 3590247049,3590247049,IT @@ -103290,7 +104903,9 @@ 3628161024,3628161279,CA 3628161280,3628179455,US 3628179456,3628187647,CA -3628187648,3628225387,US +3628187648,3628225097,US +3628225098,3628225098,AT +3628225099,3628225387,US 3628225388,3628225395,GB 3628225396,3628225779,US 3628225780,3628225783,GB @@ -104311,7 +105926,11 @@ 3641941760,3641942015,EU 3641942016,3641950207,DE 3641950208,3641954303,FR -3641954304,3641958399,MD +3641954304,3641957119,MD +3641957120,3641957631,GB +3641957632,3641957887,MD +3641957888,3641958143,GB +3641958144,3641958399,MD 3641958400,3641960447,BE 3641960448,3641960703,NL 3641960704,3641961727,BE @@ -104539,7 +106158,9 @@ 3644919808,3644923903,DE 3644923904,3644924927,IL 3644924928,3644925183,US -3644925184,3644926463,IL +3644925184,3644925439,IL +3644925440,3644925695,US +3644925696,3644926463,IL 3644926464,3644926719,US 3644926720,3644927999,IL 3644928000,3644932095,GI @@ -104603,7 +106224,7 @@ 3645202432,3645206527,CZ 3645206528,3645210623,LV 3645210624,3645214719,RU -3645214720,3645218815,NL +3645214720,3645218815,SE 3645218816,3645222911,DE 3645222912,3645227007,KW 3645227008,3645235199,RU @@ -105224,9 +106845,7 @@ 3650920458,3650920458,GB 3650920459,3650920703,FR 3650920704,3650920895,GB -3650920896,3650920897,GR -3650920898,3650920898,GB -3650920899,3650920927,GR +3650920896,3650920927,GR 3650920928,3650922799,GB 3650922800,3650922815,FR 3650922816,3650926335,GB @@ -105736,7 +107355,7 @@ 3707109376,3707174911,HK 3707174912,3707207679,JP 3707209728,3707211775,CN -3707211776,3707215871,NZ +3707211776,3707215871,ID 3707215872,3707217919,BD 3707217920,3707219967,ID 3707219968,3707222015,AU diff --git a/installer/resources/geoipv6.dat.gz b/installer/resources/geoipv6.dat.gz index 5c00c5c68..c19c99b88 100644 Binary files a/installer/resources/geoipv6.dat.gz and b/installer/resources/geoipv6.dat.gz differ diff --git a/installer/resources/hosts.txt b/installer/resources/hosts.txt index bc698afe9..34987b08f 100644 --- a/installer/resources/hosts.txt +++ b/installer/resources/hosts.txt @@ -361,3 +361,6 @@ mtn.i2p-projekt.i2p=I6Ha4I7rgR0JyExQnN~4sZz5CfRqdN7o-2t1i2YOExd2CxC4MHHz3nJ5KgBI tracker.thebland.i2p=gzBtMSRcMD6b36PmPCQWZhh30fYm2Ww2r4tRSref4N2T4~cnXK3DjJOuJwao2jRK4bZwX2Rkyjw849xrFMqaR3SdPe3-K61B~Kr9Uo1KLdm3~oahOWFmCaIlipPs-i3jdTT~721YUcYB09n4PGrDq5KZSOOBlLZKulJficO58QRUlDpva4OCCRrX9EUCoAavOciKpvKtnGwl6AiPFu8WnmEeGQ861vjdirjfkHWNp3gj9IjGuxJNcgyHi51BWYZM6il~LJTcbA4zuZn~qudHIx9uzUtO-t08yzSRrmfVwVVVru6-~BBX0ipADi9UGZjyB-PJEKKjizUPxSp2OCmiOlQ2iXpKs2j8yfjHJbn-eWKpIh4jfpNigy6AbDfzFivkvm8lt8CleYf-p3~SHdqIL0iEaacxi5BAU4Baj5yS818kPQP4hEEMMtq4WnKjl4IW64swXSg1wlVBTiKDJzzQGK20jySBuPxhEbd6sfAeirzn585g5EqeV8DLqsMfe5pZBQAEAAEAAA== opentracker.dg2.i2p=WSUjGXhqHr7TsBizCO0qV~Kk7G1-suPPSSyMs4AnLQ8wRlWWZ~9rl7AzS0tFG4Dbbl8Te0wtZmQeMhcartbJ3TY-TBnviFqA8zP-sEQf5UK0BA5zzrtpB7NnUo-65B61cVbqG51-p9cJZ~Crre0LEZm5bJs8P3J~oH3b3BJ0YXtuv0ccBgj~OAf1g8ZrHr431XLq8WPRkzAVEIDhFdiSCYAz8XTArNN7OnPUUCjZcw92Oqf9wajg0eXqnThDFbrCx54h0UKM7sVDqRnoXbuGVLTPVvmIOnwuwZrn4X60GMLW38Dg-38qSfJL61FIbn5HfK-VTjCOuC16PtvJAPS1qUBWa-Y3j3aGK3BpHQnlOl-XNB~tJU0GBzRvEnOPFbtqXw38LyTCsvXcY31C~sNC~jedATUfPSZK-UBeN6RkR5BQiXBV-YkzUvTM4s~oXXgw9WFe9DdEWP-XR9~2G1Qe-GkcRAKUXmTAzVnRjlHEDR0lLMfxDwe3OfZuBzM9Gda9AAAA i2pnews.i2p=XHS99uhrvijk3KxU438LjNf-SMXXiNXsbV8uwHFXdqsDsHPZRdc6LH-hEMGWDR5g2b65KLlSm8plFrTusR-yxBfGHtZLa9vhXCwWXXbUlBe7Ty6NlwY7GmJItBKPO09BbUa0oJ5jITjLM1mVxeHShAZs8IMlLJjYaeYycDdaUInuPrng51~ySeiiKKxHa3qJkFOuPgQQiCXqy-9Qhi7t9j16iXzWWZ5yN7XcE9i1J7UQix66ntwILTnTAYBelNbONPiSJzKq-BiXj13bI3~liBgckJGf1a1dU8lOuAemtB-XM36cUcg~LQ6iHMuxK-AE8UDQHTNma6E0TxlK5DizV34UgiJ2CxRB5n8BBrZQEvIjYOExXyt6gbopL-aer1qrL1zoIKoMbGon5P4GV~f8NyClJKHXSS2NW7FV-kZbmA0WSLAxecyBfSLStIlw01gtnb2OAQt6OkMQ693N2-L~IJMg4f1lWK4Pv0bIqJUrHZS8YyeWbb4Y~pto6hkd0kgRBQAEAAEAAA== +exchanged.i2p=rLFzsOqsfSmJZvg6xvl~ctUulYWwGaM8K~rGs-e4WXkKePTCMOpU8l6LIU-wwDOiUZ7Ve8Y-zWPBVYQjH8~~lgT-BJ81zjP5I6H051KOVaXDChdx5F99mZu0sEjnYoFX484QHsUkFc5GUypqhpv1iwWwdPL7bVNzr1fS6sIZvq7tYWEOymbnifxk2jC0BnjultNPCq1wiI2Y-G66iOHDvuLu5f7RvNGJYlpw0UYNv6g8jUu3gXYjDRMBD5OIxFUJaksfmml2CiaGjrPfXKEXBR4q1CogVruq3r~447VHb32f52aeYszcslNzQjYyFCdipnAi5JiNTFpzTZPMEglt2J3KZYB3SMCmxSLktFI7376c7mT7EbMIFFv1GrmcUy9oIyYasbb82Sec9y0nJ9ahZt0x3iGokAYekXKXq-rGPzgFeBwfuCHzQnLzm1akVyJHoGDdaG0QHJfqfW1sY3F2n1xaWrnKcqIz2ypemxVnTMFKQqm2pdG-dMsXNYiGmZtaBQAEAAcAAA== +i2pwiki.i2p=Zr1YUKIKooxymZRqLvtfSYuZggqv5txkLE8Ks~FTh3A8JDmhOV8C82dUBKJhzst~Pcbqz7rXc~TPyrqasaQ~LioAji~WLSs8PpmCLVF83edhYpx75Fp23ELboEszHduhKWuibVchPLNa-6nP4F0Ttcr4krTlphe3KveNfZDAbm511zFFlNzPcY4PqOdCRBrp7INiWkVwQxwGWO7jiNYTYa5x4QXJmxIN1YOiNRYQST7THz1aV6219ThsfT9FE5JtiX-epli6PF5ZX9TcVSjHUKZnr8uJLXfh5T4RMVNe1n~KXutMUZwxpFE0scOIez9vhDFd7t0HPIsQUsv7MUBzrz4FM9qol7UUPueSGDRgTOOfXMfj4BDsouiWQC4GcSmH3SflR0Ith9QWKC4u3XYvB7Tw-70QWBEV53hUo6I8YKidV13WgeN9JI3KWTYkMyX-TYjmY9y2q6Xd-Maszv4Tb~NzxQs9CNdu0W-JRSUFOqzgt3l4cx0K1pmx4p0tM5dLBQAEAAEAAA== +lenta.i2p=DnW8NqbKilYLcIx5g5CG4mWVHkzrCkl0MbV4a5rGJku4BSs7HjvzjZpCoXWFky9JCUlHzjFotMETxQBhaKl0Q46vu-plKQ4BLnYyo45p7j2lTiejWvV4SDuXU4IAdmug27i~Jl4N44zwe9KYy~gMfY1Vsgv4bH9ov7X7l2iS-bycfcd9nE7JfycwFc4e0XU-dx7xf~tHw7I5--25dp-SsRX3-UYz4ygb58aD8UsKfQaFZtMy4x~Z1ufNEftuekb1HH9g2Rhhq8Bl62ad8PWSDa9Ne-SkCQsqTYjrCsvMY2DMvWgmZxI1hJYqzjRdFV6JEprrr~CJgHGJXr~KdnZhX12Vm4bKisZK847wBm42CoBQBT5HRzDkeflkbsliirRuKSUxVYMoZ1vic~avPZZl~pvIKZsz-YtiKha4vjCNE1zD-tHIS~2qq4uEO546Ol9pNokPaNttV6r7D2-zurEDx~9grJ8LhBozTxtdTdfZv2OqN4bVhrE7xUrxe0flIFKEAAAA diff --git a/installer/resources/locale/bundle-messages.sh b/installer/resources/locale/bundle-messages.sh index d49b553b0..ce5704d7e 100755 --- a/installer/resources/locale/bundle-messages.sh +++ b/installer/resources/locale/bundle-messages.sh @@ -24,7 +24,7 @@ if which find|grep -q -i windows ; then export PATH=.:/bin:/usr/local/bin:$PATH fi # Fast mode - update ondemond -# set LG2 to the language you need in envrionment varibales to enable this +# set LG2 to the language you need in environment variables to enable this JPATHS=".." for i in po/messages_*.po diff --git a/installer/resources/man/eepget.1 b/installer/resources/man/eepget.1 index 8e4a4e3c4..c24e0fe0c 100644 --- a/installer/resources/man/eepget.1 +++ b/installer/resources/man/eepget.1 @@ -1,4 +1,4 @@ -.TH EEEPGET 1 "February 5, 2014" "" "Eepget - I2P Downloader" +.TH EEEPGET 1 "September 18, 2015" "" "Eepget - I2P Downloader" .SH NAME Eepget \- I2P downloader @@ -15,7 +15,7 @@ regular Internet are supported. .P Eepget is able to cope with slow or unstable network connections; if a download is not successful because of a network problem, it will keep retrying until the -whole file has been retrieved (by default up to three times). If supported by +whole file has been retrieved (if the -n option is set). If supported by the remote server, eepget will instruct the server to continue the download from the point of interruption. @@ -53,7 +53,7 @@ Controls the progress display. \fB\ markSize \fP is the number of bytes one '#' .B \fB\-n\fR retries .TP -Specify the number of times to retry downloading if the download isn't successful. If this option is not specified, eepget will retry downloading the file 5 times. +Specify the number of times to retry downloading if the download isn't successful. If this option is not specified, eepget will not retry. .TP .B diff --git a/installer/resources/themes/console/images/exchanged.png b/installer/resources/themes/console/images/exchanged.png new file mode 100644 index 000000000..0e72a2c8e Binary files /dev/null and b/installer/resources/themes/console/images/exchanged.png differ diff --git a/installer/resources/themes/console/light/console.css b/installer/resources/themes/console/light/console.css index 463b8e1df..24e34751e 100644 --- a/installer/resources/themes/console/light/console.css +++ b/installer/resources/themes/console/light/console.css @@ -250,8 +250,12 @@ div.newsheadings { div.newsheadings li { list-style: none outside url('images/newsbullet_mini.png'); - margin: 0 -4px 2px 8px; - line-height: 140%; + margin: 4px -4px 2px 10px; + line-height: 120%; +} + +div.newsheadings li:first-child { + margin-top: 0; } div.tunnels { diff --git a/installer/resources/themes/snark/ubergine/snark.css b/installer/resources/themes/snark/ubergine/snark.css index f2e09b4f9..facb2fae5 100644 --- a/installer/resources/themes/snark/ubergine/snark.css +++ b/installer/resources/themes/snark/ubergine/snark.css @@ -656,12 +656,6 @@ input.add { min-height: 22px; } -input.create { - background: #989 url('images/create.png') no-repeat 2px center; - padding: 2px 3px 2px 20px !important; - min-height: 22px; -} - input.cancel { background: #989 url('../../console/images/cancel.png') no-repeat 2px center; padding: 2px 3px 2px 20px !important; @@ -686,6 +680,18 @@ input.reload { min-height: 22px; } +input.starttorrent { + background: #989 url('images/start.png') no-repeat 2px center; + padding: 2px 3px 2px 20px !important; + min-height: 22px; +} + +input.stoptorrent { + background: #989 url('images/stop.png') no-repeat 2px center; + padding: 2px 3px 2px 20px !important; + min-height: 22px; +} + select { background: #333; background: url('/themes/snark/ubergine/images/graytile.png') !important; diff --git a/installer/resources/themes/snark/vanilla/snark.css b/installer/resources/themes/snark/vanilla/snark.css index ddbcd8e8c..b5ab1155b 100644 --- a/installer/resources/themes/snark/vanilla/snark.css +++ b/installer/resources/themes/snark/vanilla/snark.css @@ -694,6 +694,18 @@ input.reload { min-height: 22px; } +input.starttorrent { + background: #f3efc7 url('images/start.png') no-repeat 2px center; + padding: 2px 3px 2px 20px !important; + min-height: 22px; +} + +input.stoptorrent { + background: #f3efc7 url('images/stop.png') no-repeat 2px center; + padding: 2px 3px 2px 20px !important; + min-height: 22px; +} + select { background: #fff; /* background: url('/themes/snark/ubergine/images/graytile.png') !important;*/ diff --git a/router/java/src/net/i2p/data/router/RouterAddress.java b/router/java/src/net/i2p/data/router/RouterAddress.java index ca0f94d08..e7cd0d684 100644 --- a/router/java/src/net/i2p/data/router/RouterAddress.java +++ b/router/java/src/net/i2p/data/router/RouterAddress.java @@ -17,6 +17,8 @@ import java.util.Date; import java.util.Map; import java.util.Properties; +import org.apache.http.conn.util.InetAddressUtils; + import net.i2p.data.DataFormatException; import net.i2p.data.DataHelper; import net.i2p.data.DataStructureImpl; @@ -219,8 +221,8 @@ public class RouterAddress extends DataStructureImpl { if (host != null) { rv = Addresses.getIP(host); if (rv != null && - (host.replaceAll("[0-9\\.]", "").length() == 0 || - host.replaceAll("[0-9a-fA-F:]", "").length() == 0)) { + (InetAddressUtils.isIPv4Address(host) || + InetAddressUtils.isIPv6Address(host))) { _ip = rv; } } diff --git a/router/java/src/net/i2p/data/router/RouterInfo.java b/router/java/src/net/i2p/data/router/RouterInfo.java index 24667108e..0d60c6dc0 100644 --- a/router/java/src/net/i2p/data/router/RouterInfo.java +++ b/router/java/src/net/i2p/data/router/RouterInfo.java @@ -339,7 +339,7 @@ public class RouterInfo extends DatabaseEntry { // WARNING this sort algorithm cannot be changed, as it must be consistent // network-wide. The signature is not checked at readin time, but only // later, and the hashes are stored in a Set, not a List. - peers = (Collection) SortHelper.sortStructures(peers); + peers = SortHelper.sortStructures(peers); for (Hash peerHash : peers) { peerHash.writeBytes(out); } diff --git a/router/java/src/net/i2p/data/router/SortHelper.java b/router/java/src/net/i2p/data/router/SortHelper.java index 0c40fa3ed..c7cea3c6f 100644 --- a/router/java/src/net/i2p/data/router/SortHelper.java +++ b/router/java/src/net/i2p/data/router/SortHelper.java @@ -31,12 +31,11 @@ class SortHelper { * WARNING - this sort order must be consistent network-wide, so while the order is arbitrary, * it cannot be changed. * Why? Just because it has to be consistent so signing will work. - * How to spec as returning the same type as the param? * DEPRECATED - Only used by RouterInfo. * * @return a new list */ - public static List sortStructures(Collection dataStructures) { + public static List sortStructures(Collection dataStructures) { if (dataStructures == null) return Collections.emptyList(); // This used to use Hash.toString(), which is insane, since a change to toString() @@ -52,7 +51,7 @@ class SortHelper { //for (DataStructure struct : tm.values()) { // rv.add(struct); //} - ArrayList rv = new ArrayList(dataStructures); + ArrayList rv = new ArrayList(dataStructures); sortStructureList(rv); return rv; } diff --git a/router/java/src/net/i2p/router/Blocklist.java b/router/java/src/net/i2p/router/Blocklist.java index 4e931f665..3ad8e7387 100644 --- a/router/java/src/net/i2p/router/Blocklist.java +++ b/router/java/src/net/i2p/router/Blocklist.java @@ -917,7 +917,7 @@ public class Blocklist { singles.addAll(_singleIPBlocklist); if (!(singles.isEmpty() && _singleIPv6Blocklist.isEmpty())) { out.write(""); // first 0 - 127 for (Integer ii : singles) { @@ -954,11 +954,11 @@ public class Blocklist { } if (_blocklistSize > 0) { out.write("
              "); - out.write(_("IPs Banned Until Restart")); + out.write(_t("IPs Banned Until Restart")); out.write("
              "); int max = Math.min(_blocklistSize, MAX_DISPLAY); int displayed = 0; @@ -994,7 +994,7 @@ public class Blocklist { out.write("
              "); - out.write(_("IPs Permanently Banned")); + out.write(_t("IPs Permanently Banned")); out.write("
              "); - out.write(_("From")); + out.write(_t("From")); out.write(""); - out.write(_("To")); + out.write(_t("To")); out.write("
              "); } else { out.write("
              "); - out.write(_("none")); + out.write(_t("none")); out.write(""); } out.flush(); @@ -1030,7 +1030,7 @@ public class Blocklist { private static final String BUNDLE_NAME = "net.i2p.router.web.messages"; /** translate */ - private String _(String key) { + private String _t(String key) { return Translate.getString(key, _context, BUNDLE_NAME); } diff --git a/router/java/src/net/i2p/router/CommSystemFacade.java b/router/java/src/net/i2p/router/CommSystemFacade.java index e9c050762..2b96255b9 100644 --- a/router/java/src/net/i2p/router/CommSystemFacade.java +++ b/router/java/src/net/i2p/router/CommSystemFacade.java @@ -48,7 +48,7 @@ public abstract class CommSystemFacade implements Service { public boolean haveInboundCapacity(int pct) { return true; } public boolean haveOutboundCapacity(int pct) { return true; } public boolean haveHighOutboundCapacity() { return true; } - public List getMostRecentErrorMessages() { return Collections.emptyList(); } + public List getMostRecentErrorMessages() { return Collections.emptyList(); } /** * Median clock skew of connected peers in seconds, or null if we cannot answer. diff --git a/router/java/src/net/i2p/router/JobQueue.java b/router/java/src/net/i2p/router/JobQueue.java index da08c521a..141f348bf 100644 --- a/router/java/src/net/i2p/router/JobQueue.java +++ b/router/java/src/net/i2p/router/JobQueue.java @@ -27,6 +27,7 @@ import java.util.concurrent.atomic.AtomicInteger; import net.i2p.data.DataHelper; import net.i2p.router.message.HandleGarlicMessageJob; import net.i2p.router.networkdb.kademlia.HandleFloodfillDatabaseLookupMessageJob; +import net.i2p.router.RouterClock; import net.i2p.util.Clock; import net.i2p.util.I2PThread; import net.i2p.util.Log; @@ -340,7 +341,7 @@ public class JobQueue { public void startup() { _alive = true; I2PThread pumperThread = new I2PThread(_pumper, "Job Queue Pumper", true); - //pumperThread.setPriority(I2PThread.NORM_PRIORITY+1); + pumperThread.setPriority(Thread.NORM_PRIORITY + 1); pumperThread.start(); } @@ -516,10 +517,12 @@ public class JobQueue { * max number of runners. * */ - private final class QueuePumper implements Runnable, Clock.ClockUpdateListener { + private final class QueuePumper implements Runnable, Clock.ClockUpdateListener, RouterClock.ClockShiftListener { public QueuePumper() { _context.clock().addUpdateListener(this); + ((RouterClock) _context.clock()).addShiftListener(this); } + public void run() { try { while (_alive) { @@ -589,9 +592,11 @@ public class JobQueue { } catch (InterruptedException ie) {} } // while (_alive) } catch (Throwable t) { - _context.clock().removeUpdateListener(this); if (_log.shouldLog(Log.ERROR)) _log.error("pumper killed?!", t); + } finally { + _context.clock().removeUpdateListener(this); + ((RouterClock) _context.clock()).removeShiftListener(this); } } @@ -602,6 +607,22 @@ public class JobQueue { } } + /** + * Clock shift listener. + * Only adjust timings for negative shifts. + * For positive shifts, just wake up the pumper. + * @since 0.9.23 + */ + public void clockShift(long delta) { + if (delta < 0) { + offsetChanged(delta); + } else { + synchronized (_jobLock) { + _jobLock.notifyAll(); + } + } + } + } /** diff --git a/router/java/src/net/i2p/router/JobQueueRunner.java b/router/java/src/net/i2p/router/JobQueueRunner.java index 9cf23f998..ecc4cd954 100644 --- a/router/java/src/net/i2p/router/JobQueueRunner.java +++ b/router/java/src/net/i2p/router/JobQueueRunner.java @@ -21,6 +21,7 @@ class JobQueueRunner extends I2PThread { _id = id; _keepRunning = true; _log = _context.logManager().getLog(JobQueueRunner.class); + setPriority(NORM_PRIORITY + 1); // all createRateStat in JobQueue //_state = 1; } diff --git a/router/java/src/net/i2p/router/JobTiming.java b/router/java/src/net/i2p/router/JobTiming.java index 98d8e67c7..f934f1556 100644 --- a/router/java/src/net/i2p/router/JobTiming.java +++ b/router/java/src/net/i2p/router/JobTiming.java @@ -8,6 +8,7 @@ package net.i2p.router; * */ +import net.i2p.router.RouterClock; import net.i2p.util.Clock; /** @@ -15,7 +16,7 @@ import net.i2p.util.Clock; * * For use by the router only. Not to be used by applications or plugins. */ -public class JobTiming implements Clock.ClockUpdateListener { +public class JobTiming implements Clock.ClockUpdateListener, RouterClock.ClockShiftListener { private volatile long _start; private volatile long _actualStart; private volatile long _actualEnd; @@ -81,4 +82,8 @@ public class JobTiming implements Clock.ClockUpdateListener { if (_actualEnd != 0) _actualEnd += delta; } + + public void clockShift(long delta) { + offsetChanged(delta); + } } diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java index c6cc76f68..426da4a75 100644 --- a/router/java/src/net/i2p/router/Router.java +++ b/router/java/src/net/i2p/router/Router.java @@ -62,7 +62,7 @@ import net.i2p.util.Translate; /** * Main driver for the router. * - * For embedded use, instantiate and then call runRouter(). + * For embedded use, instantiate, call setKillVMOnEnd(false), and then call runRouter(). * */ public class Router implements RouterClock.ClockShiftListener { @@ -77,7 +77,6 @@ public class Router implements RouterClock.ClockShiftListener { public final Object routerInfoFileLock = new Object(); private final Object _configFileLock = new Object(); private long _started; - private boolean _higherVersionSeen; private boolean _killVMOnEnd; private int _gracefulExitCode; private I2PThread.OOMEventListener _oomListener; @@ -392,13 +391,12 @@ public class Router implements RouterClock.ClockShiftListener { CryptoChecker.warnUnavailableCrypto(_context); _routerInfo = null; - _higherVersionSeen = false; if (_log.shouldLog(Log.INFO)) _log.info("New router created with config file " + _configFilename); _oomListener = new OOMListener(_context); _shutdownHook = new ShutdownHook(_context); - _gracefulShutdownDetector = new I2PAppThread(new GracefulShutdown(_context), "Graceful shutdown hook", true); + _gracefulShutdownDetector = new I2PAppThread(new GracefulShutdown(_context), "Graceful ShutdownHook", true); _gracefulShutdownDetector.setPriority(Thread.NORM_PRIORITY + 1); _gracefulShutdownDetector.start(); @@ -510,20 +508,6 @@ public class Router implements RouterClock.ClockShiftListener { _context.jobQueue().addJob(new PersistRouterInfoJob(_context)); } - /** - * True if the router has tried to communicate with another router who is running a higher - * incompatible protocol version. - * @deprecated unused - */ - public boolean getHigherVersionSeen() { return _higherVersionSeen; } - - /** - * True if the router has tried to communicate with another router who is running a higher - * incompatible protocol version. - * @deprecated unused - */ - public void setHigherVersionSeen(boolean seen) { _higherVersionSeen = seen; } - /** * Used only by routerconsole.. to be deprecated? */ @@ -577,7 +561,9 @@ public class Router implements RouterClock.ClockShiftListener { if (!SystemVersion.isAndroid()) I2PThread.addOOMEventListener(_oomListener); - setupHandlers(); + // message handlers + _context.inNetMessagePool().registerHandlerJobBuilder(GarlicMessage.MESSAGE_TYPE, new GarlicMessageHandler(_context)); + //if (ALLOW_DYNAMIC_KEYS) { // if ("true".equalsIgnoreCase(_context.getProperty(Router.PROP_HIDDEN, "false"))) // killKeys(); @@ -586,7 +572,7 @@ public class Router implements RouterClock.ClockShiftListener { _context.messageValidator().startup(); _context.tunnelDispatcher().startup(); _context.inNetMessagePool().startup(); - startupQueue(); + _context.jobQueue().runQueue(1); //_context.jobQueue().addJob(new CoalesceStatsJob(_context)); _context.simpleTimer2().addPeriodicEvent(new CoalesceStatsEvent(_context), COALESCE_TIME); _context.jobQueue().addJob(new UpdateRoutingKeyModifierJob(_context)); @@ -625,6 +611,7 @@ public class Router implements RouterClock.ClockShiftListener { * This is synchronized with saveConfig(). * Not for external use. */ + @SuppressWarnings({ "unchecked", "rawtypes" }) public void readConfig() { synchronized(_configFileLock) { String f = getConfigFilename(); @@ -1080,15 +1067,6 @@ public class Router implements RouterClock.ClockShiftListener { saveConfig(PROP_JBIGI, loaded); } - private void startupQueue() { - _context.jobQueue().runQueue(1); - } - - private void setupHandlers() { - _context.inNetMessagePool().registerHandlerJobBuilder(GarlicMessage.MESSAGE_TYPE, new GarlicMessageHandler(_context)); - //_context.inNetMessagePool().registerHandlerJobBuilder(TunnelMessage.MESSAGE_TYPE, new TunnelMessageHandler(_context)); - } - /** shut down after all tunnels are gone */ public static final int EXIT_GRACEFUL = 2; /** shut down immediately */ @@ -1163,7 +1141,7 @@ public class Router implements RouterClock.ClockShiftListener { _log.warn("Running shutdown task " + task.getClass()); try { //task.run(); - Thread t = new Thread(task, "Shutdown task " + task.getClass().getName()); + Thread t = new I2PAppThread(task, "Shutdown task " + task.getClass().getName()); t.setDaemon(true); t.start(); try { @@ -1414,6 +1392,7 @@ public class Router implements RouterClock.ClockShiftListener { * @return success * @since 0.8.13 */ + @SuppressWarnings({ "unchecked", "rawtypes" }) public boolean saveConfig(Map toAdd, Collection toRemove) { synchronized(_configFileLock) { if (toAdd != null) @@ -1443,8 +1422,10 @@ public class Router implements RouterClock.ClockShiftListener { _eventLog.addEvent(EventLog.CLOCK_SHIFT, Long.toString(delta)); // update the routing key modifier _context.routerKeyGenerator().generateDateBasedModData(); - if (_context.commSystem().countActivePeers() <= 0) - return; + // Commented because this check makes no sense (#1014) + // .. and 'active' is relative to our broken time. + //if (_context.commSystem().countActivePeers() <= 0) + // return; if (delta > 0) _log.error("Restarting after large clock shift forward by " + DataHelper.formatDuration(delta)); else @@ -1473,7 +1454,7 @@ public class Router implements RouterClock.ClockShiftListener { ((RouterClock) _context.clock()).removeShiftListener(this); // Let's not stop accepting tunnels, etc //_started = _context.clock().now(); - Thread t = new Thread(new Restarter(_context), "Router Restart"); + Thread t = new I2PThread(new Restarter(_context), "Router Restart"); t.setPriority(Thread.NORM_PRIORITY + 1); t.start(); } @@ -1580,7 +1561,7 @@ public class Router implements RouterClock.ClockShiftListener { if (f.exists()) { long lastWritten = f.lastModified(); if (System.currentTimeMillis()-lastWritten > LIVELINESS_DELAY) { - System.err.println("WARN: Old router was not shut down gracefully, deleting router.ping"); + System.err.println("WARN: Old router was not shut down gracefully, deleting " + f); f.delete(); } else { return false; diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 0725033fa..9319fc01c 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 3; + public final static long BUILD = 22; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/TunnelPoolSettings.java b/router/java/src/net/i2p/router/TunnelPoolSettings.java index b7984c085..24184cc14 100644 --- a/router/java/src/net/i2p/router/TunnelPoolSettings.java +++ b/router/java/src/net/i2p/router/TunnelPoolSettings.java @@ -76,11 +76,11 @@ public class TunnelPoolSettings { private static final int DEFAULT_LENGTH_VARIANCE = 0; /** expl only */ private static final int DEFAULT_IB_EXPL_LENGTH = 2; - //private static final int DEFAULT_OB_EXPL_LENGTH = isSlow ? 2 : 3; - private static final int DEFAULT_OB_EXPL_LENGTH = 2; + private static final int DEFAULT_OB_EXPL_LENGTH = isSlow ? 2 : 3; + //private static final int DEFAULT_OB_EXPL_LENGTH = 2; private static final int DEFAULT_IB_EXPL_LENGTH_VARIANCE = isSlow ? 0 : 1; - //private static final int DEFAULT_OB_EXPL_LENGTH_VARIANCE = 0; - private static final int DEFAULT_OB_EXPL_LENGTH_VARIANCE = isSlow ? 0 : 1; + private static final int DEFAULT_OB_EXPL_LENGTH_VARIANCE = 0; + //private static final int DEFAULT_OB_EXPL_LENGTH_VARIANCE = isSlow ? 0 : 1; public static final boolean DEFAULT_ALLOW_ZERO_HOP = true; public static final int DEFAULT_IP_RESTRICTION = 2; // class B (/16) diff --git a/router/java/src/net/i2p/router/client/ClientListenerRunner.java b/router/java/src/net/i2p/router/client/ClientListenerRunner.java index e88339b0e..10e924106 100644 --- a/router/java/src/net/i2p/router/client/ClientListenerRunner.java +++ b/router/java/src/net/i2p/router/client/ClientListenerRunner.java @@ -18,6 +18,7 @@ import net.i2p.client.I2PClient; import net.i2p.router.Router; import net.i2p.router.RouterContext; import net.i2p.util.Log; +import net.i2p.util.PortMapper; /** * Listen for connections on the specified port, and toss them onto the client manager's @@ -78,13 +79,18 @@ class ClientListenerRunner implements Runnable { protected void runServer() { _running = true; int curDelay = 1000; + final String portMapperService = (this instanceof SSLClientListenerRunner) ? PortMapper.SVC_I2CP_SSL + : PortMapper.SVC_I2CP; while (_running) { try { _socket = getServerSocket(); if (_log.shouldLog(Log.DEBUG)) _log.debug("ServerSocket created, before accept: " + _socket); - + if (_port > 0) { + // not for DomainClientListenerRunner + _context.portMapper().register(portMapperService, _socket.getInetAddress().getHostAddress(), _port); + } curDelay = 1000; _listening = true; while (_running) { @@ -115,6 +121,11 @@ class ClientListenerRunner implements Runnable { } catch (IOException ioe) { if (isAlive()) _log.error("Error listening on port " + _port, ioe); + } finally { + if (_port > 0) { + // not for DomainClientListenerRunner + _context.portMapper().unregister(portMapperService); + } } _listening = false; diff --git a/router/java/src/net/i2p/router/client/ClientMessageEventListener.java b/router/java/src/net/i2p/router/client/ClientMessageEventListener.java index 8db9da336..d5697571e 100644 --- a/router/java/src/net/i2p/router/client/ClientMessageEventListener.java +++ b/router/java/src/net/i2p/router/client/ClientMessageEventListener.java @@ -196,7 +196,6 @@ class ClientMessageEventListener implements I2CPMessageReader.I2CPMessageEventLi private void handleSetDate(SetDateMessage message) { //_context.clock().setNow(message.getDate().getTime()); } - /** * Handle a CreateSessionMessage. @@ -378,6 +377,7 @@ class ClientMessageEventListener implements I2CPMessageReader.I2CPMessageEventLi // do this instead: if (sid != null && message.getNonce() > 0) { MessageStatusMessage status = new MessageStatusMessage(); + status.setMessageId(_runner.getNextMessageId()); status.setSessionId(sid.getSessionId()); status.setSize(0); status.setNonce(message.getNonce()); @@ -461,7 +461,7 @@ class ClientMessageEventListener implements I2CPMessageReader.I2CPMessageEventLi } /** override for testing */ - protected void handleCreateLeaseSet(CreateLeaseSetMessage message) { + protected void handleCreateLeaseSet(CreateLeaseSetMessage message) { if ( (message.getLeaseSet() == null) || (message.getPrivateKey() == null) || (message.getSigningPrivateKey() == null) ) { if (_log.shouldLog(Log.ERROR)) _log.error("Null lease set granted: " + message); diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java b/router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java index c3c413930..a04a339cc 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/PersistentDataStore.java @@ -44,8 +44,10 @@ import net.i2p.util.SecureFileOutputStream; * Write out keys to disk when we get them and periodically read ones we don't know * about into memory, with newly read routers are also added to the routing table. * + * Public only for access to static methods by startup classes + * */ -class PersistentDataStore extends TransientDataStore { +public class PersistentDataStore extends TransientDataStore { private final File _dbDir; private final KademliaNetworkDatabaseFacade _facade; private final Writer _writer; @@ -630,7 +632,25 @@ class PersistentDataStore extends TransientDataStore { return ROUTERINFO_PREFIX + b64 + ROUTERINFO_SUFFIX; return DIR_PREFIX + b64.charAt(0) + File.separatorChar + ROUTERINFO_PREFIX + b64 + ROUTERINFO_SUFFIX; } + + /** + * The persistent RI file for a hash. + * This is available before the netdb subsystem is running, so we can delete our old RI. + * + * @return non-null, should be absolute, does not necessarily exist + * @since 0.9.23 + */ + public static File getRouterInfoFile(RouterContext ctx, Hash hash) { + String b64 = hash.toBase64(); + File dir = new File(ctx.getRouterDir(), ctx.getProperty(KademliaNetworkDatabaseFacade.PROP_DB_DIR, KademliaNetworkDatabaseFacade.DEFAULT_DB_DIR)); + if (ctx.getBooleanProperty(PROP_FLAT)) + return new File(dir, ROUTERINFO_PREFIX + b64 + ROUTERINFO_SUFFIX); + return new File(dir, DIR_PREFIX + b64.charAt(0) + File.separatorChar + ROUTERINFO_PREFIX + b64 + ROUTERINFO_SUFFIX); + } + /** + * Package private for installer BundleRouterInfos + */ static Hash getRouterInfoHash(String filename) { return getHash(filename, ROUTERINFO_PREFIX, ROUTERINFO_SUFFIX); } diff --git a/router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java b/router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java index d930cac9b..59e697253 100644 --- a/router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java +++ b/router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java @@ -81,7 +81,6 @@ public class Reseeder { // Disabling everything, use SSL //"http://i2p.mooo.com/netDb/" + "," + - //"http://193.150.121.66/netDb/" + "," + //"http://uk.reseed.i2p2.no/" + "," + //"http://netdb.i2p2.no/"; // Only SU3 (v3) support ""; @@ -89,16 +88,15 @@ public class Reseeder { /** @since 0.8.2 */ public static final String DEFAULT_SSL_SEED_URL = "https://reseed.i2p-projekt.de/" + "," + // Only HTTPS - "https://netdb.rows.io:444/" + "," + // Only HTTPS and SU3 (v3) support + //"https://netdb.rows.io:444/" + "," + // Only HTTPS and SU3 (v3) support "https://i2pseed.zarrenspry.info/" + "," + // Only HTTPS and SU3 (v3) support "https://i2p.mooo.com/netDb/" + "," + - // ticket #1596 - // "https://193.150.121.66/netDb/" + "," + "https://netdb.i2p2.no/" + "," + // Only SU3 (v3) support, SNI required "https://us.reseed.i2p2.no:444/" + "," + "https://uk.reseed.i2p2.no:444/" + "," + + "https://www.torontocrypto.org:8443/" + "," + "https://reseed.i2p.vzaws.com:8443/" + ", " + // Only SU3 (v3) support - "https://link.mx24.eu/" + "," + // Only HTTPS and SU3 (v3) support + "https://user.mx24.eu/" + "," + // Only HTTPS and SU3 (v3) support "https://ieb9oopo.mooo.com/"; // Only HTTPS and SU3 (v3) support private static final String SU3_FILENAME = "i2pseeds.su3"; @@ -209,7 +207,7 @@ public class Reseeder { if (fetched <= 0) throw new IOException("No seeds extracted"); _checker.setStatus( - _("Reseeding: got router info from file ({0} successful, {1} errors).", fetched, errors)); + _t("Reseeding: got router info from file ({0} successful, {1} errors).", fetched, errors)); System.err.println("Reseed got " + fetched + " router infos from file with " + errors + " errors"); _context.router().eventLog().addEvent(EventLog.RESEED, fetched + " from file"); return fetched; @@ -281,7 +279,7 @@ public class Reseeder { private void run2() { _isRunning = true; _checker.setError(""); - _checker.setStatus(_("Reseeding")); + _checker.setStatus(_t("Reseeding")); if (_context.getBooleanProperty(PROP_PROXY_ENABLE)) { _proxyHost = _context.getProperty(PROP_PROXY_HOST); _proxyPort = _context.getProperty(PROP_PROXY_PORT, -1); @@ -313,9 +311,9 @@ public class Reseeder { "and if nothing helps, read the FAQ about reseeding manually."); } // else < 0, no valid URLs String old = _checker.getError(); - _checker.setError(_("Reseed failed.") + ' ' + - _("See {0} for help.", - "" + _("reseed configuration page") + "") + + _checker.setError(_t("Reseed failed.") + ' ' + + _t("See {0} for help.", + "" + _t("reseed configuration page") + "") + "
              " + old); } _isRunning = false; @@ -563,7 +561,7 @@ public class Reseeder { try { // Don't use context clock as we may be adjusting the time final long timeLimit = System.currentTimeMillis() + MAX_TIME_PER_HOST; - _checker.setStatus(_("Reseeding: fetching seed URL.")); + _checker.setStatus(_t("Reseeding: fetching seed URL.")); System.err.println("Reseeding from " + seedURL); byte contentRaw[] = readURL(seedURL); if (contentRaw == null) { @@ -620,7 +618,7 @@ public class Reseeder { iter.hasNext() && fetched < 200 && System.currentTimeMillis() < timeLimit; ) { try { _checker.setStatus( - _("Reseeding: fetching router info from seed URL ({0} successful, {1} errors).", fetched, errors)); + _t("Reseeding: fetching router info from seed URL ({0} successful, {1} errors).", fetched, errors)); if (!fetchSeed(seedURL.toString(), iter.next())) continue; @@ -694,7 +692,7 @@ public class Reseeder { int errors = 0; File contentRaw = null; try { - _checker.setStatus(_("Reseeding: fetching seed URL.")); + _checker.setStatus(_t("Reseeding: fetching seed URL.")); System.err.println("Reseeding from " + seedURL); // don't use context time, as we may be step-changing it // from the server header @@ -730,7 +728,7 @@ public class Reseeder { contentRaw.delete(); } _checker.setStatus( - _("Reseeding: fetching router info from seed URL ({0} successful, {1} errors).", fetched, errors)); + _t("Reseeding: fetching router info from seed URL ({0} successful, {1} errors).", fetched, errors)); System.err.println("Reseed got " + fetched + " router infos from " + seedURL + " with " + errors + " errors"); return fetched; } @@ -1002,17 +1000,17 @@ public class Reseeder { private static final String BUNDLE_NAME = "net.i2p.router.web.messages"; /** translate */ - private String _(String key) { + private String _t(String key) { return Translate.getString(key, _context, BUNDLE_NAME); } /** translate */ - private String _(String s, Object o) { + private String _t(String s, Object o) { return Translate.getString(s, o, _context, BUNDLE_NAME); } /** translate */ - private String _(String s, Object o, Object o2) { + private String _t(String s, Object o, Object o2) { return Translate.getString(s, o, o2, _context, BUNDLE_NAME); } diff --git a/router/java/src/net/i2p/router/peermanager/CapacityCalculator.java b/router/java/src/net/i2p/router/peermanager/CapacityCalculator.java index 2c4a96c44..b67189e07 100644 --- a/router/java/src/net/i2p/router/peermanager/CapacityCalculator.java +++ b/router/java/src/net/i2p/router/peermanager/CapacityCalculator.java @@ -1,6 +1,8 @@ package net.i2p.router.peermanager; -import net.i2p.I2PAppContext; +import net.i2p.data.router.RouterInfo; +import net.i2p.router.RouterContext; +import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade; import net.i2p.stat.Rate; import net.i2p.stat.RateAverages; import net.i2p.stat.RateStat; @@ -25,6 +27,9 @@ class CapacityCalculator { private static final double BONUS_SAME_COUNTRY = 0; private static final double BONUS_XOR = .25; private static final double PENALTY_UNREACHABLE = 2; + // we make this a bonus for non-ff, not a penalty for ff, so we + // don't drive the ffs below the default + private static final double BONUS_NON_FLOODFILL = 0.5; public static double calc(PeerProfile profile) { double capacity; @@ -54,7 +59,7 @@ class CapacityCalculator { // now take into account non-rejection tunnel rejections (which haven't // incremented the rejection counter, since they were only temporary) - I2PAppContext context = profile.getContext(); + RouterContext context = profile.getContext(); long now = context.clock().now(); if (profile.getTunnelHistory().getLastRejectedTransient() > now - 5*60*1000) capacity = 1; @@ -83,8 +88,15 @@ class CapacityCalculator { // penalize unreachable peers if (profile.wasUnreachable()) capacity -= PENALTY_UNREACHABLE; + + // credit non-floodfill to reduce conn limit issues at floodfills + // TODO only if we aren't floodfill ourselves? + RouterInfo ri = context.netDb().lookupRouterInfoLocally(profile.getPeer()); + if (!FloodfillNetworkDatabaseFacade.isFloodfill(ri)) + capacity += BONUS_NON_FLOODFILL; + // a tiny tweak to break ties and encourage closeness, -.25 to +.25 - capacity -= profile.getXORDistance() * (BONUS_XOR / 128); + capacity -= profile.getXORDistance() * (BONUS_XOR / 128); capacity += profile.getCapacityBonus(); if (capacity < 0) diff --git a/router/java/src/net/i2p/router/peermanager/PeerManager.java b/router/java/src/net/i2p/router/peermanager/PeerManager.java index 8061a2517..b3cc3643b 100644 --- a/router/java/src/net/i2p/router/peermanager/PeerManager.java +++ b/router/java/src/net/i2p/router/peermanager/PeerManager.java @@ -165,7 +165,7 @@ class PeerManager { * @since 0.8.8 */ private void loadProfilesInBackground() { - (new Thread(new ProfileLoader())).start(); + (new I2PThread(new ProfileLoader())).start(); } /** diff --git a/router/java/src/net/i2p/router/startup/BootCommSystemJob.java b/router/java/src/net/i2p/router/startup/BootCommSystemJob.java index 2b3be5586..bb9f30846 100644 --- a/router/java/src/net/i2p/router/startup/BootCommSystemJob.java +++ b/router/java/src/net/i2p/router/startup/BootCommSystemJob.java @@ -14,6 +14,7 @@ import net.i2p.router.RouterContext; import net.i2p.router.RouterClock; import net.i2p.router.tasks.ReadConfigJob; import net.i2p.util.Log; +import net.i2p.util.SystemVersion; /** This actually boots almost everything */ class BootCommSystemJob extends JobImpl { @@ -46,9 +47,12 @@ class BootCommSystemJob extends JobImpl { // start I2CP getContext().jobQueue().addJob(new StartAcceptingClientsJob(getContext())); - Job j = new ReadConfigJob(getContext()); - j.getTiming().setStartAfter(getContext().clock().now() + 2*60*1000); - getContext().jobQueue().addJob(j); + if (!SystemVersion.isAndroid()) { + Job j = new ReadConfigJob(getContext()); + j.getTiming().setStartAfter(getContext().clock().now() + 2*60*1000); + getContext().jobQueue().addJob(j); + } + ((RouterClock) getContext().clock()).addShiftListener(getContext().router()); } diff --git a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java index 3fbfc381f..05969ec03 100644 --- a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java +++ b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java @@ -207,7 +207,7 @@ public class LoadClientAppsJob extends JobImpl { if (args == null) args = new String[0]; Class cls = Class.forName(className, true, cl); - Method method = cls.getMethod("main", new Class[] { String[].class }); + Method method = cls.getMethod("main", String[].class); method.invoke(cls, new Object[] { args }); } @@ -287,7 +287,7 @@ public class LoadClientAppsJob extends JobImpl { ClientApp app = (ClientApp) con.newInstance(conArgs); mgr.addAndStart(app, _args); } else { - Method method = cls.getMethod("main", new Class[] { String[].class }); + Method method = cls.getMethod("main", String[].class); method.invoke(cls, new Object[] { _args }); } } catch (Throwable t) { diff --git a/router/java/src/net/i2p/router/startup/LoadRouterInfoJob.java b/router/java/src/net/i2p/router/startup/LoadRouterInfoJob.java index eebd0f02b..1ddce12b9 100644 --- a/router/java/src/net/i2p/router/startup/LoadRouterInfoJob.java +++ b/router/java/src/net/i2p/router/startup/LoadRouterInfoJob.java @@ -20,6 +20,7 @@ import net.i2p.crypto.SigType; import net.i2p.data.Certificate; import net.i2p.data.DataFormatException; import net.i2p.data.DataHelper; +import net.i2p.data.Hash; import net.i2p.data.PrivateKey; import net.i2p.data.PublicKey; import net.i2p.data.SigningPrivateKey; @@ -30,6 +31,7 @@ import net.i2p.data.router.RouterPrivateKeyFile; import net.i2p.router.JobImpl; import net.i2p.router.Router; import net.i2p.router.RouterContext; +import net.i2p.router.networkdb.kademlia.PersistentDataStore; import net.i2p.util.Log; /** @@ -112,9 +114,9 @@ class LoadRouterInfoJob extends JobImpl { boolean sigTypeChanged = stype != cstype; if (sigTypeChanged && getContext().getProperty(CreateRouterInfoJob.PROP_ROUTER_SIGTYPE) == null) { // Not explicitly configured, and default has changed - // Give a 10% chance of rekeying for each restart - // TODO reduce from 10 to ~3 (i.e. increase probability) in future release - if (getContext().random().nextInt(10) > 0) { + // Give a 15% chance of rekeying for each restart + // TODO reduce to ~3 (i.e. increase probability) in future release + if (getContext().random().nextInt(7) > 0) { sigTypeChanged = false; if (_log.shouldWarn()) _log.warn("Deferring RI rekey from " + stype + " to " + cstype); @@ -122,9 +124,18 @@ class LoadRouterInfoJob extends JobImpl { } if (sigTypeChanged || shouldRebuild(privkey)) { + if (_us != null) { + Hash h = _us.getIdentity().getHash(); + _log.logAlways(Log.WARN, "Deleting old router identity " + h.toBase64()); + // the netdb hasn't started yet, but we want to delete the RI + File f = PersistentDataStore.getRouterInfoFile(getContext(), h); + f.delete(); + // the banlist can be called at any time + getContext().banlist().banlistRouterForever(h, "Our previous identity"); + _us = null; + } if (sigTypeChanged) _log.logAlways(Log.WARN, "Rebuilding RouterInfo with new signature type " + cstype); - _us = null; // windows... close before deleting if (fis1 != null) { try { fis1.close(); } catch (IOException ioe) {} diff --git a/router/java/src/net/i2p/router/tasks/CryptoChecker.java b/router/java/src/net/i2p/router/tasks/CryptoChecker.java index e022931ff..49bd84da5 100644 --- a/router/java/src/net/i2p/router/tasks/CryptoChecker.java +++ b/router/java/src/net/i2p/router/tasks/CryptoChecker.java @@ -5,6 +5,7 @@ import java.security.NoSuchAlgorithmException; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; +import net.i2p.crypto.CryptoCheck; import net.i2p.crypto.SigType; import net.i2p.router.RouterContext; import net.i2p.util.Log; @@ -57,7 +58,7 @@ public class CryptoChecker { log.logAlways(Log.WARN, s); System.out.println(s); } - if (!isUnlimited()) { + if (!CryptoCheck.isUnlimited()) { s = "Please consider installing the Java Cryptography Unlimited Strength Jurisdiction Policy Files from "; //if (SystemVersion.isJava8()) // s += JRE8; @@ -79,28 +80,6 @@ public class CryptoChecker { } } - /** - * Copied from CryptixAESEngine - */ - private static boolean isUnlimited() { - try { - if (Cipher.getMaxAllowedKeyLength("AES") < 256) - return false; - } catch (NoSuchAlgorithmException e) { - return false; - } catch (NoSuchMethodError e) { - // JamVM, gij - try { - Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); - SecretKeySpec key = new SecretKeySpec(new byte[32], "AES"); - cipher.init(Cipher.ENCRYPT_MODE, key); - } catch (GeneralSecurityException gse) { - return false; - } - } - return true; - } - public static void main(String[] args) { warnUnavailableCrypto(null); } diff --git a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java index a9b802060..fbea02990 100644 --- a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java +++ b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java @@ -499,7 +499,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade { buf.append(""); boolean found = _context.netDb().lookupRouterInfoLocally(peer) != null; if (found) - buf.append(""); + buf.append(""); buf.append(h); if (found) buf.append(""); @@ -519,7 +519,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade { /** * Translate */ - private final String _(String s) { + private final String _t(String s) { return Translate.getString(s, _context, BUNDLE_NAME); } diff --git a/router/java/src/net/i2p/router/transport/OutboundMessageRegistry.java b/router/java/src/net/i2p/router/transport/OutboundMessageRegistry.java index 012107e6c..9c04f52b6 100644 --- a/router/java/src/net/i2p/router/transport/OutboundMessageRegistry.java +++ b/router/java/src/net/i2p/router/transport/OutboundMessageRegistry.java @@ -96,6 +96,7 @@ public class OutboundMessageRegistry { * @return non-null List of OutNetMessage describing messages that were waiting for * the payload */ + @SuppressWarnings("unchecked") public List getOriginalMessages(I2NPMessage message) { List matchedSelectors = null; List removedSelectors = null; @@ -193,6 +194,7 @@ public class OutboundMessageRegistry { /** * @param allowEmpty is msg.getMessage() allowed to be null? */ + @SuppressWarnings("unchecked") private void registerPending(OutNetMessage msg, boolean allowEmpty) { if ( (!allowEmpty) && (msg.getMessage() == null) ) throw new IllegalArgumentException("OutNetMessage doesn't contain an I2NPMessage? Impossible?"); @@ -229,6 +231,7 @@ public class OutboundMessageRegistry { /** * @param msg may be be null */ + @SuppressWarnings("unchecked") public void unregisterPending(OutNetMessage msg) { if (msg == null) return; MessageSelector sel = msg.getReplySelector(); @@ -262,6 +265,7 @@ public class OutboundMessageRegistry { _nextExpire = -1; } + @SuppressWarnings("unchecked") public void timeReached() { long now = _context.clock().now(); List removing = new ArrayList(8); @@ -326,12 +330,14 @@ public class OutboundMessageRegistry { if (r > 0 || e > 0 || a > 0) _log.debug("Expired: " + e + " remaining: " + r + " active: " + a); } - if (_nextExpire <= now) - _nextExpire = now + 10*1000; - schedule(_nextExpire - now); + synchronized(this) { + if (_nextExpire <= now) + _nextExpire = now + 10*1000; + schedule(_nextExpire - now); + } } - public void scheduleExpiration(MessageSelector sel) { + public synchronized void scheduleExpiration(MessageSelector sel) { long now = _context.clock().now(); if ( (_nextExpire <= now) || (sel.getExpiration() < _nextExpire) ) { _nextExpire = sel.getExpiration(); diff --git a/router/java/src/net/i2p/router/transport/TransportImpl.java b/router/java/src/net/i2p/router/transport/TransportImpl.java index ce2d643a6..11fb08b96 100644 --- a/router/java/src/net/i2p/router/transport/TransportImpl.java +++ b/router/java/src/net/i2p/router/transport/TransportImpl.java @@ -983,7 +983,7 @@ public abstract class TransportImpl implements Transport { * Translate * @since 0.9.8 moved from transports */ - protected String _(String s) { + protected String _t(String s) { return Translate.getString(s, _context, BUNDLE_NAME); } @@ -991,7 +991,7 @@ public abstract class TransportImpl implements Transport { * Translate * @since 0.9.8 moved from transports */ - protected String _(String s, Object o) { + protected String _t(String s, Object o) { return Translate.getString(s, o, _context, BUNDLE_NAME); } diff --git a/router/java/src/net/i2p/router/transport/TransportManager.java b/router/java/src/net/i2p/router/transport/TransportManager.java index 4c0f325bb..b49ff1551 100644 --- a/router/java/src/net/i2p/router/transport/TransportManager.java +++ b/router/java/src/net/i2p/router/transport/TransportManager.java @@ -671,9 +671,9 @@ public class TransportManager implements TransportEventListener { public void renderStatusHTML(Writer out, String urlBase, int sortFlags) throws IOException { if (_context.getBooleanProperty(PROP_ADVANCED)) { out.write("

              "); - out.write(_("Status")); + out.write(_t("Status")); out.write(": "); - out.write(_(getReachabilityStatus().toStatusString())); + out.write(_t(getReachabilityStatus().toStatusString())); out.write("

              "); } TreeMap transports = new TreeMap(); @@ -689,7 +689,7 @@ public class TransportManager implements TransportEventListener { } StringBuilder buf = new StringBuilder(4*1024); - buf.append("

              ").append(_("Router Transport Addresses")).append("

              \n");
              +        buf.append("

              ").append(_t("Router Transport Addresses")).append("

              \n");
                       for (Transport t : _transports.values()) {
                           if (t.hasCurrentAddress()) {
                               for (RouterAddress ra : t.getCurrentAddresses()) {
              @@ -697,7 +697,7 @@ public class TransportManager implements TransportEventListener {
                                   buf.append("\n\n");
                               }
                           } else {
              -                buf.append(_("{0} is used for outbound connections only", t.getStyle()));
              +                buf.append(_t("{0} is used for outbound connections only", t.getStyle()));
                               buf.append("\n\n");
                           }
                       }
              @@ -708,7 +708,7 @@ public class TransportManager implements TransportEventListener {
                       } else if (_upnpManager != null) {
                           out.write(_upnpManager.renderStatusHTML());
                       } else {
              -            out.write("

              " + _("UPnP is not enabled") + "

              \n"); + out.write("

              " + _t("UPnP is not enabled") + "

              \n"); } out.write("

              \n"); out.flush(); @@ -717,38 +717,38 @@ public class TransportManager implements TransportEventListener { private final String getTransportsLegend() { StringBuilder buf = new StringBuilder(1024); - buf.append("

              ").append(_("Help")).append("

              ") - .append(_("Your transport connection limits are automatically set based on your configured bandwidth.")) + buf.append("

              ").append(_t("Help")).append("

              ") + .append(_t("Your transport connection limits are automatically set based on your configured bandwidth.")) .append('\n') - .append(_("To override these limits, add the settings i2np.ntcp.maxConnections=nnn and i2np.udp.maxConnections=nnn on the advanced configuration page.")) + .append(_t("To override these limits, add the settings i2np.ntcp.maxConnections=nnn and i2np.udp.maxConnections=nnn on the advanced configuration page.")) .append("

              \n"); - buf.append("

              ").append(_("Definitions")).append("

              " + - "

              ").append(_("Peer")).append(": ").append(_("The remote peer, identified by router hash")).append("
              \n" + - "").append(_("Dir")).append(": " + - "\"Inbound\" ").append(_("Inbound connection")).append("
              \n" + + buf.append("

              ").append(_t("Definitions")).append("

              " + + "

              ").append(_t("Peer")).append(": ").append(_t("The remote peer, identified by router hash")).append("
              \n" + + "").append(_t("Dir")).append(": " + + "\"Inbound\" ").append(_t("Inbound connection")).append("
              \n" + "       " + - "\"Outbound\" ").append(_("Outbound connection")).append("
              \n" + + "\"Outbound\" ").append(_t("Outbound connection")).append("
              \n" + "       " + - "\"V\" ").append(_("They offered to introduce us (help other peers traverse our firewall)")).append("
              \n" + + "\"V\" ").append(_t("They offered to introduce us (help other peers traverse our firewall)")).append("
              \n" + "       " + - "\"^\" ").append(_("We offered to introduce them (help other peers traverse their firewall)")).append("
              \n" + - "").append(_("Idle")).append(": ").append(_("How long since a packet has been received / sent")).append("
              \n" + - "").append(_("In/Out")).append(": ").append(_("The smoothed inbound / outbound transfer rate (KBytes per second)")).append("
              \n" + - "").append(_("Up")).append(": ").append(_("How long ago this connection was established")).append("
              \n" + - "").append(_("Skew")).append(": ").append(_("The difference between the peer's clock and your own")).append("
              \n" + - "CWND: ").append(_("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" /
              \n" + - "        ").append(_("The number of sent messages awaiting acknowledgement")).append(" /
              \n" + - "        ").append(_("The maximum number of concurrent messages to send")).append(" /
              \n"+ - "        ").append(_("The number of pending sends which exceed congestion window")).append("
              \n" + - "SST: ").append(_("The slow start threshold")).append("
              \n" + - "RTT: ").append(_("The round trip time in milliseconds")).append("
              \n" + - //"").append(_("Dev")).append(": ").append(_("The standard deviation of the round trip time in milliseconds")).append("
              \n" + - "RTO: ").append(_("The retransmit timeout in milliseconds")).append("
              \n" + - "MTU: ").append(_("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("
              \n" + - "").append(_("TX")).append(": ").append(_("The total number of packets sent to the peer")).append("
              \n" + - "").append(_("RX")).append(": ").append(_("The total number of packets received from the peer")).append("
              \n" + - "").append(_("Dup TX")).append(": ").append(_("The total number of packets retransmitted to the peer")).append("
              \n" + - "").append(_("Dup RX")).append(": ").append(_("The total number of duplicate packets received from the peer")).append("

              " + + "\"^\" ").append(_t("We offered to introduce them (help other peers traverse their firewall)")).append("
              \n" + + "").append(_t("Idle")).append(": ").append(_t("How long since a packet has been received / sent")).append("
              \n" + + "").append(_t("In/Out")).append(": ").append(_t("The smoothed inbound / outbound transfer rate (KBytes per second)")).append("
              \n" + + "").append(_t("Up")).append(": ").append(_t("How long ago this connection was established")).append("
              \n" + + "").append(_t("Skew")).append(": ").append(_t("The difference between the peer's clock and your own")).append("
              \n" + + "CWND: ").append(_t("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" /
              \n" + + "        ").append(_t("The number of sent messages awaiting acknowledgement")).append(" /
              \n" + + "        ").append(_t("The maximum number of concurrent messages to send")).append(" /
              \n"+ + "        ").append(_t("The number of pending sends which exceed congestion window")).append("
              \n" + + "SST: ").append(_t("The slow start threshold")).append("
              \n" + + "RTT: ").append(_t("The round trip time in milliseconds")).append("
              \n" + + //"").append(_t("Dev")).append(": ").append(_t("The standard deviation of the round trip time in milliseconds")).append("
              \n" + + "RTO: ").append(_t("The retransmit timeout in milliseconds")).append("
              \n" + + "MTU: ").append(_t("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("
              \n" + + "").append(_t("TX")).append(": ").append(_t("The total number of packets sent to the peer")).append("
              \n" + + "").append(_t("RX")).append(": ").append(_t("The total number of packets received from the peer")).append("
              \n" + + "").append(_t("Dup TX")).append(": ").append(_t("The total number of packets retransmitted to the peer")).append("
              \n" + + "").append(_t("Dup RX")).append(": ").append(_t("The total number of duplicate packets received from the peer")).append("

              " + "
              \n"); return buf.toString(); } @@ -770,14 +770,14 @@ public class TransportManager implements TransportEventListener { /** * Translate */ - private final String _(String s) { + private final String _t(String s) { return Translate.getString(s, _context, BUNDLE_NAME); } /** * Translate */ - private final String _(String s, Object o) { + private final String _t(String s, Object o) { return Translate.getString(s, o, _context, BUNDLE_NAME); } } diff --git a/router/java/src/net/i2p/router/transport/UPnP.java b/router/java/src/net/i2p/router/transport/UPnP.java index 29e0a037c..26c7610b5 100644 --- a/router/java/src/net/i2p/router/transport/UPnP.java +++ b/router/java/src/net/i2p/router/transport/UPnP.java @@ -19,6 +19,7 @@ import java.util.concurrent.atomic.AtomicInteger; import net.i2p.I2PAppContext; import net.i2p.data.DataHelper; import net.i2p.util.Addresses; +import net.i2p.util.I2PThread; import net.i2p.util.Log; import net.i2p.util.Translate; @@ -557,68 +558,68 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { for(int i=0; i").append(_("Service")).append(": "); + sb.append("
            3. ").append(_t("Service")).append(": "); // NOTE: Group all toString() of common actions together // to avoid excess fetches, since toString() caches. if("urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1".equals(serv.getServiceType())){ - sb.append(_("WAN Common Interface Configuration")); - sb.append("
              • ").append(_("Status")).append(": ") + sb.append(_t("WAN Common Interface Configuration")); + sb.append("
                • ").append(_t("Status")).append(": ") .append(toString("GetCommonLinkProperties", "NewPhysicalLinkStatus", serv)); - sb.append("
                • ").append(_("Type")).append(": ") + sb.append("
                • ").append(_t("Type")).append(": ") .append(toString("GetCommonLinkProperties", "NewWANAccessType", serv)); - sb.append("
                • ").append(_("Upstream")).append(": ") + sb.append("
                • ").append(_t("Upstream")).append(": ") .append(toString("GetCommonLinkProperties", "NewLayer1UpstreamMaxBitRate", serv)); - sb.append("
                • ").append(_("Downstream")).append(": ") + sb.append("
                • ").append(_t("Downstream")).append(": ") .append(toString("GetCommonLinkProperties", "NewLayer1DownstreamMaxBitRate", serv)) .append("
                • "); }else if("urn:schemas-upnp-org:service:WANPPPConnection:1".equals(serv.getServiceType())){ - sb.append(_("WAN PPP Connection")); - sb.append("
                  • ").append(_("Status")).append(": ") + sb.append(_t("WAN PPP Connection")); + sb.append("
                    • ").append(_t("Status")).append(": ") .append(toString("GetStatusInfo", "NewConnectionStatus", serv)); String up = toString("GetStatusInfo", "NewUptime", serv); if (up != null) { try { long uptime = Long.parseLong(up); uptime *= 1000; - sb.append("
                    • ").append(_("Uptime")).append(": ") + sb.append("
                    • ").append(_t("Uptime")).append(": ") .append(DataHelper.formatDuration2(uptime)); } catch (NumberFormatException nfe) {} } - sb.append("
                    • ").append(_("Type")).append(": ") + sb.append("
                    • ").append(_t("Type")).append(": ") .append(toString("GetConnectionTypeInfo", "NewConnectionType", serv)); - sb.append("
                    • ").append(_("Upstream")).append(": ") + sb.append("
                    • ").append(_t("Upstream")).append(": ") .append(toString("GetLinkLayerMaxBitRates", "NewUpstreamMaxBitRate", serv)); - sb.append("
                    • ").append(_("Downstream")).append(": ") + sb.append("
                    • ").append(_t("Downstream")).append(": ") .append(toString("GetLinkLayerMaxBitRates", "NewDownstreamMaxBitRate", serv) + "
                      "); - sb.append("
                    • ").append(_("External IP")).append(": ") + sb.append("
                    • ").append(_t("External IP")).append(": ") .append(toString("GetExternalIPAddress", "NewExternalIPAddress", serv)) .append("
                    • "); }else if("urn:schemas-upnp-org:service:Layer3Forwarding:1".equals(serv.getServiceType())){ - sb.append(_("Layer 3 Forwarding")); - sb.append("
                      • ").append(_("Default Connection Service")).append(": ") + sb.append(_t("Layer 3 Forwarding")); + sb.append("
                        • ").append(_t("Default Connection Service")).append(": ") .append(toString("GetDefaultConnectionService", "NewDefaultConnectionService", serv)) .append("
                        • "); }else if(WAN_IP_CONNECTION.equals(serv.getServiceType())){ - sb.append(_("WAN IP Connection")); - sb.append("
                          • ").append(_("Status")).append(": ") + sb.append(_t("WAN IP Connection")); + sb.append("
                            • ").append(_t("Status")).append(": ") .append(toString("GetStatusInfo", "NewConnectionStatus", serv)); String up = toString("GetStatusInfo", "NewUptime", serv); if (up != null) { try { long uptime = Long.parseLong(up); uptime *= 1000; - sb.append("
                            • ").append(_("Uptime")).append(": ") + sb.append("
                            • ").append(_t("Uptime")).append(": ") .append(DataHelper.formatDuration2(uptime)); } catch (NumberFormatException nfe) {} } - sb.append("
                            • ").append(_("Type")).append(": ") + sb.append("
                            • ").append(_t("Type")).append(": ") .append(toString("GetConnectionTypeInfo", "NewConnectionType", serv)); - sb.append("
                            • ").append(_("External IP")).append(": ") + sb.append("
                            • ").append(_t("External IP")).append(": ") .append(toString("GetExternalIPAddress", "NewExternalIPAddress", serv)) .append("
                            • "); }else if("urn:schemas-upnp-org:service:WANEthernetLinkConfig:1".equals(serv.getServiceType())){ - sb.append(_("WAN Ethernet Link Configuration")); - sb.append("
                              • ").append(_("Status")).append(": ") + sb.append(_t("WAN Ethernet Link Configuration")); + sb.append("
                                • ").append(_t("Status")).append(": ") .append(toString("GetEthernetLinkStatus", "NewEthernetLinkStatus", serv)) .append("
                                • "); } else { @@ -638,9 +639,9 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { private void listSubDev(String prefix, Device dev, StringBuilder sb){ if (prefix == null) - sb.append("

                                  ").append(_("Found Device")).append(": "); + sb.append("

                                  ").append(_t("Found Device")).append(": "); else - sb.append("

                                • ").append(_("Subdevice")).append(": "); + sb.append("
                                • ").append(_t("Subdevice")).append(": "); sb.append(DataHelper.escapeHTML(dev.getFriendlyName())); if (prefix == null) sb.append("

                                  "); @@ -661,11 +662,11 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { /** warning - slow */ public String renderStatusHTML() { final StringBuilder sb = new StringBuilder(); - sb.append("

                                  ").append(_("UPnP Status")).append("

                                  "); + sb.append("

                                  ").append(_t("UPnP Status")).append("

                                  "); synchronized(_otherUDNs) { if (!_otherUDNs.isEmpty()) { - sb.append(_("Disabled UPnP Devices")); + sb.append(_t("Disabled UPnP Devices")); sb.append("
                                    "); for (Map.Entry e : _otherUDNs.entrySet()) { String udn = e.getKey(); @@ -679,10 +680,10 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { } if(isDisabled) { - sb.append(_("UPnP has been disabled; Do you have more than one UPnP Internet Gateway Device on your LAN ?")); + sb.append(_t("UPnP has been disabled; Do you have more than one UPnP Internet Gateway Device on your LAN ?")); return sb.toString(); } else if(!isNATPresent()) { - sb.append(_("UPnP has not found any UPnP-aware, compatible device on your LAN.")); + sb.append(_t("UPnP has not found any UPnP-aware, compatible device on your LAN.")); return sb.toString(); } @@ -690,15 +691,15 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { String addr = getNATAddress(); sb.append("

                                    "); if (addr != null) - sb.append(_("The current external IP address reported by UPnP is {0}", DataHelper.escapeHTML(addr))); + sb.append(_t("The current external IP address reported by UPnP is {0}", DataHelper.escapeHTML(addr))); else - sb.append(_("The current external IP address is not available.")); + sb.append(_t("The current external IP address is not available.")); int downstreamMaxBitRate = getDownstreamMaxBitRate(); int upstreamMaxBitRate = getUpstreamMaxBitRate(); if(downstreamMaxBitRate > 0) - sb.append("
                                    ").append(_("UPnP reports the maximum downstream bit rate is {0}bits/sec", DataHelper.formatSize2(downstreamMaxBitRate))); + sb.append("
                                    ").append(_t("UPnP reports the maximum downstream bit rate is {0}bits/sec", DataHelper.formatSize2(downstreamMaxBitRate))); if(upstreamMaxBitRate > 0) - sb.append("
                                    ").append(_("UPnP reports the maximum upstream bit rate is {0}bits/sec", DataHelper.formatSize2(upstreamMaxBitRate))); + sb.append("
                                    ").append(_t("UPnP reports the maximum upstream bit rate is {0}bits/sec", DataHelper.formatSize2(upstreamMaxBitRate))); synchronized(lock) { for(ForwardPort port : portsToForward) { sb.append("
                                    "); @@ -706,9 +707,9 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { // {0} is TCP or UDP // {1,number,#####} prevents 12345 from being output as 12,345 in the English locale. // If you want the digit separator in your locale, translate as {1}. - sb.append(_("{0} port {1,number,#####} was successfully forwarded by UPnP.", protoToString(port.protocol), port.portNumber)); + sb.append(_t("{0} port {1,number,#####} was successfully forwarded by UPnP.", protoToString(port.protocol), port.portNumber)); else - sb.append(_("{0} port {1,number,#####} was not forwarded by UPnP.", protoToString(port.protocol), port.portNumber)); + sb.append(_t("{0} port {1,number,#####} was not forwarded by UPnP.", protoToString(port.protocol), port.portNumber)); } } @@ -994,7 +995,7 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { } if (_log.shouldLog(Log.INFO)) _log.info("Starting thread to forward " + portsToForwardNow.size() + " ports"); - Thread t = new Thread(new RegisterPortsThread(portsToForwardNow)); + Thread t = new I2PThread(new RegisterPortsThread(portsToForwardNow)); t.setName("UPnP Port Opener " + __id.incrementAndGet()); t.setDaemon(true); t.start(); @@ -1034,7 +1035,7 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { private void unregisterPorts(Set portsToForwardNow) { if (_log.shouldLog(Log.INFO)) _log.info("Starting thread to un-forward " + portsToForwardNow.size() + " ports"); - Thread t = new Thread(new UnregisterPortsThread(portsToForwardNow)); + Thread t = new I2PThread(new UnregisterPortsThread(portsToForwardNow)); t.setName("UPnP Port Closer " + __id.incrementAndGet()); t.setDaemon(true); t.start(); @@ -1101,21 +1102,21 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener { /** * Translate */ - private final String _(String s) { + private final String _t(String s) { return Translate.getString(s, _context, BUNDLE_NAME); } /** * Translate */ - private final String _(String s, Object o) { + private final String _t(String s, Object o) { return Translate.getString(s, o, _context, BUNDLE_NAME); } /** * Translate */ - private final String _(String s, Object o, Object o2) { + private final String _t(String s, Object o, Object o2) { return Translate.getString(s, o, o2, _context, BUNDLE_NAME); } } diff --git a/router/java/src/net/i2p/router/transport/UPnPManager.java b/router/java/src/net/i2p/router/transport/UPnPManager.java index 0ff6d5d84..9d7a6918a 100644 --- a/router/java/src/net/i2p/router/transport/UPnPManager.java +++ b/router/java/src/net/i2p/router/transport/UPnPManager.java @@ -233,7 +233,17 @@ class UPnPManager { public void portForwardStatus(Map statuses) { if (_log.shouldLog(Log.DEBUG)) _log.debug("UPnP Callback:"); + // Let's not have two of these running at once. + // Deadlock reported in ticket #1699 + // and the locking isn't foolproof in UDPTransport. + // UPnP runs the callbacks in a thread, so we can block. + // There is only one UPnPCallback, so lock on this + synchronized(this) { + locked_PFS(statuses); + } + } + private void locked_PFS(Map statuses) { byte[] ipaddr = null; DetectedIP[] ips = _upnp.getAddress(); if (ips != null) { @@ -244,6 +254,7 @@ class UPnPManager { _log.debug("External address: " + ip.publicAddress + " type: " + ip.natType); if (!ip.publicAddress.equals(_detectedAddress)) { _detectedAddress = ip.publicAddress; + // deadlock path 1 _manager.externalAddressReceived(SOURCE_UPNP, _detectedAddress.getAddress(), 0); } ipaddr = ip.publicAddress.getAddress(); @@ -269,6 +280,7 @@ class UPnPManager { else continue; boolean success = fps.status >= ForwardPortStatus.MAYBE_SUCCESS; + // deadlock path 2 _manager.forwardPortStatus(style, ipaddr, fp.portNumber, fps.externalPort, success, fps.reasonString); } } @@ -280,7 +292,7 @@ class UPnPManager { */ public String renderStatusHTML() { if (!_isRunning) - return "

                                    " + _("UPnP is not enabled") + "

                                    \n"; + return "

                                    " + _t("UPnP is not enabled") + "

                                    \n"; return _upnp.renderStatusHTML(); } @@ -289,7 +301,7 @@ class UPnPManager { /** * Translate */ - private final String _(String s) { + private final String _t(String s) { return Translate.getString(s, _context, BUNDLE_NAME); } diff --git a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java index 382d4d89e..c38e932d5 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java +++ b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java @@ -1341,26 +1341,26 @@ public class NTCPTransport extends TransportImpl { } StringBuilder buf = new StringBuilder(512); - buf.append("

                                    ").append(_("NTCP connections")).append(": ").append(peers.size()); - buf.append(". ").append(_("Limit")).append(": ").append(getMaxConnections()); - buf.append(". ").append(_("Timeout")).append(": ").append(DataHelper.formatDuration2(_pumper.getIdleTimeout())); + buf.append("

                                    ").append(_t("NTCP connections")).append(": ").append(peers.size()); + buf.append(". ").append(_t("Limit")).append(": ").append(getMaxConnections()); + buf.append(". ").append(_t("Timeout")).append(": ").append(DataHelper.formatDuration2(_pumper.getIdleTimeout())); if (_context.getBooleanProperty(PROP_ADVANCED)) { - buf.append(". ").append(_("Status")).append(": ").append(_(getReachabilityStatus().toStatusString())); + buf.append(". ").append(_t("Status")).append(": ").append(_t(getReachabilityStatus().toStatusString())); } buf.append(".

                                    \n" + "\n" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - //"" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + //"" + " \n"); out.write(buf.toString()); buf.setLength(0); @@ -1372,9 +1372,9 @@ public class NTCPTransport extends TransportImpl { // buf.append(' ').append(_context.blocklist().toStr(ip)); buf.append("
                                    ").append(_("Peer")).append("").append(_("Dir")).append("").append(_("IPv6")).append("").append(_("Idle")).append("").append(_("In/Out")).append("").append(_("Up")).append("").append(_("Skew")).append("").append(_("TX")).append("").append(_("RX")).append("").append(_("Out Queue")).append("").append(_("Backlogged?")).append("").append(_("Reading?")).append("
                                    ").append(_t("Peer")).append("").append(_t("Dir")).append("").append(_t("IPv6")).append("").append(_t("Idle")).append("").append(_t("In/Out")).append("").append(_t("Up")).append("").append(_t("Skew")).append("").append(_t("TX")).append("").append(_t("RX")).append("").append(_t("Out Queue")).append("").append(_t("Backlogged?")).append("").append(_t("Reading?")).append("
                                    "); if (con.isInbound()) - buf.append("\"Inbound\""); + buf.append("\"Inbound\""); else - buf.append("\"Outbound\""); + buf.append("\"Outbound\""); buf.append(""); if (con.isIPv6()) buf.append("✓"); diff --git a/router/java/src/net/i2p/router/transport/udp/TimedWeightedPriorityMessageQueue.java b/router/java/src/net/i2p/router/transport/udp/TimedWeightedPriorityMessageQueue.java index 193c1751f..c6dbdb8e2 100644 --- a/router/java/src/net/i2p/router/transport/udp/TimedWeightedPriorityMessageQueue.java +++ b/router/java/src/net/i2p/router/transport/udp/TimedWeightedPriorityMessageQueue.java @@ -57,6 +57,7 @@ class TimedWeightedPriorityMessageQueue implements MessageQueue, OutboundMessage * specifically, this means how many messages in this queue * should be pulled off in a row before moving on to the next. */ + @SuppressWarnings({ "unchecked", "rawtypes" }) public TimedWeightedPriorityMessageQueue(RouterContext ctx, int[] priorityLimits, int[] weighting, FailedListener lsnr) { _context = ctx; _log = ctx.logManager().getLog(TimedWeightedPriorityMessageQueue.class); diff --git a/router/java/src/net/i2p/router/transport/udp/UDPAddress.java b/router/java/src/net/i2p/router/transport/udp/UDPAddress.java index 691601933..3d22e41b7 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPAddress.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPAddress.java @@ -4,6 +4,8 @@ import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Map; +import org.apache.http.conn.util.InetAddressUtils; + import net.i2p.data.Base64; import net.i2p.data.router.RouterAddress; import net.i2p.data.SessionKey; @@ -262,12 +264,9 @@ class UDPAddress { } if (rv == null) { try { - boolean isIPv4 = host.replaceAll("[0-9\\.]", "").length() == 0; - if (isIPv4 && host.replaceAll("[0-9]", "").length() != 3) - return null; rv = InetAddress.getByName(host); - if (isIPv4 || - host.replaceAll("[0-9a-fA-F:]", "").length() == 0) { + if (InetAddressUtils.isIPv4Address(host) || + InetAddressUtils.isIPv6Address(host)) { synchronized (_inetAddressCache) { _inetAddressCache.put(host, rv); } diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index c616e5a82..edcfef26b 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -86,6 +86,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority private final DHSessionKeyBuilder.Factory _dhFactory; private int _mtu; private int _mtu_ipv6; + private boolean _mismatchLogged; /** * Do we have a public IPv6 address? @@ -992,6 +993,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority // save PROP_EXTERNAL_PORT _context.router().saveConfig(changes, null); } + // deadlock thru here ticket #1699 _context.router().rebuildRouterInfo(); } _testEvent.forceRunImmediately(); @@ -1229,10 +1231,12 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority _expireEvent.remove(oldPeer2); } - if (_log.shouldLog(Log.WARN) && _peersByIdent.size() != _peersByRemoteHost.size()) + if (_log.shouldLog(Log.WARN) && !_mismatchLogged && _peersByIdent.size() != _peersByRemoteHost.size()) { + _mismatchLogged = true; _log.warn("Size Mismatch after add: " + peer + " byIDsz = " + _peersByIdent.size() + " byHostsz = " + _peersByRemoteHost.size()); + } _activeThrottle.unchoke(peer.getRemotePeer()); markReachable(peer.getRemotePeer(), peer.isInbound()); @@ -2112,6 +2116,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority * @since 0.9.18 */ private RouterAddress getCurrentExternalAddress(boolean isIPv6) { + // deadlock thru here ticket #1699 synchronized (_rebuildLock) { return isIPv6 ? _currentOurV6Address : _currentOurV4Address; } @@ -2462,58 +2467,58 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority int numPeers = 0; StringBuilder buf = new StringBuilder(512); - buf.append("

                                    ").append(_("UDP connections")).append(": ").append(peers.size()); - buf.append(". ").append(_("Limit")).append(": ").append(getMaxConnections()); - buf.append(". ").append(_("Timeout")).append(": ").append(DataHelper.formatDuration2(_expireTimeout)); + buf.append("

                                    ").append(_t("UDP connections")).append(": ").append(peers.size()); + buf.append(". ").append(_t("Limit")).append(": ").append(getMaxConnections()); + buf.append(". ").append(_t("Timeout")).append(": ").append(DataHelper.formatDuration2(_expireTimeout)); if (_context.getBooleanProperty(PROP_ADVANCED)) { - buf.append(". ").append(_("Status")).append(": ").append(_(_reachabilityStatus.toStatusString())); + buf.append(". ").append(_t("Status")).append(": ").append(_t(_reachabilityStatus.toStatusString())); } buf.append(".

                                    \n"); buf.append("\n"); - buf.append(""); - buf.append("\n"); - buf.append("\n"); buf.append("\n"); buf.append("\n"); buf.append("\n"); - buf.append("\n"); out.write(buf.toString()); buf.setLength(0); @@ -2529,17 +2534,17 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority // buf.append(' ').append(_context.blocklist().toStr(ip)); buf.append(""); buf.append("
                                    ").append(_("Peer")).append("
                                    "); + buf.append("
                                    ").append(_t("Peer")).append("
                                    "); if (sortFlags != FLAG_ALPHA) - appendSortLinks(buf, urlBase, sortFlags, _("Sort by peer hash"), FLAG_ALPHA); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by peer hash"), FLAG_ALPHA); buf.append("
                                    ").append(_("Dir")) - .append("").append(_("IPv6")) - .append("").append(_("Idle")).append("
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by idle inbound"), FLAG_IDLE_IN); + .append(_t("Direction/Introduction")).append("\">").append(_t("Dir")) + .append("
                                    ").append(_t("IPv6")) + .append("").append(_t("Idle")).append("
                                    "); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by idle inbound"), FLAG_IDLE_IN); buf.append(" / "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by idle outbound"), FLAG_IDLE_OUT); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by idle outbound"), FLAG_IDLE_OUT); buf.append("
                                    ").append(_("In/Out")).append("
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by inbound rate"), FLAG_RATE_IN); + buf.append("
                                    ").append(_t("In/Out")).append("
                                    "); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by inbound rate"), FLAG_RATE_IN); buf.append(" / "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by outbound rate"), FLAG_RATE_OUT); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by outbound rate"), FLAG_RATE_OUT); buf.append("
                                    ").append(_("Up")).append("
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by connection uptime"), FLAG_UPTIME); - buf.append("
                                    ").append(_("Skew")).append("
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by clock skew"), FLAG_SKEW); + buf.append("
                                    ").append(_t("Up")).append("
                                    "); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by connection uptime"), FLAG_UPTIME); + buf.append("
                                    ").append(_t("Skew")).append("
                                    "); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by clock skew"), FLAG_SKEW); buf.append("
                                    CWND
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by congestion window"), FLAG_CWND); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by congestion window"), FLAG_CWND); buf.append("
                                    SST
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by slow start threshold"), FLAG_SSTHRESH); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by slow start threshold"), FLAG_SSTHRESH); buf.append("
                                    RTT
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by round trip time"), FLAG_RTT); - //buf.append("
                                    ").append(_("Dev")).append("
                                    "); - //appendSortLinks(buf, urlBase, sortFlags, _("Sort by round trip time deviation"), FLAG_DEV); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by round trip time"), FLAG_RTT); + //buf.append("
                                    ").append(_t("Dev")).append("
                                    "); + //appendSortLinks(buf, urlBase, sortFlags, _t("Sort by round trip time deviation"), FLAG_DEV); buf.append("
                                    RTO
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by retransmission timeout"), FLAG_RTO); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by retransmission timeout"), FLAG_RTO); buf.append("
                                    MTU
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by outbound maximum transmit unit"), FLAG_MTU); - buf.append("
                                    ").append(_("TX")).append("
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by packets sent"), FLAG_SEND); - buf.append("
                                    ").append(_("RX")).append("
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by packets received"), FLAG_RECV); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by outbound maximum transmit unit"), FLAG_MTU); + buf.append("
                                    ").append(_t("TX")).append("
                                    "); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets sent"), FLAG_SEND); + buf.append("
                                    ").append(_t("RX")).append("
                                    "); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets received"), FLAG_RECV); buf.append("
                                    ").append(_("Dup TX")).append("
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by packets retransmitted"), FLAG_RESEND); - buf.append("
                                    ").append(_("Dup RX")).append("
                                    "); - appendSortLinks(buf, urlBase, sortFlags, _("Sort by packets received more than once"), FLAG_DUP); + buf.append("
                                    ").append(_t("Dup TX")).append("
                                    "); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets retransmitted"), FLAG_RESEND); + buf.append("
                                    ").append(_t("Dup RX")).append("
                                    "); + appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets received more than once"), FLAG_DUP); buf.append("
                                    "); if (peer.isInbound()) - buf.append("\"Inbound\""); + buf.append("\"Inbound\""); else - buf.append("\"Outbound\""); + buf.append("\"Outbound\""); if (peer.getWeRelayToThemAs() > 0) - buf.append("  \"^\""); + buf.append("  \"^\""); if (peer.getTheyRelayToUsAs() > 0) - buf.append("  \"V\""); + buf.append("  \"V\""); boolean appended = false; if (_activeThrottle.isChoked(peer.getRemotePeer())) { - buf.append("
                                    ").append(_("Choked")).append(""); + buf.append("
                                    ").append(_t("Choked")).append(""); appended = true; } int cfs = peer.getConsecutiveFailedSends(); @@ -2547,15 +2552,15 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority if (!appended) buf.append("
                                    "); buf.append(" "); if (cfs == 1) - buf.append(_("1 fail")); + buf.append(_t("1 fail")); else - buf.append(_("{0} fails", cfs)); + buf.append(_t("{0} fails", cfs)); buf.append(""); appended = true; } if (_context.banlist().isBanlisted(peer.getRemotePeer(), STYLE)) { if (!appended) buf.append("
                                    "); - buf.append(" ").append(_("Banned")).append(""); + buf.append(" ").append(_t("Banned")).append(""); appended = true; } //byte[] ip = getIP(peer.getRemotePeer()); @@ -2614,7 +2619,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority buf.append(THINSP).append(peer.getConcurrentSendWindow()); buf.append(THINSP).append(peer.getConsecutiveSendRejections()); if (peer.isBacklogged()) - buf.append(' ').append(_("backlogged")); + buf.append(' ').append(_t("backlogged")); buf.append("
                                    "); @@ -2946,7 +2951,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority " from: ", new Exception("traceback")); if (old != Status.UNKNOWN) _context.router().eventLog().addEvent(EventLog.REACHABILITY, - "from " + _(old.toStatusString()) + " to " + _(status.toStatusString())); + "from " + _t(old.toStatusString()) + " to " + _t(status.toStatusString())); // Always rebuild when the status changes, even if our address hasn't changed, // as rebuildExternalAddress() calls replaceAddress() which calls CSFI.notifyReplaceAddress() // which will start up NTCP inbound when we transition to OK. diff --git a/router/java/src/net/i2p/router/tunnel/PumpedTunnelGateway.java b/router/java/src/net/i2p/router/tunnel/PumpedTunnelGateway.java index 614c7faab..4f1f82d87 100644 --- a/router/java/src/net/i2p/router/tunnel/PumpedTunnelGateway.java +++ b/router/java/src/net/i2p/router/tunnel/PumpedTunnelGateway.java @@ -58,6 +58,7 @@ class PumpedTunnelGateway extends TunnelGateway { * @param receiver this receives the encrypted message and forwards it off * to the first hop */ + @SuppressWarnings({ "unchecked", "rawtypes" }) public PumpedTunnelGateway(RouterContext context, QueuePreprocessor preprocessor, Sender sender, Receiver receiver, TunnelGatewayPumper pumper) { super(context, preprocessor, sender, receiver); diff --git a/router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java b/router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java index c799bd16a..5b2bdfb2a 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java +++ b/router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java @@ -640,7 +640,9 @@ class BuildHandler implements Runnable { _context.statManager().addRateData("tunnel.rejectHostile", 1); // We are 2 hops in a row? Drop it without a reply. // No way to recognize if we are every other hop, but see below - _log.error("Dropping build request, we are the next hop"); + // old i2pd + if (_log.shouldWarn()) + _log.warn("Dropping build request, we are the next hop"); return; } // previous test should be sufficient to keep it from getting here but maybe not? diff --git a/router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java b/router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java index 6bb81fbc8..b6b141e7a 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java +++ b/router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java @@ -33,12 +33,12 @@ class ExploratoryPeerSelector extends TunnelPeerSelector { return null; } - if (false && shouldSelectExplicit(settings)) { - List rv = selectExplicit(settings, length); - if (l.shouldLog(Log.DEBUG)) - l.debug("Explicit peers selected: " + rv); - return rv; - } + //if (false && shouldSelectExplicit(settings)) { + // List rv = selectExplicit(settings, length); + // if (l.shouldLog(Log.DEBUG)) + // l.debug("Explicit peers selected: " + rv); + // return rv; + //} Set exclude = getExclude(settings.isInbound(), true); exclude.add(ctx.routerHash()); @@ -55,34 +55,43 @@ class ExploratoryPeerSelector extends TunnelPeerSelector { // FloodfillNetworkDatabaseFacade fac = (FloodfillNetworkDatabaseFacade)ctx.netDb(); // exclude.addAll(fac.getFloodfillPeers()); HashSet matches = new HashSet(length); - boolean exploreHighCap = shouldPickHighCap(); - // - // We don't honor IP Restriction here, to be fixed - // + if (length > 0) { + boolean exploreHighCap = shouldPickHighCap(); - // If hidden and inbound, use fast peers - that we probably have recently - // connected to and so they have our real RI - to maximize the chance - // that the adjacent hop can connect to us. - if (settings.isInbound() && ctx.router().isHidden()) { - if (l.shouldLog(Log.INFO)) - l.info("EPS SFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size()); - ctx.profileOrganizer().selectFastPeers(length, exclude, matches); - } else if (exploreHighCap) { - if (l.shouldLog(Log.INFO)) - l.info("EPS SHCP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size()); - ctx.profileOrganizer().selectHighCapacityPeers(length, exclude, matches); - } else if (ctx.commSystem().haveHighOutboundCapacity()) { - if (l.shouldLog(Log.INFO)) - l.info("EPS SNFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size()); - ctx.profileOrganizer().selectNotFailingPeers(length, exclude, matches, false); - } else { // use only connected peers so we don't make more connections - if (l.shouldLog(Log.INFO)) - l.info("EPS SANFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size()); - ctx.profileOrganizer().selectActiveNotFailingPeers(length, exclude, matches); + // + // We don't honor IP Restriction here, to be fixed + // + + // If hidden and inbound, use fast peers - that we probably have recently + // connected to and so they have our real RI - to maximize the chance + // that the adjacent hop can connect to us. + if (settings.isInbound() && ctx.router().isHidden()) { + if (l.shouldLog(Log.INFO)) + l.info("EPS SFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size()); + ctx.profileOrganizer().selectFastPeers(length, exclude, matches); + } else if (exploreHighCap) { + if (l.shouldLog(Log.INFO)) + l.info("EPS SHCP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size()); + ctx.profileOrganizer().selectHighCapacityPeers(length, exclude, matches); + } else if (ctx.commSystem().haveHighOutboundCapacity()) { + if (l.shouldLog(Log.INFO)) + l.info("EPS SNFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size()); + // As of 0.9.23, we include a max of 2 not failing peers, + // to improve build success on 3-hop tunnels. + // Peer org credits existing items in matches + if (length > 2) + ctx.profileOrganizer().selectHighCapacityPeers(length - 2, exclude, matches); + ctx.profileOrganizer().selectNotFailingPeers(length, exclude, matches, false); + } else { // use only connected peers so we don't make more connections + if (l.shouldLog(Log.INFO)) + l.info("EPS SANFP " + length + (settings.isInbound() ? " IB" : " OB") + " exclude " + exclude.size()); + ctx.profileOrganizer().selectActiveNotFailingPeers(length, exclude, matches); + } + + matches.remove(ctx.routerHash()); } - - matches.remove(ctx.routerHash()); + ArrayList rv = new ArrayList(matches); if (rv.size() > 1) orderPeers(rv, settings.getRandomKey()); diff --git a/router/java/src/org/cybergarage/xml/parser/JaxpParser.java b/router/java/src/org/cybergarage/xml/parser/JaxpParser.java index 332c5525f..af84b14f3 100644 --- a/router/java/src/org/cybergarage/xml/parser/JaxpParser.java +++ b/router/java/src/org/cybergarage/xml/parser/JaxpParser.java @@ -184,6 +184,40 @@ public class JaxpParser extends Parser } return rv; } + + /** @since 0.9.22 */ + @Override + public int read(byte[] b) throws IOException { + return this.read(b, 0, b.length); + } + + /** @since 0.9.22 */ + @Override + public int read(byte[] b, int off, int len) throws IOException { + if (b == null) { + throw new NullPointerException(); + } else if (off < 0 || len < 0 || len > b.length - off) { + throw new IndexOutOfBoundsException(); + } else if (len == 0) { + return 0; + } + + int rv = this.read(); + if (-1 == rv) { + return -1; + } + + int i = 1; + b[off] = (byte) rv; + for (; i < len; i++) { + rv = this.read(); + if (-1 == rv) { + break; + } + b[off + i] = (byte) rv; + } + return i; + } } /**