Changeset 52d38e0


Ignore:
Timestamp:
Sep 23, 2008 6:48:59 PM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8d78a77, bf07a6a
Parents:
fbad8a1
Message:
  • config.jsp: Add some reachability help
  • configpeer.jsp: Add blocklist info
  • help.jsp: Add link to German FAQ
  • tunnels.jsp: Fix inactive participating count
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigPeerHelper.java

    rfbad8a1 r52d38e0  
    11package net.i2p.router.web;
     2
     3import java.io.ByteArrayOutputStream;
     4import java.io.IOException;
     5import java.io.OutputStreamWriter;
    26
    37import net.i2p.data.DataHelper;
     
    2226    public ConfigPeerHelper() {}
    2327   
     28    public String getBlocklistSummary() {
     29        ByteArrayOutputStream baos = new ByteArrayOutputStream(4*1024);
     30        try {
     31            _context.blocklist().renderStatusHTML(new OutputStreamWriter(baos));
     32        } catch (IOException ioe) {
     33            ioe.printStackTrace();
     34        }
     35        return new String(baos.toByteArray());
     36    }
    2437}
  • apps/routerconsole/jsp/config.jsp

    rfbad8a1 r52d38e0  
    106106    restart your router.</b>
    107107 <hr />
     108 <b>Reachability Help: </b>
     109 <p>
     110 While I2P will work adequately behind a firewall, your speeds and network integration will generally improve
     111 if you open up your port (generally 8887) to both UDP and TCP, and enable inbound TCP above.
     112 If you think you have opened up your firewall and I2P still thinks you are firewalled, remember
     113 that you may have multiple firewalls, for example both software packages and external hardware routers.
     114 <ul>
     115 <li><b>OK</b> - Your UDP port does not appear to be firewalled.
     116 <li><b>Firewalled</b> - Your UDP port appears to be firewalled.
     117     As the firewall detection methods are not 100% reliable, this may occasionally be displayed in error.
     118     However, if it appears consistently, you should check whether both your external and internal
     119     firewalls are open on port 8887.
     120 <li><b>Testing</b> - The router is currently testing whether your UDP port is firewalled.
     121 <li><b>WARN - Firewalled and Fast</b> - You have configured I2P to share more than 128KBps of bandwidth,
     122     but you are firewalled. While I2P will work fine in this configuration, if you really have
     123     over 128KBps of bandwidth to share, it will be much more helpful to the network if
     124     you open your firewall.
     125 <li><b>WARN - Firewalled and Floodfill</b> - You have configured I2P to be a floodfill router, but
     126     you are firewalled. For best participation as a floodfill router, you should open your firewall.
     127 <li><b>WARN - Firewalled with Inbound TCP Enabled</b> - You have configured inbound TCP, however
     128     your UDP port is firewalled, and therefore it is likely that your TCP port is firewalled as well.
     129     If your TCP port is firewalled with inbound TCP enabled, routers will not be able to contact
     130     you via TCP, which will hurt the network. Please open your firewall or disable inbound TCP above.
     131 <li><b>ERR - Private TCP Address</b> - You must never advertise an unroutable IP address such as
     132     127.0.0.1 or 192.168.1.1 as your external address. Correct the address or disable inbound TCP above.
     133 <li><b>ERR - SymmetricNAT</b> - I2P detected that you are firewalled by a Symmetric NAT.
     134     I2P does not work behind this type of firewall.
     135 <li><b>ERR - UDP Port In Use - Set i2np.udp.internalPort=xxxx in advanced config and restart</b> -
     136     I2P was unable to bind to port 8887 or other configured port.
     137     Check to see if another program is using port 8887. If so, stop that program or configure
     138     I2P to use a different port. This may be a transient error, if the other program is no longer
     139     using the port. However, a restart is always required after this error.
     140 </ul>
     141 </p>
     142 <hr />
    108143<!--
    109144 <b>Dynamic Router Keys: </b>
  • apps/routerconsole/jsp/configpeer.jsp

    rfbad8a1 r52d38e0  
    7676 <jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
    7777 <jsp:getProperty name="profilesHelper" property="shitlistSummary" />
     78 <hr />
     79 <jsp:getProperty name="peerhelper" property="blocklistSummary" />
    7880
    7981
  • apps/routerconsole/jsp/help.jsp

    rfbad8a1 r52d38e0  
    1414<h2>Help</h2>
    1515Sorry, there's no help text here yet, so check out the
    16 <a href="http://www.i2p2.i2p/faq.html">FAQ on www.i2p2.i2p</a>.
     16<a href="http://www.i2p2.i2p/faq.html">FAQ on www.i2p2.i2p</a>
     17or the
     18<a href="http://www.i2p2.i2p/faq_de.html">Deutsch FAQ</a>.
    1719<br />
    1820
  • history.txt

    rfbad8a1 r52d38e0  
     12008-09-23 zzz
     2    * config.jsp: Add some reachability help
     3    * configpeer.jsp: Add blocklist info
     4    * help.jsp: Add link to German FAQ
     5    * tunnels.jsp: Fix inactive participating count
     6    * SearchReplyJob: Don't look up references to shitlisted peers
     7    * TunnelPeerSelector: Avoid a peer for 20s after a reject or timeout
     8
    192008-09-20 zzz
    210    * NetDb: Fix the totally broken "check new routers against blocklist"
  • router/java/src/net/i2p/router/Blocklist.java

    rfbad8a1 r52d38e0  
    632632
    633633    private String toStr(long entry) {
    634         StringBuffer buf = new StringBuffer(128);
     634        StringBuffer buf = new StringBuffer(32);
    635635        for (int i = 7; i >= 0; i--) {
    636636            buf.append((entry >> (8*i)) & 0xff);
     
    638638                buf.append('-');
    639639            else if (i > 0)
     640                buf.append('.');
     641        }
     642        return buf.toString();
     643    }
     644
     645    private String toStr(int ip) {
     646        StringBuffer buf = new StringBuffer(16);
     647        for (int i = 3; i >= 0; i--) {
     648            buf.append((ip >> (8*i)) & 0xff);
     649            if (i > 0)
    640650                buf.append('.');
    641651        }
     
    745755    }
    746756
     757    public void renderStatusHTML(Writer out) throws IOException {
     758        StringBuffer buf = new StringBuffer(1024);
     759        buf.append("<h2>IP Blocklist</h2>");
     760        Set singles = new TreeSet();
     761        synchronized(_singleIPBlocklist) {
     762            singles.addAll(_singleIPBlocklist);
     763        }
     764        if (singles.size() > 0) {
     765            buf.append("<table><tr><td><b>Transient IPs</b></td></tr>");
     766            for (Iterator iter = singles.iterator(); iter.hasNext(); ) {
     767                 int ip = ((Integer) iter.next()).intValue();
     768                 buf.append("<tr><td>").append(toStr(ip)).append("</td></tr>\n");
     769            }
     770            buf.append("</table>");
     771        }
     772        if (_blocklistSize > 0) {
     773            buf.append("<table><tr><td align=center colspan=2><b>IPs from Blocklist File</b></td></tr><tr><td align=center><b>From</b></td><td align=center><b>To</b></td></tr>");
     774            for (int i = 0; i < _blocklistSize; i++) {
     775                 int from = getFrom(_blocklist[i]);
     776                 buf.append("<tr><td align=right>").append(toStr(from)).append("</td><td align=right>");
     777                 int to = getTo(_blocklist[i]);
     778                 if (to != from)
     779                     buf.append(toStr(to)).append("</td></tr>\n");
     780                 else
     781                     buf.append("&nbsp</td></tr>\n");
     782            }
     783            buf.append("</table>");
     784        } else {
     785            buf.append("<br>No blocklist file entries");
     786        }
     787        out.write(buf.toString());
     788        out.flush();
     789    }
     790
    747791    public static void main(String args[]) {
    748792        Blocklist b = new Blocklist();
  • router/java/src/net/i2p/router/RouterVersion.java

    rfbad8a1 r52d38e0  
    1818    public final static String ID = "$Revision: 1.548 $ $Date: 2008-06-07 23:00:00 $";
    1919    public final static String VERSION = "0.6.3";
    20     public final static long BUILD = 8;
     20    public final static long BUILD = 9;
    2121    public static void main(String args[]) {
    2222        System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
  • router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java

    rfbad8a1 r52d38e0  
    44import java.io.Writer;
    55import java.util.ArrayList;
     6import java.util.Collections;
    67import java.util.Comparator;
    78import java.util.HashMap;
     
    910import java.util.List;
    1011import java.util.Map;
    11 import java.util.Set;
    12 import java.util.TreeSet;
    1312
    1413import net.i2p.data.DataHelper;
     
    448447        }
    449448       
    450         Set participating = new TreeSet(new TunnelComparator());
    451         participating.addAll(_context.tunnelDispatcher().listParticipatingTunnels());
     449        List participating = _context.tunnelDispatcher().listParticipatingTunnels();
     450        Collections.sort(participating, new TunnelComparator());
    452451        out.write("<h2><a name=\"participating\">Participating tunnels</a>:</h2><table border=\"1\">\n");
    453452        out.write("<tr><td><b>Receive on</b></td><td><b>From</b></td><td>"
     
    459458            processed = (long)rs.getRate(10*60*1000).getLifetimeTotalValue();
    460459        int inactive = 0;
    461         for (Iterator iter = participating.iterator(); iter.hasNext(); ) {
    462             HopConfig cfg = (HopConfig)iter.next();
     460        for (int i = 0; i < participating.size(); i++) {
     461            HopConfig cfg = (HopConfig)participating.get(i);
    463462            if (cfg.getProcessedMessagesCount() <= 0) {
    464463                inactive++;
Note: See TracChangeset for help on using the changeset viewer.