Changeset 47f0bbb


Ignore:
Timestamp:
Jun 13, 2016 6:03:03 AM (4 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
9ba8f53e
Parents:
9a91443 (diff), 2113946 (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:

merge of '65027e70ec9585f6013d97ec88d4f251869e47fd'

and 'c26f9208a0245c8b4b421076479271214ff1d660'

Files:
3 added
1 deleted
43 edited

Legend:

Unmodified
Added
Removed
  • apps/admin/java/src/net/i2p/router/admin/AdminRunner.java

    r9a91443 r47f0bbb  
    1212
    1313import net.i2p.data.Hash;
    14 import net.i2p.data.DataHelper
     14import net.i2p.data.DataHelper;
    1515import net.i2p.router.Router;
    1616import net.i2p.router.RouterContext;
     17import net.i2p.router.web.StatsGenerator;
    1718import net.i2p.util.I2PThread;
    1819import net.i2p.util.Log;
     
    5051            try {
    5152                out.write(DataHelper.getASCII("HTTP/1.1 200 OK\nConnection: close\nCache-control: no-cache\nContent-type: text/html\n\n"));
    52                 _generator.generateStatsPage(new OutputStreamWriter(out));
     53                _generator.generateStatsPage(new OutputStreamWriter(out), true);
    5354                out.close();
    5455            } catch (IOException ioe) {
     
    6465            try {
    6566                out.write(DataHelper.getASCII("HTTP/1.1 200 OK\nConnection: close\nCache-control: no-cache\nContent-type: text/html\n\n"));
    66                 _context.router().renderStatusHTML(new OutputStreamWriter(out));
     67                // TODO Not technically the same as router().renderStatusHTML() was
     68                _context.routerAppManager().renderStatusHTML(new OutputStreamWriter(out));
    6769                out.close();
    6870            } catch (IOException ioe) {
  • apps/i2psnark/java/build.xml

    r9a91443 r47f0bbb  
    5151                <!-- jsp-api.jar only present for debian builds -->
    5252                <pathelement location="../../jetty/jettylib/jsp-api.jar" />
     53                <!-- jetty-i2p.jar only for RunStandalone -->
     54                <pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
     55                <!-- systray.jar only for RunStandalone -->
     56                <pathelement location="../../systray/java/build/systray.jar" />
    5357            </classpath>
    5458        </javac>
     
    7276        <!-- set if unset -->
    7377        <property name="workspace.changes.tr" value="" />
    74         <jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/web/* **/messages_*.class">
     78        <jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/web/* **/messages_*.class, **/standalone/*">
    7579            <manifest>
    7680                <attribute name="Main-Class" value="org.klomp.snark.CommandLine" />
     
    180184        </zip>
    181185    </target>
    182     <target name="standalone_prep" depends="war">
     186
     187    <!-- make a fat jar for standalone -->
     188    <target name="standalone_jar" depends="war">
     189      <!-- set if unset -->
     190      <property name="workspace.changes.tr" value="" />
     191      <jar destfile="build/i2psnark-standalone.jar">
     192        <fileset dir="build/obj" includes="**/standalone/*.class" />
     193        <zipfileset src="build/i2psnark.jar" />
     194        <zipfileset src="../../../core/java/build/i2p.jar" />
     195        <zipfileset src="../../jetty/jettylib/commons-logging.jar"  />
     196      <!-- without this we get a warning about 'no JSP support' but that's it
     197        <zipfileset src="../../jetty/jettylib/jasper-runtime.jar"  />
     198       -->
     199        <zipfileset src="../../jetty/jettylib/javax.servlet.jar" />
     200        <zipfileset src="../../jetty/jettylib/jetty-continuation.jar" />
     201        <zipfileset src="../../jetty/jettylib/jetty-deploy.jar" />
     202        <zipfileset src="../../jetty/jettylib/jetty-http.jar" />
     203        <zipfileset src="../../jetty/jettylib/jetty-i2p.jar" />
     204        <zipfileset src="../../jetty/jettylib/jetty-io.jar" />
     205        <zipfileset src="../../jetty/jettylib/jetty-security.jar"  />
     206        <zipfileset src="../../jetty/jettylib/jetty-servlet.jar" />
     207        <zipfileset src="../../jetty/jettylib/jetty-util.jar" />
     208        <zipfileset src="../../jetty/jettylib/jetty-webapp.jar" />
     209        <zipfileset src="../../jetty/jettylib/jetty-xml.jar" />
     210        <zipfileset src="../../jetty/jettylib/org.mortbay.jetty.jar"  />
     211        <zipfileset src="../../ministreaming/java/build/mstreaming.jar" />
     212        <zipfileset src="../../streaming/java/build/streaming.jar" />
     213        <zipfileset src="../../systray/java/build/systray.jar" />
     214        <manifest>
     215            <attribute name="Main-Class" value="org.klomp.snark.standalone.RunStandalone"/>
     216            <attribute name="Implementation-Version" value="${full.version}" />
     217            <attribute name="Built-By" value="${build.built-by}" />
     218            <attribute name="Build-Date" value="${build.timestamp}" />
     219            <attribute name="Base-Revision" value="${workspace.version}" />
     220            <attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
     221            <!-- this is so Jetty will report its version correctly -->
     222            <section name="org/eclipse/jetty/server/" >
     223                <attribute name="Implementation-Vendor" value="Eclipse.org - Jetty" />
     224                <attribute name="Implementation-Version" value="8.1.17.v20150415" />
     225            </section>
     226        </manifest>
     227      </jar>
     228    </target>
     229
     230    <!-- add css, image, and js files for standalone snark to the war -->
     231    <target name="standalone_war" depends="war">
     232        <mkdir dir="build/standalone-resources/.resources/themes/snark" />
     233        <copy todir="build/standalone-resources/.resources/themes/snark" >
     234            <fileset dir="../../../installer/resources/themes/snark/" />
     235        </copy>
     236        <replace dir="build/standalone-resources/.resources/themes/snark"
     237            summary="true"
     238            token="url('/themes/"
     239            value="url('/i2psnark/.resources/themes/" >
     240            <include name="**/*.css" />
     241        </replace>
     242        <replace dir="build/standalone-resources/.resources/themes/snark"
     243            summary="true"
     244            token="url('../../console/images/"
     245            value="url('/i2psnark/.resources/themes/snark/ubergine/images/" >
     246            <include name="**/*.css" />
     247        </replace>
     248        <replace dir="build/standalone-resources/.resources/themes/snark"
     249            summary="true"
     250            token="url('../../console/dark/images/"
     251            value="url('/i2psnark/.resources/themes/snark/ubergine/images/" >
     252            <include name="**/*.css" />
     253        </replace>
     254        <replace dir="build/standalone-resources/.resources/themes/snark"
     255            summary="true"
     256            token="url('../../console/light/images/"
     257            value="url('/i2psnark/.resources/themes/snark/ubergine/images/" >
     258            <include name="**/*.css" />
     259        </replace>
     260        <replace dir="build/standalone-resources/.resources/themes/snark"
     261            summary="true"
     262            token="url('images/"
     263            value="url('/i2psnark/.resources/themes/snark/ubergine/images/" >
     264            <include name="**/*.css" />
     265        </replace>
     266        <copy todir="build/standalone-resources/.resources/themes/snark/ubergine/images" >
     267            <!-- we really don't need all of these -->
     268            <fileset dir="../../../installer/resources/themes/console/images/" />
     269        </copy>
     270        <copy file="../../../installer/resources/themes/console/dark/images/transparent.gif"
     271              todir="build/standalone-resources/.resources/themes/snark/ubergine/images" />
     272        <copy file="../../../installer/resources/themes/console/dark/images/header.png"
     273              todir="build/standalone-resources/.resources/themes/snark/ubergine/images" />
     274        <mkdir dir="build/standalone-resources/.resources/js" />
     275        <copy file="../../routerconsole/jsp/js/ajax.js" todir="build/standalone-resources/.resources/js" />
     276        <zip destfile="../i2psnark.war" update="true" duplicate="preserve" >
     277            <fileset dir="build/standalone-resources" />
     278        </zip>
     279    </target>
     280   
     281    <target name="standalone_prep" depends="standalone_jar, standalone_war">
    183282        <delete dir="./dist" />
    184283        <mkdir dir="./dist" />
    185284        <copy file="../launch-i2psnark" todir="./dist/" />
     285        <mkdir dir="./dist/contexts" />
     286        <copy file="../standalone-context.xml" tofile="./dist/contexts/context.xml" />
     287        <mkdir dir="./dist/docroot" />
     288        <copy file="../standalone-index.html" tofile="./dist/docroot/index.html" />
    186289        <mkdir dir="./dist/webapps" />
    187290        <copy file="../i2psnark.war" tofile="./dist/webapps/i2psnark.war" />
    188         <mkdir dir="./dist/lib" />
    189         <copy file="./build/i2psnark.jar" tofile="./dist/lib/i2psnark.jar" />
    190         <copy file="../../../core/java/build/i2p.jar" tofile="./dist/lib/i2p.jar" />
    191         <copy file="../../jetty/jettylib/commons-el.jar" tofile="./dist/lib/commons-el.jar" />
    192         <copy file="../../jetty/jettylib/commons-logging.jar" tofile="./dist/lib/commons-logging.jar" />
    193         <copy file="../../jetty/jettylib/javax.servlet.jar" tofile="./dist/lib/javax.servlet.jar" />
    194         <copy file="../../jetty/jettylib/org.mortbay.jetty.jar" tofile="./dist/lib/org.mortbay.jetty.jar" />
    195         <copy file="../../jetty/jettylib/jasper-runtime.jar" tofile="./dist/lib/jasper-runtime.jar" />
    196         <copy file="../../ministreaming/java/build/mstreaming.jar" tofile="./dist/lib/mstreaming.jar" />
    197         <copy file="../../streaming/java/build/streaming.jar" tofile="./dist/lib/streaming.jar" />
    198291        <copy file="../jetty-i2psnark.xml" tofile="./dist/jetty-i2psnark.xml" />
     292        <copy file="./build/i2psnark-standalone.jar" tofile="./dist/i2psnark.jar" />
    199293        <copy file="../readme-standalone.txt" tofile="./dist/readme.txt" />
     294        <!-- temp so announces work -->
     295        <copy file="../../../installer/resources/hosts.txt" tofile="./dist/hosts.txt" />
     296        <copy todir="./dist/licenses" >
     297            <fileset dir="../../../licenses" includes="LICENSE-GPLv2.txt, ABOUT-Jetty.html" />
     298        </copy>
    200299        <mkdir dir="./dist/logs" />
    201 
    202         <zip destfile="i2psnark-standalone.zip">
    203          <zipfileset dir="./dist/" prefix="i2psnark/" />
    204         </zip>
    205300    </target>
    206301
  • apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java

    r9a91443 r47f0bbb  
    234234        _trackerMap = new ConcurrentHashMap<String, Tracker>(4);
    235235        loadConfig(null);
     236        if (!ctx.isRouterContext())
     237            Runtime.getRuntime().addShutdownHook(new Thread(new TempDeleter(_util.getTempDir()), "Snark Temp Dir Deleter"));
    236238    }
    237239
     
    246248        _monitor.start();
    247249        // only if default instance
    248         if ("i2psnark".equals(_contextName))
     250        if (_context.isRouterContext() && "i2psnark".equals(_contextName))
    249251            // delay until UpdateManager is there
    250252            _context.simpleTimer2().addEvent(new Register(), 4*60*1000);
     
    253255        _idleChecker = new IdleChecker(this, _peerCoordinatorSet);
    254256        _idleChecker.schedule(5*60*1000);
     257    }
     258
     259    /**
     260     * Only used in app context
     261     * @since 0.9.27
     262     */
     263    private static class TempDeleter implements Runnable {
     264        private final File file;
     265        public TempDeleter(File f) { file = f; }
     266        public void run() { FileUtil.rmdir(file, false); }
    255267    }
    256268
     
    389401
    390402    private int getStartupDelayMinutes() {
     403        if (!_context.isRouterContext())
     404            return 0;
    391405        try {
    392406            return Integer.parseInt(_config.getProperty(PROP_STARTUP_DELAY));
     
    676690     */
    677691    public String[] getThemes() {
    678             String[] themes;
     692         String[] themes;
     693         if (_context.isRouterContext()) {
    679694            // "docs/themes/snark/"
    680695            File dir = new File(_context.getBaseDir(), "docs/themes/snark");
     
    690705                themes = new String[0];
    691706            }
    692             // return the map.
    693             return themes;
     707        } else {
     708            themes = new String[] { "light", "ubergine", "vanilla" };
     709        }
     710        return themes;
    694711    }
    695712
     
    816833        }
    817834       
    818         if (startDelay != null){
     835        if (startDelay != null && _context.isRouterContext()) {
    819836                int minutes = _util.getStartupDelay();
    820837                try { minutes = Integer.parseInt(startDelay.trim()); } catch (NumberFormatException nfe) {}
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    r9a91443 r47f0bbb  
    55import java.io.PrintWriter;
    66import java.io.Serializable;
    7 import java.text.Collator;
    87import java.text.DecimalFormat;
    98import java.text.SimpleDateFormat;
     
    193192        }
    194193
    195         _themePath = "/themes/snark/" + _manager.getTheme() + '/';
     194        if (_context.isRouterContext())
     195            _themePath = "/themes/snark/" + _manager.getTheme() + '/';
     196        else
     197            _themePath = _contextPath + WARBASE + "themes/snark/" + _manager.getTheme() + '/';
    196198        _imgPath = _themePath + "images/";
    197199        req.setCharacterEncoding("UTF-8");
     
    286288            delay = _manager.getRefreshDelaySeconds();
    287289            if (delay > 0) {
     290                String jsPfx = _context.isRouterContext() ? "" : ".resources";
    288291                //out.write("<meta http-equiv=\"refresh\" content=\"" + delay + ";/i2psnark/" + peerString + "\">\n");
    289                 out.write("<script src=\"/js/ajax.js\" type=\"text/javascript\"></script>\n" +
     292                out.write("<script src=\"" + jsPfx + "/js/ajax.js\" type=\"text/javascript\"></script>\n" +
    290293                          "<script type=\"text/javascript\">\n"  +
    291294                          "var failMessage = \"<div class=\\\"routerdown\\\"><b>" + _t("Router is down") + "<\\/b><\\/div>\";\n" +
     
    325328            else
    326329                out.write(_contextName);
    327             out.write("</a> <a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkRefresh\" target=\"_blank\">");
    328             out.write(_t("Forum"));
    329330            out.write("</a>\n");
    330 
    331331            sortedTrackers = _manager.getSortedTrackers();
    332             for (Tracker t : sortedTrackers) {
    333                 if (t.baseURL == null || !t.baseURL.startsWith("http"))
    334                     continue;
    335                 if (_manager.util().isKnownOpenTracker(t.announceURL))
    336                     continue;
    337                 out.write(" <a href=\"" + t.baseURL + "\" class=\"snarkRefresh\" target=\"_blank\">" + t.name + "</a>");
     332            if (_context.isRouterContext()) {
     333                out.write("<a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkRefresh\" target=\"_blank\">");
     334                out.write(_t("Forum"));
     335                out.write("</a>\n");
     336                for (Tracker t : sortedTrackers) {
     337                    if (t.baseURL == null || !t.baseURL.startsWith("http"))
     338                        continue;
     339                    if (_manager.util().isKnownOpenTracker(t.announceURL))
     340                        continue;
     341                    out.write(" <a href=\"" + t.baseURL + "\" class=\"snarkRefresh\" target=\"_blank\">" + t.name + "</a>");
     342                }
    338343            }
    339344        }
     
    22302235
    22312236                  "<tr><td>");
    2232         out.write(_t("Startup delay"));
    2233         out.write(": <td><input name=\"startupDelay\" size=\"4\" class=\"r\" value=\"" + _manager.util().getStartupDelay() + "\"> ");
    2234         out.write(_t("minutes"));
    2235         out.write("<br>\n" +
    2236 
    2237                   "<tr><td>");
     2237        if (_context.isRouterContext()) {
     2238            out.write(_t("Startup delay"));
     2239            out.write(": <td><input name=\"startupDelay\" size=\"4\" class=\"r\" value=\"" + _manager.util().getStartupDelay() + "\"> ");
     2240            out.write(_t("minutes"));
     2241            out.write("<br>\n" +
     2242
     2243                      "<tr><td>");
     2244        }
    22382245        out.write(_t("Page size"));
    22392246        out.write(": <td><input name=\"pageSize\" size=\"4\" maxlength=\"6\" class=\"r\" value=\"" + _manager.getPageSize() + "\"> ");
  • apps/i2psnark/jetty-i2psnark.xml

    r9a91443 r47f0bbb  
    1 <?xml version="1.0" encoding="ISO-8859-1" ?>
    2 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
     1<?xml version="1.0" encoding="UTF-8" ?>
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
    33
    44<!-- =============================================================== -->
     
    1212<!-- Configure the Jetty Server                                      -->
    1313<!-- =============================================================== -->
    14 <Configure class="org.mortbay.jetty.Server">
     14<Configure id="Server" class="org.eclipse.jetty.server.Server">
    1515
    1616  <!-- =============================================================== -->
     
    2121  <!-- Add and configure a HTTP listener to port 8002                  -->
    2222  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    23   <Call name="addListener">
     23  <Call name="addConnector">
    2424    <Arg>
    25       <New class="org.mortbay.http.SocketListener">
    26         <Arg>
    27           <New class="org.mortbay.util.InetAddrPort">
    28             <Set name="host">127.0.0.1</Set>
    29             <Set name="port">8002</Set>
    30           </New>
    31         </Arg>
    32         <Set name="MinThreads">1</Set>
    33         <Set name="MaxThreads">10</Set>
    34         <Set name="MaxIdleTimeMs">30000</Set>
    35         <Set name="LowResourcePersistTimeMs">1000</Set>
    36         <Set name="ConfidentialPort">8443</Set>
    37         <Set name="IntegralPort">8443</Set>
    38         <Set name="PoolName">main</Set>
    39       </New>
     25        <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
     26          <Set name="host">127.0.0.1</Set>
     27          <Set name="port">8002</Set>
     28          <Set name="maxIdleTime">600000</Set>
     29          <Set name="Acceptors">1</Set>
     30          <Set name="statsOn">false</Set>
     31          <Set name="lowResourcesConnections">5000</Set>
     32          <Set name="lowResourcesMaxIdleTime">5000</Set>
     33          <Set name="useDirectBuffers">false</Set>
     34        </New>
    4035    </Arg>
    4136  </Call>
     
    4540  <!-- =============================================================== -->
    4641
     42    <!-- =========================================================== -->
     43    <!-- Set handler Collection Structure                            -->
     44    <!-- =========================================================== -->
     45    <Set name="handler">
     46      <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
     47        <Set name="handlers">
     48         <Array type="org.eclipse.jetty.server.Handler">
     49           <Item>
     50             <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
     51           </Item>
     52           <Item>
     53             <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
     54           </Item>
     55         </Array>
     56        </Set>
     57      </New>
     58    </Set>
    4759
    48   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    49   <!-- Add a all web application within the webapps directory.         -->
    50   <!-- + No virtual host specified                                     -->
    51   <!-- + Look in the webapps directory relative to jetty.home or .     -->
    52   <!-- + Use the default webdefault.xml in jetty's install             -->
    53   <!-- + Upack the war file                                            -->
    54   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    55   <Set name="rootWebApp">i2psnark</Set>
    56   <Call name="addWebApplication">
    57     <Arg>/</Arg>
    58     <Arg>webapps/i2psnark.war</Arg>
    59   </Call>
     60    <!-- =============================================================== -->
     61    <!-- Create the deployment manager                                   -->
     62    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     63    <!-- The deplyment manager handles the lifecycle of deploying web    -->
     64    <!-- applications. Apps are provided by instances of the             -->
     65    <!-- AppProvider interface.  Typically these are provided by         -->
     66    <!-- one or more of:                                                 -->
     67    <!--   jetty-webapps.xml       - monitors webapps for wars and dirs  -->
     68    <!--   jetty-contexts.xml      - monitors contexts for context xml   -->
     69    <!--   jetty-templates.xml     - monitors contexts and templates     -->
     70    <!-- =============================================================== -->
     71    <Call name="addBean">
     72      <Arg>
     73        <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
     74          <Set name="contexts">
     75            <Ref id="Contexts" />
     76          </Set>
     77          <Call name="setContextAttribute">
     78            <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
     79            <Arg>.*/.*jsp-api-[^/]*\.jar$|.*/.*jsp-[^/]*\.jar$|.*/.*taglibs[^/]*\.jar$</Arg>
     80          </Call>
     81        </New>
     82      </Arg>
     83    </Call>
    6084
    61   <!-- this is so we can find the css -->
    62   <Call name="addContext">
    63     <Arg>
    64       <New class="org.mortbay.http.HttpContext">
    65         <Set name="contextPath">/themes</Set>
    66         <Set name="resourceBase">./docs/themes</Set>
    67         <Call name="addHandler">
    68           <Arg>
    69             <New class="org.mortbay.http.handler.ResourceHandler">
    70               <Set name="redirectWelcome">FALSE</Set>
    71             </New>
    72           </Arg>
    73         </Call>
    74       </New>
    75     </Arg>
    76   </Call>
    77  
    78   <!-- =============================================================== -->
    79   <!-- Configure the Other Server Options                              -->
    80   <!-- =============================================================== -->
    81   <Set name="requestsPerGC">2000</Set>
    82   <Set name="statsOn">false</Set>
     85    <!-- =========================================================== -->
     86    <!-- Configure the context deployer                              -->
     87    <!-- A context deployer will deploy contexts described in        -->
     88    <!-- configuration files discovered in a directory.              -->
     89    <!-- The configuration directory can be scanned for hot          -->
     90    <!-- deployments at the configured scanInterval.                 -->
     91    <!--                                                             -->
     92    <!-- This deployer is configured to deploy contexts configured   -->
     93    <!-- in the $JETTY_HOME/contexts directory                       -->
     94    <!--                                                             -->
     95    <!-- =========================================================== -->
     96    <Ref id="DeploymentManager">
     97      <Call name="addAppProvider">
     98        <Arg>
     99          <New class="org.eclipse.jetty.deploy.providers.ContextProvider">
     100            <Set name="monitoredDirName">./contexts</Set>
     101            <Set name="scanInterval">0</Set>
     102          </New>
     103        </Arg>
     104      </Call>
     105    </Ref>
     106
     107    <!-- =========================================================== -->
     108    <!-- Configure the webapp deployer.                              -->
     109    <!-- A webapp  deployer will deploy standard webapps discovered  -->
     110    <!-- in a directory at startup, without the need for additional  -->
     111    <!-- configuration files.    It does not support hot deploy or   -->
     112    <!-- non standard contexts (see ContextDeployer above).          -->
     113    <!--                                                             -->
     114    <!-- This deployer is configured to deploy webapps from the      -->
     115    <!-- $JETTY_HOME/webapps directory                               -->
     116    <!--                                                             -->
     117    <!-- Normally only one type of deployer need be used.            -->
     118    <!--                                                             -->
     119    <!-- =========================================================== -->
     120    <Ref id="DeploymentManager">
     121      <Call id="webappprovider" name="addAppProvider">
     122        <Arg>
     123          <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
     124            <Set name="monitoredDirName">./webapps</Set>
     125            <Set name="parentLoaderPriority">false</Set>
     126            <Set name="extractWars">false</Set>
     127            <Set name="scanInterval">0</Set>
     128          </New>
     129        </Arg>
     130      </Call>
     131    </Ref>
     132
     133    <!-- ===================== -->
     134    <!-- DefaultHandler config -->
     135    <!-- http://stackoverflow.com/questions/4202275/how-to-prevent-jetty-from-showing-context-related-information -->
     136    <!-- ===================== -->
     137    <Ref id="DefaultHandler">
     138      <Set name="showContexts">false</Set>
     139    </Ref>
    83140
    84141</Configure>
  • apps/i2psnark/launch-i2psnark

    r9a91443 r47f0bbb  
    66#
    77I2P="."
    8 java -cp "$I2P/lib/i2psnark.jar:$I2P/lib/i2p.jar:$I2P/lib/mstreaming.jar:$I2P/lib/streaming.jar:$I2P/lib/commons-el.jar:$I2P/lib/commons-logging.jar:$I2P/lib/jasper-compiler.jar:$I2P/lib/jasper-runtime.jar:$I2P/lib/javax.servlet.jar:$I2P/lib/org.mortbay.jetty.jar" org.klomp.snark.web.RunStandalone "$@"
     8java -jar "$I2P/i2psnark.jar"
  • apps/i2psnark/readme-standalone.txt

    r9a91443 r47f0bbb  
    1 i2psnark is packaged as a webapp running in the router console.
    2 Command line and standalone operation of i2psnark are not currently supported.
    3 See http://trac.i2p2.i2p/ticket/1191 or http://trac.i2p2.de/ticket/1191
    4 for the status of restoring standalone support.
     1To run i2psnark's standalone mode make sure you have an i2p router running in the background, then run:
     2
     3java -jar i2psnark.jar
     4
     5I2PSnark web ui will be at http://127.0.0.1:8002/i2psnark/
     6
     7Please note that http://127.0.0.1:8002/ will 404, to be fixed
     8
     9I2PSnark is GPL'ed software, based on Snark (http://www.klomp.org/) to run on top of I2P
     10(https://geti2p.net/) within a webserver (such as the bundled Jetty from
     11https://www.eclipse.org/jetty/).  For more information about I2PSnark, get in touch
     12with the folks at http://forum.i2p2.de/
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java

    r9a91443 r47f0bbb  
    13391339            if (i < args.length) {
    13401340                host = args[i++];
    1341                 listenHost = host;
    13421341            }
    13431342            if (i < args.length)
  • apps/sam/java/test/net/i2p/sam/TestCreateSessionDatagram.java

    r9a91443 r47f0bbb  
    66import java.net.Socket;
    77
     8import net.i2p.data.DataHelper;
    89import net.i2p.util.Log;
    910
  • apps/sam/java/test/net/i2p/sam/TestCreateSessionRaw.java

    r9a91443 r47f0bbb  
    66import java.net.Socket;
    77
     8import net.i2p.data.DataHelper;
    89import net.i2p.util.Clock;
    910import net.i2p.util.Log;
  • apps/sam/java/test/net/i2p/sam/TestDatagramTransfer.java

    r9a91443 r47f0bbb  
    3838            _log.info("Response from the lookup for ME: " + line);
    3939            _log.debug("The above should be a NAMING REPLY");
    40            
    41             StringTokenizer tok = new StringTokenizer(line);
    42             String maj = tok.nextToken();
    43             String min = tok.nextToken();
    44             Properties props = SAMUtils.parseParams(tok);
     40
     41            Properties props = SAMUtils.parseParams(line);
    4542            String value = props.getProperty("VALUE");
    4643            if (value == null) {
     
    5451            out.write(DataHelper.getASCII(send));
    5552            line = reader.readLine();
    56             tok = new StringTokenizer(line);
    57             maj = tok.nextToken();
    58             min = tok.nextToken();
    59             props = SAMUtils.parseParams(tok);
     53            props = SAMUtils.parseParams(line);
    6054            String size = props.getProperty("SIZE");
    6155            String from = props.getProperty("DESTINATION");
  • apps/sam/java/test/net/i2p/sam/TestDest.java

    r9a91443 r47f0bbb  
    66import java.net.Socket;
    77
     8import net.i2p.data.DataHelper;
    89import net.i2p.util.Log;
    910
  • apps/sam/java/test/net/i2p/sam/TestNaming.java

    r9a91443 r47f0bbb  
    66import java.net.Socket;
    77
     8import net.i2p.data.DataHelper;
    89import net.i2p.util.Log;
    910
  • apps/sam/java/test/net/i2p/sam/TestRawTransfer.java

    r9a91443 r47f0bbb  
    88import java.util.StringTokenizer;
    99
     10import net.i2p.data.DataHelper;
    1011import net.i2p.util.Log;
    1112
     
    3738            _log.info("Response from the lookup for ME: " + line);
    3839            _log.debug("The above should be a NAMING REPLY");
    39            
    40             StringTokenizer tok = new StringTokenizer(line);
    41             String maj = tok.nextToken();
    42             String min = tok.nextToken();
    43             Properties props = SAMUtils.parseParams(tok);
     40
     41            Properties props = SAMUtils.parseParams(line);
    4442            String value = props.getProperty("VALUE");
    4543            if (value == null) {
     
    5452            line = reader.readLine();
    5553            try {
    56                 tok = new StringTokenizer(line);
    57                 maj = tok.nextToken();
    58                 min = tok.nextToken();
    59                 props = SAMUtils.parseParams(tok);
     54                props = SAMUtils.parseParams(line);
    6055            } catch (Exception e) {
    6156                _log.error("Error parsing response line: [" + line + "]", e);
  • apps/sam/java/test/net/i2p/sam/TestStreamTransfer.java

    r9a91443 r47f0bbb  
    7676            out.write(DataHelper.getASCII(req));
    7777            line = reader.readLine();
    78             StringTokenizer tok = new StringTokenizer(line);
    79             String maj = tok.nextToken();
    80             String min = tok.nextToken();
    81             Properties props = SAMUtils.parseParams(tok);
     78            Properties props = SAMUtils.parseParams(line);
    8279            String value = props.getProperty("VALUE");
    8380            if (value == null) {
     
    125122            String line = _reader.readLine();
    126123            _log.debug("Read: " + line);
    127             StringTokenizer tok = new StringTokenizer(line);
    128             String maj = tok.nextToken();
    129             String min = tok.nextToken();
    130             Properties props = SAMUtils.parseParams(tok);
     124            Properties props = SAMUtils.parseParams(line);
     125            String maj = props.getProperty(SAMUtils.COMMAND);
     126            String min = props.getProperty(SAMUtils.OPCODE);
    131127            if ( ("STREAM".equals(maj)) && ("CONNECTED".equals(min)) ) {
    132128                String dest = props.getProperty("DESTINATION");
     
    226222            line = reader.readLine();
    227223            _log.info("Response to the stream connect from "+sessionName+" to Alice: " + line);
    228             StringTokenizer tok = new StringTokenizer(line);
    229             String maj = tok.nextToken();
    230             String min = tok.nextToken();
    231             Properties props = SAMUtils.parseParams(tok);
     224            Properties props = SAMUtils.parseParams(line);
    232225            _log.info("props = " + props);
    233226            String result = props.getProperty("RESULT");
  • apps/sam/java/test/net/i2p/sam/TestSwarm.java

    r9a91443 r47f0bbb  
    144144                _samOut.flush();
    145145                _log.debug("Hello sent");
    146                 boolean ok = _eventHandler.waitForHelloReply();
    147                 _log.debug("Hello reply found: " + ok);
    148                 if (!ok)
     146                String serverVersion = _eventHandler.waitForHelloReply();
     147                _log.debug("Hello reply found: " + serverVersion);
     148                if (serverVersion == null)
    149149                    throw new IOException("wtf, hello failed?");
    150150                String req = "SESSION CREATE STYLE=STREAM DESTINATION=" + _destFile + " " + _conOptions + "\n";
     
    152152                _samOut.flush();
    153153                _log.debug("Session create sent");
    154                 ok = _eventHandler.waitForSessionCreateReply();
     154                boolean ok = _eventHandler.waitForSessionCreateReply();
    155155                _log.debug("Session create reply found: " + ok);
    156156
  • apps/susidns/src/build.xml

    r9a91443 r47f0bbb  
    183183      <delete dir="${bin}" />
    184184      <delete dir="${tmp}" />
     185      <delete dir="build" />
    185186    </target>
    186187    <target name="distclean" depends="clean" />
  • apps/susimail/build.xml

    r9a91443 r47f0bbb  
    151151        <delete dir="src/WEB-INF/classes"/>
    152152        <delete file="susimail.war"/>
     153        <delete dir="build"/>
    153154    </target>
    154155    <target name="cleandep" depends="clean" />
  • build.xml

    r9a91443 r47f0bbb  
    321321    </target>
    322322
    323     <target name="buildI2PSnark" depends="buildStreaming, buildJetty" >
     323    <target name="buildI2PSnark" depends="buildStreaming, buildJetty, buildSystray" >
    324324        <ant dir="apps/i2psnark/java/" target="war" />
    325325        <copy file="apps/i2psnark/i2psnark.war" todir="build/" />
     
    345345    </target>
    346346
    347     <target name="buildI2PTunnel" depends="buildStreaming, buildJetty" >
     347    <target name="buildI2PTunnel" depends="buildStreaming, buildJetty, buildImagegen" >
    348348        <ant dir="apps/i2ptunnel/java/" target="build" />
    349349        <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
     
    18331833        <copy file="apps/syndie/java/syndie-standalone.zip" todir="." />
    18341834    </target> -->
    1835     <target name="i2psnark" depends="buildProperties" >
     1835
     1836    <!-- standalone i2psnark zip -->
     1837    <target name="i2psnark" depends="buildStreaming, buildJetty, buildSystray" >
    18361838        <ant dir="apps/i2psnark/java" target="standalone" />
    18371839        <copy file="apps/i2psnark/java/i2psnark-standalone.zip" todir="." />
    18381840    </target>
     1841
    18391842    <target name="slackpkg">
    18401843        <ant dir="Slackware/i2p/" target="slackpkg" />
     
    22212224    </target>
    22222225
    2223     <!-- same as debian-tarball but with bundled jetty -->
    2224     <target name="precise-tarball" depends="getExtendedVersion">
     2226    <!-- same as debian-release-tarball but with bundled jetty
     2227      -  We add a 'p' to the release name and tarball since the source package is different;
     2228      -  Launchpad does not allow different source packages with the same name.
     2229      -->
     2230    <target name="precise-release-tarball" depends="getExtendedVersion">
    22252231        <!-- this will use the monotonerc file in the current workspace -->
    22262232        <fail message="This target cannot be used without Monotone! Use &quot;fakeroot debian/rules get-orig-source&quot; instead.">
     
    22312237            </condition>
    22322238        </fail>
    2233         <property name="debian.tarball.name" value="i2p_${Extended.Version}.orig.tar.bz2" />
     2239        <property name="debian.tarball.name" value="i2p_${release.number}p.orig.tar.bz2" />
    22342240        <echo message="Checking out fresh copy into ../i2p-${Extended.Version} for tarballing:" />
    22352241        <delete dir="../i2p-${Extended.Version}" />
     
    22392245            <arg value="-r" />
    22402246            <arg value="w:" />
     2247            <arg value="-b" />
     2248            <arg value="i2p.i2p" />
    22412249            <arg value="../i2p-${Extended.Version}" />
    22422250        </exec>
     
    23192327            <arg value="-r" />
    23202328            <arg value="w:" />
     2329            <arg value="-b" />
     2330            <arg value="i2p.i2p" />
    23212331            <arg value="../i2p-${Extended.Version}" />
    23222332        </exec>
  • core/c/jbigi/jbigi/src/jbigi.c

    r9a91443 r47f0bbb  
    11#include <stdio.h>
     2#include <string.h>
    23#include <gmp.h>
    34#include "jbigi.h"
     
    1617 *    Removed nativeDoubleValue()
    1718 *
    18  * 3: (I2P 0.9.18)
     19 * 3: (I2P 0.9.26)
    1920 *    Added:
    2021 *      nativeJbigiVersion()
     
    2728 *    Throw ArithmeticException for bad arguments in modPow()
    2829 *
    29  */
    30 #define JBIGI_VERSION 3
     30 * 4: (I2P 0.9.27)
     31 *    Fix nativeGMPMajorVersion(), nativeGMPMinorVersion(), and nativeGMPPatchVersion()
     32 *    when built as a shared library
     33 *
     34 */
     35#define JBIGI_VERSION 4
    3136
    3237/*****************************************
     
    4045}
    4146
    42 /* since version 3 */
     47/* since version 3, fixed for dynamic builds in version 4 */
    4348JNIEXPORT jint JNICALL Java_net_i2p_util_NativeBigInteger_nativeGMPMajorVersion
    4449        (JNIEnv* env, jclass cls) {
    45     return (jint) __GNU_MP_VERSION;
    46 }
    47 
    48 /* since version 3 */
     50    int v = gmp_version[0] - '0';
     51    return (jint) v;
     52}
     53
     54/* since version 3, fixed for dynamic builds in version 4 */
    4955JNIEXPORT jint JNICALL Java_net_i2p_util_NativeBigInteger_nativeGMPMinorVersion
    5056        (JNIEnv* env, jclass cls) {
    51     return (jint) __GNU_MP_VERSION_MINOR;
    52 }
    53 
    54 /* since version 3 */
     57    int v = 0;
     58    if (strlen(gmp_version) > 2) {
     59        v = gmp_version[2] - '0';
     60    }
     61    return (jint) v;
     62}
     63
     64/* since version 3, fixed for dynamic builds in version 4 */
    5565JNIEXPORT jint JNICALL Java_net_i2p_util_NativeBigInteger_nativeGMPPatchVersion
    5666        (JNIEnv* env, jclass cls) {
    57     return (jint) __GNU_MP_VERSION_PATCHLEVEL;
     67    int v = 0;
     68    if (strlen(gmp_version) > 4) {
     69        v = gmp_version[4] - '0';
     70    }
     71    return (jint) v;
    5872}
    5973
  • core/c/jbigi/mbuild-all.sh

    r9a91443 r47f0bbb  
    8080
    8181if ! command -v m4 > /dev/null; then
    82     printf "\aWARNING: \`m4\` not found. If this process fails to complete, install m4 " >&2
     82    printf "\aWARNING: \`m4\` not found. Install m4 " >&2
    8383    printf "and re-run this script.\n\n\n\a" >&2
    8484    exit 1
     
    8787
    8888if [ -z $BITS ]; then
    89   UNAME="$(uname -a)"
    90   if test "${UNAME#*x86_64}" != "x86_&4"; then
     89  UNAME="$(uname -m)"
     90  if test "${UNAME#*x86_64}" != "$UNAME"; then
    9191    BITS=64
    92   elif test "${UNAME#*i386}" != "i386"; then
    93     BITS=32
    94   elif test "${UNAME#*i686}" != "i686"; then
    95     BITS=32
    96   elif test "${UNAME#*armv6}" != "armv6"; then
    97     BITS=32
    98   elif test "${UNAME#*armv7}" != "armv7"; then
    99     BITS=32
    100   elif test "${UNAME#*aarch32}" != "aarch32"; then
    101     BITS=32
    102   elif test "${UNAME#*aarch64}" != "aarch64"; then
     92  elif test "${UNAME#*i386}" != "$UNAME"; then
     93    BITS=32
     94  elif test "${UNAME#*i686}" != "$UNAME"; then
     95    BITS=32
     96  elif test "${UNAME#*armv6}" != "$UNAME"; then
     97    BITS=32
     98  elif test "${UNAME#*armv7}" != "$UNAME"; then
     99    BITS=32
     100  elif test "${UNAME#*aarch32}" != "$UNAME"; then
     101    BITS=32
     102  elif test "${UNAME#*aarch64}" != "$UNAME"; then
    103103    BITS=64
    104104  else
    105  
    106105    echo "Unable to detect default setting for BITS variable"
    107     exit
     106    exit 1
    108107  fi
    109 
    110108  printf "\aBITS variable not set, $BITS bit system detected\n\a" >&2
    111109fi
     
    117115fi
    118116
     117# FIXME -m32 and -m64 are only for x86
    119118if [ $BITS -eq 32 ]; then
    120119  export ABI=32
  • core/java/build.xml

    r9a91443 r47f0bbb  
    8686            <fileset dir="src" includes="${translation.includes}" />
    8787            <manifest>
     88                <attribute name="Specification-Title" value="I2P Core API" />
     89                <attribute name="Specification-Version" value="${release.number}" />
     90                <attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />
     91                <attribute name="Implementation-Title" value="I2P Java Core API" />
    8892                <attribute name="Implementation-Version" value="${full.version}" />
     93                <attribute name="Implementation-Vendor" value="The I2P Project https://geti2p.net/" />
    8994                <attribute name="Built-By" value="${build.built-by}" />
    9095                <attribute name="Build-Date" value="${build.timestamp}" />
  • core/java/src/freenet/support/CPUInformation/AMDCPUInfo.java

    r9a91443 r47f0bbb  
    4242    /**
    4343     * @return true if the CPU present in the machine is at least an 'k10' CPU
     44     * @since 0.9.26
    4445     */
    4546    public boolean IsK10Compatible();
     
    5051    /**
    5152     * @return true if the CPU present in the machine is at least an 'jaguar' CPU
     53     * @since 0.9.26
    5254     */
    5355        public boolean IsJaguarCompatible();
     
    5860    /**
    5961     * @return true if the CPU present in the machine is at least a 'piledriver' CPU
     62     * @since 0.9.26
    6063     */
    6164        public boolean IsPiledriverCompatible();
    6265    /**
    6366     * @return true if the CPU present in the machine is at least a 'steamroller' CPU
     67     * @since 0.9.26
    6468     */
    6569        public boolean IsSteamrollerCompatible();
    6670    /**
    6771     * @return true if the CPU present in the machine is at least a 'excavator' CPU
     72     * @since 0.9.26
    6873     */
    6974        public boolean IsExcavatorCompatible();
  • core/java/src/freenet/support/CPUInformation/CPUID.java

    r9a91443 r47f0bbb  
    377377        if(c instanceof IntelCPUInfo){
    378378            System.out.println("\n **Intel-info**");
    379             System.out.println("Is PII-compatible: "+((IntelCPUInfo)c).IsPentium2Compatible());
    380             System.out.println("Is PIII-compatible: "+((IntelCPUInfo)c).IsPentium3Compatible());
    381             System.out.println("Is PIV-compatible: "+((IntelCPUInfo)c).IsPentium4Compatible());
    382             System.out.println("Is Atom-compatible: "+((IntelCPUInfo)c).IsAtomCompatible());
     379            System.out.println("Is PII-compatible:       "+((IntelCPUInfo)c).IsPentium2Compatible());
     380            System.out.println("Is PIII-compatible:      "+((IntelCPUInfo)c).IsPentium3Compatible());
     381            System.out.println("Is PIV-compatible:       "+((IntelCPUInfo)c).IsPentium4Compatible());
     382            System.out.println("Is Atom-compatible:      "+((IntelCPUInfo)c).IsAtomCompatible());
    383383            System.out.println("Is Pentium M compatible: "+((IntelCPUInfo)c).IsPentiumMCompatible());
    384             System.out.println("Is Core2-compatible: "+((IntelCPUInfo)c).IsCore2Compatible());
    385             System.out.println("Is Corei-compatible: "+((IntelCPUInfo)c).IsCoreiCompatible());
    386             System.out.println("Is Sandy-compatible: "+((IntelCPUInfo)c).IsSandyCompatible());
    387             System.out.println("Is Ivy-compatible: "+((IntelCPUInfo)c).IsIvyCompatible());
    388             System.out.println("Is Haswell-compatible: "+((IntelCPUInfo)c).IsHaswellCompatible());
     384            System.out.println("Is Core2-compatible:     "+((IntelCPUInfo)c).IsCore2Compatible());
     385            System.out.println("Is Corei-compatible:     "+((IntelCPUInfo)c).IsCoreiCompatible());
     386            System.out.println("Is Sandy-compatible:     "+((IntelCPUInfo)c).IsSandyCompatible());
     387            System.out.println("Is Ivy-compatible:       "+((IntelCPUInfo)c).IsIvyCompatible());
     388            System.out.println("Is Haswell-compatible:   "+((IntelCPUInfo)c).IsHaswellCompatible());
    389389            System.out.println("Is Broadwell-compatible: "+((IntelCPUInfo)c).IsBroadwellCompatible());
    390390        }
    391391        if(c instanceof AMDCPUInfo){
    392392            System.out.println("\n **AMD-info**");
    393             System.out.println("Is K6-compatible: "+((AMDCPUInfo)c).IsK6Compatible());
    394             System.out.println("Is K6_2-compatible: "+((AMDCPUInfo)c).IsK6_2_Compatible());
    395             System.out.println("Is K6_3-compatible: "+((AMDCPUInfo)c).IsK6_3_Compatible());
    396             System.out.println("Is Geode-compatible: "+((AMDCPUInfo)c).IsGeodeCompatible());
    397             System.out.println("Is Athlon-compatible: "+((AMDCPUInfo)c).IsAthlonCompatible());
    398             System.out.println("Is Athlon64-compatible: "+((AMDCPUInfo)c).IsAthlon64Compatible());
    399             System.out.println("Is Bobcat-compatible: "+((AMDCPUInfo)c).IsBobcatCompatible());
     393            System.out.println("Is K6-compatible:          "+((AMDCPUInfo)c).IsK6Compatible());
     394            System.out.println("Is K6_2-compatible:        "+((AMDCPUInfo)c).IsK6_2_Compatible());
     395            System.out.println("Is K6_3-compatible:        "+((AMDCPUInfo)c).IsK6_3_Compatible());
     396            System.out.println("Is Geode-compatible:       "+((AMDCPUInfo)c).IsGeodeCompatible());
     397            System.out.println("Is Athlon-compatible:      "+((AMDCPUInfo)c).IsAthlonCompatible());
     398            System.out.println("Is Athlon64-compatible:    "+((AMDCPUInfo)c).IsAthlon64Compatible());
     399            System.out.println("Is Bobcat-compatible:      "+((AMDCPUInfo)c).IsBobcatCompatible());
     400            System.out.println("Is K10-compatible:         "+((AMDCPUInfo)c).IsK10Compatible());
     401            System.out.println("Is Jaguar-compatible:      "+((AMDCPUInfo)c).IsJaguarCompatible());
     402            System.out.println("Is Bulldozer-compatible:   "+((AMDCPUInfo)c).IsBulldozerCompatible());
     403            System.out.println("Is Piledriver-compatible:  "+((AMDCPUInfo)c).IsPiledriverCompatible());
     404            System.out.println("Is Steamroller-compatible: "+((AMDCPUInfo)c).IsSteamrollerCompatible());
     405            System.out.println("Is Excavator-compatible:   "+((AMDCPUInfo)c).IsExcavatorCompatible());
    400406        }
    401407    }
  • core/java/src/net/i2p/client/naming/BlockfileNamingService.java

    r9a91443 r47f0bbb  
    14931493            }
    14941494        }
    1495         // we sort the destinations in addDestionation(),
     1495        // we sort the destinations in addDestination(),
    14961496        // which is a lot easier than sorting them here
    14971497        return rv;
  • core/java/src/net/i2p/crypto/KeyGenerator.java

    r9a91443 r47f0bbb  
    1616import java.security.KeyPair;
    1717import java.security.KeyPairGenerator;
     18import java.security.MessageDigest;
    1819import java.security.ProviderException;
    1920import java.security.interfaces.ECPrivateKey;
     
    417418            System.out.println(type + " private-to-public test FAILED");
    418419        //System.out.println("privkey " + keys[1]);
     420          MessageDigest md = type.getDigestInstance();
    419421        for (int i = 0; i < runs; i++) {
    420422            RandomSource.getInstance().nextBytes(src);
     423              md.update(src);
     424              byte[] sha = md.digest();
     425              SimpleDataStructure hash = type.getHashInstance();
     426              hash.setData(sha);
    421427            long start = System.nanoTime();
    422428            Signature sig = DSAEngine.getInstance().sign(src, privkey);
     429            Signature sig2 = DSAEngine.getInstance().sign(hash, privkey);
    423430            if (sig == null)
    424431                throw new GeneralSecurityException("signature generation failed");
     432            if (sig2 == null)
     433                throw new GeneralSecurityException("signature generation (H) failed");
    425434            long mid = System.nanoTime();
    426435            boolean ok = DSAEngine.getInstance().verifySignature(sig, src, pubkey);
     436            boolean ok2 = DSAEngine.getInstance().verifySignature(sig2, hash, pubkey);
    427437            long end = System.nanoTime();
    428438            stime += mid - start;
     
    430440            if (!ok)
    431441                throw new GeneralSecurityException(type + " V(S(data)) fail");
     442            if (!ok2)
     443                throw new GeneralSecurityException(type + " V(S(H(data))) fail");
    432444        }
    433445        stime /= 1000*1000;
  • debian-alt/doc/debian-build.txt

    r9a91443 r47f0bbb  
    1818vi debian/changelog
    1919   change i2p_0.9.xx-x-xxxxxxxx-1 to i2p_0.9.xx-1
    20    change UNRELEASED to unstable
     20   change UNRELEASED to stable
    2121   change comment to "New upstream version 0.9.xx"
    2222   fix your name and email
     
    5858sudo su kytv (he owns the reprepro directories)
    5959
    60 reprepro includedeb unstable i2p-doc_0.9.xx-1_all.deb
    61 reprepro includedeb unstable i2p-router_0.9.xx-1_all.deb
    62 reprepro includedeb unstable i2p_0.9.xx-1_all.deb
    63 reprepro includedeb unstable libjbigi-jni_0.9.xx-1_amd64.deb
     60reprepro includedeb stable i2p-doc_0.9.xx-1_all.deb
     61reprepro includedeb stable i2p-router_0.9.xx-1_all.deb
     62reprepro includedeb stable libjbigi-jni_0.9.xx-1_amd64.deb
     63reprepro includedeb stable i2p_0.9.xx-1_all.deb
    6464# if you already got the source from launchpad
    6565# with reprepro update, skip this?
    66 reprepro includedsc unstable i2p_0.9.XX-1.dsc
     66reprepro includedsc stable i2p_0.9.XX-1.dsc
     67
     68# copy built packages from launchpad
     69reprepro -v update precise
     70reprepro -v update trusty
     71reprepro -v update vivid
     72reprepro -v update wily
     73reprepro -v update xenial
    6774
    6875
    69 # To copy precise to wheezy if you build precise on launchpad
    70 # and then did a reprepro update:
     76# To copy precise to wheezy:
    7177# Note that syntax is reprepro copysrc TO FROM package!
    72 reprepro copysrc wheezy precise i2p
     78reprepro -v copysrc wheezy precise i2p
  • debian-alt/doc/launchpad.txt

    r9a91443 r47f0bbb  
    5050     if you want to sign with a subkey)
    5151    run gpg -K to list your private keys
    52 - ant debian-release-tarball
     52- ant debian-release-tarball (ant precise-release-tarball for precise)
    5353  this will make a directory ../i2p-0.9.XX-0-xxxxxxxx/
    5454  and a tarball ../i2p_0.9.XX.orig.tar.bz2
     
    135135You must first create a milestone, then create a release
    136136and attach it to the milestone.
     137
     138(Enable referer sending in your browser if necessary)
     139
    137140Go to https://launchpad.net/i2p/trunk
    138141Down at bottom, click 'create milestone'
     
    161164      File Content Type: Installer File
    162165    i2pinstall_0.9.xx.jar
    163       Description: I2P 0.9.xx Installer (Linux / OSX / FreeBSD / Solaris)
     166      Description: I2P 0.9.xx Installer (Linux / OSX / FreeBSD / Solaris / Mac)
    164167      Sig: i2pinstall_0.9.xx.jar.sig
    165168      File Content Type: Installer File
  • debian-alt/precise/changelog

    r9a91443 r47f0bbb  
     1i2p (0.9.26p-1~precise+1) precise; urgency=medium
     2
     3  * Backport to Precise
     4
     5 -- zzz on i2p <zzz@i2pmail.org>  Tue, 07 Jun 2016 12:12:12 +0000
     6
    17i2p (0.9.25-1~precise+1) precise; urgency=medium
    28
  • debian-alt/trusty/changelog

    r9a91443 r47f0bbb  
     1i2p (0.9.26-1ubuntu1) trusty; urgency=medium
     2
     3  * New upstream version 0.9.26
     4
     5 -- zzz on i2p (key signing) <zzz@i2pmail.org>  Tue, 07 Jun 2016 12:12:12 +0000
     6
    17i2p (0.9.25-1ubuntu1) trusty; urgency=medium
    28
  • debian/changelog

    r9a91443 r47f0bbb  
     1i2p (0.9.26-1~deb8u+1) stable; urgency=medium
     2
     3  * Backport to Jessie
     4
     5 -- zzz on i2p <zzz@i2pmail.org>  Tue, 08 Jun 2016 12:12:12 +0000
     6
    17i2p (0.9.25-1~deb8u+1) stable; urgency=medium
    28
  • debian/patches/0001-path-substitution.patch

    r9a91443 r47f0bbb  
    2020 #!/bin/sh
    2121-I2P="%INSTALL_PATH"
     22-java -cp "$I2P/lib/i2p.jar" net.i2p.util.EepGet "$@"
    2223+I2P="/usr/share/i2p"
    23  java -cp "$I2P/lib/i2p.jar" net.i2p.util.EepGet "$@"
     24+java -cp "$I2P/lib/i2p.jar:/usr/share/java/gnu-getopt.jar" net.i2p.util.EepGet "$@"
    2425--- a/installer/resources/i2prouter
    2526+++ b/installer/resources/i2prouter
  • history.txt

    r9a91443 r47f0bbb  
     12016-06-11 zzz
     2Prop from i2p.i2p.zzz.test2:
     3 * CPUID: Add CLI output for new AMD tests
     4 * i2psnark standalone:
     5   - Cherry-pick fixes from psi's github i2psnark_rpc branch
     6   - Fix up Jetty XML file for Jetty 8
     7   - Start with JettyStart
     8   - Add UrlLauncher to launch browser
     9   - Fix up paths in CSS files during build
     10   - Force startup delay to 0
     11   - Fix theme selection
     12   - Adjust CSS and image paths
     13   - Add shutdown hook to delete temp dir
     14 * i2ptunnel CLI: Don't set the listen host to the I2CP host
     15 * jbigi:
     16   - Fix GMP version reporting for shared library (ticket #1800)
     17   - mbuild-all script fixes
     18 * NetDB: Improve handling of deferred search result jobs
     19
    120* 2016-06-07 0.9.26 released
    221
  • installer/resources/checklist.md

    r9a91443 r47f0bbb  
    33## One week before
    44
     5- Announce string freeze on #i2p-dev
     6- Update local English po files: `ant poupdate`
     7- Revert non-English changes if any
     8- Push to Transifex: `tx push -s`
    59- Make announcement on Transifex with checkin deadline
    610
     
    5357    ```
    5458
    55   - You may build with Java 7 or higher, but ensure you have the Java 6 JRE installed for the bootclasspath
     59  - You must build with Java 7 or higher, but ensure you also have the Java 6 JRE installed for the bootclasspath.
     60    If you build with Java 8 or higher, you must also have the Java 7 JRE installed for the bootclasspath.
    5661
    57624. Create override.properties with (adjust as necessary):
     
    166171  - Load torrents in i2psnark on your production router, verify infohashes
    167172
    168 3. If all goes well, tag and sync the release:
     1733. If all goes well, tag and push the release:
    169174
    170175    ```
    171176    mtn tag h: i2p-0.x.xx
    172177    mtn cert t:i2p-0.x.xx branch i2p.i2p.release
    173     mtn sync (with e.g. mtn.killyourtv.i2p)
     178    mtn push
    174179    ```
    175180
     
    1781831. Update news with new version:
    179184  - Add magnet links, change release dates and release number in to old-format
    180     news.xml, and distribute to news hosts
     185    news.xml, and distribute to news hosts (no longer necessary)
    181186  - In the i2p.newsxml branch, edit magnet links, release dates and release
    182     number in data/releases.json, and check in
     187    number in data/releases.json, check in and push
    183188
    1841892. Add i2pupdate-0.9.xx.su3 torrent to tracker2.postman.i2p and start seeding
     
    1992046. Tell news hosts to flip the switch
    200205
     2067. Monitor torrent for activity to verify that the new news is now live
     207
     208
    201209### Notify release
    202210
    203 1. Wait for files to be updated on download server
    204 
    205 2. Website files to change:
     2111. Upload files to launchpad release (download mirror)
     212   (see debian-alt/doc/launchpad.txt for instructions)
     213
     2142. Wait for files to be updated on download server
     215   Verify at http://download.i2p2.no/releases/
     216
     2173. Website files to change:
    206218  - Sync with mtn.i2p-projekt.i2p
    207219  - `i2p2www/static/hosts.txt` if it changed (copy from i2p.i2p mtn branch)
    208220  - `i2p2www/__init__.py` (release number)
    209   - `i2p2www/pages/downloads/list.html` (release signer)
     221  - `i2p2www/pages/downloads/list.html` (release signer, if changed)
    210222  - `i2p2www/pages/downloads/macros` (checksums)
    211   - `i2p2www/static/news/news.xml`
     223  - `i2p2www/static/news/news.xml` (no longer necessary)
    212224  - Sync with mtn.i2p-projekt.i2p
    213 
    214 3. Wait for debian packages to be ready
    215225
    2162264. Announce on:
     
    218228  - forum.i2p
    219229  - Twitter
     230
     2315. Launchpad builds
     232   (see debian-alt/doc/launchpad.txt for instructions)
     233
     2346. Debian builds
     235   (see debian-alt/doc/debian-build.txt for instructions)
     236
     2377. Announce Launchpad and Debian builds on Twitter
     238
     2398. Notify Tails that new Debian builds are available
  • installer/resources/eepsite/contexts/base-context.xml

    r9a91443 r47f0bbb  
    3333      </New>
    3434    </Arg>
    35   </Call>
    36   <Call name="addServlet">
    37     <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg>
    38     <Arg>/</Arg>
    3935  </Call>
    4036  <Call name="addServlet">
  • installer/resources/themes/snark/light/snark.css

    r9a91443 r47f0bbb  
    3030     font-size: 9pt;
    3131     color: #559;
    32      background: #fff url("../../console/light/images/header.png") repeat-x scroll center center;
     32     background: #fff url('../../console/light/images/header.png') repeat-x scroll center center;
    3333     -moz-border-radius: 0px;
    3434     -khtml-border-radius: 3px;
     
    168168     color: #001;
    169169      whitespace: nowrap;
    170      background: #fff url("../../console/light/images/header.png") repeat-x scroll center center;
     170     background: #fff url('../../console/light/images/header.png') repeat-x scroll center center;
    171171}
    172172
     
    415415     border-top: 0;
    416416     text-shadow: 0 1px 0 #aaa;
    417      background: #fff url("../../console/light/images/header.png") repeat-x scroll center center;
     417     background: #fff url('../../console/light/images/header.png') repeat-x scroll center center;
    418418     font-variant: small-caps !important;
    419419     box-shadow: 0 1px 3px #999;
  • installer/resources/themes/snark/vanilla/snark.css

    r9a91443 r47f0bbb  
    167167
    168168thead, tfoot {
    169      background: url("images/bling2.png") repeat-x scroll center center #867;
     169     background: url('images/bling2.png') repeat-x scroll center center #867;
    170170     font-weight: bold;
    171171     color: #503;
  • router/java/build.xml

    r9a91443 r47f0bbb  
    6868                <!-- so people with very old wrapper.config files will still work with Jetty 6 -->
    6969                <attribute name="Class-Path" value="i2p.jar jetty-i2p.jar jetty-java5-threadpool.jar jetty-rewrite-handler.jar jetty-sslengine.jar jetty-start.jar jetty-util.jar" />
     70                <attribute name="Specification-Title" value="I2P Router" />
     71                <attribute name="Specification-Version" value="${release.number}" />
     72                <attribute name="Specification-Vendor" value="The I2P Project https://geti2p.net/" />
     73                <attribute name="Implementation-Title" value="I2P Java Router" />
    7074                <attribute name="Implementation-Version" value="${full.version}" />
     75                <attribute name="Implementation-Vendor" value="The I2P Project https://geti2p.net/" />
    7176                <attribute name="Built-By" value="${build.built-by}" />
    7277                <attribute name="Build-Date" value="${build.timestamp}" />
  • router/java/src/net/i2p/router/RouterVersion.java

    r9a91443 r47f0bbb  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 0;
     21    public final static long BUILD = 1;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/StatisticsManager.java

    r9a91443 r47f0bbb  
    7272        Properties stats = new Properties();
    7373        stats.setProperty("router.version", RouterVersion.VERSION);
    74         // scheduled for removal, never used
    75         if (CoreVersion.VERSION.equals("0.9.23"))
    76             stats.setProperty("coreVersion", CoreVersion.VERSION);
     74        // never used
     75        //stats.setProperty("coreVersion", CoreVersion.VERSION);
    7776        stats.setProperty(RouterInfo.PROP_NETWORK_ID, _networkID);
    7877        stats.setProperty(RouterInfo.PROP_CAPABILITIES, _context.router().getCapabilities());
     
    169168
    170169        // So that we will still get build requests - not required since 0.7.9 2010-01-12
    171         // scheduled for removal
    172         if (CoreVersion.VERSION.equals("0.9.23"))
    173             stats.setProperty("stat_uptime", "90m");
     170        //stats.setProperty("stat_uptime", "90m");
    174171        if (FloodfillNetworkDatabaseFacade.isFloodfill(_context.router().getRouterInfo())) {
    175172            int ri = _context.router().getUptime() > 30*60*1000 ?
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodOnlySearchJob.java

    r9a91443 r47f0bbb  
    233233            if (_dead) return;
    234234            _dead = true;
     235            super.success();
    235236        }
    236237        if (_log.shouldLog(Log.INFO))
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodSearchJob.java

    r9a91443 r47f0bbb  
    3434    protected volatile boolean _dead;
    3535    protected final long _created;
     36    protected boolean _success;
    3637
    3738    /**
     
    7071     */
    7172    void addDeferred(Job onFind, Job onFailed, long timeoutMs, boolean isLease) {
     73        boolean success;
    7274        synchronized (this) {
    7375            if (!_dead) {
     
    7880                return;
    7981            }
     82            success = _success;
    8083        }
    8184        // outside synch to avoid deadlock with job queue
    82         getContext().jobQueue().addJob(onFailed);
     85        if (success && onFind != null)
     86            getContext().jobQueue().addJob(onFind);
     87        else if (!success && onFailed != null)
     88            getContext().jobQueue().addJob(onFailed);
    8389    }
    8490
     
    194200     */
    195201    void success() {
     202        synchronized(this) {
     203            _success = true;
     204        }
     205/****
    196206        throw new UnsupportedOperationException("use override");
    197 /****
    198207        if (_dead) return;
    199208        if (_log.shouldLog(Log.INFO))
  • router/java/src/net/i2p/router/networkdb/kademlia/IterativeSearchJob.java

    r9a91443 r47f0bbb  
    588588            if (_dead) return;
    589589            _dead = true;
     590            _success = true;
    590591            tries = _unheardFrom.size() + _failedPeers.size();
    591592            if (_unheardFrom.size() == 1) {
Note: See TracChangeset for help on using the changeset viewer.