Changes in / [7a88f59:7782970]


Ignore:
Files:
5 added
9 deleted
55 edited

Legend:

Unmodified
Added
Removed
  • LICENSE.txt

    r7a88f59 r7782970  
    7777   See licenses/LICENSE-UPnP.txt
    7878
    79    XMLPull library used by UPnP:
    80    See licenses/LICENSE-Apache2.0.txt
    81 
    8279   GeoIP data free to use, courtesy http://ip-to-country.webhosting.info/
    8380
  • apps/addressbook/java/src/addressbook/ConfigParser.java

    r7a88f59 r7782970  
    4040 * format, and subscription file format.
    4141 *
     42 * TODO: Change file encoding from default to UTF-8?
     43 *       Or switch to the DataHelper loadProps/storeProps methods?
     44 *
    4245 * @author Ragnarok
    4346 */
  • apps/i2psnark/i2psnark.config

    r7a88f59 r7782970  
     1# NOTE: This I2P config file must use UTF-8 encoding
     2#
     3# If you have a 'split' directory installation, with configuration
     4# files in ~/.i2p (Linux) or %APPDATA%\I2P (Windows), be sure to
     5# edit the file in the configuration directory, NOT the install directory.
     6#
    17i2psnark.dir=i2psnark
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    r7a88f59 r7782970  
    6565        resp.setCharacterEncoding("UTF-8");
    6666        resp.setContentType("text/html; charset=UTF-8");
    67         long stats[] = {0,0,0,0,0};
     67        /** dl, ul, down rate, up rate, peers, size */
     68        final long stats[] = {0,0,0,0,0,0};
    6869       
    6970        String nonce = req.getParameter("nonce");
     
    137138        } else if (snarks.size() > 1) {
    138139            out.write("<tfoot><tr>\n" +
    139                       "    <th align=\"left\" colspan=\"2\">Totals (" + snarks.size() + " torrents, " + stats[4] + " connected peers)</th>\n" +
     140                      "    <th align=\"left\" colspan=\"2\">Totals (" +
     141                      snarks.size() + " torrents, " +
     142                      DataHelper.formatSize(stats[5]) + "B, " +
     143                      stats[4] + " connected peers)</th>\n" +
    140144                      "    <th>&nbsp;</th>\n" +
    141145                      "    <th align=\"right\">" + formatSize(stats[0]) + "</th>\n" +
     
    431435            stats[3] += upBps;
    432436        }
     437        stats[5] += total;
    433438       
    434439        boolean isValid = snark.meta != null;
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelControllerGroup.java

    r7a88f59 r7782970  
    256256        try {
    257257            fos = new FileOutputStream(cfgFile);
    258             fos.write(buf.toString().getBytes());
     258            fos.write(buf.toString().getBytes("UTF-8"));
    259259            if (_log.shouldLog(Log.INFO))
    260260                _log.info("Config written to " + cfgFile.getPath());
  • apps/i2ptunnel/jsp/editClient.jsp

    r7a88f59 r7782970  
    320320            <div id="optionsField" class="rowItem">
    321321                <label for="reduce" accesskey="c">
    322                     <span class="accessKey">C</span>lose tunnels when idle: <i>Experimental</i>
     322                    <span class="accessKey">C</span>lose tunnels when idle:
    323323                </label>
    324324            </div>
     
    355355            <div id="optionsField" class="rowItem">
    356356                <label for="reduce" accesskey="c">
    357                     <span class="accessKey">D</span>elay tunnel open until required: <i>Experimental</i>
     357                    <span class="accessKey">D</span>elay tunnel open until required:
    358358                </label>
    359359            </div>
  • apps/jetty/build.xml

    r7a88f59 r7782970  
    110110        <echo message="Not actually deleting the jetty libs (since they're so large)" />
    111111    </target>
     112    <target name="reallyclean" depends="distclean">
     113        <delete dir="./jettylib" />
     114    </target>
     115    <target name="totallyclean" depends="clean">
     116        <delete dir="./jettylib" />
     117        <delete file="${jetty.filename}" />
     118    </target>
    112119    <target name="javadoc" >
    113120        <available property="jetty.zip.available" file="${jetty.filename}" type="file" />
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PServerSocketImpl.java

    r7a88f59 r7782970  
    1616 * timeout)
    1717 *
     18 * @deprecated use I2PServerSocketFull
    1819 */
    1920class I2PServerSocketImpl implements I2PServerSocket {
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketImpl.java

    r7a88f59 r7782970  
    1818 * Initial stub implementation for the socket
    1919 *
     20 * @deprecated use I2PSocketFull
    2021 */
    2122class I2PSocketImpl implements I2PSocket {
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java

    r7a88f59 r7782970  
    159159
    160160    private static I2PSocketManager createManager(I2PSession session, Properties opts, String name) {
    161         if (false) {
    162             I2PSocketManagerImpl mgr = new I2PSocketManagerImpl();
    163             mgr.setSession(session);
     161        //if (false) {
     162            //I2PSocketManagerImpl mgr = new I2PSocketManagerImpl();
     163            //mgr.setSession(session);
    164164            //mgr.setDefaultOptions(new I2PSocketOptions());
    165             return mgr;
    166         } else {
     165            //return mgr;
     166        //} else {
    167167            String classname = opts.getProperty(PROP_MANAGER, DEFAULT_MANAGER);
    168168            if (classname != null) {
     
    191191                throw new IllegalStateException("No manager class specified");
    192192            }
    193         }
     193        //}
    194194       
    195195    }
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerImpl.java

    r7a88f59 r7782970  
    3737 * or receive any messages with its .receiveMessage
    3838 *
     39 * @deprecated use I2PSocketManagerFull
    3940 */
    4041class I2PSocketManagerImpl implements I2PSocketManager, I2PSessionListener {
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigStatsHelper.java

    r7a88f59 r7782970  
    3535     * Configure this bean to query a particular router context
    3636     *
    37      * @param contextId begging few characters of the routerHash, or null to pick
     37     * @param contextId beginning few characters of the routerHash, or null to pick
    3838     *                  the first one we come across.
    3939     */
    4040    @Override
    4141    public void setContextId(String contextId) {
    42         try {
    43             _context = ContextHelper.getContext(contextId);
    44             _log = _context.logManager().getLog(ConfigStatsHelper.class);
    45         } catch (Throwable t) {
    46             t.printStackTrace();
    47         }
     42        super.setContextId(contextId);
     43        _log = _context.logManager().getLog(ConfigStatsHelper.class);
    4844       
    4945        _stats = new ArrayList();
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java

    r7a88f59 r7782970  
    5656            fetcher.fetchNews();
    5757            if (fetcher.shouldFetchUnsigned())
    58                 fetcher.fetchUnsigned();
     58                fetcher.fetchUnsignedHead();
    5959            if (fetcher.updateAvailable() || fetcher.unsignedUpdateAvailable()) {
    6060                if ( (_updatePolicy == null) || (!_updatePolicy.equals("notify")) )
  • apps/routerconsole/java/src/net/i2p/router/web/HelperBase.java

    r7a88f59 r7782970  
    1515     * Configure this bean to query a particular router context
    1616     *
    17      * @param contextId begging few characters of the routerHash, or null to pick
     17     * @param contextId beginning few characters of the routerHash, or null to pick
    1818     *                  the first one we come across.
    1919     */
     
    2626    }
    2727
     28    /** might be useful in the jsp's */
     29    //public RouterContext getContext() { return _context; }
     30
    2831    public void setWriter(Writer out) { _out = out; }
    2932}
  • apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java

    r7a88f59 r7782970  
    189189                    if (modtime > ms) {
    190190                        _unsignedUpdateAvailable = true;
    191                         // '07-Jul 21:09' with month name in the system locale
    192                         _unsignedUpdateVersion = (new SimpleDateFormat("dd-MMM HH:mm")).format(new Date(modtime));
     191                        // '07-Jul 21:09 UTC' with month name in the system locale
     192                        _unsignedUpdateVersion = (new SimpleDateFormat("dd-MMM HH:mm")).format(new Date(modtime)) + " UTC";
    193193                        if (shouldInstall())
    194194                            fetchUnsigned();
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    r7a88f59 r7782970  
    206206    }
    207207   
     208/*******
    208209    public void stopConsole() {
    209210        try {
     
    213214        }
    214215    }
     216********/
    215217   
    216218    public static Properties webAppProperties() {
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryHelper.java

    r7a88f59 r7782970  
    132132     *
    133133     */
     134/********
    134135    public String getMemory() {
    135136        DecimalFormat integerFormatter = new DecimalFormat("###,###,##0");
     
    138139        return integerFormatter.format(used) + "KB (" + usedPc + "%)";
    139140    }
     141********/
    140142   
    141143    /**
     
    149151            return _context.commSystem().countActivePeers();
    150152    }
     153
     154    /**
     155     * Should we warn about a possible firewall problem?
     156     */
     157    public boolean showFirewallWarning() {
     158        return _context != null &&
     159               _context.netDb().isInitialized() &&
     160               _context.router().getUptime() > 2*60*1000 &&
     161               _context.commSystem().countActivePeers() <= 0 &&
     162               _context.netDb().getKnownRouters() > 5;
     163    }
     164
    151165    /**
    152166     * How many active identities have we spoken with recently
     
    193207     *
    194208     */
     209/********
    195210    public int getFailingPeers() {
    196211        if (_context == null)
     
    199214            return _context.profileOrganizer().countFailingPeers();
    200215    }
     216********/
    201217    /**
    202218     * How many peers totally suck.
    203219     *
    204220     */
     221/********
    205222    public int getShitlistedPeers() {
    206223        if (_context == null)
     
    209226            return _context.shitlist().getRouterCount();
    210227    }
     228********/
    211229 
    212230    /**
     
    507525    }
    508526   
     527/*******
    509528    public String getPRNGStatus() {
    510529        Rate r = _context.statManager().getRate("prng.bufferWaitTime").getRate(60*1000);
     
    528547        return rv;
    529548    }
     549********/
    530550
    531551    public boolean updateAvailable() {
  • apps/routerconsole/java/src/net/i2p/router/web/UnsignedUpdateHandler.java

    r7a88f59 r7782970  
    2121 */
    2222public class UnsignedUpdateHandler extends UpdateHandler {
     23    private static UnsignedUpdateRunner _unsignedUpdateRunner;
    2324    private String _zipURL;
    2425    private String _zipVersion;
     
    3435    public void update() {
    3536        // don't block waiting for the other one to finish
    36         if ("true".equals(System.getProperty(PROP_UPDATE_IN_PROGRESS, "false"))) {
     37        if ("true".equals(System.getProperty(PROP_UPDATE_IN_PROGRESS))) {
    3738            _log.error("Update already running");
    3839            return;
    3940        }
    4041        synchronized (UpdateHandler.class) {
    41             if (_updateRunner == null) {
    42                 _updateRunner = new UnsignedUpdateRunner();
     42            if (_unsignedUpdateRunner == null) {
     43                _unsignedUpdateRunner = new UnsignedUpdateRunner();
    4344            }
    44             if (_updateRunner.isRunning()) {
     45            if (_unsignedUpdateRunner.isRunning()) {
    4546                return;
    4647            } else {
    4748                System.setProperty(PROP_UPDATE_IN_PROGRESS, "true");
    48                 I2PAppThread update = new I2PAppThread(_updateRunner, "Update");
     49                I2PAppThread update = new I2PAppThread(_unsignedUpdateRunner, "UnsignedUpdate");
    4950                update.start();
    5051            }
     
    6465        protected void update() {
    6566            _status = "<b>Updating</b>";
     67            if (_log.shouldLog(Log.DEBUG))
     68                _log.debug("Starting unsigned update URL: " + _zipURL);
    6669            // always proxy for now
    6770            //boolean shouldProxy = Boolean.valueOf(_context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY)).booleanValue();
     
    7477                _get.fetch();
    7578            } catch (Throwable t) {
    76                 _context.logManager().getLog(UpdateHandler.class).error("Error updating", t);
     79                _log.error("Error updating", t);
    7780            }
    7881        }
     
    8184        @Override
    8285        public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile, boolean notModified) {
    83             _status = "<b>Update downloaded</b>";
    84             // we should really verify zipfile integrity here but there's no easy way to do it
    85             String to = (new File(_context.getBaseDir(), Router.UPDATE_FILE)).getAbsolutePath();
     86            File updFile = new File(_updateFile);
     87            if (FileUtil.verifyZip(updFile)) {
     88                _status = "<b>Update downloaded</b>";
     89            } else {
     90                updFile.delete();
     91                _status = "<b>Unsigned update file is corrupt</b> from " + url;
     92                _log.log(Log.CRIT, "Corrupt zip file from " + url);
     93                return;
     94            }
     95            String to = (new File(_context.getRouterDir(), Router.UPDATE_FILE)).getAbsolutePath();
    8696            boolean copied = FileUtil.copy(_updateFile, to, true);
    8797            if (copied) {
    88                 (new File(_updateFile)).delete();
     98                updFile.delete();
    8999                String policy = _context.getProperty(ConfigUpdateHandler.PROP_UPDATE_POLICY);
    90100                this.done = true;
  • apps/routerconsole/java/src/net/i2p/router/web/UpdateHandler.java

    r7a88f59 r7782970  
    99import net.i2p.I2PAppContext;
    1010import net.i2p.crypto.TrustedUpdate;
     11import net.i2p.data.DataHelper;
    1112import net.i2p.router.Router;
    1213import net.i2p.router.RouterContext;
    1314import net.i2p.router.RouterVersion;
    1415import net.i2p.util.EepGet;
    15 import net.i2p.util.I2PThread;
     16import net.i2p.util.I2PAppThread;
    1617import net.i2p.util.Log;
    1718
     
    3233    protected Log _log;
    3334    protected String _updateFile;
     35    protected static String _status = "";
    3436    private String _action;
     37    private String _nonce;
    3538   
    3639    protected static final String SIGNED_UPDATE_FILE = "i2pupdate.sud";
     
    6265    }
    6366   
    64     public void setUpdateAction(String val) { _action = val; }
     67    /** these two can be set in either order, so call checkUpdateAction() twice */
     68    public void setUpdateAction(String val) {
     69        _action = val;
     70        checkUpdateAction();
     71    }
    6572   
    6673    public void setUpdateNonce(String nonce) {
    67         if (nonce == null) return;
    68         if (nonce.equals(System.getProperty("net.i2p.router.web.UpdateHandler.nonce")) ||
    69             nonce.equals(System.getProperty("net.i2p.router.web.UpdateHandler.noncePrev"))) {
    70             if (_action != null && _action.contains("Unsigned")) {
     74        _nonce = nonce;
     75        checkUpdateAction();
     76    }
     77
     78    private void checkUpdateAction() {
     79        if (_nonce == null || _action == null) return;
     80        if (_nonce.equals(System.getProperty("net.i2p.router.web.UpdateHandler.nonce")) ||
     81            _nonce.equals(System.getProperty("net.i2p.router.web.UpdateHandler.noncePrev"))) {
     82            if (_action.contains("Unsigned")) {
    7183                // Not us, have NewsFetcher instantiate the correct class.
    7284                NewsFetcher fetcher = NewsFetcher.getInstance(_context);
     
    91103            } else {
    92104                System.setProperty(PROP_UPDATE_IN_PROGRESS, "true");
    93                 I2PThread update = new I2PThread(_updateRunner, "Update");
     105                I2PAppThread update = new I2PAppThread(_updateRunner, "SignedUpdate");
    94106                update.start();
    95107            }
     
    97109    }
    98110   
    99     public String getStatus() {
    100         if (_updateRunner == null)
    101             return "";
    102         return _updateRunner.getStatus();
     111    public static String getStatus() {
     112        return _status;
    103113    }
    104114   
     
    114124        protected boolean _isRunning;
    115125        protected boolean done;
    116         protected String _status;
    117126        protected EepGet _get;
    118127        private final DecimalFormat _pct = new DecimalFormat("0.0%");
     
    127136            return this.done;
    128137        }
    129         public String getStatus() { return _status; }
    130138        public void run() {
    131139            _isRunning = true;
     
    151159                _get.fetch();
    152160            } catch (Throwable t) {
    153                 _context.logManager().getLog(UpdateHandler.class).error("Error updating", t);
     161                _log.error("Error updating", t);
    154162            }
    155163        }
     
    168176                buf.append(_pct.format(pct));
    169177            }
    170             buf.append(":<br>\n" + (currentWrite + alreadyTransferred));
    171             buf.append(" transferred");
     178            buf.append(":<br>\n");
     179            buf.append(DataHelper.formatSize(currentWrite + alreadyTransferred));
     180            buf.append("B transferred");
    172181            _status = buf.toString();
    173182        }
     
    176185            TrustedUpdate up = new TrustedUpdate(_context);
    177186            File f = new File(_updateFile);
    178             File to = new File(_context.getBaseDir(), Router.UPDATE_FILE);
     187            File to = new File(_context.getRouterDir(), Router.UPDATE_FILE);
    179188            String err = up.migrateVerified(RouterVersion.VERSION, f, to);
    180189            f.delete();
     
    234243            URLList.add(tok.nextToken().trim());
    235244        int size = URLList.size();
    236         _log.log(Log.DEBUG, "Picking update source from " + size + " candidates.");
     245        //_log.log(Log.DEBUG, "Picking update source from " + size + " candidates.");
    237246        if (size <= 0) {
    238             _log.log(Log.WARN, "Update list is empty - no update available");
     247            _log.log(Log.CRIT, "Update source list is empty - cannot download update");
    239248            return null;
    240249        }
  • apps/routerconsole/jsp/configclients.jsp

    r7a88f59 r7782970  
    3434 </p><div class="wideload">
    3535 <p><jsp:getProperty name="clientshelper" property="form1" />
    36  </p><p><i>All changes require restart to take effect. To change other client options, edit the clients.config file.</i>
     36 </p><p><i>To change other client options, edit the file
     37<%=net.i2p.router.startup.ClientAppConfig.configFile(net.i2p.I2PAppContext.getGlobalContext()).getAbsolutePath()%>.
     38All changes require restart to take effect.</i>
    3739 </p><hr><div class="formaction">
    3840 <input type="submit" name="action" value="Save Client Configuration" />
     
    4749 however the .war file and web app will reappear when you update your router to a newer version,
    4850 so disabling the web app here is the preferred method.
    49  </p>
    50  <div class="wideload"><p>
     51 </p><div class="wideload"><p>
    5152 <jsp:getProperty name="clientshelper" property="form2" />
    5253 </p><p>
    53  <i>All changes require restart to take effect. To change other webapp options, edit the webapps.config file.</i>
     54 <i>All changes require restart to take effect.</i>
    5455 </p><hr><div class="formaction">
    5556 <input type="submit" name="action" value="Save WebApp Configuration" />
  • apps/routerconsole/jsp/configpeer.jsp

    r7a88f59 r7782970  
    4040 <input type="text" size="55" name="peer" value="<%=peer%>" /></div>
    4141 <h3>Manually Ban / Unban a Peer</h3>
    42  Shitlisting will prevent the participation of this peer in tunnels you create.
     42 Banning will prevent the participation of this peer in tunnels you create.
    4343      <hr>
    4444      <div class="formaction">
  • apps/routerconsole/jsp/logs.jsp

    r7a88f59 r7782970  
    1111 <div class="joblog"><h3>Version:</h3><a name="version"> </a>
    1212 Please include this information in bug reports.
    13  <p>I2P <jsp:getProperty name="helper" property="version" /><br>
     13 <p>
     14I2P <jsp:getProperty name="helper" property="version" /><br>
    1415<%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%><br>
    1516<%=System.getProperty("os.name")%> <%=System.getProperty("os.arch")%> <%=System.getProperty("os.version")%><br>
    1617CPU <%=net.i2p.util.NativeBigInteger.cpuModel()%> (<%=net.i2p.util.NativeBigInteger.cpuType()%>)<br>
    17 jbigi <%=net.i2p.util.NativeBigInteger.loadStatus()%><br></p><br>
     18jbigi <%=net.i2p.util.NativeBigInteger.loadStatus()%><br>
     19Encoding <%=System.getProperty("file.encoding")%><br></p><br>
    1820 <jsp:useBean class="net.i2p.router.web.LogsHelper" id="logsHelper" scope="request" />
    1921 <jsp:setProperty name="logsHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
  • apps/routerconsole/jsp/summarynoframe.jsp

    r7a88f59 r7782970  
    5252    if (helper.updateAvailable() || helper.unsignedUpdateAvailable()) {
    5353        // display all the time so we display the final failure message
    54         out.print("<br>" + update.getStatus());
     54        out.print("<br>" + net.i2p.router.web.UpdateHandler.getStatus());
    5555        if ("true".equals(System.getProperty("net.i2p.router.web.UpdateHandler.updateInProgress"))) {
    5656        } else if((!update.isDone()) &&
     
    6868                out.print("<button type=\"submit\" name=\"updateAction\" value=\"signed\" >Download " + helper.getUpdateVersion() + " Update</button>\n");
    6969            if (helper.unsignedUpdateAvailable())
    70                 out.print("<button type=\"submit\" name=\"updateAction\" value=\"Unsigned\" >Download Unsigned<br>" + helper.getUnsignedUpdateVersion() + " Update</button>\n");
     70                out.print("<button type=\"submit\" name=\"updateAction\" value=\"Unsigned\" >Download Unsigned<br>Update " + helper.getUnsignedUpdateVersion() + "</button>\n");
    7171            out.print("</form>\n");
    7272        }
     
    8484</table><hr>
    8585<%
    86     if (helper.getActivePeers() <= 0) {
     86    if (helper.showFirewallWarning()) {
    8787        %><h4><a href="config.jsp" target="_top" title="Help with firewall configuration.">Check NAT/firewall</a></h4><%
    8888    }
     89    boolean reseedInProgress = Boolean.valueOf(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress")).booleanValue();
    8990    // If showing the reseed link is allowed
    9091    if (helper.allowReseed()) {
    91         if ("true".equals(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress", "false"))) {
     92        if (reseedInProgress) {
    9293            // While reseed occurring, show status message instead
    9394            out.print("<i>" + System.getProperty("net.i2p.router.web.ReseedHandler.statusMessage","") + "</i><br>");
     
    105106    }
    106107    // If a new reseed ain't running, and the last reseed had errors, show error message
    107     if ("false".equals(System.getProperty("net.i2p.router.web.ReseedHandler.reseedInProgress", "false"))) {
     108    if (!reseedInProgress) {
    108109        String reseedErrorMessage = System.getProperty("net.i2p.router.web.ReseedHandler.errorMessage","");
    109110        if (reseedErrorMessage.length() > 0) {
  • apps/streaming/java/src/net/i2p/client/streaming/Connection.java

    r7a88f59 r7782970  
    334334        }
    335335
    336         _context.statManager().getStatLog().addData(Packet.toId(_sendStreamId), "stream.rtt", _options.getRTT(), _options.getWindowSize());
     336        // warning, getStatLog() can be null
     337        //_context.statManager().getStatLog().addData(Packet.toId(_sendStreamId), "stream.rtt", _options.getRTT(), _options.getWindowSize());
    337338       
    338339        _lastSendTime = _context.clock().now();
  • core/java/src/net/i2p/data/DataHelper.java

    r7a88f59 r7782970  
    1818import java.io.File;
    1919import java.io.FileInputStream;
    20 import java.io.FileWriter;
     20import java.io.FileOutputStream;
    2121import java.io.IOException;
    2222import java.io.InputStream;
    2323import java.io.InputStreamReader;
    2424import java.io.OutputStream;
     25import java.io.OutputStreamWriter;
    2526import java.io.PrintWriter;
    2627import java.io.UnsupportedEncodingException;
     
    218219     * - Leading whitespace is not trimmed
    219220     * - '=' is the only key-termination character (not ':' or whitespace)
     221     *
     222     * Note that the escaping of \r or \n was probably a mistake and should be taken out.
     223     *
    220224     */
    221225    public static void loadProps(Properties props, File file) throws IOException {
     
    258262    }
    259263   
     264    /**
     265     * Note that this does not escape the \r or \n that are unescaped in loadProps() above.
     266     */
    260267    public static void storeProps(Properties props, File file) throws IOException {
    261268        PrintWriter out = null;
    262269        try {
    263             out = new PrintWriter(new BufferedWriter(new FileWriter(file)));
     270            out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")));
     271            out.println("# NOTE: This I2P config file must use UTF-8 encoding");
    264272            for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) {
    265273                String name = (String)iter.next();
  • core/java/src/net/i2p/stat/BufferedStatLog.java

    r7a88f59 r7782970  
    1616
    1717/**
    18  *
     18 * Note - if no filter is defined in stat.logFilters at startup, this class will not
     19 * be instantiated - see StatManager.
    1920 */
    2021public class BufferedStatLog implements StatLog {
     
    4748        _statFilters = new ArrayList(10);
    4849        _flushFrequency = 500;
    49         _filtersSpecified = false;
     50        updateFilters();
    5051        I2PThread writer = new I2PThread(new StatLogWriter(), "StatLogWriter");
    5152        writer.setDaemon(true);
     
    9495                    while (tok.hasMoreTokens())
    9596                        _statFilters.add(tok.nextToken().trim());
    96                     if (_statFilters.size() > 0)
    97                         _filtersSpecified = true;
    98                     else
    99                         _filtersSpecified = false;
     97                    _filtersSpecified = _statFilters.size() > 0;
    10098                }
    10199            }
     
    108106        }
    109107       
    110         String filename = _context.getProperty(StatManager.PROP_STAT_FILE);
    111         if (filename == null)
    112             filename = StatManager.DEFAULT_STAT_FILE;
     108        String filename = _context.getProperty(StatManager.PROP_STAT_FILE, StatManager.DEFAULT_STAT_FILE);
    113109        File foo = new File(filename);
    114110        if (!foo.isAbsolute())
  • core/java/src/net/i2p/stat/StatManager.java

    r7a88f59 r7782970  
    2626
    2727    /** stat name to FrequencyStat */
    28     private final Map _frequencyStats;
     28    private final Map<String, FrequencyStat> _frequencyStats;
    2929    /** stat name to RateStat */
    30     private final Map _rateStats;
     30    private final Map<String, RateStat> _rateStats;
     31    /** may be null */
    3132    private StatLog _statLog;
    3233
     34    /**
     35     *  Comma-separated stats or * for all.
     36     *  This property must be set at startup, or
     37     *  logging is disabled.
     38     */
    3339    public static final String PROP_STAT_FILTER = "stat.logFilters";
    3440    public static final String PROP_STAT_FILE = "stat.logFile";
     
    6672        _log = context.logManager().getLog(StatManager.class);
    6773        _context = context;
    68         _frequencyStats = Collections.synchronizedMap(new HashMap(128));
     74        _frequencyStats = Collections.synchronizedMap(new HashMap(8));
    6975        _rateStats = new HashMap(128); // synchronized only on add //Collections.synchronizedMap(new HashMap(128));
    70         _statLog = new BufferedStatLog(context);
     76        if (getStatFilter() != null)
     77            _statLog = new BufferedStatLog(context);
    7178    }
    7279   
     80    /** may be null */
    7381    public StatLog getStatLog() { return _statLog; }
    7482    public void setStatLog(StatLog log) {
    7583        _statLog = log;
    7684        synchronized (_rateStats) {
    77             for (Iterator iter = _rateStats.values().iterator(); iter.hasNext(); ) {
    78                 RateStat rs = (RateStat)iter.next();
     85            for (Iterator<RateStat> iter = _rateStats.values().iterator(); iter.hasNext(); ) {
     86                RateStat rs = iter.next();
    7987                rs.setStatLog(log);
    8088            }
     
    123131    /** update the given frequency statistic, taking note that an event occurred (and recalculating all frequencies) */
    124132    public void updateFrequency(String name) {
    125         FrequencyStat freq = (FrequencyStat) _frequencyStats.get(name);
     133        FrequencyStat freq = _frequencyStats.get(name);
    126134        if (freq != null) freq.eventOccurred();
    127135    }
     
    129137    /** update the given rate statistic, taking note that the given data point was received (and recalculating all rates) */
    130138    public void addRateData(String name, long data, long eventDuration) {
    131         RateStat stat = (RateStat) _rateStats.get(name); // unsynchronized
     139        RateStat stat = _rateStats.get(name); // unsynchronized
    132140        if (stat != null) stat.addData(data, eventDuration);
    133141    }
     
    135143    public void coalesceStats() {
    136144        synchronized (_frequencyStats) {
    137             for (Iterator iter = _frequencyStats.values().iterator(); iter.hasNext();) {
    138                 FrequencyStat stat = (FrequencyStat)iter.next();
     145            for (Iterator<FrequencyStat> iter = _frequencyStats.values().iterator(); iter.hasNext();) {
     146                FrequencyStat stat = iter.next();
    139147                if (stat != null) {
    140148                    stat.coalesceStats();
     
    143151        }
    144152        synchronized (_rateStats) {
    145             for (Iterator iter = _rateStats.values().iterator(); iter.hasNext();) {
    146                 RateStat stat = (RateStat)iter.next();
     153            for (Iterator<RateStat> iter = _rateStats.values().iterator(); iter.hasNext();) {
     154                RateStat stat = iter.next();
    147155                if (stat != null) {
    148156                    stat.coalesceStats();
     
    153161
    154162    public FrequencyStat getFrequency(String name) {
    155         return (FrequencyStat) _frequencyStats.get(name);
     163        return _frequencyStats.get(name);
    156164    }
    157165
    158166    public RateStat getRate(String name) {
    159         return (RateStat) _rateStats.get(name);
    160     }
    161 
    162     public Set getFrequencyNames() {
     167        return _rateStats.get(name);
     168    }
     169
     170    public Set<String> getFrequencyNames() {
    163171        return new HashSet(_frequencyStats.keySet());
    164172    }
    165173
    166     public Set getRateNames() {
     174    public Set<String> getRateNames() {
    167175        return new HashSet(_rateStats.keySet());
    168176    }
     
    181189    public Map getStatsByGroup() {
    182190        Map groups = new TreeMap(Collator.getInstance());
    183         for (Iterator iter = _frequencyStats.values().iterator(); iter.hasNext();) {
    184             FrequencyStat stat = (FrequencyStat) iter.next();
     191        for (Iterator<FrequencyStat> iter = _frequencyStats.values().iterator(); iter.hasNext();) {
     192            FrequencyStat stat = iter.next();
    185193            if (!groups.containsKey(stat.getGroupName())) groups.put(stat.getGroupName(), new TreeSet());
    186194            Set names = (Set) groups.get(stat.getGroupName());
    187195            names.add(stat.getName());
    188196        }
    189         for (Iterator iter = _rateStats.values().iterator(); iter.hasNext();) {
    190             RateStat stat = (RateStat) iter.next();
     197        for (Iterator<RateStat> iter = _rateStats.values().iterator(); iter.hasNext();) {
     198            RateStat stat = iter.next();
    191199            if (!groups.containsKey(stat.getGroupName())) groups.put(stat.getGroupName(), new TreeSet());
    192200            Set names = (Set) groups.get(stat.getGroupName());
     
    199207    public String getStatFile() { return _context.getProperty(PROP_STAT_FILE, DEFAULT_STAT_FILE); }
    200208
    201     // Save memory by not creating stats unless they are required for router operation
    202     // Return true if the stat should be ignored.
     209    /**
     210     * Save memory by not creating stats unless they are required for router operation
     211     * @return true if the stat should be ignored.
     212     */
    203213    public boolean ignoreStat(String statName) {
    204214        if (_context.getProperty(PROP_STAT_FULL, DEFAULT_STAT_FULL).equalsIgnoreCase("true"))
  • core/java/src/net/i2p/util/FileUtil.java

    r7a88f59 r7782970  
    139139   
    140140    /**
     141     * Verify the integrity of a zipfile.
     142     * There doesn't seem to be any library function to do this,
     143     * so we basically go through all the motions of extractZip() above,
     144     * unzipping everything but throwing away the data.
     145     *
     146     * @return true if ok
     147     */
     148    public static boolean verifyZip(File zipfile) {
     149        ZipFile zip = null;
     150        try {
     151            byte buf[] = new byte[16*1024];
     152            zip = new ZipFile(zipfile);
     153            Enumeration entries = zip.entries();
     154            while (entries.hasMoreElements()) {
     155                ZipEntry entry = (ZipEntry)entries.nextElement();
     156                if (entry.getName().indexOf("..") != -1) {
     157                    //System.err.println("ERROR: Refusing to extract a zip entry with '..' in it [" + entry.getName() + "]");
     158                    return false;
     159                }
     160                if (entry.isDirectory()) {
     161                    // noop
     162                } else {
     163                    try {
     164                        InputStream in = zip.getInputStream(entry);
     165                        int read = 0;
     166                        while ( (read = in.read(buf)) != -1) {
     167                            // throw the data away
     168                        }
     169                        //System.err.println("INFO: File [" + entry.getName() + "] extracted");
     170                        in.close();
     171                    } catch (IOException ioe) {
     172                        //System.err.println("ERROR: Error extracting the zip entry (" + entry.getName() + "]");
     173                        //ioe.printStackTrace();
     174                        return false;
     175                    }
     176                }
     177            }
     178            return true;
     179        } catch (IOException ioe) {
     180            //System.err.println("ERROR: Unable to extract the zip file");
     181            //ioe.printStackTrace();
     182            return false;
     183        } finally {
     184            if (zip != null) {
     185                try { zip.close(); } catch (IOException ioe) {}
     186            }
     187        }
     188    }
     189   
     190    /**
    141191     * Read in the last few lines of a (newline delimited) textfile, or null if
    142192     * the file doesn't exist. 
  • installer/resources/blocklist.txt

    r7a88f59 r7782970  
     1#
     2# If you have a 'split' directory installation, with configuration
     3# files in ~/.i2p (Linux) or %APPDATA%\I2P (Windows), be sure to
     4# edit the file in the configuration directory, NOT the install directory.
     5#
    16# Blocking is now enabled by default.
    27# To disable blocking, set router.blocklist.enable=false on configadvanced.jsp and restart.
     
    49# Add additional entries as desired, sorting not required.
    510# This file is only read at router startup.
    6 # To manually block a router after startup, use the form on http://localhost:7657/configpeer.jsp
     11# To manually block a router after startup, use the form on http://127.0.0.1:7657/configpeer.jsp
    712# Warning - a large list will increase memory usage.
    813# Please do not block too broadly, it will segment and harm the network.
  • installer/resources/clients.config

    r7a88f59 r7782970  
     1# NOTE: This I2P config file must use UTF-8 encoding
     2#
     3# If you have a 'split' directory installation, with configuration
     4# files in ~/.i2p (Linux) or %APPDATA%\I2P (Windows), be sure to
     5# edit the file in the configuration directory, NOT the install directory.
     6#
     7
    18# fire up the web console
    29clientApp.0.args=7657 ::1,127.0.0.1 ./webapps/
  • installer/resources/eepsite_index_de.html

    r7a88f59 r7782970  
    1515
    1616<p>In I2P werden Eepsites unter Verwendung eines Schlüssels (key) adressiert, dieser wird durch eine sehr lange Base64-Zeichenkette<sup><a class="footref" name="fnr.1" href="#fn.1">1</a></sup> dargestellt.
    17 (Dieser Schlüssel ist analog zur Standard IP-Adresse zu verstehen; man kann ihn sich in der Konfiguration für Eepsites unter <a href="http://localhost:7657/i2ptunnel/index.jsp">I2PTunnel</a> anzeigen lassen.)</p>
     17(Dieser Schlüssel ist analog zur Standard IP-Adresse zu verstehen; man kann ihn sich in der Konfiguration für Eepsites unter <a href="http://127.0.0.1:7657/i2ptunnel/index.jsp">I2PTunnel</a> anzeigen lassen.)</p>
    1818
    1919<p>Folgende Anweisungen sollen zeigen, wie man einer Eepsite einen
    2020Namen wie beispielsweise „meineseite.i2p“ zuweist und an dem Schlüssel
    2121bindet.
    22 Sie können Ihre Eepsite, nachdem sie gestartet wurde, lokal unter <a href="http://localhost:7658/">http://localhost:7658/</a> erreichen.</p>
     22Sie können Ihre Eepsite, nachdem sie gestartet wurde, lokal unter <a href="http://127.0.0.1:7658/">http://127.0.0.1:7658/</a> erreichen.</p>
    2323
    2424<p>Es folgt eine schrittweise Anleitung für das Starten Ihrer neuen Eepsite und dessen Ankündigung in der I2P-Gemeinde.</p>
     
    4040<li>Wählen Sie einen eigenen Namen für Ihre Eepsite – nur in diesem
    4141Beispiel heißt sie „meineseite.i2p“ – benutzen Sie nur Kleinschrift.
    42 Sie können in Ihrem <a href="http://localhost:7657/susidns/addressbook.jsp?book=router">Adressbuch</a> überprüfen, ob der gewünschte Name bereits vergeben ist (Anmerkung: die Daten aus den Adressbuch werden im Klartext in der <em>i2p/hosts.txt</em> gespeichert).
     42Sie können in Ihrem <a href="http://127.0.0.1:7657/susidns/addressbook.jsp?book=router">Adressbuch</a> überprüfen, ob der gewünschte Name bereits vergeben ist (Anmerkung: die Daten aus den Adressbuch werden im Klartext in der <em>i2p/hosts.txt</em> gespeichert).
    4343<br>
    4444<br></li>
    45 <li>Rufen Sie nun, möglichst in einem neuen Browser-Fenster, die Konfiguration für Eepsites <a href="http://localhost:7657/i2ptunnel/index.jsp">I2PTunnel</a> auf. Unter „Local Server Tunnels“ wählen Sie den Eintrag „<a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite</a>“.
     45<li>Rufen Sie nun, möglichst in einem neuen Browser-Fenster, die Konfiguration für Eepsites <a href="http://127.0.0.1:7657/i2ptunnel/index.jsp">I2PTunnel</a> auf. Unter „Local Server Tunnels“ wählen Sie den Eintrag „<a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite</a>“.
    4646Sie befinden sich nun auf der Seite mit Überschrift „Edit server
    4747settings“. In das Feld für „Website name:“ überschreiben Sie die
     
    6161<br>
    6262<br></li>
    63 <li>Wir gehen wieder zurück auf die Konfigurationsseite <a href="http://localhost:7657/i2ptunnel/index.jsp">I2PTunnel</a>
     63<li>Wir gehen wieder zurück auf die Konfigurationsseite <a href="http://127.0.0.1:7657/i2ptunnel/index.jsp">I2PTunnel</a>
    6464und drücken den „Start“-Knopf für die „eepsite“. Nach dem erfolgreichen
    65 Start wird Ihre Eepsite auf der linken Seite in der I2P <a href="http://localhost:7657/index.jsp">Router Console</a> unter „Local
     65Start wird Ihre Eepsite auf der linken Seite in der I2P <a href="http://127.0.0.1:7657/index.jsp">Router Console</a> unter „Local
    6666Destinations“ angezeigt.</li>
    6767</ol>
     
    7272
    7373<ol>
    74 <li>Heben Sie in der „<a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=3">Konfiguration</a>“
     74<li>Heben Sie in der „<a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=3">Konfiguration</a>“
    7575den gesamten Schlüssel für Ihre Eepsite hervor und kopieren ihn in die
    7676Zwischenablage. Stellen Sie sicher auch tatsächlich die gesamte, über
     
    7979<br>
    8080<br></li>
    81 <li>Öffnen Sie Ihr <a href="http://localhost:7657/susidns/addressbook.jsp?book=master">Master-Adressbuch</a>,
     81<li>Öffnen Sie Ihr <a href="http://127.0.0.1:7657/susidns/addressbook.jsp?book=master">Master-Adressbuch</a>,
    8282tragen Ihren zuvor gewählten Wunschnamen ihrer Eepsite unter „Hostname“
    8383ein und kopieren den Schlüssel in das Feld „Destination“. Ein Klick auf
     
    103103einzutragen. Das heißt, Sie müssen Namen und Schlüssel Ihrer Eepsite
    104104und eine optionale Beschreibung in ein Formular auf einen oder mehreren
    105 dieser Seiten eingeben. Wie schon oben gesagt, Ihr Schlüssel ist der <em>vollständige</em> Schlüssel wie er in der <a href="http://localhost:7657/i2ptunnel/index.jsp">I2PTunnel</a> Konfiguration für die „<a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=3">Eepsite</a>“
     105dieser Seiten eingeben. Wie schon oben gesagt, Ihr Schlüssel ist der <em>vollständige</em> Schlüssel wie er in der <a href="http://127.0.0.1:7657/i2ptunnel/index.jsp">I2PTunnel</a> Konfiguration für die „<a href="http://127.0.0.1:7657/i2ptunnel/edit.jsp?tunnel=3">Eepsite</a>“
    106106im Feld „Local destination“ angegeben ist (... über 500 Zeichen, endet
    107107auf „AAAA“). Bestätigen Sie Ihre Angaben mit einem klick auf „Submit“.
     
    115115<br>
    116116<br></li>
    117 <li>Weil wir gerade von Adressbuchupdates sprechen – es ist eine gute Zeit um weitere Adressbücher dem bestehenden <a href="http://localhost:7657/susidns/subscriptions.jsp">Abonnement</a>
     117<li>Weil wir gerade von Adressbuchupdates sprechen – es ist eine gute Zeit um weitere Adressbücher dem bestehenden <a href="http://127.0.0.1:7657/susidns/subscriptions.jsp">Abonnement</a>
    118118hinzuzufügen. Öffnen Sie Ihre Konfiguration und fügen Sie einige der
    119119folgenden Dienste Ihrem Abonnement hinzu (nur die jeweilige URL) und
  • installer/resources/i2ptunnel.config

    r7a88f59 r7782970  
     1# NOTE: This I2P config file must use UTF-8 encoding
     2#
     3# If you have a 'split' directory installation, with configuration
     4# files in ~/.i2p (Linux) or %APPDATA%\I2P (Windows), be sure to
     5# edit the file in the configuration directory, NOT the install directory.
     6#
     7
    18# eepproxy
    29tunnel.0.name=eepProxy
     
    1825
    1926# irc
    20 tunnel.1.name=ircProxy
    21 tunnel.1.description=IRC proxy to access the anonymous irc net
     27tunnel.1.name=IRC Proxy
     28tunnel.1.description=IRC proxy to access the anonymous IRC network
    2229tunnel.1.type=ircclient
    23 tunnel.1.sharedClient=true
     30tunnel.1.sharedClient=false
    2431tunnel.1.interface=127.0.0.1
    2532tunnel.1.listenPort=6668
     
    2734tunnel.1.i2cpHost=127.0.0.1
    2835tunnel.1.i2cpPort=7654
    29 tunnel.1.option.inbound.nickname=shared clients
    30 tunnel.1.option.outbound.nickname=shared clients
    31 tunnel.1.option.i2cp.reduceIdleTime=900000
     36tunnel.1.option.inbound.nickname=IRC Proxy
     37tunnel.1.option.outbound.nickname=IRC Proxy
     38tunnel.1.option.i2cp.closeIdleTime=1200000
     39tunnel.1.option.i2cp.closeOnIdle=true
     40tunnel.1.option.i2cp.delayOpen=true
     41tunnel.1.option.i2cp.newDestOnResume=false
     42tunnel.1.option.i2cp.reduceIdleTime=600000
    3243tunnel.1.option.i2cp.reduceOnIdle=true
    3344tunnel.1.option.i2cp.reduceQuantity=1
  • installer/resources/jetty.xml

    r7a88f59 r7782970  
    1 <?xml version="1.0" encoding="ISO-8859-1" ?>
     1<?xml version="1.0" encoding="UTF-8" ?>
    22<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.2//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
    33
     
    2727<!-- Jetty errors and warnings will appear in wrapper.log, check there         -->
    2828<!-- to diagnose problems.                                                     -->
     29<!--                                                                           -->
     30<!-- Note that the XML encoding for this file is UTF-8.                        -->
     31<!--                                                                           -->
     32<!-- If you have a 'split' directory installation, with configuration          -->
     33<!-- files in ~/.i2p (Linux) or %APPDATA%\I2P (Windows), be sure to            -->
     34<!-- edit the file in the configuration directory, NOT the install directory.  -->
     35<!--                                                                           -->
    2936<!-- ========================================================================= -->
    3037
  • readme.html

    r7a88f59 r7782970  
    1414<ul>
    1515  <li><b>browse "eepsites"</b> - on I2P there are anonymously hosted websites
    16     - tell your browser to use the <b>HTTP proxy at localhost port 4444</b>, then
     16    - tell your browser to use the <b>HTTP proxy at 127.0.0.1 port 4444</b>, then
    1717    browse to an eepsite:<br />
    1818    <ul class="links">
     
    5252        pop3/smtp client configured to access postman's mail services.</li>
    5353      <li class="tidylist"><b>chat anonymously</b> - fire up your own IRC client
    54         and connect to the server at <b>localhost port 6668</b>. This points at
     54        and connect to the server at <b>127.0.0.1 port 6668</b>. This points at
    5555        one of two anonymously hosted IRC servers, but neither you nor they know
    5656        where the other is.</li>
     
    6161<h2>Want your own eepsite?</h2>
    6262<p>We've bundled some software to let you run your own eepsite - a <a href="http://jetty.mortbay.org/">Jetty</a>
    63   instance listening on <a href="http://localhost:7658/">http://localhost:7658/</a>.
     63  instance listening on <a href="http://127.0.0.1:7658/">http://127.0.0.1:7658/</a>.
    6464  Simply place your files in the <code>eepsite/docroot/</code> directory (or place
    6565  any standard JSP/Servlet <code>.war</code> files under <code>eepsite/webapps</code>,
     
    6767  up. After starting up an <a href="/i2ptunnel/">eepsite tunnel</a> pointing at
    6868  it, your eepsite will be visible to others. Detailed instructions for starting
    69   your eepsite are on <a href="http://localhost:7658/">your temporary eepsite
     69  your eepsite are on <a href="http://127.0.0.1:7658/">your temporary eepsite
    7070  page</a>. </p>
    7171<h2><a name="trouble">Troubleshooting</a></h2>
     
    7474  peers, you should open port 8887 on your firewall for better connectivity. If
    7575  you cannot see any eepsites at all (even <a href="http://www.i2p2.i2p/">www.i2p2.i2p</a>),
    76   be sure your browser proxy is set to localhost port 4444. You may also want
     76  be sure your browser proxy is set to 127.0.0.1 port 4444. You may also want
    7777  to review the information on the <a href="http://www.i2p2.i2p/">I2P website</a>,
    7878  post up messages to the <a href="http://forum.i2p2.de/">I2P discussion forum</a>,
  • readme_de.html

    r7a88f59 r7782970  
    66<ul>
    77 <li class="tidylist"><b>"Eepsites" besuchen</b> - In I2P sind anonym gehostete Websites -
    8      Stelle Deinen Browser so ein, &uuml;ber den <b>HTTP proxy: localhost port 4444</b> zu surfen, dann besuche eine Eepsite:<br />
     8     Stelle Deinen Browser so ein, &uuml;ber den <b>HTTP proxy: 127.0.0.1 port 4444</b> zu surfen, dann besuche eine Eepsite:<br />
    99     <ul class="links">
    1010         <li class="tidylist"><a href="http://inproxy.tino.i2p/status.php">inproxy.tino.i2p</a> und
     
    3535     f&uuml;r Postman's Email Service.</li>
    3636 <li class="tidylist"><b>Anonymer Chat</b> - Starte Deinen Lieblings IRC Client und verbinde ihn
    37      mit dem Server <b>localhost Port 6668</b>.  Das richtet Dich auf auf einen
     37     mit dem Server <b>127.0.0.1 Port 6668</b>.  Das richtet Dich auf auf einen
    3838     von zwei anonym gehosteten IRC Servern, aber weder Du noch die wissen wer
    3939     der Andere ist.</li>
     
    4747   - Eine
    4848<a href="http://jetty.mortbay.org/">Jetty</a> Instanz horcht auf
    49 <a href="http://localhost:7658/">http://localhost:7658/</a>. Platziere einfach
     49<a href="http://127.0.0.1:7658/">http://127.0.0.1:7658/</a>. Platziere einfach
    5050   Deine Dateien in das <code>eepsite/docroot/</code> Verzeichnis (oder jedes
    5151   standart JSP/Servlet <code>.war</code> unter <code>eepsite/webapps</code>,
     
    5454   der darauf zeigt ist Deine Eepsite f&uuml;r Andere verf&uuml;gbar.
    5555   Detailierte Instruktionen zum Start Deiner eigenen Eepsite sind auf
    56    <a href="http://localhost:7658/">Deine tempor&auml;re Eepsite</a>.
     56   <a href="http://127.0.0.1:7658/">Deine tempor&auml;re Eepsite</a>.
    5757</p>
    5858
     
    6666  Wenn Du gar keine Eepsites bekommst (auch nicht
    6767  <a href="http://www.i2p2.i2p/index_de.html">www.i2p2.i2p</a>), stelle sicher, dass Dein
    68   Internet Browser auf den Proxy localhost Port 4444 eingestellt ist.
     68  Internet Browser auf den Proxy 127.0.0.1 Port 4444 eingestellt ist.
    6969  Vielleicht m&ouml;chtest Du auch die Informationen lesen, die auf der
    7070  <a href="http://www.i2p2.i2p/index_de.html">I2P website</a> sind, Nachrichten lesen und
  • readme_fr.html

    r7a88f59 r7782970  
    55<p>Si vous venez juste de lancer I2P, les chiffres sur la gauche &agrave; cot&eacute; de Active devraient commencer &agrave; augmenter dans les prochaines minutes et vous verrez un "Shared client" en destination locale list&eacute;s sur la gauche (si non, <a href=#trouble>voir plus bas</a>). Une fois qu'ils apparaissent, vous pouvez:</p>
    66<ul>
    7   <li class="tidylist"><b>parcourir les "eepsites"</b> - sur I2P il y a des sites web anonymes h&eacute;berg&eacute;s - dites &agrave; votre navigateur d'utiliser <b>le HTTP proxy a l'adresse localhost port 4444</b>, ensuite vous pouvez naviguer sur les eepsites:<br />
     7  <li class="tidylist"><b>parcourir les "eepsites"</b> - sur I2P il y a des sites web anonymes h&eacute;berg&eacute;s - dites &agrave; votre navigateur d'utiliser <b>le HTTP proxy a l'adresse 127.0.0.1 port 4444</b>, ensuite vous pouvez naviguer sur les eepsites:<br />
    88     <ul class="links">
    99          <li class="tidylist"><a href="http://inproxy.tino.i2p/status.php">inproxy.tino.i2p</a> et
     
    2323     Nous fournissons dans la version de base de i2p <a href="/susimail/susimail">susimail</a>,
    2424     un client web pop3/smtp orient&eacute; sur l'anonymat qui est configur&eacute; pour acc&eacute;der aux services email de postman.</li>
    25   <li class="tidylist"><b>Chatter de mani&egrave;re anonyme</b> - Activez votre client IRC et connectez-le sur le serveur <b>localhost port 6668</b>. Ceci pointe vers l'un des deux serveur IRC anonyme, mais ni vous ni eux ne savent qui est l'autre</li>
     25  <li class="tidylist"><b>Chatter de mani&egrave;re anonyme</b> - Activez votre client IRC et connectez-le sur le serveur <b>127.0.0.1 port 6668</b>. Ceci pointe vers l'un des deux serveur IRC anonyme, mais ni vous ni eux ne savent qui est l'autre</li>
    2626  <li class="tidylist"><b>Cr&eacute;ez-vous un blog anonyme</b> - Renseignez-vous chez <a href="http://syndie.i2p2.de/">Syndie</a></li>
    2727  <li class="tidylist">Et bien d'autres</li>
     
    3232<p>Nous fournissons de base quelques logiciels pour vous permettre de cr&eacute;er votre propre eepsite - une instance
    3333<a href="http://jetty.mortbay.org/">Jetty</a>, qui &eacute;coute sur
    34 <a href="http://localhost:7658/">http://localhost:7658/</a>.  Placer simplement vos fichiers dans le r&eacute;pertoire <code>eepsite/docroot/</code> (ou placez n'importe quel fichier JSP/Servlet standard <code>.war</code>) dans eepsite/webapps, ou script CGI standard dans <code>eepsite/cgi-bin</code>) et ils apparaitront. Apr&egrave;s avoir d&eacute;marr&eacute; un <a href="/i2ptunnel/">tunnel pour votre eepsite</a> (le tunnel doit pointer sur l'adresse locale du eepsite), votre eepsite sera visible pour les autes. Des instructions plus d&eacute;taill&eacute;es pour cr&eacute;er un eepsite se trouvent sur <a href="http://localhost:7658/">Votre eepsite temporaire</a>.
     34<a href="http://127.0.0.1:7658/">http://127.0.0.1:7658/</a>.  Placer simplement vos fichiers dans le r&eacute;pertoire <code>eepsite/docroot/</code> (ou placez n'importe quel fichier JSP/Servlet standard <code>.war</code>) dans eepsite/webapps, ou script CGI standard dans <code>eepsite/cgi-bin</code>) et ils apparaitront. Apr&egrave;s avoir d&eacute;marr&eacute; un <a href="/i2ptunnel/">tunnel pour votre eepsite</a> (le tunnel doit pointer sur l'adresse locale du eepsite), votre eepsite sera visible pour les autes. Des instructions plus d&eacute;taill&eacute;es pour cr&eacute;er un eepsite se trouvent sur <a href="http://127.0.0.1:7658/">Votre eepsite temporaire</a>.
    3535</p>
    3636
    3737<h2><a name="trouble">D&eacute;pannage</a></h2>
    3838
    39 <p>Soyez patient - i2p peut s'av&eacute;rer lent &agrave; d&eacute;marrer la premi&egrave;re fois car il recherche des pairs. Si, apr&egrave;s 30 minutes, votre Actives: connect&eacute;/r&eacute;cent compte moins de 10 pairs connect&eacute;s, vous devez ouvrir le port 8887 sur votre pare-feu pour avoir une meilleure connection. Si vous ne pouvez acc&eacute;der &agrave; aucun eepsite (m&ecirc;me <a href="http://www.i2p2.i2p/">www.i2p2.i2p</a>), soyez s&ucirc;r que votre navigateur utilise bien le proxy localhost sur le port 4444. Vous pouvez aussi faire part de votre d&eacute;marche sur le <a href="http://www.i2p2.i2p/">site web I2P</a>, poster des message sur le <a href="http://forum.i2p/">forum de discussion</a>, ou passer par #i2p ou #i2p-chat sur IRC sur le serveur <a href="irc://irc.freenode.net/#i2p">irc.freenode.net</a>, irc.postman.i2p ou irc.freshcoffee.i2p (ils sont li&eacute;s).</p><hr />
     39<p>Soyez patient - i2p peut s'av&eacute;rer lent &agrave; d&eacute;marrer la premi&egrave;re fois car il recherche des pairs. Si, apr&egrave;s 30 minutes, votre Actives: connect&eacute;/r&eacute;cent compte moins de 10 pairs connect&eacute;s, vous devez ouvrir le port 8887 sur votre pare-feu pour avoir une meilleure connection. Si vous ne pouvez acc&eacute;der &agrave; aucun eepsite (m&ecirc;me <a href="http://www.i2p2.i2p/">www.i2p2.i2p</a>), soyez s&ucirc;r que votre navigateur utilise bien le proxy 127.0.0.1 sur le port 4444. Vous pouvez aussi faire part de votre d&eacute;marche sur le <a href="http://www.i2p2.i2p/">site web I2P</a>, poster des message sur le <a href="http://forum.i2p/">forum de discussion</a>, ou passer par #i2p ou #i2p-chat sur IRC sur le serveur <a href="irc://irc.freenode.net/#i2p">irc.freenode.net</a>, irc.postman.i2p ou irc.freshcoffee.i2p (ils sont li&eacute;s).</p><hr />
  • readme_nl.html

    r7a88f59 r7782970  
    55<p>Als je net I2P opgestart hebt, zullen de 'Active:' (Actieve) getallen aan de linkerkant in de komende minuten stijgen, en je zal een "Shared clients" (Gedeelde clients) lokale bestemming zien staan aan de linkerkant (indien niet, <a href=#trouble>zie hieronder</a>). Eenmaal je deze bestemming ziet, kan je:</p>
    66<ul>
    7  <li><b>surfen naar "eepsites"</b> - op I2P zijn er anonieme websites - stel je browser in om de <b>HTTP proxy op localhost, poort 4444</b> te gebruiken, en surf vervolgens naar een eepsite:<br /><br />
     7 <li><b>surfen naar "eepsites"</b> - op I2P zijn er anonieme websites - stel je browser in om de <b>HTTP proxy op 127.0.0.1, poort 4444</b> te gebruiken, en surf vervolgens naar een eepsite:<br /><br />
    88     <ul>
    99         <li><a href="http://inproxy.tino.i2p/status.php">inproxy.tino.i2p</a> en
     
    2727     een webgebaseerde anonimiteits-georienteerde pop3/smtp-client ingesteld om postman zijn e-mailservices te gebruiken.</li>
    2828 <li><b>anoniem chatten</b> - start je eigen IRC-client op en verbind met
    29      de server op <b>localhost poort 6668</b>.  Dit wijst naar een of twee anoniem gehoste
     29     de server op <b>127.0.0.1 poort 6668</b>.  Dit wijst naar een of twee anoniem gehoste
    3030     IRC servers, maar zowel jij als zei weten niet waar de andere is.</li>
    3131 <li><b>anoniem bloggen</b> - neem een kijkje bij <a href="http://syndie.i2p2.de/">Syndie</a></li>
     
    3737<p>We hebben aan I2P software toegevoegd om je je eigen eepsite te laten hosten - een
    3838<a href="http://jetty.mortbay.org/">Jetty</a> webserver, die luistert op
    39 <a href="http://localhost:7658/">http://localhost:7658/</a>.  Plaats gewoonweg je bestanden in
     39<a href="http://127.0.0.1:7658/">http://127.0.0.1:7658/</a>.  Plaats gewoonweg je bestanden in
    4040de <code>eepsite/docroot/</code> map (of plaats standaard JSP/Servlet <code>.war</code>
    4141bestanden onder <code>eepsite/webapps</code>, of standaard CGI scripts onder <code>eepsite/cgi-bin</code>)
     
    4343zal je eepsite zichtbaar zijn voor anderen.
    4444Gedetailleerde instructies voor het starten van je eepsite staan op
    45 <a href="http://localhost:7658/">je tijdelijke eepsite-pagina</a>.
     45<a href="http://127.0.0.1:7658/">je tijdelijke eepsite-pagina</a>.
    4646</p>
    4747
     
    5252zou je best poort 8887 op je firewall openen voor een betere verbinding.
    5353Als je in het geheel geen eepsites kan zien (zelfs <a href="http://www.i2p2.i2p/">www.i2p2.i2p</a> niet),
    54 controleer dan nog eens of de proxy van je browser op localhost poort 4444 staat.
     54controleer dan nog eens of de proxy van je browser op 127.0.0.1 poort 4444 staat.
    5555Je zou best ook de informatie controleren op de
    5656<a href="http://www.i2p2.i2p/">I2P website</a>, of plaats een bericht op het
  • readme_sv.html

    r7a88f59 r7782970  
    1010 <li><b>surfa p&aring; "eepsidor"</b> - inom I2P finns det anonyma sajter -
    1111     st&auml;ll in din webbl&auml;sare till att anv&auml;nda <b>HTTP proxy vid
    12 localhost port 4444</b>, surfa sen till en eepsida:<br />
     12127.0.0.1 port 4444</b>, surfa sen till en eepsida:<br />
    1313     <ul class="links">
    1414         <li><a
     
    5656 <li><b>chatta anonymt</b> - starta din IRC-klient och anslut till
    5757servern vid
    58      <b>localhost port 6668</b>.  Den pekar mot en av tv&aring; anonyma IRC
     58     <b>127.0.0.1 port 6668</b>.  Den pekar mot en av tv&aring; anonyma IRC
    5959servrar,
    6060        men varken du eller dom vet var den andra &auml;r.</li>
     
    6868<p>Vi har skickat med mjukvara som l&aring;ter dig driva en egen eepsida - en
    6969<a href="http://jetty.mortbay.org/">Jetty</a> instans lyssnar p&aring;
    70 <a href="http://localhost:7658/">http://localhost:7658/</a>.  L&auml;gg helt
     70<a href="http://127.0.0.1:7658/">http://127.0.0.1:7658/</a>.  L&auml;gg helt
    7171enkelt dina filer i
    7272<code>eepsite/docroot/</code> mappen (eller standard JSP/Servlet
     
    7878alla andra.
    7979Mer detaljerade instruktioner f&ouml;r att skapa en eepsite finns p&aring;
    80 <a href="http://localhost:7658/">din tillf&auml;lliga eepsite</a>.
     80<a href="http://127.0.0.1:7658/">din tillf&auml;lliga eepsite</a>.
    8181</p>
    8282
     
    9191href="http://www.i2p2.i2p/">www.i2p2.i2p</a>),
    9292f&ouml;rs&auml;kra dig om att din webbl&auml;sare &auml;r inst&auml;lld till att av&auml;nda en proxy,
    93 localhost p&aring; port 4444.
     93127.0.0.1 p&aring; port 4444.
    9494Du kanske ocks&aring; vill kika p&aring; information p&aring; 
    9595<a href="http://www.i2p2.i2p/">I2Ps webbsida</a>, fr&aring;ga fr&aring;gor p&aring; 
  • readme_zh.html

    r7a88f59 r7782970  
    1010<p>如果 I2P 已经运行,未来的几分钟里控制台左侧的活动节点(Active)数量将开始增长,并会出现名为 &quot;已共享客户&quot;(&quot;shared clients&quot;) 的本地目标。(如果没有,请见 <a href="#trouble">疑难解答</a>)。待出现以上消息后,您可以:</p>
    1111<ul>
    12  <li><B>浏览 IIP网站 &quot;eepsites&quot;</B> -  I2P 网络内匿名运行的站点 - 您要首先设置浏览器的 <B>HTTP 代理</B> 为 localhost:4444 然后才能浏览IIP站点 - <ul>
     12 <li><B>浏览 IIP网站 &quot;eepsites&quot;</B> -  I2P 网络内匿名运行的站点 - 您要首先设置浏览器的 <B>HTTP 代理</B> 为 127.0.0.1:4444 然后才能浏览IIP站点 - <ul>
    1313         <li><a href="http://inproxy.tino.i2p/status.php">inproxy.tino.i2p</a> 和 <a href="http://perv.i2p/stats.cgi">perv.i2p</a>: 这两个站点用于跟踪哪些 IIP 站点在线。</li>
    1414         <li><a href="http://forum.i2p/">forum.i2p</a>: 安全匿名的访问I2P官方论坛 <a href="http://forum.i2p2.de/">forum.i2p2.de</a></li>
     
    1919     </ul> <br>
    2020      I2P网络中还有很多其他的IIP网站(EEPSITE) - 访问上面的网站你会找到更多,收藏你喜爱的 IIP 网站,别忘了常去看看!</li><br>
    21  <li><B>浏览 Web 网页</B> - 目前 IP2 网络中只有一个 HTTP 出口代理(&quot;outproxy&quot;)挂接在你主机4444端口的HTTP代理上。- 只要将浏览器的代理设置指向为前面的地址(localhost:4444),然后访问任何普通链接即可 - 您的HTTP请求将在 I2P 网络内部传递。</li>
     21 <li><B>浏览 Web 网页</B> - 目前 IP2 网络中只有一个 HTTP 出口代理(&quot;outproxy&quot;)挂接在你主机4444端口的HTTP代理上。- 只要将浏览器的代理设置指向为前面的地址(127.0.0.1:4444),然后访问任何普通链接即可 - 您的HTTP请求将在 I2P 网络内部传递。</li>
    2222 <li><B>文件交换</B> - 本机的其中一个内置 <a href="i2psnark/">端口</a> 中提供 <a href="http://www.klomp.org/snark/">Snark</a> <a href="http://www.bittorrent.com/">BitTorrent</a> 客户端。</li>
    2323 <li><B>匿名电邮</B> - POSTMAN 创建了兼容普通邮件客户端 (POP3 / SMTP)的邮件系统,该系统可以在 I2P 网络内部收发Email 也可以收发来自外部 Internet 的邮件!电邮账号请到 <a href="http://hq.postman.i2p/">hq.postman.i2p</a> 申请。我们将用于匿名POP3/SMTP的Web邮件客户端 <a href="/susimail/susimail">SUSIMail</a>, 集成在I2P中,并将其配置为使用POSTMAN 的邮件服务。</li>
    24  <li><B>匿名聊天</B> - 打开您的 IRC 客户端并链接至 <B>localhost:6668</B>。这样可以访问两个匿名的 IRC 服务器, 但无论你还是服务器都不知道其他人在哪里。</li>
     24 <li><B>匿名聊天</B> - 打开您的 IRC 客户端并链接至 <B>127.0.0.1:6668</B>。这样可以访问两个匿名的 IRC 服务器, 但无论你还是服务器都不知道其他人在哪里。</li>
    2525 <li><B>匿名博客</B> - 请访问 <a href="http://syndie.i2p2.de/">Syndie</a></li>
    2626 <li>以及其他服务。</li>
     
    2929<h2>想创建属于您自己的 IIP 站点(EEPSITE)?</h2>
    3030
    31 <p>我们已经集成了一些软件来帮助你运行自己的EEPSITE - 有一个<a href="http://jetty.mortbay.org/">Jetty</a> 实例监听于本机 <a href="http://localhost:7658/">http://localhost:7658/</a>上。只要将你的文件放在 <code>eepsite/docroot/</code> 文件夹中 (或将任何标准的 JSP/Servlet <code>.war</code> 文件放置于 <code>eepsite/webapps</code> 中, 标准的 CGI 脚本应置于 <code>eepsite/cgi-bin</code> 目录内) 之后就可以浏览啦。此后运行 <a href="/i2ptunnel/">IIP站点隧道(EEPSITE TUNEL)</a> 将其指向站点的端口, 您的站点就可以被他人看到了。当您创建IIP站点时的具体操作参见 <a href="http://localhost:7658/">您的临时EEPSITE页面</a>。</p>
     31<p>我们已经集成了一些软件来帮助你运行自己的EEPSITE - 有一个<a href="http://jetty.mortbay.org/">Jetty</a> 实例监听于本机 <a href="http://127.0.0.1:7658/">http://127.0.0.1:7658/</a>上。只要将你的文件放在 <code>eepsite/docroot/</code> 文件夹中 (或将任何标准的 JSP/Servlet <code>.war</code> 文件放置于 <code>eepsite/webapps</code> 中, 标准的 CGI 脚本应置于 <code>eepsite/cgi-bin</code> 目录内) 之后就可以浏览啦。此后运行 <a href="/i2ptunnel/">IIP站点隧道(EEPSITE TUNEL)</a> 将其指向站点的端口, 您的站点就可以被他人看到了。当您创建IIP站点时的具体操作参见 <a href="http://127.0.0.1:7658/">您的临时EEPSITE页面</a>。</p>
    3232
    3333<h2><a name="trouble">疑难解答</a></h2>
    3434
    35 <p>保持耐心 - I2P 第一次启动时需要搜索节点,可能比较缓慢。如果30分钟后,您的活动节点(Active:已连接/新近连接) 计数仍在 10 个节点以下, 请在防火墙中打开 8887 端口改善连接性能。如果您根本无法打开任何EEPSITE(甚至 <a href="http://www.i2p2.i2p/">www.i2p2.i2p</a>),检查您的浏览器代理设置是否为本地的 localhost:4444。你也可以查看 <a href="http://www.i2p2.i2p/">I2P 网站</a> 上的信息, 在 <a href="http://forum.i2p2.de/">I2P 论坛</a> 中发帖, 来 <a href="irc://irc.freenode.net/#i2p">irc.freenode.net</a> , irc.postman.i2p 或 irc.freshcoffee.i2p 上的 #i2p 或 #i2p-chat 两个IRC频道坐坐。 (这些服务器上的这两个频道是相通的)。</p><hr>
     35<p>保持耐心 - I2P 第一次启动时需要搜索节点,可能比较缓慢。如果30分钟后,您的活动节点(Active:已连接/新近连接) 计数仍在 10 个节点以下, 请在防火墙中打开 8887 端口改善连接性能。如果您根本无法打开任何EEPSITE(甚至 <a href="http://www.i2p2.i2p/">www.i2p2.i2p</a>),检查您的浏览器代理设置是否为本地的 127.0.0.1:4444。你也可以查看 <a href="http://www.i2p2.i2p/">I2P 网站</a> 上的信息, 在 <a href="http://forum.i2p2.de/">I2P 论坛</a> 中发帖, 来 <a href="irc://irc.freenode.net/#i2p">irc.freenode.net</a> , irc.postman.i2p 或 irc.freshcoffee.i2p 上的 #i2p 或 #i2p-chat 两个IRC频道坐坐。 (这些服务器上的这两个频道是相通的)。</p><hr>
  • router/java/src/net/i2p/router/Blocklist.java

    r7a88f59 r7782970  
    754754    }
    755755
     756    private static final int MAX_DISPLAY = 1000;
     757
    756758    /** write directly to the stream so we don't OOM on a huge list */
    757759    public void renderStatusHTML(Writer out) throws IOException {
     
    769771        if (_blocklistSize > 0) {
    770772            out.write("<table><tr><th align=center colspan=2><b>IPs from Blocklist File</b></th></tr><tr><td align=center width=50%><b>From:</b></td><td align=center width=50%><b>To:</b></td></tr>");
    771             for (int i = 0; i < _blocklistSize; i++) {
     773            int max = Math.min(_blocklistSize, MAX_DISPLAY);
     774            for (int i = 0; i < max; i++) {
    772775                 int from = getFrom(_blocklist[i]);
    773776                 out.write("<tr><td align=center width=50%>"); out.write(toStr(from)); out.write("</td><td align=center width=50%>");
     
    778781                     out.write("&nbsp;</td></tr>\n");
    779782            }
     783            if (_blocklistSize > MAX_DISPLAY)
     784                out.write("<tr><th colspan=2>First " + MAX_DISPLAY + " displayed, see the " +
     785                          BLOCKLIST_FILE_DEFAULT + " file for the full list</th></tr>");
    780786            out.write("</table>");
    781787        } else {
  • router/java/src/net/i2p/router/CommSystemFacade.java

    r7a88f59 r7782970  
    6565    public String getCountry(Hash peer) { return null; }
    6666    public String getCountryName(String code) { return code; }
    67     public String renderPeerHTML(Hash peer) { return null; }
     67    public String renderPeerHTML(Hash peer) {
     68        return peer.toBase64().substring(0, 4);
     69    }
    6870   
    6971    /**
  • router/java/src/net/i2p/router/JobQueue.java

    r7a88f59 r7782970  
    565565        ArrayList activeJobs = new ArrayList(1);
    566566        ArrayList justFinishedJobs = new ArrayList(4);
    567         out.write("<!-- jobQueue rendering -->\n");
     567        //out.write("<!-- jobQueue rendering -->\n");
    568568        out.flush();
    569569       
     
    588588        }
    589589       
     590/*******
    590591        StringBuilder str = new StringBuilder(128);
    591592        str.append("<!-- after queueRunner sync: states: ");
     
    599600        out.write(str.toString());
    600601        out.flush();
     602*******/
    601603       
    602604        synchronized (_jobLock) {
     
    604606            timedJobs = new ArrayList(_timedJobs);
    605607        }
    606         out.write("<!-- jobQueue rendering: after jobLock sync -->\n");
    607         out.flush();
     608        //out.write("<!-- jobQueue rendering: after jobLock sync -->\n");
     609        //out.flush();
    608610       
    609611        StringBuilder buf = new StringBuilder(32*1024);
    610         buf.append("<b><div class=\"joblog\"><h3>I2P JobQueue</h3><div class=\"wideload\"># runners: ").append(numRunners).append(" [states=");
    611         if (states != null)
    612             for (int i = 0; i < states.length; i++)
    613                 buf.append(states[i]).append(" ");
    614         buf.append("]</b><br>\n");
     612        buf.append("<b><div class=\"joblog\"><h3>I2P Job Queue</h3><div class=\"wideload\">Job runners: ").append(numRunners);
     613        //buf.append(" [states=");
     614        //if (states != null)
     615        //    for (int i = 0; i < states.length; i++)
     616        //        buf.append(states[i]).append(" ");
     617        //buf.append(']');
     618        buf.append("</b><br>\n");
    615619
    616620        long now = _context.clock().now();
    617621
    618         buf.append("<hr><b># active jobs: ").append(activeJobs.size()).append("</b><ol>\n");
     622        buf.append("<hr><b>Active jobs: ").append(activeJobs.size()).append("</b><ol>\n");
    619623        for (int i = 0; i < activeJobs.size(); i++) {
    620624            Job j = (Job)activeJobs.get(i);
    621             buf.append("<li> [started ").append(now-j.getTiming().getStartAfter()).append("ms ago]: ");
     625            buf.append("<li>[started ").append(DataHelper.formatDuration(now-j.getTiming().getStartAfter())).append(" ago]: ");
    622626            buf.append(j.toString()).append("</li>\n");
    623627        }
    624628        buf.append("</ol>\n");
    625         buf.append("<hr><b># just finished jobs: ").append(justFinishedJobs.size()).append("</b><ol>\n");
     629        buf.append("<hr><b>Just finished jobs: ").append(justFinishedJobs.size()).append("</b><ol>\n");
    626630        for (int i = 0; i < justFinishedJobs.size(); i++) {
    627631            Job j = (Job)justFinishedJobs.get(i);
    628             buf.append("<li> [finished ").append(now-j.getTiming().getActualEnd()).append("ms ago]: ");
     632            buf.append("<li>[finished ").append(DataHelper.formatDuration(now-j.getTiming().getActualEnd())).append(" ago]: ");
    629633            buf.append(j.toString()).append("</li>\n");
    630634        }
    631635        buf.append("</ol>\n");
    632         buf.append("<hr><b># ready/waiting jobs: ").append(readyJobs.size()).append(" </b><i>(lots of these mean there's likely a big problem)</i><ol>\n");
     636        buf.append("<hr><b>Ready/waiting jobs: ").append(readyJobs.size()).append("</b><ol>\n");
    633637        for (int i = 0; i < readyJobs.size(); i++) {
    634638            Job j = (Job)readyJobs.get(i);
    635             buf.append("<li> [waiting ");
     639            buf.append("<li>[waiting ");
    636640            buf.append(DataHelper.formatDuration(now-j.getTiming().getStartAfter()));
    637641            buf.append("]: ");
     
    641645        out.flush();
    642646
    643         buf.append("<hr><b># timed jobs: ").append(timedJobs.size()).append("</b><ol>\n");
     647        buf.append("<hr><b>Scheduled jobs: ").append(timedJobs.size()).append("</b><ol>\n");
    644648        TreeMap ordered = new TreeMap();
    645649        for (int i = 0; i < timedJobs.size(); i++) {
     
    655659        buf.append("</ol></div>\n");
    656660       
    657         out.write("<!-- jobQueue rendering: after main buffer, before stats -->\n");
     661        //out.write("<!-- jobQueue rendering: after main buffer, before stats -->\n");
    658662        out.flush();
    659663       
    660664        getJobStats(buf);
    661665       
    662         out.write("<!-- jobQueue rendering: after stats -->\n");
     666        //out.write("<!-- jobQueue rendering: after stats -->\n");
    663667        out.flush();
    664668       
     
    668672    /** render the HTML for the job stats */
    669673    private void getJobStats(StringBuilder buf) {
    670         buf.append("<table>\n");
    671         buf.append("<tr><th>Job</th><th>Runs</th>");
    672         buf.append("<th>Time</th><th><i>Avg</i></th><th><i>Max</i></th><th><i>Min</i></th>");
    673         buf.append("<th>Pending</th><th><i>Avg</i></th><th><i>Max</i></th><th><i>Min</i></th></tr>\n");
     674        buf.append("<table>\n" +
     675                   "<tr><th>Job</th><th>Runs</th>" +
     676                   "<th>Time</th><th><i>Avg</i></th><th><i>Max</i></th><th><i>Min</i></th>" +
     677                   "<th>Pending</th><th><i>Avg</i></th><th><i>Max</i></th><th><i>Min</i></th></tr>\n");
    674678        long totRuns = 0;
    675679        long totExecTime = 0;
     
    721725        }
    722726
    723         buf.append("<tr><td colspan=\"10\"><hr></td><tr>");
    724         buf.append("<tr>");
    725         buf.append("<td><i><b>").append("SUMMARY").append("</b></i></td>");
    726         buf.append("<td><i>").append(totRuns).append("</i></td>");
    727         buf.append("<td><i>").append(totExecTime).append("</i></td>");
    728         buf.append("<td><i>").append(avgExecTime).append("</i></td>");
    729         buf.append("<td><i>").append(maxExecTime).append("</i></td>");
    730         buf.append("<td><i>").append(minExecTime).append("</i></td>");
    731         buf.append("<td><i>").append(totPendingTime).append("</i></td>");
    732         buf.append("<td><i>").append(avgPendingTime).append("</i></td>");
    733         buf.append("<td><i>").append(maxPendingTime).append("</i></td>");
    734         buf.append("<td><i>").append(minPendingTime).append("</i></td>");
    735         buf.append("</tr>\n");
    736        
    737         buf.append("</table></div>\n");
     727        buf.append("<tr class=\"tablefooter\">");
     728        buf.append("<td><b>").append("SUMMARY").append("</b></td>");
     729        buf.append("<td>").append(totRuns).append("</td>");
     730        buf.append("<td>").append(totExecTime).append("</td>");
     731        buf.append("<td>").append(avgExecTime).append("</td>");
     732        buf.append("<td>").append(maxExecTime).append("</td>");
     733        buf.append("<td>").append(minExecTime).append("</td>");
     734        buf.append("<td>").append(totPendingTime).append("</td>");
     735        buf.append("<td>").append(avgPendingTime).append("</td>");
     736        buf.append("<td>").append(maxPendingTime).append("</td>");
     737        buf.append("<td>").append(minPendingTime).append("</td>");
     738        buf.append("</tr></table></div>\n");
    738739    }
    739740}
  • router/java/src/net/i2p/router/Router.java

    r7a88f59 r7782970  
    886886        _context.deleteTempDir();
    887887        RouterContext.listContexts().remove(_context);
    888         //dumpStats();
    889888        finalShutdown(exitCode);
    890889    }
     
    10151014     * successful, false otherwise)
    10161015     *
     1016     * Note that unlike DataHelper.storeProps(),
     1017     * this does escape the \r or \n that are unescaped in DataHelper.loadProps().
     1018     * Note that the escaping of \r or \n was probably a mistake and should be taken out.
     1019     *
    10171020     */
    10181021    public boolean saveConfig() {
     
    10211024            fos = new FileOutputStream(_configFilename);
    10221025            StringBuilder buf = new StringBuilder(8*1024);
     1026            buf.append("# NOTE: This I2P config file must use UTF-8 encoding\n");
    10231027            synchronized (_config) {
    10241028                TreeSet ordered = new TreeSet(_config.keySet());
     
    10331037                }
    10341038            }
    1035             fos.write(buf.toString().getBytes());
     1039            fos.write(buf.toString().getBytes("UTF-8"));
    10361040        } catch (IOException ioe) {
    10371041            if (_log.shouldLog(Log.ERROR))
     
    10661070       
    10671071        _log.log(Log.CRIT, "Restart complete");
    1068     }
    1069    
    1070     private void dumpStats() {
    1071         //_log.log(Log.CRIT, "Lifetime stats:\n\n" + StatsGenerator.generateStatsPage());
    10721072    }
    10731073   
  • router/java/src/net/i2p/router/Shitlist.java

    r7a88f59 r7782970  
    265265            Entry entry = e.getValue();
    266266            buf.append("<li>").append(_context.commSystem().renderPeerHTML(key));
    267             buf.append(" expiring in ");
    268             buf.append(DataHelper.formatDuration(entry.expireOn-_context.clock().now()));
     267            long expires = entry.expireOn-_context.clock().now();
     268            if (expires < 5l*24*60*60*1000)
     269                buf.append(" Temporary ban expiring in ");
     270            else
     271                buf.append(" Banned until restart or in ");
     272            buf.append(DataHelper.formatDuration(expires));
    269273            Set transports = entry.transports;
    270274            if ( (transports != null) && (transports.size() > 0) )
  • router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java

    r7a88f59 r7782970  
    482482    public void publish(LeaseSet localLeaseSet) {
    483483        if (!_initialized) return;
     484        if (_context.router().gracefulShutdownInProgress())
     485            return;
    484486        Hash h = localLeaseSet.getDestination().calculateHash();
    485487        try {
     
    518520    public void publish(RouterInfo localRouterInfo) throws IllegalArgumentException {
    519521        if (!_initialized) return;
     522        if (_context.router().gracefulShutdownInProgress())
     523            return;
    520524        // This isn't really used for anything
    521525        // writeMyInfo(localRouterInfo);
     
    971975            long exp = ls.getEarliestLeaseDate()-now;
    972976            if (exp > 0)
    973                 buf.append("Earliest expiration date in: <i>").append(DataHelper.formatDuration(exp)).append("</i><br>\n");
     977                buf.append("Expires in ").append(DataHelper.formatDuration(exp)).append("<br>\n");
    974978            else
    975                 buf.append("Earliest expiration date was: <i>").append(DataHelper.formatDuration(0-exp)).append(" ago</i><br>\n");
     979                buf.append("Expired ").append(DataHelper.formatDuration(0-exp)).append(" ago<br>\n");
    976980            for (int i = 0; i < ls.getLeaseCount(); i++) {
    977                 buf.append("Lease ").append(i).append(": gateway <i>");
    978                 buf.append(ls.getLease(i).getGateway().toBase64().substring(0,6));
    979                 buf.append("</i> tunnelId <i>").append(ls.getLease(i).getTunnelId().getTunnelId()).append("</i><br>\n");
     981                buf.append("Lease ").append(i + 1).append(": Gateway ");
     982                buf.append(_context.commSystem().renderPeerHTML(ls.getLease(i).getGateway()));
     983                buf.append(" Tunnel ").append(ls.getLease(i).getTunnelId().getTunnelId()).append("<br>\n");
    980984            }
    981985            buf.append("<hr>\n");
     
    10721076    }
    10731077   
     1078    /**
     1079     *  Be careful to use stripHTML for any displayed routerInfo data
     1080     *  to prevent vulnerabilities
     1081     */
    10741082    private void renderRouterInfo(StringBuilder buf, RouterInfo info, boolean isUs, boolean full) {
    10751083        String hash = info.getIdentity().getHash().toBase64();
     
    10961104        for (Iterator iter = info.getAddresses().iterator(); iter.hasNext(); ) {
    10971105            RouterAddress addr = (RouterAddress)iter.next();
    1098             buf.append(addr.getTransportStyle()).append(": ");
     1106            buf.append(DataHelper.stripHTML(addr.getTransportStyle())).append(": ");
    10991107            for (Iterator optIter = addr.getOptions().keySet().iterator(); optIter.hasNext(); ) {
    11001108                String name = (String)optIter.next();
  • router/java/src/net/i2p/router/networkdb/kademlia/StartExplorersJob.java

    r7a88f59 r7782970  
    4343    public String getName() { return "Start Explorers Job"; }
    4444    public void runJob() {
    45         if (! ((FloodfillNetworkDatabaseFacade)_facade).floodfillEnabled()) {
     45        if (! (((FloodfillNetworkDatabaseFacade)_facade).floodfillEnabled() ||
     46               getContext().router().gracefulShutdownInProgress())) {
    4647            Set toExplore = selectKeysToExplore();
    4748            if (_log.shouldLog(Log.DEBUG))
  • router/java/src/net/i2p/router/peermanager/ProfileOrganizerRenderer.java

    r7a88f59 r7782970  
    3434       
    3535        long now = _context.clock().now();
    36         long hideBefore = now - 2*60*60*1000;
     36        long hideBefore = now - 90*60*1000;
    3737       
    3838        TreeSet order = new TreeSet(_comparator);
     
    6060        buf.append("<h2>Peer Profiles</h2>\n");
    6161        buf.append("<p>Showing ").append(order.size()).append(" recent profiles, hiding ").append(peers.size()-order.size()).append(" older profiles</p>");
    62         buf.append("<table>");
    63         buf.append("<tr>");
    64         buf.append("<th>Peer</th>");
    65         buf.append("<th>Groups (Caps)</th>");
    66         buf.append("<th>Speed</th>");
    67         buf.append("<th>Capacity</th>");
    68         buf.append("<th>Integration</th>");
    69         buf.append("<th>Failing?</th>");
    70         buf.append("<th>&nbsp;</th>");
    71         buf.append("</tr>");
     62        buf.append("<table>" +
     63                   "<tr>" +
     64                   "<th>Peer</th>" +
     65                   "<th>Groups (Caps)</th>" +
     66                   "<th>Speed</th>" +
     67                   "<th>Capacity</th>" +
     68                   "<th>Integration</th>" +
     69                   "<th>Status</th>" +
     70                   "<th>&nbsp;</th>" +
     71                   "</tr>");
    7272        int prevTier = 1;
    7373        for (Iterator iter = order.iterator(); iter.hasNext();) {
     
    157157        buf.append("</table>");
    158158
    159         buf.append("<h2>Floodfill and Integrated Peers</h2>\n");
    160         buf.append("<table>");
    161         buf.append("<tr>");
    162         buf.append("<th class=\"smallhead\">Peer</th>");
    163         buf.append("<th class=\"smallhead\">Caps</th>");
    164         buf.append("<th class=\"smallhead\">Integ. Value</th>");
    165         buf.append("<th class=\"smallhead\">Last Heard About</th>");
    166         buf.append("<th class=\"smallhead\">Last Heard From</th>");
    167 //        buf.append("<th class=\"smallhead\">Last Successful Send</th>");
    168         buf.append("<th class=\"smallhead\">Last Good Send</th>");       
    169 //        buf.append("<th class=\"smallhead\">Last Failed Send</th>");
    170         buf.append("<th class=\"smallhead\">Last Bad Send</th>");
    171         buf.append("<th class=\"smallhead\">10m Resp. Time</th>");
    172         buf.append("<th class=\"smallhead\">1h Resp. Time</th>");
    173         buf.append("<th class=\"smallhead\">1d Resp. Time</th>");
    174 //        buf.append("<th class=\"smallhead\">Successful Lookups</th>");
    175         buf.append("<th class=\"smallhead\">Good Lookups</th>");
    176 //        buf.append("<th>Failed Lookups</th>");
    177         buf.append("<th class=\"smallhead\">Bad Lookups</th>");       
    178         buf.append("<th class=\"smallhead\">New Stores</th>");
    179         buf.append("<th class=\"smallhead\">Old Stores</th>");
    180         buf.append("<th class=\"smallhead\">1h Fail Rate</th>");
    181         buf.append("<th class=\"smallhead\">1d Fail Rate</th>");
    182         buf.append("</tr>");
     159        buf.append("<h2>Floodfill and Integrated Peers</h2>\n" +
     160                   "<table>" +
     161                   "<tr>" +
     162                   "<th class=\"smallhead\">Peer</th>" +
     163                   "<th class=\"smallhead\">Caps</th>" +
     164                   "<th class=\"smallhead\">Integ. Value</th>" +
     165                   "<th class=\"smallhead\">Last Heard About</th>" +
     166                   "<th class=\"smallhead\">Last Heard From</th>" +
     167//                   "<th class=\"smallhead\">Last Successful Send</th>" +
     168                   "<th class=\"smallhead\">Last Good Send</th>" +       
     169//                   "<th class=\"smallhead\">Last Failed Send</th>" +
     170                   "<th class=\"smallhead\">Last Bad Send</th>" +
     171                   "<th class=\"smallhead\">10m Resp. Time</th>" +
     172                   "<th class=\"smallhead\">1h Resp. Time</th>" +
     173                   "<th class=\"smallhead\">1d Resp. Time</th>" +
     174//                   "<th class=\"smallhead\">Successful Lookups</th>" +
     175                   "<th class=\"smallhead\">Good Lookups</th>" +
     176//                   "<th>Failed Lookups</th>" +
     177                   "<th class=\"smallhead\">Bad Lookups</th>" +       
     178                   "<th class=\"smallhead\">New Stores</th>" +
     179                   "<th class=\"smallhead\">Old Stores</th>" +
     180                   "<th class=\"smallhead\">1h Fail Rate</th>" +
     181                   "<th class=\"smallhead\">1d Fail Rate</th>" +
     182                   "</tr>");
    183183        for (Iterator iter = integratedPeers.iterator(); iter.hasNext();) {
    184184            PeerProfile prof = (PeerProfile)iter.next();
     
    223223        buf.append("<b>Capacity:</b> ").append(num(_organizer.getCapacityThreshold())).append(" (").append(reliable).append(" high capacity peers)<br>");
    224224        buf.append("<b>Integration:</b> ").append(num(_organizer.getIntegrationThreshold())).append(" (").append(integrated).append(" well integrated peers)");
    225         buf.append("<h3>Definitions:</h3><ul>");
    226         buf.append("<li><b>groups</b>: as determined by the profile organizer</li>");
    227         buf.append("<li><b>caps</b>: capabilities in the netDb, not used to determine profiles</li>");
    228         buf.append("<li><b>speed</b>: peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel</li>");
    229         buf.append("<li><b>capacity</b>: how many tunnels can we ask them to join in an hour?</li>");
    230         buf.append("<li><b>integration</b>: how many new peers have they told us about lately?</li>");
    231         buf.append("<li><b>failing?</b>: is the peer currently swamped (and if possible we should avoid nagging them)?</li>");
    232         buf.append("</ul></i>");
     225        buf.append("<h3>Definitions:</h3><ul>" +
     226                   "<li><b>groups</b>: as determined by the profile organizer</li>" +
     227                   "<li><b>caps</b>: capabilities in the netDb, not used to determine profiles</li>" +
     228                   "<li><b>speed</b>: peak throughput (bytes per second) over a 1 minute period that the peer has sustained in a single tunnel</li>" +
     229                   "<li><b>capacity</b>: how many tunnels can we ask them to join in an hour?</li>" +
     230                   "<li><b>integration</b>: how many new peers have they told us about lately?</li>" +
     231                   "<li><b>status</b>: is the peer banned, or unreachable, or failing tunnel tests?</li>" +
     232                   "</ul></i>");
    233233        out.write(buf.toString());
    234234        out.flush();
  • router/java/src/net/i2p/router/startup/ClientAppConfig.java

    r7a88f59 r7782970  
    88import java.util.Properties;
    99
     10import net.i2p.I2PAppContext;
    1011import net.i2p.data.DataHelper;
    1112import net.i2p.router.RouterContext;
     
    4041    }
    4142
    42     private static Properties getClientAppProps(RouterContext ctx) {
    43         Properties rv = new Properties();
     43    public static File configFile(I2PAppContext ctx) {
    4444        String clientConfigFile = ctx.getProperty(PROP_CLIENT_CONFIG_FILENAME, DEFAULT_CLIENT_CONFIG_FILENAME);
    4545        File cfgFile = new File(clientConfigFile);
    4646        if (!cfgFile.isAbsolute())
    4747            cfgFile = new File(ctx.getConfigDir(), clientConfigFile);
     48        return cfgFile;
     49    }
     50
     51    private static Properties getClientAppProps(RouterContext ctx) {
     52        Properties rv = new Properties();
     53        File cfgFile = configFile(ctx);
    4854       
    4955        // fall back to use router.config's clientApp.* lines
     
    95101
    96102    public static void writeClientAppConfig(RouterContext ctx, List apps) {
    97         String clientConfigFile = ctx.getProperty(PROP_CLIENT_CONFIG_FILENAME, DEFAULT_CLIENT_CONFIG_FILENAME);
    98         File cfgFile = new File(clientConfigFile);
    99         if (!cfgFile.isAbsolute())
    100             cfgFile = new File(ctx.getConfigDir(), clientConfigFile);
     103        File cfgFile = configFile(ctx);
    101104        FileOutputStream fos = null;
    102105        try {
     
    111114                buf.append(PREFIX).append(i).append(".startOnLoad=").append(!app.disabled).append("\n");
    112115            }
    113             fos.write(buf.toString().getBytes());
     116            fos.write(buf.toString().getBytes("UTF-8"));
    114117        } catch (IOException ioe) {
    115118        } finally {
  • router/java/src/net/i2p/router/startup/WorkingDir.java

    r7a88f59 r7782970  
    55import java.io.FileInputStream;
    66import java.io.FileOutputStream;
    7 import java.io.FileWriter;
     7import java.io.OutputStreamWriter;
    88import java.io.IOException;
     9import java.io.OutputStreamWriter;
    910import java.io.PrintWriter;
    1011import java.util.Properties;
     
    191192        try {
    192193            in = new FileInputStream(oldFile);
    193             out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)));
     194            out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(newFile), "UTF-8")));
    194195            out.println("# Modified by I2P User dir migration script");
    195196            String s = null;
     
    230231        try {
    231232            in = new FileInputStream(oldFile);
    232             out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)));
     233            out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(newFile), "UTF-8")));
    233234            String s = null;
    234235            while ((s = DataHelper.readLine(in)) != null) {
  • router/java/src/net/i2p/router/transport/FIFOBandwidthLimiter.java

    r7a88f59 r7782970  
    304304                _recvBps = (0.9f)*_recvBps + (0.1f)*((float)recv*1000)/(float)time;
    305305
    306             if (_log.shouldLog(Log.WARN)) {
     306            // warning, getStatLog() can be null
     307            //if (_log.shouldLog(Log.WARN)) {
    307308                //if (_log.shouldLog(Log.INFO))
    308309                //    _log.info("BW: time = " + time + " sent: " + _sendBps + " recv: " + _recvBps);
    309                 _context.statManager().getStatLog().addData("bw", "bw.sendBps1s", (long)_sendBps, sent);
    310                 _context.statManager().getStatLog().addData("bw", "bw.recvBps1s", (long)_recvBps, recv);
    311             }
     310            //    _context.statManager().getStatLog().addData("bw", "bw.sendBps1s", (long)_sendBps, sent);
     311            //    _context.statManager().getStatLog().addData("bw", "bw.recvBps1s", (long)_recvBps, recv);
     312            //}
    312313
    313314            // Maintain an approximate average with a 15-second halflife
     
    324325                _recvBps15s = (0.955f)*_recvBps15s + (0.045f)*((float)recv*1000)/(float)time;
    325326
    326             if (_log.shouldLog(Log.WARN)) {
    327                 if (_log.shouldLog(Log.DEBUG))
    328                     _log.debug("BW15: time = " + time + " sent: " + _sendBps + " recv: " + _recvBps);
    329                 _context.statManager().getStatLog().addData("bw", "bw.sendBps15s", (long)_sendBps15s, sent);
    330                 _context.statManager().getStatLog().addData("bw", "bw.recvBps15s", (long)_recvBps15s, recv);
    331             }
     327            // warning, getStatLog() can be null
     328            //if (_log.shouldLog(Log.WARN)) {
     329            //    if (_log.shouldLog(Log.DEBUG))
     330            //        _log.debug("BW15: time = " + time + " sent: " + _sendBps + " recv: " + _recvBps);
     331            //    _context.statManager().getStatLog().addData("bw", "bw.sendBps15s", (long)_sendBps15s, sent);
     332            //    _context.statManager().getStatLog().addData("bw", "bw.recvBps15s", (long)_recvBps15s, recv);
     333            //}
    332334        }
    333335    }
  • router/java/src/net/i2p/router/transport/TransportImpl.java

    r7a88f59 r7782970  
    9393
    9494    /** Default is 500 for floodfills... */
    95     public static final int DEFAULT_MAX_CONNECTIONS = 500;
    96     /** ...and 60/120/180/240/300 for BW Tiers K/L/M/N/O */
    97     public static final int MAX_CONNECTION_FACTOR = 60;
     95    private static final int DEFAULT_MAX_CONNECTIONS = 500;
     96    /** ...and 50/100/150/200/250 for BW Tiers K/L/M/N/O */
     97    private static final int MAX_CONNECTION_FACTOR = 50;
    9898    /** Per-transport connection limit */
    9999    public int getMaxConnections() {
  • router/java/src/net/i2p/router/transport/VMCommSystem.java

    r7a88f59 r7782970  
    22
    33import java.io.ByteArrayInputStream;
     4import java.io.IOException;
    45import java.io.OutputStream;
     6import java.io.Writer;
    57import java.util.Collections;
    68import java.util.HashMap;
     
    151153    }
    152154   
    153     public void renderStatusHTML(OutputStream out) {}
     155    public void renderStatusHTML(Writer out, String urlBase, int sortFlags) throws IOException {
     156        out.write("Dummy! i2p.vmCommSystem=true!");
     157    }
    154158}
  • router/java/src/net/i2p/router/transport/ntcp/EstablishState.java

    r7a88f59 r7782970  
    369369                    _context.statManager().addRateData("ntcp.invalidOutboundSkew", diff, 0);
    370370                    _transport.markReachable(_con.getRemotePeer().calculateHash(), false);
    371                     _context.shitlist().shitlistRouter(_con.getRemotePeer().calculateHash(), "Outbound clock skew of " + diff + " ms");
     371                    _context.shitlist().shitlistRouter(_con.getRemotePeer().calculateHash(),
     372                                                       "Excessive clock skew: " + DataHelper.formatDuration(diff));
    372373                    fail("Clocks too skewed (" + diff + " ms)", null, true);
    373374                    return;
  • router/java/src/net/i2p/router/transport/udp/UDPFlooder.java

    r7a88f59 r7782970  
    9191                            continue;
    9292                        msg.setTarget(to);
    93                         _context.statManager().getStatLog().addData(peer.getRemotePeer().toBase64().substring(0,6), "udp.floodDataSent", 1, 0);
     93                        // warning, getStatLog() can be null
     94                        //_context.statManager().getStatLog().addData(peer.getRemotePeer().toBase64().substring(0,6), "udp.floodDataSent", 1, 0);
    9495
    9596                        _transport.send(msg);
  • router/java/src/net/i2p/router/tunnel/pool/ExploratoryPeerSelector.java

    r7a88f59 r7782970  
    7474        if (ctx.router().getUptime() <= 5*60*1000)
    7575            return true;
     76        // or at the end
     77        if (ctx.router().gracefulShutdownInProgress())
     78            return true;
    7679        // ok, if we aren't explicitly asking for it, we should try to pick peers
    7780        // randomly from the 'not failing' pool.  However, if we are having a
Note: See TracChangeset for help on using the changeset viewer.