Changeset 2304e9b for apps


Ignore:
Timestamp:
Mar 29, 2019 12:54:44 PM (12 months ago)
Author:
zab2 <zab2@…>
Branches:
master
Children:
fc9ad32
Parents:
956a714
Message:

prettier html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/DefinitionParser.java

    r956a714 r2304e9b  
    1616
    1717    /**
     18     * <p>
    1819     * Processes an array of String objects containing the human-readable definition of
    1920     * the filter.
    20      *
     21     * </p>
     22     * <p>
    2123     * The definition of a filter is a list of Strings.  Each line can represent one of
    2224     * these items:
    23      *
    24      * * definition of a default threshold to apply to any remote destinations not
    25      *   listed in this file or any of the referenced files
    26      * * definition of a threshold to apply to a specific remote destination
    27      * * definition of a threshold to apply to remote destinations listed in a file
    28      * * definition of a threshold that if breached will cause the offending remote
    29      *   destination to be recorded in a specified file
    30      *
     25     * </p>
     26     * <ul>
     27     * <li>definition of a default threshold to apply to any remote destinations not
     28     *   listed in this file or any of the referenced files</li>
     29     * <li>definition of a threshold to apply to a specific remote destination</li>
     30     * <li>definition of a threshold to apply to remote destinations listed in a file</li>
     31     * <li>definition of a threshold that if breached will cause the offending remote
     32     *   destination to be recorded in a specified file</li>
     33     * </ul>
     34     * <p>
    3135     * The order of the definitions matters.  The first threshold for a given destination
    3236     * (whether explicit or listed in a file) overrides any future thresholds for the
    3337     * same destination, whether explicit or listed in a file.
    34      *
     38     * </p>
     39     * <p>
    3540     * Thresholds:
    36      *
     41     * </p>
     42     * <p>
    3743     * A threshold is defined by the number of connection attempts a remote destination is
    3844     * permitted to perform over a specified number of minutes before a "breach" occurs.
     
    4046     * destination is allowed to make 14 connection attempts over a 5 minute period,  If
    4147     * it makes one more attempt within the same period, the threshold will be breached.
    42      *
     48     * </p>
     49     * <p>
    4350     * The threshold format can be one of the following:
    44      *
     51     * </p>
    4552     * <ul>
    4653     * <li>Numeric definition of number of connections over number minutes - "15/5",
     
    5360     * </ul>
    5461     *
    55      * Default threshold
    56      *
    5762     * The default threshold applies to any remote destinations that are not explicitly
    5863     * listed in the definition or in any of the referenced files.  To set a default
     
    6570     * </pre>
    6671     *
    67      * Explicit thresholds
    68      *
    6972     * Explicit thresholds are applied to a remote destination listed in the definition itself.
    7073     * Examples:
     
    7679     * </pre>
    7780     *
    78      * Thresholds for destinations listed in a file
    79      *
    8081     * For convenience it is possible to maintain a list of destinations in a file and define
    8182     * a threshold for all of them in bulk.  Examples:
     
    8788     * </pre>
    8889     *
    89      * Recorders
    90      *
    9190     * Recorders keep track of connection attempts made by a remote destination, and if that
    9291     * breaches a certain threshold, that destination gets recorded in a given file.  Examples:
     
    9695     * recorder 60/5 /path/very_aggressive.txt
    9796     * </pre>
    98      *
     97     * <p>
    9998     * It is possible to use a recorder to record aggressive destinations to a given file,
    10099     * and then use that same file to throttle them.  For example, the following snippet will
     
    102101     * destination exceeds 30 attempts per 5 minutes it gets throttled down to 15 attempts per
    103102     * 5 minutes:
    104      *
     103     * </p>
    105104     * <pre>
    106105     * # by default there are no limits
     
    111110     * 15/5 file /path/throttled.txt
    112111     * </pre>
    113      *
     112     * <p>
    114113     * It is possible to use a recorder in one tunnel that writes to a file that throttles
    115114     * another tunnel.  It is possible to reuse the same file with destinations in multiple
    116115     * tunnels.  And of course, it is possible to edit these files by hand.
    117      *
     116     * </p>
     117     * <p>
    118118     * Here is an example filter definition that applies some throttling by default, no throttling
    119119     * for destinations in the file "friends.txt", forbids any connections from destinations
    120120     * in the file "enemies.txt" and records any aggressive behavior in a file called
    121121     * "suspicious.txt":
    122      *
     122     * </p>
    123123     * <pre>
    124124     * default 15/5
Note: See TracChangeset for help on using the changeset viewer.