From 2df64cd098a1ee67d59561e382e928526e3d7f05 Mon Sep 17 00:00:00 2001 From: zzz Date: Mon, 9 Jan 2017 13:54:49 +0000 Subject: [PATCH 01/50] Copy README.txt contents to README.md so the github page is restored. --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 83d7e3bda..df6eaec0f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,51 @@ -Just to trigger automatic builds of docker image. +Prerequisites to build from source: + Java SDK (preferably Oracle/Sun or OpenJDK) 1.7.0 or higher + Non-linux operating systems and JVMs: See https://trac.i2p2.de/wiki/java + Certain subsystems for embedded (core, router, mstreaming, streaming, i2ptunnel) require only Java 1.6 + Apache Ant 1.7.0 or higher + The xgettext, msgfmt, and msgmerge tools installed + from the GNU gettext package http://www.gnu.org/software/gettext/ + Build environment must use a UTF-8 locale. -Sorry for the mess in the root directory. +To build: + On x86 systems do: + ant pkg -TODO: Change content :) + On non-x86, use one of the following instead: + ant installer-linux + ant installer-freebsd + ant installer-osx -(hub.docker.io requires a Dockerfile + README.md in root, to build from a repo) + Run 'ant' with no arguments to see other build options. + See INSTALL.txt or https://geti2p.net/download for installation instructions. + +Documentation: + https://geti2p.net/how + API: http://docs.i2p-projekt.de/javadoc/ + or run 'ant javadoc' then start at build/javadoc/index.html + +Latest release: + https://geti2p.net/download + +To get development branch from source control: + https://geti2p.net/newdevelopers + +FAQ: + https://geti2p.net/faq + +Need help? + IRC irc.freenode.net #i2p + http://forum.i2p/ + +Bug reports: + https://trac.i2p2.de/report/1 + +Contact information, security issues, press inquiries: + https://geti2p.net/en/contact + +Twitter: + @i2p, @geti2p + +Licenses: + See LICENSE.txt From 7cae467b59eac6ffd6aa9ff167cac23040279708 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 12 Jan 2017 15:54:06 +0000 Subject: [PATCH 02/50] DTG: Don't try to start if headless (ticket #1924) --- .../java/src/net/i2p/router/web/RouterConsoleRunner.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 7b0414d2e..a00e94d31 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java @@ -273,7 +273,7 @@ public class RouterConsoleRunner implements RouterApp { private void startTrayApp() { // if no permissions, don't even try // isLaunchedAsService() always returns true on Linux - if (SystemVersion.isLinuxService() || + if (GraphicsEnvironment.isHeadless() || SystemVersion.isLinuxService() || (SystemVersion.isWindows() && _context.hasWrapper() && WrapperManager.isLaunchedAsService())) { // required true for jrobin to work System.setProperty("java.awt.headless", "true"); @@ -285,8 +285,7 @@ public class RouterConsoleRunner implements RouterApp { boolean desktopguiEnabled = Boolean.parseBoolean(sdtg) || (sdtg == null && SystemVersion.isWindows()); if (desktopguiEnabled) { - //Check if we are in a headless environment, set properties accordingly - System.setProperty("java.awt.headless", Boolean.toString(GraphicsEnvironment.isHeadless())); + System.setProperty("java.awt.headless", "false"); net.i2p.desktopgui.Main dtg = new net.i2p.desktopgui.Main(_context, _mgr, null); dtg.startup(); } else { From a36083ab18167639d169b4c5e1c95b084a4d2b13 Mon Sep 17 00:00:00 2001 From: zzz Date: Tue, 17 Jan 2017 14:08:47 +0000 Subject: [PATCH 03/50] Utils: Java 9 yakkety workarounds --- .../src/engine/misc/DeallocationHelper.java | 23 ++++++++++++-- core/java/src/net/i2p/crypto/CryptoCheck.java | 30 ++++++++++++++++++- .../net/i2p/router/tasks/CryptoChecker.java | 7 ++++- 3 files changed, 56 insertions(+), 4 deletions(-) diff --git a/apps/jrobin/java/src/engine/misc/DeallocationHelper.java b/apps/jrobin/java/src/engine/misc/DeallocationHelper.java index 3bc2205e0..f37d83f1e 100644 --- a/apps/jrobin/java/src/engine/misc/DeallocationHelper.java +++ b/apps/jrobin/java/src/engine/misc/DeallocationHelper.java @@ -330,15 +330,34 @@ public class DeallocationHelper { // drops the "-internal" suffix from the major version number for // an early access build (Ubuntu) javaVersionElements[0] = javaVersionElements[0].substring(0, indexOfEarlyAccessSuffix); + } else { + indexOfEarlyAccessSuffix = javaVersionElements[0].lastIndexOf("-Ubuntu"); + if (indexOfEarlyAccessSuffix != -1) { + // drops the "-Ubuntu suffix from the major version number for + // an early access build (Ubuntu) + javaVersionElements[0] = javaVersionElements[0].substring(0, indexOfEarlyAccessSuffix); + } } } final int major, minor; if (javaVersionElements.length >= 2) { major = Integer.parseInt(javaVersionElements[0]); - minor = Integer.parseInt(javaVersionElements[1]); + int min; + try { + min = Integer.parseInt(javaVersionElements[1]); + } catch (NumberFormatException nfe) { + min = 7; + } + minor = min; } else { major = 1; - minor = Integer.parseInt(javaVersionElements[0]); + int min; + try { + min = Integer.parseInt(javaVersionElements[0]); + } catch (NumberFormatException nfe) { + min = 7; + } + minor = min; } final String directBufferAttachmentFieldName; if (minor == 1 && major <= 6) diff --git a/core/java/src/net/i2p/crypto/CryptoCheck.java b/core/java/src/net/i2p/crypto/CryptoCheck.java index 31eac62dc..01a6c9040 100644 --- a/core/java/src/net/i2p/crypto/CryptoCheck.java +++ b/core/java/src/net/i2p/crypto/CryptoCheck.java @@ -5,7 +5,8 @@ import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; /** - * Moved from CryptixAESEngine and net.i2p.router.tasks.CryptoChecker + * Moved from CryptixAESEngine and net.i2p.router.tasks.CryptoChecker. + * This class does not do any logging. See CryptoChecker for the logging. * * @since 0.9.23 */ @@ -28,6 +29,33 @@ public class CryptoCheck { unlimited = true; } catch (GeneralSecurityException gse) { } + } catch (ExceptionInInitializerError eiie) { + // Java 9 b134 bug + // > java -jar build/i2p.jar cryptocheck + // Exception in thread "main" java.lang.ExceptionInInitializerError + // at javax.crypto.JceSecurityManager.(java.base@9-Ubuntu/JceSecurityManager.java:65) + // at javax.crypto.Cipher.getConfiguredPermission(java.base@9-Ubuntu/Cipher.java:2595) + // at javax.crypto.Cipher.getMaxAllowedKeyLength(java.base@9-Ubuntu/Cipher.java:2619) + // at net.i2p.crypto.CryptoCheck.(CryptoCheck.java:19) + // at java.lang.Class.forName0(java.base@9-Ubuntu/Native Method) + // at java.lang.Class.forName(java.base@9-Ubuntu/Class.java:374) + // at net.i2p.util.CommandLine.exec(CommandLine.java:66) + // at net.i2p.util.CommandLine.main(CommandLine.java:51) + // Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism + // at javax.crypto.JceSecurity.(java.base@9-Ubuntu/JceSecurity.java:91) + // ... 8 more + // Caused by: java.lang.NullPointerException + // at sun.nio.fs.UnixPath.normalizeAndCheck(java.base@9-Ubuntu/UnixPath.java:75) + // at sun.nio.fs.UnixPath.(java.base@9-Ubuntu/UnixPath.java:69) + // at sun.nio.fs.UnixFileSystem.getPath(java.base@9-Ubuntu/UnixFileSystem.java:280) + // at java.nio.file.Paths.get(java.base@9-Ubuntu/Paths.java:84) + // at javax.crypto.JceSecurity.setupJurisdictionPolicies(java.base@9-Ubuntu/JceSecurity.java:254) + // at javax.crypto.JceSecurity.access$000(java.base@9-Ubuntu/JceSecurity.java:49) + // at javax.crypto.JceSecurity$1.run(java.base@9-Ubuntu/JceSecurity.java:82) + // at javax.crypto.JceSecurity$1.run(java.base@9-Ubuntu/JceSecurity.java:79) + // at java.security.AccessController.doPrivileged(java.base@9-Ubuntu/Native Method) + // at javax.crypto.JceSecurity.(java.base@9-Ubuntu/JceSecurity.java:78) + // ... 8 more } _isUnlimited = unlimited; } diff --git a/router/java/src/net/i2p/router/tasks/CryptoChecker.java b/router/java/src/net/i2p/router/tasks/CryptoChecker.java index 49bd84da5..4edcbb9ca 100644 --- a/router/java/src/net/i2p/router/tasks/CryptoChecker.java +++ b/router/java/src/net/i2p/router/tasks/CryptoChecker.java @@ -57,8 +57,13 @@ public class CryptoChecker { if (log != null) log.logAlways(Log.WARN, s); System.out.println(s); + } else if (SystemVersion.isJava9()) { + s = "Java 9 support is beta, check for Java updates"; + if (log != null) + log.logAlways(Log.WARN, s); + System.out.println("Warning: " + s); } - if (!CryptoCheck.isUnlimited()) { + if (!CryptoCheck.isUnlimited() && !SystemVersion.isJava9()) { s = "Please consider installing the Java Cryptography Unlimited Strength Jurisdiction Policy Files from "; //if (SystemVersion.isJava8()) // s += JRE8; From 60c93f1e1c67df54e8b8594dff20cf23e7f14271 Mon Sep 17 00:00:00 2001 From: zzz Date: Tue, 17 Jan 2017 15:34:38 +0000 Subject: [PATCH 04/50] Client: Don't log error on datagram dissector fail (ticket #1915), let the client do the logging. Throw early if data too short --- .../net/i2p/client/datagram/I2PDatagramDissector.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/java/src/net/i2p/client/datagram/I2PDatagramDissector.java b/core/java/src/net/i2p/client/datagram/I2PDatagramDissector.java index 42cf701bf..e40114293 100644 --- a/core/java/src/net/i2p/client/datagram/I2PDatagramDissector.java +++ b/core/java/src/net/i2p/client/datagram/I2PDatagramDissector.java @@ -31,6 +31,7 @@ import net.i2p.util.Log; public final class I2PDatagramDissector { private static final int DGRAM_BUFSIZE = 32768; + private static final int MIN_DGRAM_SIZE = 387 + 40; private final DSAEngine dsaEng = DSAEngine.getInstance(); private final SHA256Generator hashGen = SHA256Generator.getInstance(); @@ -68,9 +69,12 @@ public final class I2PDatagramDissector { * @throws DataFormatException If there's an error in the datagram format */ public void loadI2PDatagram(byte[] dgram) throws DataFormatException { - ByteArrayInputStream dgStream = new ByteArrayInputStream(dgram); // set invalid(very important!) this.valid = false; + if (dgram.length < MIN_DGRAM_SIZE) + throw new DataFormatException("repliable datagram too small: " + dgram.length); + + ByteArrayInputStream dgStream = new ByteArrayInputStream(dgram); try { // read destination @@ -96,8 +100,9 @@ public final class I2PDatagramDissector { rxHash = null; } } catch (IOException e) { - Log log = I2PAppContext.getGlobalContext().logManager().getLog(I2PDatagramDissector.class); - log.error("Error loading datagram", e); + // let the application do the logging + //Log log = I2PAppContext.getGlobalContext().logManager().getLog(I2PDatagramDissector.class); + //log.error("Error loading datagram", e); throw new DataFormatException("Error loading datagram", e); //} catch(AssertionError e) { // Log log = I2PAppContext.getGlobalContext().logManager().getLog(I2PDatagramDissector.class); From 7311cf33b7e9bb0306220552f13a3dfb80d2aaf8 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 19 Jan 2017 13:25:56 +0000 Subject: [PATCH 05/50] Utils: Gzip test code refresh --- .../net/i2p/util/ReusableGZIPInputStream.java | 26 +++++++++---------- .../i2p/util/ReusableGZIPOutputStream.java | 10 +++---- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/core/java/src/net/i2p/util/ReusableGZIPInputStream.java b/core/java/src/net/i2p/util/ReusableGZIPInputStream.java index a7f50542e..1c16bea2d 100644 --- a/core/java/src/net/i2p/util/ReusableGZIPInputStream.java +++ b/core/java/src/net/i2p/util/ReusableGZIPInputStream.java @@ -63,18 +63,18 @@ public class ReusableGZIPInputStream extends ResettableGZIPInputStream { private static void test() { byte b[] = "hi, how are you today?".getBytes(); try { - ByteArrayOutputStream baos = new ByteArrayOutputStream(64); - GZIPOutputStream o = new GZIPOutputStream(baos); + java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(64); + ResettableGZIPOutputStream o = new ResettableGZIPOutputStream(baos); o.write(b); o.finish(); o.flush(); byte compressed[] = baos.toByteArray(); ReusableGZIPInputStream in = ReusableGZIPInputStream.acquire(); - in.initialize(new ByteArrayInputStream(compressed)); + in.initialize(new java.io.ByteArrayInputStream(compressed)); byte rv[] = new byte[128]; int read = in.read(rv); - if (!DataHelper.eq(rv, 0, b, 0, b.length)) + if (!net.i2p.data.DataHelper.eq(rv, 0, b, 0, b.length)) throw new RuntimeException("foo, read=" + read); else System.out.println("match, w00t"); @@ -84,18 +84,18 @@ public class ReusableGZIPInputStream extends ResettableGZIPInputStream { private static boolean test(int size) { byte b[] = new byte[size]; - new java.util.Random().nextBytes(b); + RandomSource.getInstance().nextBytes(b); try { - ByteArrayOutputStream baos = new ByteArrayOutputStream(size); - GZIPOutputStream o = new GZIPOutputStream(baos); + java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(size); + ResettableGZIPOutputStream o = new ResettableGZIPOutputStream(baos); o.write(b); o.finish(); o.flush(); byte compressed[] = baos.toByteArray(); ReusableGZIPInputStream in = ReusableGZIPInputStream.acquire(); - in.initialize(new ByteArrayInputStream(compressed)); - ByteArrayOutputStream baos2 = new ByteArrayOutputStream(size); + in.initialize(new java.io.ByteArrayInputStream(compressed)); + java.io.ByteArrayOutputStream baos2 = new java.io.ByteArrayOutputStream(size); byte rbuf[] = new byte[128]; try { while (true) { @@ -104,9 +104,9 @@ public class ReusableGZIPInputStream extends ResettableGZIPInputStream { break; baos2.write(rbuf, 0, read); } - } catch (IOException ioe) { + } catch (java.io.IOException ioe) { ioe.printStackTrace(); - long crcVal = in.getCurrentCRCVal(); + //long crcVal = in.getCurrentCRCVal(); //try { in.verifyFooter(); } catch (IOException ioee) { // ioee.printStackTrace(); //} @@ -120,10 +120,10 @@ public class ReusableGZIPInputStream extends ResettableGZIPInputStream { if (rv.length != b.length) throw new RuntimeException("read length: " + rv.length + " expected: " + b.length); - if (!DataHelper.eq(rv, 0, b, 0, b.length)) { + if (!net.i2p.data.DataHelper.eq(rv, 0, b, 0, b.length)) { throw new RuntimeException("foo, read=" + rv.length); } else { - System.out.println("match, w00t"); + System.out.println("match, w00t @ " + size); return true; } } catch (Exception e) { diff --git a/core/java/src/net/i2p/util/ReusableGZIPOutputStream.java b/core/java/src/net/i2p/util/ReusableGZIPOutputStream.java index aa670a9ef..2771c7209 100644 --- a/core/java/src/net/i2p/util/ReusableGZIPOutputStream.java +++ b/core/java/src/net/i2p/util/ReusableGZIPOutputStream.java @@ -89,7 +89,7 @@ public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream { try { for (int i = 0; i < 2; i++) test(); - for (int i = 500; i < 64*1024; i++) { + for (int i = 0; i < 64*1024; i++) { if (!test(i)) break; } } catch (Exception e) { e.printStackTrace(); } @@ -106,7 +106,7 @@ public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream { byte compressed[] = o.getData(); ReusableGZIPOutputStream.release(o); - GZIPInputStream in = new GZIPInputStream(new ByteArrayInputStream(compressed)); + ResettableGZIPInputStream in = new ResettableGZIPInputStream(new java.io.ByteArrayInputStream(compressed)); byte rv[] = new byte[128]; int read = in.read(rv); if (!DataHelper.eq(rv, 0, b, 0, b.length)) @@ -118,7 +118,7 @@ public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream { private static boolean test(int size) { byte b[] = new byte[size]; - new java.util.Random().nextBytes(b); + RandomSource.getInstance().nextBytes(b); try { ReusableGZIPOutputStream o = ReusableGZIPOutputStream.acquire(); o.write(b); @@ -127,8 +127,8 @@ public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream { byte compressed[] = o.getData(); ReusableGZIPOutputStream.release(o); - GZIPInputStream in = new GZIPInputStream(new ByteArrayInputStream(compressed)); - ByteArrayOutputStream baos2 = new ByteArrayOutputStream(256*1024); + ResettableGZIPInputStream in = new ResettableGZIPInputStream(new java.io.ByteArrayInputStream(compressed)); + ByteArrayOutputStream baos2 = new ByteArrayOutputStream(size); byte rbuf[] = new byte[128]; while (true) { int read = in.read(rbuf); From b66c7802e7c1eaa15471f2cb09636abd7212eae3 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 19 Jan 2017 13:28:40 +0000 Subject: [PATCH 06/50] Add new reseed reseed.onion.im --- .../reseed/lazygravy_at_mail.i2p.crt | 34 ++++++++++++++++++ .../certificates/ssl/reseed.onion.im.crt | 36 +++++++++++++++++++ .../i2p/router/networkdb/reseed/Reseeder.java | 1 + 3 files changed, 71 insertions(+) create mode 100644 installer/resources/certificates/reseed/lazygravy_at_mail.i2p.crt create mode 100644 installer/resources/certificates/ssl/reseed.onion.im.crt diff --git a/installer/resources/certificates/reseed/lazygravy_at_mail.i2p.crt b/installer/resources/certificates/reseed/lazygravy_at_mail.i2p.crt new file mode 100644 index 000000000..1ff5346cb --- /dev/null +++ b/installer/resources/certificates/reseed/lazygravy_at_mail.i2p.crt @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIFzTCCA7WgAwIBAgIQCnVoosrOolXsY+bR5kByeTANBgkqhkiG9w0BAQsFADBy +MQswCQYDVQQGEwJYWDELMAkGA1UEBxMCWFgxCzAJBgNVBAkTAlhYMR4wHAYDVQQK +ExVJMlAgQW5vbnltb3VzIE5ldHdvcmsxDDAKBgNVBAsTA0kyUDEbMBkGA1UEAwwS +bGF6eWdyYXZ5QG1haWwuaTJwMB4XDTE2MTIyNzE1NDEzNloXDTI2MTIyNzE1NDEz +NlowcjELMAkGA1UEBhMCWFgxCzAJBgNVBAcTAlhYMQswCQYDVQQJEwJYWDEeMBwG +A1UEChMVSTJQIEFub255bW91cyBOZXR3b3JrMQwwCgYDVQQLEwNJMlAxGzAZBgNV +BAMMEmxhenlncmF2eUBtYWlsLmkycDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC +AgoCggIBAN3q+0nUzz9+CBSoXUNf8K6kIc9zF+OP1NVBmOu3zTtkcEnhTtoDNXeU +EV8DhlBhEACbPomA+szQ5zp3O3OYQc2NV50S7KKqlfn5LBBE3BL2grTeBxUMysDd +0TlpxcHKwaog4TZtkHxeNO94F1vgeOkOnlpCQ6H3cMkPEGG3zu1A1ccgPiYO838/ +HNMkSF//VZJLOfPe1vmn9xTB7wZ0DLpEh12QZGg3irA+QDX5zy6Ffl+/Lp+L4tXT +uPZUaC6CL6EABX4DvQcFrOtiWfkbi/ROgYCeTrYw1XbDHfPc+MBxGo1bX7JjnD0o +mFFvo+PjxvWDmCad2TaITh6DwGEeWKu8NtJAyaO5p1ntauuWGB5Xzua4aMmIy7GT +esHQkhW+5IooM0R5bZI8/KXo4Bj52bX5qv+oBiExc6PUUTLWyjoWHb7fKdddwGfc +lUfniV/fw7/9ysIkQZcXLDCXR6O/nH9aGDZ7bxHedw4/LxAXYPfNojb5j7ZVa65o +PWD5xuQfbE+95DdbnKjcjYiam4kjApe7YPwOhtoRJYSGAkrpIMfzFxCXgjTsi3Kw +Ov+sYmBvWBK4ROWQZTgHei3x4FpAGWHCAeTeeQGKmWQ8tT7ZklWD9fBm3J/KXo7I +WCxRW9oedItyqbRuAGxqaoaGSk6TtPVjyPIUExDp1dr4p1nM1TOLAgMBAAGjXzBd +MA4GA1UdDwEB/wQEAwIChDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw +DwYDVR0TAQH/BAUwAwEB/zAbBgNVHQ4EFAQSbGF6eWdyYXZ5QG1haWwuaTJwMA0G +CSqGSIb3DQEBCwUAA4ICAQA2fei/JajeQ7Rn0Hu3IhgF9FDXyxDfcS9Kp+gHE56A +50VOtOcvAQabi/+lt5DqkiBwanj0Ti/ydFRyEmPo45+fUfFuCgXcofro8PGGqFEz +rZGtknH/0hiGfhLR9yQXY8xFS4yvLZvuIcTHa9QPJg3tB9KeYQzF91NQVb5XAyE7 +O3RvollADTV31Xbhxjb7lgra6ff9dZQJE6xtlSk/mnhILjlW80+iPKuj3exBgbJv +ktiR4ZT4xjh1ZgNJX5br86MZrhyyyGWwHWHS0e443eSrrmAPD69zxsfvhoikRX1z +tDz0zB70DwS4pSbVrFuWaIAcbg36vWO8tYPBzV8iBB/tBTURGJjv6Q0EoI5GHmJi +LOhU3B6xublv8Tcoc3tgMqI9STnWROtTiCS6LsWNSXhVpIZqvaiOEtPN4HyL33sf +j5rfPq76gKrTloeLnwLGq0Rs94ScffYkBap3fQ/ALb87LQcwSN4EkObur5pcd7TS +qNdanvCGK8v1UYVzH4l9jekPGsM5euohwAkIl1kZ6+tqGY/MTa7HwTTQyLDTco1t +sPy6neN46+H5DYHADyU5H2G39Kk3WcLmPtfxlPDM6e73+47fJkXnmiaWM0Lrt80y +Enng6bFGMZH01ZsqBk09H+Uswv8h7k69q9uWAS95KE0omCMVtIpoPZXTnRhe6mBC ++g== +-----END CERTIFICATE----- diff --git a/installer/resources/certificates/ssl/reseed.onion.im.crt b/installer/resources/certificates/ssl/reseed.onion.im.crt new file mode 100644 index 000000000..cf00a64b9 --- /dev/null +++ b/installer/resources/certificates/ssl/reseed.onion.im.crt @@ -0,0 +1,36 @@ +-----BEGIN CERTIFICATE----- +MIIGNjCCBB6gAwIBAgIJAN7RN19/cj4aMA0GCSqGSIb3DQEBCwUAMIGvMQswCQYD +VQQGEwJVUzEYMBYGA1UECAwPcmVzZWVkLm9uaW9uLmltMRgwFgYDVQQHDA9yZXNl +ZWQub25pb24uaW0xGDAWBgNVBAoMD3Jlc2VlZC5vbmlvbi5pbTEYMBYGA1UECwwP +cmVzZWVkLm9uaW9uLmltMRgwFgYDVQQDDA9yZXNlZWQub25pb24uaW0xHjAcBgkq +hkiG9w0BCQEWD3Jlc2VlZC5vbmlvbi5pbTAeFw0xNjEyMjkwMDAzNDlaFw0yMTAy +MDYwMDAzNDlaMIGvMQswCQYDVQQGEwJVUzEYMBYGA1UECAwPcmVzZWVkLm9uaW9u +LmltMRgwFgYDVQQHDA9yZXNlZWQub25pb24uaW0xGDAWBgNVBAoMD3Jlc2VlZC5v +bmlvbi5pbTEYMBYGA1UECwwPcmVzZWVkLm9uaW9uLmltMRgwFgYDVQQDDA9yZXNl +ZWQub25pb24uaW0xHjAcBgkqhkiG9w0BCQEWD3Jlc2VlZC5vbmlvbi5pbTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPQLxKdxu3Jwzirk49WRh2bAL54w +Y9twCiIYSF9Hp5SGt/BHe4USlG1gRwhiBRUGveVeJuDripw2LOhsPncqovLhGaj/ +Kz1RSLMjGkNp1hOe6WC4RCT3FfMtTsiSXqcAEItQ64Yq3bHDa3mwYYbid86YZJsI +rcE3yxv8Ycy+cnGN0ylcexdn82c7xjgoSu5cIfhl/2wZZi39g2/WnQxVkYNmKYlZ +4S94N4bkifXYBhpfSlNP303WtkVngBHuq0lK/UAOjMsiJnENQGggKOW62PxnZ7fN +kce9+ZyhI1kFje6dT8JPAxf6GVZOsx1Sn8dtn1+n0SUpWZZEvKetyMhHHdHKiRKP +egMotOZr/FCq904Ro2TaJKV372SVwuBRmvZ4a4pJMrQfyMQOGMU774V83O/ZElTG +RLvKyR4Wxdw3+6sg9gZGjtRgOFmWMemo9wCk9UhBYlz5junHD44BZQv8n1mH/zRd +aTDNajpLZ9yUCMJCW2GWPndmRMXI5esU5tp/k3Im1BrJjoLzcvTYSU3eSSwziI6w +8+buIa5YVTMXpOixEHpCwbTJOssOSl90V6usYzQv4nIycYyo/H2OE2f/9SbhM2ob +gfn5ppSncIqcQmAAp5f1TKKRyqiVVueawUH97epS1JXxbq6UbpegnOp26r88arO1 +WU9z9GzVCjBbK1O7AgMBAAGjUzBRMB0GA1UdDgQWBBQMYvu2uODNho3Av4TG6fk+ +v2c4IDAfBgNVHSMEGDAWgBQMYvu2uODNho3Av4TG6fk+v2c4IDAPBgNVHRMBAf8E +BTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQAyWzML2n2cNsunUfSsnf/z8P3t3hVR +VTv4U2cEilxPIvVyHCqWLXjaDiWRwtu690QRw9wY1KNdZOJ62v3vgpazqmbAq4nf +HGkkeZhkdo4da/pDsbInnYIylCKzS3U5e4CkaojGCAkgQNKHoaXtoxgmuxvnXZ56 +vyAqtBds8AgZZ6mMQMSarO2PQWBAAiJT2L1+XYIS38Q7W5gmka77K84zhLIW8+YI +fC1vC/chiURSdQIbEeHEXlEvEPR0+YoJEpDeFuTqLY6m8HsQrFGReLpT3Fks4TJ0 +BrteHdx0QHTtRJHLjgyK0Lruq5EAUuTikQ5ThebsPAsIkmlpL7kiwUNMW2CnCV1J +5pmu9xifhHivYv+TAHgDICo9xSSUISDqtV2BOIih6I7MLuG3ElHyP9b6CFX6rNQ4 +GCrBGrKgm/KnRIeZokoWDWqJxrkKqMniZ3/DMl/T0ZGxtarKboCe9wadzURftGcV +UDghOIm/O0idjlaF9bBpNiqBcgTX/BDoygnmoVdQKgwPqLft9HbdTus4RJXrRiWW +cWp+AtCVdCi9lhr0TYvmuql6IpFz5qmrZHhHkpd0miT/Y9JcnCfi7zwbagdrm62I ++OixjgsabAphL7WU+OXg3KF5zdKF5uk0UQ++Jv3JOCNVeM5TbLPFEmaE5l7siKmW +T9WfbnHgE2dbBA== +-----END CERTIFICATE----- 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 2f7e69015..c4a43fb11 100644 --- a/router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java +++ b/router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java @@ -108,6 +108,7 @@ public class Reseeder { // // https url:port, ending with "/" // certificates/reseed/ // certificates/ssl/ // notes // ---------------------------------- ------------------------ ------------------------- --------------- + "https://reseed.onion.im/" + ',' + // lazygravy_at_mail.i2p // reseed.onion.im.crt // Java 8+ only "https://reseed.memcpy.io/" + ',' + // hottuna_at_mail.i2p.crt // CA // SNI required "https://reseed.atomike.ninja/" + "," + // atomike_at_mail.i2p.crt // CA // SNI required, Java 8+ only "https://i2p.manas.ca:8443/" + ',' + // zmx_at_mail.i2p.crt // CA // SNI required From 83e356140d381bc31b11bc5453ac4e7bcdf4a454 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 19 Jan 2017 13:31:10 +0000 Subject: [PATCH 07/50] i2ptunnel: Change eepsite sigtype to EdDSA for new installs --- installer/resources/i2ptunnel.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/resources/i2ptunnel.config b/installer/resources/i2ptunnel.config index 60f6a1d11..a01202793 100644 --- a/installer/resources/i2ptunnel.config +++ b/installer/resources/i2ptunnel.config @@ -96,7 +96,7 @@ tunnel.3.i2cpHost=127.0.0.1 tunnel.3.i2cpPort=7654 tunnel.3.option.inbound.nickname=eepsite tunnel.3.option.outbound.nickname=eepsite -tunnel.3.option.i2cp.destination.sigType=ECDSA_SHA256_P256 +tunnel.3.option.i2cp.destination.sigType=7 tunnel.3.option.inbound.length=3 tunnel.3.option.inbound.lengthVariance=0 tunnel.3.option.outbound.length=3 From 6e7dedba8129cd205f42457ad1a4d6e2f551687e Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 19 Jan 2017 13:32:15 +0000 Subject: [PATCH 08/50] javadoc clarification --- core/java/src/net/i2p/data/DataHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/src/net/i2p/data/DataHelper.java b/core/java/src/net/i2p/data/DataHelper.java index 308ebb9d2..fa4434dd3 100644 --- a/core/java/src/net/i2p/data/DataHelper.java +++ b/core/java/src/net/i2p/data/DataHelper.java @@ -1627,7 +1627,7 @@ public class DataHelper { /** * Compress the data and return a new GZIP compressed byte array. - * @throws IllegalArgumentException if size is over 40KB + * @throws IllegalArgumentException if input size is over 40KB */ public static byte[] compress(byte orig[]) { return compress(orig, 0, orig.length); From 7b0a5bcd5af250c7e5fa163fab78b3bf7d605272 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 19 Jan 2017 13:33:10 +0000 Subject: [PATCH 09/50] debian doc update --- debian-alt/doc/dependencies.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/debian-alt/doc/dependencies.txt b/debian-alt/doc/dependencies.txt index bf3f300a7..4dbd063b2 100644 --- a/debian-alt/doc/dependencies.txt +++ b/debian-alt/doc/dependencies.txt @@ -46,8 +46,10 @@ Current Runtime Dependencies In non-Debian builds we bundle the jars; it's removed in the Debian source package. For some Debian and Ubuntu releases, these seem to be much older than what we're bundling, which is 8.1.21, but there's no particular version that we need. - Jetty 8 is now EOL and we plan to migrate to Jetty 9.x in late 2017. - Jetty 9.2.x is in recent Ubuntu, but not Debian? + Jetty 8 is now EOL and we plan to migrate to Jetty 9.2 in late 2017. + Jetty 8 is NOT in Debian stretch. + Jetty 9 is NOT in Debian wheezy and is only in jessie backports and stretch. + Jetty 9.2.x is in recent Ubuntu and Debian. Jetty 9 ticket is https://trac.i2p2.de/ticket/1512 Updating Jetty may break external plugins. Extensive testing is required. Note that the libjetty8-java dependency brings in libservlet3.0-java which we require. @@ -92,6 +94,7 @@ the binaries or sources. Java interface to access geoip data. We bundle source from https://github.com/maxmind/geoip-api-java No package or not widely available. + There is a Maven geoip-api package at http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.maxmind.geoip%22 * hashcash One Java source file. @@ -108,6 +111,7 @@ the binaries or sources. This is the Java graphing package. We bundle a large portion of the 1.6.0 source from https://github.com/OpenNMS/jrobin No package or not widely available. + There is an old 1.5.9 Maven jrobin package at http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.jrobin%22 * libtomcat6-java We currently require Tomcat 6, which is EOL and not available in newer Debian/Ubuntu releases. @@ -140,6 +144,7 @@ the binaries or sources. This is the QR/barcode library from Google. We bundle a portion of the source from https://github.com/zxing/zxing No package or not widely available. + There are Maven zxing packages at http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.google.zxing%22 Other Issues and TODO From e47c628891b017be1dbdaf2e6174cca31923ec4e Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 19 Jan 2017 16:18:30 +0000 Subject: [PATCH 10/50] jbigi: Update GMP version (ticket #1840) --- core/c/jbigi/download_gmp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/c/jbigi/download_gmp.sh b/core/c/jbigi/download_gmp.sh index 40828c06c..ffb395e79 100644 --- a/core/c/jbigi/download_gmp.sh +++ b/core/c/jbigi/download_gmp.sh @@ -1,7 +1,7 @@ #!/bin/sh -export GMP_VER=6.0.0 -export GMP_TARVER=${GMP_VER}a +export GMP_VER=6.1.2 +export GMP_TARVER=${GMP_VER} export GMP_DIR="gmp-$GMP_VER" export GMP_TAR="gmp-$GMP_TARVER.tar.bz2" From 81376617514c264e2ca3d387c423a1a0edbe55ee Mon Sep 17 00:00:00 2001 From: zzz Date: Tue, 24 Jan 2017 14:44:17 +0000 Subject: [PATCH 11/50] i2prouter: Add root check to restart and condrestart commands (ticket #1770) --- installer/resources/i2prouter | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/resources/i2prouter b/installer/resources/i2prouter index 365737d89..0e3f11a6c 100644 --- a/installer/resources/i2prouter +++ b/installer/resources/i2prouter @@ -1922,6 +1922,7 @@ docommand() { ;; 'restart') + checkifstartingasroot checkUser touchlock "$COMMAND" if [ ! -n "$FIXED_COMMAND" ] ; then shift @@ -1931,6 +1932,7 @@ docommand() { ;; 'condrestart') + checkifstartingasroot checkUser touchlock "$COMMAND" if [ ! -n "$FIXED_COMMAND" ] ; then shift From d9c6360e0acc212a385f1e28ff95c45320a6804d Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 15:47:42 +0000 Subject: [PATCH 12/50] Build: Set up man pages for translation. No ant targets yet. --- .tx/config | 5 + installer/resources/locale-man/man.pot | 390 +++++++++++++++++++++++++ installer/resources/man/i2prouter.1 | 6 +- installer/resources/po4a.config | 9 + tests/scripts/checkpo.sh | 4 +- 5 files changed, 410 insertions(+), 4 deletions(-) create mode 100644 installer/resources/locale-man/man.pot create mode 100644 installer/resources/po4a.config diff --git a/.tx/config b/.tx/config index 5ae930824..9988a7181 100644 --- a/.tx/config +++ b/.tx/config @@ -392,6 +392,11 @@ trans.tr_TR = apps/ministreaming/locale/messages_tr.po trans.uk_UA = apps/ministreaming/locale/messages_uk.po trans.zh_CN = apps/ministreaming/locale/messages_zh.po +[I2P.manpages] +type = PO +source_file = installer/resources/locale-man/man.pot +source_lang = en + [main] host = https://www.transifex.com diff --git a/installer/resources/locale-man/man.pot b/installer/resources/locale-man/man.pot new file mode 100644 index 000000000..90dcebc8b --- /dev/null +++ b/installer/resources/locale-man/man.pot @@ -0,0 +1,390 @@ +# I2P +# Copyright (C) 2017 The I2P Project +# This file is distributed under the same license as the routerconsole package. +# To contribute translations, see https://www.transifex.com/otf/I2P/dashboard/ +# zzz , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: I2P man pages\n" +"POT-Creation-Date: 2017-01-26 15:24+0000\n" +"PO-Revision-Date: 2017-01-26 15:24+0000\n" +"Last-Translator: zzz \n" +"Language-Team: English \n" +"Language: English\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "EEEPGET" +msgstr "" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "September 18, 2015" +msgstr "" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "Eepget - I2P Downloader" +msgstr "" + +#. type: SH +#: man/eepget.1:3 man/i2prouter.1:3 +#, no-wrap +msgid "NAME" +msgstr "" + +#. type: Plain text +#: man/eepget.1:5 +msgid "Eepget - I2P downloader" +msgstr "" + +#. type: SH +#: man/eepget.1:6 man/i2prouter.1:6 +#, no-wrap +msgid "SYNOPSIS" +msgstr "" + +#. type: Plain text +#: man/eepget.1:9 +msgid "B [I]I" +msgstr "" + +#. type: SH +#: man/eepget.1:11 man/i2prouter.1:11 +#, no-wrap +msgid "DESCRIPTION" +msgstr "" + +#. type: Plain text +#: man/eepget.1:15 +msgid "" +"Download a file non-interactively via HTTP. Transfers through both I2P and " +"the regular Internet are supported." +msgstr "" + +#. type: Plain text +#: man/eepget.1:21 +msgid "" +"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 (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." +msgstr "" + +#. type: SH +#: man/eepget.1:22 +#, no-wrap +msgid "OPTIONS" +msgstr "" + +#. type: Plain text +#: man/eepget.1:25 +msgid "B<-c>" +msgstr "" + +#. type: TP +#: man/eepget.1:25 +#, no-wrap +msgid "Clearnet. Do not use a proxy. Same as B<-p> :0 ." +msgstr "" + +#. type: Plain text +#: man/eepget.1:31 +msgid "B<-e> etag" +msgstr "" + +#. type: TP +#: man/eepget.1:31 +#, no-wrap +msgid "Sets the etag value in the request headers." +msgstr "" + +#. type: Plain text +#: man/eepget.1:37 +msgid "B<-h> name=value" +msgstr "" + +#. type: TP +#: man/eepget.1:37 +#, no-wrap +msgid "Adds an arbitrary request header with the given name and value." +msgstr "" + +#. type: Plain text +#: man/eepget.1:43 +msgid "B<-l> lineLen" +msgstr "" + +#. type: TP +#: man/eepget.1:43 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ lineLen > is the length of one progress " +"line in characters. The default is 40." +msgstr "" + +#. type: Plain text +#: man/eepget.1:49 +msgid "B<-m> markSize" +msgstr "" + +#. type: TP +#: man/eepget.1:49 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ markSize > is the number of bytes one " +"'#' character represents. The default is 1024." +msgstr "" + +#. type: Plain text +#: man/eepget.1:55 +msgid "B<-n> retries" +msgstr "" + +#. type: TP +#: man/eepget.1:55 +#, no-wrap +msgid "" +"Specify the number of times to retry downloading if the download isn't " +"successful. If this option is not specified, eepget will not retry." +msgstr "" + +#. type: Plain text +#: man/eepget.1:61 +msgid "B<-o> file" +msgstr "" + +#. type: TP +#: man/eepget.1:61 +#, no-wrap +msgid "" +"Sets the output file to write to. If this option is not given, the output " +"filename will be determined by the URL." +msgstr "" + +#. type: Plain text +#: man/eepget.1:67 +msgid "B<-p> proxy_host[:port]" +msgstr "" + +#. type: TP +#: man/eepget.1:67 +#, no-wrap +msgid "" +"Specify an I2P proxy server (eeproxy) to use. If the port is not specified, " +"eepget will use 4444. If this option is not specified, eepget will use " +"127.0.0.1:4444. Specify B<-c> or B<-p> :0 to disable the eeproxy." +msgstr "" + +#. type: Plain text +#: man/eepget.1:73 +msgid "B<-t> seconds" +msgstr "" + +#. type: TP +#: man/eepget.1:73 +#, no-wrap +msgid "Sets the inactivity timeout. The default is 60 seconds." +msgstr "" + +#. type: Plain text +#: man/eepget.1:79 +msgid "B<-u> username" +msgstr "" + +#. type: TP +#: man/eepget.1:79 +#, no-wrap +msgid "Sets the username for proxy authorization, if required." +msgstr "" + +#. type: Plain text +#: man/eepget.1:85 +msgid "B<-x> password" +msgstr "" + +#. type: TP +#: man/eepget.1:85 +#, no-wrap +msgid "" +"Sets the password for proxy authorization, if required. If a username is " +"specified but not a password, EepGet will prompt for the password." +msgstr "" + +#. type: SH +#: man/eepget.1:89 +#, no-wrap +msgid "EXIT STATUS" +msgstr "" + +#. type: Plain text +#: man/eepget.1:93 +msgid "" +"B exits with status zero upon successful transfer and non-zero if " +"there were problems with the download." +msgstr "" + +#. type: SH +#: man/eepget.1:94 +#, no-wrap +msgid "SEE ALSO" +msgstr "" + +#. type: Plain text +#: man/eepget.1:97 +msgid "curl(1) wget(1)" +msgstr "" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "i2prouter" +msgstr "" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "January 26, 2017" +msgstr "" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "I2PROUTER" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:5 +msgid "i2prouter - start and stop the I2P router" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:9 +msgid "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:13 +msgid "Control the I2P service." +msgstr "" + +#. type: IP +#: man/i2prouter.1:15 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:17 +msgid "Runs I2P as a console application under the current user." +msgstr "" + +#. type: IP +#: man/i2prouter.1:19 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:21 +msgid "Starts the I2P service." +msgstr "" + +#. type: IP +#: man/i2prouter.1:23 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:25 +msgid "Stops the I2P service." +msgstr "" + +#. type: IP +#: man/i2prouter.1:27 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:29 +msgid "Stops the I2P service and then starts it." +msgstr "" + +#. type: IP +#: man/i2prouter.1:31 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:33 +msgid "Restart the I2P service only if it is already running." +msgstr "" + +#. type: IP +#: man/i2prouter.1:35 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:37 +msgid "Stop I2P gracefully (may take up to 11 minutes)" +msgstr "" + +#. type: IP +#: man/i2prouter.1:39 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:41 +msgid "Install initscript to start I2P automatically when the system boots." +msgstr "" + +#. type: IP +#: man/i2prouter.1:43 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:45 +msgid "Uninstall initscript that was installed with B" +msgstr "" + +#. type: IP +#: man/i2prouter.1:47 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:49 +msgid "Prints whether the I2P service is running." +msgstr "" + +#. type: IP +#: man/i2prouter.1:51 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:52 +msgid "Dumps the current threads into B." +msgstr "" diff --git a/installer/resources/man/i2prouter.1 b/installer/resources/man/i2prouter.1 index 94c91f0e5..76743c4d4 100644 --- a/installer/resources/man/i2prouter.1 +++ b/installer/resources/man/i2prouter.1 @@ -1,4 +1,4 @@ -.TH i2prouter 1 "April 19, 2012" "" "I2PROUTER" +.TH i2prouter 1 "January 26, 2017" "" "I2PROUTER" .SH NAME i2prouter \- start and stop the I2P router @@ -41,7 +41,7 @@ Install initscript to start I2P automatically when the system boots. .B .IP remove -Uninstall initscript that was installed with \fB install\fP +Uninstall initscript that was installed with \fBinstall\fP .B .IP status @@ -49,4 +49,4 @@ Prints whether the I2P service is running. .B .IP dump -Dumps the current threads into\fB wrapper.log\fP. +Dumps the current threads into \fBwrapper.log\fP. diff --git a/installer/resources/po4a.config b/installer/resources/po4a.config new file mode 100644 index 000000000..9254a9e35 --- /dev/null +++ b/installer/resources/po4a.config @@ -0,0 +1,9 @@ +# +# This is for translating the man pages. +# po4a must be installed: sudo apt install po4a +# Usage: po4a -M UTF-8 -L UTF-8 po4a.config +# See 'man po4a' +# +[po4a_paths] locale-man/man.pot $lang:locale-man/man_$lang.po +[type:man] man/eepget.1 $lang:man/$lang/eepget.1 +[type:man] man/i2prouter.1 $lang:man/$lang/i2prouter.1 diff --git a/tests/scripts/checkpo.sh b/tests/scripts/checkpo.sh index 8979dc1b3..8883d32c1 100755 --- a/tests/scripts/checkpo.sh +++ b/tests/scripts/checkpo.sh @@ -23,7 +23,9 @@ DIRS="\ installer/resources/locale/po \ debian/po" -for i in `find $DIRS -maxdepth 1 -type f -name \*.po` +FILES="installer/resources/locale-man/man.pot" + +for i in `find $DIRS -maxdepth 1 -type f -name \*.po` $FILES do echo "Checking $i ..." msgfmt -c $i -o /dev/null From f77fc52ca760e9bc121841682c46fae090a6a0e5 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 20:37:44 +0000 Subject: [PATCH 13/50] javadoc fixes part 1 (ticket #1894) --- core/java/src/net/i2p/client/I2PClient.java | 2 +- core/java/src/net/i2p/client/I2PSession.java | 4 ++-- .../client/impl/I2PClientMessageHandlerMap.java | 2 +- .../src/net/i2p/client/impl/I2PSessionImpl.java | 2 +- .../net/i2p/client/impl/I2PSessionMuxedImpl.java | 14 +++++++------- core/java/src/net/i2p/crypto/SHA1.java | 4 ++-- .../ed25519/Ed25519LittleEndianEncoding.java | 16 ++++++++-------- core/java/src/net/i2p/data/SigningPublicKey.java | 2 +- .../i2cp/RequestVariableLeaseSetMessage.java | 2 +- core/java/src/net/i2p/kademlia/KBucketSet.java | 8 ++++---- core/java/src/net/i2p/stat/RateAverages.java | 6 +++--- core/java/src/net/i2p/util/EventDispatcher.java | 2 +- .../src/net/i2p/util/InternalServerSocket.java | 4 ++-- core/java/src/net/i2p/util/InternalSocket.java | 4 ++-- core/java/src/net/i2p/util/ObjectCounter.java | 2 +- core/java/src/net/i2p/util/PortMapper.java | 4 ++-- core/java/src/net/i2p/util/SimpleTimer2.java | 12 ++++++------ core/java/src/net/i2p/util/SystemVersion.java | 8 ++++---- core/java/src/net/i2p/util/Translate.java | 2 +- 19 files changed, 50 insertions(+), 50 deletions(-) diff --git a/core/java/src/net/i2p/client/I2PClient.java b/core/java/src/net/i2p/client/I2PClient.java index 3942aeb6e..2b2474c91 100644 --- a/core/java/src/net/i2p/client/I2PClient.java +++ b/core/java/src/net/i2p/client/I2PClient.java @@ -47,7 +47,7 @@ public interface I2PClient { public static final SigType DEFAULT_SIGTYPE = SigType.DSA_SHA1; /** - * For router->client payloads. + * For router->client payloads. * * If false, the router will send the MessageStatus, * the client must respond with a ReceiveMessageBegin, diff --git a/core/java/src/net/i2p/client/I2PSession.java b/core/java/src/net/i2p/client/I2PSession.java index 818cb5983..069907d9c 100644 --- a/core/java/src/net/i2p/client/I2PSession.java +++ b/core/java/src/net/i2p/client/I2PSession.java @@ -73,7 +73,7 @@ public interface I2PSession { * End-to-End Crypto is disabled, tags and keys are ignored! * * Like sendMessage above, except the key used and the tags sent are exposed to the - * application.

+ * application.

* * If some application layer message delivery confirmation is used, * rather than i2p's (slow) built in confirmation via guaranteed delivery mode, the @@ -331,7 +331,7 @@ public interface I2PSession { * Suggested implementation: * *

-     *  if (name.length() == 60 && name.toLowerCase(Locale.US).endsWith(".b32.i2p")) {
+     *  if (name.length() == 60 && name.toLowerCase(Locale.US).endsWith(".b32.i2p")) {
      *      if (session != null)
      *          return session.lookup(Hash.create(Base32.decode(name.toLowerCase(Locale.US).substring(0, 52))));
      *      else
diff --git a/core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java b/core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java
index 4cea850b7..48d67b09f 100644
--- a/core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java
+++ b/core/java/src/net/i2p/client/impl/I2PClientMessageHandlerMap.java
@@ -27,7 +27,7 @@ import net.i2p.data.i2cp.SetDateMessage;
  * @author jrandom
  */
 class I2PClientMessageHandlerMap {
-    /** map of message type id --> I2CPMessageHandler */
+    /** map of message type id --> I2CPMessageHandler */
     protected I2CPMessageHandler _handlers[];
 
     /** for extension */
diff --git a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java
index c199fa8c6..021a2d901 100644
--- a/core/java/src/net/i2p/client/impl/I2PSessionImpl.java
+++ b/core/java/src/net/i2p/client/impl/I2PSessionImpl.java
@@ -124,7 +124,7 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
 
     /** class that generates new messages */
     protected final I2CPMessageProducer _producer;
-    /** map of Long --> MessagePayloadMessage */
+    /** map of Long --> MessagePayloadMessage */
     protected Map _availableMessages;
 
     /** hashes of lookups we are waiting for */
diff --git a/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java b/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java
index 9b6f1ff0c..049bd3d91 100644
--- a/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java
+++ b/core/java/src/net/i2p/client/impl/I2PSessionMuxedImpl.java
@@ -34,17 +34,17 @@ import net.i2p.util.Log;
  * Therefore the compatibility situation is as follows:
  *
  * Compatibility:
- *    old streaming -> new streaming: sends proto anything, rcvs proto anything
- *    new streaming -> old streaming: sends PROTO_STREAMING, ignores rcvd proto
- *    old datagram -> new datagram: sends proto anything, rcvs proto anything
- *    new datagram -> old datagram: sends PROTO_DATAGRAM, ignores rcvd proto
+ *    old streaming -> new streaming: sends proto anything, rcvs proto anything
+ *    new streaming -> old streaming: sends PROTO_STREAMING, ignores rcvd proto
+ *    old datagram -> new datagram: sends proto anything, rcvs proto anything
+ *    new datagram -> old datagram: sends PROTO_DATAGRAM, ignores rcvd proto
  *    In all the above cases, streaming and datagram receive traffic for the other
  *    protocol, same as before.
  *
- *    old datagram -> new muxed: doesn't work because the old sends proto 0 but the udp side
+ *    old datagram -> new muxed: doesn't work because the old sends proto 0 but the udp side
  *                               of the mux registers with PROTO_DATAGRAM, so the datagrams
  *                               go to the streaming side, same as before.
- *    old streaming -> new muxed: works
+ *    old streaming -> new muxed: works
  *
  * Typical Usage:
  *    Streaming + datagrams:
@@ -421,7 +421,7 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 {
     /**
      *  No, we couldn't put any protocol byte in front of everything and
      *  keep backward compatibility. But there are several bytes that
-     *  are unused AND unchecked in the gzip header in releases <= 0.7.
+     *  are unused AND unchecked in the gzip header in releases <= 0.7.
      *  So let's use 5 of them for a protocol and two 2-byte ports.
      *
      *  Following are all the methods to hide the
diff --git a/core/java/src/net/i2p/crypto/SHA1.java b/core/java/src/net/i2p/crypto/SHA1.java
index bfe07630c..e64a4da0b 100644
--- a/core/java/src/net/i2p/crypto/SHA1.java
+++ b/core/java/src/net/i2p/crypto/SHA1.java
@@ -28,8 +28,8 @@ import net.i2p.util.SystemVersion;
  *
  * 

The FIPS PUB 180-2 standard specifies four secure hash algorithms (SHA-1, * SHA-256, SHA-384 and SHA-512) for computing a condensed representation of - * electronic data (message). When a message of any length < 2^^64 bits (for - * SHA-1 and SHA-256) or < 2^^128 bits (for SHA-384 and SHA-512) is input to + * electronic data (message). When a message of any length < 2^^64 bits (for + * SHA-1 and SHA-256) or < 2^^128 bits (for SHA-384 and SHA-512) is input to * an algorithm, the result is an output called a message digest. The message * digests range in length from 160 to 512 bits, depending on the algorithm. * Secure hash algorithms are typically used with other cryptographic diff --git a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java index 75e1196dd..670da6471 100644 --- a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java +++ b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java @@ -18,22 +18,22 @@ public class Ed25519LittleEndianEncoding extends Encoding { * Assumption: *

    *
  • p = 2^255 - 19 - *
  • h = h0 + 2^25 * h1 + 2^(26+25) * h2 + ... + 2^230 * h9 where 0 <= |hi| < 2^27 for all i=0,...,9. - *
  • h congruent r modulo p, i.e. h = r + q * p for some suitable 0 <= r < p and an integer q. + *
  • h = h0 + 2^25 * h1 + 2^(26+25) * h2 + ... + 2^230 * h9 where 0 <= |hi| < 2^27 for all i=0,...,9. + *
  • h congruent r modulo p, i.e. h = r + q * p for some suitable 0 <= r < p and an integer q. *

* Then q = [2^-255 * (h + 19 * 2^-25 * h9 + 1/2)] where [x] = floor(x). *

* Proof: *

* We begin with some very raw estimation for the bounds of some expressions: - *

|h| < 2^230 * 2^30 = 2^260 ==> |r + q * p| < 2^260 ==> |q| < 2^10.
-     * ==> -1/4 <= a := 19^2 * 2^-255 * q < 1/4.
-     * |h - 2^230 * h9| = |h0 + ... + 2^204 * h8| < 2^204 * 2^30 = 2^234.
-     * ==> -1/4 <= b := 19 * 2^-255 * (h - 2^230 * h9) < 1/4
- * Therefore 0 < 1/2 - a - b < 1. + *
|h| < 2^230 * 2^30 = 2^260 ==> |r + q * p| < 2^260 ==> |q| < 2^10.
+     * ==> -1/4 <= a := 19^2 * 2^-255 * q < 1/4.
+     * |h - 2^230 * h9| = |h0 + ... + 2^204 * h8| < 2^204 * 2^30 = 2^234.
+     * ==> -1/4 <= b := 19 * 2^-255 * (h - 2^230 * h9) < 1/4
+ * Therefore 0 < 1/2 - a - b < 1. *

* Set x := r + 19 * 2^-255 * r + 1/2 - a - b then - * 0 <= x < 255 - 20 + 19 + 1 = 2^255 ==> 0 <= 2^-255 * x < 1. Since q is an integer we have + * 0 <= x < 255 - 20 + 19 + 1 = 2^255 ==> 0 <= 2^-255 * x < 1. Since q is an integer we have * *

[q + 2^-255 * x] = q        (1)
*

diff --git a/core/java/src/net/i2p/data/SigningPublicKey.java b/core/java/src/net/i2p/data/SigningPublicKey.java index bd30d1c34..0d1ecf496 100644 --- a/core/java/src/net/i2p/data/SigningPublicKey.java +++ b/core/java/src/net/i2p/data/SigningPublicKey.java @@ -150,7 +150,7 @@ public class SigningPublicKey extends SimpleDataStructure { * Get the portion of this (type 0) SPK that is really padding based on the Key Cert type given, * if any * - * @return leading padding length > 0 or null if no padding or type is unknown + * @return leading padding length > 0 or null if no padding or type is unknown * @throws IllegalArgumentException if this is already typed to a different type * @since 0.9.12 */ diff --git a/core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java b/core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java index 6d172c919..4562ba93f 100644 --- a/core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java +++ b/core/java/src/net/i2p/data/i2cp/RequestVariableLeaseSetMessage.java @@ -44,7 +44,7 @@ public class RequestVariableLeaseSetMessage extends I2CPMessageImpl { * Does the client support this message? * * @param clientVersion may be null - * @return version != null and version >= 0.9.7 + * @return version != null and version >= 0.9.7 */ public static boolean isSupported(String clientVersion) { return clientVersion != null && diff --git a/core/java/src/net/i2p/kademlia/KBucketSet.java b/core/java/src/net/i2p/kademlia/KBucketSet.java index 09b51ca23..f8ce16f19 100644 --- a/core/java/src/net/i2p/kademlia/KBucketSet.java +++ b/core/java/src/net/i2p/kademlia/KBucketSet.java @@ -72,9 +72,9 @@ public class KBucketSet { * Use the default trim strategy, which removes a random entry. * @param us the local identity (typically a SHA1Hash or Hash) * The class must have a zero-argument constructor. - * @param max the Kademlia value "k", the max per bucket, k >= 4 + * @param max the Kademlia value "k", the max per bucket, k >= 4 * @param b the Kademlia value "b", split buckets an extra 2**(b-1) times, - * b > 0, use 1 for bittorrent, Kademlia paper recommends 5 + * b > 0, use 1 for bittorrent, Kademlia paper recommends 5 */ public KBucketSet(I2PAppContext context, T us, int max, int b) { this(context, us, max, b, new RandomTrimmer(context, max)); @@ -168,7 +168,7 @@ public class KBucketSet { /** * No lock required. - * FIXME will split the closest buckets too far if B > 1 and K < 2**B + * FIXME will split the closest buckets too far if B > 1 and K < 2**B * Won't ever really happen and if it does it still works. */ private boolean shouldSplit(KBucket b) { @@ -625,7 +625,7 @@ public class KBucketSet { /** * Make a new SimpleDataStrucure from the data - * @param data size <= SDS length, else throws IAE + * @param data size <= SDS length, else throws IAE * Can be 1 bigger if top byte is zero */ @SuppressWarnings("unchecked") diff --git a/core/java/src/net/i2p/stat/RateAverages.java b/core/java/src/net/i2p/stat/RateAverages.java index 375bf0af8..fbd491ba7 100644 --- a/core/java/src/net/i2p/stat/RateAverages.java +++ b/core/java/src/net/i2p/stat/RateAverages.java @@ -38,10 +38,10 @@ public class RateAverages { /** * @since 0.9.4 * @return one of several things: - * if there are any events (current or last) => weighted average + * if there are any events (current or last) => weighted average * otherwise if the useLifetime parameter to Rate.computeAverages was: - * true => the lifetime average value - * false => zero + * true => the lifetime average value + * false => zero */ public double getAverage() { return average; diff --git a/core/java/src/net/i2p/util/EventDispatcher.java b/core/java/src/net/i2p/util/EventDispatcher.java index 04e3731b6..3128821cc 100644 --- a/core/java/src/net/i2p/util/EventDispatcher.java +++ b/core/java/src/net/i2p/util/EventDispatcher.java @@ -13,7 +13,7 @@ import java.util.Set; /** * Event dispatching interface. It allows objects to receive and - * notify data events (basically String->Object associations) and + * notify data events (basically String->Object associations) and * create notification chains. To ease the usage of this interface, * you could define an EventDispatcherImpl attribute called * _event (as suggested in EventDispatcherImpl documentation) diff --git a/core/java/src/net/i2p/util/InternalServerSocket.java b/core/java/src/net/i2p/util/InternalServerSocket.java index 77cf8c792..51cb6c686 100644 --- a/core/java/src/net/i2p/util/InternalServerSocket.java +++ b/core/java/src/net/i2p/util/InternalServerSocket.java @@ -31,7 +31,7 @@ public class InternalServerSocket extends ServerSocket { //private static Log _log = I2PAppContext.getGlobalContext().logManager().getLog(InternalServerSocket.class); /** - * @param port > 0 + * @param port > 0 */ public InternalServerSocket(int port) throws IOException { if (port <= 0) @@ -87,7 +87,7 @@ public class InternalServerSocket extends ServerSocket { /** * This is how the client connects. * - * @param port > 0 + * @param port > 0 */ static void internalConnect(int port, InternalSocket clientSock) throws IOException { InternalServerSocket iss = _sockets.get(Integer.valueOf(port)); diff --git a/core/java/src/net/i2p/util/InternalSocket.java b/core/java/src/net/i2p/util/InternalSocket.java index a60a53ae9..8ee9ca3cc 100644 --- a/core/java/src/net/i2p/util/InternalSocket.java +++ b/core/java/src/net/i2p/util/InternalSocket.java @@ -26,7 +26,7 @@ public class InternalSocket extends Socket { /** * client side - * @param port > 0 + * @param port > 0 */ public InternalSocket(int port) throws IOException { if (port <= 0) @@ -36,7 +36,7 @@ public class InternalSocket extends Socket { /** * Convenience method to return either a Socket or an InternalSocket - * @param port > 0 + * @param port > 0 */ public static Socket getSocket(String host, int port) throws IOException { if (System.getProperty("router.version") != null && diff --git a/core/java/src/net/i2p/util/ObjectCounter.java b/core/java/src/net/i2p/util/ObjectCounter.java index bbe3f58e3..ff00a8e39 100644 --- a/core/java/src/net/i2p/util/ObjectCounter.java +++ b/core/java/src/net/i2p/util/ObjectCounter.java @@ -44,7 +44,7 @@ public class ObjectCounter implements Serializable { } /** - * @return set of objects with counts > 0 + * @return set of objects with counts > 0 */ public Set objects() { return this.map.keySet(); diff --git a/core/java/src/net/i2p/util/PortMapper.java b/core/java/src/net/i2p/util/PortMapper.java index 1a622828b..5dcf55c1b 100644 --- a/core/java/src/net/i2p/util/PortMapper.java +++ b/core/java/src/net/i2p/util/PortMapper.java @@ -50,7 +50,7 @@ public class PortMapper { /** * Add the service - * @param port > 0 + * @param port > 0 * @return success, false if already registered */ public boolean register(String service, int port) { @@ -59,7 +59,7 @@ public class PortMapper { /** * Add the service - * @param port > 0 + * @param port > 0 * @return success, false if already registered * @since 0.9.21 */ diff --git a/core/java/src/net/i2p/util/SimpleTimer2.java b/core/java/src/net/i2p/util/SimpleTimer2.java index 710ebdb3c..15a844a7e 100644 --- a/core/java/src/net/i2p/util/SimpleTimer2.java +++ b/core/java/src/net/i2p/util/SimpleTimer2.java @@ -208,8 +208,8 @@ public class SimpleTimer2 { * state of a given TimedEvent * * valid transitions: - * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> RUNNING -> {IDLE,CANCELLED,SCHEDULED} - * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> CANCELLED + * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> RUNNING -> {IDLE,CANCELLED,SCHEDULED} + * {IDLE,CANCELLED,RUNNING} -> SCHEDULED [ -> SCHEDULED ]* -> CANCELLED * * anything else is invalid. */ @@ -231,10 +231,10 @@ public class SimpleTimer2 { * in your constructor) * * Other porting: - * SimpleTimer.getInstance().addEvent(new foo(), timeout) => new foo(SimpleTimer2.getInstance(), timeout) - * SimpleTimer.getInstance().addEvent(this, timeout) => schedule(timeout) - * SimpleTimer.getInstance().addEvent(foo, timeout) => foo.reschedule(timeout) - * SimpleTimer.getInstance().removeEvent(foo) => foo.cancel() + * SimpleTimer.getInstance().addEvent(new foo(), timeout) => new foo(SimpleTimer2.getInstance(), timeout) + * SimpleTimer.getInstance().addEvent(this, timeout) => schedule(timeout) + * SimpleTimer.getInstance().addEvent(foo, timeout) => foo.reschedule(timeout) + * SimpleTimer.getInstance().removeEvent(foo) => foo.cancel() * * There's no global locking, but for scheduling, we synchronize on this * to reduce the chance of duplicates on the queue. diff --git a/core/java/src/net/i2p/util/SystemVersion.java b/core/java/src/net/i2p/util/SystemVersion.java index bd159fb1a..9bf6f49c3 100644 --- a/core/java/src/net/i2p/util/SystemVersion.java +++ b/core/java/src/net/i2p/util/SystemVersion.java @@ -149,7 +149,7 @@ public abstract class SystemVersion { } /** - * Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.6") >= 0 + * Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.6") >= 0 * as it handles Android also, where java.version = "0". * * @return true if Java 1.6 or higher, or Android API 9 or higher @@ -159,7 +159,7 @@ public abstract class SystemVersion { } /** - * Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.7") >= 0 + * Better than (new VersionComparator()).compare(System.getProperty("java.version"), "1.7") >= 0 * as it handles Android also, where java.version = "0". * * @return true if Java 1.7 or higher, or Android API 19 or higher @@ -193,8 +193,8 @@ public abstract class SystemVersion { * http://mark.koli.ch/2009/10/javas-osarch-system-property-is-the-bitness-of-the-jre-not-the-operating-system.html * http://mark.koli.ch/2009/10/reliably-checking-os-bitness-32-or-64-bit-on-windows-with-a-tiny-c-app.html * sun.arch.data.model not on all JVMs - * sun.arch.data.model == 64 => 64 bit processor - * sun.arch.data.model == 32 => A 32 bit JVM but could be either 32 or 64 bit processor or libs + * sun.arch.data.model == 64 => 64 bit processor + * sun.arch.data.model == 32 => A 32 bit JVM but could be either 32 or 64 bit processor or libs * os.arch contains "64" could be 32 or 64 bit libs */ public static boolean is64Bit() { diff --git a/core/java/src/net/i2p/util/Translate.java b/core/java/src/net/i2p/util/Translate.java index dd76f04e8..0c42f8056 100644 --- a/core/java/src/net/i2p/util/Translate.java +++ b/core/java/src/net/i2p/util/Translate.java @@ -67,7 +67,7 @@ public abstract class Translate { * * @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. + * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. * To translate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. From 8bb114e9c44329c7a5205a8969c21b8ef03e3632 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 20:45:58 +0000 Subject: [PATCH 14/50] javadoc fixes part 2 (ticket #1894) --- core/java/src/gnu/crypto/prng/IRandomStandalone.java | 12 ++++++------ core/java/src/net/i2p/data/DataHelper.java | 12 ++++++------ core/java/src/net/i2p/data/Hash.java | 2 +- core/java/src/net/i2p/data/PublicKey.java | 2 +- core/java/src/net/i2p/data/SDSCache.java | 4 ++-- core/java/src/net/i2p/data/SigningPublicKey.java | 2 +- core/java/src/net/i2p/util/ZipFileComment.java | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/java/src/gnu/crypto/prng/IRandomStandalone.java b/core/java/src/gnu/crypto/prng/IRandomStandalone.java index 59d8b289b..b8a13e432 100644 --- a/core/java/src/gnu/crypto/prng/IRandomStandalone.java +++ b/core/java/src/gnu/crypto/prng/IRandomStandalone.java @@ -104,7 +104,7 @@ public interface IRandomStandalone extends Cloneable { * * @param attributes a set of name-value pairs that describe the desired * future instance behaviour. - * @exception IllegalArgumentException if at least one of the defined name/ + * @throws IllegalArgumentException if at least one of the defined name/ * value pairs contains invalid data. */ void init(Map attributes); @@ -113,8 +113,8 @@ public interface IRandomStandalone extends Cloneable { *

Returns the next 8 bits of random data generated from this instance.

* * @return the next 8 bits of random data generated from this instance. - * @exception IllegalStateException if the instance is not yet initialised. - * @exception LimLimitReachedExceptionStandalone this instance has reached its + * @throws IllegalStateException if the instance is not yet initialised. + * @throws LimLimitReachedExceptionStandalone this instance has reached its * theoretical limit for generating non-repetitive pseudo-random data. */ byte nextByte() throws IllegalStateException, LimitReachedExceptionStandalone; @@ -130,8 +130,8 @@ public interface IRandomStandalone extends Cloneable { * out.length. * @param length the maximum number of required random bytes. This method * does nothing if this parameter is less than 1. - * @exception IllegalStateException if the instance is not yet initialised. - * @exception LimitLimitReachedExceptionStandalonehis instance has reached its + * @throws IllegalStateException if the instance is not yet initialised. + * @throws LimitLimitReachedExceptionStandalonehis instance has reached its * theoretical limit for generating non-repetitive pseudo-random data. */ void nextBytes(byte[] out, int offset, int length) @@ -172,7 +172,7 @@ public interface IRandomStandalone extends Cloneable { * @param in The buffer of new random bytes to add. * @param offset The offset from whence to begin reading random bytes. * @param length The number of random bytes to add. - * @exception IndexOutOfBoundsException If offset, length, + * @throws IndexOutOfBoundsException If offset, length, * or offset+length is out of bounds. */ void addRandomBytes(byte[] in, int offset, int length); diff --git a/core/java/src/net/i2p/data/DataHelper.java b/core/java/src/net/i2p/data/DataHelper.java index fa4434dd3..4652d19bb 100644 --- a/core/java/src/net/i2p/data/DataHelper.java +++ b/core/java/src/net/i2p/data/DataHelper.java @@ -736,7 +736,7 @@ public class DataHelper { * @param src if null returns 0 * @param numBytes 1-8 * @return non-negative - * @throws AIOOBE + * @throws ArrayIndexOutOfBoundsException * @throws IllegalArgumentException if negative (only possible if numBytes = 8) */ public static long fromLong(byte src[], int offset, int numBytes) { @@ -760,7 +760,7 @@ public class DataHelper { * * @param numBytes 1-8 * @return non-negative - * @throws AIOOBE + * @throws ArrayIndexOutOfBoundsException * @throws IllegalArgumentException if negative (only possible if numBytes = 8) * @since 0.8.12 */ @@ -1006,7 +1006,7 @@ public class DataHelper { /** * Helper util to compare two objects, including null handling. - *

+ *

* * This treats (null == null) as true, and (null == (!null)) as false. */ @@ -1021,10 +1021,10 @@ public class DataHelper { /** * Run a deep comparison across the two collections. - *

+ *

* * This treats (null == null) as true, (null == (!null)) as false, and then - * comparing each element via eq(object, object).

+ * comparing each element via eq(object, object).

* * If the size of the collections are not equal, the comparison returns false. * The collection order should be consistent, as this simply iterates across both and compares @@ -1043,7 +1043,7 @@ public class DataHelper { } /** - * Run a comparison on the byte arrays, byte by byte.

+ * Run a comparison on the byte arrays, byte by byte.

* * This treats (null == null) as true, (null == (!null)) as false, * and unequal length arrays as false. diff --git a/core/java/src/net/i2p/data/Hash.java b/core/java/src/net/i2p/data/Hash.java index 3de44edfe..62e3cee51 100644 --- a/core/java/src/net/i2p/data/Hash.java +++ b/core/java/src/net/i2p/data/Hash.java @@ -47,7 +47,7 @@ public class Hash extends SimpleDataStructure { /** * Pull from cache or return new - * @throws AIOOBE if not enough bytes + * @throws ArrayIndexOutOfBoundsException if not enough bytes * @since 0.8.3 */ public static Hash create(byte[] data, int off) { diff --git a/core/java/src/net/i2p/data/PublicKey.java b/core/java/src/net/i2p/data/PublicKey.java index aeb9e0096..874e65e35 100644 --- a/core/java/src/net/i2p/data/PublicKey.java +++ b/core/java/src/net/i2p/data/PublicKey.java @@ -29,7 +29,7 @@ public class PublicKey extends SimpleDataStructure { * Pull from cache or return new. * Deprecated - used only by deprecated Destination.readBytes(data, off) * - * @throws AIOOBE if not enough bytes, FIXME should throw DataFormatException + * @throws ArrayIndexOutOfBoundsException if not enough bytes, FIXME should throw DataFormatException * @since 0.8.3 */ public static PublicKey create(byte[] data, int off) { diff --git a/core/java/src/net/i2p/data/SDSCache.java b/core/java/src/net/i2p/data/SDSCache.java index f38fe6bbf..2ab2e2649 100644 --- a/core/java/src/net/i2p/data/SDSCache.java +++ b/core/java/src/net/i2p/data/SDSCache.java @@ -155,8 +155,8 @@ public class SDSCache { * @param off offset in the array to start reading from * @return the cached value if available, otherwise * makes a new object and returns it - * @throws AIOOBE if not enough bytes - * @throws NPE + * @throws ArrayIndexOutOfBoundsException if not enough bytes + * @throws NullPointerException */ public V get(byte[] b, int off) { byte[] data = SimpleByteCache.acquire(_datalen); diff --git a/core/java/src/net/i2p/data/SigningPublicKey.java b/core/java/src/net/i2p/data/SigningPublicKey.java index 0d1ecf496..1234d1b70 100644 --- a/core/java/src/net/i2p/data/SigningPublicKey.java +++ b/core/java/src/net/i2p/data/SigningPublicKey.java @@ -40,7 +40,7 @@ public class SigningPublicKey extends SimpleDataStructure { * Pull from cache or return new. * Deprecated - used only by deprecated Destination.readBytes(data, off) * - * @throws AIOOBE if not enough bytes, FIXME should throw DataFormatException + * @throws ArrayIndexOutOfBoundsException if not enough bytes, FIXME should throw DataFormatException * @since 0.8.3 */ public static SigningPublicKey create(byte[] data, int off) { diff --git a/core/java/src/net/i2p/util/ZipFileComment.java b/core/java/src/net/i2p/util/ZipFileComment.java index a20407fe8..b0d590fea 100644 --- a/core/java/src/net/i2p/util/ZipFileComment.java +++ b/core/java/src/net/i2p/util/ZipFileComment.java @@ -37,7 +37,7 @@ public abstract class ZipFileComment { * @return empty string if no comment, or the comment. * The string is decoded with UTF-8 * - * @throws IOE if no valid end-of-central-directory record found + * @throws IOException if no valid end-of-central-directory record found */ public static String getComment(File file, int max) throws IOException { return getComment(file, max, 0); @@ -53,7 +53,7 @@ public abstract class ZipFileComment { * @return empty string if no comment, or the comment. * The string is decoded with UTF-8 * - * @throws IOE if no valid end-of-central-directory record found + * @throws IOException if no valid end-of-central-directory record found */ public static String getComment(File file, int max, int skip) throws IOException { if (!file.exists()) From e461e8fb4f4b1618568becb627e9b250ceee6ce3 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 20:51:05 +0000 Subject: [PATCH 15/50] javadoc fixes part 3 (ticket #1894) --- apps/i2psnark/java/src/org/klomp/snark/BitField.java | 8 ++++---- apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java | 2 +- apps/i2psnark/java/src/org/klomp/snark/Peer.java | 2 +- apps/i2psnark/java/src/org/klomp/snark/Storage.java | 2 +- .../java/src/org/klomp/snark/bencode/BDecoder.java | 4 ++-- .../src/org/mortbay/servlet/MultiPartRequest.java | 2 +- apps/jetty/java/src/org/mortbay/util/LineInput.java | 12 ++++++------ core/java/src/gnu/getopt/LongOpt.java | 2 +- .../net/i2p/crypto/CryptixRijndael_Algorithm.java | 4 ++-- core/java/src/org/bouncycastle/oldcrypto/Mac.java | 8 ++++---- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/apps/i2psnark/java/src/org/klomp/snark/BitField.java b/apps/i2psnark/java/src/org/klomp/snark/BitField.java index f724f71d7..7ec472705 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/BitField.java +++ b/apps/i2psnark/java/src/org/klomp/snark/BitField.java @@ -48,7 +48,7 @@ public class BitField * as set by the given byte array. This will make a copy of the array. * Extra bytes will be ignored. * - * @exception ArrayOutOfBoundsException if give byte array is not large + * @throws ArrayOutOfBoundsException if give byte array is not large * enough. */ public BitField(byte[] bitfield, int size) @@ -90,7 +90,7 @@ public class BitField /** * Sets the given bit to true. * - * @exception IndexOutOfBoundsException if bit is smaller then zero + * @throws IndexOutOfBoundsException if bit is smaller then zero * bigger then size (inclusive). */ public void set(int bit) @@ -110,7 +110,7 @@ public class BitField /** * Sets the given bit to false. * - * @exception IndexOutOfBoundsException if bit is smaller then zero + * @throws IndexOutOfBoundsException if bit is smaller then zero * bigger then size (inclusive). * @since 0.9.22 */ @@ -141,7 +141,7 @@ public class BitField /** * Return true if the bit is set or false if it is not. * - * @exception IndexOutOfBoundsException if bit is smaller then zero + * @throws IndexOutOfBoundsException if bit is smaller then zero * bigger then size (inclusive). */ public boolean get(int bit) diff --git a/apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java b/apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java index a40a68f8d..8d2436349 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java +++ b/apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java @@ -464,7 +464,7 @@ public class MetaInfo * Return the length of a piece. All pieces are of equal length * except for the last one (getPieces()-1). * - * @exception IndexOutOfBoundsException when piece is equal to or + * @throws IndexOutOfBoundsException when piece is equal to or * greater then the number of pieces in the torrent. */ public int getPieceLength(int piece) diff --git a/apps/i2psnark/java/src/org/klomp/snark/Peer.java b/apps/i2psnark/java/src/org/klomp/snark/Peer.java index 88ce20a1b..0b38953b7 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Peer.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Peer.java @@ -115,7 +115,7 @@ public class Peer implements Comparable * the connect() method. * * @param metainfo null if in magnet mode - * @exception IOException when an error occurred during the handshake. + * @throws IOException when an error occurred during the handshake. */ public Peer(final I2PSocket sock, InputStream in, OutputStream out, byte[] my_id, byte[] infohash, MetaInfo metainfo) throws IOException diff --git a/apps/i2psnark/java/src/org/klomp/snark/Storage.java b/apps/i2psnark/java/src/org/klomp/snark/Storage.java index 1a8349f5f..4db3b5896 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Storage.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Storage.java @@ -1111,7 +1111,7 @@ public class Storage implements Closeable * * @return true if the piece was correct (sha metainfo hash * matches), otherwise false. - * @exception IOException when some storage related error occurs. + * @throws IOException when some storage related error occurs. */ public boolean putPiece(PartialPiece pp) throws IOException { diff --git a/apps/i2psnark/java/src/org/klomp/snark/bencode/BDecoder.java b/apps/i2psnark/java/src/org/klomp/snark/bencode/BDecoder.java index 9ba79f564..f7a6e06cb 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/bencode/BDecoder.java +++ b/apps/i2psnark/java/src/org/klomp/snark/bencode/BDecoder.java @@ -102,9 +102,9 @@ public class BDecoder * @return The first BEValue on the stream or null when the stream * has ended. * - * @exception InvalidBEncoding when the stream doesn't start with a + * @throws InvalidBEncoding when the stream doesn't start with a * bencoded value or the stream isn't a bencoded stream at all. - * @exception IOException when somthing bad happens with the stream + * @throws IOException when somthing bad happens with the stream * to read from. */ public static BEValue bdecode(InputStream in) throws IOException diff --git a/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java b/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java index 1cc3973fd..ef60acd37 100644 --- a/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java +++ b/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java @@ -71,7 +71,7 @@ public class MultiPartRequest /** Constructor. * @param request The request containing a multipart/form-data * request - * @exception IOException IOException + * @throws IOException IOException */ public MultiPartRequest(HttpServletRequest request) throws IOException diff --git a/apps/jetty/java/src/org/mortbay/util/LineInput.java b/apps/jetty/java/src/org/mortbay/util/LineInput.java index e837cfba0..fc96ae71b 100644 --- a/apps/jetty/java/src/org/mortbay/util/LineInput.java +++ b/apps/jetty/java/src/org/mortbay/util/LineInput.java @@ -113,7 +113,7 @@ public class LineInput extends FilterInputStream * @param in The underlying input stream. * @param bufferSize The buffer size and maximum line length. * @param encoding the character encoding to use for readLine methods. - * @exception UnsupportedEncodingException + * @throws UnsupportedEncodingException */ public LineInput(InputStream in, int bufferSize, String encoding) throws UnsupportedEncodingException @@ -180,7 +180,7 @@ public class LineInput extends FilterInputStream * The default or supplied encoding is used to convert bytes to * characters. * @return The line as a String or null for EOF. - * @exception IOException + * @throws IOException */ public synchronized String readLine() throws IOException @@ -217,7 +217,7 @@ public class LineInput extends FilterInputStream * @param off Offset into the buffer. * @param len Maximum length of line. * @return The length of the line or -1 for EOF. - * @exception IOException + * @throws IOException */ public int readLine(char[] c,int off,int len) throws IOException @@ -251,7 +251,7 @@ public class LineInput extends FilterInputStream * @param off Offset into the buffer. * @param len Maximum length of line. * @return The length of the line or -1 for EOF. - * @exception IOException + * @throws IOException */ public int readLine(byte[] b,int off,int len) throws IOException @@ -277,7 +277,7 @@ public class LineInput extends FilterInputStream * The default or supplied encoding is used to convert bytes to * characters. * @return LineBuffer instance or null for EOF. - * @exception IOException + * @throws IOException */ public LineBuffer readLineBuffer() throws IOException @@ -293,7 +293,7 @@ public class LineInput extends FilterInputStream * characters. * @param len Maximum length of a line, or 0 for default * @return LineBuffer instance or null for EOF. - * @exception IOException + * @throws IOException */ public LineBuffer readLineBuffer(int len) throws IOException diff --git a/core/java/src/gnu/getopt/LongOpt.java b/core/java/src/gnu/getopt/LongOpt.java index 6357085fe..9de9f43ad 100644 --- a/core/java/src/gnu/getopt/LongOpt.java +++ b/core/java/src/gnu/getopt/LongOpt.java @@ -117,7 +117,7 @@ private ResourceBundle _messages = ResourceBundle.getBundle( * @param flag If non-null, this is a location to store the value of "val" when this option is encountered, otherwise "val" is treated as the equivalent short option character. * @param val The value to return for this long option, or the equivalent single letter option to emulate if flag is null. * - * @exception IllegalArgumentException If the has_arg param is not one of NO_ARGUMENT, REQUIRED_ARGUMENT or OPTIONAL_ARGUMENT. + * @throws IllegalArgumentException If the has_arg param is not one of NO_ARGUMENT, REQUIRED_ARGUMENT or OPTIONAL_ARGUMENT. */ public LongOpt(String name, int has_arg, diff --git a/core/java/src/net/i2p/crypto/CryptixRijndael_Algorithm.java b/core/java/src/net/i2p/crypto/CryptixRijndael_Algorithm.java index 896036842..304f408c1 100644 --- a/core/java/src/net/i2p/crypto/CryptixRijndael_Algorithm.java +++ b/core/java/src/net/i2p/crypto/CryptixRijndael_Algorithm.java @@ -371,7 +371,7 @@ public final class CryptixRijndael_Algorithm // implicit no-argument constructor * session key, assuming Rijndael's default block size (128-bit). * * @param k The 128/192/256-bit user-key to use. - * @exception InvalidKeyException If the key is invalid. + * @throws InvalidKeyException If the key is invalid. */ public static final Object makeKey(byte[] k) throws InvalidKeyException { return makeKey(k, _BLOCK_SIZE); @@ -550,7 +550,7 @@ public final class CryptixRijndael_Algorithm // implicit no-argument constructor * * @param k The 128/192/256-bit user-key to use. * @param blockSize The block size in bytes of this Rijndael. - * @exception InvalidKeyException If the key is invalid. + * @throws InvalidKeyException If the key is invalid. */ public static final/* synchronized */Object makeKey(byte[] k, int blockSize) throws InvalidKeyException { return makeKey(k, blockSize, null); diff --git a/core/java/src/org/bouncycastle/oldcrypto/Mac.java b/core/java/src/org/bouncycastle/oldcrypto/Mac.java index fe27bc8d9..aa3f7605f 100644 --- a/core/java/src/org/bouncycastle/oldcrypto/Mac.java +++ b/core/java/src/org/bouncycastle/oldcrypto/Mac.java @@ -38,7 +38,7 @@ public interface Mac * Initialise the MAC. * * @param key the key required by the MAC. - * @exception IllegalArgumentException if the params argument is + * @throws IllegalArgumentException if the params argument is * inappropriate. */ public void init(byte key[]) @@ -62,7 +62,7 @@ public interface Mac * add a single byte to the mac for processing. * * @param in the byte to be processed. - * @exception IllegalStateException if the MAC is not initialised. + * @throws IllegalStateException if the MAC is not initialised. */ public void update(byte in) throws IllegalStateException; @@ -71,7 +71,7 @@ public interface Mac * @param in the array containing the input. * @param inOff the index in the array the data begins at. * @param len the length of the input starting at inOff. - * @exception IllegalStateException if the MAC is not initialised. + * @throws IllegalStateException if the MAC is not initialised. */ public void update(byte[] in, int inOff, int len) throws IllegalStateException; @@ -84,7 +84,7 @@ public interface Mac * * @param out the array the MAC is to be output to. * @param outOff the offset into the out buffer the output is to start at. - * @exception IllegalStateException if the MAC is not initialised. + * @throws IllegalStateException if the MAC is not initialised. */ public int doFinal(byte[] out, int outOff) throws IllegalStateException; From dc5bfb224d5769c13a9cab06687ef6185cd571f4 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 20:59:26 +0000 Subject: [PATCH 16/50] javadoc fixes part 4 (ticket #1894) --- core/java/src/net/i2p/crypto/eddsa/EdDSAEngine.java | 2 +- core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java | 2 ++ .../net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java | 3 +++ .../crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java | 1 + core/java/src/net/i2p/crypto/elgamal/ElGamalSigEngine.java | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/java/src/net/i2p/crypto/eddsa/EdDSAEngine.java b/core/java/src/net/i2p/crypto/eddsa/EdDSAEngine.java index 5fd1557e5..f693b946d 100644 --- a/core/java/src/net/i2p/crypto/eddsa/EdDSAEngine.java +++ b/core/java/src/net/i2p/crypto/eddsa/EdDSAEngine.java @@ -435,7 +435,7 @@ public final class EdDSAEngine extends Signature { } /** - * @deprecated replaced with + * @deprecated replaced with this */ @Override protected void engineSetParameter(String param, Object value) { diff --git a/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java b/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java index 3a6c57b82..712fa7085 100644 --- a/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java +++ b/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java @@ -33,6 +33,7 @@ public class GroupElement implements Serializable { *

  • P1P1: Completed representation ((X:Z), (Y:T)) satisfying x=X/Z, y=Y/T. *
  • PRECOMP: Precomputed representation (y+x, y-x, 2dxy). *
  • CACHED: Cached representation (Y+X, Y-X, Z, 2dT) + * */ public enum Representation { /** Projective (P^2): (X:Y:Z) satisfying x=X/Z, y=Y/Z */ @@ -220,6 +221,7 @@ public class GroupElement implements Serializable { *
  • If v * β = -u multiply β with i=sqrt(-1). *
  • Set x := β. *
  • If sign(x) != bit 255 of s then negate x. + * * * @param curve The curve. * @param s The encoded point. diff --git a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java index 53cff91a0..7f773e456 100644 --- a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java +++ b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java @@ -58,6 +58,7 @@ public class Ed25519FieldElement extends FieldElement { * Postconditions: *

      *
    • |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. + *
    * * @param val The field element to add. * @return The field element this + val. @@ -86,6 +87,7 @@ public class Ed25519FieldElement extends FieldElement { * Postconditions: *

      *
    • |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. + *
    * * @param val The field element to subtract. * @return The field element this - val. @@ -111,6 +113,7 @@ public class Ed25519FieldElement extends FieldElement { * Postconditions: *

      *
    • |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. + *
    * * @return The field element (-1) * this. */ diff --git a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java index 670da6471..611a0a1d8 100644 --- a/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java +++ b/core/java/src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java @@ -213,6 +213,7 @@ public class Ed25519LittleEndianEncoding extends Encoding { * Preconditions: *

      *
    • |x| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. + *
    * * @return true if x is in {1,3,5,...,q-2}, false otherwise. */ diff --git a/core/java/src/net/i2p/crypto/elgamal/ElGamalSigEngine.java b/core/java/src/net/i2p/crypto/elgamal/ElGamalSigEngine.java index b44dc5fbe..b3f26703d 100644 --- a/core/java/src/net/i2p/crypto/elgamal/ElGamalSigEngine.java +++ b/core/java/src/net/i2p/crypto/elgamal/ElGamalSigEngine.java @@ -147,7 +147,7 @@ public final class ElGamalSigEngine extends Signature { } /** - * @deprecated replaced with + * @deprecated replaced with this */ @Override protected void engineSetParameter(String param, Object value) { From eefb36cb99f7082b8a611ceb57a539b9c3541030 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 21:37:23 +0000 Subject: [PATCH 17/50] javadoc fixes part 5 (ticket #1894) --- core/java/src/net/i2p/crypto/SHA1.java | 2 +- .../src/net/i2p/kademlia/KBucketImpl.java | 2 +- .../net/metanotion/io/block/BlockFile.java | 2 +- .../metanotion/io/block/index/BSkipList.java | 1 + .../src/net/i2p/data/i2np/I2NPMessage.java | 14 ++++++------ .../net/i2p/router/TunnelPoolSettings.java | 2 +- .../net/i2p/router/client/LookupDestJob.java | 4 ++-- .../router/message/GarlicMessageBuilder.java | 2 +- .../OutboundClientMessageJobHelper.java | 4 ++-- .../kademlia/FloodfillPeerSelector.java | 2 +- .../src/net/i2p/router/time/NtpMessage.java | 2 +- .../transport/FIFOBandwidthLimiter.java | 4 ++-- .../transport/FIFOBandwidthRefiller.java | 2 +- .../router/transport/ntcp/EstablishState.java | 8 +++---- .../router/transport/udp/PacketBuilder.java | 2 +- .../i2p/router/transport/udp/PeerState.java | 4 ++-- .../router/transport/udp/UDPTransport.java | 8 +++---- .../router/tunnel/BatchedPreprocessor.java | 4 ++-- .../i2p/router/tunnel/TunnelDispatcher.java | 22 +++++++++---------- 19 files changed, 46 insertions(+), 45 deletions(-) diff --git a/core/java/src/net/i2p/crypto/SHA1.java b/core/java/src/net/i2p/crypto/SHA1.java index e64a4da0b..063307354 100644 --- a/core/java/src/net/i2p/crypto/SHA1.java +++ b/core/java/src/net/i2p/crypto/SHA1.java @@ -62,7 +62,7 @@ import net.i2p.util.SystemVersion; * http://www.itl.nist.gov/div897/pubs/fip180-1.htm
  • *
  • Bruce Schneier, "Section 18.7 Secure Hash Algorithm (SHA)", * Applied Cryptography, 2nd edition,
    - * John Wiley & Sons, 1996
  • + * John Wiley & Sons, 1996 * */ public final class SHA1 extends MessageDigest implements Cloneable { diff --git a/core/java/src/net/i2p/kademlia/KBucketImpl.java b/core/java/src/net/i2p/kademlia/KBucketImpl.java index ac804b90a..667312404 100644 --- a/core/java/src/net/i2p/kademlia/KBucketImpl.java +++ b/core/java/src/net/i2p/kademlia/KBucketImpl.java @@ -34,7 +34,7 @@ import net.i2p.util.ConcurrentHashSet; * The keys are kept in a Set and are NOT sorted by last-seen. * Per-key last-seen-time, failures, etc. must be tracked elsewhere. * - * If this bucket is full (i.e. begin == end && size == max) + * If this bucket is full (i.e. begin == end && size == max) * then add() will call KBucketTrimmer.trim() do * (possibly) remove older entries, and indicate whether * to add the new entry. If the trimmer returns true without diff --git a/core/java/src/net/metanotion/io/block/BlockFile.java b/core/java/src/net/metanotion/io/block/BlockFile.java index 1878aa828..4db5e1085 100644 --- a/core/java/src/net/metanotion/io/block/BlockFile.java +++ b/core/java/src/net/metanotion/io/block/BlockFile.java @@ -337,7 +337,7 @@ public class BlockFile implements Closeable { /** * Go to any page but the superblock. * Page 1 is the superblock, must use file.seek(0) to get there. - * @param page >= 2 + * @param page >= 2 */ public static void pageSeek(RandomAccessInterface file, int page) throws IOException { if (page < METAINDEX_PAGE) diff --git a/core/java/src/net/metanotion/io/block/index/BSkipList.java b/core/java/src/net/metanotion/io/block/index/BSkipList.java index c1a34d1ae..8ddd84f7d 100644 --- a/core/java/src/net/metanotion/io/block/index/BSkipList.java +++ b/core/java/src/net/metanotion/io/block/index/BSkipList.java @@ -221,6 +221,7 @@ public class BSkipList, V> extends SkipList find(K key) { if (!this.fileOnly) diff --git a/router/java/src/net/i2p/data/i2np/I2NPMessage.java b/router/java/src/net/i2p/data/i2np/I2NPMessage.java index af13f563e..8f1f72566 100644 --- a/router/java/src/net/i2p/data/i2np/I2NPMessage.java +++ b/router/java/src/net/i2p/data/i2np/I2NPMessage.java @@ -38,8 +38,8 @@ public interface I2NPMessage extends DataStructure { * Unused - All transports provide encapsulation and so we have byte arrays available. * * @param in stream to read from - * starting at type if type is < 0 (16 byte header) - * starting at ID if type is >= 0 (15 byte header) + * starting at type if type is < 0 (16 byte header) + * starting at ID if type is >= 0 (15 byte header) * @param type I2NP message type. If less than zero, read the type from data * @param buffer scratch buffer to be used when reading and parsing * @return size of the message read (including headers) @@ -58,8 +58,8 @@ public interface I2NPMessage extends DataStructure { * @param data the data * @param type I2NP message type. If less than zero, read the type from data * @param offset where to start - * starting at type if type is < 0 (16 byte header) - * starting at ID if type is >= 0 (15 byte header) + * starting at type if type is < 0 (16 byte header) + * starting at ID if type is >= 0 (15 byte header) * @return size of the message read (including headers) * @throws I2NPMessageException if there is no valid message * @throws IOException if there is a problem reading from the stream @@ -73,10 +73,10 @@ public interface I2NPMessage extends DataStructure { * @param data the data, may or may not include the type * @param type I2NP message type. If less than zero, read the type from data * @param offset where to start - * starting at type if type is < 0 (16 byte header) - * starting at ID if type is >= 0 (15 byte header) + * starting at type if type is < 0 (16 byte header) + * starting at ID if type is >= 0 (15 byte header) * @param maxLen read no more than this many bytes from data starting at offset, even if it is longer - * This includes the type byte only if type < 0 + * This includes the type byte only if type < 0 * @return size of the message read (including headers) * @throws I2NPMessageException if there is no valid message * @throws IOException if there is a problem reading from the stream diff --git a/router/java/src/net/i2p/router/TunnelPoolSettings.java b/router/java/src/net/i2p/router/TunnelPoolSettings.java index 24184cc14..c7377629d 100644 --- a/router/java/src/net/i2p/router/TunnelPoolSettings.java +++ b/router/java/src/net/i2p/router/TunnelPoolSettings.java @@ -166,7 +166,7 @@ public class TunnelPoolSettings { * If there are no tunnels to build with, will this pool allow 0 hop tunnels? * Always true for exploratory. * Generally true for client, but should probably be ignored... - * use getLength() + getLengthVariance() > 0 instead. + * use getLength() + getLengthVariance() > 0 instead. */ public boolean getAllowZeroHop() { return _allowZeroHop; } diff --git a/router/java/src/net/i2p/router/client/LookupDestJob.java b/router/java/src/net/i2p/router/client/LookupDestJob.java index 911365b8e..02212dc7e 100644 --- a/router/java/src/net/i2p/router/client/LookupDestJob.java +++ b/router/java/src/net/i2p/router/client/LookupDestJob.java @@ -43,8 +43,8 @@ class LookupDestJob extends JobImpl { * For hash or b32 name, the dest will be returned if the LS can be found, * even if the dest uses unsupported crypto. * - * @param reqID must be >= 0 if name != null - * @param sessID must non-null if reqID >= 0 + * @param reqID must be >= 0 if name != null + * @param sessID must non-null if reqID >= 0 * @param fromLocalDest use these tunnels for the lookup, or null for exploratory * @since 0.9.11 */ diff --git a/router/java/src/net/i2p/router/message/GarlicMessageBuilder.java b/router/java/src/net/i2p/router/message/GarlicMessageBuilder.java index d6382f457..f8c6f6386 100644 --- a/router/java/src/net/i2p/router/message/GarlicMessageBuilder.java +++ b/router/java/src/net/i2p/router/message/GarlicMessageBuilder.java @@ -35,7 +35,7 @@ public class GarlicMessageBuilder { /** * @param local non-null; do not use this method for the router's SessionKeyManager - * @param minTagOverride 0 for no override, > 0 to override SKM's settings + * @param minTagOverride 0 for no override, > 0 to override SKM's settings */ static boolean needsTags(RouterContext ctx, PublicKey key, Hash local, int minTagOverride) { SessionKeyManager skm = ctx.clientManager().getClientSessionKeyManager(local); diff --git a/router/java/src/net/i2p/router/message/OutboundClientMessageJobHelper.java b/router/java/src/net/i2p/router/message/OutboundClientMessageJobHelper.java index bb7cb83a8..0a3ab7882 100644 --- a/router/java/src/net/i2p/router/message/OutboundClientMessageJobHelper.java +++ b/router/java/src/net/i2p/router/message/OutboundClientMessageJobHelper.java @@ -99,8 +99,8 @@ class OutboundClientMessageJobHelper { * * This is called from OCMOSJ * - * @param tagsToSendOverride if > 0, use this instead of skm's default - * @param lowTagsOverride if > 0, use this instead of skm's default + * @param tagsToSendOverride if > 0, use this instead of skm's default + * @param lowTagsOverride if > 0, use this instead of skm's default * @param wrappedKey output parameter that will be filled with the sessionKey used * @param wrappedTags output parameter that will be filled with the sessionTags used * @param replyTunnel non-null if requireAck is true or bundledReplyLeaseSet is non-null diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java index 6cc414246..6e62703f5 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java @@ -151,7 +151,7 @@ class FloodfillPeerSelector extends PeerSelector { * @param maxNumRouters max to return * @param kbuckets now unused * - * Sorted by closest to the key if > maxNumRouters, otherwise not + * Sorted by closest to the key if > maxNumRouters, otherwise not * The list is in 3 groups - sorted by routing key within each group. * Group 1: No store or lookup failure in a long time, and * lookup fail rate no more than 1.5 * average diff --git a/router/java/src/net/i2p/router/time/NtpMessage.java b/router/java/src/net/i2p/router/time/NtpMessage.java index bd5e55459..eb44cc37d 100644 --- a/router/java/src/net/i2p/router/time/NtpMessage.java +++ b/router/java/src/net/i2p/router/time/NtpMessage.java @@ -278,7 +278,7 @@ class NtpMessage { /** - * Constructs a new NtpMessage in client -> server mode, and sets the + * Constructs a new NtpMessage in client -> server mode, and sets the * transmit timestamp to the current time. */ public NtpMessage() { diff --git a/router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java b/router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java index 02f4cabd3..811625222 100644 --- a/router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java +++ b/router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java @@ -833,7 +833,7 @@ public class FIFOBandwidthLimiter { /** * Only used by SSU. * May return without allocating. - * Check getPendingRequested() > 0 in a loop. + * Check getPendingRequested() > 0 in a loop. */ public void waitForNextAllocation() { boolean complete = false; @@ -912,7 +912,7 @@ public class FIFOBandwidthLimiter { /** * Block until we are allocated some more bytes. * May return without allocating. - * Check getPendingRequested() > 0 in a loop. + * Check getPendingRequested() > 0 in a loop. */ public void waitForNextAllocation(); /** we no longer want the data requested (the connection closed) */ diff --git a/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java b/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java index 0d662183e..a936043b3 100644 --- a/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java +++ b/router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java @@ -51,7 +51,7 @@ public class FIFOBandwidthRefiller implements Runnable { // no longer allow unlimited bandwidth - the user must specify a value, else use defaults below (KBps) public static final int DEFAULT_INBOUND_BANDWIDTH = 300; /** - * Caution, do not make DEFAULT_OUTBOUND_BANDWIDTH * DEFAULT_SHARE_PCT > 32 + * Caution, do not make DEFAULT_OUTBOUND_BANDWIDTH * DEFAULT_SHARE_PCT > 32 * without thinking about the implications (default connection limits, for example) * of moving the default bandwidth class from L to M, or maybe * adjusting bandwidth class boundaries. diff --git a/router/java/src/net/i2p/router/transport/ntcp/EstablishState.java b/router/java/src/net/i2p/router/transport/ntcp/EstablishState.java index 37096d18b..26784ed0d 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/EstablishState.java +++ b/router/java/src/net/i2p/router/transport/ntcp/EstablishState.java @@ -30,16 +30,16 @@ import net.i2p.util.SimpleByteCache; * ========================================================= * * Message 1 (Session Request): - * X+(H(X) xor Bob.identHash)-----------------------------> + * X+(H(X) xor Bob.identHash)-----------------------------> * * Message 2 (Session Created): - * <----------------------------------------Y+E(H(X+Y)+tsB, sk, Y[239:255]) + * <----------------------------------------Y+E(H(X+Y)+tsB, sk, Y[239:255]) * * Message 3 (Session Confirm A): - * E(sz+Alice.identity+tsA+padding+S(X+Y+Bob.identHash+tsA+tsB), sk, hX_xor_Bob.identHash[16:31])---> + * E(sz+Alice.identity+tsA+padding+S(X+Y+Bob.identHash+tsA+tsB), sk, hX_xor_Bob.identHash[16:31])---> * * Message 4 (Session Confirm B): - * <----------------------E(S(X+Y+Alice.identHash+tsA+tsB)+padding, sk, prev) + * <----------------------E(S(X+Y+Alice.identHash+tsA+tsB)+padding, sk, prev) * * Key: * diff --git a/router/java/src/net/i2p/router/transport/udp/PacketBuilder.java b/router/java/src/net/i2p/router/transport/udp/PacketBuilder.java index 6c8e0195e..6c49e78ea 100644 --- a/router/java/src/net/i2p/router/transport/udp/PacketBuilder.java +++ b/router/java/src/net/i2p/router/transport/udp/PacketBuilder.java @@ -222,7 +222,7 @@ class PacketBuilder { * * This doesn't leave anything for acks. * - * @param numFragments >= 1 + * @param numFragments >= 1 * @since 0.9.16 */ public static int getMaxAdditionalFragmentSize(PeerState peer, int numFragments, int curDataSize) { diff --git a/router/java/src/net/i2p/router/transport/udp/PeerState.java b/router/java/src/net/i2p/router/transport/udp/PeerState.java index 626774d3e..ca5eef438 100644 --- a/router/java/src/net/i2p/router/transport/udp/PeerState.java +++ b/router/java/src/net/i2p/router/transport/udp/PeerState.java @@ -1626,7 +1626,7 @@ class PeerState { /** * Pick one or more messages we want to send and allocate them out of our window * High usage - - * OutboundMessageFragments.getNextVolley() calls this 2nd, if finishMessages() returned > 0. + * OutboundMessageFragments.getNextVolley() calls this 2nd, if finishMessages() returned > 0. * TODO combine finishMessages(), allocateSend(), and getNextDelay() so we don't iterate 3 times. * * @return allocated messages to send (never empty), or null if no messages or no resources @@ -1857,7 +1857,7 @@ class PeerState { /** * A full ACK was received. - * TODO if messages awaiting ack were a HashMap this would be faster. + * TODO if messages awaiting ack were a HashMap<Long, OutboundMessageState> this would be faster. * * @return true if the message was acked for the first time */ 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 5686a4aa8..e65cadd2a 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -708,7 +708,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority /** * The current or configured internal IPv4 port. * UDPEndpoint should always be instantiated (and a random port picked if not configured) - * before this is called, so the returned value should be > 0 + * before this is called, so the returned value should be > 0 * unless the endpoint failed to bind. */ @Override @@ -719,7 +719,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority /** * The current or configured internal port. * UDPEndpoint should always be instantiated (and a random port picked if not configured) - * before this is called, so the returned value should be > 0 + * before this is called, so the returned value should be > 0 * unless the endpoint failed to bind. */ private int getRequestedPort(boolean ipv6) { @@ -903,7 +903,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority * * @param from Hash of inbound destination * @param ourIP publicly routable IPv4 only - * @param ourPort >= 1024 + * @param ourPort >= 1024 */ void externalAddressReceived(Hash from, byte ourIP[], int ourPort) { boolean isValid = isValid(ourIP) && @@ -976,7 +976,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority * * @param ourIP MUST have been previously validated with isValid() * IPv4 or IPv6 OK - * @param ourPort >= 1024 or 0 for no change + * @param ourPort >= 1024 or 0 for no change */ private boolean changeAddress(byte ourIP[], int ourPort) { // this defaults to true when we are firewalled and false otherwise. diff --git a/router/java/src/net/i2p/router/tunnel/BatchedPreprocessor.java b/router/java/src/net/i2p/router/tunnel/BatchedPreprocessor.java index 69fe08243..47471798a 100644 --- a/router/java/src/net/i2p/router/tunnel/BatchedPreprocessor.java +++ b/router/java/src/net/i2p/router/tunnel/BatchedPreprocessor.java @@ -35,8 +35,8 @@ import net.i2p.util.Log; * and this one won't fit, * let's look to see if we have somthing that would fit instead * by reordering: - * if (allocated > 0 && msg.getFragment == 0) { - * for (j = i+1, j < pending.size(); j++) { + * if (allocated > 0 && msg.getFragment == 0) { + * for (j = i+1, j < pending.size(); j++) { * if it will fit and it is fragment 0 { * msg = pending.remove(j) * pending.add(0, msg) diff --git a/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java b/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java index 05df3e28d..a5ac126bc 100644 --- a/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java +++ b/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java @@ -33,36 +33,36 @@ import net.i2p.util.Log; * * Following tunnels are created by us: * - * Outbound Gateway > 0 hops: + * Outbound Gateway > 0 hops: * PumpedTunnelGateway - * BatchedRouterPreprocessor -> OutboundSender -> OutboundReceiver -> OutNetMessagePool + * BatchedRouterPreprocessor -> OutboundSender -> OutboundReceiver -> OutNetMessagePool * * Outbound zero-hop Gateway+Endpoint: * TunnelGatewayZeroHop - * OutboundMessageDistributor -> OutNetMessagePool + * OutboundMessageDistributor -> OutNetMessagePool * - * Inbound Endpoint > 0 hops: + * Inbound Endpoint > 0 hops: * TunnelParticipant - * RouterFragmentHandler -> InboundEndpointProcessor -> InboundMessageDistributor -> InNetMessagePool + * RouterFragmentHandler -> InboundEndpointProcessor -> InboundMessageDistributor -> InNetMessagePool * * Inbound zero-hop Gateway+Endpoint: * TunnelGatewayZeroHop - * InboundMessageDistributor -> InNetMessagePool + * InboundMessageDistributor -> InNetMessagePool * * * Following tunnels are NOT created by us: * * Participant (not gateway or endpoint) * TunnelParticipant - * HopProcessor -> OutNetMessagePool + * HopProcessor -> OutNetMessagePool * - * Outbound Endpoint > 0 hops: + * Outbound Endpoint > 0 hops: * OutboundTunnelEndpoint - * RouterFragmentHandler -> HopProcessor -> OutboundMessageDistributor -> OutNetMessagePool + * RouterFragmentHandler -> HopProcessor -> OutboundMessageDistributor -> OutNetMessagePool * - * Inbound Gateway > 0 hops: + * Inbound Gateway > 0 hops: * ThrottledPumpedTunnelGateway - * BatchedRouterPreprocessor -> InboundSender -> InboundGatewayReceiver -> OutNetMessagePool + * BatchedRouterPreprocessor -> InboundSender -> InboundGatewayReceiver -> OutNetMessagePool * *
    */ From d196047382ee86f0b124cd7e598b0f869996c540 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 21:45:47 +0000 Subject: [PATCH 18/50] javadoc fixes part 6 (ticket #1894) --- core/java/src/gnu/crypto/prng/IRandomStandalone.java | 4 ++-- core/java/src/net/i2p/data/SDSCache.java | 4 ++-- core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java | 2 +- core/java/src/net/i2p/stat/Rate.java | 2 +- router/java/src/net/i2p/data/i2np/I2NPMessage.java | 3 --- router/java/src/net/i2p/router/InNetMessagePool.java | 4 ++-- router/java/src/net/i2p/router/message/CloveSet.java | 2 +- .../java/src/net/i2p/router/startup/LoadClientAppsJob.java | 2 +- .../net/i2p/router/transport/udp/OutboundMessageState.java | 6 +++--- 9 files changed, 13 insertions(+), 16 deletions(-) diff --git a/core/java/src/gnu/crypto/prng/IRandomStandalone.java b/core/java/src/gnu/crypto/prng/IRandomStandalone.java index b8a13e432..9d7e81fd0 100644 --- a/core/java/src/gnu/crypto/prng/IRandomStandalone.java +++ b/core/java/src/gnu/crypto/prng/IRandomStandalone.java @@ -114,7 +114,7 @@ public interface IRandomStandalone extends Cloneable { * * @return the next 8 bits of random data generated from this instance. * @throws IllegalStateException if the instance is not yet initialised. - * @throws LimLimitReachedExceptionStandalone this instance has reached its + * @throws LimitReachedExceptionStandalone this instance has reached its * theoretical limit for generating non-repetitive pseudo-random data. */ byte nextByte() throws IllegalStateException, LimitReachedExceptionStandalone; @@ -131,7 +131,7 @@ public interface IRandomStandalone extends Cloneable { * @param length the maximum number of required random bytes. This method * does nothing if this parameter is less than 1. * @throws IllegalStateException if the instance is not yet initialised. - * @throws LimitLimitReachedExceptionStandalonehis instance has reached its + * @throws LimitReachedExceptionStandalone this instance has reached its * theoretical limit for generating non-repetitive pseudo-random data. */ void nextBytes(byte[] out, int offset, int length) diff --git a/core/java/src/net/i2p/data/SDSCache.java b/core/java/src/net/i2p/data/SDSCache.java index 2ab2e2649..2654af32d 100644 --- a/core/java/src/net/i2p/data/SDSCache.java +++ b/core/java/src/net/i2p/data/SDSCache.java @@ -25,7 +25,7 @@ import net.i2p.util.SystemVersion; * Following is sample usage: *
     
    -    private static final SDSCache _cache = new SDSCache(Foo.class, LENGTH, 1024);
    +    private static final SDSCache<Foo> _cache = new SDSCache(Foo.class, LENGTH, 1024);
     
         public static Foo create(byte[] data) {
             return _cache.get(data);
    @@ -113,7 +113,7 @@ public class SDSCache {
          *  @return the cached value if available, otherwise
          *          makes a new object and returns it
          *  @throws IllegalArgumentException if data is not the correct number of bytes
    -     *  @throws NPE
    +     *  @throws NullPointerException
          */
         public V get(byte[] data) {
             if (data == null)
    diff --git a/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java b/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java
    index 1f91da128..4049535f7 100644
    --- a/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java
    +++ b/core/java/src/net/i2p/data/i2cp/I2CPMessageImpl.java
    @@ -28,7 +28,7 @@ public abstract class I2CPMessageImpl extends DataStructureImpl implements I2CPM
         }
     
         /**
    -     * Validate the type and size of the message, and then read the message into the data structures.  

    + * Validate the type and size of the message, and then read the message into the data structures.

    * * @throws IOException */ diff --git a/core/java/src/net/i2p/stat/Rate.java b/core/java/src/net/i2p/stat/Rate.java index edac7d96b..d12ece8aa 100644 --- a/core/java/src/net/i2p/stat/Rate.java +++ b/core/java/src/net/i2p/stat/Rate.java @@ -138,7 +138,7 @@ public class Rate { /** * Create a new rate and load its state from the properties, taking data - * from the data points underneath the given prefix.

    + * from the data points underneath the given prefix.

    * (e.g. prefix = "profile.dbIntroduction.60m", this will load the associated data points such * as "profile.dbIntroduction.60m.lifetimeEventCount"). The data can be exported * through store(outputStream, "profile.dbIntroduction.60m"). diff --git a/router/java/src/net/i2p/data/i2np/I2NPMessage.java b/router/java/src/net/i2p/data/i2np/I2NPMessage.java index 8f1f72566..d1c739140 100644 --- a/router/java/src/net/i2p/data/i2np/I2NPMessage.java +++ b/router/java/src/net/i2p/data/i2np/I2NPMessage.java @@ -62,7 +62,6 @@ public interface I2NPMessage extends DataStructure { * starting at ID if type is >= 0 (15 byte header) * @return size of the message read (including headers) * @throws I2NPMessageException if there is no valid message - * @throws IOException if there is a problem reading from the stream */ public int readBytes(byte data[], int type, int offset) throws I2NPMessageException; @@ -79,7 +78,6 @@ public interface I2NPMessage extends DataStructure { * This includes the type byte only if type < 0 * @return size of the message read (including headers) * @throws I2NPMessageException if there is no valid message - * @throws IOException if there is a problem reading from the stream * @since 0.8.12 */ public int readBytes(byte data[], int type, int offset, int maxLen) throws I2NPMessageException; @@ -95,7 +93,6 @@ public interface I2NPMessage extends DataStructure { * @param type I2NP message type * @throws I2NPMessageException if the stream doesn't contain a valid message * that this class can read. - * @throws IOException if there is a problem reading from the stream */ public void readMessage(byte data[], int offset, int dataSize, int type) throws I2NPMessageException; public void readMessage(byte data[], int offset, int dataSize, int type, I2NPMessageHandler handler) throws I2NPMessageException; diff --git a/router/java/src/net/i2p/router/InNetMessagePool.java b/router/java/src/net/i2p/router/InNetMessagePool.java index 2337dbce6..b126815a0 100644 --- a/router/java/src/net/i2p/router/InNetMessagePool.java +++ b/router/java/src/net/i2p/router/InNetMessagePool.java @@ -92,7 +92,7 @@ public class InNetMessagePool implements Service { /** * @return previous builder for this message type, or null - * @throws AIOOBE if i2npMessageType is greater than MAX_I2NP_MESSAGE_TYPE + * @throws ArrayIndexOutOfBoundsException if i2npMessageType is greater than MAX_I2NP_MESSAGE_TYPE */ public synchronized HandlerJobBuilder registerHandlerJobBuilder(int i2npMessageType, HandlerJobBuilder builder) { HandlerJobBuilder old = _handlerJobBuilders[i2npMessageType]; @@ -102,7 +102,7 @@ public class InNetMessagePool implements Service { /** * @return previous builder for this message type, or null - * @throws AIOOBE if i2npMessageType is greater than MAX_I2NP_MESSAGE_TYPE + * @throws ArrayIndexOutOfBoundsException if i2npMessageType is greater than MAX_I2NP_MESSAGE_TYPE * @deprecated unused */ @Deprecated diff --git a/router/java/src/net/i2p/router/message/CloveSet.java b/router/java/src/net/i2p/router/message/CloveSet.java index d03289931..3b9fe3042 100644 --- a/router/java/src/net/i2p/router/message/CloveSet.java +++ b/router/java/src/net/i2p/router/message/CloveSet.java @@ -34,7 +34,7 @@ class CloveSet { public int getCloveCount() { return _cloves.length; } - /** @throws AIOOBE */ + /** @throws ArrayIndexOutOfBoundsException */ public GarlicClove getClove(int index) { return _cloves[index]; } public Certificate getCertificate() { return _cert; } diff --git a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java index 67ab00951..bdfb3385c 100644 --- a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java +++ b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java @@ -183,7 +183,7 @@ public class LoadClientAppsJob extends JobImpl { * * @param clientName can be null * @param args can be null - * @throws just about anything, caller would be wise to catch Throwable + * @throws Exception just about anything, caller would be wise to catch Throwable * @since 0.7.13 */ public static void runClientInline(String className, String clientName, String args[], Log log) throws Exception { diff --git a/router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java b/router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java index de804ae9f..b1d4d71d2 100644 --- a/router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java +++ b/router/java/src/net/i2p/router/transport/udp/OutboundMessageState.java @@ -47,7 +47,7 @@ class OutboundMessageState implements CDPQEntry { * "injected" message from the establisher. * * Called from UDPTransport. - * @throws IAE if too big or if msg or peer is null + * @throws IllegalArgumentException if too big or if msg or peer is null */ public OutboundMessageState(I2PAppContext context, I2NPMessage msg, PeerState peer) { this(context, null, msg, peer); @@ -57,7 +57,7 @@ class OutboundMessageState implements CDPQEntry { * Normal constructor. * * Called from OutboundMessageFragments. - * @throws IAE if too big or if msg or peer is null + * @throws IllegalArgumentException if too big or if msg or peer is null */ public OutboundMessageState(I2PAppContext context, OutNetMessage m, PeerState peer) { this(context, m, m.getMessage(), peer); @@ -66,7 +66,7 @@ class OutboundMessageState implements CDPQEntry { /** * Internal. * @param m null if msg is "injected" - * @throws IAE if too big or if msg or peer is null + * @throws IllegalArgumentException if too big or if msg or peer is null */ private OutboundMessageState(I2PAppContext context, OutNetMessage m, I2NPMessage msg, PeerState peer) { if (msg == null || peer == null) From b970912cc1de7ec549b1e6eb7fdfced7a8686fac Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 26 Jan 2017 21:55:04 +0000 Subject: [PATCH 19/50] javadoc fixes part 7 (ticket #1894) --- core/java/src/gnu/getopt/Getopt.java | 2 +- core/java/src/net/i2p/client/naming/NamingService.java | 4 ++-- core/java/src/net/i2p/crypto/ElGamalAESEngine.java | 4 ++-- core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java | 2 +- core/java/src/net/i2p/data/Certificate.java | 4 ++-- core/java/src/net/i2p/data/PrivateKeyFile.java | 2 +- core/java/src/net/i2p/util/EepGet.java | 6 +++--- router/java/src/net/i2p/data/i2np/FastI2NPMessageImpl.java | 2 +- router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java | 2 +- router/java/src/net/i2p/router/tasks/ThreadDump.java | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/java/src/gnu/getopt/Getopt.java b/core/java/src/gnu/getopt/Getopt.java index 6ca1c6ee3..caf7f49ca 100644 --- a/core/java/src/gnu/getopt/Getopt.java +++ b/core/java/src/gnu/getopt/Getopt.java @@ -336,7 +336,7 @@ import java.text.MessageFormat; * break; * } * // - * for (int i = g.getOptind(); i < argv.length ; i++) + * for (int i = g.getOptind(); i < argv.length ; i++) * System.out.println("Non option argv element: " + argv[i] + "\n"); *

    *

    diff --git a/core/java/src/net/i2p/client/naming/NamingService.java b/core/java/src/net/i2p/client/naming/NamingService.java index d71702d88..5bfa3082e 100644 --- a/core/java/src/net/i2p/client/naming/NamingService.java +++ b/core/java/src/net/i2p/client/naming/NamingService.java @@ -534,7 +534,7 @@ public abstract class NamingService { * See also lookup(Hash, int). * * @param hostname must be {52 chars}.b32.i2p - * @param timeout in seconds; <= 0 means use router default + * @param timeout in seconds; <= 0 means use router default * @return dest or null * @since 0.8.7 */ @@ -546,7 +546,7 @@ public abstract class NamingService { * Same as lookupBase32() but with the SHA256 Hash precalculated * This implementation returns null. * - * @param timeout in seconds; <= 0 means use router default + * @param timeout in seconds; <= 0 means use router default * @return dest or null * @since 0.8.7 */ diff --git a/core/java/src/net/i2p/crypto/ElGamalAESEngine.java b/core/java/src/net/i2p/crypto/ElGamalAESEngine.java index 6f0c87ab3..5f5cedd7c 100644 --- a/core/java/src/net/i2p/crypto/ElGamalAESEngine.java +++ b/core/java/src/net/i2p/crypto/ElGamalAESEngine.java @@ -429,11 +429,11 @@ public final class ElGamalAESEngine { * * In the router, we always use garlic messages. A garlic message with a single * clove and zero data is about 84 bytes, so that's 123 bytes minimum. So any paddingSize - * <= 128 is a no-op as every message will be at least 128 bytes + * <= 128 is a no-op as every message will be at least 128 bytes * (Streaming, if used, adds more overhead). * * Outside the router, with a client using its own message format, the minimum size - * is 48, so any paddingSize <= 48 is a no-op. + * is 48, so any paddingSize <= 48 is a no-op. * * Not included in the minimum is a 32-byte session tag for an existing session, * or a 514-byte ElGamal block and several 32-byte session tags for a new session. diff --git a/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java b/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java index 712fa7085..65f791f95 100644 --- a/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java +++ b/core/java/src/net/i2p/crypto/eddsa/math/GroupElement.java @@ -862,7 +862,7 @@ public class GroupElement implements Serializable { * Constant time. *

    * Preconditions: (TODO: Check this applies here) - * a[31] <= 127 + * a[31] <= 127 * @param a = a[0]+256*a[1]+...+256^31 a[31] * @return the GroupElement */ diff --git a/core/java/src/net/i2p/data/Certificate.java b/core/java/src/net/i2p/data/Certificate.java index 200423d8b..f6ad769ea 100644 --- a/core/java/src/net/i2p/data/Certificate.java +++ b/core/java/src/net/i2p/data/Certificate.java @@ -116,7 +116,7 @@ public class Certificate extends DataStructureImpl { } /** - * @throws IllegalArgumentException if type < 0 + * @throws IllegalArgumentException if type < 0 */ public Certificate(int type, byte[] payload) { if (type < 0) @@ -131,7 +131,7 @@ public class Certificate extends DataStructureImpl { } /** - * @throws IllegalArgumentException if type < 0 + * @throws IllegalArgumentException if type < 0 * @throws IllegalStateException if already set */ public void setCertificateType(int type) { diff --git a/core/java/src/net/i2p/data/PrivateKeyFile.java b/core/java/src/net/i2p/data/PrivateKeyFile.java index e716463cb..0fc4741c6 100644 --- a/core/java/src/net/i2p/data/PrivateKeyFile.java +++ b/core/java/src/net/i2p/data/PrivateKeyFile.java @@ -253,7 +253,7 @@ public class PrivateKeyFile { } /** - * @param padding null OK, must be non-null if spubkey length < 128 + * @param padding null OK, must be non-null if spubkey length < 128 * @throws IllegalArgumentException on mismatch of spubkey and spk types * @since 0.9.16 */ diff --git a/core/java/src/net/i2p/util/EepGet.java b/core/java/src/net/i2p/util/EepGet.java index a26312ebf..9d4656cee 100644 --- a/core/java/src/net/i2p/util/EepGet.java +++ b/core/java/src/net/i2p/util/EepGet.java @@ -607,9 +607,9 @@ public class EepGet { /** * Blocking fetch. * - * @param fetchHeaderTimeout <= 0 for none (proxy will timeout if none, none isn't recommended if no proxy) - * @param totalTimeout <= 0 for default none - * @param inactivityTimeout <= 0 for default 60 sec + * @param fetchHeaderTimeout <= 0 for none (proxy will timeout if none, none isn't recommended if no proxy) + * @param totalTimeout <= 0 for default none + * @param inactivityTimeout <= 0 for default 60 sec */ public boolean fetch(long fetchHeaderTimeout, long totalTimeout, long inactivityTimeout) { _fetchHeaderTimeout = (int) Math.min(fetchHeaderTimeout, Integer.MAX_VALUE); diff --git a/router/java/src/net/i2p/data/i2np/FastI2NPMessageImpl.java b/router/java/src/net/i2p/data/i2np/FastI2NPMessageImpl.java index 72f726a8b..5c8ef3546 100644 --- a/router/java/src/net/i2p/data/i2np/FastI2NPMessageImpl.java +++ b/router/java/src/net/i2p/data/i2np/FastI2NPMessageImpl.java @@ -73,7 +73,7 @@ public abstract class FastI2NPMessageImpl extends I2NPMessageImpl { * Ignore, but save, the checksum, to be used later if necessary. * * @param maxLen read no more than this many bytes from data starting at offset, even if it is longer - * This includes the type byte only if type < 0 + * This includes the type byte only if type < 0 * @throws IllegalStateException if called twice, to protect saved checksum */ @Override diff --git a/router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java b/router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java index 851c0dc82..91acead40 100644 --- a/router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java +++ b/router/java/src/net/i2p/data/i2np/I2NPMessageImpl.java @@ -189,7 +189,7 @@ public abstract class I2NPMessageImpl extends DataStructureImpl implements I2NPM * we can use a large buffer but prevent the reader from reading off the end. * * @param maxLen read no more than this many bytes from data starting at offset, even if it is longer - * This includes the type byte only if type < 0 + * This includes the type byte only if type < 0 * @since 0.8.12 */ public int readBytes(byte data[], int type, int offset, int maxLen) throws I2NPMessageException { diff --git a/router/java/src/net/i2p/router/tasks/ThreadDump.java b/router/java/src/net/i2p/router/tasks/ThreadDump.java index b1f2b356d..79a4f90c2 100644 --- a/router/java/src/net/i2p/router/tasks/ThreadDump.java +++ b/router/java/src/net/i2p/router/tasks/ThreadDump.java @@ -19,8 +19,8 @@ abstract class ThreadDump { * It waits for the signal to complete (which should be fast) * but does not wait for the dump itself. * - * @param secondsToWait if <= 0, don't wait - * @return success, false if windows or no wrapper, true if secondsToWait <= 0, + * @param secondsToWait if <= 0, don't wait + * @return success, false if windows or no wrapper, true if secondsToWait <= 0, false if timed out, dump result otherwise */ public static boolean dump(I2PAppContext context, int secondsToWait) { From 5db89d87436e610de81bfa99652eff9b44d81caa Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 01:36:26 +0000 Subject: [PATCH 20/50] javadoc fixes part 8 (ticket #1894) --- .../networkdb/kademlia/KademliaNetworkDatabaseFacade.java | 2 +- .../java/src/net/i2p/router/networkdb/kademlia/SearchJob.java | 1 + .../src/net/i2p/router/networkdb/kademlia/StoreState.java | 1 + router/java/src/net/i2p/router/startup/LoadClientAppsJob.java | 2 +- router/java/src/net/i2p/router/startup/WorkingDir.java | 4 ++-- router/java/src/net/i2p/router/transport/UPnP.java | 2 +- router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java | 1 + router/java/src/net/i2p/router/util/RandomIterator.java | 2 +- router/java/src/org/xlattice/crypto/filters/BloomSHA1.java | 2 +- 9 files changed, 10 insertions(+), 7 deletions(-) diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java b/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java index 6c4f1bae6..a2e82d696 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java @@ -1298,7 +1298,7 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade { /** * Is the key in the negative lookup cache? - *& + * * @param key for Destinations or RouterIdentities * @since 0.9.4 moved from FNDF to KNDF in 0.9.16 */ diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java b/router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java index 272ed743b..6ebfae9df 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java @@ -153,6 +153,7 @@ class SearchJob extends JobImpl { } ***/ + /** timeout */ static final int PER_FLOODFILL_PEER_TIMEOUT = 10*1000; static final long MIN_TIMEOUT = 2500; diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/StoreState.java b/router/java/src/net/i2p/router/networkdb/kademlia/StoreState.java index cbe5037a8..8404d996d 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/StoreState.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/StoreState.java @@ -79,6 +79,7 @@ class StoreState { } ****/ + /** getFailed */ public Set getFailed() { synchronized (_failedPeers) { return new HashSet(_failedPeers); diff --git a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java index bdfb3385c..b45be2d96 100644 --- a/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java +++ b/router/java/src/net/i2p/router/startup/LoadClientAppsJob.java @@ -197,7 +197,7 @@ public class LoadClientAppsJob extends JobImpl { * @param clientName can be null * @param args can be null * @param cl can be null - * @throws just about anything, caller would be wise to catch Throwable + * @throws Exception just about anything, caller would be wise to catch Throwable * @since 0.7.14 */ public static void runClientInline(String className, String clientName, String args[], diff --git a/router/java/src/net/i2p/router/startup/WorkingDir.java b/router/java/src/net/i2p/router/startup/WorkingDir.java index 9d4fb5128..5c9b9192e 100644 --- a/router/java/src/net/i2p/router/startup/WorkingDir.java +++ b/router/java/src/net/i2p/router/startup/WorkingDir.java @@ -41,8 +41,6 @@ import net.i2p.util.SystemVersion; * After migration, the router will run using the new directory. * The wrapper, however, must be stopped and restarted from the new script - until then, * it will continue to write to wrapper.log* in the old directory. - * - * @param whether to copy all data over from an existing install */ public class WorkingDir { @@ -63,6 +61,8 @@ public class WorkingDir { * Caller should store the return value for future reference. * * This also redirects stdout and stderr to a wrapper.log file if there is no wrapper present. + * + * @param migrateOldConfig whether to copy all data over from an existing install */ public static String getWorkingDir(Properties envProps, boolean migrateOldConfig) { String dir = null; diff --git a/router/java/src/net/i2p/router/transport/UPnP.java b/router/java/src/net/i2p/router/transport/UPnP.java index 52637cec9..767bc12ba 100644 --- a/router/java/src/net/i2p/router/transport/UPnP.java +++ b/router/java/src/net/i2p/router/transport/UPnP.java @@ -51,7 +51,7 @@ import org.freenetproject.ForwardPortStatus; * * ================== * - * This plugin implements UP&P support on a Freenet node. + * This plugin implements UP&P support on a Freenet node. * * @author Florent Daignière <nextgens@freenetproject.org> * diff --git a/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java b/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java index a5ac126bc..4e80c3657 100644 --- a/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java +++ b/router/java/src/net/i2p/router/tunnel/TunnelDispatcher.java @@ -916,6 +916,7 @@ public class TunnelDispatcher implements Service { } ******/ + /** startup */ public synchronized void startup() { // Note that we only use the validator for participants and OBEPs, not IBGWs, so // this BW estimate will be high by about 33% assuming 2-hop tunnels average diff --git a/router/java/src/net/i2p/router/util/RandomIterator.java b/router/java/src/net/i2p/router/util/RandomIterator.java index 2baa221c0..b4252eb39 100644 --- a/router/java/src/net/i2p/router/util/RandomIterator.java +++ b/router/java/src/net/i2p/router/util/RandomIterator.java @@ -25,7 +25,7 @@ import net.i2p.util.SystemVersion; * Here is a sample on how to use the code: *

    -        for(Iterator iter = new RandomIterator(myObjList); iter.hasNext();){
    +        for(Iterator<Object> iter = new RandomIterator<Object>(myObjList); iter.hasNext();){
                 Object o = iter.next();
                 if(someCondition(o) )
                     return o; // iteration stopped early
    diff --git a/router/java/src/org/xlattice/crypto/filters/BloomSHA1.java b/router/java/src/org/xlattice/crypto/filters/BloomSHA1.java
    index 6320f43f3..59d9fb9e6 100644
    --- a/router/java/src/org/xlattice/crypto/filters/BloomSHA1.java
    +++ b/router/java/src/org/xlattice/crypto/filters/BloomSHA1.java
    @@ -27,7 +27,7 @@ import java.util.concurrent.LinkedBlockingQueue;
      * This class is designed to be thread-safe, but this has not been
      * exhaustively tested.
      *
    - * @author < A HREF="mailto:jddixon@users.sourceforge.net">Jim Dixon
    + * @author Jim Dixon
      * 
      * BloomSHA1.java and KeySelector.java are BSD licensed from the xlattice
      * app - http://xlattice.sourceforge.net/
    
    From fb74f41692947033def107113c4a7bd6f9ca2de3 Mon Sep 17 00:00:00 2001
    From: zzz 
    Date: Fri, 27 Jan 2017 01:41:06 +0000
    Subject: [PATCH 21/50] javadoc fixes part 9 (ticket #1894)
    
    ---
     .../src/net/i2p/client/streaming/I2PSocketAddress.java |  8 ++++----
     .../net/i2p/client/streaming/I2PSocketException.java   |  2 +-
     .../src/net/i2p/client/streaming/I2PSocketManager.java |  2 +-
     .../i2p/client/streaming/I2PSocketManagerFactory.java  | 10 +++++-----
     .../src/net/i2p/client/streaming/I2PSocketOptions.java |  4 ++--
     .../src/net/i2p/client/streaming/impl/Connection.java  | 10 +++++-----
     .../client/streaming/impl/ConnectionDataReceiver.java  |  4 ++--
     .../client/streaming/impl/ConnectionPacketHandler.java |  2 +-
     .../client/streaming/impl/I2PSocketManagerFull.java    |  2 +-
     .../client/streaming/impl/I2PSocketOptionsImpl.java    |  4 ++--
     .../net/i2p/client/streaming/impl/MessageHandler.java  |  4 ++--
     .../i2p/client/streaming/impl/MessageInputStream.java  |  6 +++---
     .../i2p/client/streaming/impl/MessageOutputStream.java |  4 ++--
     .../java/src/net/i2p/client/streaming/impl/Packet.java |  2 +-
     .../net/i2p/client/streaming/impl/PacketHandler.java   |  4 ++--
     .../src/net/i2p/client/streaming/impl/PacketQueue.java |  4 ++--
     .../net/i2p/client/streaming/impl/StandardSocket.java  |  2 +-
     .../java/src/net/i2p/router/util/DecayingHashSet.java  |  4 ++--
     .../src/org/xlattice/crypto/filters/KeySelector.java   |  2 +-
     19 files changed, 40 insertions(+), 40 deletions(-)
    
    diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java
    index 7b35e7a6c..8b8f50463 100644
    --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java
    +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java
    @@ -26,7 +26,7 @@ public class I2PSocketAddress extends SocketAddress {
          *  Does a naming service lookup to resolve the dest.
          *  May take several seconds for b32.
          *  @param host hostname or b64 dest or b32, may have :port appended
    -     *  @throws IllegalArgumentException for port < 0 or port > 65535 or invalid port
    +     *  @throws IllegalArgumentException for port < 0 or port > 65535 or invalid port
          *  @since 0.9.9
          */
         public I2PSocketAddress(String host) {
    @@ -51,7 +51,7 @@ public class I2PSocketAddress extends SocketAddress {
     
         /**
          *  Does not do a reverse lookup. Host will be null.
    -     *  @throws IllegalArgumentException for port < 0 or port > 65535
    +     *  @throws IllegalArgumentException for port < 0 or port > 65535
          */
         public I2PSocketAddress(Destination dest, int port) {
             if (dest == null)
    @@ -66,7 +66,7 @@ public class I2PSocketAddress extends SocketAddress {
         /**
          *  Does a naming service lookup to resolve the dest.
          *  May take several seconds for b32.
    -     *  @throws IllegalArgumentException for port < 0 or port > 65535
    +     *  @throws IllegalArgumentException for port < 0 or port > 65535
          */
         public I2PSocketAddress(String host, int port) {
             if (port < 0 || port > 65535)
    @@ -77,7 +77,7 @@ public class I2PSocketAddress extends SocketAddress {
         }
     
         /**
    -     *  @throws IllegalArgumentException for port < 0 or port > 65535
    +     *  @throws IllegalArgumentException for port < 0 or port > 65535
          */
         public static I2PSocketAddress createUnresolved(String host, int port) {
             return new I2PSocketAddress(port, host);
    diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java
    index 4be4d532b..a4532debc 100644
    --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java
    +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java
    @@ -32,7 +32,7 @@ public class I2PSocketException extends SocketException {
          *  Standard codes from client-side I2CP are 256-511, defined in SendMessageStatusListener.
          *  Standard codes from streaming are 512-767, defined here.
          *
    -     *  @param status >= 0 from MessageStatusMessage or SendMessageStatusListener
    +     *  @param status >= 0 from MessageStatusMessage or SendMessageStatusListener
          */
         public I2PSocketException(int status) {
             super();
    diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java
    index a969581bd..ab183a817 100644
    --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java
    +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java
    @@ -240,7 +240,7 @@ public interface I2PSocketManager {
         /**
          *  Like connect() but returns a real Socket, and throws only IOE,
          *  for easier porting of apps.
    -     *  @param timeout ms if > 0, forces blocking (disables connectDelay)
    +     *  @param timeout ms if > 0, forces blocking (disables connectDelay)
          *  @since 0.8.4
          */
         public Socket connectToSocket(Destination peer, int timeout) throws IOException;
    diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java
    index 466c8c88a..3490f18e3 100644
    --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java
    +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java
    @@ -80,7 +80,7 @@ public class I2PSocketManagerFactory {
          * The nonblocking createDisconnectedManager() is preferred.
          * 
          * @param host I2CP host null to use default, ignored if in router context
    -     * @param port I2CP port <= 0 to use default, ignored if in router context
    +     * @param port I2CP port <= 0 to use default, ignored if in router context
          * @return the newly created socket manager, or null if there were errors
          */
         public static I2PSocketManager createManager(String host, int port) {
    @@ -95,7 +95,7 @@ public class I2PSocketManagerFactory {
          * The nonblocking createDisconnectedManager() is preferred.
          *
          * @param i2cpHost I2CP host null to use default, ignored if in router context
    -     * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
    +     * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
          * @param opts Streaming and I2CP options, may be null
          * @return the newly created socket manager, or null if there were errors
          */
    @@ -157,7 +157,7 @@ public class I2PSocketManagerFactory {
          * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
          *                           or null for a transient destination. Caller must close.
          * @param i2cpHost I2CP host null to use default, ignored if in router context
    -     * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
    +     * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
          * @param opts Streaming and I2CP options, may be null
          * @return the newly created socket manager, or null if there were errors
          */
    @@ -184,7 +184,7 @@ public class I2PSocketManagerFactory {
          * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
          *                           or null for a transient destination. Caller must close.
          * @param i2cpHost I2CP host null to use default, ignored if in router context
    -     * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
    +     * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
          * @param opts Streaming and I2CP options, may be null
          * @return the newly created socket manager, non-null (throws on error)
          * @since 0.9.8
    @@ -216,7 +216,7 @@ public class I2PSocketManagerFactory {
          * @param myPrivateKeyStream private key stream, format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile}
          *                           non-null. Caller must close.
          * @param i2cpHost I2CP host null to use default, ignored if in router context
    -     * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
    +     * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
          * @param opts Streaming and I2CP options, may be null
          * @param connect true to connect (blocking)
          * @return the newly created socket manager, non-null (throws on error)
    diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java
    index 692c04f7b..685b910bb 100644
    --- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java
    +++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java
    @@ -18,7 +18,7 @@ public interface I2PSocketOptions {
          * How long we will wait for the ACK from a SYN, in milliseconds.
          *
          * Default 60 seconds. Max of 2 minutes enforced in Connection.java,
    -     * and it also interprets <= 0 as default.
    +     * and it also interprets <= 0 as default.
          *
          * @return milliseconds to wait, or -1 if we will wait indefinitely
          */
    @@ -28,7 +28,7 @@ public interface I2PSocketOptions {
          * Define how long we will wait for the ACK from a SYN, in milliseconds.
          *
          * Default 60 seconds. Max of 2 minutes enforced in Connection.java,
    -     * and it also interprets <= 0 as default.
    +     * and it also interprets <= 0 as default.
          *
          * @param ms timeout in ms
          */
    diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java
    index 0d295d73c..1e33c793b 100644
    --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java
    +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java
    @@ -177,7 +177,7 @@ class Connection {
          *
          * @param timeoutMs 0 or negative means wait forever, 5 minutes max
          * @return true if the packet should be sent, false for a fatal error
    -     *         will return false after 5 minutes even if timeoutMs is <= 0.
    +     *         will return false after 5 minutes even if timeoutMs is <= 0.
          */
         public boolean packetSendChoke(long timeoutMs) throws IOException, InterruptedException {
             long start = _context.clock().now();
    @@ -635,7 +635,7 @@ class Connection {
         /**
          *  Always true at the start, even if we haven't gotten a reply on an
          *  outbound connection. Only set to false on disconnect.
    -     *  For outbound, use getHighestAckedThrough() >= 0 also,
    +     *  For outbound, use getHighestAckedThrough() >= 0 also,
          *  to determine if the connection is up.
          *
          *  In general, this is true until either:
    @@ -961,9 +961,9 @@ class Connection {
         }
     
         /**
    -     *  If the next send time is currently >= 0 (i.e. not "never"),
    +     *  If the next send time is currently >= 0 (i.e. not "never"),
          *  this may make the next time sooner but will not make it later.
    -     *  If the next send time is currently < 0 (i.e. "never"),
    +     *  If the next send time is currently < 0 (i.e. "never"),
          *  this will set it to the time specified, but not later than
          *  options.getSendAckDelay() from now (1000 ms)
          */
    @@ -1328,7 +1328,7 @@ class Connection {
              * we have to use forceReschedule() instead of schedule() below,
              * to prevent duplicates in the timer queue.
              *
    -         * don't synchronize this, deadlock with ackPackets->ackReceived->SimpleTimer2.cancel
    +         * don't synchronize this, deadlock with ackPackets->ackReceived->SimpleTimer2.cancel
              *
              * @return true if the packet was sent, false if it was not
              */
    diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java
    index 6836cd74a..c8098024c 100644
    --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java
    +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java
    @@ -11,7 +11,7 @@ import net.i2p.util.Log;
      * delivery, or even the generation of a new packet.  This class
      * is the only one that builds useful outbound Packet objects.
      *

    - * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession + * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession *

    * There's one of these per MessageOutputStream. * It stores no state. It sends everything to the Connection unless @@ -36,7 +36,7 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver { * This tells the flusher in MessageOutputStream whether to flush. * It won't flush if this returns true. * - * It was: return con.getUnackedPacketsSent() > 0 (i.e. Nagle) + * It was: return con.getUnackedPacketsSent() > 0 (i.e. Nagle) * But then, for data that fills more than one packet, the last part of * the data isn't sent until all the previous packets are acked. Which is very slow. * The poor interaction of Nagle and Delayed Acknowledgements is well-documented. diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java index 9372c6913..bb5dd63f4 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java @@ -13,7 +13,7 @@ import net.i2p.util.SimpleTimer; * Receive a packet for a particular connection - placing the data onto the * queue, marking packets as acked, updating various fields, etc. *

    - * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream + * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream *

    * One of these is instantiated per-Destination * (i.e. per-ConnectionManager, not per-Connection). diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java index ae9fb0ef5..94a4c4ae6 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java @@ -632,7 +632,7 @@ public class I2PSocketManagerFull implements I2PSocketManager { /** * Like connect() but returns a real Socket, and throws only IOE, * for easier porting of apps. - * @param timeout ms if > 0, forces blocking (disables connectDelay) + * @param timeout ms if > 0, forces blocking (disables connectDelay) * @since 0.8.4 */ public Socket connectToSocket(Destination peer, int timeout) throws IOException { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java index 63401f92d..b35769859 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java @@ -122,7 +122,7 @@ class I2PSocketOptionsImpl implements I2PSocketOptions { * How long we will wait for the ACK from a SYN, in milliseconds. * * Default 60 seconds. Max of 2 minutes enforced in Connection.java, - * and it also interprets <= 0 as default. + * and it also interprets <= 0 as default. * * @return milliseconds to wait, or -1 if we will wait indefinitely */ @@ -134,7 +134,7 @@ class I2PSocketOptionsImpl implements I2PSocketOptions { * Define how long we will wait for the ACK from a SYN, in milliseconds. * * Default 60 seconds. Max of 2 minutes enforced in Connection.java, - * and it also interprets <= 0 as default. + * and it also interprets <= 0 as default. * */ public void setConnectTimeout(long ms) { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java index c14688050..477f7476f 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java @@ -14,8 +14,8 @@ import net.i2p.util.Log; /** * Receive raw information from the I2PSession and turn it into * Packets, if we can. - *

    - * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream + *<p> + * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream */ class MessageHandler implements I2PSessionMuxedListener { private final ConnectionManager _manager; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java index a77d282fe..adf401a34 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java @@ -16,9 +16,9 @@ import net.i2p.util.Log; /** * Stream that can be given messages out of order * yet present them in order. - *

    - * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream - *

    + *<p> + * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream + *<p> * This buffers unlimited data via messageReceived() - * limiting / blocking is done in ConnectionPacketHandler.receivePacket(). * diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java index 59c6de87b..b5f1113d9 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java @@ -16,8 +16,8 @@ import net.i2p.util.SimpleTimer2; * A stream that we can shove data into that fires off those bytes * on flush or when the buffer is full. It also blocks according * to the data receiver's needs. - *

    - * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession + *<p> + * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession */ class MessageOutputStream extends OutputStream { private final I2PAppContext _context; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java index 483a8d4ee..b9b739702 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java @@ -232,7 +232,7 @@ class Packet { } /** - * @param id if < 0, sets FLAG_NO_ACK + * @param id if < 0, sets FLAG_NO_ACK */ public void setAckThrough(long id) { if (id < 0) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java index 4a96693b4..7ca70cd27 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java @@ -11,8 +11,8 @@ import net.i2p.util.Log; /** * receive a packet and dispatch it correctly to the connection specified, * the server socket, or queue a reply RST packet. - *

    - * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream + *<p> + * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream */ class PacketHandler { private final ConnectionManager _manager; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java index 943a0c03f..b54b05c18 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java @@ -23,8 +23,8 @@ import net.i2p.util.SimpleTimer2; * Well, thats the theory at least... in practice we just * send them immediately with no blocking, since the * mode=bestEffort doesnt block in the SDK. - *

    - * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession + *<p> + * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession */ class PacketQueue implements SendMessageStatusListener, Closeable { private final I2PAppContext _context; diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java index 0a1fb093e..f73930d01 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java @@ -21,7 +21,7 @@ import net.i2p.client.streaming.I2PSocketOptions; * null for some methods. * * StandardSockets are always bound, and always start out connected - * (unless connectDelay is > 0). + * (unless connectDelay is > 0). * You may not create an unbound StandardSocket. * Create this through the SocketManager. * diff --git a/router/java/src/net/i2p/router/util/DecayingHashSet.java b/router/java/src/net/i2p/router/util/DecayingHashSet.java index ea955bcb1..bdf8d275d 100644 --- a/router/java/src/net/i2p/router/util/DecayingHashSet.java +++ b/router/java/src/net/i2p/router/util/DecayingHashSet.java @@ -43,7 +43,7 @@ import net.i2p.util.Log; * to implement something with a zero false positive rate, and uses less memory * for almost all bandwidth classes. * - * This has a strictly zero false positive rate for <= 8 byte keys. + * This has a strictly zero false positive rate for <= 8 byte keys. * For larger keys, it is 1 / (2**64) ~= 5E-20, which is better than * DBF for any entry count greater than about 14K. * @@ -208,7 +208,7 @@ public class DecayingHashSet extends DecayingBloomFilter { } /** - * This saves the data as-is if the length is <= 8 bytes, + * This saves the data as-is if the length is <= 8 bytes, * otherwise it stores an 8-byte hash. * Hash function is from DataHelper, modded to get * the maximum entropy given the length of the data. diff --git a/router/java/src/org/xlattice/crypto/filters/KeySelector.java b/router/java/src/org/xlattice/crypto/filters/KeySelector.java index 878e40758..f734b8dec 100644 --- a/router/java/src/org/xlattice/crypto/filters/KeySelector.java +++ b/router/java/src/org/xlattice/crypto/filters/KeySelector.java @@ -61,7 +61,7 @@ public class KeySelector { * Note that if k and m are too big, the GenericWordSelector blows up - * The max for 32-byte keys is m=23 and k=11. * The precise restriction appears to be: - * ((5k + (k-1)(m-5)) / 8) + 2 < keySizeInBytes + * ((5k + (k-1)(m-5)) / 8) + 2 < keySizeInBytes * * It isn't clear how to fix this. */ From bd1354f95b8ae0c02eb9fb8fee116476806d1024 Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 01:49:19 +0000 Subject: [PATCH 22/50] javadoc fixes part 10 (ticket #1894) --- .../net/i2p/client/streaming/impl/ConnectionOptions.java | 6 +++--- .../src/net/i2p/client/streaming/impl/SchedulerClosed.java | 7 +++++-- .../net/i2p/client/streaming/impl/SchedulerClosing.java | 7 +++++-- .../i2p/client/streaming/impl/SchedulerConnectedBulk.java | 7 +++++-- .../net/i2p/client/streaming/impl/SchedulerConnecting.java | 7 +++++-- .../src/net/i2p/client/streaming/impl/SchedulerDead.java | 7 +++++-- .../client/streaming/impl/SchedulerHardDisconnected.java | 7 +++++-- .../net/i2p/client/streaming/impl/SchedulerPreconnect.java | 6 ++++-- router/java/src/net/i2p/router/MultiRouter.java | 4 ++-- router/java/src/org/cybergarage/upnp/Action.java | 4 ++-- 10 files changed, 41 insertions(+), 21 deletions(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java index f4fe164e0..cd268c1f3 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java @@ -227,7 +227,7 @@ class ConnectionOptions extends I2PSocketOptionsImpl { * clearly from the math above that was not correct. * (Before 0.6.2, the reply leaseSet was bundled with every message, so it didn't even * fit in TWO tunnel messages - more like 2 1/3) - *

    + *

    * Now, it's not clear how often we will get the ideal situation (no reply leaseSet bundling, * no key bundling, and especially not having a small message ahead of you, which will then cause * fragmentation for all subsequent messages until the queue is emptied - BatchedPreprocessor @@ -235,7 +235,7 @@ class ConnectionOptions extends I2PSocketOptionsImpl { * messages in a new stream are much larger due to the leaseSet and key bundling. * But for long-lived streams (like with i2psnark) this should pay dividends. * The tunnel.batch* stats should provide some data for test comparisons. - *

    + *

    * As MTU and MRU are identical and are negotiated to the lowest value * for the two ends, you can't do widespread testing of a higher value. * Unless we change to allow MTU and MRU to be different, @@ -244,7 +244,7 @@ class ConnectionOptions extends I2PSocketOptionsImpl { * So let's try 1730 for release 0.6.5. This will allow for 738 testing as well, * with i2p.streaming.maxMessageSize=738 (in configadvanced.jsp, or in i2ptunnel, or * i2psnark, for example). - *

    + *

    * Not that an isolated single packet is very common, but * in this case, 960 was 113.3% total overhead. * Compared to 738 (38.8% overhead) and 1730 (18.4%). diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerClosed.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerClosed.java index 4159c76b1..55646a798 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerClosed.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerClosed.java @@ -6,18 +6,21 @@ import net.i2p.I2PAppContext; *

    Scheduler used for after both sides have had their close packets * ACKed, but the final timeout hasn't passed.

    * - *

    Entry conditions:

      + *

      Entry conditions:

      + *
        *
      • Both sides have closed and ACKed.
      • *
      • Less than the final timeout period has passed since the last ACK.
      • *
      * - *

      Events:

        + *

        Events:

        + *
          *
        • Packets received
        • *
        • RESET received
        • *
        • Message sending fails (error talking to the session)
        • *
        * *

        Next states:

        + *
          *
        • {@link SchedulerDead dead} - after the final timeout passes
        • *
        * diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerClosing.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerClosing.java index 424c9a46c..c076bbcac 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerClosing.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerClosing.java @@ -8,12 +8,14 @@ import net.i2p.util.Log; * have closed the stream, but either we haven't ACKed their close or * they haven't ACKed ours.

        * - *

        Entry conditions:

          + *

          Entry conditions:

          + *
            *
          • Both sides have closed.
          • *
          • At least one direction has not ACKed the close.
          • *
          * - *

          Events:

            + *

            Events:

            + *
              *
            • Packets received (which may or may not ACK the ones sent)
            • *
            • RESET received
            • *
            • Message sending fails (error talking to the session)
            • @@ -21,6 +23,7 @@ import net.i2p.util.Log; *
            * *

            Next states:

            + *
              *
            • {@link SchedulerClosed closed} - after both sending and receiving ACKs on the CLOSE
            • *
            • {@link SchedulerDead dead} - after sending or receiving a RESET
            • *
            diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerConnectedBulk.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerConnectedBulk.java index 228b8a706..1a2c2f8b1 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerConnectedBulk.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerConnectedBulk.java @@ -8,12 +8,14 @@ import net.i2p.I2PAppContext; * stream must be using the BULK profile, rather than the INTERACTIVE * profile.

            * - *

            Entry conditions:

              + *

              Entry conditions:

              + *
                *
              • Packets sent and ACKs received.
              • *
              • At least one direction is not closed
              • *
              * - *

              Events:

                + *

                Events:

                + *
                  *
                • Packets received (which may or may not ACK the ones sent)
                • *
                • Message flush (explicitly, through a full buffer, or stream closure)
                • *
                • RESET received
                • @@ -22,6 +24,7 @@ import net.i2p.I2PAppContext; *
                * *

                Next states:

                + *
                  *
                • {@link SchedulerClosing closing} - after both sending and receiving a CLOSE
                • *
                • {@link SchedulerClosed closed} - after both sending and receiving ACKs on the CLOSE
                • *
                • {@link SchedulerDead dead} - after sending or receiving a RESET
                • diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerConnecting.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerConnecting.java index e85644249..78a6195a3 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerConnecting.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerConnecting.java @@ -7,11 +7,13 @@ import net.i2p.util.Log; *

                  Scheduler used once we've sent our SYN but it hasn't been ACKed yet. * This connection may or may not be locally created.

                  * - *

                  Entry conditions:

                    + *

                    Entry conditions:

                    + *
                      *
                    • Packets sent but none ACKed
                    • *
                    * - *

                    Events:

                      + *

                      Events:

                      + *
                        *
                      • Packets received (which may or may not ACK the ones sent)
                      • *
                      • Message flush (explicitly, through a full buffer, or stream closure)
                      • *
                      • Connection establishment timeout
                      • @@ -19,6 +21,7 @@ import net.i2p.util.Log; *
                      * *

                      Next states:

                      + *
                        *
                      • {@link SchedulerConnectedBulk connected} - after receiving an ACK
                      • *
                      • {@link SchedulerClosing closing} - after both sending and receiving a CLOSE
                      • *
                      • {@link SchedulerClosed closed} - after both sending and receiving ACKs on the CLOSE
                      • diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerDead.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerDead.java index 04c420509..cf4b560f6 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerDead.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerDead.java @@ -6,17 +6,20 @@ import net.i2p.I2PAppContext; *

                        Scheduler used for after the final timeout has passed or the * connection was reset.

                        * - *

                        Entry conditions:

                          + *

                          Entry conditions:

                          + *
                            *
                          • Both sides have closed and ACKed and the timeout has passed.
                            * or
                          • *
                          • A RESET was received
                          • *
                          * - *

                          Events:

                            + *

                            Events:

                            + *
                              *
                            • None
                            • *
                            * *

                            Next states:

                            + *
                              *
                            • None
                            • *
                            * diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerHardDisconnected.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerHardDisconnected.java index eaf682f9e..28d11d6c5 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerHardDisconnected.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerHardDisconnected.java @@ -6,18 +6,21 @@ import net.i2p.I2PAppContext; *

                            Scheduler used after we've locally done a hard disconnect, * but the final timeout hasn't passed.

                            * - *

                            Entry conditions:

                              + *

                              Entry conditions:

                              + *
                                *
                              • Locally disconnected hard.
                              • *
                              • Less than the final timeout period has passed since the last ACK.
                              • *
                              * - *

                              Events:

                                + *

                                Events:

                                + *
                                  *
                                • Packets received
                                • *
                                • RESET received
                                • *
                                • Message sending fails (error talking to the session)
                                • *
                                * *

                                Next states:

                                + *
                                  *
                                • {@link SchedulerDead dead} - after the final timeout passes
                                • *
                                * diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerPreconnect.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerPreconnect.java index 3f4855b96..abf08d451 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerPreconnect.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerPreconnect.java @@ -7,12 +7,14 @@ import net.i2p.util.Log; *

                                Scheduler used for locally created connections where we have not yet * sent the initial SYN packet.

                                * - *

                                Entry conditions:

                                  + *

                                  Entry conditions:

                                  + *
                                    *
                                  • Locally created
                                  • *
                                  • No packets sent or received
                                  • *
                                  * - *

                                  Events:

                                    + *

                                    Events:

                                    + *
                                      *
                                    • Message flush (explicitly, through a full buffer, or stream closure)
                                    • *
                                    • Initial delay timeout (causing implicit flush of any data available)
                                    • *
                                    diff --git a/router/java/src/net/i2p/router/MultiRouter.java b/router/java/src/net/i2p/router/MultiRouter.java index 8e663f8ed..297d7ff23 100644 --- a/router/java/src/net/i2p/router/MultiRouter.java +++ b/router/java/src/net/i2p/router/MultiRouter.java @@ -18,7 +18,7 @@ import net.i2p.router.Router; * (and all that entails). In addition, this creates a root I2PAppContext for * any objects not booted through one of the RouterContexts. Each of these * contexts are configured through a simple properties file (where the name=value - * contained in them are used for the context's getProperty(name)).

                                    + * contained in them are used for the context's getProperty(name)).

                                    * * Usage:

                                      *  MultiRouter numberRouters
                                    @@ -40,7 +40,7 @@ import net.i2p.router.Router;
                                      * the CPU load (but obviously making the router incapable of talking to things 
                                      * that need the encryption enabled).  To run a client app through a router that
                                      * has i2p.encryption=off, you should also add that line to the client's JVM
                                    - * (for example, java -Di2p.encryption=off -jar lib/i2ptunnel.jar).

                                    + * (for example, java -Di2p.encryption=off -jar lib/i2ptunnel.jar).

                                    * * To make the router console work, either run from a directory containing * lib/, webapps/, docs/, etc., or point i2p.dir.base to a directory containing the diff --git a/router/java/src/org/cybergarage/upnp/Action.java b/router/java/src/org/cybergarage/upnp/Action.java index e5ab1559c..6024be5d0 100644 --- a/router/java/src/org/cybergarage/upnp/Action.java +++ b/router/java/src/org/cybergarage/upnp/Action.java @@ -223,8 +223,8 @@ public class Action } /** - * @deprecated You should use one of the following methods instead:
                                    - * - {@link #setInArgumentValues(ArgumentList)}
                                    + * @deprecated You should use one of the following methods instead:
                                    + * - {@link #setInArgumentValues(ArgumentList)}
                                    * - {@link #setOutArgumentValues(ArgumentList)} */ @Deprecated From 82064760d532196a8df604e84772813615ddb737 Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 02:19:47 +0000 Subject: [PATCH 23/50] javadoc fixes part 11 (ticket #1894) --- .../net/i2p/i2ptunnel/I2PTunnelConnectClient.java | 2 +- .../net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java | 4 ++-- .../src/net/i2p/i2ptunnel/irc/DCCClientManager.java | 10 +++++----- .../net/i2p/i2ptunnel/irc/I2PTunnelDCCServer.java | 10 +++++----- .../src/net/i2p/i2ptunnel/socks/SOCKSUDPPort.java | 4 ++-- .../src/net/i2p/i2ptunnel/socks/SOCKSUDPTunnel.java | 4 ++-- .../java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java | 2 +- .../java/src/net/i2p/i2ptunnel/web/EditBean.java | 2 +- .../java/src/net/i2p/i2ptunnel/web/Messages.java | 2 +- .../java/src/net/i2p/router/web/FormHandler.java | 12 ++++++------ .../java/src/net/i2p/router/web/HelperBase.java | 2 +- .../java/src/net/i2p/router/web/Messages.java | 2 +- .../src/net/i2p/client/streaming/impl/Packet.java | 2 +- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java index 619e5d44a..37c906fbe 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java @@ -49,7 +49,7 @@ import net.i2p.util.PortMapper; *

                                      *  INTERNET-DRAFT                                              Ari Luotonen
                                      *  Expires: September 26, 1997          Netscape Communications Corporation
                                    - *                       March 26, 1997
                                    + *  draft-luotonen-ssl-tunneling-03.txt                       March 26, 1997
                                      *                     Tunneling SSL Through a WWW Proxy
                                      *
                                    * diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java index 4908042dd..354f5e816 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java @@ -486,7 +486,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem //////// Error page stuff /** - * foo => errordir/foo-header_xx.ht for lang xx, or errordir/foo-header.ht, + * foo => errordir/foo-header_xx.ht for lang xx, or errordir/foo-header.ht, * or the backup byte array on fail. * * .ht files must be UTF-8 encoded and use \r\n terminators so the @@ -501,7 +501,7 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem } /** - * foo => errordir/foo-header_xx.ht for lang xx, or errordir/foo-header.ht, + * foo => errordir/foo-header_xx.ht for lang xx, or errordir/foo-header.ht, * or the backup byte array on fail. * * .ht files must be UTF-8 encoded and use \r\n terminators so the diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/DCCClientManager.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/DCCClientManager.java index 753da65ec..e5a96b488 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/DCCClientManager.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/DCCClientManager.java @@ -17,13 +17,13 @@ import net.i2p.util.Log; *
                                      *
                                      *                                            direct conn
                                    - *                <---> I2PTunnelDCCServer <--------------->I2PTunnelDCCClient <---->
                                    + *                <---> I2PTunnelDCCServer <--------------->I2PTunnelDCCClient <---->
                                      *   originating                                                                     responding
                                      *   chat client                                                                     chat client
                                    - *        CHAT    ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    - *        SEND    ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    - *        RESUME  <--- I2PTunnelIRCClient <-- IRC server <-- I2TunnelIRCClient <-----
                                    - *        ACCEPT  ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    + *        CHAT    ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    + *        SEND    ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    + *        RESUME  <--- I2PTunnelIRCClient <-- IRC server <-- I2TunnelIRCClient <-----
                                    + *        ACCEPT  ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                      *
                                      * 
                                    * diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/I2PTunnelDCCServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/I2PTunnelDCCServer.java index cab6513ad..8010a110f 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/I2PTunnelDCCServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/I2PTunnelDCCServer.java @@ -27,13 +27,13 @@ import net.i2p.util.Log; *
                                      *
                                      *                                            direct conn
                                    - *                <---> I2PTunnelDCCServer <--------------->I2PTunnelDCCClient <---->
                                    + *                <---> I2PTunnelDCCServer <--------------->I2PTunnelDCCClient <---->
                                      *   originating                                                                     responding
                                      *   chat client                                                                     chat client
                                    - *        CHAT    ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    - *        SEND    ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    - *        RESUME  <--- I2PTunnelIRCClient <-- IRC server <-- I2TunnelIRCClient <-----
                                    - *        ACCEPT  ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    + *        CHAT    ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    + *        SEND    ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                    + *        RESUME  <--- I2PTunnelIRCClient <-- IRC server <-- I2TunnelIRCClient <-----
                                    + *        ACCEPT  ---> I2PTunnelIRCClient --> IRC server --> I2TunnelIRCClient ----->
                                      *
                                      * 
                                    * diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSUDPPort.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSUDPPort.java index 2064d698b..773a4c04b 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSUDPPort.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSUDPPort.java @@ -14,10 +14,10 @@ import net.i2p.i2ptunnel.udp.*; * ports, it happens outside of here. * * TX: - * UDPSource -> SOCKSUDPUnwrapper -> ReplyTracker ( -> I2PSink in SOCKSUDPTunnel) + * UDPSource -> SOCKSUDPUnwrapper -> ReplyTracker ( -> I2PSink in SOCKSUDPTunnel) * * RX: - * UDPSink <- SOCKSUDPWrapper ( <- MultiSink <- I2PSource in SOCKSUDPTunnel) + * UDPSink <- SOCKSUDPWrapper ( <- MultiSink <- I2PSource in SOCKSUDPTunnel) * * The Unwrapper passes headers to the Wrapper through a cache. * The ReplyTracker passes sinks to MultiSink through a cache. diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSUDPTunnel.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSUDPTunnel.java index 044b00057..23e7090d7 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSUDPTunnel.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSUDPTunnel.java @@ -12,10 +12,10 @@ import net.i2p.i2ptunnel.udpTunnel.I2PTunnelUDPClientBase; * A Datagram Tunnel that can have multiple bidirectional ports on the UDP side. * * TX: - * (ReplyTracker in multiple SOCKSUDPPorts -> ) I2PSink + * (ReplyTracker in multiple SOCKSUDPPorts -> ) I2PSink * * RX: - * (SOCKSUDPWrapper in multiple SOCKSUDPPorts <- ) MultiSink <- I2PSource + * (SOCKSUDPWrapper in multiple SOCKSUDPPorts <- ) MultiSink <- I2PSource * * The reply from a dest goes to the last SOCKSUDPPort that sent to that dest. * If multiple ports are talking to a dest at the same time, this isn't 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 4ebf3f4d4..556982a43 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java @@ -425,7 +425,7 @@ public class GeneralHelper { } /** - * @param newTunnelType used if tunnel < 0 + * @param newTunnelType used if tunnel < 0 */ public int getSigType(int tunnel, String newTunnelType) { SigType type; 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 8619c6ceb..f252faade 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java @@ -183,7 +183,7 @@ public class EditBean extends IndexBean { } /** - * @param newTunnelType used if tunnel < 0 + * @param newTunnelType used if tunnel < 0 * @since 0.9.12 */ public int getSigType(int tunnel, String newTunnelType) { 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 1ae4636a1..6aba5d4b1 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/Messages.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/Messages.java @@ -30,7 +30,7 @@ public class Messages { * * @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. + * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. * To translate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. 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 dfec5d9cb..097c5506b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/FormHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/FormHandler.java @@ -13,7 +13,7 @@ import net.i2p.util.Log; /** * Simple form handler base class - does not depend on servlets or jsp, * but instead the subclasses are populated with javabean properties. e.g. - * + * <jsp:setProperty name="handler" property="*" /> * * The form is "processed" after the properties are set and the first output * property is retrieved - either getAll(), getNotices() or getErrors(). @@ -126,7 +126,7 @@ public abstract class FormHandler { /** * Add an error message to display * Use if it does not include a link. - * Escapes '<' and '>' before queueing + * Escapes '<' and '>' before queueing */ protected void addFormError(String errorMsg) { if (errorMsg == null) return; @@ -136,7 +136,7 @@ public abstract class FormHandler { /** * Add a non-error message to display * Use if it does not include a link. - * Escapes '<' and '>' before queueing + * Escapes '<' and '>' before queueing */ protected void addFormNotice(String msg) { if (msg == null) return; @@ -146,7 +146,7 @@ public abstract class FormHandler { /** * Add a non-error message to display * Use if it includes a link or other formatting. - * Does not escape '<' and '>' before queueing + * Does not escape '<' and '>' before queueing * @since 0.9.14.1 */ protected void addFormNoticeNoEscape(String msg) { @@ -157,7 +157,7 @@ public abstract class FormHandler { /** * Add an error message to display * Use if it includes a link or other formatting. - * Does not escape '<' and '>' before queueing + * Does not escape '<' and '>' before queueing * @since 0.9.19 */ protected void addFormErrorNoEscape(String msg) { @@ -303,7 +303,7 @@ public abstract class FormHandler { * * @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. + * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. * To translate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. 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 12e2a173b..b6e710544 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/HelperBase.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/HelperBase.java @@ -68,7 +68,7 @@ public abstract class HelperBase { * * @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. + * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. * To translate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. 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 ad3543085..196bc6ab8 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/Messages.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/Messages.java @@ -22,7 +22,7 @@ public class Messages extends Translate { * * @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. + * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. * To translate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java index b9b739702..65ebe4f1f 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java @@ -259,7 +259,7 @@ class Packet { * Not to be used without sanitizing for huge values. * Setters from options did not divide by 1000, and the options default * is 1000, so the value sent in the 1-byte field was always - * 1000 & 0xff = 0xe8 = 232 + * 1000 & 0xff = 0xe8 = 232 * * @return Delay before resending a packet in seconds. */ From 9dab3b0dfe3bedd04a42b29ece91f66452634a7d Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 02:27:53 +0000 Subject: [PATCH 24/50] javadoc fixes part 12 (ticket #1894) --- .../java/src/net/i2p/i2ptunnel/I2PTunnel.java | 12 ++++++------ .../src/net/i2p/i2ptunnel/I2PTunnelClientBase.java | 10 +++++----- .../java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java | 4 ++-- .../java/src/net/i2p/router/web/PluginStarter.java | 6 +++--- .../client/streaming/impl/SchedulerPreconnect.java | 1 + .../router/transport/udp/InboundEstablishState.java | 2 +- .../src/net/i2p/router/tunnel/FragmentedMessage.java | 1 + .../src/net/i2p/router/tunnel/TunnelParticipant.java | 1 + .../i2p/router/util/CoDelPriorityBlockingQueue.java | 2 +- .../src/net/i2p/router/util/DecayingBloomFilter.java | 2 +- .../src/org/freenetproject/ForwardPortStatus.java | 2 +- 11 files changed, 23 insertions(+), 20 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java index 4b61312bb..74ae307d3 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java @@ -559,7 +559,7 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging { /** * Run the server pointing at the host and port specified using the private i2p - * destination loaded from the specified file.

                                    + * destination loaded from the specified file.

                                    * * Sets the event "serverTaskId" = Integer(taskId) after the tunnel has been started (or -1 on error) * Also sets the event "openServerResult" = "ok" or "error" (displaying "Ready!" on the logger after @@ -669,7 +669,7 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging { /** * Run the HTTP server pointing at the host and port specified using the private i2p * destination loaded from the specified file, replacing the HTTP headers - * so that the Host: specified is the one spoofed.

                                    + * so that the Host: specified is the one spoofed.

                                    * * Sets the event "serverTaskId" = Integer(taskId) after the tunnel has been started (or -1 on error) * Also sets the event "openServerResult" = "ok" or "error" (displaying "Ready!" on the logger after @@ -733,7 +733,7 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging { * Run the HTTP server pointing at the host and port specified using the private i2p * destination loaded from the specified file, replacing the HTTP headers * so that the Host: specified is the one spoofed. Also runs an HTTP proxy for - * bidirectional communications on the same tunnel destination.

                                    + * bidirectional communications on the same tunnel destination.

                                    * * Sets the event "serverTaskId" = Integer(taskId) after the tunnel has been started (or -1 on error) * Also sets the event "openServerResult" = "ok" or "error" (displaying "Ready!" on the logger after @@ -808,7 +808,7 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging { /** * Run the server pointing at the host and port specified using the private i2p - * destination loaded from the given base64 stream.

                                    + * destination loaded from the given base64 stream.

                                    * * Deprecated? Why run a server with a private destination? * Not available from the war GUI @@ -1821,12 +1821,12 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging { /** * Generates a Destination from a name. Now only supports base64 - * names - may support naming servers later. "file:" is + * names - may support naming servers later. "file:<filename>" is * also supported, where filename is a file that either contains a * binary Destination structure or the Base64 encoding of that * structure. * - * Since file: isn't really used, this method is deprecated, + * Since file:<filename> isn't really used, this method is deprecated, * just call context.namingService.lookup() directly. * @deprecated Don't use i2ptunnel for lookup! Use I2PAppContext.getGlobalContext().namingService().lookup(name) from i2p.jar */ diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java index 268da4322..a3c9f8566 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java @@ -93,7 +93,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna /** * This constructor is used to add a client to an existing socket manager. - *

                                    + *

                                    * As of 0.9.21 this does NOT open the local socket. You MUST call * {@link #startRunning()} for that. The local socket will be opened * immediately (ignoring the i2cp.delayOpen option). @@ -119,10 +119,10 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna /** * The main constructor. - *

                                    + *

                                    * As of 0.9.21 this is fast, and does NOT connect the manager to the router, * or open the local socket. You MUST call startRunning() for that. - *

                                    + *

                                    * (0.9.20 claimed to be fast, but due to a bug it DID connect the manager * to the router. It did NOT open the local socket however, so it was still * necessary to call startRunning() for that.) @@ -139,10 +139,10 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna /** * Use this to build a client with a persistent private key. - *

                                    + *

                                    * As of 0.9.21 this is fast, and does NOT connect the manager to the router, * or open the local socket. You MUST call startRunning() for that. - *

                                    + *

                                    * (0.9.20 claimed to be fast, but due to a bug it DID connect the manager * to the router. It did NOT open the local socket however, so it was still * necessary to call startRunning() for that.) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java index a030255c9..0a007e378 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java @@ -249,7 +249,7 @@ public class TunnelConfig { /** * Controls how other tunnels are checked for access. - *

                                    + *

                                    * The list used for whitelisting/blacklisting can be set with * {@link #setAccessList(String)}. * @@ -280,7 +280,7 @@ public class TunnelConfig { /** * Controls how ephemeral the I2P Destination of a client tunnel is. - *

                                    + *

                                    * If {@link #setClose(boolean)} is set to false then mode 1 == mode 0. * * @param mode 0 for new dest on restart, 1 for new dest on resume from idle, 2 for persistent key 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 cc749e0d7..9c9c7e9dd 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java @@ -263,7 +263,7 @@ public class PluginStarter implements Runnable { /** * @return true on success - * @throws just about anything, caller would be wise to catch Throwable + * @throws Exception just about anything, caller would be wise to catch Throwable */ @SuppressWarnings("deprecation") public static boolean startPlugin(RouterContext ctx, String appName) throws Exception { @@ -466,7 +466,7 @@ public class PluginStarter implements Runnable { /** * @return true on success - * @throws just about anything, caller would be wise to catch Throwable + * @throws Exception just about anything, caller would be wise to catch Throwable */ public static boolean stopPlugin(RouterContext ctx, String appName) throws Exception { Log log = ctx.logManager().getLog(PluginStarter.class); @@ -702,7 +702,7 @@ public class PluginStarter implements Runnable { /** * @param action "start" or "stop" or "uninstall" - * @throws just about anything if an app has a delay less than zero, caller would be wise to catch Throwable + * @throws Exception just about anything if an app has a delay less than zero, caller would be wise to catch Throwable * If no apps have a delay less than zero, it shouldn't throw anything */ private static void runClientApps(RouterContext ctx, File pluginDir, List apps, String action) throws Exception { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerPreconnect.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerPreconnect.java index abf08d451..7464341fc 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerPreconnect.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/SchedulerPreconnect.java @@ -20,6 +20,7 @@ import net.i2p.util.Log; *

                                  * *

                                  Next states:

                                  + *
                                    *
                                  • {@link SchedulerConnecting connecting} - after sending a packet
                                  • *
                                  */ diff --git a/router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java b/router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java index 332282c24..509d74942 100644 --- a/router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java +++ b/router/java/src/net/i2p/router/transport/udp/InboundEstablishState.java @@ -94,7 +94,7 @@ class InboundEstablishState { /** * @param localPort Must be our external port, otherwise the signature of the - & SessionCreated message will be bad if the external port != the internal port. + * SessionCreated message will be bad if the external port != the internal port. */ public InboundEstablishState(RouterContext ctx, byte remoteIP[], int remotePort, int localPort, DHSessionKeyBuilder dh) { diff --git a/router/java/src/net/i2p/router/tunnel/FragmentedMessage.java b/router/java/src/net/i2p/router/tunnel/FragmentedMessage.java index effc2a4c6..d3ff6e00d 100644 --- a/router/java/src/net/i2p/router/tunnel/FragmentedMessage.java +++ b/router/java/src/net/i2p/router/tunnel/FragmentedMessage.java @@ -279,6 +279,7 @@ class FragmentedMessage { } ****/ + /** toString */ @Override public String toString() { StringBuilder buf = new StringBuilder(128); diff --git a/router/java/src/net/i2p/router/tunnel/TunnelParticipant.java b/router/java/src/net/i2p/router/tunnel/TunnelParticipant.java index d58060279..a1ca5bc9d 100644 --- a/router/java/src/net/i2p/router/tunnel/TunnelParticipant.java +++ b/router/java/src/net/i2p/router/tunnel/TunnelParticipant.java @@ -158,6 +158,7 @@ class TunnelParticipant { } ****/ + /** getCompleteCount */ public int getCompleteCount() { if (_handler != null) return _handler.getCompleteCount(); diff --git a/router/java/src/net/i2p/router/util/CoDelPriorityBlockingQueue.java b/router/java/src/net/i2p/router/util/CoDelPriorityBlockingQueue.java index fdda06f52..e84ec651e 100644 --- a/router/java/src/net/i2p/router/util/CoDelPriorityBlockingQueue.java +++ b/router/java/src/net/i2p/router/util/CoDelPriorityBlockingQueue.java @@ -69,7 +69,7 @@ public class CoDelPriorityBlockingQueue extends PriBlocking private final String STAT_DELAY; public static final int MIN_PRIORITY = 100; private static final int[] PRIORITIES = {MIN_PRIORITY, 200, 300, 400, 500}; - /** if priority is >= this, never drop */ + /** if priority is >= this, never drop */ public static final int DONT_DROP_PRIORITY = 1000; private static final long BACKLOG_TIME = 2*1000; diff --git a/router/java/src/net/i2p/router/util/DecayingBloomFilter.java b/router/java/src/net/i2p/router/util/DecayingBloomFilter.java index a47b5ef60..0afe7450d 100644 --- a/router/java/src/net/i2p/router/util/DecayingBloomFilter.java +++ b/router/java/src/net/i2p/router/util/DecayingBloomFilter.java @@ -21,7 +21,7 @@ import org.xlattice.crypto.filters.BloomSHA1; * See main() for an analysis of false positive rate. * See BloomFilterIVValidator for instantiation parameters. * See DecayingHashSet for a smaller and simpler version. - * @see net.i2p.router.tunnel.BloomFilterIVValidator + * See net.i2p.router.tunnel.BloomFilterIVValidator * @see net.i2p.router.util.DecayingHashSet */ public class DecayingBloomFilter { diff --git a/router/java/src/org/freenetproject/ForwardPortStatus.java b/router/java/src/org/freenetproject/ForwardPortStatus.java index 88090da40..976881a94 100644 --- a/router/java/src/org/freenetproject/ForwardPortStatus.java +++ b/router/java/src/org/freenetproject/ForwardPortStatus.java @@ -9,7 +9,7 @@ public class ForwardPortStatus { * for example hostile action on the part of the router. */ public static final int PROBABLE_SUCCESS = 2; /** The port forward may have succeeded. Or it may not have. We should - * definitely try to check out of band. See UP&P: Many routers say they've + * definitely try to check out of band. See UP&P: Many routers say they've * forwarded the port when they haven't. */ public static final int MAYBE_SUCCESS = 1; /** The port forward is in progress */ From 112fa503e63506fbfcefd785628be2bd1f618c84 Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 03:03:34 +0000 Subject: [PATCH 25/50] javadoc fixes part 13 (ticket #1894) --- apps/BOB/src/net/i2p/BOB/I2PtoTCP.java | 2 +- apps/BOB/src/net/i2p/BOB/TCPtoI2P.java | 2 +- .../java/src/org/klomp/snark/I2PSnarkUtil.java | 8 ++++---- .../java/src/org/klomp/snark/PeerCoordinator.java | 4 ++-- .../java/src/org/klomp/snark/SnarkManager.java | 6 +++--- .../i2psnark/java/src/org/klomp/snark/Storage.java | 2 +- .../i2psnark/java/src/org/klomp/snark/dht/DHT.java | 4 ++-- .../java/src/org/klomp/snark/dht/KRPC.java | 14 +++++++------- .../java/src/org/klomp/snark/web/URIUtil.java | 2 +- apps/susimail/src/src/i2p/susi/webmail/Mail.java | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/apps/BOB/src/net/i2p/BOB/I2PtoTCP.java b/apps/BOB/src/net/i2p/BOB/I2PtoTCP.java index a7ec29ab3..3e474704f 100644 --- a/apps/BOB/src/net/i2p/BOB/I2PtoTCP.java +++ b/apps/BOB/src/net/i2p/BOB/I2PtoTCP.java @@ -25,7 +25,7 @@ import net.i2p.data.DataHelper; import net.i2p.util.I2PAppThread; /** - * Process I2P->TCP + * Process I2P->TCP * * @author sponge */ diff --git a/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java b/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java index cee1f78b6..841c850a0 100644 --- a/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java +++ b/apps/BOB/src/net/i2p/BOB/TCPtoI2P.java @@ -35,7 +35,7 @@ import net.i2p.util.I2PAppThread; /** * - * Process TCP->I2P + * Process TCP->I2P * * @author sponge */ diff --git a/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java b/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java index 1bff1a74b..58f27742b 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java +++ b/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java @@ -357,12 +357,12 @@ public class I2PSnarkUtil { public File get(String url, boolean rewrite) { return get(url, rewrite, 0); } /** - * @param retries if < 0, set timeout to a few seconds + * @param retries if < 0, set timeout to a few seconds */ public File get(String url, int retries) { return get(url, true, retries); } /** - * @param retries if < 0, set timeout to a few seconds + * @param retries if < 0, set timeout to a few seconds */ public File get(String url, boolean rewrite, int retries) { if (_log.shouldLog(Log.DEBUG)) @@ -413,7 +413,7 @@ public class I2PSnarkUtil { /** * Fetch to memory - * @param retries if < 0, set timeout to a few seconds + * @param retries if < 0, set timeout to a few seconds * @param initialSize buffer size * @param maxSize fails if greater * @return null on error @@ -659,7 +659,7 @@ public class I2PSnarkUtil { * * @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. + * Single quotes must be doubled, i.e. ' -> '' in the string. * @param o parameter, not translated. * To translate parameter also, use _t("foo {0} bar", _t("baz")) * Do not double the single quotes in the parameter. diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java index 9e4df703c..415ee0d1a 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java +++ b/apps/i2psnark/java/src/org/klomp/snark/PeerCoordinator.java @@ -385,7 +385,7 @@ class PeerCoordinator implements PeerListener /** * Inbound. - * Not halted, peers < max. + * Not halted, peers < max. * @since 0.9.1 */ public boolean needPeers() @@ -395,7 +395,7 @@ class PeerCoordinator implements PeerListener /** * Outbound. - * Not halted, peers < max, and need pieces. + * Not halted, peers < max, and need pieces. * @since 0.9.1 */ public boolean needOutboundPeers() { diff --git a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java index 98be94d73..fde46724b 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java +++ b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java @@ -324,7 +324,7 @@ public class SnarkManager implements CompleteListener { /** * Use if it does not include a link. - * Escapes '<' and '>' before queueing + * Escapes '<' and '>' before queueing */ public void addMessage(String message) { addMessageNoEscape(message.replace("<", "<").replace(">", ">")); @@ -332,7 +332,7 @@ public class SnarkManager implements CompleteListener { /** * Use if it includes a link. - * Does not escape '<' and '>' before queueing + * Does not escape '<' and '>' before queueing * @since 0.9.14.1 */ public void addMessageNoEscape(String message) { @@ -2558,7 +2558,7 @@ public class SnarkManager implements CompleteListener { /** * Stop all running torrents, and close the tunnel after a delay * to allow for announces. - * If called at router shutdown via Jetty shutdown hook -> webapp destroy() -> stop(), + * If called at router shutdown via Jetty shutdown hook -> webapp destroy() -> stop(), * the tunnel won't actually be closed as the SimpleTimer2 is already shutdown * or will be soon, so we delay a few seconds inline. * @param finalShutdown if true, sleep at the end if any torrents were running diff --git a/apps/i2psnark/java/src/org/klomp/snark/Storage.java b/apps/i2psnark/java/src/org/klomp/snark/Storage.java index 4db3b5896..c451d3baa 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Storage.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Storage.java @@ -436,7 +436,7 @@ public class Storage implements Closeable * Must call Snark.updatePiecePriorities() * (which calls getPiecePriorities()) after calling this. * @param fileIndex as obtained from indexOf - * @param pri default 0; <0 to disable + * @param pri default 0; <0 to disable * @since 0.8.1 */ public void setPriority(int fileIndex, int pri) { diff --git a/apps/i2psnark/java/src/org/klomp/snark/dht/DHT.java b/apps/i2psnark/java/src/org/klomp/snark/dht/DHT.java index d4f289791..2614486bb 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/dht/DHT.java +++ b/apps/i2psnark/java/src/org/klomp/snark/dht/DHT.java @@ -42,7 +42,7 @@ public interface DHT { * * @param ih the Info Hash (torrent) * @param max maximum number of peers to return - * @param maxWait the maximum time to wait (ms) must be > 0 + * @param maxWait the maximum time to wait (ms) must be > 0 * @param annMax the number of peers to announce to * @param annMaxWait the maximum total time to wait for announces, may be 0 to return immediately without waiting for acks * @param isSeed true if seed, false if leech @@ -81,7 +81,7 @@ public interface DHT { /** * Announce to the closest DHT peers. - * Blocking unless maxWait <= 0 + * Blocking unless maxWait <= 0 * Caller should run in a thread. * This also automatically announces ourself to our local tracker. * For best results do a getPeers() first so we have tokens. 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 f92c3da99..1ebf97510 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java +++ b/apps/i2psnark/java/src/org/klomp/snark/dht/KRPC.java @@ -245,7 +245,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT { * * @param target the key we are searching for * @param maxNodes how many to contact - * @param maxWait how long to wait for each to reply (not total) must be > 0 + * @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") @@ -326,7 +326,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT { * * @param ih the Info Hash (torrent) * @param max maximum number of peers to return - * @param maxWait the maximum time to wait (ms) must be > 0 + * @param maxWait the maximum time to wait (ms) must be > 0 * @param annMax the number of peers to announce to * @param annMaxWait the maximum total time to wait for announces, may be 0 to return immediately without waiting for acks * @param isSeed true if seed, false if leech @@ -510,7 +510,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT { * Announce to the closest peers in the local DHT. * This is NOT iterative - call getPeers() first to get the closest * peers into the local DHT. - * Blocking unless maxWait <= 0 + * Blocking unless maxWait <= 0 * Caller should run in a thread. * This also automatically announces ourself to our local tracker. * For best results do a getPeersAndAnnounce() instead, as this announces to @@ -544,7 +544,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT { /** * Announce to a single DHT peer. - * Blocking unless maxWait <= 0 + * Blocking unless maxWait <= 0 * Caller should run in a thread. * For best results do a getPeers() first so we have a token. * @@ -1509,9 +1509,9 @@ public class KRPC implements I2PSessionMuxedListener, DHT { /** * Should contain null if getReplyCode is REPLY_PONG. - * Should contain List if getReplyCode is REPLY_PEERS. - * Should contain List if getReplyCode is REPLY_NODES. - * Should contain String if getReplyCode is > 200. + * Should contain List<Hash> if getReplyCode is REPLY_PEERS. + * Should contain List<NodeInfo> if getReplyCode is REPLY_NODES. + * Should contain String if getReplyCode is > 200. * @return may be null depending on what happened. Cast to expected type. */ public Object getReplyObject() { diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/URIUtil.java b/apps/i2psnark/java/src/org/klomp/snark/web/URIUtil.java index 858b9aec8..532db2956 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/URIUtil.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/URIUtil.java @@ -57,7 +57,7 @@ class URIUtil /** Encode a URI path. * - * Somewhat oddly, this encodes all chars >= 0x80 if buf is null, (strict RFC 2396) + * Somewhat oddly, this encodes all chars >= 0x80 if buf is null, (strict RFC 2396) * but only the control, space, and special chars if buf is non-null. * * @param path The path the encode diff --git a/apps/susimail/src/src/i2p/susi/webmail/Mail.java b/apps/susimail/src/src/i2p/susi/webmail/Mail.java index e43fe3b8a..726dab5a8 100644 --- a/apps/susimail/src/src/i2p/susi/webmail/Mail.java +++ b/apps/susimail/src/src/i2p/susi/webmail/Mail.java @@ -3,7 +3,7 @@ * * This file is part of susimail project, see http://susi.i2p/ * - * Copyright (C) 2004-2005 + * Copyright (C) 2004-2005 susi23@mail.i2p * * 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 @@ -204,7 +204,7 @@ class Mail { } /** - * Returns the first email address portion, enclosed by <> + * Returns the first email address portion, enclosed by <> * @param address */ public static String getAddress(String address ) From e0e06d73ebe4ea8eed8b749fc9e1bca51c9f8780 Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 03:14:34 +0000 Subject: [PATCH 26/50] javadoc fixes part 14 (ticket #1894) --- apps/BOB/src/net/i2p/BOB/BOB.java | 1 - apps/i2psnark/java/src/org/klomp/snark/BitField.java | 2 +- apps/i2psnark/java/src/org/klomp/snark/MagnetState.java | 4 ++-- .../java/src/org/klomp/snark/bencode/BDecoder.java | 2 +- apps/i2psnark/java/src/org/klomp/snark/dht/NodeInfo.java | 2 +- .../java/src/net/i2p/i2ptunnel/SSLClientUtil.java | 2 +- .../java/src/org/mortbay/servlet/MultiPartRequest.java | 2 +- .../java/src/net/i2p/router/web/GraphHelper.java | 2 +- .../java/src/net/i2p/router/web/SummaryHelper.java | 1 + .../java/src/net/i2p/router/web/WebAppConfiguration.java | 2 +- .../java/src/net/i2p/router/web/WebAppStarter.java | 8 ++++---- apps/sam/java/src/net/i2p/sam/MasterSession.java | 1 - apps/sam/java/src/net/i2p/sam/SAMv3StreamSession.java | 3 +-- apps/sam/java/src/net/i2p/sam/SSLUtil.java | 2 +- apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java | 2 +- apps/susimail/src/src/i2p/susi/util/Folder.java | 2 +- installer/java/src/net/i2p/installer/FixWinPaths.java | 2 +- 17 files changed, 19 insertions(+), 21 deletions(-) diff --git a/apps/BOB/src/net/i2p/BOB/BOB.java b/apps/BOB/src/net/i2p/BOB/BOB.java index 675ad6462..83bf9767c 100644 --- a/apps/BOB/src/net/i2p/BOB/BOB.java +++ b/apps/BOB/src/net/i2p/BOB/BOB.java @@ -155,7 +155,6 @@ public class BOB implements Runnable, ClientApp { * * @param mgr may be null * @param args non-null - * @throws Exception on bad args * @since 0.9.10 */ public BOB(I2PAppContext context, ClientAppManager mgr, String[] args) { diff --git a/apps/i2psnark/java/src/org/klomp/snark/BitField.java b/apps/i2psnark/java/src/org/klomp/snark/BitField.java index 7ec472705..c1c238cec 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/BitField.java +++ b/apps/i2psnark/java/src/org/klomp/snark/BitField.java @@ -48,7 +48,7 @@ public class BitField * as set by the given byte array. This will make a copy of the array. * Extra bytes will be ignored. * - * @throws ArrayOutOfBoundsException if give byte array is not large + * @throws IndexOutOfBoundsException if give byte array is not large * enough. */ public BitField(byte[] bitfield, int size) diff --git a/apps/i2psnark/java/src/org/klomp/snark/MagnetState.java b/apps/i2psnark/java/src/org/klomp/snark/MagnetState.java index 31b85554c..145d8224d 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/MagnetState.java +++ b/apps/i2psnark/java/src/org/klomp/snark/MagnetState.java @@ -161,7 +161,7 @@ class MagnetState { /** * @return true if this was the last piece - * @throws NPE, IllegalArgumentException, IOException, ... + * @throws NullPointerException IllegalArgumentException, IOException, ... */ public boolean saveChunk(int chunk, byte[] data, int off, int length) throws Exception { if (!isInitialized) @@ -185,7 +185,7 @@ class MagnetState { /** * @return true if this was the last piece - * @throws NPE, IllegalArgumentException, IOException, ... + * @throws NullPointerException IllegalArgumentException, IOException, ... */ private MetaInfo buildMetaInfo() throws Exception { // top map has nothing in it but the info map (no announce) diff --git a/apps/i2psnark/java/src/org/klomp/snark/bencode/BDecoder.java b/apps/i2psnark/java/src/org/klomp/snark/bencode/BDecoder.java index f7a6e06cb..4d7162e3d 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/bencode/BDecoder.java +++ b/apps/i2psnark/java/src/org/klomp/snark/bencode/BDecoder.java @@ -102,7 +102,7 @@ public class BDecoder * @return The first BEValue on the stream or null when the stream * has ended. * - * @throws InvalidBEncoding when the stream doesn't start with a + * @throws InvalidBEncodingException when the stream doesn't start with a * bencoded value or the stream isn't a bencoded stream at all. * @throws IOException when somthing bad happens with the stream * to read from. diff --git a/apps/i2psnark/java/src/org/klomp/snark/dht/NodeInfo.java b/apps/i2psnark/java/src/org/klomp/snark/dht/NodeInfo.java index 708d2d276..35d5761aa 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/dht/NodeInfo.java +++ b/apps/i2psnark/java/src/org/klomp/snark/dht/NodeInfo.java @@ -77,7 +77,7 @@ class NodeInfo extends SimpleDataStructure { * @param compactInfo 20 byte node ID, 32 byte destHash, 2 byte port * @param offset starting at this offset in compactInfo * @throws IllegalArgumentException - * @throws AIOOBE + * @throws ArrayIndexOutOfBoundsException */ public NodeInfo(byte[] compactInfo, int offset) { super(); diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/SSLClientUtil.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/SSLClientUtil.java index 01e7c4791..07a3b7665 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/SSLClientUtil.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/SSLClientUtil.java @@ -153,7 +153,7 @@ public class SSLClientUtil { * Sets up the SSLContext and sets the socket factory. * No option prefix allowed. * - * @throws IOException; GeneralSecurityExceptions are wrapped in IOE for convenience + * @throws IOException GeneralSecurityExceptions are wrapped in IOE for convenience * @return factory, throws on all errors */ public static SSLServerSocketFactory initializeFactory(Properties opts) throws IOException { diff --git a/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java b/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java index ef60acd37..1008e9f30 100644 --- a/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java +++ b/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java @@ -39,7 +39,7 @@ import org.mortbay.util.LineInput; * This class decodes the multipart/form-data stream sent by * a HTML form that uses a file input item. * - *

                                  Usage

                                  + *

                                  Usage

                                  * Each part of the form data is named from the HTML form and * is available either via getString(name) or getInputStream(name). * Furthermore the MIME parameters and filename can be requested for 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 5beb2ba23..169a795f3 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java @@ -56,7 +56,7 @@ public class GraphHelper extends FormHandler { } /** - * This must be output in the jsp since must be in the + * This must be output in the jsp since *lt;meta> must be in the <head> * @since 0.8.7 */ public String getRefreshMeta() { 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 75a55709f..56cffb200 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java @@ -118,6 +118,7 @@ public class SummaryHelper extends HelperBase { } **/ + /** allowReseed */ public boolean allowReseed() { return _context.netDb().isInitialized() && (_context.netDb().getKnownRouters() < 30) || diff --git a/apps/routerconsole/java/src/net/i2p/router/web/WebAppConfiguration.java b/apps/routerconsole/java/src/net/i2p/router/web/WebAppConfiguration.java index c88ec64d9..3e2eb9ecc 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/WebAppConfiguration.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/WebAppConfiguration.java @@ -37,7 +37,7 @@ import org.eclipse.jetty.webapp.WebAppContext; * * No, wac.addClassPath() does not work. For more info see: * - * http://servlets.com/archive/servlet/ReadMsg?msgId=511113&listName=jetty-support + * http://servlets.com/archive/servlet/ReadMsg?msgId=511113&listName=jetty-support * * @since 0.7.12 * @author zzz diff --git a/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java b/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java index 4455945e8..70a86a89b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java @@ -27,7 +27,7 @@ import org.eclipse.jetty.webapp.WebAppContext; * * No, wac.addClassPath() does not work. For more info see: * - * http://servlets.com/archive/servlet/ReadMsg?msgId=511113&listName=jetty-support + * http://servlets.com/archive/servlet/ReadMsg?msgId=511113&listName=jetty-support * * @since 0.7.12 * @author zzz @@ -51,7 +51,7 @@ public class WebAppStarter { * Adds and starts. * Prior to 0.9.28, was not guaranteed to throw on failure. * - * @throws just about anything, caller would be wise to catch Throwable + * @throws Exception just about anything, caller would be wise to catch Throwable */ static void startWebApp(RouterContext ctx, ContextHandlerCollection server, String appName, String warPath) throws Exception { @@ -123,8 +123,8 @@ public class WebAppStarter { } /** - * stop it and remove the context - * @throws just about anything, caller would be wise to catch Throwable + * Stop it and remove the context. + * Throws just about anything, caller would be wise to catch Throwable */ static void stopWebApp(String appName) { ContextHandler wac = getWebApp(appName); diff --git a/apps/sam/java/src/net/i2p/sam/MasterSession.java b/apps/sam/java/src/net/i2p/sam/MasterSession.java index 67ff566b5..fc69a7238 100644 --- a/apps/sam/java/src/net/i2p/sam/MasterSession.java +++ b/apps/sam/java/src/net/i2p/sam/MasterSession.java @@ -54,7 +54,6 @@ class MasterSession extends SAMv3StreamSession implements SAMDatagramReceiver, S * @param nick nickname of the session * @throws IOException * @throws DataFormatException - * @throws I2PSessionException */ public MasterSession(String nick, SAMv3DatagramServer dgServer, SAMv3Handler handler, Properties props) throws IOException, DataFormatException, SAMException { diff --git a/apps/sam/java/src/net/i2p/sam/SAMv3StreamSession.java b/apps/sam/java/src/net/i2p/sam/SAMv3StreamSession.java index f547a2e40..8be28b475 100644 --- a/apps/sam/java/src/net/i2p/sam/SAMv3StreamSession.java +++ b/apps/sam/java/src/net/i2p/sam/SAMv3StreamSession.java @@ -77,7 +77,7 @@ class SAMv3StreamSession extends SAMStreamSession implements Session * @throws IOException * @throws DataFormatException * @throws SAMException - * @throws NPE if login nickname is not registered + * @throws NullPointerException if login nickname is not registered */ public SAMv3StreamSession(String login) throws IOException, DataFormatException, SAMException @@ -98,7 +98,6 @@ class SAMv3StreamSession extends SAMStreamSession implements Session * @param login nickname of the session * @throws IOException * @throws DataFormatException - * @throws I2PSessionException * @since 0.9.25 */ public SAMv3StreamSession(String login, Properties props, SAMv3Handler handler, I2PSocketManager mgr, diff --git a/apps/sam/java/src/net/i2p/sam/SSLUtil.java b/apps/sam/java/src/net/i2p/sam/SSLUtil.java index bf4ebf1e4..cf170f6ec 100644 --- a/apps/sam/java/src/net/i2p/sam/SSLUtil.java +++ b/apps/sam/java/src/net/i2p/sam/SSLUtil.java @@ -138,7 +138,7 @@ class SSLUtil { * Sets up the SSLContext and sets the socket factory. * No option prefix allowed. * - * @throws IOException; GeneralSecurityExceptions are wrapped in IOE for convenience + * @throws IOException GeneralSecurityExceptions are wrapped in IOE for convenience * @return factory, throws on all errors */ public static SSLServerSocketFactory initializeFactory(Properties opts) throws IOException { diff --git a/apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java b/apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java index 242ceea85..d988d40af 100644 --- a/apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java +++ b/apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java @@ -110,7 +110,7 @@ public class AddressBean * Ref: java.net.IDN and RFC 3940 * @param host will be converted to lower case * @return name converted to lower case and punycoded if necessary - * @throws IAE on various errors or if IDN is needed but not available + * @throws IllegalArgumentException on various errors or if IDN is needed but not available * @since 0.8.7 */ static String toASCII(String host) throws IllegalArgumentException { diff --git a/apps/susimail/src/src/i2p/susi/util/Folder.java b/apps/susimail/src/src/i2p/susi/util/Folder.java index 54f647d87..d2a44a6cd 100644 --- a/apps/susimail/src/src/i2p/susi/util/Folder.java +++ b/apps/susimail/src/src/i2p/susi/util/Folder.java @@ -369,7 +369,7 @@ public class Folder { * Sets the sorting direction of the folder. * Does not re-sort. Caller must call sortBy() * - * @param direction @link UP or @link DOWN + * @param direction UP or DOWN */ public synchronized void setSortingDirection(SortOrder direction) { diff --git a/installer/java/src/net/i2p/installer/FixWinPaths.java b/installer/java/src/net/i2p/installer/FixWinPaths.java index 698f6102c..605c872c6 100644 --- a/installer/java/src/net/i2p/installer/FixWinPaths.java +++ b/installer/java/src/net/i2p/installer/FixWinPaths.java @@ -17,7 +17,7 @@ import java.io.PrintStream; *
                                • rewrites the applicable wrapper config options to point to %APPDATA%\I2P
                                • *
                                • corrects the paths, rewriting / to \
                                • *
                                - *

                                + *

                                * Usage: FixWinPaths [WrapperConfigFile] * @since 0.9.5 */ From 78da3b97859977871b78db17f426736565921c12 Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 16:00:58 +0000 Subject: [PATCH 27/50] javadoc fixes part 15 (ticket #1894) --- apps/i2psnark/java/src/org/klomp/snark/Snark.java | 1 + apps/i2psnark/java/src/org/klomp/snark/Storage.java | 2 +- .../main/java/net/i2p/imagegen/IdenticonServlet.java | 6 +++--- .../main/java/com/google/zxing/EncodeHintType.java | 12 ++++++------ .../zxing/qrcode/decoder/FormatInformation.java | 2 +- .../src/org/mortbay/servlet/MultiPartRequest.java | 3 ++- .../java/src/org/jrobin/core/jrrd/RRDFile.java | 2 +- apps/sam/java/src/net/i2p/sam/client/SSLUtil.java | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/apps/i2psnark/java/src/org/klomp/snark/Snark.java b/apps/i2psnark/java/src/org/klomp/snark/Snark.java index 9bced500f..74f64a34c 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Snark.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Snark.java @@ -212,6 +212,7 @@ public class Snark ***********/ + /** max connections */ public static final String PROP_MAX_CONNECTIONS = "i2psnark.maxConnections"; /** most of these used to be public, use accessors below instead */ diff --git a/apps/i2psnark/java/src/org/klomp/snark/Storage.java b/apps/i2psnark/java/src/org/klomp/snark/Storage.java index c451d3baa..264602653 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Storage.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Storage.java @@ -695,7 +695,7 @@ public class Storage implements Closeable * Doesn't really reopen the file descriptors for a restart. * Just does an existence check but no length check or data reverification * - * @throws IOE on fail + * @throws IOException on fail */ public void reopen() throws IOException { diff --git a/apps/imagegen/imagegen/webapp/src/main/java/net/i2p/imagegen/IdenticonServlet.java b/apps/imagegen/imagegen/webapp/src/main/java/net/i2p/imagegen/IdenticonServlet.java index 90cc702b9..5628fb74b 100644 --- a/apps/imagegen/imagegen/webapp/src/main/java/net/i2p/imagegen/IdenticonServlet.java +++ b/apps/imagegen/imagegen/webapp/src/main/java/net/i2p/imagegen/IdenticonServlet.java @@ -25,13 +25,13 @@ import net.i2p.util.ConvertToHash; * This servlet generates identicon (visual identifier) images ranging * from 16x16 to 512x512 in size. * - *

                                Supported Image Formats
                                + *

                                Supported Image Formats

                                *

                                * Currently only PNG is supported because javax.imageio package * does not come with built-in GIF encoder and PNG is the only remaining * reasonable format. *

                                - *
                                Initialization Parameters:
                                + *

                                Initialization Parameters:

                                *
                                *
                                *
                                inetSalt
                                @@ -42,7 +42,7 @@ import net.i2p.util.ConvertToHash; * (Optional) *
                                *
                                - *
                                Request ParametersP
                                + *

                                Request ParametersP

                                *
                                *
                                *
                                code
                                diff --git a/apps/imagegen/zxing/core/src/main/java/com/google/zxing/EncodeHintType.java b/apps/imagegen/zxing/core/src/main/java/com/google/zxing/EncodeHintType.java index 32b50f6be..f380d4251 100644 --- a/apps/imagegen/zxing/core/src/main/java/com/google/zxing/EncodeHintType.java +++ b/apps/imagegen/zxing/core/src/main/java/com/google/zxing/EncodeHintType.java @@ -40,21 +40,21 @@ public enum EncodeHintType { CHARACTER_SET, /** - * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint}) + * Specifies the matrix shape for Data Matrix (type com.google.zxing.datamatrix.encoder.SymbolShapeHint) */ DATA_MATRIX_SHAPE, /** - * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now. + * Specifies a minimum barcode size (type Dimension). Only applicable to Data Matrix now. * * @deprecated use width/height params in - * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)} + * com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int) */ @Deprecated MIN_SIZE, /** - * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now. + * Specifies a maximum barcode size (type Dimension). Only applicable to Data Matrix now. * * @deprecated without replacement */ @@ -76,14 +76,14 @@ public enum EncodeHintType { /** * Specifies what compaction mode to use for PDF417 (type - * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its + * com.google.zxing.pdf417.encoder.Compaction Compaction or {@link String} value of one of its * enum values). */ PDF417_COMPACTION, /** * Specifies the minimum and maximum number of rows and columns for PDF417 (type - * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}). + * com.google.zxing.pdf417.encoder.Dimensions Dimensions). */ PDF417_DIMENSIONS, diff --git a/apps/imagegen/zxing/core/src/main/java/com/google/zxing/qrcode/decoder/FormatInformation.java b/apps/imagegen/zxing/core/src/main/java/com/google/zxing/qrcode/decoder/FormatInformation.java index 95ee70156..fc02d93c6 100644 --- a/apps/imagegen/zxing/core/src/main/java/com/google/zxing/qrcode/decoder/FormatInformation.java +++ b/apps/imagegen/zxing/core/src/main/java/com/google/zxing/qrcode/decoder/FormatInformation.java @@ -21,7 +21,7 @@ package com.google.zxing.qrcode.decoder; * error correction level.

                                * * @author Sean Owen - * @see DataMask + * See DataMask * @see ErrorCorrectionLevel */ final class FormatInformation { diff --git a/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java b/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java index 1008e9f30..0091d5d8a 100644 --- a/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java +++ b/apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java @@ -38,8 +38,9 @@ import org.mortbay.util.LineInput; *

                                * This class decodes the multipart/form-data stream sent by * a HTML form that uses a file input item. + *

                                * - *

                                Usage

                                + *

                                Usage

                                * Each part of the form data is named from the HTML form and * is available either via getString(name) or getInputStream(name). * Furthermore the MIME parameters and filename can be requested for diff --git a/apps/jrobin/java/src/org/jrobin/core/jrrd/RRDFile.java b/apps/jrobin/java/src/org/jrobin/core/jrrd/RRDFile.java index 0dcd7808d..7badf305e 100644 --- a/apps/jrobin/java/src/org/jrobin/core/jrrd/RRDFile.java +++ b/apps/jrobin/java/src/org/jrobin/core/jrrd/RRDFile.java @@ -30,7 +30,7 @@ import org.jrobin.core.RrdException; * This class is a quick hack to read information from an RRD file. Writing * to RRD files is not currently supported. As I said, this is a quick hack. * Some thought should be put into the overall design of the file IO. - *

                                + *

                                * Currently this can read RRD files that were generated on Solaris (Sparc) * and Linux (x86). * diff --git a/apps/sam/java/src/net/i2p/sam/client/SSLUtil.java b/apps/sam/java/src/net/i2p/sam/client/SSLUtil.java index 4c73d9883..64f7aa965 100644 --- a/apps/sam/java/src/net/i2p/sam/client/SSLUtil.java +++ b/apps/sam/java/src/net/i2p/sam/client/SSLUtil.java @@ -139,7 +139,7 @@ class SSLUtil { * Sets up the SSLContext and sets the socket factory. * No option prefix allowed. * - * @throws IOException; GeneralSecurityExceptions are wrapped in IOE for convenience + * @throws IOException GeneralSecurityExceptions are wrapped in IOE for convenience * @return factory, throws on all errors */ public static SSLServerSocketFactory initializeFactory(Properties opts) throws IOException { From 61fd2429389c554bf08230da6b3335d8d8fd192b Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 16:10:00 +0000 Subject: [PATCH 28/50] Build: Translated man pages for es and zh, and a script to build them. es complete, zh partial, just for testing. No ant targets or deb packaging yet. --- .tx/config | 2 + installer/resources/locale-man/man_es.po | 426 +++++++++++++++++++++++ installer/resources/locale-man/man_zh.po | 396 +++++++++++++++++++++ installer/resources/man/es/eepget.1 | 90 +++++ installer/resources/man/es/i2prouter.1 | 48 +++ installer/resources/man/zh/eepget.1 | 85 +++++ installer/resources/man/zh/i2prouter.1 | 47 +++ installer/resources/poupdate-man.sh | 11 + tests/scripts/checkpo.sh | 1 + 9 files changed, 1106 insertions(+) create mode 100644 installer/resources/locale-man/man_es.po create mode 100644 installer/resources/locale-man/man_zh.po create mode 100644 installer/resources/man/es/eepget.1 create mode 100644 installer/resources/man/es/i2prouter.1 create mode 100644 installer/resources/man/zh/eepget.1 create mode 100644 installer/resources/man/zh/i2prouter.1 create mode 100755 installer/resources/poupdate-man.sh diff --git a/.tx/config b/.tx/config index 9988a7181..e6b397c0f 100644 --- a/.tx/config +++ b/.tx/config @@ -396,6 +396,8 @@ trans.zh_CN = apps/ministreaming/locale/messages_zh.po type = PO source_file = installer/resources/locale-man/man.pot source_lang = en +trans.es = installer/resources/locale-man/man_es.po +trans.zh_CN = installer/resources/locale-man/man_zh.po [main] host = https://www.transifex.com diff --git a/installer/resources/locale-man/man_es.po b/installer/resources/locale-man/man_es.po new file mode 100644 index 000000000..d7cdc581a --- /dev/null +++ b/installer/resources/locale-man/man_es.po @@ -0,0 +1,426 @@ +# I2P +# Copyright (C) 2017 The I2P Project +# This file is distributed under the same license as the routerconsole package. +# To contribute translations, see https://www.transifex.com/otf/I2P/dashboard/ +# zzz , 2017. +# +# Translators: +# strel , 2017 +msgid "" +msgstr "" +"Project-Id-Version: I2P man pages\n" +"POT-Creation-Date: 2017-01-26 15:24+0000\n" +"PO-Revision-Date: 2017-01-26 15:24+0000\n" +"Last-Translator: strel , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/otf/teams/12694/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "EEEPGET" +msgstr "EEPGET" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "September 18, 2015" +msgstr "18 de septiembre, 2015" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "Eepget - I2P Downloader" +msgstr "Eepget - Gestor de descarga de I2P" + +#. type: SH +#: man/eepget.1:3 man/i2prouter.1:3 +#, no-wrap +msgid "NAME" +msgstr "NOMBRE" + +#. type: Plain text +#: man/eepget.1:5 +msgid "Eepget - I2P downloader" +msgstr "Eepget - Gestor de descarga de I2P" + +#. type: SH +#: man/eepget.1:6 man/i2prouter.1:6 +#, no-wrap +msgid "SYNOPSIS" +msgstr "SINOPSIS" + +#. type: Plain text +#: man/eepget.1:9 +msgid "B [I]I" +msgstr "B [I]I" + +#. type: SH +#: man/eepget.1:11 man/i2prouter.1:11 +#, no-wrap +msgid "DESCRIPTION" +msgstr "DESCRIPCIÓN" + +#. type: Plain text +#: man/eepget.1:15 +msgid "" +"Download a file non-interactively via HTTP. Transfers through both I2P and " +"the regular Internet are supported." +msgstr "" +"Descarga un fichero de forma no interactiva vía HTTP. Están soportadas las " +"transferencias tanto a través de I2P como de la Internet regular." + +#. type: Plain text +#: man/eepget.1:21 +msgid "" +"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 (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." +msgstr "" +"Eepget puede enfrentarse a conexiones de red lentas o inestables; si una " +"descarga no se completa a causa de un problema de red, seguirá intentándolo " +"hasta que el fichero se haya descargado del todo (si la opción -n está " +"establecida). Si el servidor remoto lo soporta, eepget le dará instrucciones" +" para que reanude la descarga desde el punto en que se interrumpió." + +#. type: SH +#: man/eepget.1:22 +#, no-wrap +msgid "OPTIONS" +msgstr "OPCIONES" + +#. type: Plain text +#: man/eepget.1:25 +msgid "B<-c>" +msgstr "B<-c>" + +#. type: TP +#: man/eepget.1:25 +#, no-wrap +msgid "Clearnet. Do not use a proxy. Same as B<-p> :0 ." +msgstr "Clearnet (red abierta). No utiliza un proxy. Lo mismo que B<-p> :0 ." + +#. type: Plain text +#: man/eepget.1:31 +msgid "B<-e> etag" +msgstr "B<-e> etag" + +#. type: TP +#: man/eepget.1:31 +#, no-wrap +msgid "Sets the etag value in the request headers." +msgstr "" +"Establece el valor de la etag en las cabeceras HTTP de las peticiones." + +#. type: Plain text +#: man/eepget.1:37 +msgid "B<-h> name=value" +msgstr "B<-h> nombre=valor" + +#. type: TP +#: man/eepget.1:37 +#, no-wrap +msgid "Adds an arbitrary request header with the given name and value." +msgstr "" +"Añade una cabecera arbitraria de petición HTTP con el nombre y valor dados." + +#. type: Plain text +#: man/eepget.1:43 +msgid "B<-l> lineLen" +msgstr "B<-l> tamañoLínea" + +#. type: TP +#: man/eepget.1:43 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ lineLen > is the length of one progress " +"line in characters. The default is 40." +msgstr "" +"Controla el indicador de progreso. B<\\ tamañoLínea > es el tamaño de una " +"línea de progreso en caracteres. El valor predeterminado es 40." + +#. type: Plain text +#: man/eepget.1:49 +msgid "B<-m> markSize" +msgstr "B<-m> volumenMarca" + +#. type: TP +#: man/eepget.1:49 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ markSize > is the number of bytes one " +"'#' character represents. The default is 1024." +msgstr "" +"Controla el indicador de progreso. B<\\ volumenMarca > es el número de bytes" +" que cada caracter '#' representa en la línea de progreso. El valor " +"predeterminado es 1024." + +#. type: Plain text +#: man/eepget.1:55 +msgid "B<-n> retries" +msgstr "B<-n> reintentos" + +#. type: TP +#: man/eepget.1:55 +#, no-wrap +msgid "" +"Specify the number of times to retry downloading if the download isn't " +"successful. If this option is not specified, eepget will not retry." +msgstr "" +"Especifica el número de veces a reintentar la descarga si no se completa. Si" +" no se especifica esta opción, eepget no efectuará reintentos." + +#. type: Plain text +#: man/eepget.1:61 +msgid "B<-o> file" +msgstr "B<-o> fichero" + +#. type: TP +#: man/eepget.1:61 +#, no-wrap +msgid "" +"Sets the output file to write to. If this option is not given, the output " +"filename will be determined by the URL." +msgstr "" +"Establece el fichero de salida al que escribir. Si no se proporciona esta " +"opción, el nombre del fichero de salida se determinará por la URL." + +#. type: Plain text +#: man/eepget.1:67 +msgid "B<-p> proxy_host[:port]" +msgstr "B<-p> servidor_proxy[:puerto]" + +#. type: TP +#: man/eepget.1:67 +#, no-wrap +msgid "" +"Specify an I2P proxy server (eeproxy) to use. If the port is not specified, " +"eepget will use 4444. If this option is not specified, eepget will use " +"127.0.0.1:4444. Specify B<-c> or B<-p> :0 to disable the eeproxy." +msgstr "" +"Especifica un servidor proxy I2P (eeproxy) a usar. Si no se especifica el " +"puerto, eepget usará 4444. Si no se especifica esta opción, eepget usará " +"127.0.0.1:4444. Especifique B<-c> o B<-p> :0 para deshabilitar el eeproxy." + +#. type: Plain text +#: man/eepget.1:73 +msgid "B<-t> seconds" +msgstr "B<-t> segundos" + +#. type: TP +#: man/eepget.1:73 +#, no-wrap +msgid "Sets the inactivity timeout. The default is 60 seconds." +msgstr "" +"Establece el tiempo de espera por inactividad. El valor predeterminado es 60" +" segundos." + +#. type: Plain text +#: man/eepget.1:79 +msgid "B<-u> username" +msgstr "B<-u> nombreUsuario" + +#. type: TP +#: man/eepget.1:79 +#, no-wrap +msgid "Sets the username for proxy authorization, if required." +msgstr "" +"Establece el nombre de usuario para la autorización del proxy, si se " +"requiere." + +#. type: Plain text +#: man/eepget.1:85 +msgid "B<-x> password" +msgstr "B<-x> contraseña" + +#. type: TP +#: man/eepget.1:85 +#, no-wrap +msgid "" +"Sets the password for proxy authorization, if required. If a username is " +"specified but not a password, EepGet will prompt for the password." +msgstr "" +"Establece la contraseña para la autorización del proxy, si se requiere. Si " +"se especifica un nombre de usuario pero no una contraseña, EepGet solicitará" +" la contraseña." + +#. type: SH +#: man/eepget.1:89 +#, no-wrap +msgid "EXIT STATUS" +msgstr "ESTADO DE LA SALIDA" + +#. type: Plain text +#: man/eepget.1:93 +msgid "" +"B exits with status zero upon successful transfer and non-zero if " +"there were problems with the download." +msgstr "" +"B produce una salida con estado cero cuando la transferencia se ha " +"completado, y no-cero si hubo problemas con la descarga." + +#. type: SH +#: man/eepget.1:94 +#, no-wrap +msgid "SEE ALSO" +msgstr "VEA TAMBIÉN" + +#. type: Plain text +#: man/eepget.1:97 +msgid "curl(1) wget(1)" +msgstr "curl(1) wget(1)" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "i2prouter" +msgstr "i2prouter" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "January 26, 2017" +msgstr "26 de enero, 2017" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "I2PROUTER" +msgstr "I2PROUTER" + +#. type: Plain text +#: man/i2prouter.1:5 +msgid "i2prouter - start and stop the I2P router" +msgstr "i2prouter - inicia y detiene el router I2P" + +#. type: Plain text +#: man/i2prouter.1:9 +msgid "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" +msgstr "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" + +#. type: Plain text +#: man/i2prouter.1:13 +msgid "Control the I2P service." +msgstr "Controla el servicio I2P." + +#. type: IP +#: man/i2prouter.1:15 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:17 +msgid "Runs I2P as a console application under the current user." +msgstr "Ejecuta I2P como una aplicación de consola bajo el usuario actual." + +#. type: IP +#: man/i2prouter.1:19 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:21 +msgid "Starts the I2P service." +msgstr "Inicia el servicio I2P." + +#. type: IP +#: man/i2prouter.1:23 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:25 +msgid "Stops the I2P service." +msgstr "Detiene el servicio I2P." + +#. type: IP +#: man/i2prouter.1:27 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:29 +msgid "Stops the I2P service and then starts it." +msgstr "Detiene el servicio I2P y luego lo inicia." + +#. type: IP +#: man/i2prouter.1:31 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:33 +msgid "Restart the I2P service only if it is already running." +msgstr "Reinicia el servicio I2P sólo si ya está en marcha." + +#. type: IP +#: man/i2prouter.1:35 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:37 +msgid "Stop I2P gracefully (may take up to 11 minutes)" +msgstr "Detiene I2P ordenadamente (puede llevar hasta 11 minutos)" + +#. type: IP +#: man/i2prouter.1:39 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:41 +msgid "Install initscript to start I2P automatically when the system boots." +msgstr "" +"Instala initscript para iniciar I2P automáticamente cuando arranque el " +"sistema." + +#. type: IP +#: man/i2prouter.1:43 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:45 +msgid "Uninstall initscript that was installed with B" +msgstr "Desinstala el initscript que fue instalado con B" + +#. type: IP +#: man/i2prouter.1:47 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:49 +msgid "Prints whether the I2P service is running." +msgstr "Imprime en pantalla si el servicio I2P está en marcha." + +#. type: IP +#: man/i2prouter.1:51 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:52 +msgid "Dumps the current threads into B." +msgstr "Vuelca los hilos de proceso actuales en B." diff --git a/installer/resources/locale-man/man_zh.po b/installer/resources/locale-man/man_zh.po new file mode 100644 index 000000000..f08eb982a --- /dev/null +++ b/installer/resources/locale-man/man_zh.po @@ -0,0 +1,396 @@ +# I2P +# Copyright (C) 2017 The I2P Project +# This file is distributed under the same license as the routerconsole package. +# To contribute translations, see https://www.transifex.com/otf/I2P/dashboard/ +# zzz , 2017. +# +# Translators: +# YF , 2017 +msgid "" +msgstr "" +"Project-Id-Version: I2P man pages\n" +"POT-Creation-Date: 2017-01-26 15:24+0000\n" +"PO-Revision-Date: 2017-01-26 15:24+0000\n" +"Last-Translator: YF , 2017\n" +"Language-Team: Chinese (China) (https://www.transifex.com/otf/teams/12694/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "EEEPGET" +msgstr "EEEPGET" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "September 18, 2015" +msgstr "2015年9月18日" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "Eepget - I2P Downloader" +msgstr "Eepget - I2P 下载器" + +#. type: SH +#: man/eepget.1:3 man/i2prouter.1:3 +#, no-wrap +msgid "NAME" +msgstr "名称" + +#. type: Plain text +#: man/eepget.1:5 +msgid "Eepget - I2P downloader" +msgstr "Eepget - I2P 下载器" + +#. type: SH +#: man/eepget.1:6 man/i2prouter.1:6 +#, no-wrap +msgid "SYNOPSIS" +msgstr "概要" + +#. type: Plain text +#: man/eepget.1:9 +msgid "B [I]I" +msgstr "B [I]I" + +#. type: SH +#: man/eepget.1:11 man/i2prouter.1:11 +#, no-wrap +msgid "DESCRIPTION" +msgstr "描述" + +#. type: Plain text +#: man/eepget.1:15 +msgid "" +"Download a file non-interactively via HTTP. Transfers through both I2P and " +"the regular Internet are supported." +msgstr "通过 HTTP 非交互式地下载一个文件。支持通过 I2P 和常规互联网传输。" + +#. type: Plain text +#: man/eepget.1:21 +msgid "" +"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 (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." +msgstr "" +"Eepget 能够处理缓慢或不稳定的网络连接;如果由于网络问题导致下载不成功,它将继续重试,直到检索到整个文件(如果已设定 -n " +"选项)。如果远程服务器支持,eepget 将指示服务器从中断点继续。" + +#. type: SH +#: man/eepget.1:22 +#, no-wrap +msgid "OPTIONS" +msgstr "选项" + +#. type: Plain text +#: man/eepget.1:25 +msgid "B<-c>" +msgstr "B<-c>" + +#. type: TP +#: man/eepget.1:25 +#, no-wrap +msgid "Clearnet. Do not use a proxy. Same as B<-p> :0 ." +msgstr "明网。不使用代理。同 B<-p> :0 。" + +#. type: Plain text +#: man/eepget.1:31 +msgid "B<-e> etag" +msgstr "B<-e> etag" + +#. type: TP +#: man/eepget.1:31 +#, no-wrap +msgid "Sets the etag value in the request headers." +msgstr "设定请求头中的 etag 值。" + +#. type: Plain text +#: man/eepget.1:37 +msgid "B<-h> name=value" +msgstr "B<-h> 名称=值" + +#. type: TP +#: man/eepget.1:37 +#, no-wrap +msgid "Adds an arbitrary request header with the given name and value." +msgstr "使用指定的名称和值添加任意请求头。" + +#. type: Plain text +#: man/eepget.1:43 +msgid "B<-l> lineLen" +msgstr "B<-l> 行长度" + +#. type: TP +#: man/eepget.1:43 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ lineLen > is the length of one progress " +"line in characters. The default is 40." +msgstr "控制进度显示。B<\\ lineLen > 控制进度行的字符长度。默认为40。" + +#. type: Plain text +#: man/eepget.1:49 +msgid "B<-m> markSize" +msgstr "" + +#. type: TP +#: man/eepget.1:49 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ markSize > is the number of bytes one " +"'#' character represents. The default is 1024." +msgstr "" + +#. type: Plain text +#: man/eepget.1:55 +msgid "B<-n> retries" +msgstr "B<-n> 次重试" + +#. type: TP +#: man/eepget.1:55 +#, no-wrap +msgid "" +"Specify the number of times to retry downloading if the download isn't " +"successful. If this option is not specified, eepget will not retry." +msgstr "" + +#. type: Plain text +#: man/eepget.1:61 +msgid "B<-o> file" +msgstr "B<-o> 文件" + +#. type: TP +#: man/eepget.1:61 +#, no-wrap +msgid "" +"Sets the output file to write to. If this option is not given, the output " +"filename will be determined by the URL." +msgstr "" + +#. type: Plain text +#: man/eepget.1:67 +msgid "B<-p> proxy_host[:port]" +msgstr "" + +#. type: TP +#: man/eepget.1:67 +#, no-wrap +msgid "" +"Specify an I2P proxy server (eeproxy) to use. If the port is not specified, " +"eepget will use 4444. If this option is not specified, eepget will use " +"127.0.0.1:4444. Specify B<-c> or B<-p> :0 to disable the eeproxy." +msgstr "" + +#. type: Plain text +#: man/eepget.1:73 +msgid "B<-t> seconds" +msgstr "B<-t> 秒" + +#. type: TP +#: man/eepget.1:73 +#, no-wrap +msgid "Sets the inactivity timeout. The default is 60 seconds." +msgstr "" + +#. type: Plain text +#: man/eepget.1:79 +msgid "B<-u> username" +msgstr "B<-u> 用户名" + +#. type: TP +#: man/eepget.1:79 +#, no-wrap +msgid "Sets the username for proxy authorization, if required." +msgstr "" + +#. type: Plain text +#: man/eepget.1:85 +msgid "B<-x> password" +msgstr "B<-x> 密码" + +#. type: TP +#: man/eepget.1:85 +#, no-wrap +msgid "" +"Sets the password for proxy authorization, if required. If a username is " +"specified but not a password, EepGet will prompt for the password." +msgstr "" + +#. type: SH +#: man/eepget.1:89 +#, no-wrap +msgid "EXIT STATUS" +msgstr "退出状态" + +#. type: Plain text +#: man/eepget.1:93 +msgid "" +"B exits with status zero upon successful transfer and non-zero if " +"there were problems with the download." +msgstr "B 退出状态为 0 表示传输成功。如果下载遇到问题,则退出状态非 0。" + +#. type: SH +#: man/eepget.1:94 +#, no-wrap +msgid "SEE ALSO" +msgstr "另见" + +#. type: Plain text +#: man/eepget.1:97 +msgid "curl(1) wget(1)" +msgstr "curl(1) wget(1)" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "i2prouter" +msgstr "i2prouter" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "January 26, 2017" +msgstr "2017年1月26日" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "I2PROUTER" +msgstr "I2PROUTER" + +#. type: Plain text +#: man/i2prouter.1:5 +msgid "i2prouter - start and stop the I2P router" +msgstr "i2prouter - 启动和停止 I2P 路由器" + +#. type: Plain text +#: man/i2prouter.1:9 +msgid "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" +msgstr "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" + +#. type: Plain text +#: man/i2prouter.1:13 +msgid "Control the I2P service." +msgstr "控制 I2P 服务。" + +#. type: IP +#: man/i2prouter.1:15 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:17 +msgid "Runs I2P as a console application under the current user." +msgstr "" + +#. type: IP +#: man/i2prouter.1:19 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:21 +msgid "Starts the I2P service." +msgstr "启动 I2P 服务。" + +#. type: IP +#: man/i2prouter.1:23 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:25 +msgid "Stops the I2P service." +msgstr "停止 I2P 服务。" + +#. type: IP +#: man/i2prouter.1:27 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:29 +msgid "Stops the I2P service and then starts it." +msgstr "" + +#. type: IP +#: man/i2prouter.1:31 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:33 +msgid "Restart the I2P service only if it is already running." +msgstr "" + +#. type: IP +#: man/i2prouter.1:35 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:37 +msgid "Stop I2P gracefully (may take up to 11 minutes)" +msgstr "" + +#. type: IP +#: man/i2prouter.1:39 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:41 +msgid "Install initscript to start I2P automatically when the system boots." +msgstr "" + +#. type: IP +#: man/i2prouter.1:43 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:45 +msgid "Uninstall initscript that was installed with B" +msgstr "" + +#. type: IP +#: man/i2prouter.1:47 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:49 +msgid "Prints whether the I2P service is running." +msgstr "" + +#. type: IP +#: man/i2prouter.1:51 +#, no-wrap +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:52 +msgid "Dumps the current threads into B." +msgstr "" diff --git a/installer/resources/man/es/eepget.1 b/installer/resources/man/es/eepget.1 new file mode 100644 index 000000000..121f61d60 --- /dev/null +++ b/installer/resources/man/es/eepget.1 @@ -0,0 +1,90 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH EEPGET 1 "18 de septiembre, 2015" "" "Eepget \- Gestor de descarga de I2P" + +.SH NOMBRE +Eepget \- Gestor de descarga de I2P + +.SH SINOPSIS +\fBeepget\fP [\fIopciones\fP]\fIURL\fP +.br + +.SH DESCRIPCIÓN +.P +Descarga un fichero de forma no interactiva vía HTTP. Están soportadas las +transferencias tanto a través de I2P como de la Internet regular. +.P +Eepget puede enfrentarse a conexiones de red lentas o inestables; si una +descarga no se completa a causa de un problema de red, seguirá intentándolo +hasta que el fichero se haya descargado del todo (si la opción \-n está +establecida). Si el servidor remoto lo soporta, eepget le dará instrucciones +para que reanude la descarga desde el punto en que se interrumpió. + +.SH OPCIONES +\fB\-c\fP +.TP +Clearnet (red abierta). No utiliza un proxy. Lo mismo que \fB\-p\fP :0 . +.TP + +\fB\-e\fP etag +.TP +Establece el valor de la etag en las cabeceras HTTP de las peticiones. +.TP + +\fB\-h\fP nombre=valor +.TP +Añade una cabecera arbitraria de petición HTTP con el nombre y valor dados. +.TP + +\fB\-l\fP tamañoLínea +.TP +Controla el indicador de progreso. \fB\ tamañoLínea \fP es el tamaño de una línea de progreso en caracteres. El valor predeterminado es 40. +.TP + +\fB\-m\fP volumenMarca +.TP +Controla el indicador de progreso. \fB\ volumenMarca \fP es el número de bytes que cada caracter '#' representa en la línea de progreso. El valor predeterminado es 1024. +.TP + +\fB\-n\fP reintentos +.TP +Especifica el número de veces a reintentar la descarga si no se completa. Si no se especifica esta opción, eepget no efectuará reintentos. +.TP + +\fB\-o\fP fichero +.TP +Establece el fichero de salida al que escribir. Si no se proporciona esta opción, el nombre del fichero de salida se determinará por la URL. +.TP + +\fB\-p\fP servidor_proxy[:puerto] +.TP +Especifica un servidor proxy I2P (eeproxy) a usar. Si no se especifica el puerto, eepget usará 4444. Si no se especifica esta opción, eepget usará 127.0.0.1:4444. Especifique \fB\-c\fP o \fB\-p\fP :0 para deshabilitar el eeproxy. +.TP + +\fB\-t\fP segundos +.TP +Establece el tiempo de espera por inactividad. El valor predeterminado es 60 segundos. +.TP + +\fB\-u\fP nombreUsuario +.TP +Establece el nombre de usuario para la autorización del proxy, si se requiere. +.TP + +\fB\-x\fP contraseña +.TP +Establece la contraseña para la autorización del proxy, si se requiere. Si se especifica un nombre de usuario pero no una contraseña, EepGet solicitará la contraseña. +.TP + +.SH "ESTADO DE LA SALIDA" + +\fBeepget\fP produce una salida con estado cero cuando la transferencia se ha +completado, y no\-cero si hubo problemas con la descarga. + +.SH "VEA TAMBIÉN" + +curl(1) wget(1) + diff --git a/installer/resources/man/es/i2prouter.1 b/installer/resources/man/es/i2prouter.1 new file mode 100644 index 000000000..567dae2be --- /dev/null +++ b/installer/resources/man/es/i2prouter.1 @@ -0,0 +1,48 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH i2prouter 1 "26 de enero, 2017" "" I2PROUTER + +.SH NOMBRE +i2prouter \- inicia y detiene el router I2P + +.SH SINOPSIS +\fBi2prouter\fP +{\fIconsole\fP|\fIstart\fP|\fIstop\fP|\fIgraceful\fP|\fIrestart\fP|\fIcondrestart\fP|\fIstatus\fP|\fIdump\fP|\fIinstall\fP|\fIremove\fP} +.br + +.SH DESCRIPCIÓN +Controla el servicio I2P. + +.IP \fBconsole\fP +Ejecuta I2P como una aplicación de consola bajo el usuario actual. + +.IP \fBstart\fP +Inicia el servicio I2P. + +.IP \fBstop\fP +Detiene el servicio I2P. + +.IP \fBrestart\fP +Detiene el servicio I2P y luego lo inicia. + +.IP \fBcondrestart\fP +Reinicia el servicio I2P sólo si ya está en marcha. + +.IP \fBgraceful\fP +Detiene I2P ordenadamente (puede llevar hasta 11 minutos) + +.IP \fBinstall\fP +Instala initscript para iniciar I2P automáticamente cuando arranque el +sistema. + +.IP \fBremove\fP +Desinstala el initscript que fue instalado con \fBinstall\fP + +.IP \fBstatus\fP +Imprime en pantalla si el servicio I2P está en marcha. + +.IP \fBdump\fP +Vuelca los hilos de proceso actuales en \fBwrapper.log\fP. diff --git a/installer/resources/man/zh/eepget.1 b/installer/resources/man/zh/eepget.1 new file mode 100644 index 000000000..0188372c3 --- /dev/null +++ b/installer/resources/man/zh/eepget.1 @@ -0,0 +1,85 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH EEEPGET 1 2015年9月18日 "" "Eepget \- I2P 下载器" + +.SH 名称 +Eepget \- I2P 下载器 + +.SH 概要 +\fBeepget\fP [\fIoptions\fP]\fIURL\fP +.br + +.SH 描述 +.P +通过 HTTP 非交互式地下载一个文件。支持通过 I2P 和常规互联网传输。 +.P +Eepget 能够处理缓慢或不稳定的网络连接;如果由于网络问题导致下载不成功,它将继续重试,直到检索到整个文件(如果已设定 \-n +选项)。如果远程服务器支持,eepget 将指示服务器从中断点继续。 + +.SH 选项 +\fB\-c\fP +.TP +明网。不使用代理。同 \fB\-p\fP :0 。 +.TP + +\fB\-e\fP etag +.TP +设定请求头中的 etag 值。 +.TP + +\fB\-h\fP 名称=值 +.TP +使用指定的名称和值添加任意请求头。 +.TP + +\fB\-l\fP 行长度 +.TP +控制进度显示。\fB\ lineLen \fP 控制进度行的字符长度。默认为40。 +.TP + +\fB\-m\fP markSize +.TP +Controls the progress display. \fB\ markSize \fP is the number of bytes one '#' character represents. The default is 1024. +.TP + +\fB\-n\fP 次重试 +.TP +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 + +\fB\-o\fP 文件 +.TP +Sets the output file to write to. If this option is not given, the output filename will be determined by the URL. +.TP + +\fB\-p\fP proxy_host[:port] +.TP +Specify an I2P proxy server (eeproxy) to use. If the port is not specified, eepget will use 4444. If this option is not specified, eepget will use 127.0.0.1:4444. Specify \fB\-c\fP or \fB\-p\fP :0 to disable the eeproxy. +.TP + +\fB\-t\fP 秒 +.TP +Sets the inactivity timeout. The default is 60 seconds. +.TP + +\fB\-u\fP 用户名 +.TP +Sets the username for proxy authorization, if required. +.TP + +\fB\-x\fP 密码 +.TP +Sets the password for proxy authorization, if required. If a username is specified but not a password, EepGet will prompt for the password. +.TP + +.SH 退出状态 + +\fBeepget\fP 退出状态为 0 表示传输成功。如果下载遇到问题,则退出状态非 0。 + +.SH 另见 + +curl(1) wget(1) + diff --git a/installer/resources/man/zh/i2prouter.1 b/installer/resources/man/zh/i2prouter.1 new file mode 100644 index 000000000..c9a586c2d --- /dev/null +++ b/installer/resources/man/zh/i2prouter.1 @@ -0,0 +1,47 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH i2prouter 1 2017年1月26日 "" I2PROUTER + +.SH 名称 +i2prouter \- 启动和停止 I2P 路由器 + +.SH 概要 +\fBi2prouter\fP +{\fIconsole\fP|\fIstart\fP|\fIstop\fP|\fIgraceful\fP|\fIrestart\fP|\fIcondrestart\fP|\fIstatus\fP|\fIdump\fP|\fIinstall\fP|\fIremove\fP} +.br + +.SH 描述 +控制 I2P 服务。 + +.IP \fBconsole\fP +Runs I2P as a console application under the current user. + +.IP \fBstart\fP +启动 I2P 服务。 + +.IP \fBstop\fP +停止 I2P 服务。 + +.IP \fBrestart\fP +Stops the I2P service and then starts it. + +.IP \fBcondrestart\fP +Restart the I2P service only if it is already running. + +.IP \fBgraceful\fP +Stop I2P gracefully (may take up to 11 minutes) + +.IP \fBinstall\fP +Install initscript to start I2P automatically when the system boots. + +.IP \fBremove\fP +Uninstall initscript that was installed with \fBinstall\fP + +.IP \fBstatus\fP +Prints whether the I2P service is running. + +.IP \fBdump\fP +Dumps the current threads into \fBwrapper.log\fP. diff --git a/installer/resources/poupdate-man.sh b/installer/resources/poupdate-man.sh new file mode 100755 index 000000000..5d68873f5 --- /dev/null +++ b/installer/resources/poupdate-man.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# can't get po4a to do this +# +for i in eepget i2prouter +do + for j in es zh + do + po4a-translate -f man -m man/$i.1 -p locale-man/man_$j.po -l man/$j/$i.1 -L UTF-8 -M UTF-8 -k 10 -v -d + done +done diff --git a/tests/scripts/checkpo.sh b/tests/scripts/checkpo.sh index 8883d32c1..ccf5af82b 100755 --- a/tests/scripts/checkpo.sh +++ b/tests/scripts/checkpo.sh @@ -21,6 +21,7 @@ DIRS="\ apps/susimail/locale \ apps/desktopgui/locale \ installer/resources/locale/po \ + installer/resources/locale-man \ debian/po" FILES="installer/resources/locale-man/man.pot" From 12cc7b3a3b0279f50897d7e37f5727b3a2dfe71d Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 16:11:14 +0000 Subject: [PATCH 29/50] bump -4 --- history.txt | 13 +++++++++++++ router/java/src/net/i2p/router/RouterVersion.java | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/history.txt b/history.txt index a8280edcc..3d39c3aa3 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,16 @@ +2017-01-26 zzz + * Build: Set up translations for man pages + * Javadoc: Fixes (ticket #1894) + +2017-01-24 zzz + * i2prouter: Add root check to restart and condrestart (ticket #1770) + +2017-01-17 zzz + * Utils: Java 9 yakkety workarounds + +2017-01-12 zzz + * DTG: Don't try to start if headless (ticket #1924) + 2017-01-07 zzz * i2ptunnel: Fix NPE on proxy.i2p/add when no params diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 0725033fa..f6e6df3a5 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 = 4; /** for example "-test" */ public final static String EXTRA = ""; From 1f228a3f8586ee451c8b97093f6dd4f0e83d268a Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 27 Jan 2017 19:15:32 +0000 Subject: [PATCH 30/50] Build: Rename translated man pages to be compatible with dh_installman for debian. Add i2prouter-nowrapper man page. Misc. man page fixups (man man-pages for the standard) No ant targets or deb packaging yet. --- installer/resources/locale-man/man.pot | 91 ++++++++++++++----- installer/resources/man/eepget.1 | 15 ++- .../man/{es/eepget.1 => eepget.es.1} | 0 .../man/{zh/eepget.1 => eepget.zh.1} | 0 installer/resources/man/i2prouter-nowrapper.1 | 31 +++++++ installer/resources/man/i2prouter.1 | 11 ++- .../man/{es/i2prouter.1 => i2prouter.es.1} | 0 .../man/{zh/i2prouter.1 => i2prouter.zh.1} | 0 installer/resources/po4a.config | 8 +- installer/resources/poupdate-man.sh | 4 +- 10 files changed, 126 insertions(+), 34 deletions(-) rename installer/resources/man/{es/eepget.1 => eepget.es.1} (100%) rename installer/resources/man/{zh/eepget.1 => eepget.zh.1} (100%) create mode 100644 installer/resources/man/i2prouter-nowrapper.1 rename installer/resources/man/{es/i2prouter.1 => i2prouter.es.1} (100%) rename installer/resources/man/{zh/i2prouter.1 => i2prouter.zh.1} (100%) diff --git a/installer/resources/locale-man/man.pot b/installer/resources/locale-man/man.pot index 90dcebc8b..20de27678 100644 --- a/installer/resources/locale-man/man.pot +++ b/installer/resources/locale-man/man.pot @@ -20,23 +20,23 @@ msgstr "" #. type: TH #: man/eepget.1:1 #, no-wrap -msgid "EEEPGET" +msgid "EEPGET" msgstr "" #. type: TH -#: man/eepget.1:1 +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 #, no-wrap -msgid "September 18, 2015" +msgid "January 26, 2017" msgstr "" #. type: TH -#: man/eepget.1:1 +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 #, no-wrap -msgid "Eepget - I2P Downloader" +msgid "I2P" msgstr "" #. type: SH -#: man/eepget.1:3 man/i2prouter.1:3 +#: man/eepget.1:3 man/i2prouter.1:3 man/i2prouter-nowrapper.1:3 #, no-wrap msgid "NAME" msgstr "" @@ -47,7 +47,7 @@ msgid "Eepget - I2P downloader" msgstr "" #. type: SH -#: man/eepget.1:6 man/i2prouter.1:6 +#: man/eepget.1:6 man/i2prouter.1:6 man/i2prouter-nowrapper.1:6 #, no-wrap msgid "SYNOPSIS" msgstr "" @@ -58,7 +58,7 @@ msgid "B [I]I" msgstr "" #. type: SH -#: man/eepget.1:11 man/i2prouter.1:11 +#: man/eepget.1:11 man/i2prouter.1:11 man/i2prouter-nowrapper.1:10 #, no-wrap msgid "DESCRIPTION" msgstr "" @@ -234,26 +234,27 @@ msgid "" msgstr "" #. type: SH -#: man/eepget.1:94 +#: man/eepget.1:94 man/i2prouter.1:54 man/i2prouter-nowrapper.1:24 +#, no-wrap +msgid "REPORTING BUGS" +msgstr "" + +#. type: Plain text +#: man/eepget.1:99 man/i2prouter.1:59 man/i2prouter-nowrapper.1:29 +msgid "" +"Please enter a ticket on E<.UR https://trac.i2p2.de/> the I2P trac page " +"E<.UE .>" +msgstr "" + +#. type: SH +#: man/eepget.1:100 man/i2prouter.1:60 man/i2prouter-nowrapper.1:30 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text -#: man/eepget.1:97 -msgid "curl(1) wget(1)" -msgstr "" - -#. type: TH -#: man/i2prouter.1:1 -#, no-wrap -msgid "i2prouter" -msgstr "" - -#. type: TH -#: man/i2prouter.1:1 -#, no-wrap -msgid "January 26, 2017" +#: man/eepget.1:104 +msgid "B(1) B(1) B(1)" msgstr "" #. type: TH @@ -385,6 +386,48 @@ msgid "B" msgstr "" #. type: Plain text -#: man/i2prouter.1:52 +#: man/i2prouter.1:53 msgid "Dumps the current threads into B." msgstr "" + +#. type: Plain text +#: man/i2prouter.1:61 +msgid "B(1)" +msgstr "" + +#. type: TH +#: man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2PROUTER-NOWRAPPER" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:5 +msgid "i2prouter-nowrapper - start the I2P router" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:8 +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:14 +msgid "" +"Start the I2P router, without the service wrapper. This means the router " +"will not restart if it crashes. Also, it will use the default memory size, " +"which may not be enough for I2P." +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:23 +msgid "" +"You should really use the B(1) script instead. There are no " +"options. To stop the router, use your browser to access E<.UR " +"http://localhost:7657/> the router console E<.UE .>" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:31 +msgid "B(1)" +msgstr "" diff --git a/installer/resources/man/eepget.1 b/installer/resources/man/eepget.1 index c24e0fe0c..53178e6b9 100644 --- a/installer/resources/man/eepget.1 +++ b/installer/resources/man/eepget.1 @@ -1,4 +1,4 @@ -.TH EEEPGET 1 "September 18, 2015" "" "Eepget - I2P Downloader" +.TH EEPGET 1 "January 26, 2017" "" "I2P" .SH NAME Eepget \- I2P downloader @@ -86,12 +86,19 @@ Sets the username for proxy authorization, if required. Sets the password for proxy authorization, if required. If a username is specified but not a password, EepGet will prompt for the password. .TP -.SH EXIT STATUS +.SH "EXIT STATUS" .B eepget exits with status zero upon successful transfer and non-zero if there were problems with the download. +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + .SH "SEE ALSO" - -curl(1) wget(1) +.BR i2prouter (1) +.BR curl (1) +.BR wget (1) diff --git a/installer/resources/man/es/eepget.1 b/installer/resources/man/eepget.es.1 similarity index 100% rename from installer/resources/man/es/eepget.1 rename to installer/resources/man/eepget.es.1 diff --git a/installer/resources/man/zh/eepget.1 b/installer/resources/man/eepget.zh.1 similarity index 100% rename from installer/resources/man/zh/eepget.1 rename to installer/resources/man/eepget.zh.1 diff --git a/installer/resources/man/i2prouter-nowrapper.1 b/installer/resources/man/i2prouter-nowrapper.1 new file mode 100644 index 000000000..3d35bcf0b --- /dev/null +++ b/installer/resources/man/i2prouter-nowrapper.1 @@ -0,0 +1,31 @@ +.TH I2PROUTER-NOWRAPPER 1 "January 26, 2017" "" "I2P" + +.SH NAME +i2prouter-nowrapper \- start the I2P router + +.SH SYNOPSIS +.B i2prouter-nowrapper +.br + +.SH DESCRIPTION +Start the I2P router, without the service wrapper. +This means the router will not restart if it crashes. +Also, it will use the default memory size, which may not be enough for I2P. +.P +You should really use the +.BR i2prouter (1) +script instead. +There are no options. +To stop the router, use your browser to access +.UR http://localhost:7657/ +the router console +.UE . + +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + +.SH "SEE ALSO" +.BR i2prouter (1) diff --git a/installer/resources/man/i2prouter.1 b/installer/resources/man/i2prouter.1 index 76743c4d4..1aaed6155 100644 --- a/installer/resources/man/i2prouter.1 +++ b/installer/resources/man/i2prouter.1 @@ -1,4 +1,4 @@ -.TH i2prouter 1 "January 26, 2017" "" "I2PROUTER" +.TH I2PROUTER 1 "January 26, 2017" "" "I2P" .SH NAME i2prouter \- start and stop the I2P router @@ -50,3 +50,12 @@ Prints whether the I2P service is running. .B .IP dump Dumps the current threads into \fBwrapper.log\fP. + +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + +.SH "SEE ALSO" +.BR i2prouter-nowrapper (1) diff --git a/installer/resources/man/es/i2prouter.1 b/installer/resources/man/i2prouter.es.1 similarity index 100% rename from installer/resources/man/es/i2prouter.1 rename to installer/resources/man/i2prouter.es.1 diff --git a/installer/resources/man/zh/i2prouter.1 b/installer/resources/man/i2prouter.zh.1 similarity index 100% rename from installer/resources/man/zh/i2prouter.1 rename to installer/resources/man/i2prouter.zh.1 diff --git a/installer/resources/po4a.config b/installer/resources/po4a.config index 9254a9e35..3216de742 100644 --- a/installer/resources/po4a.config +++ b/installer/resources/po4a.config @@ -1,9 +1,11 @@ # # This is for translating the man pages. # po4a must be installed: sudo apt install po4a -# Usage: po4a -M UTF-8 -L UTF-8 po4a.config +# Usage: po4a -v -d -M UTF-8 -L UTF-8 po4a.config # See 'man po4a' # [po4a_paths] locale-man/man.pot $lang:locale-man/man_$lang.po -[type:man] man/eepget.1 $lang:man/$lang/eepget.1 -[type:man] man/i2prouter.1 $lang:man/$lang/i2prouter.1 +[po4a_langs] es zh +[type:man] man/eepget.1 $lang:man/eepget.$lang.1 +[type:man] man/i2prouter.1 $lang:man/i2prouter.$lang.1 +[type:man] man/i2prouter-nowrapper.1 $lang:man/i2prouter-nowrapper.$lang.1 diff --git a/installer/resources/poupdate-man.sh b/installer/resources/poupdate-man.sh index 5d68873f5..ded02ad3e 100755 --- a/installer/resources/poupdate-man.sh +++ b/installer/resources/poupdate-man.sh @@ -2,10 +2,10 @@ # # can't get po4a to do this # -for i in eepget i2prouter +for i in eepget i2prouter i2prouter-nowrapper do for j in es zh do - po4a-translate -f man -m man/$i.1 -p locale-man/man_$j.po -l man/$j/$i.1 -L UTF-8 -M UTF-8 -k 10 -v -d + po4a-translate -f man -m man/$i.1 -p locale-man/man_$j.po -l man/$i.$j.1 -L UTF-8 -M UTF-8 -k 10 -v -d done done From 5483306d21fb23434c480f695e805b1abd3c5d9b Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 28 Jan 2017 13:57:31 +0000 Subject: [PATCH 31/50] Utils: Detect when running as service on Gentoo --- core/java/src/net/i2p/util/SystemVersion.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/java/src/net/i2p/util/SystemVersion.java b/core/java/src/net/i2p/util/SystemVersion.java index 9bf6f49c3..3438511a4 100644 --- a/core/java/src/net/i2p/util/SystemVersion.java +++ b/core/java/src/net/i2p/util/SystemVersion.java @@ -20,6 +20,7 @@ public abstract class SystemVersion { * @since 0.9.28 */ public static final String DAEMON_USER = "i2psvc"; + public static final String GENTOO_USER = "i2p"; private static final boolean _isWin = System.getProperty("os.name").startsWith("Win"); private static final boolean _isMac = System.getProperty("os.name").startsWith("Mac"); @@ -63,7 +64,8 @@ public abstract class SystemVersion { String runtime = System.getProperty("java.runtime.name"); _isOpenJDK = runtime != null && runtime.contains("OpenJDK"); _isLinuxService = !_isWin && !_isMac && !_isAndroid && - DAEMON_USER.equals(System.getProperty("user.name")); + (DAEMON_USER.equals(System.getProperty("user.name")) || + (_isGentoo && GENTOO_USER.equals(System.getProperty("user.name")))); int sdk = 0; if (_isAndroid) { From 36fd93da0d7449328b5e4cf713f89901fbc1422e Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 28 Jan 2017 14:00:11 +0000 Subject: [PATCH 32/50] Utils: Comment out debug logging in SSLEepGet --- core/java/src/net/i2p/util/SSLEepGet.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/java/src/net/i2p/util/SSLEepGet.java b/core/java/src/net/i2p/util/SSLEepGet.java index 35905dec2..a63236b89 100644 --- a/core/java/src/net/i2p/util/SSLEepGet.java +++ b/core/java/src/net/i2p/util/SSLEepGet.java @@ -271,6 +271,7 @@ public class SSLEepGet extends EepGet { X509TrustManager defaultTrustManager = (X509TrustManager)tmf.getTrustManagers()[0]; _stm = new SavingTrustManager(defaultTrustManager); sslc.init(null, new TrustManager[] {_stm}, null); + /**** if (_log.shouldLog(Log.DEBUG)) { SSLEngine eng = sslc.createSSLEngine(); SSLParameters params = sslc.getDefaultSSLParameters(); @@ -315,6 +316,7 @@ public class SSLEepGet extends EepGet { _log.debug(s[i]); } } + ****/ return sslc; } catch (GeneralSecurityException gse) { _log.error("Key Store update error", gse); From 1cf6030646cf8ba078348245cd4ce373e9b395e6 Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 28 Jan 2017 15:41:48 +0000 Subject: [PATCH 33/50] Utils: Catch Java 9 error in SSLEepGet --- core/java/src/net/i2p/util/SSLEepGet.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/java/src/net/i2p/util/SSLEepGet.java b/core/java/src/net/i2p/util/SSLEepGet.java index a63236b89..4e0ea7d4e 100644 --- a/core/java/src/net/i2p/util/SSLEepGet.java +++ b/core/java/src/net/i2p/util/SSLEepGet.java @@ -320,6 +320,10 @@ public class SSLEepGet extends EepGet { return sslc; } catch (GeneralSecurityException gse) { _log.error("Key Store update error", gse); + } catch (ExceptionInInitializerError eiie) { + // java 9 b134 see ../crypto/CryptoCheck for example + // Catching this may be pointless, fetch still fails + _log.error("SSL context error - Java 9 bug?", eiie); } return null; } From 7cb5dab67f99a9eb8255af45d44ea11fc25ccd62 Mon Sep 17 00:00:00 2001 From: zzz Date: Mon, 30 Jan 2017 00:33:43 +0000 Subject: [PATCH 34/50] i2ptunnel: Add support for outproxy plugin to CONNECT proxy (tickets #1364, #1895) Add support for ports to CONNECT proxy --- .../i2p/i2ptunnel/I2PTunnelConnectClient.java | 98 +++++++++++++++---- .../i2p/i2ptunnel/I2PTunnelHTTPClient.java | 2 - .../i2ptunnel/I2PTunnelHTTPClientBase.java | 2 + .../net/i2p/i2ptunnel/socks/SOCKSServer.java | 4 +- .../net/i2p/i2ptunnel/ui/GeneralHelper.java | 2 +- .../net/i2p/i2ptunnel/ui/TunnelConfig.java | 6 +- .../src/net/i2p/i2ptunnel/web/IndexBean.java | 2 +- 7 files changed, 87 insertions(+), 29 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java index 37c906fbe..de219ff39 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java @@ -14,6 +14,9 @@ import java.util.StringTokenizer; import net.i2p.I2PAppContext; import net.i2p.I2PException; +import net.i2p.app.ClientApp; +import net.i2p.app.ClientAppManager; +import net.i2p.app.Outproxy; import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocketOptions; import net.i2p.data.Base64; @@ -34,7 +37,7 @@ import net.i2p.util.PortMapper; * example.com (sent to one of the configured proxies) * ) * - * (port and protocol are ignored for i2p destinations) + * (protocol is ignored for i2p destinations) * CONNECT host * CONNECT host protocol * CONNECT host:port @@ -147,6 +150,9 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R String targetRequest = null; boolean usingWWWProxy = false; String currentProxy = null; + // local outproxy plugin + boolean usingInternalOutproxy = false; + Outproxy outproxy = null; long requestId = __requestId.incrementAndGet(); try { out = s.getOutputStream(); @@ -154,6 +160,7 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R String line, method = null, host = null, destination = null, restofline = null; StringBuilder newRequest = new StringBuilder(); String authorization = null; + int remotePort = 443; while (true) { // Use this rather than BufferedReader because we can't have readahead, // since we are passing the stream on to I2PTunnelRunner @@ -172,8 +179,20 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R String request = line.substring(pos + 1); pos = request.indexOf(':'); - if (pos == -1) + if (pos == -1) { pos = request.indexOf(' '); + } else { + int spos = request.indexOf(' '); + if (spos > 0) { + try { + remotePort = Integer.parseInt(request.substring(pos + 1, spos)); + } catch (NumberFormatException nfe) { + break; + } catch (IndexOutOfBoundsException ioobe) { + break; + } + } + } if (pos == -1) { host = request; restofline = ""; @@ -185,19 +204,36 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R if (host.toLowerCase(Locale.US).endsWith(".i2p")) { // Destination gets the host name destination = host; - } else if (host.indexOf('.') != -1) { - // The request must be forwarded to a outproxy - currentProxy = selectProxy(); - if (currentProxy == null) { - if (_log.shouldLog(Log.WARN)) - _log.warn(getPrefix(requestId) + "Host wants to be outproxied, but we dont have any!"); - writeErrorMessage(ERR_NO_OUTPROXY, out); - s.close(); - return; + } else if (host.contains(".") || host.startsWith("[")) { + if (Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_USE_OUTPROXY_PLUGIN, "true"))) { + ClientAppManager mgr = _context.clientAppManager(); + if (mgr != null) { + ClientApp op = mgr.getRegisteredApp(Outproxy.NAME); + if (op != null) { + outproxy = (Outproxy) op; + usingInternalOutproxy = true; + if (host.startsWith("[")) { + host = host.substring(1); + if (host.endsWith("]")) + host = host.substring(0, host.length() - 1); + } + } + } } - destination = currentProxy; - usingWWWProxy = true; - newRequest.append("CONNECT ").append(host).append(restofline).append("\r\n"); // HTTP spec + if (!usingInternalOutproxy) { + // The request must be forwarded to a outproxy + currentProxy = selectProxy(); + if (currentProxy == null) { + if (_log.shouldLog(Log.WARN)) + _log.warn(getPrefix(requestId) + "Host wants to be outproxied, but we dont have any!"); + writeErrorMessage(ERR_NO_OUTPROXY, out); + s.close(); + return; + } + destination = currentProxy; + usingWWWProxy = true; + newRequest.append("CONNECT ").append(host).append(restofline).append("\r\n"); // HTTP spec + } } else if (host.toLowerCase(Locale.US).equals("localhost")) { writeErrorMessage(ERR_LOCALHOST, out); s.close(); @@ -208,10 +244,12 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R targetRequest = host; if (_log.shouldLog(Log.DEBUG)) { - _log.debug(getPrefix(requestId) + "METHOD:" + method + ":"); - _log.debug(getPrefix(requestId) + "HOST :" + host + ":"); - _log.debug(getPrefix(requestId) + "REST :" + restofline + ":"); - _log.debug(getPrefix(requestId) + "DEST :" + destination + ":"); + _log.debug(getPrefix(requestId) + "METHOD:" + method + ":\n" + + "HOST :" + host + ":\n" + + "PORT :" + remotePort + ":\n" + + "REST :" + restofline + ":\n" + + "DEST :" + destination + ":\n" + + "www proxy? " + usingWWWProxy + " internal proxy? " + usingInternalOutproxy); } } else if (line.toLowerCase(Locale.US).startsWith("proxy-authorization: ")) { // strip Proxy-Authenticate from the response in HTTPResponseOutputStream @@ -250,7 +288,24 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R } } - if (destination == null || method == null || !"CONNECT".equals(method.toUpperCase(Locale.US))) { + if (method == null || !"CONNECT".equals(method.toUpperCase(Locale.US))) { + writeErrorMessage(ERR_BAD_PROTOCOL, out); + s.close(); + return; + } + + // no destination, going to outproxy plugin + if (usingInternalOutproxy) { + Socket outSocket = outproxy.connect(host, remotePort); + OnTimeout onTimeout = new OnTimeout(s, s.getOutputStream(), targetRequest, usingWWWProxy, currentProxy, requestId); + byte[] response = SUCCESS_RESPONSE.getBytes("UTF-8"); + Thread t = new I2PTunnelOutproxyRunner(s, outSocket, sockLock, null, response, onTimeout); + // we are called from an unlimited thread pool, so run inline + t.run(); + return; + } + + if (destination == null) { writeErrorMessage(ERR_BAD_PROTOCOL, out); s.close(); return; @@ -282,7 +337,10 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R return; } - I2PSocket i2ps = createI2PSocket(clientDest, getDefaultOptions()); + I2PSocketOptions sktOpts = getDefaultOptions(); + if (!usingWWWProxy && remotePort > 0) + sktOpts.setPort(remotePort); + I2PSocket i2ps = createI2PSocket(clientDest, sktOpts); byte[] data = null; byte[] response = null; if (usingWWWProxy) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index 6e40b9a57..4fe25039f 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -357,8 +357,6 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn public static final String PROP_JUMP_SERVERS = "i2ptunnel.httpclient.jumpServers"; public static final String PROP_DISABLE_HELPER = "i2ptunnel.httpclient.disableAddressHelper"; /** @since 0.9.11 */ - public static final String PROP_USE_OUTPROXY_PLUGIN = "i2ptunnel.useLocalOutproxy"; - /** @since 0.9.11 */ public static final String PROP_SSL_OUTPROXIES = "i2ptunnel.httpclient.SSLOutproxies"; /** @since 0.9.14 */ public static final String PROP_ACCEPT = "i2ptunnel.httpclient.sendAccept"; diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java index 354f5e816..399269c5a 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java @@ -59,6 +59,8 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem private static final int NONCE_BYTES = DataHelper.DATE_LENGTH + MD5_BYTES; private static final long MAX_NONCE_AGE = 60*60*1000L; private static final int MAX_NONCE_COUNT = 1024; + /** @since 0.9.11, moved to Base in 0.9.29 */ + public static final String PROP_USE_OUTPROXY_PLUGIN = "i2ptunnel.useLocalOutproxy"; private static final String ERR_AUTH1 = "HTTP/1.1 407 Proxy Authentication Required\r\n" + diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSServer.java index b269b6798..34f79567f 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/socks/SOCKSServer.java @@ -14,7 +14,7 @@ import net.i2p.app.ClientApp; import net.i2p.app.ClientAppManager; import net.i2p.app.Outproxy; import net.i2p.client.streaming.I2PSocket; -import net.i2p.i2ptunnel.I2PTunnelHTTPClient; +import net.i2p.i2ptunnel.I2PTunnelHTTPClientBase; import net.i2p.util.Log; /** @@ -89,7 +89,7 @@ abstract class SOCKSServer { * @since 0.9.27 */ private boolean shouldUseOutproxyPlugin() { - return Boolean.parseBoolean(props.getProperty(I2PTunnelHTTPClient.PROP_USE_OUTPROXY_PLUGIN, "true")); + return Boolean.parseBoolean(props.getProperty(I2PTunnelHTTPClientBase.PROP_USE_OUTPROXY_PLUGIN, "true")); } /** 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 556982a43..26f4265e0 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java @@ -579,7 +579,7 @@ public class GeneralHelper { * Default true */ public boolean getUseOutproxyPlugin(int tunnel) { - return getBooleanProperty(tunnel, I2PTunnelHTTPClient.PROP_USE_OUTPROXY_PLUGIN, true); + return getBooleanProperty(tunnel, I2PTunnelHTTPClientBase.PROP_USE_OUTPROXY_PLUGIN, true); } /** all of these are @since 0.8.3 */ diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java index 0a007e378..6dd91cce3 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java @@ -409,9 +409,9 @@ public class TunnelConfig { public void setUseOutproxyPlugin(boolean val) { if (val) - _booleanOptions.add(I2PTunnelHTTPClient.PROP_USE_OUTPROXY_PLUGIN); + _booleanOptions.add(I2PTunnelHTTPClientBase.PROP_USE_OUTPROXY_PLUGIN); else - _booleanOptions.remove(I2PTunnelHTTPClient.PROP_USE_OUTPROXY_PLUGIN); + _booleanOptions.remove(I2PTunnelHTTPClientBase.PROP_USE_OUTPROXY_PLUGIN); } /** @@ -695,7 +695,7 @@ public class TunnelConfig { }; private static final String _booleanProxyOpts[] = { I2PTunnelHTTPClientBase.PROP_OUTPROXY_AUTH, - I2PTunnelHTTPClient.PROP_USE_OUTPROXY_PLUGIN, + I2PTunnelHTTPClientBase.PROP_USE_OUTPROXY_PLUGIN, I2PTunnelHTTPClient.PROP_USER_AGENT, I2PTunnelHTTPClient.PROP_REFERER, I2PTunnelHTTPClient.PROP_ACCEPT, 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 15897cb61..fe1c30b17 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java @@ -499,7 +499,7 @@ public class IndexBean { if (tun != null) { if (TunnelController.TYPE_HTTP_CLIENT.equals(tun.getType())) { Properties opts = tun.getClientOptionProps(); - if (Boolean.parseBoolean(opts.getProperty(I2PTunnelHTTPClient.PROP_USE_OUTPROXY_PLUGIN, "true"))) { + if (Boolean.parseBoolean(opts.getProperty(I2PTunnelHTTPClientBase.PROP_USE_OUTPROXY_PLUGIN, "true"))) { ClientAppManager mgr = _context.clientAppManager(); if (mgr != null) return mgr.getRegisteredApp(Outproxy.NAME) != null; From 890ad257e1ef0a7d68718a0e32ff868f2a8d0649 Mon Sep 17 00:00:00 2001 From: zzz Date: Mon, 30 Jan 2017 22:05:43 +0000 Subject: [PATCH 35/50] Router: Run shutdown tasks in parallel, increase max time for shutdown tasks (ticket #1893) i2psnark: Remove most delay between announces at shutdown --- .../src/org/klomp/snark/SnarkManager.java | 15 ++++++-- router/java/src/net/i2p/router/Router.java | 35 +++++++++++++++---- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java index fde46724b..78dbdf30b 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java +++ b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java @@ -42,6 +42,7 @@ import net.i2p.util.SecureDirectory; import net.i2p.util.SecureFileOutputStream; import net.i2p.util.SimpleTimer; import net.i2p.util.SimpleTimer2; +import net.i2p.util.SystemVersion; import net.i2p.util.Translate; import org.klomp.snark.dht.DHT; @@ -302,6 +303,8 @@ public class SnarkManager implements CompleteListener { * Runs inline. */ public void stop() { + if (_log.shouldWarn()) + _log.warn("Snark stop() begin", new Exception("I did it")); if (_umgr != null && _uhandler != null) { //_uhandler.shutdown(); _umgr.unregister(_uhandler, UpdateType.ROUTER_SIGNED, UpdateMethod.TORRENT); @@ -312,6 +315,8 @@ public class SnarkManager implements CompleteListener { _connectionAcceptor.halt(); _idleChecker.cancel(); stopAllTorrents(true); + if (_log.shouldWarn()) + _log.warn("Snark stop() end"); } /** @since 0.9.1 */ @@ -2580,7 +2585,9 @@ public class SnarkManager implements CompleteListener { stopTorrent(snark, false); // Throttle since every unannounce is now threaded. // How to do this without creating a ton of threads? - try { Thread.sleep(20); } catch (InterruptedException ie) {} + if (count % 8 == 0) { + try { Thread.sleep(20); } catch (InterruptedException ie) {} + } } } if (_util.connected()) { @@ -2593,8 +2600,12 @@ public class SnarkManager implements CompleteListener { _context.simpleTimer2().addEvent(new Disconnector(), 60*1000); addMessage(_t("Closing I2P tunnel after notifying trackers.")); if (finalShutdown) { - try { Thread.sleep(5*1000); } catch (InterruptedException ie) {} + long toWait = 5*1000; + if (SystemVersion.isARM()) + toWait *= 2; + try { Thread.sleep(toWait); } catch (InterruptedException ie) {} } + _util.disconnect(); } else { _util.disconnect(); _stopping = false; diff --git a/router/java/src/net/i2p/router/Router.java b/router/java/src/net/i2p/router/Router.java index bdc107ff6..a45ab6d9d 100644 --- a/router/java/src/net/i2p/router/Router.java +++ b/router/java/src/net/i2p/router/Router.java @@ -13,6 +13,7 @@ import java.io.IOException; import java.security.GeneralSecurityException; import java.util.Collection; import java.util.Collections; +import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Properties; @@ -121,6 +122,8 @@ public class Router implements RouterClock.ClockShiftListener { private static final String PROP_JBIGI = "jbigi.loadedResource"; public static final String UPDATE_FILE = "i2pupdate.zip"; + private static final int SHUTDOWN_WAIT_SECS = 60; + private static final String originalTimeZoneID; static { // @@ -955,8 +958,6 @@ public class Router implements RouterClock.ClockShiftListener { int bwLim = Math.min(_context.bandwidthLimiter().getInboundKBytesPerSecond(), _context.bandwidthLimiter().getOutboundKBytesPerSecond()); bwLim = (int)(bwLim * getSharePercentage()); - if (_log.shouldLog(Log.INFO)) - _log.info("Adding capabilities w/ bw limit @ " + bwLim, new Exception("caps")); String force = _context.getProperty(PROP_FORCE_BWCLASS); if (force != null && force.length() > 0) { @@ -1210,6 +1211,7 @@ public class Router implements RouterClock.ClockShiftListener { I2PThread.removeOOMEventListener(_oomListener); // Run the shutdown hooks first in case they want to send some goodbye messages // Maybe we need a delay after this too? + LinkedList tasks = new LinkedList(); for (Runnable task : _context.getShutdownTasks()) { //System.err.println("Running shutdown task " + task.getClass()); if (_log.shouldLog(Log.WARN)) @@ -1219,15 +1221,34 @@ public class Router implements RouterClock.ClockShiftListener { Thread t = new I2PAppThread(task, "Shutdown task " + task.getClass().getName()); t.setDaemon(true); t.start(); - try { - t.join(10*1000); - } catch (InterruptedException ie) {} - if (t.isAlive()) - _log.logAlways(Log.WARN, "Shutdown task took more than 10 seconds to run: " + task.getClass()); + tasks.add(t); } catch (Throwable t) { _log.log(Log.CRIT, "Error running shutdown task", t); } } + long waitSecs = SHUTDOWN_WAIT_SECS; + if (SystemVersion.isARM()) + waitSecs *= 2; + final long maxWait = System.currentTimeMillis() + (waitSecs *1000); + Thread th; + while ((th = tasks.poll()) != null) { + long toWait = maxWait - System.currentTimeMillis(); + if (toWait <= 0) { + _log.logAlways(Log.WARN, "Shutdown tasks took more than " + waitSecs + " seconds to run"); + tasks.clear(); + break; + } + try { + th.join(toWait); + } catch (InterruptedException ie) {} + if (th.isAlive()) { + _log.logAlways(Log.WARN, "Shutdown task took more than " + waitSecs + " seconds to run: " + th.getName()); + tasks.clear(); + break; + } else if (_log.shouldInfo()) { + _log.info("Shutdown task complete: " + th.getName()); + } + } // Set the last version to the current version, since 0.8.13 if (!RouterVersion.VERSION.equals(_config.get("router.previousVersion"))) { From 82d812c25c966fc4efc81129abe2b3e30b55289c Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 4 Feb 2017 15:38:49 +0000 Subject: [PATCH 36/50] NTP: Enable IPv6 support (ticket #1896) --- core/java/src/net/i2p/util/Addresses.java | 16 ++++++++++++++- history.txt | 20 +++++++++++++++++-- .../src/net/i2p/router/RouterVersion.java | 2 +- .../i2p/router/time/RouterTimestamper.java | 14 ++++++++----- 4 files changed, 43 insertions(+), 9 deletions(-) diff --git a/core/java/src/net/i2p/util/Addresses.java b/core/java/src/net/i2p/util/Addresses.java index 853d02380..077ee353b 100644 --- a/core/java/src/net/i2p/util/Addresses.java +++ b/core/java/src/net/i2p/util/Addresses.java @@ -58,6 +58,19 @@ public abstract class Addresses { return !getAddresses(true, false, false).isEmpty(); } + /** + * Do we have any non-loop, non-wildcard IPv6 address at all? + * @since 0.9.29 + */ + public static boolean isConnectedIPv6() { + // not as good as using a Java DBus implementation to talk to NetworkManager... + for (String ip : getAddresses(false, true)) { + if (ip.contains(":")) + return true; + } + return false; + } + /** @return the first non-local address IPv4 address it finds, or null */ public static String getAnyAddress() { SortedSet a = getAddresses(); @@ -599,6 +612,7 @@ public abstract class Addresses { } catch (UnknownHostException uhe) {} System.out.println(buf.toString()); } - System.out.println("\nIs connected? " + isConnected()); + System.out.println("\nIs connected? " + isConnected() + + "\nHas IPv6? " + isConnectedIPv6()); } } diff --git a/history.txt b/history.txt index 3d39c3aa3..fcb36a48e 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,19 @@ +2017-02-04 zzz + * NTP: Enable IPv6 support (ticket #1896) + +2017-01-30 zzz + * Router: Run shutdown tasks in parallel, + increase max time for shutdown tasks (ticket #1893) + i2psnark: Remove most delay between announces at shutdown + +2017-01-29 zzz + * i2ptunnel CONNECT proxy: + - Add support for outproxy plugin (tickets #1364, #1895) + - Add support for ports + +2017-01-28 zzz + * Utils: Detect when running as service on Gentoo + 2017-01-26 zzz * Build: Set up translations for man pages * Javadoc: Fixes (ticket #1894) @@ -41,8 +57,8 @@ * NTP: - Verify source address and port - Add to command line - - Add KoD support (ticket #1896) - - Add initial IPv6 support (ticket #1897) + - Add KoD support (ticket #1897) + - Add initial IPv6 support (ticket #1896) 2016-12-20 zzz * Build: Fix installer compile failure diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index f6e6df3a5..4e28a2c8d 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 = 4; + public final static long BUILD = 5; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/time/RouterTimestamper.java b/router/java/src/net/i2p/router/time/RouterTimestamper.java index 975075411..f9ee024d4 100644 --- a/router/java/src/net/i2p/router/time/RouterTimestamper.java +++ b/router/java/src/net/i2p/router/time/RouterTimestamper.java @@ -8,6 +8,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import net.i2p.I2PAppContext; import net.i2p.time.Timestamper; +import net.i2p.util.Addresses; import net.i2p.util.I2PThread; import net.i2p.util.Log; @@ -173,6 +174,7 @@ public class RouterTimestamper extends Timestamper { while (_isRunning) { // NOTE: _log is null the first time through, to prevent problems and stack overflows updateConfig(); + boolean preferIPv6 = Addresses.isConnectedIPv6(); if (!_disabled) { // first the servers for our country and continent, we know what country we're in... if (_priorityServers != null) { @@ -180,7 +182,7 @@ public class RouterTimestamper extends Timestamper { if (_log != null && _log.shouldDebug()) _log.debug("Querying servers " + servers); try { - lastFailed = !queryTime(servers.toArray(new String[servers.size()]), SHORT_TIMEOUT); + lastFailed = !queryTime(servers.toArray(new String[servers.size()]), SHORT_TIMEOUT, preferIPv6); } catch (IllegalArgumentException iae) { if (!lastFailed && _log != null && _log.shouldWarn()) _log.warn("Unable to reach any regional NTP servers: " + servers); @@ -195,7 +197,10 @@ public class RouterTimestamper extends Timestamper { if (_log != null && _log.shouldDebug()) _log.debug("Querying servers " + _servers); try { - lastFailed = !queryTime(_servers.toArray(new String[_servers.size()]), DEFAULT_TIMEOUT); + // If we failed, maybe it's because IPv6 is blocked, so try IPv4 only + // also first time through, and randomly + boolean prefIPv6 = preferIPv6 && !lastFailed && _log != null && _context.random().nextInt(4) != 0; + lastFailed = !queryTime(_servers.toArray(new String[_servers.size()]), DEFAULT_TIMEOUT, prefIPv6); } catch (IllegalArgumentException iae) { lastFailed = true; } @@ -262,7 +267,7 @@ public class RouterTimestamper extends Timestamper { /** * True if the time was queried successfully, false if it couldn't be */ - private boolean queryTime(String serverList[], int perServerTimeout) throws IllegalArgumentException { + private boolean queryTime(String serverList[], int perServerTimeout, boolean preferIPv6) throws IllegalArgumentException { long found[] = new long[_concurringServers]; long now = -1; int stratum = -1; @@ -273,8 +278,7 @@ public class RouterTimestamper extends Timestamper { // // this delays startup when net is disconnected or the timeserver list is bad, don't make it too long // try { Thread.sleep(2*1000); } catch (InterruptedException ie) {} //} - // IPv6 arg TODO - long[] timeAndStratum = NtpClient.currentTimeAndStratum(serverList, perServerTimeout, false, _log); + long[] timeAndStratum = NtpClient.currentTimeAndStratum(serverList, perServerTimeout, preferIPv6, _log); now = timeAndStratum[0]; stratum = (int) timeAndStratum[1]; long delta = now - _context.clock().now(); From 6306799a4bedc6035c86d5c67ff85e964b2da54c Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 4 Feb 2017 19:46:04 +0000 Subject: [PATCH 37/50] single-char indexof() --- .../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index 4fe25039f..754dbee76 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -432,8 +432,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn // Deprecated // /eepproxy/foo.i2p/bar/baz.html String subRequest = request.substring("/eepproxy/".length()); - if(subRequest.indexOf("/") == -1) { - subRequest += "/"; + if(subRequest.indexOf('/') == -1) { + subRequest += '/'; } request = "http://" + subRequest; /**** @@ -537,10 +537,10 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn } else if(hostLowerCase.equals("i2p")) { // pull the b64 _dest out of the first path element String oldPath = requestURI.getPath().substring(1); - int slash = oldPath.indexOf("/"); + int slash = oldPath.indexOf('/'); if(slash < 0) { slash = oldPath.length(); - oldPath += "/"; + oldPath += '/'; } String _dest = oldPath.substring(0, slash); if(slash >= 516 && !_dest.contains(".")) { From da893452ea8c1be7bde450e864c3ee2d04e84222 Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 4 Feb 2017 21:18:00 +0000 Subject: [PATCH 38/50] HTTP proxies: Pass through relative referer URIs, convert same-origin absolute referer URIs to relative (ticket #1862) --- .../i2p/i2ptunnel/I2PTunnelHTTPClient.java | 35 ++++++++++++++---- .../i2p/i2ptunnel/I2PTunnelHTTPServer.java | 36 ++++++++++++------- 2 files changed, 52 insertions(+), 19 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index 754dbee76..6a7c0cf4a 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -400,6 +400,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn String authorization = null; int remotePort = 0; String referer = null; + URI origRequestURI = null; while((line = reader.readLine(method)) != null) { line = line.trim(); if(_log.shouldLog(Log.DEBUG)) { @@ -476,7 +477,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn // to be the outgoing URI (with http:// if going to outproxy, otherwise without) URI requestURI; try { - requestURI = new URI(request); + origRequestURI = requestURI = new URI(request); if(requestURI.getRawUserInfo() != null || requestURI.getRawFragment() != null) { // these should never be sent to the proxy in the request line if(_log.shouldLog(Log.WARN)) { @@ -937,11 +938,33 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn // save for address helper form below referer = line.substring(9); if (!Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_REFERER))) { - // Shouldn't we be more specific, like accepting in-site referers ? - //line = "Referer: i2p"; - line = null; - continue; // completely strip the line - } + try { + // Either strip or rewrite the referer line + URI refererURI = new URI(referer); + String refererHost = refererURI.getHost(); + if (refererHost != null) { + String origHost = origRequestURI.getHost(); + if (!refererHost.equals(origHost) || + refererURI.getPort() != origRequestURI.getPort() || + !DataHelper.eq(refererURI.getScheme(), origRequestURI.getScheme())) { + line = null; + continue; // completely strip the line if everything doesn't match + } + // Strip to a relative URI, to hide the original host name + StringBuilder buf = new StringBuilder(); + buf.append("Referer: "); + String refererPath = refererURI.getRawPath(); + buf.append(refererPath != null ? refererPath : "/"); + String refererQuery = refererURI.getRawQuery(); + if (refererQuery != null) + buf.append('?').append(refererQuery); + line = buf.toString(); + } // else relative URI, leave in + } catch (URISyntaxException use) { + line = null; + continue; // completely strip the line + } + } // else allow } else if(lowercaseLine.startsWith("via: ") && !Boolean.parseBoolean(getTunnel().getClientOptions().getProperty(PROP_VIA))) { //line = "Via: i2p"; diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java index 693624ae4..49b7360d0 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java @@ -387,19 +387,29 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { return; } - if (Boolean.parseBoolean(opts.getProperty(OPT_REJECT_REFERER)) && - headers.containsKey("Referer")) { - if (_log.shouldLog(Log.WARN)) - _log.warn("Refusing access from: " + - Base32.encode(peerHash.getData()) + ".b32.i2p" + - " with Referer: " + headers.get("Referer").get(0)); - try { - socket.getOutputStream().write(ERR_INPROXY.getBytes("UTF-8")); - } catch (IOException ioe) {} - try { - socket.close(); - } catch (IOException ioe) {} - return; + if (Boolean.parseBoolean(opts.getProperty(OPT_REJECT_REFERER))) { + // reject absolute URIs only + List h = headers.get("Referer"); + if (h != null) { + String referer = h.get(0); + if (referer.length() > 9) { + // "Referer: " + referer = referer.substring(9); + if (referer.startsWith("http://") || referer.startsWith("https://")) { + if (_log.shouldLog(Log.WARN)) + _log.warn("Refusing access from: " + + Base32.encode(peerHash.getData()) + ".b32.i2p" + + " with Referer: " + referer); + try { + socket.getOutputStream().write(ERR_INPROXY.getBytes("UTF-8")); + } catch (IOException ioe) {} + try { + socket.close(); + } catch (IOException ioe) {} + return; + } + } + } } if (Boolean.parseBoolean(opts.getProperty(OPT_REJECT_USER_AGENTS)) && From 50d735b1264d6e64984936d3a969a52e06ee3559 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 13:03:55 +0000 Subject: [PATCH 39/50] new reseed --- router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java | 1 + 1 file changed, 1 insertion(+) 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 c4a43fb11..cc25b396c 100644 --- a/router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java +++ b/router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java @@ -108,6 +108,7 @@ public class Reseeder { // // https url:port, ending with "/" // certificates/reseed/ // certificates/ssl/ // notes // ---------------------------------- ------------------------ ------------------------- --------------- + "https://itoopie.atomike.ninja/" + ',' + // atomike_at_mail.i2p.crt // CA // Java 8+ only "https://reseed.onion.im/" + ',' + // lazygravy_at_mail.i2p // reseed.onion.im.crt // Java 8+ only "https://reseed.memcpy.io/" + ',' + // hottuna_at_mail.i2p.crt // CA // SNI required "https://reseed.atomike.ninja/" + "," + // atomike_at_mail.i2p.crt // CA // SNI required, Java 8+ only From 83c786a5fd31eebfb2125d5d809f01189ef7f795 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 14:16:33 +0000 Subject: [PATCH 40/50] more man page translations --- .tx/config | 4 + debian/i2p-router.manpages | 5 + debian/i2p.manpages | 11 + installer/resources/locale-man/man_de.po | 476 ++++++++++++++++++ installer/resources/locale-man/man_es.po | 106 +++- installer/resources/locale-man/man_fr.po | 465 +++++++++++++++++ installer/resources/locale-man/man_it.po | 435 ++++++++++++++++ installer/resources/locale-man/man_zh.po | 99 ++-- installer/resources/man/eepget.de.1 | 97 ++++ installer/resources/man/eepget.es.1 | 12 +- installer/resources/man/eepget.fr.1 | 96 ++++ installer/resources/man/eepget.it.1 | 95 ++++ installer/resources/man/eepget.zh.1 | 11 +- .../resources/man/i2prouter-nowrapper.de.1 | 36 ++ .../resources/man/i2prouter-nowrapper.es.1 | 35 ++ .../resources/man/i2prouter-nowrapper.fr.1 | 34 ++ .../resources/man/i2prouter-nowrapper.it.1 | 33 ++ .../resources/man/i2prouter-nowrapper.zh.1 | 33 ++ installer/resources/man/i2prouter.de.1 | 59 +++ installer/resources/man/i2prouter.es.1 | 12 +- installer/resources/man/i2prouter.fr.1 | 58 +++ installer/resources/man/i2prouter.it.1 | 56 +++ installer/resources/man/i2prouter.zh.1 | 11 +- installer/resources/poupdate-man.sh | 17 +- 24 files changed, 2232 insertions(+), 64 deletions(-) create mode 100644 installer/resources/locale-man/man_de.po create mode 100644 installer/resources/locale-man/man_fr.po create mode 100644 installer/resources/locale-man/man_it.po create mode 100644 installer/resources/man/eepget.de.1 create mode 100644 installer/resources/man/eepget.fr.1 create mode 100644 installer/resources/man/eepget.it.1 create mode 100644 installer/resources/man/i2prouter-nowrapper.de.1 create mode 100644 installer/resources/man/i2prouter-nowrapper.es.1 create mode 100644 installer/resources/man/i2prouter-nowrapper.fr.1 create mode 100644 installer/resources/man/i2prouter-nowrapper.it.1 create mode 100644 installer/resources/man/i2prouter-nowrapper.zh.1 create mode 100644 installer/resources/man/i2prouter.de.1 create mode 100644 installer/resources/man/i2prouter.fr.1 create mode 100644 installer/resources/man/i2prouter.it.1 diff --git a/.tx/config b/.tx/config index e6b397c0f..dacb2b2bf 100644 --- a/.tx/config +++ b/.tx/config @@ -396,7 +396,11 @@ trans.zh_CN = apps/ministreaming/locale/messages_zh.po type = PO source_file = installer/resources/locale-man/man.pot source_lang = en +; after adding languages here, add to debian/*.manpages also +trans.de = installer/resources/locale-man/man_de.po trans.es = installer/resources/locale-man/man_es.po +trans.fr = installer/resources/locale-man/man_fr.po +trans.it = installer/resources/locale-man/man_it.po trans.zh_CN = installer/resources/locale-man/man_zh.po [main] diff --git a/debian/i2p-router.manpages b/debian/i2p-router.manpages index bae35bfd8..52da42a1d 100644 --- a/debian/i2p-router.manpages +++ b/debian/i2p-router.manpages @@ -1 +1,6 @@ installer/resources/man/eepget.1 +installer/resources/man/eepget.de.1 +installer/resources/man/eepget.es.1 +installer/resources/man/eepget.fr.1 +installer/resources/man/eepget.it.1 +installer/resources/man/eepget.zh.1 diff --git a/debian/i2p.manpages b/debian/i2p.manpages index 923744b89..26fead57e 100644 --- a/debian/i2p.manpages +++ b/debian/i2p.manpages @@ -1 +1,12 @@ installer/resources/man/i2prouter.1 +installer/resources/man/i2prouter.de.1 +installer/resources/man/i2prouter.es.1 +installer/resources/man/i2prouter.fr.1 +installer/resources/man/i2prouter.it.1 +installer/resources/man/i2prouter.zh.1 +installer/resources/man/i2prouter-nowrapper.1 +installer/resources/man/i2prouter-nowrapper.de.1 +installer/resources/man/i2prouter-nowrapper.es.1 +installer/resources/man/i2prouter-nowrapper.fr.1 +installer/resources/man/i2prouter-nowrapper.it.1 +installer/resources/man/i2prouter-nowrapper.zh.1 diff --git a/installer/resources/locale-man/man_de.po b/installer/resources/locale-man/man_de.po new file mode 100644 index 000000000..fd3937a7f --- /dev/null +++ b/installer/resources/locale-man/man_de.po @@ -0,0 +1,476 @@ +# I2P +# Copyright (C) 2017 The I2P Project +# This file is distributed under the same license as the routerconsole package. +# To contribute translations, see https://www.transifex.com/otf/I2P/dashboard/ +# zzz , 2017. +# +# Translators: +# Ettore Atalan , 2017 +# Lars Schimmer , 2017 +# zzzi2p , 2017 +msgid "" +msgstr "" +"Project-Id-Version: I2P man pages\n" +"POT-Creation-Date: 2017-01-26 15:24+0000\n" +"PO-Revision-Date: 2017-01-26 15:24+0000\n" +"Last-Translator: zzzi2p , 2017\n" +"Language-Team: German (https://www.transifex.com/otf/teams/12694/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "EEPGET" +msgstr "EEPGET" + +#. type: TH +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "January 26, 2017" +msgstr "26. Januar 2017" + +#. type: TH +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2P" +msgstr "I2P" + +#. type: SH +#: man/eepget.1:3 man/i2prouter.1:3 man/i2prouter-nowrapper.1:3 +#, no-wrap +msgid "NAME" +msgstr "NAME" + +#. type: Plain text +#: man/eepget.1:5 +msgid "Eepget - I2P downloader" +msgstr "Eepget - I2P Downloader" + +#. type: SH +#: man/eepget.1:6 man/i2prouter.1:6 man/i2prouter-nowrapper.1:6 +#, no-wrap +msgid "SYNOPSIS" +msgstr "SYNOPSIS" + +#. type: Plain text +#: man/eepget.1:9 +msgid "B [I]I" +msgstr "B [I]I" + +#. type: SH +#: man/eepget.1:11 man/i2prouter.1:11 man/i2prouter-nowrapper.1:10 +#, no-wrap +msgid "DESCRIPTION" +msgstr "BESCHREIBUNG" + +#. type: Plain text +#: man/eepget.1:15 +msgid "" +"Download a file non-interactively via HTTP. Transfers through both I2P and " +"the regular Internet are supported." +msgstr "" +"Downloaded eine Datei nicht interaktiv via HTTP Protokoll. Transfers im I2P " +"und im normalen Netz sind möglich." + +#. type: Plain text +#: man/eepget.1:21 +msgid "" +"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 (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." +msgstr "" +"Eepget kommt mit langsamen oder instabilen Netzwerkverbindungen zurecht; " +"falls der Download aus Netzwerkgründen abbricht, versucht eepget es " +"nocheinmal, bis die Datei komplett geholt wurde (falls die -n Option gesetzt" +" wurde). Falls der Server es zulässt, wird eepget dem Server anweisen, an " +"der Stelle des Abbruchs fortzusetzen." + +#. type: SH +#: man/eepget.1:22 +#, no-wrap +msgid "OPTIONS" +msgstr "OPTIONEN" + +#. type: Plain text +#: man/eepget.1:25 +msgid "B<-c>" +msgstr "B<-c>" + +#. type: TP +#: man/eepget.1:25 +#, no-wrap +msgid "Clearnet. Do not use a proxy. Same as B<-p> :0 ." +msgstr "Internet. Nicht als Proxy benutzen. Gleich wie B<-p> :0 ." + +#. type: Plain text +#: man/eepget.1:31 +msgid "B<-e> etag" +msgstr "B<-e> etag" + +#. type: TP +#: man/eepget.1:31 +#, no-wrap +msgid "Sets the etag value in the request headers." +msgstr "Legt den etag-Wert in den Anforderungskopfdaten fest." + +#. type: Plain text +#: man/eepget.1:37 +msgid "B<-h> name=value" +msgstr "B<-h> Name=Wert" + +#. type: TP +#: man/eepget.1:37 +#, no-wrap +msgid "Adds an arbitrary request header with the given name and value." +msgstr "Fügt eine freie Request Kopfzeile mit gegebenen Namen und Wert hinzu" + +#. type: Plain text +#: man/eepget.1:43 +msgid "B<-l> lineLen" +msgstr "B<-l> Zeilenlänge" + +#. type: TP +#: man/eepget.1:43 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ lineLen > is the length of one progress " +"line in characters. The default is 40." +msgstr "" +"Kontrolliert die Fortschrittsanzeige. B<\\ linelen > ist die Länge einer " +"Zeile in Zeichen. Das Default ist 40." + +#. type: Plain text +#: man/eepget.1:49 +msgid "B<-m> markSize" +msgstr "B<-m> Marker Größe" + +#. type: TP +#: man/eepget.1:49 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ markSize > is the number of bytes one " +"'#' character represents. The default is 1024." +msgstr "" +"Kontrolliert die Größe der Fortschrittsanzeige. B<\\ markSize > ist die " +"Anzahl an Bytes, die ein '#' Zeichen repräsentiert. Defaultwert ist 1024." + +#. type: Plain text +#: man/eepget.1:55 +msgid "B<-n> retries" +msgstr "B<-n> Wiederholungen" + +#. type: TP +#: man/eepget.1:55 +#, no-wrap +msgid "" +"Specify the number of times to retry downloading if the download isn't " +"successful. If this option is not specified, eepget will not retry." +msgstr "" +"Gibt die Anzahl an Wiederholungen an, wenn der Download nicht erfolgreich " +"ist. Ist diese Option nicht gesetzt, wiederholt eepget nicht." + +#. type: Plain text +#: man/eepget.1:61 +msgid "B<-o> file" +msgstr "B<-o> Datei" + +#. type: TP +#: man/eepget.1:61 +#, no-wrap +msgid "" +"Sets the output file to write to. If this option is not given, the output " +"filename will be determined by the URL." +msgstr "" +"Gibt die Ausgabedatei an. Ist diese Optione nicht gesetzt, wird der Name der" +" Datei durch die URL bestimmt. " + +#. type: Plain text +#: man/eepget.1:67 +msgid "B<-p> proxy_host[:port]" +msgstr "B<-p> Proxy_host[:port]" + +#. type: TP +#: man/eepget.1:67 +#, no-wrap +msgid "" +"Specify an I2P proxy server (eeproxy) to use. If the port is not specified, " +"eepget will use 4444. If this option is not specified, eepget will use " +"127.0.0.1:4444. Specify B<-c> or B<-p> :0 to disable the eeproxy." +msgstr "" +"Definiert einen I2P Proxy Server (Eepproxy) zur Nutzung. Ist der Port nicht " +"angegeben, wird eepget 4444 nutzen. Ist diese Option nicht gesetzt, benutzt " +"eepget 127.0.0.1:4444. Nutzen Sie B<-c> oder B<-p> um den Eepproxy zu " +"deaktivieren." + +#. type: Plain text +#: man/eepget.1:73 +msgid "B<-t> seconds" +msgstr "B<-t> Sekunden" + +#. type: TP +#: man/eepget.1:73 +#, no-wrap +msgid "Sets the inactivity timeout. The default is 60 seconds." +msgstr "" +"Legt die Inaktivitäts-Zeitbeschränkung fest. Die Standardeinstellung ist 60 " +"Sekunden." + +#. type: Plain text +#: man/eepget.1:79 +msgid "B<-u> username" +msgstr "B<-u> Benutzername" + +#. type: TP +#: man/eepget.1:79 +#, no-wrap +msgid "Sets the username for proxy authorization, if required." +msgstr "" +"Legt den Benutzernamen für die Proxy-Autorisierung fest, falls erforderlich." + +#. type: Plain text +#: man/eepget.1:85 +msgid "B<-x> password" +msgstr "B<-x> Passwort" + +#. type: TP +#: man/eepget.1:85 +#, no-wrap +msgid "" +"Sets the password for proxy authorization, if required. If a username is " +"specified but not a password, EepGet will prompt for the password." +msgstr "" +"Setzt das Passwort zur Proxy Authentifizierung, falls benötigt. Falls ein " +"Benutzername, aber kein Passwort angegeben ist, wird Eepget nach dem " +"Passwort fragen." + +#. type: SH +#: man/eepget.1:89 +#, no-wrap +msgid "EXIT STATUS" +msgstr "BEENDEN-STATUS" + +#. type: Plain text +#: man/eepget.1:93 +msgid "" +"B exits with status zero upon successful transfer and non-zero if " +"there were problems with the download." +msgstr "" +"B endet mit dem Status null im Falle eines erfolgreichen Transfers, " +"alternativ mit Nicht-Null, falls es Problem beim Download gab." + +#. type: SH +#: man/eepget.1:94 man/i2prouter.1:54 man/i2prouter-nowrapper.1:24 +#, no-wrap +msgid "REPORTING BUGS" +msgstr "FEHLER MELDEN" + +#. type: Plain text +#: man/eepget.1:99 man/i2prouter.1:59 man/i2prouter-nowrapper.1:29 +msgid "" +"Please enter a ticket on E<.UR https://trac.i2p2.de/> the I2P trac page " +"E<.UE .>" +msgstr "" +"Bitte tragen Sie ein Ticket auf E<.UR https://trac.i2p2.de/> Die I2P Trac " +"Seite E<.UE .> ein." + +#. type: SH +#: man/eepget.1:100 man/i2prouter.1:60 man/i2prouter-nowrapper.1:30 +#, no-wrap +msgid "SEE ALSO" +msgstr "SIEHE AUCH" + +#. type: Plain text +#: man/eepget.1:104 +msgid "B(1) B(1) B(1)" +msgstr "B(1) B(1) B(1)" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "I2PROUTER" +msgstr "I2PROUTER" + +#. type: Plain text +#: man/i2prouter.1:5 +msgid "i2prouter - start and stop the I2P router" +msgstr "i2prouter - I2P-Router starten und stoppen" + +#. type: Plain text +#: man/i2prouter.1:9 +msgid "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" +msgstr "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" + +#. type: Plain text +#: man/i2prouter.1:13 +msgid "Control the I2P service." +msgstr "I2P-Dienst steuern." + +#. type: IP +#: man/i2prouter.1:15 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:17 +msgid "Runs I2P as a console application under the current user." +msgstr "Führt I2P als Konsolenanwendung unter dem aktuellen Benutzer aus." + +#. type: IP +#: man/i2prouter.1:19 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:21 +msgid "Starts the I2P service." +msgstr "Startet den I2P-Dienst." + +#. type: IP +#: man/i2prouter.1:23 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:25 +msgid "Stops the I2P service." +msgstr "Stoppt den I2P-Dienst." + +#. type: IP +#: man/i2prouter.1:27 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:29 +msgid "Stops the I2P service and then starts it." +msgstr "Stoppt den I2P-Dienst und startet ihn dann." + +#. type: IP +#: man/i2prouter.1:31 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:33 +msgid "Restart the I2P service only if it is already running." +msgstr "I2P-Dienst nur neustarten, wenn er bereits ausgeführt wird." + +#. type: IP +#: man/i2prouter.1:35 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:37 +msgid "Stop I2P gracefully (may take up to 11 minutes)" +msgstr "Beende I2P harmonisch (kann bis zu 11 Minuten dauern)" + +#. type: IP +#: man/i2prouter.1:39 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:41 +msgid "Install initscript to start I2P automatically when the system boots." +msgstr "" +"Installiert ein Initscript zum automatischen Starten von I2P beim " +"Systemstart." + +#. type: IP +#: man/i2prouter.1:43 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:45 +msgid "Uninstall initscript that was installed with B" +msgstr "Entfernt das Initscript, welches von B installiert wurde." + +#. type: IP +#: man/i2prouter.1:47 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:49 +msgid "Prints whether the I2P service is running." +msgstr "Gibt aus, ob der I2P-Dienst ausgeführt wird." + +#. type: IP +#: man/i2prouter.1:51 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:53 +msgid "Dumps the current threads into B." +msgstr "Exportiert die laufenden Thread in das B." + +#. type: Plain text +#: man/i2prouter.1:61 +msgid "B(1)" +msgstr "B(1)" + +#. type: TH +#: man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2PROUTER-NOWRAPPER" +msgstr "I2PROUTER-NOWRAPPER" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:5 +msgid "i2prouter-nowrapper - start the I2P router" +msgstr "i2prouter-nowrapper - I2P-Router starten" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:8 +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:14 +msgid "" +"Start the I2P router, without the service wrapper. This means the router " +"will not restart if it crashes. Also, it will use the default memory size, " +"which may not be enough for I2P." +msgstr "" +"Startet den I2P Router ohne den Service Wrapper. Daraus folgt, das der I2P " +"Router nach einem Absturz nicht neu startet. Auch wird nur die Standard " +"Speicehr Größe genutzt, die nicht ausreichend für I2P ist." + +#. type: Plain text +#: man/i2prouter-nowrapper.1:23 +msgid "" +"You should really use the B(1) script instead. There are no " +"options. To stop the router, use your browser to access E<.UR " +"http://localhost:7657/> the router console E<.UE .>" +msgstr "" +"Sie sollten stattdessen das B(1) Skript nutzen. Es existieren " +"keine Optionen. Um den Router zu beenden, benutzen Sie ihren Browser um " +"E<.UR http://localhost:7657/> die Router Console E<.UE .> zu benutzen." + +#. type: Plain text +#: man/i2prouter-nowrapper.1:31 +msgid "B(1)" +msgstr "B(1)" diff --git a/installer/resources/locale-man/man_es.po b/installer/resources/locale-man/man_es.po index d7cdc581a..87a6e9387 100644 --- a/installer/resources/locale-man/man_es.po +++ b/installer/resources/locale-man/man_es.po @@ -22,23 +22,23 @@ msgstr "" #. type: TH #: man/eepget.1:1 #, no-wrap -msgid "EEEPGET" +msgid "EEPGET" msgstr "EEPGET" #. type: TH -#: man/eepget.1:1 +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 #, no-wrap -msgid "September 18, 2015" -msgstr "18 de septiembre, 2015" +msgid "January 26, 2017" +msgstr "26 de enero, 2017" #. type: TH -#: man/eepget.1:1 +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 #, no-wrap -msgid "Eepget - I2P Downloader" -msgstr "Eepget - Gestor de descarga de I2P" +msgid "I2P" +msgstr "I2P" #. type: SH -#: man/eepget.1:3 man/i2prouter.1:3 +#: man/eepget.1:3 man/i2prouter.1:3 man/i2prouter-nowrapper.1:3 #, no-wrap msgid "NAME" msgstr "NOMBRE" @@ -49,7 +49,7 @@ msgid "Eepget - I2P downloader" msgstr "Eepget - Gestor de descarga de I2P" #. type: SH -#: man/eepget.1:6 man/i2prouter.1:6 +#: man/eepget.1:6 man/i2prouter.1:6 man/i2prouter-nowrapper.1:6 #, no-wrap msgid "SYNOPSIS" msgstr "SINOPSIS" @@ -60,7 +60,7 @@ msgid "B [I]I" msgstr "B [I]I" #. type: SH -#: man/eepget.1:11 man/i2prouter.1:11 +#: man/eepget.1:11 man/i2prouter.1:11 man/i2prouter-nowrapper.1:10 #, no-wrap msgid "DESCRIPTION" msgstr "DESCRIPCIÓN" @@ -266,27 +266,30 @@ msgstr "" "completado, y no-cero si hubo problemas con la descarga." #. type: SH -#: man/eepget.1:94 +#: man/eepget.1:94 man/i2prouter.1:54 man/i2prouter-nowrapper.1:24 +#, no-wrap +msgid "REPORTING BUGS" +msgstr "INFORMAR DE FALLOS" + +#. type: Plain text +#: man/eepget.1:99 man/i2prouter.1:59 man/i2prouter-nowrapper.1:29 +msgid "" +"Please enter a ticket on E<.UR https://trac.i2p2.de/> the I2P trac page " +"E<.UE .>" +msgstr "" +"Por favor, introduzca un ticket en E<.UR https://trac.i2p2.de/> la página " +"trac de I2P E<.UE .>" + +#. type: SH +#: man/eepget.1:100 man/i2prouter.1:60 man/i2prouter-nowrapper.1:30 #, no-wrap msgid "SEE ALSO" msgstr "VEA TAMBIÉN" #. type: Plain text -#: man/eepget.1:97 -msgid "curl(1) wget(1)" -msgstr "curl(1) wget(1)" - -#. type: TH -#: man/i2prouter.1:1 -#, no-wrap -msgid "i2prouter" -msgstr "i2prouter" - -#. type: TH -#: man/i2prouter.1:1 -#, no-wrap -msgid "January 26, 2017" -msgstr "26 de enero, 2017" +#: man/eepget.1:104 +msgid "B(1) B(1) B(1)" +msgstr "B(1) B(1) B(1)" #. type: TH #: man/i2prouter.1:1 @@ -421,6 +424,55 @@ msgid "B" msgstr "B" #. type: Plain text -#: man/i2prouter.1:52 +#: man/i2prouter.1:53 msgid "Dumps the current threads into B." msgstr "Vuelca los hilos de proceso actuales en B." + +#. type: Plain text +#: man/i2prouter.1:61 +msgid "B(1)" +msgstr "B(1)" + +#. type: TH +#: man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2PROUTER-NOWRAPPER" +msgstr "I2PROUTER-NOWRAPPER" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:5 +msgid "i2prouter-nowrapper - start the I2P router" +msgstr "i2prouter-nowrapper - inicia el router I2P" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:8 +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:14 +msgid "" +"Start the I2P router, without the service wrapper. This means the router " +"will not restart if it crashes. Also, it will use the default memory size, " +"which may not be enough for I2P." +msgstr "" +"Inicia el router I2P, sin el servicio wrapper (encapsulamiento como " +"servicio). Esto significa que el router I2P no se reiniciará si se cae. " +"Además, usará el tamaño de memoria predeterminado, que puede no ser " +"suficiente para I2P." + +#. type: Plain text +#: man/i2prouter-nowrapper.1:23 +msgid "" +"You should really use the B(1) script instead. There are no " +"options. To stop the router, use your browser to access E<.UR " +"http://localhost:7657/> the router console E<.UE .>" +msgstr "" +"En realidad debe usar el script B(1) en su lugar. No tiene " +"opciones. Para detener el router I2P, utilice su navegador para acceder " +"E<.UR http://localhost:7657/> a la consola del router I2P E<.UE .>" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:31 +msgid "B(1)" +msgstr "B(1)" diff --git a/installer/resources/locale-man/man_fr.po b/installer/resources/locale-man/man_fr.po new file mode 100644 index 000000000..db61774d5 --- /dev/null +++ b/installer/resources/locale-man/man_fr.po @@ -0,0 +1,465 @@ +# I2P +# Copyright (C) 2017 The I2P Project +# This file is distributed under the same license as the routerconsole package. +# To contribute translations, see https://www.transifex.com/otf/I2P/dashboard/ +# zzz , 2017. +# +# Translators: +# Towinet , 2017 +msgid "" +msgstr "" +"Project-Id-Version: I2P man pages\n" +"POT-Creation-Date: 2017-01-26 15:24+0000\n" +"PO-Revision-Date: 2017-01-26 15:24+0000\n" +"Last-Translator: Towinet , 2017\n" +"Language-Team: French (https://www.transifex.com/otf/teams/12694/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "EEPGET" +msgstr "EEPGET" + +#. type: TH +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "January 26, 2017" +msgstr "26 janvier 2017" + +#. type: TH +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2P" +msgstr "I2P" + +#. type: SH +#: man/eepget.1:3 man/i2prouter.1:3 man/i2prouter-nowrapper.1:3 +#, no-wrap +msgid "NAME" +msgstr "NOM" + +#. type: Plain text +#: man/eepget.1:5 +msgid "Eepget - I2P downloader" +msgstr "Eepget - téléchargeur I2P" + +#. type: SH +#: man/eepget.1:6 man/i2prouter.1:6 man/i2prouter-nowrapper.1:6 +#, no-wrap +msgid "SYNOPSIS" +msgstr "SYNOPSIS" + +#. type: Plain text +#: man/eepget.1:9 +msgid "B [I]I" +msgstr "B [I]I" + +#. type: SH +#: man/eepget.1:11 man/i2prouter.1:11 man/i2prouter-nowrapper.1:10 +#, no-wrap +msgid "DESCRIPTION" +msgstr "DESCRIPTION" + +#. type: Plain text +#: man/eepget.1:15 +msgid "" +"Download a file non-interactively via HTTP. Transfers through both I2P and " +"the regular Internet are supported." +msgstr "" +"Télécharge un fichier de façon non interactive via HTTP. Les transferts sont" +" permis aussi bien via I2P que via l'Internet habituel." + +#. type: Plain text +#: man/eepget.1:21 +msgid "" +"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 (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." +msgstr "" +"Eepget est capable de faire face aux connexions réseau lentes ou instables; " +"si un téléchargement ne réussit pas à cause d'un problème de réseau, il " +"continuera à réessayer jusqu'à ce que le fichier entier aie été téléchargé " +"(si l'option -n est mise). S'il est supporté par le serveur distant, Eepget " +"demandera au serveur de continuer le téléchargement à partir du point " +"d'interruption." + +#. type: SH +#: man/eepget.1:22 +#, no-wrap +msgid "OPTIONS" +msgstr "OPTIONS" + +#. type: Plain text +#: man/eepget.1:25 +msgid "B<-c>" +msgstr "B<-c>" + +#. type: TP +#: man/eepget.1:25 +#, no-wrap +msgid "Clearnet. Do not use a proxy. Same as B<-p> :0 ." +msgstr "Clearnet. N'utilise pas un proxy. Pareil que B<-p> :0 ." + +#. type: Plain text +#: man/eepget.1:31 +msgid "B<-e> etag" +msgstr "" + +#. type: TP +#: man/eepget.1:31 +#, no-wrap +msgid "Sets the etag value in the request headers." +msgstr "" + +#. type: Plain text +#: man/eepget.1:37 +msgid "B<-h> name=value" +msgstr "B<-h> name=value" + +#. type: TP +#: man/eepget.1:37 +#, no-wrap +msgid "Adds an arbitrary request header with the given name and value." +msgstr "Ajoute une en-tête de demande arbitraire avec nom précisé et valeur." + +#. type: Plain text +#: man/eepget.1:43 +msgid "B<-l> lineLen" +msgstr "B<-l> lineLen" + +#. type: TP +#: man/eepget.1:43 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ lineLen > is the length of one progress " +"line in characters. The default is 40." +msgstr "" +"Contrôle l'affichage de la progression. B<\\ lineLen > est la longueur en " +"caractères d'une ligne de progression. Le nombre par défaut est 40." + +#. type: Plain text +#: man/eepget.1:49 +msgid "B<-m> markSize" +msgstr "B<-m> markSize" + +#. type: TP +#: man/eepget.1:49 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ markSize > is the number of bytes one " +"'#' character represents. The default is 1024." +msgstr "" + +#. type: Plain text +#: man/eepget.1:55 +msgid "B<-n> retries" +msgstr "B<-n> réessais" + +#. type: TP +#: man/eepget.1:55 +#, no-wrap +msgid "" +"Specify the number of times to retry downloading if the download isn't " +"successful. If this option is not specified, eepget will not retry." +msgstr "" +"Spécifie le nombre de fois à réessayer le téléchargement si le " +"téléchargement n'a pas réussi. Si cette option n'est pas spécifiée, Eepget " +"ne réessayera pas." + +#. type: Plain text +#: man/eepget.1:61 +msgid "B<-o> file" +msgstr "" + +#. type: TP +#: man/eepget.1:61 +#, no-wrap +msgid "" +"Sets the output file to write to. If this option is not given, the output " +"filename will be determined by the URL." +msgstr "" + +#. type: Plain text +#: man/eepget.1:67 +msgid "B<-p> proxy_host[:port]" +msgstr "" + +#. type: TP +#: man/eepget.1:67 +#, no-wrap +msgid "" +"Specify an I2P proxy server (eeproxy) to use. If the port is not specified, " +"eepget will use 4444. If this option is not specified, eepget will use " +"127.0.0.1:4444. Specify B<-c> or B<-p> :0 to disable the eeproxy." +msgstr "" + +#. type: Plain text +#: man/eepget.1:73 +msgid "B<-t> seconds" +msgstr "" + +#. type: TP +#: man/eepget.1:73 +#, no-wrap +msgid "Sets the inactivity timeout. The default is 60 seconds." +msgstr "Met le délai d'inactivité. Il est prédéfini à 60 secondes." + +#. type: Plain text +#: man/eepget.1:79 +msgid "B<-u> username" +msgstr "B<-u> username" + +#. type: TP +#: man/eepget.1:79 +#, no-wrap +msgid "Sets the username for proxy authorization, if required." +msgstr "Met le nom d'utilisateur pour l'autorisation de proxy, si nécessaire." + +#. type: Plain text +#: man/eepget.1:85 +msgid "B<-x> password" +msgstr "B<-x> password" + +#. type: TP +#: man/eepget.1:85 +#, no-wrap +msgid "" +"Sets the password for proxy authorization, if required. If a username is " +"specified but not a password, EepGet will prompt for the password." +msgstr "" +"Met le mot de passe pour l'autorisation de proxy, si nécessaire. Si un nom " +"d'utilisateur est spécifié, mais pas un mot de passe, EepGet demandera le " +"mot de passe." + +#. type: SH +#: man/eepget.1:89 +#, no-wrap +msgid "EXIT STATUS" +msgstr "" + +#. type: Plain text +#: man/eepget.1:93 +msgid "" +"B exits with status zero upon successful transfer and non-zero if " +"there were problems with the download." +msgstr "" + +#. type: SH +#: man/eepget.1:94 man/i2prouter.1:54 man/i2prouter-nowrapper.1:24 +#, no-wrap +msgid "REPORTING BUGS" +msgstr "RAPPORTER DES BUGS" + +#. type: Plain text +#: man/eepget.1:99 man/i2prouter.1:59 man/i2prouter-nowrapper.1:29 +msgid "" +"Please enter a ticket on E<.UR https://trac.i2p2.de/> the I2P trac page " +"E<.UE .>" +msgstr "" +"Veuillez créer un ticket sur E<.UR https://trac.i2p2.de/> la page Trac d'I2P" +" E<.UE .>" + +#. type: SH +#: man/eepget.1:100 man/i2prouter.1:60 man/i2prouter-nowrapper.1:30 +#, no-wrap +msgid "SEE ALSO" +msgstr "VOIR AUSSI" + +#. type: Plain text +#: man/eepget.1:104 +msgid "B(1) B(1) B(1)" +msgstr "B(1) B(1) B(1)" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "I2PROUTER" +msgstr "I2PROUTER" + +#. type: Plain text +#: man/i2prouter.1:5 +msgid "i2prouter - start and stop the I2P router" +msgstr "i2prouter - démarre et stoppe le routeur I2P" + +#. type: Plain text +#: man/i2prouter.1:9 +msgid "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" +msgstr "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" + +#. type: Plain text +#: man/i2prouter.1:13 +msgid "Control the I2P service." +msgstr "Contrôle le service I2P." + +#. type: IP +#: man/i2prouter.1:15 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:17 +msgid "Runs I2P as a console application under the current user." +msgstr "" +"Exécute I2P en tant qu'un application de console, sous le compte de " +"l'utilisateur actuel." + +#. type: IP +#: man/i2prouter.1:19 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:21 +msgid "Starts the I2P service." +msgstr "Démarre le service I2P." + +#. type: IP +#: man/i2prouter.1:23 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:25 +msgid "Stops the I2P service." +msgstr "Stoppe le service I2P." + +#. type: IP +#: man/i2prouter.1:27 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:29 +msgid "Stops the I2P service and then starts it." +msgstr "Stoppe le service I2P puis le démarre." + +#. type: IP +#: man/i2prouter.1:31 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:33 +msgid "Restart the I2P service only if it is already running." +msgstr "" +"Redémarre le service I2P seulement si il est déjà en cours d'exécution." + +#. type: IP +#: man/i2prouter.1:35 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:37 +msgid "Stop I2P gracefully (may take up to 11 minutes)" +msgstr "Stoppe I2P gracieusement (cela peut prendre jusqu'à 11 minutes)." + +#. type: IP +#: man/i2prouter.1:39 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:41 +msgid "Install initscript to start I2P automatically when the system boots." +msgstr "" +"Installe un script d'initialisation pour exécuter automatiquement I2P " +"lorsque le système démarre." + +#. type: IP +#: man/i2prouter.1:43 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:45 +msgid "Uninstall initscript that was installed with B" +msgstr "" +"Désinstalle le script d'initialisation qui a été installé avec B" + +#. type: IP +#: man/i2prouter.1:47 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:49 +msgid "Prints whether the I2P service is running." +msgstr "Imprime lorsque le service d'I2P est en cours d'exécution." + +#. type: IP +#: man/i2prouter.1:51 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:53 +msgid "Dumps the current threads into B." +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:61 +msgid "B(1)" +msgstr "B(1)" + +#. type: TH +#: man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2PROUTER-NOWRAPPER" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:5 +msgid "i2prouter-nowrapper - start the I2P router" +msgstr "i2prouter-nowrapper - démarre le routeur I2P" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:8 +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:14 +msgid "" +"Start the I2P router, without the service wrapper. This means the router " +"will not restart if it crashes. Also, it will use the default memory size, " +"which may not be enough for I2P." +msgstr "" +"Démarre le routeur I2P, sans le wrapper (emballeur) de service. Cela " +"signifie que le routeur ne redémarrera pas si se plante. Aussi, il utilisera" +" la taille de mémoire par défaut, laquelle peut parfois être insuffisante " +"pour I2P." + +#. type: Plain text +#: man/i2prouter-nowrapper.1:23 +msgid "" +"You should really use the B(1) script instead. There are no " +"options. To stop the router, use your browser to access E<.UR " +"http://localhost:7657/> the router console E<.UE .>" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:31 +msgid "B(1)" +msgstr "B(1)" diff --git a/installer/resources/locale-man/man_it.po b/installer/resources/locale-man/man_it.po new file mode 100644 index 000000000..5d1afd9ab --- /dev/null +++ b/installer/resources/locale-man/man_it.po @@ -0,0 +1,435 @@ +# I2P +# Copyright (C) 2017 The I2P Project +# This file is distributed under the same license as the routerconsole package. +# To contribute translations, see https://www.transifex.com/otf/I2P/dashboard/ +# zzz , 2017. +# +# Translators: +# Sebastiano Pistore , 2017 +msgid "" +msgstr "" +"Project-Id-Version: I2P man pages\n" +"POT-Creation-Date: 2017-01-26 15:24+0000\n" +"PO-Revision-Date: 2017-01-26 15:24+0000\n" +"Last-Translator: Sebastiano Pistore , 2017\n" +"Language-Team: Italian (https://www.transifex.com/otf/teams/12694/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. type: TH +#: man/eepget.1:1 +#, no-wrap +msgid "EEPGET" +msgstr "" + +#. type: TH +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "January 26, 2017" +msgstr "26 Gennaio 2017" + +#. type: TH +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2P" +msgstr "I2P" + +#. type: SH +#: man/eepget.1:3 man/i2prouter.1:3 man/i2prouter-nowrapper.1:3 +#, no-wrap +msgid "NAME" +msgstr "NOME" + +#. type: Plain text +#: man/eepget.1:5 +msgid "Eepget - I2P downloader" +msgstr "" + +#. type: SH +#: man/eepget.1:6 man/i2prouter.1:6 man/i2prouter-nowrapper.1:6 +#, no-wrap +msgid "SYNOPSIS" +msgstr "SINOSSI" + +#. type: Plain text +#: man/eepget.1:9 +msgid "B [I]I" +msgstr "" + +#. type: SH +#: man/eepget.1:11 man/i2prouter.1:11 man/i2prouter-nowrapper.1:10 +#, no-wrap +msgid "DESCRIPTION" +msgstr "DESCRIZIONE" + +#. type: Plain text +#: man/eepget.1:15 +msgid "" +"Download a file non-interactively via HTTP. Transfers through both I2P and " +"the regular Internet are supported." +msgstr "" + +#. type: Plain text +#: man/eepget.1:21 +msgid "" +"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 (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." +msgstr "" + +#. type: SH +#: man/eepget.1:22 +#, no-wrap +msgid "OPTIONS" +msgstr "OPZIONI" + +#. type: Plain text +#: man/eepget.1:25 +msgid "B<-c>" +msgstr "B<-c>" + +#. type: TP +#: man/eepget.1:25 +#, no-wrap +msgid "Clearnet. Do not use a proxy. Same as B<-p> :0 ." +msgstr "" + +#. type: Plain text +#: man/eepget.1:31 +msgid "B<-e> etag" +msgstr "B<-e> etag" + +#. type: TP +#: man/eepget.1:31 +#, no-wrap +msgid "Sets the etag value in the request headers." +msgstr "" + +#. type: Plain text +#: man/eepget.1:37 +msgid "B<-h> name=value" +msgstr "" + +#. type: TP +#: man/eepget.1:37 +#, no-wrap +msgid "Adds an arbitrary request header with the given name and value." +msgstr "" + +#. type: Plain text +#: man/eepget.1:43 +msgid "B<-l> lineLen" +msgstr "" + +#. type: TP +#: man/eepget.1:43 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ lineLen > is the length of one progress " +"line in characters. The default is 40." +msgstr "" + +#. type: Plain text +#: man/eepget.1:49 +msgid "B<-m> markSize" +msgstr "" + +#. type: TP +#: man/eepget.1:49 +#, no-wrap +msgid "" +"Controls the progress display. B<\\ markSize > is the number of bytes one " +"'#' character represents. The default is 1024." +msgstr "" + +#. type: Plain text +#: man/eepget.1:55 +msgid "B<-n> retries" +msgstr "B<-n> numeroTentativi" + +#. type: TP +#: man/eepget.1:55 +#, no-wrap +msgid "" +"Specify the number of times to retry downloading if the download isn't " +"successful. If this option is not specified, eepget will not retry." +msgstr "" + +#. type: Plain text +#: man/eepget.1:61 +msgid "B<-o> file" +msgstr "B<-o> file" + +#. type: TP +#: man/eepget.1:61 +#, no-wrap +msgid "" +"Sets the output file to write to. If this option is not given, the output " +"filename will be determined by the URL." +msgstr "" + +#. type: Plain text +#: man/eepget.1:67 +msgid "B<-p> proxy_host[:port]" +msgstr "" + +#. type: TP +#: man/eepget.1:67 +#, no-wrap +msgid "" +"Specify an I2P proxy server (eeproxy) to use. If the port is not specified, " +"eepget will use 4444. If this option is not specified, eepget will use " +"127.0.0.1:4444. Specify B<-c> or B<-p> :0 to disable the eeproxy." +msgstr "" + +#. type: Plain text +#: man/eepget.1:73 +msgid "B<-t> seconds" +msgstr "B<-t> secondi" + +#. type: TP +#: man/eepget.1:73 +#, no-wrap +msgid "Sets the inactivity timeout. The default is 60 seconds." +msgstr "" + +#. type: Plain text +#: man/eepget.1:79 +msgid "B<-u> username" +msgstr "B<-u> username" + +#. type: TP +#: man/eepget.1:79 +#, no-wrap +msgid "Sets the username for proxy authorization, if required." +msgstr "" + +#. type: Plain text +#: man/eepget.1:85 +msgid "B<-x> password" +msgstr "B<-x> password" + +#. type: TP +#: man/eepget.1:85 +#, no-wrap +msgid "" +"Sets the password for proxy authorization, if required. If a username is " +"specified but not a password, EepGet will prompt for the password." +msgstr "" + +#. type: SH +#: man/eepget.1:89 +#, no-wrap +msgid "EXIT STATUS" +msgstr "" + +#. type: Plain text +#: man/eepget.1:93 +msgid "" +"B exits with status zero upon successful transfer and non-zero if " +"there were problems with the download." +msgstr "" + +#. type: SH +#: man/eepget.1:94 man/i2prouter.1:54 man/i2prouter-nowrapper.1:24 +#, no-wrap +msgid "REPORTING BUGS" +msgstr "" + +#. type: Plain text +#: man/eepget.1:99 man/i2prouter.1:59 man/i2prouter-nowrapper.1:29 +msgid "" +"Please enter a ticket on E<.UR https://trac.i2p2.de/> the I2P trac page " +"E<.UE .>" +msgstr "" + +#. type: SH +#: man/eepget.1:100 man/i2prouter.1:60 man/i2prouter-nowrapper.1:30 +#, no-wrap +msgid "SEE ALSO" +msgstr "" + +#. type: Plain text +#: man/eepget.1:104 +msgid "B(1) B(1) B(1)" +msgstr "B(1) B(1) B(1)" + +#. type: TH +#: man/i2prouter.1:1 +#, no-wrap +msgid "I2PROUTER" +msgstr "I2PROUTER" + +#. type: Plain text +#: man/i2prouter.1:5 +msgid "i2prouter - start and stop the I2P router" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:9 +msgid "" +"B " +"{I|I|I|I|I|I|I|I|I|I}" +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:13 +msgid "Control the I2P service." +msgstr "" + +#. type: IP +#: man/i2prouter.1:15 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:17 +msgid "Runs I2P as a console application under the current user." +msgstr "" + +#. type: IP +#: man/i2prouter.1:19 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:21 +msgid "Starts the I2P service." +msgstr "" + +#. type: IP +#: man/i2prouter.1:23 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:25 +msgid "Stops the I2P service." +msgstr "" + +#. type: IP +#: man/i2prouter.1:27 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:29 +msgid "Stops the I2P service and then starts it." +msgstr "" + +#. type: IP +#: man/i2prouter.1:31 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:33 +msgid "Restart the I2P service only if it is already running." +msgstr "" + +#. type: IP +#: man/i2prouter.1:35 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:37 +msgid "Stop I2P gracefully (may take up to 11 minutes)" +msgstr "" + +#. type: IP +#: man/i2prouter.1:39 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:41 +msgid "Install initscript to start I2P automatically when the system boots." +msgstr "" + +#. type: IP +#: man/i2prouter.1:43 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:45 +msgid "Uninstall initscript that was installed with B" +msgstr "" + +#. type: IP +#: man/i2prouter.1:47 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:49 +msgid "Prints whether the I2P service is running." +msgstr "" + +#. type: IP +#: man/i2prouter.1:51 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter.1:53 +msgid "Dumps the current threads into B." +msgstr "" + +#. type: Plain text +#: man/i2prouter.1:61 +msgid "B(1)" +msgstr "B(1)" + +#. type: TH +#: man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2PROUTER-NOWRAPPER" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:5 +msgid "i2prouter-nowrapper - start the I2P router" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:8 +msgid "B" +msgstr "B" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:14 +msgid "" +"Start the I2P router, without the service wrapper. This means the router " +"will not restart if it crashes. Also, it will use the default memory size, " +"which may not be enough for I2P." +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:23 +msgid "" +"You should really use the B(1) script instead. There are no " +"options. To stop the router, use your browser to access E<.UR " +"http://localhost:7657/> the router console E<.UE .>" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:31 +msgid "B(1)" +msgstr "B(1)" diff --git a/installer/resources/locale-man/man_zh.po b/installer/resources/locale-man/man_zh.po index f08eb982a..63b212697 100644 --- a/installer/resources/locale-man/man_zh.po +++ b/installer/resources/locale-man/man_zh.po @@ -22,23 +22,23 @@ msgstr "" #. type: TH #: man/eepget.1:1 #, no-wrap -msgid "EEEPGET" -msgstr "EEEPGET" +msgid "EEPGET" +msgstr "" #. type: TH -#: man/eepget.1:1 +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 #, no-wrap -msgid "September 18, 2015" -msgstr "2015年9月18日" +msgid "January 26, 2017" +msgstr "2017年1月26日" #. type: TH -#: man/eepget.1:1 +#: man/eepget.1:1 man/i2prouter.1:1 man/i2prouter-nowrapper.1:1 #, no-wrap -msgid "Eepget - I2P Downloader" -msgstr "Eepget - I2P 下载器" +msgid "I2P" +msgstr "" #. type: SH -#: man/eepget.1:3 man/i2prouter.1:3 +#: man/eepget.1:3 man/i2prouter.1:3 man/i2prouter-nowrapper.1:3 #, no-wrap msgid "NAME" msgstr "名称" @@ -49,7 +49,7 @@ msgid "Eepget - I2P downloader" msgstr "Eepget - I2P 下载器" #. type: SH -#: man/eepget.1:6 man/i2prouter.1:6 +#: man/eepget.1:6 man/i2prouter.1:6 man/i2prouter-nowrapper.1:6 #, no-wrap msgid "SYNOPSIS" msgstr "概要" @@ -60,7 +60,7 @@ msgid "B [I]I" msgstr "B [I]I" #. type: SH -#: man/eepget.1:11 man/i2prouter.1:11 +#: man/eepget.1:11 man/i2prouter.1:11 man/i2prouter-nowrapper.1:10 #, no-wrap msgid "DESCRIPTION" msgstr "描述" @@ -238,27 +238,28 @@ msgid "" msgstr "B 退出状态为 0 表示传输成功。如果下载遇到问题,则退出状态非 0。" #. type: SH -#: man/eepget.1:94 +#: man/eepget.1:94 man/i2prouter.1:54 man/i2prouter-nowrapper.1:24 +#, no-wrap +msgid "REPORTING BUGS" +msgstr "" + +#. type: Plain text +#: man/eepget.1:99 man/i2prouter.1:59 man/i2prouter-nowrapper.1:29 +msgid "" +"Please enter a ticket on E<.UR https://trac.i2p2.de/> the I2P trac page " +"E<.UE .>" +msgstr "" + +#. type: SH +#: man/eepget.1:100 man/i2prouter.1:60 man/i2prouter-nowrapper.1:30 #, no-wrap msgid "SEE ALSO" msgstr "另见" #. type: Plain text -#: man/eepget.1:97 -msgid "curl(1) wget(1)" -msgstr "curl(1) wget(1)" - -#. type: TH -#: man/i2prouter.1:1 -#, no-wrap -msgid "i2prouter" -msgstr "i2prouter" - -#. type: TH -#: man/i2prouter.1:1 -#, no-wrap -msgid "January 26, 2017" -msgstr "2017年1月26日" +#: man/eepget.1:104 +msgid "B(1) B(1) B(1)" +msgstr "" #. type: TH #: man/i2prouter.1:1 @@ -391,6 +392,48 @@ msgid "B" msgstr "" #. type: Plain text -#: man/i2prouter.1:52 +#: man/i2prouter.1:53 msgid "Dumps the current threads into B." msgstr "" + +#. type: Plain text +#: man/i2prouter.1:61 +msgid "B(1)" +msgstr "" + +#. type: TH +#: man/i2prouter-nowrapper.1:1 +#, no-wrap +msgid "I2PROUTER-NOWRAPPER" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:5 +msgid "i2prouter-nowrapper - start the I2P router" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:8 +msgid "B" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:14 +msgid "" +"Start the I2P router, without the service wrapper. This means the router " +"will not restart if it crashes. Also, it will use the default memory size, " +"which may not be enough for I2P." +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:23 +msgid "" +"You should really use the B(1) script instead. There are no " +"options. To stop the router, use your browser to access E<.UR " +"http://localhost:7657/> the router console E<.UE .>" +msgstr "" + +#. type: Plain text +#: man/i2prouter-nowrapper.1:31 +msgid "B(1)" +msgstr "" diff --git a/installer/resources/man/eepget.de.1 b/installer/resources/man/eepget.de.1 new file mode 100644 index 000000000..a2e1401f2 --- /dev/null +++ b/installer/resources/man/eepget.de.1 @@ -0,0 +1,97 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH EEPGET 1 "26. Januar 2017" "" I2P + +.SH NAME +Eepget \- I2P Downloader + +.SH SYNOPSIS +\fBeepget\fP [\fIOptionen\fP]\fIURL\fP +.br + +.SH BESCHREIBUNG +.P +Downloaded eine Datei nicht interaktiv via HTTP Protokoll. Transfers im I2P +und im normalen Netz sind möglich. +.P +Eepget kommt mit langsamen oder instabilen Netzwerkverbindungen zurecht; +falls der Download aus Netzwerkgründen abbricht, versucht eepget es +nocheinmal, bis die Datei komplett geholt wurde (falls die \-n Option gesetzt +wurde). Falls der Server es zulässt, wird eepget dem Server anweisen, an der +Stelle des Abbruchs fortzusetzen. + +.SH OPTIONEN +\fB\-c\fP +.TP +Internet. Nicht als Proxy benutzen. Gleich wie \fB\-p\fP :0 . +.TP + +\fB\-e\fP etag +.TP +Legt den etag\-Wert in den Anforderungskopfdaten fest. +.TP + +\fB\-h\fP Name=Wert +.TP +Fügt eine freie Request Kopfzeile mit gegebenen Namen und Wert hinzu +.TP + +\fB\-l\fP Zeilenlänge +.TP +Kontrolliert die Fortschrittsanzeige. \fB\ linelen \fP ist die Länge einer Zeile in Zeichen. Das Default ist 40. +.TP + +\fB\-m\fP Marker Größe +.TP +Kontrolliert die Größe der Fortschrittsanzeige. \fB\ markSize \fP ist die Anzahl an Bytes, die ein '#' Zeichen repräsentiert. Defaultwert ist 1024. +.TP + +\fB\-n\fP Wiederholungen +.TP +Gibt die Anzahl an Wiederholungen an, wenn der Download nicht erfolgreich ist. Ist diese Option nicht gesetzt, wiederholt eepget nicht. +.TP + +\fB\-o\fP Datei +.TP +Gibt die Ausgabedatei an. Ist diese Optione nicht gesetzt, wird der Name der Datei durch die URL bestimmt. +.TP + +\fB\-p\fP Proxy_host[:port] +.TP +Definiert einen I2P Proxy Server (Eepproxy) zur Nutzung. Ist der Port nicht angegeben, wird eepget 4444 nutzen. Ist diese Option nicht gesetzt, benutzt eepget 127.0.0.1:4444. Nutzen Sie \fB\-c\fP oder \fB\-p\fP um den Eepproxy zu deaktivieren. +.TP + +\fB\-t\fP Sekunden +.TP +Legt die Inaktivitäts\-Zeitbeschränkung fest. Die Standardeinstellung ist 60 Sekunden. +.TP + +\fB\-u\fP Benutzername +.TP +Legt den Benutzernamen für die Proxy\-Autorisierung fest, falls erforderlich. +.TP + +\fB\-x\fP Passwort +.TP +Setzt das Passwort zur Proxy Authentifizierung, falls benötigt. Falls ein Benutzername, aber kein Passwort angegeben ist, wird Eepget nach dem Passwort fragen. +.TP + +.SH BEENDEN\-STATUS + +\fBeepget\fP endet mit dem Status null im Falle eines erfolgreichen Transfers, +alternativ mit Nicht\-Null, falls es Problem beim Download gab. + +.SH "FEHLER MELDEN" +Bitte tragen Sie ein Ticket auf +.UR https://trac.i2p2.de/ +Die I2P Trac +Seite +.UE . +ein. + +.SH "SIEHE AUCH" +\fBi2prouter\fP(1) \fBcurl\fP(1) \fBwget\fP(1) + diff --git a/installer/resources/man/eepget.es.1 b/installer/resources/man/eepget.es.1 index 121f61d60..0ffe7a474 100644 --- a/installer/resources/man/eepget.es.1 +++ b/installer/resources/man/eepget.es.1 @@ -3,7 +3,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH EEPGET 1 "18 de septiembre, 2015" "" "Eepget \- Gestor de descarga de I2P" +.TH EEPGET 1 "26 de enero, 2017" "" I2P .SH NOMBRE Eepget \- Gestor de descarga de I2P @@ -84,7 +84,13 @@ Establece la contraseña para la autorización del proxy, si se requiere. Si se \fBeepget\fP produce una salida con estado cero cuando la transferencia se ha completado, y no\-cero si hubo problemas con la descarga. +.SH "INFORMAR DE FALLOS" +Por favor, introduzca un ticket en +.UR https://trac.i2p2.de/ +la página +trac de I2P +.UE . + .SH "VEA TAMBIÉN" - -curl(1) wget(1) +\fBi2prouter\fP(1) \fBcurl\fP(1) \fBwget\fP(1) diff --git a/installer/resources/man/eepget.fr.1 b/installer/resources/man/eepget.fr.1 new file mode 100644 index 000000000..14b79e412 --- /dev/null +++ b/installer/resources/man/eepget.fr.1 @@ -0,0 +1,96 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH EEPGET 1 "26 janvier 2017" "" I2P + +.SH NOM +Eepget \- téléchargeur I2P + +.SH SYNOPSIS +\fBeepget\fP [\fIoptions\fP]\fIURL\fP +.br + +.SH DESCRIPTION +.P +Télécharge un fichier de façon non interactive via HTTP. Les transferts sont +permis aussi bien via I2P que via l'Internet habituel. +.P +Eepget est capable de faire face aux connexions réseau lentes ou instables; +si un téléchargement ne réussit pas à cause d'un problème de réseau, il +continuera à réessayer jusqu'à ce que le fichier entier aie été téléchargé +(si l'option \-n est mise). S'il est supporté par le serveur distant, Eepget +demandera au serveur de continuer le téléchargement à partir du point +d'interruption. + +.SH OPTIONS +\fB\-c\fP +.TP +Clearnet. N'utilise pas un proxy. Pareil que \fB\-p\fP :0 . +.TP + +\fB\-e\fP etag +.TP +Sets the etag value in the request headers. +.TP + +\fB\-h\fP name=value +.TP +Ajoute une en\-tête de demande arbitraire avec nom précisé et valeur. +.TP + +\fB\-l\fP lineLen +.TP +Contrôle l'affichage de la progression. \fB\ lineLen \fP est la longueur en caractères d'une ligne de progression. Le nombre par défaut est 40. +.TP + +\fB\-m\fP markSize +.TP +Controls the progress display. \fB\ markSize \fP is the number of bytes one '#' character represents. The default is 1024. +.TP + +\fB\-n\fP réessais +.TP +Spécifie le nombre de fois à réessayer le téléchargement si le téléchargement n'a pas réussi. Si cette option n'est pas spécifiée, Eepget ne réessayera pas. +.TP + +\fB\-o\fP file +.TP +Sets the output file to write to. If this option is not given, the output filename will be determined by the URL. +.TP + +\fB\-p\fP proxy_host[:port] +.TP +Specify an I2P proxy server (eeproxy) to use. If the port is not specified, eepget will use 4444. If this option is not specified, eepget will use 127.0.0.1:4444. Specify \fB\-c\fP or \fB\-p\fP :0 to disable the eeproxy. +.TP + +\fB\-t\fP seconds +.TP +Met le délai d'inactivité. Il est prédéfini à 60 secondes. +.TP + +\fB\-u\fP username +.TP +Met le nom d'utilisateur pour l'autorisation de proxy, si nécessaire. +.TP + +\fB\-x\fP password +.TP +Met le mot de passe pour l'autorisation de proxy, si nécessaire. Si un nom d'utilisateur est spécifié, mais pas un mot de passe, EepGet demandera le mot de passe. +.TP + +.SH "EXIT STATUS" + +\fBeepget\fP exits with status zero upon successful transfer and non\-zero if +there were problems with the download. + +.SH "RAPPORTER DES BUGS" +Veuillez créer un ticket sur +.UR https://trac.i2p2.de/ +la page Trac d'I2P +.UE . + +.SH "VOIR AUSSI" +\fBi2prouter\fP(1) \fBcurl\fP(1) \fBwget\fP(1) + diff --git a/installer/resources/man/eepget.it.1 b/installer/resources/man/eepget.it.1 new file mode 100644 index 000000000..0ec4ece28 --- /dev/null +++ b/installer/resources/man/eepget.it.1 @@ -0,0 +1,95 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH EEPGET 1 "26 Gennaio 2017" "" I2P + +.SH NOME +Eepget \- I2P downloader + +.SH SINOSSI +\fBeepget\fP [\fIoptions\fP]\fIURL\fP +.br + +.SH DESCRIZIONE +.P +Download a file non\-interactively via HTTP. Transfers through both I2P and +the 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 (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. + +.SH OPZIONI +\fB\-c\fP +.TP +Clearnet. Do not use a proxy. Same as \fB\-p\fP :0 . +.TP + +\fB\-e\fP etag +.TP +Sets the etag value in the request headers. +.TP + +\fB\-h\fP name=value +.TP +Adds an arbitrary request header with the given name and value. +.TP + +\fB\-l\fP lineLen +.TP +Controls the progress display. \fB\ lineLen \fP is the length of one progress line in characters. The default is 40. +.TP + +\fB\-m\fP markSize +.TP +Controls the progress display. \fB\ markSize \fP is the number of bytes one '#' character represents. The default is 1024. +.TP + +\fB\-n\fP numeroTentativi +.TP +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 + +\fB\-o\fP file +.TP +Sets the output file to write to. If this option is not given, the output filename will be determined by the URL. +.TP + +\fB\-p\fP proxy_host[:port] +.TP +Specify an I2P proxy server (eeproxy) to use. If the port is not specified, eepget will use 4444. If this option is not specified, eepget will use 127.0.0.1:4444. Specify \fB\-c\fP or \fB\-p\fP :0 to disable the eeproxy. +.TP + +\fB\-t\fP secondi +.TP +Sets the inactivity timeout. The default is 60 seconds. +.TP + +\fB\-u\fP username +.TP +Sets the username for proxy authorization, if required. +.TP + +\fB\-x\fP password +.TP +Sets the password for proxy authorization, if required. If a username is specified but not a password, EepGet will prompt for the password. +.TP + +.SH "EXIT STATUS" + +\fBeepget\fP exits with status zero upon successful transfer and non\-zero if +there were problems with the download. + +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + +.SH "SEE ALSO" +\fBi2prouter\fP(1) \fBcurl\fP(1) \fBwget\fP(1) + diff --git a/installer/resources/man/eepget.zh.1 b/installer/resources/man/eepget.zh.1 index 0188372c3..b77f7e6ca 100644 --- a/installer/resources/man/eepget.zh.1 +++ b/installer/resources/man/eepget.zh.1 @@ -3,7 +3,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH EEEPGET 1 2015年9月18日 "" "Eepget \- I2P 下载器" +.TH EEPGET 1 2017年1月26日 "" I2P .SH 名称 Eepget \- I2P 下载器 @@ -79,7 +79,12 @@ Sets the password for proxy authorization, if required. If a username is specifi \fBeepget\fP 退出状态为 0 表示传输成功。如果下载遇到问题,则退出状态非 0。 +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + .SH 另见 - -curl(1) wget(1) +\fBi2prouter\fP(1) \fBcurl\fP(1) \fBwget\fP(1) diff --git a/installer/resources/man/i2prouter-nowrapper.de.1 b/installer/resources/man/i2prouter-nowrapper.de.1 new file mode 100644 index 000000000..29b2b2e35 --- /dev/null +++ b/installer/resources/man/i2prouter-nowrapper.de.1 @@ -0,0 +1,36 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH I2PROUTER\-NOWRAPPER 1 "26. Januar 2017" "" I2P + +.SH NAME +i2prouter\-nowrapper \- I2P\-Router starten + +.SH SYNOPSIS +\fBi2prouter\-nowrapper\fP +.br + +.SH BESCHREIBUNG +Startet den I2P Router ohne den Service Wrapper. Daraus folgt, das der I2P +Router nach einem Absturz nicht neu startet. Auch wird nur die Standard +Speicehr Größe genutzt, die nicht ausreichend für I2P ist. +.P +Sie sollten stattdessen das \fBi2prouter\fP(1) Skript nutzen. Es existieren +keine Optionen. Um den Router zu beenden, benutzen Sie ihren Browser um +.UR http://localhost:7657/ +die Router Console +.UE . +zu benutzen. + +.SH "FEHLER MELDEN" +Bitte tragen Sie ein Ticket auf +.UR https://trac.i2p2.de/ +Die I2P Trac +Seite +.UE . +ein. + +.SH "SIEHE AUCH" +\fBi2prouter\fP(1) diff --git a/installer/resources/man/i2prouter-nowrapper.es.1 b/installer/resources/man/i2prouter-nowrapper.es.1 new file mode 100644 index 000000000..be46824b1 --- /dev/null +++ b/installer/resources/man/i2prouter-nowrapper.es.1 @@ -0,0 +1,35 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH I2PROUTER\-NOWRAPPER 1 "26 de enero, 2017" "" I2P + +.SH NOMBRE +i2prouter\-nowrapper \- inicia el router I2P + +.SH SINOPSIS +\fBi2prouter\-nowrapper\fP +.br + +.SH DESCRIPCIÓN +Inicia el router I2P, sin el servicio wrapper (encapsulamiento como +servicio). Esto significa que el router I2P no se reiniciará si se +cae. Además, usará el tamaño de memoria predeterminado, que puede no ser +suficiente para I2P. +.P +En realidad debe usar el script \fBi2prouter\fP(1) en su lugar. No tiene +opciones. Para detener el router I2P, utilice su navegador para acceder +.UR http://localhost:7657/ +a la consola del router I2P +.UE . + +.SH "INFORMAR DE FALLOS" +Por favor, introduzca un ticket en +.UR https://trac.i2p2.de/ +la página +trac de I2P +.UE . + +.SH "VEA TAMBIÉN" +\fBi2prouter\fP(1) diff --git a/installer/resources/man/i2prouter-nowrapper.fr.1 b/installer/resources/man/i2prouter-nowrapper.fr.1 new file mode 100644 index 000000000..fde9f8a94 --- /dev/null +++ b/installer/resources/man/i2prouter-nowrapper.fr.1 @@ -0,0 +1,34 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH I2PROUTER\-NOWRAPPER 1 "26 janvier 2017" "" I2P + +.SH NOM +i2prouter\-nowrapper \- démarre le routeur I2P + +.SH SYNOPSIS +\fBi2prouter\-nowrapper\fP +.br + +.SH DESCRIPTION +Démarre le routeur I2P, sans le wrapper (emballeur) de service. Cela +signifie que le routeur ne redémarrera pas si se plante. Aussi, il utilisera +la taille de mémoire par défaut, laquelle peut parfois être insuffisante +pour I2P. +.P +You should really use the \fBi2prouter\fP(1) script instead. There are no +options. To stop the router, use your browser to access +.UR http://localhost:7657/ +the router console +.UE . + +.SH "RAPPORTER DES BUGS" +Veuillez créer un ticket sur +.UR https://trac.i2p2.de/ +la page Trac d'I2P +.UE . + +.SH "VOIR AUSSI" +\fBi2prouter\fP(1) diff --git a/installer/resources/man/i2prouter-nowrapper.it.1 b/installer/resources/man/i2prouter-nowrapper.it.1 new file mode 100644 index 000000000..c0486bf70 --- /dev/null +++ b/installer/resources/man/i2prouter-nowrapper.it.1 @@ -0,0 +1,33 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH I2PROUTER\-NOWRAPPER 1 "26 Gennaio 2017" "" I2P + +.SH NOME +i2prouter\-nowrapper \- start the I2P router + +.SH SINOSSI +\fBi2prouter\-nowrapper\fP +.br + +.SH DESCRIZIONE +Start the I2P router, without the service wrapper. This means the router +will not restart if it crashes. Also, it will use the default memory size, +which may not be enough for I2P. +.P +You should really use the \fBi2prouter\fP(1) script instead. There are no +options. To stop the router, use your browser to access +.UR http://localhost:7657/ +the router console +.UE . + +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + +.SH "SEE ALSO" +\fBi2prouter\fP(1) diff --git a/installer/resources/man/i2prouter-nowrapper.zh.1 b/installer/resources/man/i2prouter-nowrapper.zh.1 new file mode 100644 index 000000000..f15b67266 --- /dev/null +++ b/installer/resources/man/i2prouter-nowrapper.zh.1 @@ -0,0 +1,33 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH I2PROUTER\-NOWRAPPER 1 2017年1月26日 "" I2P + +.SH 名称 +i2prouter\-nowrapper \- start the I2P router + +.SH 概要 +\fBi2prouter\-nowrapper\fP +.br + +.SH 描述 +Start the I2P router, without the service wrapper. This means the router +will not restart if it crashes. Also, it will use the default memory size, +which may not be enough for I2P. +.P +You should really use the \fBi2prouter\fP(1) script instead. There are no +options. To stop the router, use your browser to access +.UR http://localhost:7657/ +the router console +.UE . + +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + +.SH 另见 +\fBi2prouter\fP(1) diff --git a/installer/resources/man/i2prouter.de.1 b/installer/resources/man/i2prouter.de.1 new file mode 100644 index 000000000..c1fe38e7c --- /dev/null +++ b/installer/resources/man/i2prouter.de.1 @@ -0,0 +1,59 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH I2PROUTER 1 "26. Januar 2017" "" I2P + +.SH NAME +i2prouter \- I2P\-Router starten und stoppen + +.SH SYNOPSIS +\fBi2prouter\fP +{\fIconsole\fP|\fIstart\fP|\fIstop\fP|\fIgraceful\fP|\fIrestart\fP|\fIcondrestart\fP|\fIstatus\fP|\fIdump\fP|\fIinstall\fP|\fIremove\fP} +.br + +.SH BESCHREIBUNG +I2P\-Dienst steuern. + +.IP \fBconsole\fP +Führt I2P als Konsolenanwendung unter dem aktuellen Benutzer aus. + +.IP \fBstart\fP +Startet den I2P\-Dienst. + +.IP \fBstop\fP +Stoppt den I2P\-Dienst. + +.IP \fBrestart\fP +Stoppt den I2P\-Dienst und startet ihn dann. + +.IP \fBcondrestart\fP +I2P\-Dienst nur neustarten, wenn er bereits ausgeführt wird. + +.IP \fBgraceful\fP +Beende I2P harmonisch (kann bis zu 11 Minuten dauern) + +.IP \fBinstall\fP +Installiert ein Initscript zum automatischen Starten von I2P beim +Systemstart. + +.IP \fBremove\fP +Entfernt das Initscript, welches von \fBinstall\fP installiert wurde. + +.IP \fBstatus\fP +Gibt aus, ob der I2P\-Dienst ausgeführt wird. + +.IP \fBdump\fP +Exportiert die laufenden Thread in das \fBwrapper.log\fP. + +.SH "FEHLER MELDEN" +Bitte tragen Sie ein Ticket auf +.UR https://trac.i2p2.de/ +Die I2P Trac +Seite +.UE . +ein. + +.SH "SIEHE AUCH" +\fBi2prouter\-nowrapper\fP(1) diff --git a/installer/resources/man/i2prouter.es.1 b/installer/resources/man/i2prouter.es.1 index 567dae2be..7c327d125 100644 --- a/installer/resources/man/i2prouter.es.1 +++ b/installer/resources/man/i2prouter.es.1 @@ -3,7 +3,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH i2prouter 1 "26 de enero, 2017" "" I2PROUTER +.TH I2PROUTER 1 "26 de enero, 2017" "" I2P .SH NOMBRE i2prouter \- inicia y detiene el router I2P @@ -46,3 +46,13 @@ Imprime en pantalla si el servicio I2P está en marcha. .IP \fBdump\fP Vuelca los hilos de proceso actuales en \fBwrapper.log\fP. + +.SH "INFORMAR DE FALLOS" +Por favor, introduzca un ticket en +.UR https://trac.i2p2.de/ +la página +trac de I2P +.UE . + +.SH "VEA TAMBIÉN" +\fBi2prouter\-nowrapper\fP(1) diff --git a/installer/resources/man/i2prouter.fr.1 b/installer/resources/man/i2prouter.fr.1 new file mode 100644 index 000000000..31226806f --- /dev/null +++ b/installer/resources/man/i2prouter.fr.1 @@ -0,0 +1,58 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH I2PROUTER 1 "26 janvier 2017" "" I2P + +.SH NOM +i2prouter \- démarre et stoppe le routeur I2P + +.SH SYNOPSIS +\fBi2prouter\fP +{\fIconsole\fP|\fIstart\fP|\fIstop\fP|\fIgraceful\fP|\fIrestart\fP|\fIcondrestart\fP|\fIstatus\fP|\fIdump\fP|\fIinstall\fP|\fIremove\fP} +.br + +.SH DESCRIPTION +Contrôle le service I2P. + +.IP \fBconsole\fP +Exécute I2P en tant qu'un application de console, sous le compte de +l'utilisateur actuel. + +.IP \fBstart\fP +Démarre le service I2P. + +.IP \fBstop\fP +Stoppe le service I2P. + +.IP \fBrestart\fP +Stoppe le service I2P puis le démarre. + +.IP \fBcondrestart\fP +Redémarre le service I2P seulement si il est déjà en cours d'exécution. + +.IP \fBgraceful\fP +Stoppe I2P gracieusement (cela peut prendre jusqu'à 11 minutes). + +.IP \fBinstall\fP +Installe un script d'initialisation pour exécuter automatiquement I2P +lorsque le système démarre. + +.IP \fBremove\fP +Désinstalle le script d'initialisation qui a été installé avec \fBinstall\fP + +.IP \fBstatus\fP +Imprime lorsque le service d'I2P est en cours d'exécution. + +.IP \fBdump\fP +Dumps the current threads into \fBwrapper.log\fP. + +.SH "RAPPORTER DES BUGS" +Veuillez créer un ticket sur +.UR https://trac.i2p2.de/ +la page Trac d'I2P +.UE . + +.SH "VOIR AUSSI" +\fBi2prouter\-nowrapper\fP(1) diff --git a/installer/resources/man/i2prouter.it.1 b/installer/resources/man/i2prouter.it.1 new file mode 100644 index 000000000..b7e45f096 --- /dev/null +++ b/installer/resources/man/i2prouter.it.1 @@ -0,0 +1,56 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH I2PROUTER 1 "26 Gennaio 2017" "" I2P + +.SH NOME +i2prouter \- start and stop the I2P router + +.SH SINOSSI +\fBi2prouter\fP +{\fIconsole\fP|\fIstart\fP|\fIstop\fP|\fIgraceful\fP|\fIrestart\fP|\fIcondrestart\fP|\fIstatus\fP|\fIdump\fP|\fIinstall\fP|\fIremove\fP} +.br + +.SH DESCRIZIONE +Control the I2P service. + +.IP \fBconsole\fP +Runs I2P as a console application under the current user. + +.IP \fBstart\fP +Starts the I2P service. + +.IP \fBstop\fP +Stops the I2P service. + +.IP \fBrestart\fP +Stops the I2P service and then starts it. + +.IP \fBcondrestart\fP +Restart the I2P service only if it is already running. + +.IP \fBgraceful\fP +Stop I2P gracefully (may take up to 11 minutes) + +.IP \fBinstall\fP +Install initscript to start I2P automatically when the system boots. + +.IP \fBremove\fP +Uninstall initscript that was installed with \fBinstall\fP + +.IP \fBstatus\fP +Prints whether the I2P service is running. + +.IP \fBdump\fP +Dumps the current threads into \fBwrapper.log\fP. + +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + +.SH "SEE ALSO" +\fBi2prouter\-nowrapper\fP(1) diff --git a/installer/resources/man/i2prouter.zh.1 b/installer/resources/man/i2prouter.zh.1 index c9a586c2d..450d97c2f 100644 --- a/installer/resources/man/i2prouter.zh.1 +++ b/installer/resources/man/i2prouter.zh.1 @@ -3,7 +3,7 @@ .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* -.TH i2prouter 1 2017年1月26日 "" I2PROUTER +.TH I2PROUTER 1 2017年1月26日 "" I2P .SH 名称 i2prouter \- 启动和停止 I2P 路由器 @@ -45,3 +45,12 @@ Prints whether the I2P service is running. .IP \fBdump\fP Dumps the current threads into \fBwrapper.log\fP. + +.SH "REPORTING BUGS" +Please enter a ticket on +.UR https://trac.i2p2.de/ +the I2P trac page +.UE . + +.SH 另见 +\fBi2prouter\-nowrapper\fP(1) diff --git a/installer/resources/poupdate-man.sh b/installer/resources/poupdate-man.sh index ded02ad3e..fb3390d1b 100755 --- a/installer/resources/poupdate-man.sh +++ b/installer/resources/poupdate-man.sh @@ -1,11 +1,26 @@ #!/bin/sh # +# Generate translated man pages from the po files. +# # can't get po4a to do this # +# NOTE: +# For new translations, add the file names to debian/i2p.manpages and/or debian/i2p-router.manpages. +# Don't forget to check in those files and .tx/config . +# Don't forget to mtn add and check in new files in man/ and locale-man/ . +# for i in eepget i2prouter i2prouter-nowrapper do - for j in es zh + for f in locale-man/man_*.po do + j=${f%.po} + j=${j#locale-man/man_} po4a-translate -f man -m man/$i.1 -p locale-man/man_$j.po -l man/$i.$j.1 -L UTF-8 -M UTF-8 -k 10 -v -d + if [ $? -ne 0 ] + then + echo "********* FAILED TRANSLATE FOR $j $i *************" + FAIL=1 + fi done done +exit $FAIL From a85546534e32eaf5e0d8f32b8360f2b413cee6c3 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 14:55:13 +0000 Subject: [PATCH 41/50] Streaming: Don't always send optional delay (ticket #1046) javadocs --- .../src/net/i2p/client/streaming/impl/Connection.java | 2 +- .../src/net/i2p/client/streaming/impl/Packet.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java index 1e33c793b..27a677756 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java @@ -388,7 +388,7 @@ class Connection { _log.debug("Requesting ack delay of " + delay + "ms for packet " + packet); } // WHY always set? - packet.setFlag(Packet.FLAG_DELAY_REQUESTED); + //packet.setFlag(Packet.FLAG_DELAY_REQUESTED); long timeout = _options.getRTO(); if (timeout > MAX_RESEND_DELAY) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java index 65ebe4f1f..f9e8cdecf 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java @@ -333,6 +333,9 @@ class Packet { */ public Signature getOptionalSignature() { return _optionSignature; } + /** + * This also sets flag FLAG_SIGNATURE_INCLUDED + */ public void setOptionalSignature(Signature sig) { setFlag(FLAG_SIGNATURE_INCLUDED, sig != null); _optionSignature = sig; @@ -346,6 +349,7 @@ class Packet { /** * This sets the from field in the packet to the Destination for the session * provided in the constructor. + * This also sets flag FLAG_FROM_INCLUDED */ public void setOptionalFrom() { setFlag(FLAG_FROM_INCLUDED, true); @@ -360,6 +364,9 @@ class Packet { */ public int getOptionalDelay() { return _optionDelay; } + /** + * Caller must also call setFlag(FLAG_DELAY_REQUESTED) + */ public void setOptionalDelay(int delayMs) { if (delayMs > MAX_DELAY_REQUEST) _optionDelay = MAX_DELAY_REQUEST; @@ -375,6 +382,10 @@ class Packet { * @return Maximum payload size sender can receive (MRU) */ public int getOptionalMaxSize() { return _optionMaxSize; } + + /** + * This also sets flag FLAG_MAX_PACKET_SIZE_INCLUDED + */ public void setOptionalMaxSize(int numBytes) { setFlag(FLAG_MAX_PACKET_SIZE_INCLUDED, numBytes > 0); _optionMaxSize = numBytes; From 9ab55ec36883d66ac6a90038d9c8d004d131893e Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 14:56:51 +0000 Subject: [PATCH 42/50] checklist update --- installer/resources/checklist.md | 1 + installer/resources/poupdate-man.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/installer/resources/checklist.md b/installer/resources/checklist.md index a9ee88f85..173d9f515 100644 --- a/installer/resources/checklist.md +++ b/installer/resources/checklist.md @@ -54,6 +54,7 @@ - For any invalid that break the test, fix up the po file manually, or fix on tx and pull again, or (if new) comment out in .tx/config (add a comment why) and delete the po file + - `installer/resources/poupdate-man.sh` to generate new man page translations - `mtn add` for any new po files - `mtn ci` all changed po files, and .tx/config if changed diff --git a/installer/resources/poupdate-man.sh b/installer/resources/poupdate-man.sh index fb3390d1b..c4ec94058 100755 --- a/installer/resources/poupdate-man.sh +++ b/installer/resources/poupdate-man.sh @@ -9,6 +9,7 @@ # Don't forget to check in those files and .tx/config . # Don't forget to mtn add and check in new files in man/ and locale-man/ . # +cd `dirname $0` for i in eepget i2prouter i2prouter-nowrapper do for f in locale-man/man_*.po From bbbbfe2417e03aa542e4390a1be97d7e88efec17 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 14:57:57 +0000 Subject: [PATCH 43/50] reduce concurrent graph generation for ARM --- .../java/src/net/i2p/router/web/StatSummarizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/StatSummarizer.java b/apps/routerconsole/java/src/net/i2p/router/web/StatSummarizer.java index edcc32733..4d5a0c979 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/StatSummarizer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/StatSummarizer.java @@ -38,7 +38,7 @@ public class StatSummarizer implements Runnable { private final List _listeners; // TODO remove static instance private static StatSummarizer _instance; - private static final int MAX_CONCURRENT_PNG = 3; + private static final int MAX_CONCURRENT_PNG = SystemVersion.isARM() ? 2 : 3; private final Semaphore _sem; private volatile boolean _isRunning = true; private boolean _isDisabled; From aa098ac80058fb9a1e3b3ab2071b4d6042cb3962 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 14:58:47 +0000 Subject: [PATCH 44/50] dont log deletion of deletelist.txt --- .../java/src/net/i2p/router/tasks/InstallUpdate.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/router/java/src/net/i2p/router/tasks/InstallUpdate.java b/router/java/src/net/i2p/router/tasks/InstallUpdate.java index 91456e8dd..aa706c126 100644 --- a/router/java/src/net/i2p/router/tasks/InstallUpdate.java +++ b/router/java/src/net/i2p/router/tasks/InstallUpdate.java @@ -202,16 +202,17 @@ public class InstallUpdate { if (df.isAbsolute()) continue; df = new File(context.getBaseDir(), fl); - if (df.exists() && !df.isDirectory()) { + if (df.exists() && df.isFile()) { if (df.delete()) System.out.println("INFO: File [" + fl + "] deleted"); } } - } catch (IOException ioe) {} - finally { + } catch (IOException ioe) { + } finally { if (in != null) try { in.close(); } catch(IOException ioe) {} - if (deleteFile.delete()) - System.out.println("INFO: File [" + DELETE_FILE + "] deleted"); + if (deleteFile.delete()) { + //System.out.println("INFO: File [" + DELETE_FILE + "] deleted"); + } } } } From afb87cd75cfb594e3c5d363caa2f7e5bac463632 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 19:09:12 +0000 Subject: [PATCH 45/50] NTCP: Don't write to an inbound connection before established, causing NPE (ticket #996) --- .../src/net/i2p/router/transport/ntcp/NTCPConnection.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java b/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java index 9fb9d4077..5e7bfcb0e 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java +++ b/router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java @@ -791,9 +791,11 @@ class NTCPConnection implements Closeable { private void prepareNextWriteFast(PrepBuffer buf) { if (_closed.get()) return; - //if (_log.shouldLog(Log.DEBUG)) - // _log.debug("prepare next write w/ isInbound? " + _isInbound + " established? " + _established); - if (!_isInbound && !isEstablished()) { + // Must be established or else session key is null and we can't encrypt + // This is normal for OB conns but can happen rarely for IB also. + // wantsWrite() is called at end of OB establishment, and + // enqueueInfoMessage() is called at end of IB establishment. + if (!isEstablished()) { return; } From 843b66d61ec36d2027dd07c6fd1c33449592039a Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 19:39:15 +0000 Subject: [PATCH 46/50] Streaming: Don't hard fail on expired message error (ticket #1748) --- .../java/src/net/i2p/client/streaming/impl/PacketQueue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java index b54b05c18..985065110 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java @@ -248,6 +248,8 @@ class PacketQueue implements SendMessageStatusListener, Closeable { case MessageStatusMessage.STATUS_SEND_GUARANTEED_FAILURE: // no tunnels may fix itself, allow retx case MessageStatusMessage.STATUS_SEND_FAILURE_NO_TUNNELS: + // probably took a long time to open the tunnel, allow retx + case MessageStatusMessage.STATUS_SEND_FAILURE_EXPIRED: if (_log.shouldLog(Log.WARN)) _log.warn("Rcvd soft failure status " + status + " for msg " + msgId + " on " + con); _messageStatusMap.remove(id); @@ -274,7 +276,6 @@ class PacketQueue implements SendMessageStatusListener, Closeable { case MessageStatusMessage.STATUS_SEND_FAILURE_BAD_MESSAGE: case MessageStatusMessage.STATUS_SEND_FAILURE_BAD_OPTIONS: case MessageStatusMessage.STATUS_SEND_FAILURE_OVERFLOW: - case MessageStatusMessage.STATUS_SEND_FAILURE_EXPIRED: case MessageStatusMessage.STATUS_SEND_FAILURE_LOCAL_LEASESET: case MessageStatusMessage.STATUS_SEND_FAILURE_UNSUPPORTED_ENCRYPTION: case MessageStatusMessage.STATUS_SEND_FAILURE_DESTINATION: From 36ec4de9c799a652ddd6772cf2a92c611582bc46 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 5 Feb 2017 20:56:40 +0000 Subject: [PATCH 47/50] Console: Consolidate timer threads (ticket #1068) Clear correct property if no users are set --- .../i2p/router/web/RouterConsoleRunner.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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 a00e94d31..888ccb131 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java @@ -19,6 +19,7 @@ import java.util.Map; import java.util.Properties; import java.util.SortedSet; import java.util.StringTokenizer; +import java.util.Timer; import java.util.concurrent.LinkedBlockingQueue; import net.i2p.I2PAppContext; @@ -95,6 +96,7 @@ public class RouterConsoleRunner implements RouterApp { private final ClientAppManager _mgr; private volatile ClientAppState _state = UNINITIALIZED; private static Server _server; + private static Timer _jettyTimer; private String _listenPort; private String _listenHost; private String _sslListenPort; @@ -235,6 +237,12 @@ public class RouterConsoleRunner implements RouterApp { PortMapper portMapper = _context.portMapper(); portMapper.unregister(PortMapper.SVC_CONSOLE); portMapper.unregister(PortMapper.SVC_HTTPS_CONSOLE); + synchronized(RouterConsoleRunner.class) { + if (_jettyTimer != null) { + _jettyTimer.cancel(); + _jettyTimer = null; + } + } changeState(STOPPED); } @@ -846,7 +854,7 @@ public class RouterConsoleRunner implements RouterApp { Map userpw = mgr.getMD5(PROP_CONSOLE_PW); if (userpw.isEmpty()) { enable = false; - ctx.router().saveConfig(PROP_CONSOLE_PW, "false"); + ctx.router().saveConfig(PROP_PW_ENABLE, "false"); } else { HashLoginService realm = new CustomHashLoginService(JETTY_REALM, context.getContextPath(), ctx.logManager().getLog(RouterConsoleRunner.class)); @@ -931,8 +939,18 @@ public class RouterConsoleRunner implements RouterApp { sec.setConstraintMappings(cmarr); context.setSecurityHandler(sec); + + // No, we can't share the ConstraintSecurityHandler across all webapps + // But we can force all webapps to use a single Timer thread + // see HashSessionManager javadoc + synchronized(RouterConsoleRunner.class) { + if (_jettyTimer == null) { + _jettyTimer = new Timer("Console HashSessionScavenger", true); + } + context.getServletContext().setAttribute("org.eclipse.jetty.server.session.timer", _jettyTimer); + } } - + /** * For logging authentication failures * @since 0.9.28 From a11bd7cbe7f3760efd85820dcb07a52e3ba4cc64 Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 8 Feb 2017 15:22:41 +0000 Subject: [PATCH 48/50] I2CP: Return local delivery failure on queue overflow (ticket #1939) --- .../client/streaming/impl/PacketQueue.java | 3 +- .../router/client/ClientConnectionRunner.java | 28 +++++++++++-------- .../net/i2p/router/client/ClientManager.java | 7 ++--- .../i2p/router/client/MessageReceivedJob.java | 14 +++++++++- 4 files changed, 34 insertions(+), 18 deletions(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java index 985065110..aaa91e685 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java @@ -250,6 +250,8 @@ class PacketQueue implements SendMessageStatusListener, Closeable { case MessageStatusMessage.STATUS_SEND_FAILURE_NO_TUNNELS: // probably took a long time to open the tunnel, allow retx case MessageStatusMessage.STATUS_SEND_FAILURE_EXPIRED: + // overflow in router-side I2CP queue, sent as of 0.9.29, will be retried + case MessageStatusMessage.STATUS_SEND_FAILURE_LOCAL: if (_log.shouldLog(Log.WARN)) _log.warn("Rcvd soft failure status " + status + " for msg " + msgId + " on " + con); _messageStatusMap.remove(id); @@ -269,7 +271,6 @@ class PacketQueue implements SendMessageStatusListener, Closeable { break; - case MessageStatusMessage.STATUS_SEND_FAILURE_LOCAL: case MessageStatusMessage.STATUS_SEND_FAILURE_ROUTER: case MessageStatusMessage.STATUS_SEND_FAILURE_NETWORK: case MessageStatusMessage.STATUS_SEND_FAILURE_BAD_SESSION: diff --git a/router/java/src/net/i2p/router/client/ClientConnectionRunner.java b/router/java/src/net/i2p/router/client/ClientConnectionRunner.java index 0e00b6af7..bd09aa249 100644 --- a/router/java/src/net/i2p/router/client/ClientConnectionRunner.java +++ b/router/java/src/net/i2p/router/client/ClientConnectionRunner.java @@ -720,40 +720,44 @@ class ClientConnectionRunner { } /** - * Asynchronously deliver the message to the current runner + * Synchronously deliver the message to the current runner * - * Note that no failure indication is available. - * Fails silently on e.g. queue overflow to client, client dead, etc. + * Failure indication is available as of 0.9.29. + * Fails on e.g. queue overflow to client, client dead, etc. * * @param toDest non-null * @param fromDest generally null when from remote, non-null if from local + * @return success */ - void receiveMessage(Destination toDest, Destination fromDest, Payload payload) { - if (_dead) return; + boolean receiveMessage(Destination toDest, Destination fromDest, Payload payload) { + if (_dead) + return false; MessageReceivedJob j = new MessageReceivedJob(_context, this, toDest, fromDest, payload, _dontSendMSMOnReceive); // This is fast and non-blocking, run in-line //_context.jobQueue().addJob(j); - j.runJob(); + //j.runJob(); + return j.receiveMessage(); } /** - * Asynchronously deliver the message to the current runner + * Synchronously deliver the message to the current runner * - * Note that no failure indication is available. - * Fails silently on e.g. queue overflow to client, client dead, etc. + * Failure indication is available as of 0.9.29. + * Fails on e.g. queue overflow to client, client dead, etc. * * @param toHash non-null * @param fromDest generally null when from remote, non-null if from local + * @return success * @since 0.9.21 */ - void receiveMessage(Hash toHash, Destination fromDest, Payload payload) { + boolean receiveMessage(Hash toHash, Destination fromDest, Payload payload) { SessionParams sp = _sessions.get(toHash); if (sp == null) { if (_log.shouldLog(Log.WARN)) _log.warn("No session found for receiveMessage()"); - return; + return false; } - receiveMessage(sp.dest, fromDest, payload); + return receiveMessage(sp.dest, fromDest, payload); } /** diff --git a/router/java/src/net/i2p/router/client/ClientManager.java b/router/java/src/net/i2p/router/client/ClientManager.java index fbea7a7f2..521b15ccf 100644 --- a/router/java/src/net/i2p/router/client/ClientManager.java +++ b/router/java/src/net/i2p/router/client/ClientManager.java @@ -417,11 +417,10 @@ class ClientManager { public String getName() { return "Distribute local message"; } public void runJob() { - _to.receiveMessage(_toDest, _fromDest, _payload); - // note that receiveMessage() does not indicate a failure, - // so a queue overflow is not recognized. we always return success. + boolean ok = _to.receiveMessage(_toDest, _fromDest, _payload); if (_from != null) { - _from.updateMessageDeliveryStatus(_fromDest, _msgId, _messageNonce, MessageStatusMessage.STATUS_SEND_SUCCESS_LOCAL); + int rc = ok ? MessageStatusMessage.STATUS_SEND_SUCCESS_LOCAL : MessageStatusMessage.STATUS_SEND_FAILURE_LOCAL; + _from.updateMessageDeliveryStatus(_fromDest, _msgId, _messageNonce, rc); } } } diff --git a/router/java/src/net/i2p/router/client/MessageReceivedJob.java b/router/java/src/net/i2p/router/client/MessageReceivedJob.java index 02ecc8dd6..1fd9651b0 100644 --- a/router/java/src/net/i2p/router/client/MessageReceivedJob.java +++ b/router/java/src/net/i2p/router/client/MessageReceivedJob.java @@ -48,7 +48,17 @@ class MessageReceivedJob extends JobImpl { public String getName() { return "Deliver New Message"; } public void runJob() { - if (_runner.isDead()) return; + receiveMessage(); + } + + /** + * Same as runJob() but with a return value + * @return success + * @since 0.9.29 + */ + public boolean receiveMessage() { + if (_runner.isDead()) + return false; MessageId id = null; try { long nextID = _runner.getNextMessageId(); @@ -59,6 +69,7 @@ class MessageReceivedJob extends JobImpl { _runner.setPayload(id, _payload); messageAvailable(id, _payload.getSize()); } + return true; } catch (I2CPMessageException ime) { String msg = "Error sending data to client " + _runner.getDestHash(); if (_log.shouldWarn()) @@ -67,6 +78,7 @@ class MessageReceivedJob extends JobImpl { _log.logAlways(Log.WARN, msg); if (id != null && !_sendDirect) _runner.removePayload(id); + return false; } } From f0241d4a1cfd52340d42f026fae0b623315d039d Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 8 Feb 2017 15:27:25 +0000 Subject: [PATCH 49/50] Util: Change logCloseLoop level to DEBUG --- core/java/src/net/i2p/util/Log.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/java/src/net/i2p/util/Log.java b/core/java/src/net/i2p/util/Log.java index fe0a4fb0a..e0240265d 100644 --- a/core/java/src/net/i2p/util/Log.java +++ b/core/java/src/net/i2p/util/Log.java @@ -206,20 +206,22 @@ public class Log { } /** - * logs a loop when closing a resource with level INFO + * logs a loop when closing a resource with level DEBUG * This method is for debugging purposes only and - * as such subject to change or removal w/o notice. + * is subject to change or removal w/o notice. + * NOT a supported API. * @param desc vararg description * @since 0.9.8 */ public void logCloseLoop(Object... desc) { - logCloseLoop(Log.INFO, desc); + logCloseLoop(Log.DEBUG, desc); } /** * Logs a close loop when closing a resource * This method is for debugging purposes only and - * as such subject to change or removal w/o notice. + * is subject to change or removal w/o notice. + * NOT a supported API. * @param desc vararg description of the resource * @param level level at which to log * @since 0.9.8 From 2d8f0c2956236e0d3b7373f96553c83218029b28 Mon Sep 17 00:00:00 2001 From: zzz Date: Thu, 9 Feb 2017 17:24:03 +0000 Subject: [PATCH 50/50] Streaming: Fix optional delay and choking (tickets #1046, 1939) - Don't always send optional delay - Don't overwrite choking delay with non-choking delay - Don't send optional delay of 0 every 8 packets - Don't set options both in CDR.buildPacket() and Conn.sendPacket() - Set or clear optional delay in packet when retransmitting - Move choking state variables from ConnectionOptions to Connection - Move updateAcks() call from PacketLocal to PacketQueue - Fully implement choking and un-choking - Reduce periods for some stats - Comment out some debug logging - Cleanups - Fix javadoc HTML broken in previous checkin --- .../i2p/client/streaming/impl/Connection.java | 124 +++++++++++++++--- .../impl/ConnectionDataReceiver.java | 46 +++---- .../streaming/impl/ConnectionManager.java | 12 +- .../streaming/impl/ConnectionOptions.java | 11 -- .../impl/ConnectionPacketHandler.java | 65 ++++++--- .../client/streaming/impl/MessageHandler.java | 2 +- .../streaming/impl/MessageInputStream.java | 5 +- .../streaming/impl/MessageOutputStream.java | 2 +- .../net/i2p/client/streaming/impl/Packet.java | 2 + .../client/streaming/impl/PacketHandler.java | 2 +- .../client/streaming/impl/PacketLocal.java | 12 -- .../client/streaming/impl/PacketQueue.java | 38 +++--- history.txt | 17 +++ .../src/net/i2p/router/RouterVersion.java | 2 +- 14 files changed, 224 insertions(+), 116 deletions(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java index 27a677756..d01d7a1da 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java @@ -69,6 +69,11 @@ class Connection { private int _lastCongestionSeenAt; private long _lastCongestionTime; private volatile long _lastCongestionHighestUnacked; + /** has the other side choked us? */ + private volatile boolean _isChoked; + /** are we choking the other side? */ + private volatile boolean _isChoking; + private final AtomicInteger _unchokesToSend = new AtomicInteger(); private final AtomicBoolean _ackSinceCongestion; /** Notify this on connection (or connection failure) */ private final Object _connectLock; @@ -102,6 +107,7 @@ class Connection { private static final long MAX_CONNECT_TIMEOUT = 2*60*1000; public static final int MAX_WINDOW_SIZE = 128; + private static final int UNCHOKES_TO_SEND = 8; /**** public Connection(I2PAppContext ctx, ConnectionManager manager, SchedulerChooser chooser, @@ -187,7 +193,7 @@ class Connection { long timeLeft = writeExpire - _context.clock().now(); synchronized (_outboundPackets) { if (!started) - _context.statManager().addRateData("stream.chokeSizeBegin", _outboundPackets.size(), timeoutMs); + _context.statManager().addRateData("stream.chokeSizeBegin", _outboundPackets.size()); if (start + 5*60*1000 < _context.clock().now()) // ok, 5 minutes blocking? I dont think so return false; @@ -205,20 +211,20 @@ class Connection { // Limit (highest-lowest) to twice the window (if far end doesn't like it, it can send a choke) int unacked = _outboundPackets.size(); int wsz = _options.getWindowSize(); - if (unacked >= wsz || + if (_isChoked || unacked >= wsz || _activeResends.get() >= (wsz + 1) / 2 || _lastSendId.get() - _highestAckedThrough >= Math.max(MAX_WINDOW_SIZE, 2 * wsz)) { if (timeoutMs > 0) { if (timeLeft <= 0) { if (_log.shouldLog(Log.INFO)) - _log.info("Outbound window is full " + unacked + _log.info("Outbound window is full (choked? " + _isChoked + ' ' + unacked + " unacked with " + _activeResends + " active resends" + " and we've waited too long (" + (0-(timeLeft - timeoutMs)) + "ms): " + toString()); return false; } if (_log.shouldLog(Log.DEBUG)) - _log.debug("Outbound window is full (" + unacked + "/" + wsz + "/" + _log.debug("Outbound window is full (choked? " + _isChoked + ' ' + unacked + '/' + wsz + '/' + _activeResends + "), waiting " + timeLeft); try { _outboundPackets.wait(Math.min(timeLeft,250l)); @@ -240,7 +246,7 @@ class Connection { } //10*1000 } } else { - _context.statManager().addRateData("stream.chokeSizeEnd", _outboundPackets.size(), _context.clock().now() - start); + _context.statManager().addRateData("stream.chokeSizeEnd", _outboundPackets.size()); return true; } } @@ -257,7 +263,7 @@ class Connection { } void ackImmediately() { - PacketLocal packet = null; + PacketLocal packet; /*** why would we do this? was it to force a congestion indication at the other end? an expensive way to do that... @@ -343,6 +349,12 @@ class Connection { } } + /** + * This sends all 'normal' packets (acks and data) for the first time. + * Retransmits are done in ResendPacketEvent below. + * Resets, pings, and pongs are done elsewhere in this class, + * or in ConnectionManager or ConnectionHandler. + */ void sendPacket(PacketLocal packet) { if (packet == null) return; @@ -353,8 +365,15 @@ class Connection { } if ( (packet.getSequenceNum() == 0) && (!packet.isFlagSet(Packet.FLAG_SYNCHRONIZE)) ) { - //if (_log.shouldLog(Log.DEBUG)) - // _log.debug("No resend for " + packet); + // ACK-only + if (_isChoking) { + packet.setOptionalDelay(Packet.SEND_DELAY_CHOKE); + packet.setFlag(Packet.FLAG_DELAY_REQUESTED); + } else if (_unchokesToSend.decrementAndGet() > 0) { + // don't worry about wrapping around + packet.setOptionalDelay(0); + packet.setFlag(Packet.FLAG_DELAY_REQUESTED); + } } else { int windowSize; int remaining; @@ -364,13 +383,18 @@ class Connection { remaining = windowSize - _outboundPackets.size() ; _outboundPackets.notifyAll(); } - // the other end has no idea what our window size is, so - // help him out by requesting acks below the 1/3 point, - // if remaining < 3, and every 8 minimum. - if (packet.isFlagSet(Packet.FLAG_CLOSE) || - (remaining < (windowSize + 2) / 3) || + + if (_isChoking) { + packet.setOptionalDelay(Packet.SEND_DELAY_CHOKE); + packet.setFlag(Packet.FLAG_DELAY_REQUESTED); + } else if (packet.isFlagSet(Packet.FLAG_CLOSE) || + _unchokesToSend.decrementAndGet() > 0 || + // the other end has no idea what our window size is, so + // help him out by requesting acks below the 1/3 point, + // if remaining < 3, and every 8 minimum. (remaining < 3) || - (packet.getSequenceNum() % 8 == 0)) { + (remaining < (windowSize + 2) / 3) /* || + (packet.getSequenceNum() % 8 == 0) */ ) { packet.setOptionalDelay(0); packet.setFlag(Packet.FLAG_DELAY_REQUESTED); //if (_log.shouldLog(Log.DEBUG)) @@ -380,15 +404,15 @@ class Connection { // since the other end limits it to getSendAckDelay() // which is always 2000, but it's good for diagnostics to see what the other end thinks // the RTT is. +/** int delay = _options.getRTT() / 2; packet.setOptionalDelay(delay); if (delay > 0) packet.setFlag(Packet.FLAG_DELAY_REQUESTED); if (_log.shouldLog(Log.DEBUG)) _log.debug("Requesting ack delay of " + delay + "ms for packet " + packet); +**/ } - // WHY always set? - //packet.setFlag(Packet.FLAG_DELAY_REQUESTED); long timeout = _options.getRTO(); if (timeout > MAX_RESEND_DELAY) @@ -984,6 +1008,55 @@ class Connection { } } + /** + * Set or clear if we are choking the other side. + * If on is true or the value has changed, this will call ackImmediately(). + * @param on true for choking + * @since 0.9.29 + */ + public void setChoking(boolean on) { + if (on != _isChoking) { + _isChoking = on; + if (!on) + _unchokesToSend.set(UNCHOKES_TO_SEND); + ackImmediately(); + } else if (on) { + ackImmediately(); + } + } + + /** + * Set or clear if we are being choked by the other side. + * @param on true for choked + * @since 0.9.29 + */ + public void setChoked(boolean on) { + _isChoked = on; + if (on) { + congestionOccurred(); + // https://en.wikipedia.org/wiki/Transmission_Control_Protocol + // When a receiver advertises a window size of 0, the sender stops sending data and starts the persist timer. + // The persist timer is used to protect TCP from a deadlock situation that could arise + // if a subsequent window size update from the receiver is lost, + // and the sender cannot send more data until receiving a new window size update from the receiver. + // When the persist timer expires, the TCP sender attempts recovery by sending a small packet + // so that the receiver responds by sending another acknowledgement containing the new window size. + // ... + // We don't do any of that, but we set the window size to 1, and let the retransmission + // of packets do the "attempted recovery". + getOptions().setWindowSize(1); + } + } + + /** + * Is the other side choking us? + * @return if choked + * @since 0.9.29 + */ + public boolean isChoked() { + return _isChoked; + } + /** how many packets have we sent and the other side has ACKed? * @return Count of how many packets ACKed. */ @@ -1381,10 +1454,18 @@ class Connection { // revamp various fields, in case we need to ack more, etc // updateAcks done in enqueue() //_inputStream.updateAcks(_packet); - int choke = getOptions().getChoke(); - _packet.setOptionalDelay(choke); - if (choke > 0) + if (_isChoking) { + _packet.setOptionalDelay(Packet.SEND_DELAY_CHOKE); _packet.setFlag(Packet.FLAG_DELAY_REQUESTED); + } else if (_unchokesToSend.decrementAndGet() > 0) { + // don't worry about wrapping around + _packet.setOptionalDelay(0); + _packet.setFlag(Packet.FLAG_DELAY_REQUESTED); + } else { + // clear flag + _packet.setFlag(Packet.FLAG_DELAY_REQUESTED, false); + } + // this seems unnecessary to send the MSS again: //_packet.setOptionalMaxSize(getOptions().getMaxMessageSize()); // bugfix release 0.7.8, we weren't dividing by 1000 @@ -1396,7 +1477,10 @@ class Connection { int newWindowSize = getOptions().getWindowSize(); - if (_ackSinceCongestion.get()) { + if (_isChoked) { + congestionOccurred(); + getOptions().setWindowSize(1); + } else if (_ackSinceCongestion.get()) { // only shrink the window once per window if (_packet.getSequenceNum() > _lastCongestionHighestUnacked) { congestionOccurred(); diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java index c8098024c..4450bb8c1 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java @@ -156,6 +156,11 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver { } /** + * Compose a packet. + * Most flags are set here; however, some are set in Connection.sendPacket() + * and Connection.ResendPacketEvent.retransmit(). + * Take care not to set the same options both here and in Connection. + * * @param buf data to be sent - may be null * @param off offset into the buffer to start writing from * @param size how many bytes of the buffer to write (may be 0) @@ -164,12 +169,11 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver { * @return the packet to be sent */ private PacketLocal buildPacket(byte buf[], int off, int size, boolean forceIncrement) { - Connection con = _connection; if (size > Packet.MAX_PAYLOAD_SIZE) throw new IllegalArgumentException("size is too large (" + size + ")"); - boolean ackOnly = isAckOnly(con, size); - boolean isFirst = (con.getAckedPackets() <= 0) && (con.getUnackedPacketsSent() <= 0); + boolean ackOnly = isAckOnly(_connection, size); + boolean isFirst = (_connection.getAckedPackets() <= 0) && (_connection.getUnackedPacketsSent() <= 0); - PacketLocal packet = new PacketLocal(_context, con.getRemotePeer(), con); + PacketLocal packet = new PacketLocal(_context, _connection.getRemotePeer(), _connection); //ByteArray data = packet.acquirePayload(); ByteArray data = new ByteArray(new byte[size]); if (size > 0) @@ -180,36 +184,32 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver { if ( (ackOnly && !forceIncrement) && (!isFirst) ) packet.setSequenceNum(0); else - packet.setSequenceNum(con.getNextOutboundPacketNum()); - packet.setSendStreamId(con.getSendStreamId()); - packet.setReceiveStreamId(con.getReceiveStreamId()); + packet.setSequenceNum(_connection.getNextOutboundPacketNum()); + packet.setSendStreamId(_connection.getSendStreamId()); + packet.setReceiveStreamId(_connection.getReceiveStreamId()); // not needed here, handled in PacketQueue.enqueue() //con.getInputStream().updateAcks(packet); - // note that the optional delay is usually rewritten in Connection.sendPacket() - int choke = con.getOptions().getChoke(); - packet.setOptionalDelay(choke); - if (choke > 0) - packet.setFlag(Packet.FLAG_DELAY_REQUESTED); + + // Do not set optional delay here, set in Connection.sendPacket() + // bugfix release 0.7.8, we weren't dividing by 1000 - packet.setResendDelay(con.getOptions().getResendDelay() / 1000); + packet.setResendDelay(_connection.getOptions().getResendDelay() / 1000); - if (con.getOptions().getProfile() == ConnectionOptions.PROFILE_INTERACTIVE) + if (_connection.getOptions().getProfile() == ConnectionOptions.PROFILE_INTERACTIVE) packet.setFlag(Packet.FLAG_PROFILE_INTERACTIVE, true); else packet.setFlag(Packet.FLAG_PROFILE_INTERACTIVE, false); - packet.setFlag(Packet.FLAG_SIGNATURE_REQUESTED, con.getOptions().getRequireFullySigned()); - //if ( (!ackOnly) && (packet.getSequenceNum() <= 0) ) { if (isFirst) { packet.setFlag(Packet.FLAG_SYNCHRONIZE); packet.setOptionalFrom(); - packet.setOptionalMaxSize(con.getOptions().getMaxMessageSize()); + packet.setOptionalMaxSize(_connection.getOptions().getMaxMessageSize()); } - packet.setLocalPort(con.getLocalPort()); - packet.setRemotePort(con.getPort()); - if (con.getSendStreamId() == Packet.STREAM_ID_UNKNOWN) { + packet.setLocalPort(_connection.getLocalPort()); + packet.setRemotePort(_connection.getPort()); + if (_connection.getSendStreamId() == Packet.STREAM_ID_UNKNOWN) { packet.setFlag(Packet.FLAG_NO_ACK); } @@ -221,10 +221,10 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver { // FIXME Implement better half-close by sending CLOSE whenever. Needs 0.9.9 bug fixes // throughout network? // - if (con.getOutputStream().getClosed() && - ( (size > 0) || (con.getUnackedPacketsSent() <= 0) || (packet.getSequenceNum() > 0) ) ) { + if (_connection.getOutputStream().getClosed() && + ( (size > 0) || (_connection.getUnackedPacketsSent() <= 0) || (packet.getSequenceNum() > 0) ) ) { packet.setFlag(Packet.FLAG_CLOSE); - con.notifyCloseSent(); + _connection.notifyCloseSent(); } if (_log.shouldLog(Log.DEBUG)) _log.debug("New OB pkt (acks not yet filled in): " + packet + " on " + _connection); diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionManager.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionManager.java index b132eab53..f98062b66 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionManager.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionManager.java @@ -105,13 +105,13 @@ class ConnectionManager { _context.statManager().createRateStat("stream.con.lifetimeSendWindowSize", "What is the final send window size when a stream closes?", "Stream", new long[] { 60*60*1000, 24*60*60*1000 }); _context.statManager().createRateStat("stream.receiveActive", "How many streams are active when a new one is received (period being not yet dropped)", "Stream", new long[] { 60*60*1000, 24*60*60*1000 }); // Stats for Connection - _context.statManager().createRateStat("stream.con.windowSizeAtCongestion", "How large was our send window when we send a dup?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 }); - _context.statManager().createRateStat("stream.chokeSizeBegin", "How many messages were outstanding when we started to choke?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 }); - _context.statManager().createRateStat("stream.chokeSizeEnd", "How many messages were outstanding when we stopped being choked?", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 }); - _context.statManager().createRateStat("stream.fastRetransmit", "How long a packet has been around for if it has been resent per the fast retransmit timer?", "Stream", new long[] { 60*1000, 10*60*1000 }); + _context.statManager().createRateStat("stream.con.windowSizeAtCongestion", "How large was our send window when we send a dup?", "Stream", new long[] { 60*60*1000 }); + _context.statManager().createRateStat("stream.chokeSizeBegin", "How many messages were outstanding when we started to choke?", "Stream", new long[] { 60*60*1000 }); + _context.statManager().createRateStat("stream.chokeSizeEnd", "How many messages were outstanding when we stopped being choked?", "Stream", new long[] { 60*60*1000 }); + _context.statManager().createRateStat("stream.fastRetransmit", "How long a packet has been around for if it has been resent per the fast retransmit timer?", "Stream", new long[] { 10*60*1000 }); // Stats for PacketQueue - _context.statManager().createRateStat("stream.con.sendMessageSize", "Size of a message sent on a connection", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 }); - _context.statManager().createRateStat("stream.con.sendDuplicateSize", "Size of a message resent on a connection", "Stream", new long[] { 60*1000, 10*60*1000, 60*60*1000 }); + _context.statManager().createRateStat("stream.con.sendMessageSize", "Size of a message sent on a connection", "Stream", new long[] { 10*60*1000, 60*60*1000 }); + _context.statManager().createRateStat("stream.con.sendDuplicateSize", "Size of a message resent on a connection", "Stream", new long[] { 10*60*1000, 60*60*1000 }); } Connection getConnectionByInboundId(long id) { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java index cd268c1f3..6979f3abe 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionOptions.java @@ -33,7 +33,6 @@ class ConnectionOptions extends I2PSocketOptionsImpl { private int _resendDelay; private int _sendAckDelay; private int _maxMessageSize; - private int _choke; private int _maxResends; private int _inactivityTimeout; private int _inactivityAction; @@ -327,7 +326,6 @@ class ConnectionOptions extends I2PSocketOptionsImpl { setWindowSize(opts.getWindowSize()); setResendDelay(opts.getResendDelay()); setMaxMessageSize(opts.getMaxMessageSize()); - setChoke(opts.getChoke()); setMaxResends(opts.getMaxResends()); setInactivityTimeout(opts.getInactivityTimeout()); setInactivityAction(opts.getInactivityAction()); @@ -677,15 +675,6 @@ class ConnectionOptions extends I2PSocketOptionsImpl { public int getMaxMessageSize() { return _maxMessageSize; } public void setMaxMessageSize(int bytes) { _maxMessageSize = Math.max(bytes, MIN_MESSAGE_SIZE); } - /** - * how long we want to wait before any data is transferred on the - * connection in either direction - * - * @return how long to wait before any data is transferred in either direction in ms - */ - public int getChoke() { return _choke; } - public void setChoke(int ms) { _choke = ms; } - /** * What profile do we want to use for this connection? * TODO: Only bulk is supported so far. diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java index bb5dd63f4..7f37a0682 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java @@ -96,23 +96,27 @@ class ConnectionPacketHandler { boolean choke = false; if (packet.isFlagSet(Packet.FLAG_DELAY_REQUESTED)) { - if (packet.getOptionalDelay() > 60000) { + if (packet.getOptionalDelay() >= Packet.MIN_DELAY_CHOKE) { // requested choke choke = true; + if (_log.shouldWarn()) + _log.warn("Got a choke on connection " + con + ": " + packet); //con.getOptions().setRTT(con.getOptions().getRTT() + 10*1000); } + // Only call this if the flag is set + con.setChoked(choke); } if (!con.getInputStream().canAccept(seqNum, packet.getPayloadSize())) { if (_log.shouldWarn()) _log.warn("Inbound buffer exceeded on connection " + con + - ", dropping " + packet); - con.getOptions().setChoke(61*1000); + ", choking and dropping " + packet); + // this will call ackImmediately() + con.setChoking(true); + // TODO we could still process the acks for this packet before discarding packet.releasePayload(); - con.ackImmediately(); return; - } - con.getOptions().setChoke(0); + } // else we will call setChoking(false) below _context.statManager().addRateData("stream.con.receiveMessageSize", packet.getPayloadSize()); @@ -132,12 +136,20 @@ class ConnectionPacketHandler { // MessageInputStream will know the last sequence number. // But not ack-only packets! boolean isNew; - if (seqNum > 0 || isSYN) - isNew = con.getInputStream().messageReceived(seqNum, packet.getPayload()); - else - isNew = false; - if (!allowAck) + if (seqNum > 0 || isSYN) { + isNew = con.getInputStream().messageReceived(seqNum, packet.getPayload()) && + !allowAck; + } else { isNew = false; + } + + if (isNew && packet.getPayloadSize() > 1500) { + // don't clear choking unless it was new, and a big packet + // this will call ackImmediately() if changed + // TODO if this filled in a hole, we shouldn't unchoke + // TODO a bunch of small packets should unchoke also + con.setChoking(false); + } //if ( (packet.getSequenceNum() == 0) && (packet.getPayloadSize() > 0) ) { // if (_log.shouldLog(Log.DEBUG)) @@ -158,7 +170,6 @@ class ConnectionPacketHandler { _log.debug(type + " IB pkt: " + packet + " on " + con); } - boolean fastAck = false; boolean ackOnly = false; if (isNew) { @@ -170,6 +181,9 @@ class ConnectionPacketHandler { _log.debug("Scheduling immediate ack for " + packet); //con.setNextSendTime(_context.clock().now() + con.getOptions().getSendAckDelay()); // honor request "almost" immediately + // TODO the 250 below _may_ be a big limiter in how fast local "loopback" connections + // can go, however if it goes too fast then we start choking which causes + // frequent stalls anyway. con.setNextSendTime(_context.clock().now() + 250); } else { int delay = con.getOptions().getSendAckDelay(); @@ -222,14 +236,16 @@ class ConnectionPacketHandler { } } + boolean fastAck; if (isSYN && (packet.getSendStreamId() <= 0) ) { // don't honor the ACK 0 in SYN packets received when the other side // has obviously not seen our messages + fastAck = false; } else { fastAck = ack(con, packet.getAckThrough(), packet.getNacks(), packet, isNew, choke); } con.eventOccurred(); - if (fastAck) { + if (fastAck && !choke) { if (!isNew) { // if we're congested (fastAck) but this is also a new packet, // we've already scheduled an ack above, so there is no need to schedule @@ -266,6 +282,8 @@ class ConnectionPacketHandler { /** * Process the acks in a received packet, and adjust our window and RTT + * @param isNew was it a new packet? false for ack-only + * @param choke did we get a choke in the packet? * @return are we congested? */ private boolean ack(Connection con, long ackThrough, long nacks[], Packet packet, boolean isNew, boolean choke) { @@ -354,16 +372,25 @@ class ConnectionPacketHandler { return rv; } - /** @return are we congested? */ + /** + * This either does nothing or increases the window, it never decreases it. + * Decreasing is done in Connection.ResendPacketEvent.retransmit() + * + * @param isNew was it a new packet? false for ack-only + * @param sequenceNum 0 for ack-only + * @param choke did we get a choke in the packet? + * @return are we congested? + */ private boolean adjustWindow(Connection con, boolean isNew, long sequenceNum, int numResends, int acked, boolean choke) { - boolean congested = false; - if ( (!isNew) && (sequenceNum > 0) ) { + boolean congested; + if (choke || (!isNew && sequenceNum > 0) || con.isChoked()) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Congestion occurred on the sending side. Not adjusting window "+con); - congested = true; - } - + } else { + congested = false; + } + long lowest = con.getHighestAckedThrough(); // RFC 2581 // Why wait until we get a whole cwin to start updating the window? diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java index 477f7476f..234585c04 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java @@ -14,7 +14,7 @@ import net.i2p.util.Log; /** * Receive raw information from the I2PSession and turn it into * Packets, if we can. - *<p> + *

                                * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream */ class MessageHandler implements I2PSessionMuxedListener { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java index adf401a34..858f59157 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java @@ -16,9 +16,9 @@ import net.i2p.util.Log; /** * Stream that can be given messages out of order * yet present them in order. - *<p> + *

                                * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream - *<p> + *

                                * This buffers unlimited data via messageReceived() - * limiting / blocking is done in ConnectionPacketHandler.receivePacket(). * @@ -102,6 +102,7 @@ class MessageInputStream extends InputStream { /** * Determine if this packet will fit in our buffering limits. + * Always returns true for zero payloadSize. * * @return true if we have room. If false, do not call messageReceived() * @since 0.9.20 moved from ConnectionPacketHandler.receivePacket() so it can all be under one lock, diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java index b5f1113d9..72b2e0251 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java @@ -16,7 +16,7 @@ import net.i2p.util.SimpleTimer2; * A stream that we can shove data into that fires off those bytes * on flush or when the buffer is full. It also blocks according * to the data receiver's needs. - *<p> + *

                                * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession */ class MessageOutputStream extends OutputStream { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java index f9e8cdecf..72751f0c3 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java @@ -164,6 +164,8 @@ class Packet { public static final int DEFAULT_MAX_SIZE = 32*1024; protected static final int MAX_DELAY_REQUEST = 65535; + public static final int MIN_DELAY_CHOKE = 60001; + public static final int SEND_DELAY_CHOKE = 61000; /** * Does no initialization. diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java index 7ca70cd27..39350affc 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java @@ -11,7 +11,7 @@ import net.i2p.util.Log; /** * receive a packet and dispatch it correctly to the connection specified, * the server socket, or queue a reply RST packet. - *<p> + *

                                * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream */ class PacketHandler { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketLocal.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketLocal.java index 2b26b0aad..80b4d2920 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketLocal.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketLocal.java @@ -111,18 +111,6 @@ class PacketLocal extends Packet implements MessageOutputStream.WriteStatus { FLAG_ECHO); } - /** last minute update of ack fields, just before write/sign */ - public void prepare() { - if (_connection != null) - _connection.getInputStream().updateAcks(this); - int numSends = _numSends.get(); - if (numSends > 0) { - // so we can debug to differentiate resends - setOptionalDelay(numSends * 1000); - setFlag(FLAG_DELAY_REQUESTED); - } - } - public long getCreatedOn() { return _createdOn; } public long getLifetime() { return _context.clock().now() - _createdOn; } public void incrementSends() { diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java index aaa91e685..5d807ddc9 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java @@ -23,7 +23,7 @@ import net.i2p.util.SimpleTimer2; * Well, thats the theory at least... in practice we just * send them immediately with no blocking, since the * mode=bestEffort doesnt block in the SDK. - *<p> + *

                                * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession */ class PacketQueue implements SendMessageStatusListener, Closeable { @@ -64,7 +64,8 @@ class PacketQueue implements SendMessageStatusListener, Closeable { } /** - * Add a new packet to be sent out ASAP + * Add a new packet to be sent out ASAP. + * This updates the acks. * * keys and tags disabled since dropped in I2PSession * @return true if sent @@ -72,8 +73,6 @@ class PacketQueue implements SendMessageStatusListener, Closeable { public boolean enqueue(PacketLocal packet) { if (_dead) return false; - // this updates the ack/nack field - packet.prepare(); //SessionKey keyUsed = packet.getKeyUsed(); //if (keyUsed == null) @@ -87,6 +86,12 @@ class PacketQueue implements SendMessageStatusListener, Closeable { _log.debug("Not resending " + packet); return false; } + + Connection con = packet.getConnection(); + if (con != null) { + // this updates the ack/nack fields + con.getInputStream().updateAcks(packet); + } ByteArray ba = _cache.acquire(); byte buf[] = ba.getData(); @@ -96,14 +101,14 @@ class PacketQueue implements SendMessageStatusListener, Closeable { boolean sent = false; try { int size = 0; - long beforeWrite = System.currentTimeMillis(); + //long beforeWrite = System.currentTimeMillis(); if (packet.shouldSign()) size = packet.writeSignedPacket(buf, 0); else size = packet.writePacket(buf, 0); - long writeTime = System.currentTimeMillis() - beforeWrite; - if ( (writeTime > 1000) && (_log.shouldLog(Log.WARN)) ) - _log.warn("took " + writeTime + "ms to write the packet: " + packet); + //long writeTime = System.currentTimeMillis() - beforeWrite; + //if ( (writeTime > 1000) && (_log.shouldLog(Log.WARN)) ) + // _log.warn("took " + writeTime + "ms to write the packet: " + packet); // last chance to short circuit... if (packet.getAckTime() > 0) return false; @@ -121,7 +126,6 @@ class PacketQueue implements SendMessageStatusListener, Closeable { options.setDate(expires); boolean listenForStatus = false; if (packet.isFlagSet(FLAGS_INITIAL_TAGS)) { - Connection con = packet.getConnection(); if (con != null) { if (con.isInbound()) options.setSendLeaseSet(false); @@ -141,7 +145,6 @@ class PacketQueue implements SendMessageStatusListener, Closeable { options.setTagsToSend(FINAL_TAGS_TO_SEND); options.setTagThreshold(FINAL_TAG_THRESHOLD); } else { - Connection con = packet.getConnection(); if (con != null) { if (con.isInbound() && con.getLifetime() < 2*60*1000) options.setSendLeaseSet(false); @@ -157,7 +160,7 @@ class PacketQueue implements SendMessageStatusListener, Closeable { long id = session.sendMessage(packet.getTo(), buf, 0, size, I2PSession.PROTO_STREAMING, packet.getLocalPort(), packet.getRemotePort(), options, this); - _messageStatusMap.put(Long.valueOf(id), packet.getConnection()); + _messageStatusMap.put(Long.valueOf(id), con); sent = true; } else { sent = session.sendMessage(packet.getTo(), buf, 0, size, @@ -173,7 +176,6 @@ class PacketQueue implements SendMessageStatusListener, Closeable { if (packet.getNumSends() > 1) _context.statManager().addRateData("stream.con.sendDuplicateSize", size, packet.getLifetime()); - Connection con = packet.getConnection(); if (con != null) { con.incrementBytesSent(size); if (packet.getNumSends() > 1) @@ -189,17 +191,15 @@ class PacketQueue implements SendMessageStatusListener, Closeable { if (!sent) { if (_log.shouldLog(Log.WARN)) _log.warn("Send failed for " + packet); - Connection c = packet.getConnection(); - if (c != null) // handle race on b0rk - c.disconnect(false); + if (con != null) // handle race on b0rk + con.disconnect(false); } else { //packet.setKeyUsed(keyUsed); //packet.setTagsSent(tagsSent); packet.incrementSends(); - Connection c = packet.getConnection(); - if (c != null && _log.shouldDebug()) { - String suffix = "wsize " + c.getOptions().getWindowSize() + " rto " + c.getOptions().getRTO(); - c.getConnectionManager().getPacketHandler().displayPacket(packet, "SEND", suffix); + if (con != null && _log.shouldDebug()) { + String suffix = "wsize " + con.getOptions().getWindowSize() + " rto " + con.getOptions().getRTO(); + con.getConnectionManager().getPacketHandler().displayPacket(packet, "SEND", suffix); } if (I2PSocketManagerFull.pcapWriter != null && _context.getBooleanProperty(I2PSocketManagerFull.PROP_PCAP)) diff --git a/history.txt b/history.txt index fcb36a48e..b547287ae 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,21 @@ +2017-02-09 zzz + * Streaming: Fix optional delay and choking (tickets #1046, 1939) + +2017-02-08 zzz + * I2CP: Return local delivery failure on queue overflow (ticket #1939) + +2017-02-05 zzz + * Console: Consolidate timer threads (ticket #1068) + * NTCP: Don't write to an inbound connection before + fully established, causing NPE (ticket #996) + * Streaming: + - Don't always send optional delay (ticket #1046) + - Don't hard fail on expired message error (ticket #1748) + 2017-02-04 zzz + * HTTP proxies: + - Pass through relative referer URIs, convert same-origin + absolute referer URIs to relative (ticket #1862) * NTP: Enable IPv6 support (ticket #1896) 2017-01-30 zzz diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 4e28a2c8d..c10128fe6 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 = 5; + public final static long BUILD = 6; /** for example "-test" */ public final static String EXTRA = "";