Changeset 631a367b


Ignore:
Timestamp:
Aug 11, 2009 4:11:45 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b10b0e8f
Parents:
8ea279f (diff), 9b2e18a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

propagate from branch 'i2p.i2p.zzz.test3' (head d847100f901613ad765312ac9fed6d578d08d907)

to branch 'i2p.i2p' (head 63ce4ace08b7b7ba01531f0951ffc47ed57411a6)

Files:
12 edited
4 moved

Legend:

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

    r8ea279f r631a367b  
    2121            _context.router().saveConfig();
    2222            addFormNotice("Settings saved - not really!!!!!");
    23         } else if (_action.startsWith("Shitlist")) {
     23        } else if (_action.startsWith("Ban")) {
    2424            Hash h = getHash();
    2525            if (h != null) {
    26                 _context.shitlist().shitlistRouterForever(h, "Manually shitlisted via <a href=\"configpeer.jsp\">configpeer.jsp</a>");
    27                 addFormNotice("Peer " + _peer + " shitlisted forever");
     26                _context.shitlist().shitlistRouterForever(h, "Manually banned via <a href=\"configpeer.jsp\">configpeer.jsp</a>");
     27                addFormNotice("Peer " + _peer + " banned until restart");
    2828                return;
    2929            }
    3030            addFormError("Invalid peer");
    31         } else if (_action.startsWith("Unshitlist")) {
     31        } else if (_action.startsWith("Unban")) {
    3232            Hash h = getHash();
    3333            if (h != null) {
    3434                if (_context.shitlist().isShitlisted(h)) {
    3535                    _context.shitlist().unshitlistRouter(h);
    36                     addFormNotice("Peer " + _peer + " unshitlisted");
     36                    addFormNotice("Peer " + _peer + " unbanned");
    3737                } else
    38                     addFormNotice("Peer " + _peer + " is not currently shitlisted");
     38                    addFormNotice("Peer " + _peer + " is not currently banned");
    3939                return;
    4040            }
  • apps/routerconsole/java/src/net/i2p/router/web/OldConsoleHelper.java

    r8ea279f r631a367b  
    77
    88import net.i2p.router.RouterContext;
    9 import net.i2p.router.admin.StatsGenerator;
    109
    1110public class OldConsoleHelper extends HelperBase {
  • apps/routerconsole/java/src/net/i2p/router/web/StatsGenerator.java

    r8ea279f r631a367b  
    1 package net.i2p.router.admin;
     1package net.i2p.router.web;
    22
    33import java.io.IOException;
  • apps/routerconsole/jsp/configpeer.jsp

    r8ea279f r631a367b  
    4040 <div class="mediumtags">Router Hash:
    4141 <input type="text" size="55" name="peer" value="<%=peer%>" /></div>
    42  <h3>Manually Shitlist / Unshitlist a Router</h3>
     42 <h3>Manually Ban / Unban a Peer</h3>
    4343 Shitlisting will prevent the participation of this peer in tunnels you create.
    4444      <hr />     
    4545      <div class="formaction">
    46         <input type="submit" name="action" value="Shitlist peer until restart" />
    47         <input type="submit" name="action" value="Unshitlist peer" />
     46        <input type="submit" name="action" value="Ban peer until restart" />
     47        <input type="submit" name="action" value="Unban peer" />
    4848        <% if (! "".equals(peer)) { %>
    4949        <!-- <font color="blue">&lt;---- click to verify action</font> -->
  • apps/routerconsole/jsp/summaryframe.jsp

    r8ea279f r631a367b  
    22<%@page pageEncoding="UTF-8"%>
    33<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    4 
    54<%
    65/*
     
    98 */
    109%>
    11 
    1210<html><head>
     11<%@include file="css.jsp" %>
    1312<title>Summary Bar</title>
    1413<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     
    5150    }
    5251%>
    53 <%@include file="css.jsp" %>
    5452</head>
    5553
  • apps/systray/java/src/net/i2p/apps/systray/ConfigFile.java

    r8ea279f r631a367b  
    1818 * Simple config file handler.
    1919 *
     20 * Warning - browser needs double quotes and double backslashes on Windows
     21 * e.g.
     22 * browser="C:\\Program Files\\Mozilla Firefox\\firefox.exe"
     23 *
    2024 * @author hypercubus
    2125 */
  • core/java/src/net/i2p/data/DataHelper.java

    r8ea279f r631a367b  
    213213     * A more efficient Properties.load
    214214     *
     215     * Some of the other differences:
     216     * - This does not process or drop backslashes
     217     * - '#' or ';' starts a comment line, but '!' does not
     218     * - Leading whitespace is not trimmed
     219     * - '=' is the only key-termination character (not ':' or whitespace)
    215220     */
    216221    public static void loadProps(Properties props, File file) throws IOException {
  • router/java/src/net/i2p/router/Blocklist.java

    r8ea279f r631a367b  
    112112            for (Iterator iter = _peerBlocklist.keySet().iterator(); iter.hasNext(); ) {
    113113                Hash peer = (Hash) iter.next();
    114                 String reason = "Blocklisted by router hash";
     114                String reason = "Banned by router hash";
    115115                String comment = (String) _peerBlocklist.get(peer);
    116116                if (comment != null)
     
    660660    public void shitlist(Hash peer) {
    661661        // Temporary reason, until the job finishes
    662         _context.shitlist().shitlistRouterForever(peer, "IP Blocklisted");
     662        _context.shitlist().shitlistRouterForever(peer, "IP Banned");
    663663        if (! "true".equals( _context.getProperty(PROP_BLOCKLIST_DETAIL, "true")))
    664664            return;
     
    683683            _peer = p;
    684684        }
    685         public String getName() { return "Shitlist Peer Forever"; }
     685        public String getName() { return "Ban Peer by IP"; }
    686686        public void runJob() {
    687687            shitlistForever(_peer);
     
    736736                                reason = reason + '.';
    737737                        }
    738                         reason = reason + " blocklisted by entry \"" + buf + "\"";
     738                        reason = reason + " banned by " + BLOCKLIST_FILE_DEFAULT + " entry \"" + buf + "\"";
    739739                        if (_log.shouldLog(Log.WARN))
    740740                            _log.warn("Shitlisting " + peer + " " + reason);
     
    756756    /** write directly to the stream so we don't OOM on a huge list */
    757757    public void renderStatusHTML(Writer out) throws IOException {
    758         out.write("<h2>IP Blocklist</h2>");
     758        out.write("<h2>Banned IPs</h2>");
    759759        Set singles = new TreeSet();
    760760        singles.addAll(_singleIPBlocklist);
  • router/java/src/net/i2p/router/Router.java

    r8ea279f r631a367b  
    772772    }
    773773   
    774     private static int MAX_MSG_LENGTH = 120;
     774    //private static int MAX_MSG_LENGTH = 120;
    775775    private static final void appendLogMessage(StringBuilder buf, String msg) {
    776776        // disable this code for the moment because i think it
    777777        // looks ugly (on the router console)
    778         if (true) {
     778        //if (true) {
    779779            buf.append(msg);
    780780            return;
    781         }
     781        //}
     782/******
    782783        if (msg.length() < MAX_MSG_LENGTH) {
    783784            buf.append(msg);
     
    811812            len = msg.length();
    812813        }
     814******/
    813815    }
    814816   
    815817    /** main-ish method for testing appendLogMessage */
     818/******
    816819    private static final void testAppendLog() {
    817820        StringBuilder buf = new StringBuilder(1024);
     
    847850        buf.setLength(0);
    848851    }
     852******/
    849853   
    850854    public static final int EXIT_GRACEFUL = 2;
  • router/java/src/net/i2p/router/RouterContext.java

    r8ea279f r631a367b  
    77import net.i2p.I2PAppContext;
    88import net.i2p.data.Hash;
    9 import net.i2p.router.admin.AdminManager;
    109import net.i2p.router.client.ClientManagerFacadeImpl;
    1110import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade;
     
    3635public class RouterContext extends I2PAppContext {
    3736    private Router _router;
    38     private AdminManager _adminManager;
    3937    private ClientManagerFacade _clientManagerFacade;
    4038    private ClientMessagePool _clientMessagePool;
     
    9290    }
    9391    public void initAll() {
    94         //_adminManager = new AdminManager(this);
    9592        if ("false".equals(getProperty("i2p.dummyClientFacade", "false")))
    9693            _clientManagerFacade = new ClientManagerFacadeImpl(this);
     
    150147    public Hash routerHash() { return _router.getRouterInfo().getIdentity().getHash(); }
    151148
    152     /**
    153      * Controls a basic admin interface
    154      *
    155      */
    156     public AdminManager adminManager() { return _adminManager; }
    157149    /**
    158150     * How are we coordinating clients for the router?
  • router/java/src/net/i2p/router/Shitlist.java

    r8ea279f r631a367b  
    6666            getTiming().setStartAfter(ctx.clock().now() + SHITLIST_CLEANER_START_DELAY);
    6767        }
    68         public String getName() { return "Cleanup shitlist"; }
     68        public String getName() { return "Expire banned peers"; }
    6969        public void runJob() {
    7070            _toUnshitlist.clear();
     
    254254    public void renderStatusHTML(Writer out) throws IOException {
    255255        StringBuilder buf = new StringBuilder(1024);
    256         buf.append("<h2>Shitlist</h2>");
     256        buf.append("<h2>Banned Peers</h2>");
    257257        Map<Hash, Entry> entries = new TreeMap(new HashComparator());
    258258       
     
    274274                buf.append(entry.cause);
    275275            }
    276             buf.append(" (<a href=\"configpeer.jsp?peer=").append(key.toBase64()).append("#unsh\">unshitlist now</a>)");
     276            buf.append(" (<a href=\"configpeer.jsp?peer=").append(key.toBase64()).append("#unsh\">unban now</a>)");
    277277            buf.append("</li>\n");
    278278        }
  • router/java/src/net/i2p/router/StatisticsManager.java

    r8ea279f r631a367b  
    122122            //includeRate("jobQueue.jobRunSlow", stats, new long[] { 10*60*1000l, 60*60*1000l });
    123123            //includeRate("crypto.elGamal.encrypt", stats, new long[] { 60*60*1000 });
    124             includeRate("tunnel.participatingTunnels", stats, new long[] { 60*60*1000 });
     124            // total event count can be used to track uptime
     125            boolean hideTotals = ! RouterVersion.VERSION.equals("0.7.6");
     126            includeRate("tunnel.participatingTunnels", stats, new long[] { 60*60*1000 }, hideTotals);
    125127            //includeRate("tunnel.testSuccessTime", stats, new long[] { 10*60*1000l });
    126128            //includeRate("client.sendAckTime", stats, new long[] { 60*60*1000 }, true);
  • router/java/src/net/i2p/router/peermanager/ProfileOrganizerRenderer.java

    r8ea279f r631a367b  
    139139            buf.append("</td><td align=\"right\">").append(num(prof.getIntegrationValue()));
    140140            buf.append("</td><td align=\"center\">");
    141             if (_context.shitlist().isShitlisted(peer)) buf.append("Shitlist");
     141            if (_context.shitlist().isShitlisted(peer)) buf.append("Banned");
    142142            if (prof.getIsFailing()) buf.append(" Failing");
    143143            if (_context.commSystem().wasUnreachable(peer)) buf.append(" Unreachable");
Note: See TracChangeset for help on using the changeset viewer.