Changeset 9a11165


Ignore:
Timestamp:
Sep 29, 2018 8:40:20 AM (2 years ago)
Author:
slumlord <slumlord@…>
Branches:
master
Children:
c069f76
Parents:
be4c1af (diff), 3a5f020 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

propagate from branch 'i2p.i2p' (head effa099b40ff593227c59707a33922176dc775b1)

to branch 'i2p.i2p.slumlord' (head 5ddcc0dd19779b78356459bd074f75943d5d42d1)

Files:
76 added
18 deleted
29 edited
28 moved

Legend:

Unmodified
Added
Removed
  • .mtn-ignore

    rbe4c1af r9a11165  
    7474\.iml$
    7575
     76
     77# Meeh stuff
     78target/scala-2.12
     79target/streams
     80project/target
     81launchers/macosx/project/project/target
     82launchers/macosx/I2PLauncher.xcodeproj/project.xcworkspace/xcuserdata
     83launchers/macosx/I2PLauncher.xcodeproj/xcuserdata
     84launchers/macosx/I2PLauncher.xcworkspace/xcuserdata
     85launchers/macosx/I2PLauncher.app
     86launchers/macosx/target
     87
  • LICENSE.txt

    rbe4c1af r9a11165  
    298298   Public domain.
    299299
    300    Tomcat 8.5.30 (jasper-runtime.jar):
     300   Tomcat 8.5.34 (jasper-runtime.jar):
    301301   (not included in most distribution packages)
    302302   Copyright 1999-2018 The Apache Software Foundation
  • apps/i2ptunnel/java/build.xml

    rbe4c1af r9a11165  
    306306        <mkdir dir="../jsp/WEB-INF/" />
    307307        <mkdir dir="../jsp/WEB-INF/classes" />
    308         <!-- there are various jspc ant tasks, but they all seem a bit flakey -->
    309         <java classname="org.apache.jasper.JspC" fork="true" failonerror="true">
     308        <!-- See apps/routerconsole/java/build.xml for important JspC build documentation -->
     309        <java classname="net.i2p.servlet.util.JspC" fork="true" failonerror="true">
     310            <!-- these are to detect tomcat version and reproducible build setting -->
     311            <jvmarg value="-Dbuild.reproducible=${build.reproducible}" />
     312            <jvmarg value="-Dwith-libtomcat8-java=${with-libtomcat8-java}" />
     313            <jvmarg value="-Djasper.jar=../../jetty/jettylib/jasper-runtime.jar" />
    310314            <classpath>
    311315                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/IRCFilter.java

    rbe4c1af r9a11165  
    2525    private static final boolean ALLOW_ALL_CTCP_OUT = false;
    2626
    27     /*************************************************************************
    28      *
    29      *  Modify or filter a single inbound line.
    30      *
    31      *  @param helper may be null
    32      *  @return the original or modified line, or null if it should be dropped.
    33      */
    34     public static String inboundFilter(String s, StringBuffer expectedPong, DCCHelper helper) {
    35        
    36         String field[] = DataHelper.split(s, " ", 4);
    37         String command;
    38         int idx=0;
     27    private static final Set<String> _allowedInbound;
     28    static {
    3929        final String[] allowedCommands =
    4030        {
     
    5848                "AWAY"
    5949        };
     50        _allowedInbound = new HashSet<String>(Arrays.asList(allowedCommands));
     51    }
     52
     53    /*************************************************************************
     54     *
     55     *  Modify or filter a single inbound line.
     56     *
     57     *  @param helper may be null
     58     *  @return the original or modified line, or null if it should be dropped.
     59     */
     60    public static String inboundFilter(String s, StringBuffer expectedPong, DCCHelper helper) {
     61       
     62        String field[] = DataHelper.split(s, " ", 4);
     63        String command;
     64        int idx=0;
    6065       
    6166
     
    95100       
    96101        // Allow all allowedCommands
    97         for(int i=0;i<allowedCommands.length;i++) {
    98             if(allowedCommands[i].equals(command))
     102        if (_allowedInbound.contains(command)) {
    99103                return s;
    100104        }
  • apps/i2ptunnel/jsp/ssl.jsp

    rbe4c1af r9a11165  
    156156                kspw = JettyXmlConfigurationParser.deobfuscate(kspw);
    157157            } else {
    158                 kspw = net.i2p.crypto.KeyStoreUtil.DEFAULT_KEYSTORE_PASSWORD;
     158                kspw = KeyStoreUtil.DEFAULT_KEYSTORE_PASSWORD;
    159159            }
    160160            if (!net.i2p.i2ptunnel.web.IndexBean.haveNonce(nonce)) {
     
    187187                    if (altb32 != null && altb32.length() > 0)
    188188                        altNames.add(altb32);
    189                     altNames.addAll(spoofs.values());
     189                    for (String s : spoofs.values()) {
     190                         // only add if apparently local, don't expose IP if routed externally
     191                         if (s.startsWith("127.") || s.startsWith("192.168.") || s.startsWith("10."))
     192                             altNames.add(s);
     193                    }
    190194                    File ks = new File(ksPath);
    191195                    if (ks.exists()) {
     
    203207                        String alg = haveEC ? "EC" : "RSA";
    204208                        int sz = haveEC ? 256 : 2048;
    205                         Object[] rv = net.i2p.crypto.KeyStoreUtil.createKeysAndCRL(ks, kspw, "eepsite", name, altNames, b32,
    206                                                                                    3652, alg, sz, newpw);
     209                        Object[] rv = KeyStoreUtil.createKeysAndCRL(ks, kspw, "eepsite", name, altNames, b32,
     210                                                                    3652, alg, sz, newpw);
    207211                        msgs.append("Created selfsigned cert\n");
    208212                        // save cert
  • apps/jetty/apache-tomcat-8.5.34/NOTICE

    rbe4c1af r9a11165  
    33
    44This product includes software developed at
    5 The Apache Software Foundation (http://www.apache.org/).
     5The Apache Software Foundation (https://www.apache.org/).
    66
    77This software contains code derived from netty-native
    88developed by the Netty project
    9 (http://netty.io, https://github.com/netty/netty-tcnative/)
     9(https://netty.io, https://github.com/netty/netty-tcnative/)
    1010and from finagle-native developed at Twitter
    1111(https://github.com/twitter/finagle).
     
    2020JDT Core Batch Compiler component, which is open source software.
    2121The original software and related information is available at
    22 http://www.eclipse.org/jdt/core/.
     22https://www.eclipse.org/jdt/core/.
    2323
    2424For portions of the Tomcat JNI OpenSSL API and the OpenSSL JSSE integration
  • apps/routerconsole/java/build.xml

    rbe4c1af r9a11165  
    354354        <mkdir dir="../jsp/WEB-INF/classes" />
    355355
    356         <!-- there are various jspc ant tasks, but they all seem a bit flakey -->
     356        <!-- There are various jspc ant tasks, but they all seem a bit flakey.
     357             Warning - jspC will fail on unknown options,
     358             check oldest libtomcat8-java distro package version we use.
     359             Jessie has 8.0.14; xenial has 8.0.32; we bundle for precise/trusty.
     360             Add below to get supported options:
     361                <arg value="-help" />
     362          -->
    357363        <!--
    358364           **     Usage: jspc <options> <jsp files>
     
    382388           **         -xpoweredBy        Add X-Powered-By response header
    383389           **         -trimSpaces        Trim spaces in template text between actions, directives
     390           **     Following as of ?.?.??:
     391           **         -javaEncoding <enc> Set the encoding charset for Java classes (default UTF-8)
     392           **         -source <version>   Set the -source argument to the compiler (default 1.7)
     393           **         -target <version>   Set the -target argument to the compiler (default 1.7)
     394           **     Following as of 8.5.33:
     395           **         -threadCount <count>  Number of threads to use for compilation.
     396           **                               (default one per core)
     397           **                               ("2.0C" means two threads per core)
    384398        -->
    385         <java classname="org.apache.jasper.JspC" fork="true" failonerror="true">
     399        <!--
     400           **  Simply call org.apache.jasper.JspC, then exit.
     401           **
     402           **  As of Tomcat 8.5.33, forking their JspC won't complete,
     403           **  because the JspC compilation is now threaded and the thread pool workers aren't daemons.
     404           **  Will be fixed in 8.5.35, but we don't know what version distros may have.
     405           **
     406           **  https://tomcat.apache.org/tomcat-8.5-doc/changelog.html
     407           **  https://bz.apache.org/bugzilla/show_bug.cgi?id=53492
     408           **  http://trac.i2p2.i2p/ticket/2307
     409           **  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908884
     410           **  https://bz.apache.org/bugzilla/show_bug.cgi?id=62674
     411           **
     412           **  We could set fork=false in build.xml, but then the paths are all wrong.
     413        -->
     414        <java classname="net.i2p.servlet.util.JspC" fork="true" failonerror="true">
    386415            <!-- this prevents tomcat from complaining in debian builds -->
    387416            <jvmarg value="-Dtomcat.util.scan.StandardJarScanFilter.jarsToSkip=commons-collections.jar,junit.jar,junit4.jar" />
     417            <!-- these are to detect tomcat version and reproducible build setting -->
     418            <jvmarg value="-Dbuild.reproducible=${build.reproducible}" />
     419            <jvmarg value="-Dwith-libtomcat8-java=${with-libtomcat8-java}" />
     420            <jvmarg value="-Djasper.jar=../../jetty/jettylib/jasper-runtime.jar" />
    388421            <classpath>
    389422                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
  • apps/routerconsole/java/src/net/i2p/router/update/PluginUpdateRunner.java

    rbe4c1af r9a11165  
    2929import net.i2p.util.SecureDirectory;
    3030import net.i2p.util.SecureFile;
     31import net.i2p.util.SystemVersion;
    3132import net.i2p.util.VersionComparator;
    3233
     
    475476                    statusDone("<b>" + _t("Plugin requires Jetty version {0} or lower", "8.9999") + "</b>");
    476477                    return;
     478                }
     479                if (SystemVersion.isJava9()) {
     480                    blacklistVersion = PluginStarter.java9Blacklist.get(appName);
     481                    if (blacklistVersion != null &&
     482                        VersionComparator.comp(version, blacklistVersion) <= 0) {
     483                        to.delete();
     484                        statusDone("<b>" + _t("Plugin requires Java version {0} or lower", "8.9999") + "</b>");
     485                        return;
     486                    }
    477487                }
    478488                maxVersion = PluginStarter.stripHTML(props, "max-jetty-version");
  • apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java

    rbe4c1af r9a11165  
    3737import net.i2p.util.PortMapper;
    3838import net.i2p.util.SimpleTimer2;
     39import net.i2p.util.SystemVersion;
    3940import net.i2p.util.Translate;
    4041import net.i2p.util.VersionComparator;
     
    7980
    8081    static {
    81         Map<String, String> map = new HashMap<String, String>(4);
     82        Map<String, String> map = new HashMap<String, String>(2);
    8283        map.put("i2pbote", "0.4.5");
    8384        map.put("BwSchedule", "0.0.36");
    8485        jetty9Blacklist = Collections.unmodifiableMap(map);
     86    }
     87
     88    /**
     89     *  Plugin name to plugin version of plugins that do not work
     90     *  with Java 9+
     91     *  Unmodifiable.
     92     *
     93     *  @since 0.9.30
     94     */
     95    public static final Map<String, String> java9Blacklist;
     96
     97    static {
     98        Map<String, String> map = new HashMap<String, String>(2);
     99        map.put("01_neodatis", "2.1-2.14-209-17");
     100        map.put("02_seedless", "0.1.7-0.1.12");
     101        java9Blacklist = Collections.unmodifiableMap(map);
    85102    }
    86103
     
    361378            foo = gettext("Plugin requires Jetty version {0} or lower", "8.9999", ctx);
    362379            throw new Exception(foo);
     380        }
     381
     382        if (SystemVersion.isJava9()) {
     383            blacklistVersion = java9Blacklist.get(appName);
     384            if (blacklistVersion != null &&
     385                VersionComparator.comp(curVersion, blacklistVersion) <= 0) {
     386                String foo = "Plugin " + appName + " requires Jetty version 8.9999 or lower";
     387                log.error(foo);
     388                disablePlugin(appName);
     389                foo = gettext("Plugin requires Java version {0} or lower", "8.9999", ctx);
     390                throw new Exception(foo);
     391            }
    363392        }
    364393
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/HomeHelper.java

    rbe4c1af r9a11165  
    7070        //"killyourtv.i2p" + S + _x("Debian and Tahoe-LAFS repositories") + S + "http://killyourtv.i2p/" + S + I + "television_delete.png" + S +
    7171        //_x("Open4You") + S + _x("Free eepsite hosting with PHP and MySQL") + S + "http://open4you.i2p/" + S + I + "open4you-logo.png" + S +
    72         _x("Pastebin") + S + _x("Encrypted I2P Pastebin") + S + "http://zerobin.i2p/" + S + I + "paste_plain.png" + S +
     72        //_x("Pastebin") + S + _x("Encrypted I2P Pastebin") + S + "http://zerobin.i2p/" + S + I + "paste_plain.png" + S +
    7373        _x("Planet I2P") + S + _x("I2P News") + S + "http://planet.i2p/" + S + I + "world.png" + S +
    7474        _x("I2P Plugins") + S + _x("Add-on directory") + S + "http://i2pwiki.i2p/index.php?title=Plugins" + S + I + "info/plugin_link.png" + S +
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/SybilRenderer.java

    rbe4c1af r9a11165  
    6666    private static final double POINTS_US24 = 25.0;
    6767    private static final double POINTS_US16 = 10.0;
    68     private static final double POINTS_FAMILY = -2.0;
     68    private static final double POINTS_FAMILY = -10.0;
    6969    private static final double POINTS_BAD_OUR_FAMILY = 100.0;
    7070    private static final double POINTS_OUR_FAMILY = -100.0;
     
    7272    private static final double PAIR_DISTANCE_FACTOR = 2.0;
    7373    private static final double OUR_KEY_FACTOR = 4.0;
    74     private static final double MIN_DISPLAY_POINTS = 5.0;
     74    private static final double MIN_DISPLAY_POINTS = 12.01;
    7575    private static final double VERSION_FACTOR = 1.0;
    7676    private static final double POINTS_BAD_VERSION = 50.0;
     
    561561            int i0 = i >> 8;
    562562            int i1 = i & 0xff;
    563             String sip = i0 + "." + i1 + ".0/16";
     563            String sip = i0 + "." + i1 + ".0.0/16";
    564564            buf.append("<p class=\"sybil_info\"><b>").append(count).append(" floodfills with IP <a href=\"/netdb?ip=")
    565565               .append(sip).append("&amp;sybil\">").append(sip)
     
    588588
    589589    private void renderIPGroupsFamily(Writer out, StringBuilder buf, List<RouterInfo> ris, Map<Hash, Points> points) throws IOException {
    590         buf.append("<h3 id=\"samefamily\" class=\"sybils\">Floodfills in the Same Declared Family</h3><div class=\"sybil_container\">");
     590        buf.append("<h3 id=\"samefamily\" class=\"sybils\">Floodfills in the same Family</h3><div class=\"sybil_container\">");
    591591        ObjectCounter<String> oc = new ObjectCounter<String>();
    592592        for (RouterInfo info : ris) {
     
    620620                if (fkc != null && s.equals(ourFamily)) {
    621621                    if (fkc.verifyOurFamily(info))
    622                         addPoints(points, info.getHash(), POINTS_OUR_FAMILY, "Our family \"" + DataHelper.escapeHTML(s) + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
     622                        addPoints(points, info.getHash(), POINTS_OUR_FAMILY, "Our family \"" + ss + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
    623623                    else
    624                         addPoints(points, info.getHash(), POINTS_BAD_OUR_FAMILY, "Spoofed our family \"" + DataHelper.escapeHTML(s) + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
     624                        addPoints(points, info.getHash(), POINTS_BAD_OUR_FAMILY, "Spoofed our family \"" + ss + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
    625625                } else if (count > 1) {
    626                     addPoints(points, info.getHash(), point, "Same declared family \"" + DataHelper.escapeHTML(s) + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
     626                    addPoints(points, info.getHash(), point, "In family \"" + ss + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
    627627                } else {
    628                     addPoints(points, info.getHash(), point, "Declared family \"" + DataHelper.escapeHTML(s) + '"');
     628                    addPoints(points, info.getHash(), point, "In family \"" + ss + '"');
    629629                }
    630630            }
  • apps/routerconsole/jsp/help-advancedsettings.jsi

    rbe4c1af r9a11165  
    11<h2>Advanced Router Configuration</h2>
    22
    3 <p class="infohelp">The router configuration options listed below are not available in the user interface, usually because they are rarely used or provide access to advanced settings that most users will not need. This is not a comprehensive list. Some settings will require a restart of the router to take effect. Note that all settings are case sensitive. You will need to edit your <code>router.config</code> file to add options, or, once you have added <code>routerconsole.advanced=true</code> to the router.config file, you may edit settings within the console on the <a href="/configadvanced">Advanced Configuration page</a>.</p>
     3<p class="infohelp">The router configuration options listed below are not available in the user interface, usually because they are rarely used or provide access to advanced settings that most users will not need.
     4This is not a comprehensive list.
     5Some settings will require a restart of the router to take effect.
     6Note that all settings are case sensitive.
     7You will need to edit your <code>router.config</code> file to add options, or, once you have added <code>routerconsole.advanced=true</code> to the router.config file, you may edit settings within the console on the <a href="/configadvanced">Advanced Configuration page</a>.</p>
    48
    59<table id="configinfo"> <!-- sections separated for legibility -->
     
    1014<tr><th>routerconsole.advanced={true|false}</th></tr>
    1115<tr><td class="infowarn">Only set this to true if you know what you are doing!</td></tr>
    12 <tr><td>When set to true, additional functionality will be enabled in the console and the user will be able to edit settings directly on the <a href="/configadvanced">Advanced Configuration page</a>. Extra display options are provided in the <a href="/netdb">Network Database section</a>, including the <a href="/netdb?f=3">Sybil Analysis tool</a>, and there are additional configuration options on the <a href="/configclients">Clients Configuration page</a>. This will also enable the installation of unsigned updates, manual configuration of the news URL, and the installation of plugins. You may also wish to enable the "Advanced" sidebar section on the <a href="/configsidebar">Summary Bar Configuration page</a>.</td></tr>
     16<tr><td>When set to true, additional functionality will be enabled in the console and the user will be able to edit settings directly on the <a href="/configadvanced">Advanced Configuration page</a>.
     17Extra display options are provided in the <a href="/netdb">Network Database section</a>, including the <a href="/netdb?f=3">Sybil Analysis tool</a>, and there are additional configuration options on the <a href="/configclients">Clients Configuration page</a>.
     18This will also enable the installation of unsigned updates, manual configuration of the news URL, and the installation of plugins.
     19You may also wish to enable the "Advanced" sidebar section on the <a href="/configsidebar">Summary Bar Configuration page</a>.</td></tr>
    1320
    1421<tr><th>routerconsole.browser={/path/to/browser}</th></tr>
     
    1926
    2027<tr><th>router.updateUnsignedURL={url}</th></tr>
    21 <tr><td>This setting allows you to configure the update url for the unsigned update feature, if enabled. The url should end with <code>/i2pupdate.zip</code>. Note: do not install unsigned updates unless you trust the source of the update!</td></tr>
     28<tr><td>This setting allows you to configure the update url for the unsigned update feature, if enabled.
     29The url should end with <code>/i2pupdate.zip</code>.
     30Note: do not install unsigned updates unless you trust the source of the update!</td></tr>
    2231
    2332<tr><th>routerconsole.enablePluginInstall={true|false}</th></tr>
    24 <tr><td>When set to true, this enables plugin installation on the <a href="/configplugins">Plugin Configuration page</a>. Setting <code>routerconsole.advanced=true</code> will also enable this feature. [Enabled by default]</td></tr>
     33<tr><td>When set to true, this enables plugin installation on the <a href="/configplugins">Plugin Configuration page</a>.
     34Setting <code>routerconsole.advanced=true</code> will also enable this feature.
     35[Enabled by default]</td></tr>
    2536
    2637<tr><th>routerconsole.allowUntrustedPlugins={true|false}</th></tr>
    27 <tr><td>Plugins signed with the cryptographic key of the developer are the recommended format, but if you wish to install unsigned plugins you can set this to true. Note that you may still encounter issues attempting to install an unsigned plugin if the developer has included additional checks in the plugin build process.</td></tr>
     38<tr><td>Plugins signed with the cryptographic key of the developer are the recommended format, but if you wish to install unsigned plugins you can set this to true.
     39Note that you may still encounter issues attempting to install an unsigned plugin if the developer has included additional checks in the plugin build process.</td></tr>
    2840
    2941<tr><th>routerconsole.showSearch={true|false}</th></tr>
    30 <tr><td>When set to true, a configurable search bar will appear on the <a href="/home">console homepage</a>. Additional searches may then be added on the <a href="/confighome">home configuration page</a>.</td></tr>
     42<tr><td>When set to true, a configurable search bar will appear on the <a href="/home">console homepage</a>.
     43Additional searches may then be added on the <a href="/confighome">home configuration page</a>.</td></tr>
    3144
    3245<tr><th>router.buildHandlerThreads={n}</th></tr>
    33 <tr><td>Allocate number of processor threads for building tunnels. If your processor supports hyperthreading or simultaneous multithreading, you may multiply the number of processor cores by 2 to get the maximum number of threads to allocate, otherwise number of processor cores = maximum number of threads available. Note that you may wish to allocate less than the theoretical maximum to ensure you have headroom for other tasks.</td></tr>
     46<tr><td>Allocate number of processor threads for building tunnels.
     47If your processor supports hyperthreading or simultaneous multithreading, you may multiply the number of processor cores by 2 to get the maximum number of threads to allocate, otherwise number of processor cores = maximum number of threads available.
     48Note that you may wish to allocate less than the theoretical maximum to ensure you have headroom for other tasks.</td></tr>
    3449
    3550<tr><th>router.hideFloodfillParticipant={true|false}</th></tr>
     
    3752
    3853<tr><th>router.maxParticipatingTunnels={n}</th></tr>
    39 <tr><td>Determines the maximum number of participating tunnels the router can build. To disable participation completely, set to 0.</td></tr>
     54<tr><td>Determines the maximum number of participating tunnels the router can build.
     55To disable participation completely, set to 0.</td></tr>
    4056
    4157<tr><th>router.networkDatabase.flat={true|false}</th></tr>
  • apps/routerconsole/jsp/help-faq.jsi

    rbe4c1af r9a11165  
    11<h2>Abridged I2P FAQ</h2>
    22
    3 <p class="infohelp">This is a shortened version of the official FAQ. For the full version, please visit <a href="https://geti2p.net/faq" target="_blank">https://geti2p.net/faq</a> or <a href="http://i2p-projekt.i2p/faq" target="_blank">http://i2p-projekt.i2p/faq</a>.
     3<p class="infohelp">This is a shortened version of the official FAQ.
     4For the full version, please visit <a href="https://geti2p.net/faq" target="_blank">https://geti2p.net/faq</a> or <a href="http://i2p-projekt.i2p/faq" target="_blank">http://i2p-projekt.i2p/faq</a>.
    45
    56<h3>My router has been up for several minutes and has zero or very few connections</h3>
    67
    7 <p>If after a few minutes of uptime your router is indicating 0 Active Peers and 0 Known Peers, with a notification in the sidebar that you need to check your network connection, verify that you can access the internet. If your internet connection is functional, you may need to unblock Java in your firewall. Otherwise, you may need to reseed your I2P router. Visit the <a href="/configreseed#reseedconfig">Reseed Configuration page</a> and click the <i>Save Changes and Reseed Now</i> button.</p>
     8<p>If after a few minutes of uptime your router is indicating 0 Active Peers and 0 Known Peers, with a notification in the sidebar that you need to check your network connection, verify that you can access the internet.
     9If your internet connection is functional, you may need to unblock Java in your firewall.
     10Otherwise, you may need to reseed your I2P router. Visit the <a href="/configreseed#reseedconfig">Reseed Configuration page</a> and click the "Save Changes and Reseed Now" button.</p>
    811
    912<h3>My router has very few active peers, is this OK?</h3>
    1013
    11 <p>If your router has 10 or more active peers, everything is fine. The router should maintain connections to a few peers at all times. The best way to stay "better-connected" to the network is to <a href="/config">share more bandwidth</a>.</p>
     14<p>If your router has 10 or more active peers, everything is fine.
     15The router should maintain connections to a few peers at all times.
     16The best way to stay "better-connected" to the network is to <a href="/config">share more bandwidth</a>.</p>
    1217
    1318<h3 id="addressbooksubs">I'm missing lots of hosts in my addressbook. What are some good subscription links?</h3>
    1419
    15 <p>The default subscription is to <code>http://i2p-projekt.i2p/hosts.txt</code> which is seldom updated. If you don't have another subscription, you may often have to use "jump" links which is much slower but ensures that your addressbook is only populated by sites you use (in addition to the default subscription addresses). To speed up browsing on I2P, it's a good idea to add some addressbook subscriptions.</p>
     20<p>The default subscription is to <code>http://i2p-projekt.i2p/hosts.txt</code> which is seldom updated.
     21If you don't have another subscription, you may often have to use "jump" links which is much slower but ensures that your addressbook is only populated by sites you use (in addition to the default subscription addresses).
     22To speed up browsing on I2P, it's a good idea to add some addressbook subscriptions.</p>
    1623
    17 <p>Here are some other public addressbook subscription links. You may wish to add one or two to your <a href="/susidns/subscriptions">susidns subscription list</a>. In the event that addresses conflict in the subscriptions, the lists placed at the top of your susidns configuration will take precedence over those placed further down.</p>
     24<p>Here are some other public addressbook subscription links.
     25You may wish to add one or two to your <a href="/susidns/subscriptions">susidns subscription list</a>.
     26In the event that addresses conflict in the subscriptions, the lists placed at the top of your susidns configuration will take precedence over those placed further down.</p>
    1827
    1928<ul>
     
    2332</ul>
    2433
    25 <p>Note that subscribing to a hosts.txt service is an act of trust, as a malicious subscription could give you incorrect addresses, so be careful subscribing to lists from unknown sources. The operators of these services may have various policies for listing hosts. Presence on this list does not imply endorsement.</p>
     34<p>Note that subscribing to a hosts.txt service is an act of trust, as a malicious subscription could give you incorrect addresses, so be careful subscribing to lists from unknown sources.
     35The operators of these services may have various policies for listing hosts.
     36Presence on this list does not imply endorsement.</p>
    2637
    2738<h3>How do I access IRC, BitTorrent, or other services on the regular Internet?</h3>
    2839
    29 <p>Unless an outproxy has been set up for the service you want to connect to, this is not possible. There are only three types of outproxies running right now: HTTP, HTTPS, and email. Note that there is currently no publicly listed SOCKS outproxy. If this type of service is required, try <a href="https://torproject.org/" target="_blank">Tor</a>.</p>
     40<p>Unless an outproxy has been set up for the service you want to connect to, this is not possible.
     41There are only three types of outproxies running right now: HTTP, HTTPS, and email.
     42Note that there is currently no publicly listed SOCKS outproxy.
     43If this type of service is required, try <a href="https://torproject.org/" target="_blank">Tor</a>.</p>
    3044
    3145<h3>How do I configure my browser to access .i2p websites?</h3>
    32 <p>You will need to configure your browser to use the HTTP proxy server (by default on host: <code>127.0.0.1</code> port: <code>4444</code>). See the <a href="https://geti2p.net/en/about/browser-config" target="_blank">Browser Proxy Configuration Guide</a> for a more detailed explanation.</p>
     46<p>You will need to configure your browser to use the HTTP proxy server (by default on host: <code>127.0.0.1</code> port: <code>4444</code>).
     47See the <a href="https://geti2p.net/en/about/browser-config" target="_blank">Browser Proxy Configuration Guide</a> for a more detailed explanation.</p>
    3348
    3449<h3>What is an eepsite?</h3>
    3550
    36 <p>An eepsite is a website that is hosted anonymously on the I2P network - you can access it by configuring your web browser to use I2P's HTTP proxy (see above) and browsing to the <code>.i2p</code> suffixed website (e.g. <a href="http://i2p-projekt.i2p" target="_blank">http://i2p-projekt.i2p</a>). Also ensure your browser is configured to resolve DNS remotely when using the proxy to avoid DNS leaks.</p>
     51<p>An eepsite is a website that is hosted anonymously on the I2P network - you can access it by configuring your web browser to use I2P's HTTP proxy (see above) and browsing to the <code>.i2p</code> suffixed website (e.g. <a href="http://i2p-projekt.i2p" target="_blank">http://i2p-projekt.i2p</a>).
     52Also ensure your browser is configured to resolve DNS remotely when using the proxy to avoid DNS leaks.</p>
    3753
    3854<h3>Most of the eepsites are down?</h3>
    3955
    40 <p>If you consider every eepsite that has ever been created, yes, most of them are down. People and eepsites come and go. A good way to get started in I2P is check out a list of eepsites that are currently up. <a href="http://identiguy.i2p" target="_blank">http://identiguy.i2p</a> tracks active eepsites.</p>
     56<p>If you consider every eepsite that has ever been created, yes, most of them are down.
     57People and eepsites come and go.
     58A good way to get started in I2P is check out a list of eepsites that are currently up.
     59<a href="http://identiguy.i2p" target="_blank">http://identiguy.i2p</a> tracks active eepsites.</p>
    4160
    4261<h3>How do I connect to IRC within I2P?</h3>
    4362
    44 <p>A tunnel to the main IRC server network within I2P, Irc2P, is created when I2P is installed (see the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>), and is automatically started when the I2P router starts. To connect to it, tell your IRC client to connect to server: <code>127.0.0.1</code> port: <code>6668</code>.</p>
     63<p>A tunnel to the main IRC server network within I2P, Irc2P, is created when I2P is installed (see the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>), and is automatically started when the I2P router starts.
     64To connect to it, tell your IRC client to connect to server: <code>127.0.0.1</code> port: <code>6668</code>.</p>
    4565
    46 <p>XChat-like client users can create a new network with the server <code>127.0.0.1/6668</code> (remember to tick <i>Bypass proxy server</i> if you have a proxy server configured), or you can connect with the command <code>/server 127.0.0.1 6668</code>. Different IRC clients may vary the syntax.</p>
     66<p>HexChat-like client users can create a new network with the server <code>127.0.0.1/6668</code> (remember to tick "Bypass proxy server" if you have a proxy server configured), or you can connect with the command <code>/server 127.0.0.1 6668</code>.
     67Different IRC clients may require a different command, consult your IRC client's manual for more information.</p>
    4768
    4869<h3>What ports does I2P use?</h3>
     
    5071<table id="portfaq">
    5172<tr><th colspan="3">LOCAL PORTS</th></tr>
    52 <tr><td colspan="3" class="infohelp">These are the local I2P port mappings, listening only to local connections by default, except where noted. Unless you require access from other machines, they should only be accessible from localhost.</td></tr>
     73<tr><td colspan="3" class="infohelp">These are the local I2P port mappings, listening only to local connections by default, except where noted.
     74Unless you require access from other machines, they should only be accessible from localhost.</td></tr>
    5375<tr><th>Port</th><th>Function</th><th>Notes</th></tr>
    54 <tr><td>1900</td><td>UPnP SSDP UDP multicast listener</td><td>Cannot be changed. Binds to all interfaces. Can be disabled on the <a href="/confignet">Network Configuration page</a>.</td></tr>
    55 <tr><td>2827</td><td>BOB bridge</td><td>A higher level socket API for clients. Can be enabled/disabled on the <a href="/configclients">Client Configuration page</a>. Can be changed in the <code>bob.config</code> file. [Disabled by default]</td></tr>
    56 <tr><td>4444</td><td>HTTP proxy</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
    57 <tr><td>4445</td><td>HTTPS proxy</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
    58 <tr><td>6668</td><td>IRC proxy</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
    59 <tr><td>7652</td><td>UPnP HTTP TCP event listener</td><td>Binds to the LAN address. Can be changed with advanced config <code>i2np.upnp.HTTPPort=nnnn</code>. Can be disabled on the <a href="/confignet">Network Configuration page</a>.</td></tr>
    60 <tr><td>7653</td><td>UPnP SSDP UDP search response listener</td><td>Binds to all interfaces. Can be changed with advanced config <code>i2np.upnp.SSDPPort=nnnn</code>. Can be disabled on the <a href="/configclients">Client Configuration page</a>.</td></tr>
    61 <tr><td>7654</td><td>I2P Client Protocol port</td><td>Used by client apps. Can be changed to a different port on the <a href="/configclients">Client Configuration page</a> but this is not recommended. Can be bound to a different interface or all interfaces, or disabled, on the <a href="/configclients">Client Configuration page</a>.</td></tr>
    62 <tr><td>7655</td><td>UDP for SAM bridge</td><td>A higher level socket API for clients. Only opened when a SAM V3 client requests a UDP session. Can be enabled/disabled on the <a href="/configclients"> Client Configuration page</a>. Can be changed in the <code>clients.config</code> file with the SAM command line option <code>sam.udp.port=nnnn</code>.</td></tr>
    63 <tr><td>7656</td><td>SAM bridge</td><td>A higher level socket API for clients. Can be enabled/disabled on the <a href="/configclients">Client Configuration page</a>. Can be changed in the <code>clients.config</code> file. [Disabled by default]</td></tr>
    64 <tr><td>7657</td><td>I2P Router Console (Web interface)</td><td>Can be disabled in the <code>clients.config</code> file. Can also be configured to bind to a specific interface or all interfaces in that file. If you make the Router Console available over the network, you might wish to <a href="/configui#passwordheading">enforce an access password</a> to prevent unauthorized access.</td></tr>
    65 <tr><td>7658</td><td>I2P Web Server</td><td>Can be disabled in the <code>clients.config</code> file. Can also be configured to bind to a specific interface or all interfaces in the <code>jetty.xml</code> file.</td>
     76<tr><td>1900</td>
     77<td>UPnP SSDP UDP multicast listener</td>
     78<td>Cannot be changed.
     79Binds to all interfaces.
     80Can be disabled on the <a href="/confignet">Network Configuration page</a>.</td></tr>
     81<tr><td>2827</td>
     82<td>BOB bridge</td>
     83<td>A higher level socket API for clients.
     84Can be enabled/disabled on the <a href="/configclients">Client Configuration page</a>.
     85Can be changed in the <code>bob.config</code> file. [Disabled by default]</td></tr>
     86<tr><td>4444</td>
     87<td>HTTP proxy</td>
     88<td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>.
     89Can also be configured to bind to a specific interface or all interfaces.</td></tr>
     90<tr><td>4445</td>
     91<td>HTTPS proxy</td>
     92<td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>.
     93Can also be configured to bind to a specific interface or all interfaces.</td></tr>
     94<tr><td>6668</td>
     95<td>IRC proxy</td>
     96<td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>.
     97Can also be configured to bind to a specific interface or all interfaces.</td></tr>
     98<tr><td>7652</td>
     99<td>UPnP HTTP TCP event listener</td>
     100<td>Binds to the LAN address. Can be changed with advanced config <code>i2np.upnp.HTTPPort=nnnn</code>.
     101Can be disabled on the <a href="/confignet">Network Configuration page</a>.</td></tr>
     102<tr><td>7653</td>
     103<td>UPnP SSDP UDP search response listener</td>
     104<td>Binds to all interfaces.
     105Can be changed with advanced config <code>i2np.upnp.SSDPPort=nnnn</code>.
     106Can be disabled on the <a href="/configclients">Client Configuration page</a>.</td></tr>
     107<tr><td>7654</td>
     108<td>I2P Client Protocol port</td>
     109<td>Used by client apps. Can be changed to a different port on the <a href="/configclients">Client Configuration page</a> but this is not recommended.
     110Can be bound to a different interface or all interfaces, or disabled, on the <a href="/configclients">Client Configuration page</a>.</td></tr>
     111<tr><td>7655</td>
     112<td>UDP for SAM bridge</td>
     113<td>A higher level socket API for clients.
     114Only opened when a SAM V3 client requests a UDP session.
     115Can be enabled/disabled on the <a href="/configclients"> Client Configuration page</a>.
     116Can be changed in the <code>clients.config</code> file with the SAM command line option <code>sam.udp.port=nnnn</code>.</td></tr>
     117<tr><td>7656</td>
     118<td>SAM bridge</td>
     119<td>A higher level socket API for clients.
     120Can be enabled/disabled on the <a href="/configclients">Client Configuration page</a>.
     121Can be changed in the <code>clients.config</code> file. [Disabled by default]</td></tr>
     122<tr><td>7657</td>
     123<td>I2P Router Console (Web interface)</td>
     124<td>Can be disabled in the <code>clients.config</code> file.
     125Can also be configured to bind to a specific interface or all interfaces in that file.
     126If you make the Router Console available over the network, you might wish to <a href="/configui#passwordheading">enforce an access password</a> to prevent unauthorized access.</td></tr>
     127<tr><td>7658</td>
     128<td>I2P Web Server</td>
     129<td>Can be disabled in the <code>clients.config</code> file.
     130Can also be configured to bind to a specific interface or all interfaces in the <code>jetty.xml</code> file.</td>
    66131</tr>
    67 <tr><td>7659</td><td>Outgoing mail to smtp.postman.i2p</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
    68 <tr><td>7660</td><td>Incoming mail from pop.postman.i2p</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces.</td></tr>
    69 <tr><td>8998</td><td>mtn.i2p2.i2p (I2P's Monotone DVCS)</td><td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>. Can also be configured to bind to a specific interface or all interfaces. [Disabled by default]</td></tr>
    70 <tr><td>31000</td><td>Local connection to wrapper control channel port</td><td>Outbound to 32000 only, does not listen on this port. Starts at 31000 and will increment until 31999 looking for a free port. To change, see the <a href="http://wrapper.tanukisoftware.com/doc/english/prop-port.html" target="_blank">wrapper documentation</a>.</td></tr>
    71 <tr><td>32000</td><td>Local control channel for the service wrapper</td><td>To change, see the <a href="http://wrapper.tanukisoftware.com/doc/english/prop-port.html" target="_blank">wrapper documentation</a>.</td></tr>
     132<tr><td>7659</td>
     133<td>Outgoing mail to smtp.postman.i2p</td>
     134<td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>.
     135Can also be configured to bind to a specific interface or all interfaces.</td></tr>
     136<tr><td>7660</td>
     137<td>Incoming mail from pop.postman.i2p</td>
     138<td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>.
     139Can also be configured to bind to a specific interface or all interfaces.</td></tr>
     140<tr><td>8998</td>
     141<td>mtn.i2p2.i2p (I2P's Monotone DVCS)</td>
     142<td>Can be disabled or changed in the <a href="/i2ptunnelmgr">I2P Tunnel Manager</a>.
     143Can also be configured to bind to a specific interface or all interfaces. [Disabled by default]</td></tr>
     144<tr><td>31000</td>
     145<td>Local connection to wrapper control channel port</td>
     146<td>Outbound to 32000 only, does not listen on this port.
     147Starts at 31000 and will increment until 31999 looking for a free port.
     148To change, see the <a href="http://wrapper.tanukisoftware.com/doc/english/prop-port.html" target="_blank">wrapper documentation</a>.</td></tr>
     149<tr><td>32000</td>
     150<td>Local control channel for the service wrapper</td>
     151<td>To change, see the <a href="http://wrapper.tanukisoftware.com/doc/english/prop-port.html" target="_blank">wrapper documentation</a>.</td></tr>
    72152<tr><th colspan="3">INTERNET FACING PORTS</th></tr>
    73 <tr><td colspan="3" class="infohelp">I2P selects a random port between 9000 and 31000 to communicate with other routers when the program is run for the first time, or when your external IP address changes when running in <a href="/confignet#ipchange">Laptop Mode</a>. The <a href="/confignet#udpconfig">selected port</a> is shown on the <a href="/confignet">Network Configuration page</a>.</td></tr>
     153<tr><td colspan="3" class="infohelp">I2P selects a random port between 9000 and 31000 to communicate with other routers when the program is run for the first time, or when your external IP address changes when running in <a href="/confignet#ipchange">Laptop Mode</a>.
     154The <a href="/confignet#udpconfig">selected port</a> is shown on the <a href="/confignet">Network Configuration page</a>.</td></tr>
    74155<tr><td colspan="3">Outbound UDP from the <a href="/confignet#udpconfig">random port</a> noted on the Network Configuration page to arbitrary remote UDP ports, allowing replies.</td></tr>
    75156<tr><td colspan="3">Outbound TCP from random high ports to arbitrary remote TCP ports.</td></tr>
    76157<tr><td colspan="3">Inbound UDP to the <a href="/confignet#udpconfig">port</a> noted on the Network Configuration page from arbitrary locations (optional, but recommended).</td></tr>
    77 <tr><td colspan="3">Inbound TCP to the <a href="/confignet#externaltcp">port</a> noted on the Network Configuration page from arbitrary locations (optional, but recommended). <a href="/confignet#tcpconfig">Inbound TCP</a> may be disabled on the Network Configuration page.</td></tr>
     158<tr><td colspan="3">Inbound TCP to the <a href="/confignet#externaltcp">port</a> noted on the Network Configuration page from arbitrary locations (optional, but recommended).
     159<a href="/confignet#tcpconfig">Inbound TCP</a> may be disabled on the Network Configuration page.</td></tr>
    78160<tr><td colspan="3">Outbound UDP on port 123, allowing replies: this is necessary for I2P's internal time sync (via SNTP - querying a random SNTP host in <code>pool.ntp.org</code> or another server you specify).</td></tr>
    79161</table>
  • apps/routerconsole/jsp/help-legal.jsi

    rbe4c1af r9a11165  
    1313
    1414<ul>
    15 <li><a href="http://i2p-projekt.i2p/i2ptunnel" target="_blank">I2PTunnel</a> - a GPL'ed application written by mihi
    16 that lets you tunnel normal TCP/IP traffic over I2P (such as the http proxy and the irc proxy), with a <a href="/i2ptunnelmgr">browser-based front end.</a></li>
     15<li><a href="http://i2p-projekt.i2p/i2ptunnel" target="_blank">I2PTunnel</a> - a GPL'ed application written by mihi that lets you tunnel normal TCP/IP traffic over I2P (such as the http proxy and the irc proxy), with a <a href="/i2ptunnelmgr">browser-based front end.</a></li>
    1716<li><a href="/webmail">Susimail</a>, a GPL'ed browser based mail client written by susi23.</li>
    18 <li>The <a href="http://i2p-projekt.i2p/en/docs/naming#addressbook" target="_blank">addressbook application</a>,
    19 written by Ragnarok helps maintain your hosts.txt files, with a <a href="/dns">front end</a> written by susi23.</li>
    20 <li>The <a href="http://i2p-projekt.i2p/en/docs/api/samv3" target="_blank">SAM</a> bridge by human (public domain), an API
    21 which other client applications (such the <a href="http://i2pwiki.i2p/index.php?title=Tahoe-LAFS" target="_blank">I2P Tahoe-LAFS cloud filesystem</a>) can use to interface with I2P.</li>
    22 <li><a href="http://i2p-projekt.i2p/en/misc/jbigi" target="_blank">jbigi</a> - an optimized library for doing large number calculations which uses the
    23 LGPL licensed <a href="http://swox.com/gmp/" target="_blank">GMP</a> library, tuned for various PC architectures.</li>
    24 <li>Launchers for windows users are built with <a href="http://launch4j.sourceforge.net/" target="_blank">Launch4J</a>,
    25 and the installer is built with  <a href="http://www.izforge.com/izpack/" target="_blank">IzPack</a>.</li>
    26 <li>The <a href="/">I2P Router Console</a>, built from a streamlined <a href="http://jetty.mortbay.com/jetty/index.html" target="_blank">Jetty Web Server</a> instance
    27 which allows you to deploy standard JSP/Servlet web applications in your router.</li>
    28 <li>Jetty makes use of Apache's <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/package-summary.html" target="_blank">javax.servlet</a>
    29 (javax.servlet.jar) implementation. This product includes software developed by the <a href="http://www.apache.org/" target="_blank">Apache Software Foundation</a>.</li>
     17<li>The <a href="http://i2p-projekt.i2p/en/docs/naming#addressbook" target="_blank">addressbook application</a>, written by Ragnarok helps maintain your hosts.txt files, with a <a href="/dns">front end</a> written by susi23.</li>
     18<li>The <a href="http://i2p-projekt.i2p/en/docs/api/samv3" target="_blank">SAM</a> bridge by human (public domain), an API which other client applications (such the <a href="http://i2pwiki.i2p/index.php?title=Tahoe-LAFS" target="_blank">I2P Tahoe-LAFS cloud filesystem</a>) can use to interface with I2P.</li>
     19<li><a href="http://i2p-projekt.i2p/en/misc/jbigi" target="_blank">jbigi</a> - an optimized library for doing large number calculations which uses the LGPL licensed <a href="http://swox.com/gmp/" target="_blank">GMP</a> library, tuned for various PC architectures.</li>
     20<li>Launchers for windows users are built with <a href="http://launch4j.sourceforge.net/" target="_blank">Launch4J</a>, and the installer is built with  <a href="http://www.izforge.com/izpack/" target="_blank">IzPack</a>.</li>
     21<li>The <a href="/">I2P Router Console</a>, built from a streamlined <a href="http://jetty.mortbay.com/jetty/index.html" target="_blank">Jetty Web Server</a> instance which allows you to deploy standard JSP/Servlet web applications in your router.</li>
     22<li>Jetty makes use of Apache's <a href="https://docs.oracle.com/javaee/7/api/javax/servlet/package-summary.html" target="_blank">javax.servlet</a> (javax.servlet.jar) implementation.
     23This product includes software developed by the <a href="http://www.apache.org/" target="_blank">Apache Software Foundation</a>.</li>
    3024<li>Source for the I2P code and most bundled client applications can be found on our <a href="http://i2p-projekt.i2p/download" target="_blank">download page</a>.</li>
    3125</ul>
    3226
    33 <p>For details on other applications available, as well as their licenses, please see the <a href="http://i2p-projekt.i2p/licenses" target="_blank">
    34 license policy</a>. Additional licenses can be found in the <code>licenses</code> sub-directory of your I2P installation.</p>
     27<p>For details on other applications available, as well as their licenses, please see the <a href="http://i2p-projekt.i2p/licenses" target="_blank"> license policy</a>.
     28Additional licenses can be found in the <code>licenses</code> sub-directory of your I2P installation.</p>
  • apps/routerconsole/jsp/help-sidebar.jsi

    rbe4c1af r9a11165  
    11<h2>Summary Bar Information</h2>
    22
    3 <p>Many of the stats on the summary bar may be <a href="configstats">configured</a> to be <a href="graphs">graphed</a> for further analysis. You may also customize the sections that appear on the Summary Bar and their positioning on the <a href="configsidebar">Summary Bar Configuration page</a>.
     3<p>Many of the stats on the summary bar may be <a href="configstats">configured</a> to be <a href="graphs">graphed</a> for further analysis.
     4You may also customize the sections that appear on the Summary Bar and their positioning on the <a href="configsidebar">Summary Bar Configuration page</a>.
    45</p>
    56
     
    910<li>
    1011<b>Local Identity:</b>
    11 If you hover over the <i>Router Info</i> heading, your truncated router identity will be shown (the first four characters (24 bits) of your 44-character (256-bit) Base64 router hash). The full hash is shown on your <a href="netdb?r=.">Network Database entry</a>. Never reveal this to anyone, as your router identity is uniquely linked to your IP address in the network database.</li>
     12If you hover over the "Router Info" heading, your truncated router identity will be shown (the first four characters (24 bits) of your 44-character (256-bit) Base64 router hash).
     13The full hash is shown on your <a href="netdb?r=.">Network Database entry</a>.
     14Never reveal this to anyone, as your router identity is uniquely linked to your IP address in the network database.</li>
    1215<li>
    1316<b>Version:</b>
    14 The version of the I2P software you are running. If a new version is available, you will be notified in the Summary Bar. It is recommended to keep your router up to date to ensure optimal performance and security. Router updates are usually made available on average every 2-3 months.
     17The version of the I2P software you are running.
     18If a new version is available, you will be notified in the Summary Bar.
     19It is recommended to keep your router up to date to ensure optimal performance and security.
     20Router updates are usually made available on average every 2-3 months.
    1521</li>
    1622
    1723<li>
    1824<b>Clock Skew:</b>
    19 The skew (offset) of your computer's clock relative to the network-synced time (if known). I2P requires your computer's time be accurate. If the skew is more than a few seconds, please correct the problem by adjusting your computer's time. If I2P cannot connect to the internet, a reading of 0ms may be indicated. <b>Note:</b> This is only displayed in the <i>Router Information (advanced)</i> section. You may add this section to your Summary Bar on the <a href="configsidebar">Summary Bar Configuration page</a>.
     25The skew (offset) of your computer's clock relative to the network-synced time (if known).
     26I2P requires your computer's time be accurate.
     27If the skew is more than a few seconds, please correct the problem by adjusting your computer's time.
     28If I2P cannot connect to the internet, a reading of 0ms may be indicated.
     29<b>Note:</b> This is only displayed in the "Router Information (advanced)" section.
     30You may add this section to your Summary Bar on the <a href="configsidebar">Summary Bar Configuration page</a>.
    2031</li>
    2132
    2233<li>
    2334<b>Memory:</b>
    24 This indicates the amount of RAM I2P is using, and the total amount available, allocated by Java. The usage will likely vary considerably within a short timeframe, but if the usage is consistently high relative to the available RAM, this may indicate that you need to increase the ram allocated to the JVM. You can allocate more RAM by editing your <code>wrapper.config</code> file which is normally located in the I2P application directory. You will need to edit the <code>wrapper.java.maxmemory</code> parameter, which by default is set to 128(MB). <b>Note:</b> Memory usage is only displayed in the <i>Router Information (advanced)</i> section or on the <i>Memory Usage Bar</i>, both of which may be added to your Summary Bar on the <a href="configsidebar">Summary Bar Configuration page</a>.
     35This indicates the amount of RAM I2P is using, and the total amount available, allocated by Java.
     36The usage will likely vary considerably within a short timeframe, but if the usage is consistently high relative to the available RAM, this may indicate that you need to increase the ram allocated to the JVM.
     37You can allocate more RAM by editing your <code>wrapper.config</code> file which is normally located in the I2P application directory.
     38You will need to edit the <code>wrapper.java.maxmemory</code> parameter, which by default is set to 128(MB).
     39<b>Note:</b> Memory usage is only displayed in the "Router Information (advanced)" section or on the "Memory Usage Bar", both of which may be added to your Summary Bar on the <a href="configsidebar">Summary Bar Configuration page</a>.
    2540</li>
    2641
     
    3954<ul>
    4055<li>
    41 <b>Active:</b> The first number is the number of peers your router has sent or received a message from in the last few minutes. This may range from 8-10 to several hundred, depending on your total bandwidth, shared bandwidth, and locally-generated traffic. The second number is the number of peers seen in the last hour or so. Do not be concerned if these numbers vary widely. <a href="configstats#router.activePeers">[Enable graphing]</a>.
     56<b>Active:</b> The first number is the number of peers your router has sent or received a message from in the last few minutes.
     57This may range from 8-10 to several hundred, depending on your total bandwidth, shared bandwidth, and locally-generated traffic.
     58The second number is the number of peers seen in the last hour or so.
     59Do not be concerned if these numbers vary widely.
     60<a href="configstats#router.activePeers">[Enable graphing]</a>.
    4261</li>
    4362<li>
    44 <b>Fast:</b> This is the number of peers your router has available for building client tunnels. It is generally in the range 8-30. Your fast peers are shown on the <a href="profiles">Profiles page</a>. <a href="configstats#router.fastPeers">[Enable graphing]</a>
     63<b>Fast:</b> This is the number of peers your router has available for building client tunnels.
     64It is generally in the range 8-30. Your fast peers are shown on the <a href="profiles">Profiles page</a>.
     65<a href="configstats#router.fastPeers">[Enable graphing]</a>
    4566</li>
    4667<li><b>High Capacity:</b>
    47 This is the number of peers your router has available for building your exploratory tunnels which are used to determine network performance. It is generally in the range 8-75. The fast peers are included in the high capacity tier.Your high capacity peers are shown on the <a href="profiles">Profiles page</a>. <a href="configstats#router.highCapacityPeers">[Enable graphing]</a>
     68This is the number of peers your router has available for building your exploratory tunnels which are used to determine network performance.
     69It is generally in the range 8-75.
     70The fast peers are included in the high capacity tier.
     71Your high capacity peers are shown on the <a href="profiles">Profiles page</a>.
     72<a href="configstats#router.highCapacityPeers">[Enable graphing]</a>
    4873</li>
    4974<li>
    50 <b>Integrated:</b> This is the number of peers your router will use for network database inquiries. These are usually the "floodfill" routers which are responsible for maintaining network integrity. Your well integrated peers are shown on the bottom of the <a href="profiles">Profiles page</a>.
     75<b>Integrated:</b> This is the number of peers your router will use for network database inquiries.
     76These are usually the "floodfill" routers which are responsible for maintaining network integrity.
     77Your well integrated peers are shown on the bottom of the <a href="profiles">Profiles page</a>.
    5178</li>
    5279<li>
    53 <b>Known:</b> This is the total number of peers that are known by your router. They are listed on the <a href="netdb">Network Database page</a>. This may range from under 100 to 1000 or more. This number is not the total size of the network; it may vary widely depending on your total bandwidth, shared bandwidth, and locally-generated traffic. I2P does not require a router to know every other router in the network.
     80<b>Known:</b> This is the total number of peers that are known by your router.
     81They are listed on the <a href="netdb">Network Database page</a>.
     82This may range from under 100 to 1000 or more.
     83This number is not the total size of the network; it may vary widely depending on your total bandwidth, shared bandwidth, and locally-generated traffic.
     84I2P does not require a router to know every other router in the network.
    5485</li>
    5586</ul>
     
    5788<h3>Bandwidth In/Out</h3>
    5889
    59 <p> This section indicates your average bandwidth speeds and total usage for the session. All values are in bytes per second, not bits per second. You may change your bandwidth limits on the <a href="config">Bandwidth Configuration page</a>. The more bandwidth you make available, the more you help the network and improve your own anonymity, so please take the time to review the settings. If you are unsure of your network's speed, using a service such as <a href="http://speedtest.net/">SpeedTest</a> or similar will give you a good indication of your bandwidth capability. Your upstream share amount (KBps Out) will determine your overall contribution to the network. Bandwidth is <a href="graphs">graphed</a> by default.</p>
     90<p> This section indicates your average bandwidth speeds and total usage for the session.
     91All values are in bytes per second, not bits per second.
     92You may change your bandwidth limits on the <a href="config">Bandwidth Configuration page</a>.
     93The more bandwidth you make available, the more you help the network and improve your own anonymity, so please take the time to review the settings.
     94If you are unsure of your network's speed, using a service such as <a href="https://speedtest.net/">SpeedTest</a> or similar will give you a good indication of your bandwidth capability.
     95Your upstream share amount (KBps Out) will determine your overall contribution to the network.
     96Bandwidth is <a href="graphs">graphed</a> by default.</p>
    6097
    6198<h3>Local Destinations</h3>
    6299
    63 <p>These are the local services provided by your router. They may be clients started through the <a href="i2ptunnelmgr">Tunnel Manager</a> or external programs connecting through SAM, BOB, or directly to I2CP. By default, most of your client services (mail, http proxy, IRC) will share the same set of tunnels (for performance reasons) and be listed as <i>Shared Clients</i> and <i>Shared Clients(DSA)</i>. However, if you experience a tunnel failure, all your services will go offline at the same time, so in some scenarios you may wish to configure client services to use their own set of tunnels. This can be done by unchecking the <i>Share tunnels with other clients&hellip;</i> option listed under <i>Shared Clients</i> on the configuration page of the relevant client service in the Tunnel Manager, after which you will need to restart the client service from the <a href="i2ptunnelmgr">main Tunnel Manager page</a>.</p>
     100<p>These are the local services provided by your router.
     101They may be clients started through the <a href="i2ptunnelmgr">Tunnel Manager</a> or external programs connecting through SAM, BOB, or directly to I2CP.
     102By default, most of your client services (mail, http proxy, IRC) will share the same set of tunnels (for performance reasons) and be listed as "Shared Clients" and "Shared Clients(DSA)".
     103However, if you experience a tunnel failure, all your services will go offline at the same time, so in some scenarios you may wish to configure client services to use their own set of tunnels.
     104This can be done by unchecking the "Share tunnels with other clients&hellip;" option listed under "Shared Clients" on the configuration page of the relevant client service in the Tunnel Manager, after which you will need to restart the client service from the <a href="i2ptunnelmgr">main Tunnel Manager page</a>.</p>
    64105
    65106<h3>Tunnels</h3>
     
    75116</li>
    76117<li>
    77 <b>Participating:</b> Tunnels built by other routers through your router. This may vary widely depending on network demand, your shared bandwidth, and amount of locally-generated traffic. The recommended method for limiting participating tunnels is to change your share percentage on the <a  href="config">Bandwidth Configuration page</a>. You may also limit the total number by setting <code>router.maxParticipatingTunnels=nnn</code> on the <a href="configadvanced">Advanced configuration page</a>. <a href="configstats#tunnel.participatingTunnels">[Enable graphing]</a>.
     118<b>Participating:</b> Tunnels built by other routers through your router.
     119This may vary widely depending on network demand, your shared bandwidth, and amount of locally-generated traffic.
     120The recommended method for limiting participating tunnels is to change your share percentage on the <a  href="config">Bandwidth Configuration page</a>.
     121You may also limit the total number by setting <code>router.maxParticipatingTunnels=nnn</code> on the <a href="configadvanced">Advanced configuration page</a>.
     122<a href="configstats#tunnel.participatingTunnels">[Enable graphing]</a>.
    78123</li>
    79124<li>
    80 <b>Share Ratio:</b> The number of participating tunnels you route for others, divided by the total number of hops in all your exploratory and client tunnels. A number greater than 1.00 means you are contributing more tunnels to the network than you are using.
     125<b>Share Ratio:</b> The number of participating tunnels you route for others, divided by the total number of hops in all your exploratory and client tunnels.
     126A number greater than 1.00 means you are contributing more tunnels to the network than you are using.
    81127</li>
    82128</ul>
    83129
    84130<h3>Congestion</h3>
    85 <p><b>Note:</b> This section is not enabled by default. You may enable it on the <a href="configsidebar">Summary Bar Configuration page</a>.</p>
     131<p><b>Note:</b> This section is not enabled by default.
     132You may enable it on the <a href="configsidebar">Summary Bar Configuration page</a>.</p>
    86133<p>Some basic indications of router overload:</p>
    87134
    88135<ul>
    89136<li>
    90 <b>Job Lag:</b> How long jobs are waiting before execution. The job queue is listed on the <a href="jobs">Jobs page</a>. Unfortunately, there are several other job queues in the router that may be congested, and their status is not available in the router console. The job lag should generally be zero. If it is consistently higher than 500ms, your computer is very slow, your network is experiencing connectivity issues, or the router has serious problems. <a href="configstats#jobQueue.jobLag">[Enable graphing]</a>.
     137<b>Job Lag:</b> How long jobs are waiting before execution.
     138The job queue is listed on the <a href="jobs">Jobs page</a>.
     139Unfortunately, there are several other job queues in the router that may be congested, and their status is not available in the router console.
     140The job lag should generally be zero.
     141If it is consistently higher than 500ms, your computer is very slow, your network is experiencing connectivity issues, or the router has serious problems.
     142<a href="configstats#jobQueue.jobLag">[Enable graphing]</a>.
    91143</li>
    92144<li>
    93 <b>Message Delay:</b> How long an outbound message waits in the queue. This should generally be a few hundred milliseconds or less. If it is consistently higher than 1000ms, your computer is very slow, or you should adjust your bandwidth limits, or your (Bittorrent?) clients may be sending too much data and should have their transmit bandwidth limit reduced. <a href="configstats#transport.sendProcessingTime">[Enable graphing]</a> (transport.sendProcessingTime).
     145<b>Message Delay:</b> How long an outbound message waits in the queue.
     146This should generally be a few hundred milliseconds or less.
     147If it is consistently higher than 1000ms, your computer is very slow, or you should adjust your bandwidth limits, or your (Bittorrent?) clients may be sending too much data and should have their transmit bandwidth limit reduced.
     148<a href="configstats#transport.sendProcessingTime">[Enable graphing]</a> (transport.sendProcessingTime).
    94149</li>
    95150
     
    106161
    107162<li>
    108 <b>Accepting/Rejecting:</b> Your router's status on accepting or rejecting requests from other routers to build a participating tunnel through your router. Your router may accept all requests, accept or reject a percentage of requests, or reject all requests for a number of reasons, to control the bandwidth and CPU demands and maintain capacity for local clients. <b>Note:</b> It will take at least 10 minutes from your router starting for it to accept building participating tunnels in order to ensure your router is stable and successfully bootstrapped to the network.
     163<b>Accepting/Rejecting:</b> Your router's status on accepting or rejecting requests from other routers to build a participating tunnel through your router.
     164Your router may accept all requests, accept or reject a percentage of requests, or reject all requests for a number of reasons, to control the bandwidth and CPU demands and maintain capacity for local clients.
     165<b>Note:</b> It will take at least 10 minutes from your router starting for it to accept building participating tunnels in order to ensure your router is stable and successfully bootstrapped to the network.
    109166</li>
    110167</ul>
  • apps/routerconsole/jsp/home.jsp

    rbe4c1af r9a11165  
    119119%>
    120120  <div class="ag2">
     121    <h4 class="app2"><%=intl._t("Hidden Services of Interest")%></h4>
     122    <jsp:getProperty name="homehelper" property="favorites" /><br>
     123  </div>
     124  <div class="ag2">
    121125    <h4 class="app"><%=intl._t("Applications and Configuration")%></h4>
    122126    <jsp:getProperty name="homehelper" property="services" /><br>
    123   </div>
    124   <div class="ag2">
    125     <h4 class="app2"><%=intl._t("Hidden Services of Interest")%></h4>
    126     <jsp:getProperty name="homehelper" property="favorites" /><br>
    127127    <div class="clearer">&nbsp;</div>
    128128  </div>
  • apps/susidns/src/build.xml

    rbe4c1af r9a11165  
    3131                <pathelement location="${lib}/jasper-runtime.jar" />
    3232                <pathelement location="${lib}/jetty-util.jar" />
     33                <pathelement location="${lib}/jetty-i2p.jar" />
    3334                <pathelement location="${ant.home}/lib/ant.jar" />
    3435                <pathelement location="../../../core/java/build/i2p.jar" />
     
    7071        <mkdir dir="${tmp}" />
    7172        <echo message="Ignore any warning about /WEB-INF/web.xml not found" />
    72         <java classname="org.apache.jasper.JspC" fork="true" classpathref="cp" failonerror="true">
     73        <!-- See apps/routerconsole/java/build.xml for important JspC build documentation -->
     74        <java classname="net.i2p.servlet.util.JspC" fork="true" classpathref="cp" failonerror="true">
     75            <!-- these are to detect tomcat version and reproducible build setting -->
     76            <jvmarg value="-Dbuild.reproducible=${build.reproducible}" />
     77            <jvmarg value="-Dwith-libtomcat8-java=${with-libtomcat8-java}" />
     78            <jvmarg value="-Djasper.jar=${lib}/jasper-runtime.jar" />
    7379            <arg value="-d" />
    7480            <arg value="${tmp}" />
  • build.xml

    rbe4c1af r9a11165  
    1010    <!--  When changing, also change javadoc URL in build.properties, and checksum in apps/jetty/build.xml -->
    1111    <property name="jetty.ver" value="9.2.25.v20180606" />
    12     <property name="tomcat.ver" value="8.5.30" />
     12    <property name="tomcat.ver" value="8.5.34" />
    1313
    1414    <!-- You probably don't want to change anything from here down -->
  • core/java/src/net/i2p/crypto/SelfSignedGenerator.java

    rbe4c1af r9a11165  
    234234            throw new GeneralSecurityException("cert error", iae);
    235235        }
    236         X509CRL crl = generateCRL(cert, validDays, 1, sigoid, jpriv);
     236        X509CRL crl = generateCRL(cert, validDays, 1, sigoid, priv);
    237237
    238238        // some simple tests
     
    282282     */
    283283    private static X509CRL generateCRL(X509Certificate cert, int validDays, int crlNum,
    284                                        byte[] sigoid, PrivateKey jpriv) throws GeneralSecurityException {
    285 
    286         SigningPrivateKey priv = SigUtil.fromJavaKey(jpriv);
    287 
     284                                       byte[] sigoid, SigningPrivateKey priv) throws GeneralSecurityException {
    288285        byte[] tbs = genTBSCRL(cert, validDays, crlNum, sigoid);
    289286        int tbslen = tbs.length;
  • core/java/src/net/i2p/crypto/SigUtil.java

    rbe4c1af r9a11165  
    190190            else if (spec.equals(SigType.ECDSA_SHA512_P521.getParams()))
    191191                type = SigType.ECDSA_SHA512_P521;
    192             else
    193                 throw new IllegalArgumentException("Unknown EC type");
     192            else {
     193                // failing on Android (ticket #2296)
     194                throw new IllegalArgumentException("Unknown EC type: " + pk.getClass() + " spec: " + spec.getClass());
     195            }
    194196            return fromJavaKey(k, type);
    195197        }
  • history.txt

    rbe4c1af r9a11165  
     12018-09-26 zzz
     2 * Crypto: Avoid privkey conversion when generating CRL,
     3   failing on Android for unknown reasons (ticket #2296)
     4 * IRC: Make inbound whitelist static
     5 * Router: Don't add 'O' cap for P/X anymore
     6
     72018-09-24 zzz
     8 * Build: Compile jsps in-order for reproducibility (ticket #2279)
     9
     102018-09-23 zzz
     11 * Plugins: Blacklist neodatis and seedless for Java 9+ (ticket #2295)
     12
     132018-09-22 zzz
     14 * NTCP:
     15   - Fix handling of multiple connections
     16   - Change termination code for expired RI
     17
     182018-09-16 zzz
     19 * Build: Fix hang with Tomcat 8.5.33+ (ticket #2307)
     20 * Tomcat 8.5.34
     21
     222018-08-27 zzz
     23 * Debian: Prevent dup version (ticket #2300)
     24
    1252018-08-26 zzz
    226 * NTCP2: Publish outbound address after transition to firewalled
  • launchers/macosx/Info.plist

    rbe4c1af r9a11165  
    1010        <string>Public Domain</string>
    1111        <key>CFBundleGetInfoString</key>
    12         <string>0.9.35-experimental</string>
     12        <string>0.9.36-experimental</string>
    1313        <key>CFBundleIconFile</key>
    1414        <string>images/AppIcon.icns</string>
     
    3939        <key>LSMinimumSystemVersionByArchitecture</key>
    4040        <dict>
    41                 <key>i386</key>
    42                 <string>10.5.0</string>
    4341                <key>x86_64</key>
    4442                <string>10.6.0</string>
  • launchers/macosx/README.md

    rbe4c1af r9a11165  
    11# The Mac OS X Launcher
     2
     3## The Event Manager
     4
     5This is some Swift code which makes the application use events to signal the different compoents of the application. This seems to be the cleanest way since we're doing java subprocesses and so on. This can also be named a publish-subscribe system as well. If you're familiar with Javascript it would be a handy skill.
     6
     7### Event Overview
     8
     9| Event name | Details sent as arguments | Description |
     10| ------------- | ------------- | ------------- |
     11| router_start | nothing | This event get triggered when the router starts |
     12| router_exception | exception message | This will be triggered in case something within the functions that start the java (router) subprocess throws an exception |
     13| java_found | the location | This will be triggered once the DetectJava swift class has found java |
     14| router_must_upgrade | nothing | This will be triggered if no I2P is found, or if it's failing to get the version from the jar file |
     15| extract_completed | nothing | This is triggered when the deployment process is done extracting I2P to it's directory |
     16| router_can_start | nothing | This event will be triggered when I2P is found and a version number has been found, router won't start before this event |
     17| router_stop | error if any | Triggered when the router subprocess exits |
     18| router_pid | the pid number as string | Triggered when we know the pid of the router subprocess |
     19| router_version | the version string | Triggered when we have successfully extracted current I2P version |
     20| extract_errored | the error message | Triggered if the process didn't exit correctly |
     21
     22## Misc
    223
    324**Note** this project is WIP, cause Meeh has yet to merge in Obj-C/Swift code for GUI stuff in OSX.
     
    728More code will be merged in, it's just a f* mess which Meeh needs to clean up and move into repo.
    829
    9 `./fullBuild.sh` triggers Ant jobs and prepare the base.zip, as well as starting the ninja build.
     30## Howto build
     31
     32You can both build the project from the Xcode UI or you can build it from command line.
     33
     34An example build command:
     35`xcodebuild -target I2PLauncher -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`
     36
     37
  • launchers/macosx/include/PidWatcher.h

    rbe4c1af r9a11165  
    55#include <sys/event.h>
    66
    7 #include "neither/either.hpp"
    8 #include "AppDelegate.h"
    97
    108using callbackType = void (CFFileDescriptorRef, CFOptionFlags, void *);
     
    1715    // take action on death of process here
    1816    NSLog(@"process with pid '%u' died\n", (unsigned int)kev.ident);
    19     sendUserNotification(APP_IDSTR, @"The I2P router has stopped.");
     17    //sendUserNotification(APP_IDSTR, @"The I2P router has stopped.");
    2018    CFFileDescriptorInvalidate(fdref);
    2119    CFRelease(fdref); // the CFFileDescriptorRef is no longer of any use in this example
  • launchers/macosx/include/fn.h

    rbe4c1af r9a11165  
    128128            // The distance between a string and the empty string is the string's length
    129129            if (m == 0) {
    130                 return n;
     130                return (unsigned int)n;
    131131            }
    132132            if (n == 0) {
    133                 return m;
     133                return (unsigned int)m;
    134134            }
    135135            // Size the matrix as necessary
  • launchers/macosx/include/strutil.hpp

    rbe4c1af r9a11165  
    99#include <cctype>
    1010#include <locale>
    11 #include "optional.hpp"
     11#include "optional.h"
    1212
    1313#include <CoreFoundation/CoreFoundation.h>
     
    5454}
    5555
    56 using std::experimental::optional;
    57 
    58 // Use CFStringRef instead of NSString*, otherwise disable ARC
    59 inline optional<CFStringRef> optionalString(bool val) {
    60     optional<CFStringRef> myOptString;
    61     if(val) {
    62         // Cast to corresponding CoreFoundation object
    63         myOptString = (CFStringRef)@"String";
    64     }
    65     return myOptString;
     56inline bool replace(std::string& str, const std::string& from, const std::string& to) {
     57  size_t start_pos = str.find(from);
     58  if(start_pos == std::string::npos)
     59    return false;
     60  str.replace(start_pos, from.length(), to);
     61  return true;
    6662}
    6763
     
    10399}
    104100
     101#if __cplusplus > 201402L
     102
     103
     104using std::optional;
     105
     106// Use CFStringRef instead of NSString*, otherwise disable ARC
     107inline optional<CFStringRef> optionalString(bool val) {
     108  optional<CFStringRef> myOptString;
     109  if(val) {
     110    // Cast to corresponding CoreFoundation object
     111    myOptString = (CFStringRef)@"String";
     112  }
     113  return myOptString;
     114}
     115
    105116#endif
     117
     118
     119#endif
  • launchers/macosx/src/main/java/net/i2p/launchers/BaseExtractor.java

    rbe4c1af r9a11165  
    1414import java.util.zip.ZipEntry;
    1515import java.util.zip.ZipFile;
     16import java.nio.file.*;
     17import java.nio.file.attribute.BasicFileAttributes;
     18
     19import static java.nio.file.Files.*;
    1620
    1721/**
     
    2529    public boolean printDebug = false;
    2630
    27     public void runExtract(String zipFilename) {
    28         String destinationPath = this.baseDirPath;
    29         try(ZipFile file = new ZipFile(zipFilename)) {
    30             FileSystem fileSystem = FileSystems.getDefault();
    31             Enumeration<? extends ZipEntry> entries = file.entries();
    32 
    33             try {
    34                 Files.createDirectory(fileSystem.getPath(destinationPath));
    35             } catch (IOException e) {
    36                 // It's OK to fail here.
     31    public void unzip(final Path zipFile) {
     32        try {
     33            String destinationPath = this.baseDirPath;
     34            final Path destDir = Files.createDirectories(FileSystems.getDefault().getPath(destinationPath));
     35            if (notExists(destDir)) {
     36                createDirectories(destDir);
    3737            }
    3838
    39             while (entries.hasMoreElements()) {
    40                 ZipEntry entry = entries.nextElement();
    41                 if (printDebug) System.out.println("Found entry: "+entry.toString());
    42                 if (entry.isDirectory()) {
    43                     if (printDebug) System.out.println("Creating Directory:" + destinationPath + "/" + entry.getName());
    44                     Files.createDirectories(fileSystem.getPath(destinationPath + "/" + entry.getName()));
    45                 } else {
    46                     InputStream is = file.getInputStream(entry);
    47                     BufferedInputStream bis = new BufferedInputStream(is);
    48                     String uncompressedFileName = destinationPath + "/" + entry.getName();
    49                     Path uncompressedFilePath = fileSystem.getPath(uncompressedFileName);
    50                     Files.createFile(uncompressedFilePath);
    51                     BufferedOutputStream fileOutput = new BufferedOutputStream(new FileOutputStream(uncompressedFileName));
    52                     while (bis.available() > 0) fileOutput.write(bis.read());
    53                     fileOutput.close();
    54                     if (printDebug) System.out.println("Written :" + entry.getName());
    55                 }
     39            try (FileSystem zipFileSystem = FileSystems.newFileSystem(zipFile, null)) {
     40                final Path root = zipFileSystem.getRootDirectories().iterator().next();
     41
     42                walkFileTree(root, new SimpleFileVisitor<Path>() {
     43                    @Override
     44                    public FileVisitResult visitFile(Path file,
     45                                                     BasicFileAttributes attrs) throws IOException {
     46                        final Path destFile = Paths.get(destDir.toString(), file.toString());
     47                        try {
     48                            copy(file, destFile, StandardCopyOption.REPLACE_EXISTING);
     49                        } catch (DirectoryNotEmptyException ignore) {
     50                        }
     51                        return FileVisitResult.CONTINUE;
     52                    }
     53
     54                    @Override
     55                    public FileVisitResult preVisitDirectory(Path dir,
     56                                                             BasicFileAttributes attrs) throws IOException {
     57                        final Path dirToCreate = Paths.get(destDir.toString(), dir.toString());
     58                        if (notExists(dirToCreate)) {
     59                            createDirectory(dirToCreate);
     60                        }
     61                        return FileVisitResult.CONTINUE;
     62                    }
     63                });
    5664            }
    5765        } catch (IOException e) {
     
    7381            be.printDebug = true;
    7482        }
    75         be.runExtract(System.getProperty("i2p.base.zip"));
     83        be.unzip( FileSystems.getDefault().getPath(System.getProperty("i2p.base.zip")) );
    7684    }
    7785}
  • licenses/LICENSE-forked-subprocess.swift.txt

    rbe4c1af r9a11165  
    1 MIT License
     1The MIT License (MIT)
    22
    3 Copyright (c) 2017 LoopPerfect
     3Copyright (c) 2015 Marco Conti
    44
    55Permission is hereby granted, free of charge, to any person obtaining a copy
     
    2020OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    2121SOFTWARE.
     22
  • router/java/src/net/i2p/data/router/RouterInfo.java

    rbe4c1af r9a11165  
    337337
    338338            _identity.writeBytes(out);
    339             // avoid thrashing objects
    340             //DataHelper.writeDate(out, new Date(_published));
    341339            DataHelper.writeLong(out, 8, _published);
     340            // There shouldn't be any addresses when hidden, but if there are,
     341            // write them out, so as not to invalidate the signature
    342342            int sz = _addresses.size();
    343             if (sz <= 0 || isHidden()) {
    344                 // Do not send IP address to peers in hidden mode
    345                 out.write((byte) 0);
    346             } else {
    347                 out.write((byte) sz);
     343            out.write((byte) sz);
     344            if (sz > 0) {
    348345                for (RouterAddress addr : _addresses) {
    349346                    addr.writeBytes(out);
  • router/java/src/net/i2p/router/Router.java

    rbe4c1af r9a11165  
    10691069        // 512 and unlimited supported as of 0.9.18;
    10701070        // Add 256 as well for compatibility
    1071         if (bw == CAPABILITY_BW512 || bw == CAPABILITY_BW_UNLIMITED)
    1072             rv.append(CAPABILITY_BW256);
     1071        //if (bw == CAPABILITY_BW512 || bw == CAPABILITY_BW_UNLIMITED)
     1072        //    rv.append(CAPABILITY_BW256);
    10731073
    10741074        // if prop set to true, don't tell people we are ff even if we are
  • router/java/src/net/i2p/router/RouterVersion.java

    rbe4c1af r9a11165  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 3;
     21    public final static long BUILD = 10;
    2222
    2323    /** for example "-test" */
    24     public final static String EXTRA = "";
     24    public final static String EXTRA = "-rc";
    2525    public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
    2626    public static void main(String args[]) {
  • router/java/src/net/i2p/router/transport/ntcp/InboundEstablishState.java

    rbe4c1af r9a11165  
    10031003        } catch (IllegalArgumentException iae) {
    10041004            // hash collision?
    1005             _msg3p2FailReason = NTCPConnection.REASON_UNSPEC;
    1006             throw new DataFormatException("RI store fail", iae);
     1005            // expired RI?
     1006            _msg3p2FailReason = NTCPConnection.REASON_MSG3;
     1007            throw new DataFormatException("RI store fail: " + ri, iae);
    10071008        }
    10081009        _con.setRemotePeer(_aliceIdent);
  • router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java

    rbe4c1af r9a11165  
    489489        NTCPConnection toClose = locked_close(allowRequeue);
    490490        if (toClose != null && toClose != this) {
     491            // won't happen as of 0.9.37
    491492            if (_log.shouldLog(Log.WARN))
    492493                _log.warn("Multiple connections on remove, closing " + toClose + " (already closed " + this + ")");
     
    508509
    509510    /**
    510      * @return a second connection with the same peer...
     511     * @return usually this, but could be a second connection with the same peer...
     512     *         only this or null as of 0.9.37
    511513     */
    512514    private synchronized NTCPConnection locked_close(boolean allowRequeue) {
     
    18351837        }
    18361838        NTCPConnection toClose = _transport.inboundEstablished(this);
    1837         if (toClose != null) {
    1838             if (_log.shouldLog(Log.DEBUG))
    1839                 _log.debug("Old connection closed: " + toClose + " replaced by " + this);
     1839        if (toClose != null && toClose != this) {
     1840            if (_log.shouldWarn())
     1841                _log.warn("Old connection closed: " + toClose + " replaced by " + this);
    18401842            _context.statManager().addRateData("ntcp.inboundEstablishedDuplicate", toClose.getUptime());
    18411843            toClose.close();
     
    21082110                }
    21092111            } catch (IllegalArgumentException iae) {
    2110                 throw new DataFormatException("RI store fail", iae);
     2112                throw new DataFormatException("RI store fail: " + ri, iae);
    21112113            }
    21122114        }
  • router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java

    rbe4c1af r9a11165  
    7474    private final SharedBid _transientFail;
    7575    private final Object _conLock;
    76     private final Map<Hash, NTCPConnection> _conByIdent;
     76    private final ConcurrentHashMap<Hash, NTCPConnection> _conByIdent;
    7777    private final EventPumper _pumper;
    7878    private final Reader _reader;
     
    642642    /**
    643643     * @return usually the con passed in, but possibly a second connection with the same peer...
     644     *         only con or null as of 0.9.37
    644645     */
    645646    NTCPConnection removeCon(NTCPConnection con) {
     
    648649        if (ident != null) {
    649650            synchronized (_conLock) {
    650                 removed = _conByIdent.remove(ident.calculateHash());
     651                // only remove the con passed in
     652                //removed = _conByIdent.remove(ident.calculateHash());
     653                if (_conByIdent.remove(ident.calculateHash(), con))
     654                    removed = con;
    651655            }
    652656        }
  • router/java/src/net/i2p/router/tunnel/HopProcessor.java

    rbe4c1af r9a11165  
    8888        }
    8989       
    90         if (_log.shouldLog(Log.DEBUG)) {
     90        //if (_log.shouldLog(Log.DEBUG)) {
    9191            //_log.debug("IV received: " + Base64.encode(iv));
    9292            //_log.debug("Before:" + Base64.encode(orig, IV_LENGTH, orig.length - IV_LENGTH));
    93         }
     93        //}
    9494        //if (USE_ENCRYPTION) {
    9595            //if (USE_DOUBLE_IV_ENCRYPTION)
Note: See TracChangeset for help on using the changeset viewer.