Changeset 2f72f5c


Ignore:
Timestamp:
May 26, 2008 1:13:26 PM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ffc67d1
Parents:
955e782
Message:
  • Throttle: Set a default router.maxParticipatingTunnels = 3000 (was none)
  • Stats: Add a fake uptime if not publishing stats, to get participating tunnels
  • build.xml:
    • Add an updateSmall target which includes only the essentials
    • Clean up the build file some
    • Remove empty eepsite/ and subdirs from i2pupdate.zip
  • configtunnels.jsp: Add warning
  • i2psnark: Catch a bencode exception (bad peer from tracker) earlier
  • i2psnark-standalone: Fix exception http://forum.i2p/viewtopic.php?p=12217
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java

    r955e782 r2f72f5c  
    119119            _config.setProperty(PROP_UPLOADERS_TOTAL, "" + Snark.MAX_TOTAL_UPLOADERS);
    120120        if (!_config.containsKey(PROP_UPBW_MAX)) {
    121             if (_context instanceof RouterContext)
    122                 _config.setProperty(PROP_UPBW_MAX, "" + (((RouterContext)_context).bandwidthLimiter().getOutboundKBytesPerSecond() / 2));
    123             else
     121            try {
     122                if (_context instanceof RouterContext)
     123                    _config.setProperty(PROP_UPBW_MAX, "" + (((RouterContext)_context).bandwidthLimiter().getOutboundKBytesPerSecond() / 2));
     124                else
     125                    _config.setProperty(PROP_UPBW_MAX, "" + DEFAULT_MAX_UP_BW);
     126            } catch (NoClassDefFoundError ncdfe) {
    124127                _config.setProperty(PROP_UPBW_MAX, "" + DEFAULT_MAX_UP_BW);
     128            }
    125129        }
    126130        if (!_config.containsKey(PROP_DIR))
  • apps/i2psnark/java/src/org/klomp/snark/TrackerInfo.java

    r955e782 r2f72f5c  
    9696    while (it.hasNext())
    9797      {
    98         PeerID peerID = new PeerID(((BEValue)it.next()).getMap());
     98        PeerID peerID;
     99        try {
     100            peerID = new PeerID(((BEValue)it.next()).getMap());
     101        } catch (InvalidBEncodingException ibe) {
     102            // don't let one bad entry spoil the whole list
     103            Snark.debug("Discarding peer from list: " + ibe, Snark.ERROR);
     104            continue;
     105        }
    99106        peers.add(new Peer(peerID, my_id, metainfo));
    100107      }
  • apps/routerconsole/jsp/configtunnels.jsp

    r955e782 r2f72f5c  
    2626 <i><jsp:getProperty name="formhandler" property="notices" /></i>
    2727 
     28 <p><i>
     29 NOTE: The default settings work for most people.
     30 There is a fundamental tradeoff between anonymity and performance.
     31 Tunnels longer than 3 hops (for example 2 hops + 0-2 hops, 3 hops + 0-1 hops, 3 hops + 0-2 hops),
     32 or a high quantity + backup quantity, may severely reduce performance or reliability.
     33 High CPU and/or high outbound bandwidth usage may result.
     34 Change these settings with care, and adjust them if you have problems.
     35 </i></p>
     36
    2837 <form action="configtunnels.jsp" method="POST">
    2938 <% String prev = System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce");
  • build.xml

    r955e782 r2f72f5c  
    1010        <echo message="  updater:   tar the built i2p specific files into an i2pupdate.zip (extracts safely over existing installs)" />
    1111        <echo message="  updaterWithJetty:   tar the built i2p specific files and jetty into an i2pupdate.zip (extracts safely over existing installs)" />
     12        <echo message="  updaterSmall:   updater with the essentials only - no SAM, i2psnark, SusiMail, SusiDNS, news.xml, or history.txt" />
    1213        <echo message="  distclean: clean up all derived files" />
    1314        <echo message="  syndie:    generate a standalone syndie install" />
     
    1819    </target>
    1920    <target name="build" depends="builddep, jar, buildWEB" />
     21    <target name="buildSmall" depends="builddepSmall, jarSmall, buildWEB" />
    2022    <target name="buildclean" depends="distclean, build" />
    21     <target name="builddep">
     23    <target name="builddep" depends="builddepSmall">
    2224        <!-- build *everything* here, but only once -->
     25        <ant dir="apps/sam/java/" target="jar" />
     26        <ant dir="apps/susimail/" target="war" />
     27        <ant dir="apps/susidns/src" target="all" />
     28        <ant dir="apps/i2psnark/java/" target="standalone" />
     29    </target>
     30    <target name="builddepSmall">
    2331        <ant dir="core/java/" target="jar" />
    2432        <ant dir="router/java/" target="jar" />
     
    2634        <ant dir="apps/streaming/java/" target="jar" />
    2735        <ant dir="apps/i2ptunnel/java/" target="jar" />
    28         <ant dir="apps/sam/java/" target="jar" />
    2936        <ant dir="apps/systray/java/" target="jar" />
    3037        <ant dir="apps/routerconsole/java/" target="jar" />
    3138        <ant dir="apps/addressbook/" target="war" />
    32         <ant dir="apps/susimail/" target="war" />
    33         <ant dir="apps/susidns/src" target="all" />
    34         <!-- <ant dir="apps/syndie/java/" target="jar" /> -->
    35         <ant dir="apps/i2psnark/java/" target="standalone" />
    3639    </target>
    3740    <target name="buildrouter">
     
    9295    </target>
    9396    <target name="compile" />
    94     <target name="jar" depends="compile" >
     97    <target name="jar" depends="jarSmall" >
     98        <copy file="apps/sam/java/build/sam.jar" todir="build/" />
     99        <copy file="apps/susimail/susimail.war" todir="build/" />
     100        <copy file="apps/susidns/src/susidns.war" todir="build/" />
     101        <copy file="apps/i2psnark/i2psnark.war" todir="build/" />
     102        <copy file="apps/i2psnark/java/build/i2psnark.jar" todir="build/" />
     103    </target>
     104    <target name="jarSmall" depends="compile" >
    95105        <copy file="core/java/build/i2p.jar" todir="build/" />
    96106        <copy file="router/java/build/router.jar" todir="build/" />
     
    99109        <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
    100110        <copy file="apps/i2ptunnel/java/build/i2ptunnel.war" todir="build/" />
    101         <copy file="apps/sam/java/build/sam.jar" todir="build/" />
    102111        <copy file="apps/systray/java/build/systray.jar" todir="build/" />
    103112        <copy file="installer/lib/jbigi/jbigi.jar" todir="build" />
    104113        <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
    105         <copy file="apps/susimail/susimail.war" todir="build/" />
    106         <copy file="apps/susidns/src/susidns.war" todir="build/" />
    107         <!--
    108         <copy file="apps/syndie/syndie.war" todir="build/" />
    109         <copy file="apps/syndie/java/build/syndie.jar" todir="build/" />
    110         <copy file="apps/syndie/java/build/sucker.jar" todir="build/" />
    111         -->
    112         <copy file="apps/i2psnark/i2psnark.war" todir="build/" />
    113         <copy file="apps/i2psnark/java/build/i2psnark.jar" todir="build/" />
    114         <copy file="apps/jdom/jdom.jar" todir="build/" />
    115         <copy file="apps/rome/rome-0.8.jar" todir="build/" />
    116114    </target>
    117115    <target name="javadoc">
     
    305303        <zip destfile="i2pupdate.zip" basedir="pkg-temp" />
    306304    </target>
     305    <target name="updaterSmall" depends="prepupdateSmall">
     306        <zip destfile="i2pupdate.zip" basedir="pkg-temp" />
     307    </target>
    307308    <target name="updateTest" depends="prepupdate">
    308309        <ant dir="core/java/" target="jarTest" />   
     
    310311        <zip destfile="i2pupdate.zip" basedir="pkg-temp" />
    311312    </target>
    312     <target name="prepupdate" depends="distclean, build">
     313    <target name="prepupdate" depends="distclean, build, prepupdateSmall">
     314        <copy file="build/sam.jar" todir="pkg-temp/lib/" />
     315        <copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
     316        <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
     317        <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
     318        <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
     319        <copy file="history.txt" todir="pkg-temp/" />
     320        <mkdir dir="pkg-temp/docs/" />
     321        <copy file="news.xml" todir="pkg-temp/docs/" />
     322    </target>
     323    <target name="prepupdateSmall" depends="distclean, buildSmall">
    313324        <delete dir="pkg-temp" />
    314325        <copy file="build/i2p.jar" todir="pkg-temp/lib/" />
     
    316327        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
    317328        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
    318         <copy file="build/sam.jar" todir="pkg-temp/lib/" />
    319329        <copy file="build/router.jar" todir="pkg-temp/lib/" />
    320330        <copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
    321         <!-- <copy file="build/sucker.jar" todir="pkg-temp/lib" /> -->
    322         <copy file="build/i2psnark.jar" todir="pkg-temp/lib" />
    323        
    324         <!--<copy file="installer/resources/runplain.sh" todir="pkg-temp/" />-->
    325        
    326331        <copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
    327332        <copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
    328333        <copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
    329         <copy file="build/susimail.war" todir="pkg-temp/webapps/" />
    330         <copy file="build/susidns.war" todir="pkg-temp/webapps/" />
    331         <!-- <copy file="build/syndie.war" todir="pkg-temp/webapps/" /> -->
    332         <copy file="build/i2psnark.war" todir="pkg-temp/webapps/" />
    333         <!-- <copy file="apps/i2psnark/java/build/launch-i2psnark.jar" todir="pkg-temp/" /> -->
    334         <copy file="apps/i2psnark/jetty-i2psnark.xml" todir="pkg-temp/" />
    335         <copy file="history.txt" todir="pkg-temp/" />
    336         <mkdir dir="pkg-temp/docs/" />
    337         <copy file="news.xml" todir="pkg-temp/docs/" />
    338         <!--
    339         <copy file="installer/resources/dnf-header.ht" todir="pkg-temp/docs/" />
    340         <copy file="installer/resources/dnfp-header.ht" todir="pkg-temp/docs/" />
    341         <copy file="installer/resources/dnfb-header.ht" todir="pkg-temp/docs/" />
    342         <copy file="installer/resources/dnfh-header.ht" todir="pkg-temp/docs/" />
    343         <copy file="installer/resources/ahelper-conflict-header.ht" todir="pkg-temp/docs/" />
    344         -->
    345        
    346         <!-- polecat: please put your modified toolbar.html in installer/resources/toolbar.html
    347              and uncomment the following -->
    348         <!-- <copy file="installer/resources/toolbar.html" todir="pkg-temp/docs/" /> -->
    349        
    350         <!--
    351         <mkdir dir="pkg-temp/docs/themes/" />
    352         <copy todir="pkg-temp/docs/themes/" >
    353           <fileset dir="installer/resources/themes/" />
    354         </copy>
    355         -->
    356        
    357         <!-- the addressbook handles this for updates -->
    358         <!-- <copy file="hosts.txt" todir="pkg-temp/" /> -->
    359         <mkdir dir="pkg-temp/eepsite" />
    360         <mkdir dir="pkg-temp/eepsite/webapps" />
    361         <mkdir dir="pkg-temp/eepsite/cgi-bin" />
    362         <!--
    363         <mkdir dir="pkg-temp/syndie" />
    364         <mkdir dir="pkg-temp/syndie/archive" />
    365         <mkdir dir="pkg-temp/syndie/archive/ovpBy2mpO1CQ7deYhQ1cDGAwI6pQzLbWOm1Sdd0W06c=" />
    366         <copy file="installer/resources/blogMeta.snm" tofile="pkg-temp/syndie/archive/ovpBy2mpO1CQ7deYhQ1cDGAwI6pQzLbWOm1Sdd0W06c=/meta.snm" />
    367         <copy file="installer/resources/blogPost.snd" tofile="pkg-temp/syndie/archive/ovpBy2mpO1CQ7deYhQ1cDGAwI6pQzLbWOm1Sdd0W06c=/1132012800001.snd" />
    368         -->
    369334    </target>
    370335    <target name="prepjupdate" depends="prepupdate, buildWEB">
  • history.txt

    r955e782 r2f72f5c  
     12008-05-26 zzz
     2    * Throttle: Set a default router.maxParticipatingTunnels = 3000 (was none)
     3    * Stats: Add a fake uptime if not publishing stats, to get participating tunnels
     4    * build.xml:
     5      - Add an updateSmall target which includes only the essentials
     6      - Clean up the build file some
     7      - Remove empty eepsite/ and subdirs from i2pupdate.zip
     8    * configtunnels.jsp: Add warning
     9    * i2psnark: Catch a bencode exception (bad peer from tracker) earlier
     10    * i2psnark-standalone: Fix exception http://forum.i2p/viewtopic.php?p=12217
     11
     122008-05-22 welterde
     13    * Change jetty download location in build script
     14
    1152008-05-20 zzz
    216    * Reachability:
  • router/java/src/net/i2p/router/RouterThrottleImpl.java

    r955e782 r2f72f5c  
    3333   
    3434    private static final String PROP_MAX_TUNNELS = "router.maxParticipatingTunnels";
     35    private static final String DEFAULT_MAX_TUNNELS = "3000";  // Unless share BW > 300KBps, BW limit will kick in first
    3536    private static final String PROP_DEFAULT_KBPS_THROTTLE = "router.defaultKBpsThrottle";
    3637
     
    188189        }
    189190       
    190         String maxTunnels = _context.getProperty(PROP_MAX_TUNNELS);
     191        String maxTunnels = _context.getProperty(PROP_MAX_TUNNELS, DEFAULT_MAX_TUNNELS);
    191192        if (maxTunnels != null) {
    192193            try {
  • router/java/src/net/i2p/router/RouterVersion.java

    r955e782 r2f72f5c  
    1818    public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $";
    1919    public final static String VERSION = "0.6.1.33";
    20     public final static long BUILD = 7;
     20    public final static long BUILD = 8;
    2121    public static void main(String args[]) {
    2222        System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
  • router/java/src/net/i2p/router/StatisticsManager.java

    r955e782 r2f72f5c  
    206206            _log.debug("Publishing peer rankings");
    207207        } else {
     208            // So that we will still get build requests
     209            stats.setProperty("stat_uptime", "90m");
    208210            _log.debug("Not publishing peer rankings");
    209211        }
Note: See TracChangeset for help on using the changeset viewer.