Compare commits

..

22 Commits

Author SHA1 Message Date
zzz
cffcbe5f94 update news and version numbers to .32 2008-03-07 15:08:26 +00:00
zzz
c46b06fb81 Fix netdb.knownLeaseSets count reported by floodfill routers 2008-03-01 16:13:41 +00:00
zzz
a7397879aa correct instructions 2008-02-29 16:50:37 +00:00
zzz
9b86da7ce5 upcoming .32 news 2008-02-29 14:51:24 +00:00
zzz
c68977ca8c * i2ptunnel: Add 3-hop option to edit.jsp to match configtunnels.jsp
* i2psnark: Remove orion and gaytorrents from default tracker list
    * Remove orion from jump list and from eepsite_index.html
    * Jbigi: Change jbigi version to 4.2.2 in build scripts - tested by amiga
    * Capitalize OutboundMessageDistributor job name
    * TunnelPool: Add a warning if all tunnels are backlogged
2008-02-27 15:18:32 +00:00
zzz
bc7bd628db * Reintroduce NTCP backlog pushback, with switch back to
previous tunnel when no longer backlogged
    * Catch an nio exception in an NTCP logging statement if loglevel is WARN
    * IRC Proxy: terminate all messages with \r\n (thanks TrivialPursuit!)
2008-02-26 19:33:11 +00:00
zzz
bc7ab39131 +x the c build files 2008-02-21 14:53:50 +00:00
zzz
100163e03b * Raise inbound default bandwidth to 32KBps
* Fix config.jsp that showed 0KBps share bandwidth by default
2008-02-21 14:05:33 +00:00
zzz
49c02f13b2 -5 2008-02-19 15:39:44 +00:00
zzz
40f072e25e Display capabilities on profiles.jsp 2008-02-19 15:32:39 +00:00
zzz
918b1acb8f * Tunnels: Enforce max tunnel length of 8, catch an index error
http://forum.i2p/viewtopic.php?t=2561
2008-02-19 15:28:41 +00:00
zzz
bc16078e3f Remove some stats from netDb, effective in .32 2008-02-19 15:22:46 +00:00
zzz
4a8dbd0634 * Addressbook: Disallow '--' in host names except in IDN,
add some reserved host names
2008-02-19 15:21:58 +00:00
zzz
38c0184f95 clarify the i2ptunnel edit page dropdowns 2008-02-19 15:20:42 +00:00
zzz
68829ddb99 merge of 'cc7dee6f711dd10db6c1f42af8dc7ba6f6b0002d'
and 'dc2fa2d01da4c7b3733d4dadb85d757d592c1fa6'
2008-02-19 15:16:53 +00:00
zzz
19089bd6a7 * Fix race in TunnelDispatcher which caused
participating tunnel count to seesaw -
      should increase network capacity
    * Leave participating tunnels in 10s batches for efficiency
    * Update participating tunnel ratestat when leaving a tunnel too,
      to generate a smoother graph
    * Fix tunnel.participatingMessageCount stat to include all
      participating tunnels, not just outbound endpoints
    * Simplify Expire Tunnel job name
2008-02-16 16:25:21 +00:00
zzz
69cc0afd1b * PersistentDataStore: Write out 300 records every 10 min
rather than 1 every 10 sec;
      Don't store leasesets to disk or read them in
    * Combine rates for pools with the same length setting
      in the new tunnel build algorithm
    * Clarify a log message in the UpdateHandler
2008-02-13 21:42:09 +00:00
zzz
d2f3a262db * Make graphs clickable to get larger graphs
* Change SimpleTimer CRIT to a WARN, increase threshold
    * Checklist update
2008-02-13 11:49:24 +00:00
dev
c1703b872d probably fixed a bug in udp-transport 2008-02-11 20:45:33 +00:00
dev
f7b0e8181b merge of '1d753ff05fc1c942cf6ce8feeadfaa577bff27ab'
and 'e20c0075f57440edcebaac0009a0ef0327d563cc'
2008-02-11 20:38:47 +00:00
zzz
43f2695901 * Add new tunnel build algorithm (preliminary)
* Change NTCP backlogged message from error to warning
    * Checklist updates
2008-02-10 18:29:21 +00:00
dev
0ed29573a7 minor 2008-02-09 13:18:22 +00:00
40 changed files with 533 additions and 163 deletions

View File

@@ -169,7 +169,16 @@ public class AddressBook {
(! host.startsWith("-")) &&
(! host.endsWith("-.i2p")) &&
host.indexOf("..") < 0 &&
// IDN - basic check, not complete validation
(host.indexOf("--") < 0 || host.startsWith("xn--") || host.indexOf(".xn--") > 0) &&
host.replaceAll("[a-z0-9.-]", "").length() == 0 &&
// some reserved names that may be used for local configuration someday
(! host.equals("proxy.i2p")) &&
(! host.equals("router.i2p")) &&
(! host.equals("console.i2p")) &&
(! host.endsWith(".proxy.i2p")) &&
(! host.endsWith(".router.i2p")) &&
(! host.endsWith(".console.i2p")) &&
dest.length() == 516 &&
dest.endsWith("AAAA") &&

View File

@@ -595,9 +595,9 @@ public class SnarkManager implements Snark.CompleteListener {
private static final String DEFAULT_TRACKERS[] = {
"Postman", "http://YRgrgTLGnbTq2aZOZDJQ~o6Uk5k6TK-OZtx0St9pb0G-5EGYURZioxqYG8AQt~LgyyI~NCj6aYWpPO-150RcEvsfgXLR~CxkkZcVpgt6pns8SRc3Bi-QSAkXpJtloapRGcQfzTtwllokbdC-aMGpeDOjYLd8b5V9Im8wdCHYy7LRFxhEtGb~RL55DA8aYOgEXcTpr6RPPywbV~Qf3q5UK55el6Kex-6VCxreUnPEe4hmTAbqZNR7Fm0hpCiHKGoToRcygafpFqDw5frLXToYiqs9d4liyVB-BcOb0ihORbo0nS3CLmAwZGvdAP8BZ7cIYE3Z9IU9D1G8JCMxWarfKX1pix~6pIA-sp1gKlL1HhYhPMxwyxvuSqx34o3BqU7vdTYwWiLpGM~zU1~j9rHL7x60pVuYaXcFQDR4-QVy26b6Pt6BlAZoFmHhPcAuWfu-SFhjyZYsqzmEmHeYdAwa~HojSbofg0TMUgESRXMw6YThK1KXWeeJVeztGTz25sL8AAAA.i2p/announce.php=http://tracker.postman.i2p/"
, "eBook", "http://E71FRom6PZNEqTN2Lr8P-sr23b7HJVC32KoGnVQjaX6zJiXwhJy2HsXob36Qmj81TYFZdewFZa9mSJ533UZgGyQkXo2ahctg82JKYZfDe5uDxAn1E9YPjxZCWJaFJh0S~UwSs~9AZ7UcauSJIoNtpxrtbmRNVFLqnkEDdLZi26TeucfOmiFmIWnVblLniWv3tG1boE9Abd-6j3FmYVrRucYuepAILYt6katmVNOk6sXmno1Eynrp~~MBuFq0Ko6~jsc2E2CRVYXDhGHEMdt-j6JUz5D7S2RIVzDRqQyAZLKJ7OdQDmI31przzmne1vOqqqLC~1xUumZVIvF~yOeJUGNjJ1Vx0J8i2BQIusn1pQJ6UCB~ZtZZLQtEb8EPVCfpeRi2ri1M5CyOuxN0V5ekmPHrYIBNevuTCRC26NP7ZS5VDgx1~NaC3A-CzJAE6f1QXi0wMI9aywNG5KGzOPifcsih8eyGyytvgLtrZtV7ykzYpPCS-rDfITncpn5hliPUAAAA.i2p/pub/bt/announce.php=http://de-ebook-archiv.i2p/pub/bt/"
, "Gaytorrents", "http://uxPWHbK1OIj9HxquaXuhMiIvi21iK0~ZiG9d8G0840ZXIg0r6CbiV71xlsqmdnU6wm0T2LySriM0doW2gUigo-5BNkUquHwOjLROiETnB3ZR0Ml4IGa6QBPn1aAq2d9~g1r1nVjLE~pcFnXB~cNNS7kIhX1d6nLgYVZf0C2cZopEow2iWVUggGGnAA9mHjE86zLEnTvAyhbAMTqDQJhEuLa0ZYSORqzJDMkQt90MV4YMjX1ICY6RfUSFmxEqu0yWTrkHsTtRw48l~dz9wpIgc0a0T9C~eeWvmBFTqlJPtQZwntpNeH~jF7nlYzB58olgV2HHFYpVYD87DYNzTnmNWxCJ5AfDorm6AIUCV2qaE7tZtI1h6fbmGpGlPyW~Kw5GXrRfJwNvr6ajwAVi~bPVnrBwDZezHkfW4slOO8FACPR28EQvaTu9nwhAbqESxV2hCTq6vQSGjuxHeOuzBOEvRWkLKOHWTC09t2DbJ94FSqETmZopTB1ukEmaxRWbKSIaAAAA.i2p/announce.php=http://gaytorrents.i2p/"
// , "Gaytorrents", "http://uxPWHbK1OIj9HxquaXuhMiIvi21iK0~ZiG9d8G0840ZXIg0r6CbiV71xlsqmdnU6wm0T2LySriM0doW2gUigo-5BNkUquHwOjLROiETnB3ZR0Ml4IGa6QBPn1aAq2d9~g1r1nVjLE~pcFnXB~cNNS7kIhX1d6nLgYVZf0C2cZopEow2iWVUggGGnAA9mHjE86zLEnTvAyhbAMTqDQJhEuLa0ZYSORqzJDMkQt90MV4YMjX1ICY6RfUSFmxEqu0yWTrkHsTtRw48l~dz9wpIgc0a0T9C~eeWvmBFTqlJPtQZwntpNeH~jF7nlYzB58olgV2HHFYpVYD87DYNzTnmNWxCJ5AfDorm6AIUCV2qaE7tZtI1h6fbmGpGlPyW~Kw5GXrRfJwNvr6ajwAVi~bPVnrBwDZezHkfW4slOO8FACPR28EQvaTu9nwhAbqESxV2hCTq6vQSGjuxHeOuzBOEvRWkLKOHWTC09t2DbJ94FSqETmZopTB1ukEmaxRWbKSIaAAAA.i2p/announce.php=http://gaytorrents.i2p/"
, "NickyB", "http://9On6d3cZ27JjwYCtyJJbowe054d5tFnfMjv4PHsYs-EQn4Y4mk2zRixatvuAyXz2MmRfXG-NAUfhKr0KCxRNZbvHmlckYfT-WBzwwpiMAl0wDFY~Pl8cqXuhfikSG5WrqdPfDNNIBuuznS0dqaczf~OyVaoEOpvuP3qV6wKqbSSLpjOwwAaQPHjlRtNIW8-EtUZp-I0LT45HSoowp~6b7zYmpIyoATvIP~sT0g0MTrczWhbVTUZnEkZeLhOR0Duw1-IRXI2KHPbA24wLO9LdpKKUXed05RTz0QklW5ROgR6TYv7aXFufX8kC0-DaKvQ5JKG~h8lcoHvm1RCzNqVE-2aiZnO2xH08H-iCWoLNJE-Td2kT-Tsc~3QdQcnEUcL5BF-VT~QYRld2--9r0gfGl-yDrJZrlrihHGr5J7ImahelNn9PpkVp6eIyABRmJHf2iicrk3CtjeG1j9OgTSwaNmEpUpn4aN7Kx0zNLdH7z6uTgCGD9Kmh1MFYrsoNlTp4AAAA.i2p/bittorrent/announce.php=http://nickyb.i2p/bittorrent/"
, "Orion", "http://gKik1lMlRmuroXVGTZ~7v4Vez3L3ZSpddrGZBrxVriosCQf7iHu6CIk8t15BKsj~P0JJpxrofeuxtm7SCUAJEr0AIYSYw8XOmp35UfcRPQWyb1LsxUkMT4WqxAT3s1ClIICWlBu5An~q-Mm0VFlrYLIPBWlUFnfPR7jZ9uP5ZMSzTKSMYUWao3ejiykr~mtEmyls6g-ZbgKZawa9II4zjOy-hdxHgP-eXMDseFsrym4Gpxvy~3Fv9TuiSqhpgm~UeTo5YBfxn6~TahKtE~~sdCiSydqmKBhxAQ7uT9lda7xt96SS09OYMsIWxLeQUWhns-C~FjJPp1D~IuTrUpAFcVEGVL-BRMmdWbfOJEcWPZ~CBCQSO~VkuN1ebvIOr9JBerFMZSxZtFl8JwcrjCIBxeKPBmfh~xYh16BJm1BBBmN1fp2DKmZ2jBNkAmnUbjQOqWvUcehrykWk5lZbE7bjJMDFH48v3SXwRuDBiHZmSbsTY6zhGY~GkMQHNGxPMMSIAAAA.i2p/bt/announce.php=http://orion.i2p/bt/"
// , "Orion", "http://gKik1lMlRmuroXVGTZ~7v4Vez3L3ZSpddrGZBrxVriosCQf7iHu6CIk8t15BKsj~P0JJpxrofeuxtm7SCUAJEr0AIYSYw8XOmp35UfcRPQWyb1LsxUkMT4WqxAT3s1ClIICWlBu5An~q-Mm0VFlrYLIPBWlUFnfPR7jZ9uP5ZMSzTKSMYUWao3ejiykr~mtEmyls6g-ZbgKZawa9II4zjOy-hdxHgP-eXMDseFsrym4Gpxvy~3Fv9TuiSqhpgm~UeTo5YBfxn6~TahKtE~~sdCiSydqmKBhxAQ7uT9lda7xt96SS09OYMsIWxLeQUWhns-C~FjJPp1D~IuTrUpAFcVEGVL-BRMmdWbfOJEcWPZ~CBCQSO~VkuN1ebvIOr9JBerFMZSxZtFl8JwcrjCIBxeKPBmfh~xYh16BJm1BBBmN1fp2DKmZ2jBNkAmnUbjQOqWvUcehrykWk5lZbE7bjJMDFH48v3SXwRuDBiHZmSbsTY6zhGY~GkMQHNGxPMMSIAAAA.i2p/bt/announce.php=http://orion.i2p/bt/"
// , "anonymity", "http://8EoJZIKrWgGuDrxA3nRJs1jsPfiGwmFWL91hBrf0HA7oKhEvAna4Ocx47VLUR9retVEYBAyWFK-eZTPcvhnz9XffBEiJQQ~kFSCqb1fV6IfPiV3HySqi9U5Caf6~hC46fRd~vYnxmaBLICT3N160cxBETqH3v2rdxdJpvYt8q4nMk9LUeVXq7zqCTFLLG5ig1uKgNzBGe58iNcsvTEYlnbYcE930ABmrzj8G1qQSgSwJ6wx3tUQNl1z~4wSOUMan~raZQD60lRK70GISjoX0-D0Po9WmPveN3ES3g72TIET3zc3WPdK2~lgmKGIs8GgNLES1cXTolvbPhdZK1gxddRMbJl6Y6IPFyQ9o4-6Rt3Lp-RMRWZ2TG7j2OMcNSiOmATUhKEFBDfv-~SODDyopGBmfeLw16F4NnYednvn4qP10dyMHcUASU6Zag4mfc2-WivrOqeWhD16fVAh8MoDpIIT~0r9XmwdaVFyLcjbXObabJczxCAW3fodQUnvuSkwzAAAA.i2p/anonymityTracker/announce.php=http://anonymityweb.i2p/anonymityTracker/"
// , "The freak's tracker", "http://mHKva9x24E5Ygfey2llR1KyQHv5f8hhMpDMwJDg1U-hABpJ2NrQJd6azirdfaR0OKt4jDlmP2o4Qx0H598~AteyD~RJU~xcWYdcOE0dmJ2e9Y8-HY51ie0B1yD9FtIV72ZI-V3TzFDcs6nkdX9b81DwrAwwFzx0EfNvK1GLVWl59Ow85muoRTBA1q8SsZImxdyZ-TApTVlMYIQbdI4iQRwU9OmmtefrCe~ZOf4UBS9-KvNIqUL0XeBSqm0OU1jq-D10Ykg6KfqvuPnBYT1BYHFDQJXW5DdPKwcaQE4MtAdSGmj1epDoaEBUa9btQlFsM2l9Cyn1hzxqNWXELmx8dRlomQLlV4b586dRzW~fLlOPIGC13ntPXogvYvHVyEyptXkv890jC7DZNHyxZd5cyrKC36r9huKvhQAmNABT2Y~pOGwVrb~RpPwT0tBuPZ3lHYhBFYmD8y~AOhhNHKMLzea1rfwTvovBMByDdFps54gMN1mX4MbCGT4w70vIopS9yAAAA.i2p/bytemonsoon/announce.php"
};

View File

@@ -647,7 +647,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
private static String jumpServers[] = {
"http://i2host.i2p/cgi-bin/i2hostjump?",
"http://orion.i2p/jump/",
// "http://orion.i2p/jump/",
"http://stats.i2p/cgi-bin/jump.cgi?a=",
"http://trevorreznik.i2p/cgi-bin/jump.php?hostname="
};

View File

@@ -164,7 +164,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
if (_log.shouldLog(Log.INFO))
_log.info("inbound: "+outmsg);
}
outmsg=outmsg+"\n";
outmsg=outmsg+"\r\n"; // rfc1459 sec. 2.3
output.write(outmsg.getBytes("ISO-8859-1"));
} else {
if (_log.shouldLog(Log.WARN))
@@ -238,7 +238,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
if (_log.shouldLog(Log.INFO))
_log.info("outbound: "+outmsg);
}
outmsg=outmsg+"\n";
outmsg=outmsg+"\r\n"; // rfc1459 sec. 2.3
output.write(outmsg.getBytes("ISO-8859-1"));
} else {
if (_log.shouldLog(Log.WARN))

View File

@@ -186,8 +186,9 @@
%><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>>0 hop tunnel (low anonymity, low latency)</option>
<option value="1"<%=(tunnelDepth == 1 ? " selected=\"selected\"" : "") %>>1 hop tunnel (medium anonymity, medium latency)</option>
<option value="2"<%=(tunnelDepth == 2 ? " selected=\"selected\"" : "") %>>2 hop tunnel (high anonymity, high latency)</option>
<% if (tunnelDepth > 2) {
%> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> hop tunnel</option>
<option value="3"<%=(tunnelDepth == 3 ? " selected=\"selected\"" : "") %>>3 hop tunnel (very high anonymity, poor performance)</option>
<% if (tunnelDepth > 3) {
%> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> hop tunnel (very poor performance)</option>
<% }
%></select>
</div>
@@ -213,11 +214,11 @@
</label>
<select id="tunnelQuantity" name="tunnelQuantity" title="Number of Tunnels in Group" class="selectbox">
<% int tunnelQuantity = editBean.getTunnelQuantity(curTunnel, 2);
%><option value="1"<%=(tunnelQuantity == 1 ? " selected=\"selected\"" : "") %>>1 inbound tunnel (low bandwidth usage, less reliability)</option>
<option value="2"<%=(tunnelQuantity == 2 ? " selected=\"selected\"" : "") %>>2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
<option value="3"<%=(tunnelQuantity == 3 ? " selected=\"selected\"" : "") %>>3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
%><option value="1"<%=(tunnelQuantity == 1 ? " selected=\"selected\"" : "") %>>1 inbound, 1 outbound tunnel (low bandwidth usage, less reliability)</option>
<option value="2"<%=(tunnelQuantity == 2 ? " selected=\"selected\"" : "") %>>2 inbound, 2 outbound tunnels (standard bandwidth usage, standard reliability)</option>
<option value="3"<%=(tunnelQuantity == 3 ? " selected=\"selected\"" : "") %>>3 inbound, 3 outbound tunnels (higher bandwidth usage, higher reliability)</option>
<% if (tunnelQuantity > 3) {
%> <option value="<%=tunnelQuantity%>" selected="selected"><%=tunnelQuantity%> inbound tunnels</option>
%> <option value="<%=tunnelQuantity%>" selected="selected"><%=tunnelQuantity%> tunnels</option>
<% }
%></select>
</div>
@@ -228,9 +229,9 @@
<select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="Number of Reserve Tunnels" class="selectbox">
<% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0);
%><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>>0 backup tunnels (0 redundancy, no added resource usage)</option>
<option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>>1 backup tunnel (low redundancy, low resource usage)</option>
<option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>>2 backup tunnels (medium redundancy, medium resource usage)</option>
<option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>>3 backup tunnels (high redundancy, high resource usage)</option>
<option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>>1 backup tunnel each direction (low redundancy, low resource usage)</option>
<option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>>2 backup tunnels each direction (medium redundancy, medium resource usage)</option>
<option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>>3 backup tunnels each direction (high redundancy, high resource usage)</option>
<% if (tunnelBackupQuantity > 3) {
%> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> backup tunnels</option>
<% }
@@ -284,4 +285,4 @@
<div id="pageFooter">
</div>
</body>
</html>
</html>

View File

@@ -158,8 +158,9 @@
%><option value="0"<%=(tunnelDepth == 0 ? " selected=\"selected\"" : "") %>>0 hop tunnel (low anonymity, low latency)</option>
<option value="1"<%=(tunnelDepth == 1 ? " selected=\"selected\"" : "") %>>1 hop tunnel (medium anonymity, medium latency)</option>
<option value="2"<%=(tunnelDepth == 2 ? " selected=\"selected\"" : "") %>>2 hop tunnel (high anonymity, high latency)</option>
<% if (tunnelDepth > 2) {
%> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> hop tunnel</option>
<option value="3"<%=(tunnelDepth == 3 ? " selected=\"selected\"" : "") %>>3 hop tunnel (very high anonymity, poor performance)</option>
<% if (tunnelDepth > 3) {
%> <option value="<%=tunnelDepth%>" selected="selected"><%=tunnelDepth%> hop tunnel (very poor performance)</option>
<% }
%></select>
</div>
@@ -185,11 +186,11 @@
</label>
<select id="tunnelQuantity" name="tunnelQuantity" title="Number of Tunnels in Group" class="selectbox">
<% int tunnelQuantity = editBean.getTunnelQuantity(curTunnel, 2);
%><option value="1"<%=(tunnelQuantity == 1 ? " selected=\"selected\"" : "") %>>1 inbound tunnel (low bandwidth usage, less reliability)</option>
<option value="2"<%=(tunnelQuantity == 2 ? " selected=\"selected\"" : "") %>>2 inbound tunnels (standard bandwidth usage, standard reliability)</option>
<option value="3"<%=(tunnelQuantity == 3 ? " selected=\"selected\"" : "") %>>3 inbound tunnels (higher bandwidth usage, higher reliability)</option>
%><option value="1"<%=(tunnelQuantity == 1 ? " selected=\"selected\"" : "") %>>1 inbound, 1 outbound tunnel (low bandwidth usage, less reliability)</option>
<option value="2"<%=(tunnelQuantity == 2 ? " selected=\"selected\"" : "") %>>2 inbound, 2 outbound tunnels (standard bandwidth usage, standard reliability)</option>
<option value="3"<%=(tunnelQuantity == 3 ? " selected=\"selected\"" : "") %>>3 inbound, 3 outbound tunnels (higher bandwidth usage, higher reliability)</option>
<% if (tunnelQuantity > 3) {
%> <option value="<%=tunnelQuantity%>" selected="selected"><%=tunnelQuantity%> inbound tunnels</option>
%> <option value="<%=tunnelQuantity%>" selected="selected"><%=tunnelQuantity%> tunnels</option>
<% }
%></select>
</div>
@@ -200,9 +201,9 @@
<select id="tunnelBackupQuantity" name="tunnelBackupQuantity" title="Number of Reserve Tunnels" class="selectbox">
<% int tunnelBackupQuantity = editBean.getTunnelBackupQuantity(curTunnel, 0);
%><option value="0"<%=(tunnelBackupQuantity == 0 ? " selected=\"selected\"" : "") %>>0 backup tunnels (0 redundancy, no added resource usage)</option>
<option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>>1 backup tunnel (low redundancy, low resource usage)</option>
<option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>>2 backup tunnels (medium redundancy, medium resource usage)</option>
<option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>>3 backup tunnels (high redundancy, high resource usage)</option>
<option value="1"<%=(tunnelBackupQuantity == 1 ? " selected=\"selected\"" : "") %>>1 backup tunnel each direction (low redundancy, low resource usage)</option>
<option value="2"<%=(tunnelBackupQuantity == 2 ? " selected=\"selected\"" : "") %>>2 backup tunnels each direction (medium redundancy, medium resource usage)</option>
<option value="3"<%=(tunnelBackupQuantity == 3 ? " selected=\"selected\"" : "") %>>3 backup tunnels each direction (high redundancy, high resource usage)</option>
<% if (tunnelBackupQuantity > 3) {
%> <option value="<%=tunnelBackupQuantity%>" selected="selected"><%=tunnelBackupQuantity%> backup tunnels</option>
<% }
@@ -256,4 +257,4 @@
<div id="pageFooter">
</div>
</body>
</html>
</html>

View File

@@ -164,7 +164,7 @@ public class ConfigNetHelper {
if (rate != null)
return rate;
else
return "16";
return "32";
}
public String getOutboundRate() {
String rate = _context.getProperty(PROP_OUTBOUND_KBPS);
@@ -178,7 +178,7 @@ public class ConfigNetHelper {
if (rate != null)
return rate;
else
return "32";
return "48";
}
public String getOutboundBurstRate() {
String rate = _context.getProperty(PROP_OUTBOUND_BURST_KBPS);
@@ -276,21 +276,21 @@ public class ConfigNetHelper {
}
public int getShareBandwidth() {
String irate = _context.getProperty(PROP_INBOUND_KBPS);
String orate = _context.getProperty(PROP_OUTBOUND_KBPS);
String pctStr = _context.getProperty(PROP_SHARE_PERCENTAGE);
String irate = _context.getProperty(PROP_INBOUND_KBPS, "32");
String orate = _context.getProperty(PROP_OUTBOUND_KBPS, "16");
String pctStr = _context.getProperty(PROP_SHARE_PERCENTAGE, "" + DEFAULT_SHARE_PERCENTAGE);
if ( (irate != null) && (orate != null) && (pctStr != null)) {
try {
int irateKBps = Integer.parseInt(irate);
int orateKBps = Integer.parseInt(orate);
if (irateKBps < 0 || orateKBps < 0)
return 0;
return 12;
int pct = Integer.parseInt(pctStr);
return (int) (((float) pct) * Math.min(irateKBps, orateKBps) / 100);
} catch (NumberFormatException nfe) {
// ignore
}
}
return 0;
return 12;
}
}

View File

@@ -70,19 +70,32 @@ public class GraphHelper {
}
if (hasTx && hasRx && !_showEvents)
_out.write("<a href=\"viewstat.jsp?stat=bw.combined"
+ "&amp;periodCount=" + (3 * _periodCount )
+ "&amp;width=" + (3 * _width)
+ "&amp;height=" + (3 * _height)
+ "\" />");
_out.write("<img width=\""
+ (_width + 83) + "\" height=\"" + (_height + 92)
+ "\" src=\"viewstat.jsp?stat=bw.combined"
+ "&amp;periodCount=" + _periodCount
+ "&amp;width=" + _width
+ "&amp;height=" + (_height - 14)
+ "\" title=\"Combined bandwidth graph\" />\n");
+ "\" title=\"Combined bandwidth graph\" /></a>\n");
for (Iterator iter = ordered.iterator(); iter.hasNext(); ) {
SummaryListener lsnr = (SummaryListener)iter.next();
Rate r = lsnr.getRate();
String title = r.getRateStat().getName() + " for " + DataHelper.formatDuration(_periodCount * r.getPeriod());
_out.write("<img width=\""
_out.write("<a href=\"viewstat.jsp?stat="
+ r.getRateStat().getName()
+ "&amp;showEvents=" + _showEvents
+ "&amp;period=" + r.getPeriod()
+ "&amp;periodCount=" + (3 * _periodCount)
+ "&amp;width=" + (3 * _width)
+ "&amp;height=" + (3 * _height)
+ "\" />");
_out.write("<img border=\"0\" width=\""
+ (_width + 83) + "\" height=\"" + (_height + 92)
+ "\" src=\"viewstat.jsp?stat="
+ r.getRateStat().getName()
@@ -91,7 +104,7 @@ public class GraphHelper {
+ "&amp;periodCount=" + _periodCount
+ "&amp;width=" + _width
+ "&amp;height=" + _height
+ "\" title=\"" + title + "\" />\n");
+ "\" title=\"" + title + "\" /></a>\n");
}
if (_refreshDelaySeconds > 0)
_out.write("<meta http-equiv=\"refresh\" content=\"" + _refreshDelaySeconds + "\" />\n");

View File

@@ -162,7 +162,8 @@ public class UpdateHandler {
_status = "<b>Update verified</b><br />Restarting<br />";
restart();
} else {
_log.log(Log.CRIT, "Update was INVALID - have you changed your keys?");
_log.log(Log.CRIT, "Update was INVALID - signing key is not trusted!");
_status = "<b>Update signing key invalid</b><br />";
System.setProperty("net.i2p.router.web.UpdateHandler.updateInProgress", "false");
}
}

View File

@@ -40,7 +40,8 @@
<input name="outboundburstrate" type="text" size="2" value="<jsp:getProperty name="nethelper" property="outboundBurstRate" />" /> KBps for
<jsp:getProperty name="nethelper" property="outboundBurstFactorBox" /><br />
<i>KBps = kilobytes per second = 1024 bytes per second.<br />
A negative rate means a default limit of 16KBytes per second.</i><br />
A negative inbound rate means a default limit of 32KBytes per second.
A negative outbound rate means a default limit of 16KBytes per second.</i><br />
Bandwidth share percentage:
<jsp:getProperty name="nethelper" property="sharePercentageBox" /><br />
<% int share = nethelper.getShareBandwidth();

View File

@@ -3,6 +3,7 @@ Release checklist
Sync with mtn.i2p2.i2p
Start with a clean checkout mtn -d i2p.mtn co --branch=i2p.i2p
Double-check trust list
Change revision in:
history.txt
@@ -10,11 +11,12 @@ Change revision in:
installer/install.xml
news.xml
router/java/src/net/i2p/router/RouterVersion.java
core/java/src/net/i2p/CoreVersion.java
Build and tag:
ant dist
mtn ci
mtn tag i2p-0.6.1.xx
mtn tag i2p-0.6.1.xx h:
Sync with mtn.i2p2.i2p
Create a signed update file with:
@@ -27,11 +29,12 @@ Verify signed update file with:
Make the source tarball:
Start with a clean checkout mtn -d i2p.mtn co --branch=i2p.i2p i2p-0.6.1.xx
tar tjf i2p-0.6.1.xx.tar.bz2 --exclude i2p-0.6.1.xx/_MTN i2p-0.6.1.xx
Double-check trust list
tar cjf i2psource-0.6.1.xx.tar.bz2 --exclude i2p-0.6.1.xx/_MTN i2p-0.6.1.xx
mv i2p-0.6.1.xx.tar.bz2 i2p.i2p
More signatures:
sha1sum i2pinstall.exe i2p.tar.bz2 i2p-0.6.1.xx.tar.bz2 i2pupdate.zip
sha1sum i2pinstall.exe i2p.tar.bz2 i2psource-0.6.1.xx.tar.bz2 i2pupdate.zip
gpg -b i2pinstall.exe
gpg -b i2p.tar.bz2
gpg -b i2p-0.6.1.xx.tar.bz2

View File

@@ -1,9 +1,27 @@
Prior to building the jbigi library, you will need to fetch the GMP source
from http://www.swox.com/gmp/, saving it to jbigi/gmp-4.1.4.tar.bz2 (it will
from http://www.swox.com/gmp/, saving it to jbigi/gmp-4.2.2.tar.bz2 (it will
be unpacked and built as necessary).
Version 4.2.2 has not been extensively tested with I2P. If you would like
to use a well-tested version, get gmp-4.1.4.tar.bz2, and edit jbigi/build.sh
to change the version number.
To build the native jbigi and jcpuid libraries for the current host CPU,
simply run sh build.sh and the results will be packaged up into jbigi.jar
and the libjbigi.so library. To test, copy jbigi/lib/libjbigi.so
and jcpuid/lib/freenet/support/CPUInformation/libjcpuid-*.so
to your i2p/ directory. You can also copy jbigi.jar to the i2p/lib/ directory;
it will be used only if the router fails to load the native library.
To build the native jbigi libraries for all supported CPUs (on the current OS),
go into jbigi/ and run build-all.sh (the results will be under jbigi/lib/)
After copying the files to the i2p/ directory,
to run a speed test comparing the native library to the java library,
run the shell script below.
-----------------
#!/bin/sh
export I2P=~/i2p
java -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger

0
core/c/build.sh Normal file → Executable file
View File

7
core/c/jbigi/build-all.sh Normal file → Executable file
View File

@@ -12,8 +12,9 @@ FreeBSD*)
exit;;
esac
echo "Extracting GMP..."
tar -xjf gmp-4.1.4.tar.bz2
VER=4.2.2
echo "Extracting GMP Version $VER ..."
tar -xjf gmp-$VER.tar.bz2
echo "Building..."
mkdir bin
mkdir lib
@@ -24,7 +25,7 @@ for x in none pentium pentiummmx pentium2 pentium3 pentium4 k6 k62 k63 athlon
do
mkdir bin/$x
cd bin/$x
../../gmp-4.1.4/configure --build=$x
../../gmp-$VER/configure --build=$x
make
sh ../../build_jbigi.sh static
case `uname -sr` in

9
core/c/jbigi/build.sh Normal file → Executable file
View File

@@ -1,9 +1,10 @@
#/bin/sh
echo "Building the jbigi library with GMP"
VER=4.2.2
echo "Building the jbigi library with GMP Version $VER"
echo "Extracting GMP..."
tar -xjf gmp-4.1.4.tar.bz2
tar -xjf gmp-$VER.tar.bz2
echo "Building..."
mkdir -p lib/
mkdir -p bin/local
@@ -11,9 +12,9 @@ cd bin/local
case `uname -sr` in
Darwin*)
# --with-pic is required for static linking
../../gmp-4.1.4/configure --with-pic;;
../../gmp-$VER/configure --with-pic;;
*)
../../gmp-4.1.4/configure;;
../../gmp-$VER/configure;;
esac
make
sh ../../build_jbigi.sh static

0
core/c/jbigi/build_jbigi.sh Normal file → Executable file
View File

0
core/c/jcpuid/build.sh Normal file → Executable file
View File

View File

@@ -15,7 +15,7 @@ package net.i2p;
*/
public class CoreVersion {
public final static String ID = "$Revision: 1.72 $ $Date: 2007-08-23 19:33:31 $";
public final static String VERSION = "0.6.1.30";
public final static String VERSION = "0.6.1.32";
public static void main(String args[]) {
System.out.println("I2P Core version: " + VERSION);

View File

@@ -207,11 +207,11 @@ public class SimpleTimer {
_occurredEventCount += eventsToFire.size();
} else {
_occurredTime = now;
if (_occurredEventCount > 1000) {
if (_occurredEventCount > 2500) {
StringBuffer buf = new StringBuffer(128);
buf.append("Too many simpleTimerJobs (").append(_occurredEventCount);
buf.append(") in a second!");
_log.log(Log.CRIT, buf.toString());
_log.log(Log.WARN, buf.toString());
}
_occurredEventCount = 0;
}

View File

@@ -1,3 +1,71 @@
* 2008-03-09 0.6.1.32 released
2008-03-07 zzz
* Update news and version numbers
2008-03-01 zzz
* Fix netdb.knownLeaseSets count reported by floodfill routers
(was broken by -3)
2008-02-27 zzz
* i2ptunnel: Add 3-hop option to edit.jsp to match configtunnels.jsp
* i2psnark: Remove orion and gaytorrents from default tracker list
* Remove orion from jump list and from eepsite_index.html
* Jbigi: Change jbigi version to 4.2.2 in build scripts - tested by amiga
* Capitalize OutboundMessageDistributor job name
* TunnelPool: Add a warning if all tunnels are backlogged
2008-02-26 zzz
* Reintroduce NTCP backlog pushback, with switch back to
previous tunnel when no longer backlogged
* Catch an nio exception in an NTCP logging statement if loglevel is WARN
* IRC Proxy: terminate all messages with \r\n (thanks TrivialPursuit!)
2008-02-21 zzz
* Raise inbound default bandwidth to 32KBps
* Fix config.jsp that showed 0KBps share bandwidth by default
2008-02-19 zzz
* Addressbook: Disallow '--' in host names except in IDN,
add some reserved host names
* I2PTunnel: Clarify edit form
* NetDb: Remove many stats from netDb, effective as of .32
* profiles.jsp: Display capabilities
* Tunnels: Enforce max tunnel length of 8, catch an index error
http://forum.i2p/viewtopic.php?t=2561
2008-02-16 zzz
* Fix race in TunnelDispatcher which caused
participating tunnel count to seesaw -
should increase network capacity
* Leave participating tunnels in 10s batches for efficiency
* Update participating tunnel ratestat when leaving a tunnel too,
to generate a smoother graph
* Fix tunnel.participatingMessageCount stat to include all
participating tunnels, not just outbound endpoints
* Simplify Expire Tunnel job name
2008-02-13 zzz
* PersistentDataStore: Write out 300 records every 10 min
rather than 1 every 10 sec;
Don't store leasesets to disk or read them in
* Combine rates for pools with the same length setting
in the new tunnel build algorithm
* Clarify a log message in the UpdateHandler
2008-02-13 zzz
* Make graphs clickable to get larger graphs
* Change SimpleTimer CRIT to a WARN, increase threshold
* Checklist update
2008-02-11 welterde
* Fix an NPE in UDP http://forum.i2p/viewtopic.php?t=2545
2008-02-10 zzz
* Add new tunnel build algorithm (preliminary)
* Change NTCP backlogged message from error to warning
* Checklist updates
* 2008-02-10 0.6.1.31 released
2008-02-10 Complication

View File

@@ -1,5 +1,5 @@
<i2p.news date="$Date: 2008-02-10 15:00:00 $">
<i2p.release version="0.6.1.31" date="2008/02/10" minVersion="0.6"
<i2p.news date="$Date: 2008-03-09 15:00:00 $">
<i2p.release version="0.6.1.32" date="2008/03/09" minVersion="0.6"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/i2pupdate.sud"
publicurl="http://dev.i2p.net/i2p/i2pupdate.sud"
anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/2005-September/000878.html"

View File

@@ -4,7 +4,7 @@
<info>
<appname>i2p</appname>
<appversion>0.6.1.31</appversion>
<appversion>0.6.1.32</appversion>
<authors>
<author name="I2P" email="http://forum.i2p.net"/>
</authors>

View File

@@ -56,7 +56,7 @@
That is, you must enter
your eepsite name and key into a web interface on one or more of these sites.
Here is <a href="http://stats.i2p/i2p/addkey.html">the key entry form at stats.i2p</a>,
here is <a href="http://orion.i2p/list/">the key entry form at orion.i2p</a> and
and
here is <a href="http://trevorreznik.i2p/host-database/">the key entry form at trevorreznik.i2p</a>.
Again, your key is the entire "Local destination" key on the
<a href="http://localhost:7657/i2ptunnel/edit.jsp?tunnel=3">eepsite i2ptunnel configuration page</a>.
@@ -68,15 +68,14 @@
<li>Speaking of address book updates, this would be a good time to add some more addressbooks
to your own subscription list. Go to your <a href="http://localhost:7657/susidns/subscriptions.jsp">subscriptions configuration page</a>
and add a couple of these -
<a href="http://orion.i2p/hosts.txt">http://orion.i2p/hosts.txt</a>,
<a href="http://tino.i2p/hosts.txt">http://tino.i2p/hosts.txt</a>,
<a href="http://stats.i2p/cgi-bin/newhosts.txt">http://stats.i2p/cgi-bin/newhosts.txt</a>,
<a href="http://trevorreznik.i2p/hosts.txt">http://trevorreznik.i2p/hosts.txt</a> and hit "Save".
Now you will get updates too!
<li>If you are in a hurry and can't wait a few hours, you can tell people to use a "jump" address helper redirection service.
This will work within a few minutes of your entering the key to an address book.
Test it yourself first by entering http://orion.i2p/jump/<i>something</i>.i2p
or http://stats.i2p/cgi-bin/jump.cgi?a=<i>something</i>.i2p or
Test it yourself first by entering
http://stats.i2p/cgi-bin/jump.cgi?a=<i>something</i>.i2p or
or http://trevorreznik.i2p/cgi-bin/jump.php?hostname=<i>something</i>.i2p into your browser.
Once it's working, then you can tell others to use it.
<li>Some people check eepsite lists such as
@@ -86,7 +85,7 @@
<li>Post a message on the <a href="http://forum.i2p/viewforum.php?f=16">Eepsite announce forum</a>
on <a href="http://forum.i2p/">forum.i2p</a>.
<li>Tell people about it on the #i2p or #i2p-chat channels on IRC.
<li>Put it in a new post on <a href="http://syndie.i2p.net">the new Syndie</a>.
<li>Put it in a new post on <a href="http://syndie.i2p2.de/">the new Syndie</a>.
<li>Put it in <a href="http://ugha.i2p/EepsiteIndex">Ugha's Eepsite Index Wiki</a>
</ul>
Note that some sites recommend pasting in that really long destination key.

View File

@@ -1,5 +1,5 @@
<i2p.news date="$Date: 2008-02-10 15:00:00 $">
<i2p.release version="0.6.1.31" date="2008/02/10" minVersion="0.6"
<i2p.news date="$Date: 2008-03-09 15:00:00 $">
<i2p.release version="0.6.1.32" date="2008/03/09" minVersion="0.6"
anonurl="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/i2pupdate.sud"
publicurl="http://dev.i2p.net/i2p/i2pupdate.sud"
anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/2005-September/000878.html"
@@ -11,24 +11,36 @@
publiclogs="http://www.i2p.net/meeting141" />
<p>
&#149;
2008-02-10: <b>0.6.1.31 released</b>
2008-03-09: <b>0.6.1.32 Released</b>
</p><p>
The transitional 0.6.1.31 release will make the I2P
release process independent of jrandom and *.i2p.net servers,
introducing two new update verification keys, adding support
for distributed update hosting inside I2P, and changing many URLs.
</p><p>
It introduces version 2 of the SAM protocol,
along with substantial improvements to the address book,
I2PSnark and ircproxy. Unless you have already done that,
read about the update procedure below.
The 0.6.1.32 release contains a new, more efficient
tunnel build algorithm, and fixes participating tunnel counts.
These changes should help network capacity, so please
upgrade when you get a chance.
This release also increases the default inbound bandwidth limit to 32KBps.
You may wish to adjust your limits on
<a href="config.jsp">config.jsp</a>.
</p>
<p>
&#149;
2008-02-05: <b>Upcoming 0.6.1.31 Release</b>
2008-02-29: <b>Upcoming 0.6.1.32 Release</b>
</p><p>
And, since i2p's lead developer
If you upgraded from 0.6.1.30 to 0.6.1.31, you may wish to take advantage
of the new round-robin update downloading when .32 is released. This is optional.
On
<a href="configadvanced.jsp">configadvanced.jsp</a>,
delete the line "router.updateURL=..." and click "Apply".
Verify that you now have three default Update URLs listed on
<a href="configupdate.jsp">configupdate.jsp</a>.
If you already have three Update URLs, you do not have to do anything.
</p>
<p>
&#149;
2008-02-05: <b>Upgrading from 0.6.1.30 and Earlier Releases</b>
</p><p>
Since i2p's lead developer
<a href="http://dreamtheaterfan.i2p/jrandom-awol.html">has gone AWOL</a>,
we do not have his update signing key or write access to
<a href="http://www.i2p/">www.i2p</a> or
@@ -37,13 +49,12 @@ Complication and zzz have generated new signing keys, and they and Amiga are pro
update file hosting. These changes must be configured in your router to take effect.
</p><p>
Make the following configuration changes and your router will automatically install
the upcoming 0.6.1.31 release when it becomes available.
The release will include SAM v2, new jump server links, and addressbook, IRC proxy, and i2psnark improvements.
the latest release.
</p><p>
We recommend the automated process as it will verify the key of the signed update file.
If you do not make these changes,
you will still be able to manually download the new i2pupdate.zip file from locations to
be announced.
you may manually download the i2pupdate.zip file from
<a href="http://www.i2p2.i2p/download.html">www.i2p2.i2p/download</a>.
<ol><li>
On
<a href="configupdate.jsp">configupdate.jsp</a>:
@@ -70,18 +81,13 @@ Add the following line:
Click "Apply"
</li></ol>
<li>
You are now ready to automatically receive the 0.6.1.31 update when it becomes available,
You are now ready to automatically receive the release update file,
either by setting your update policy to "download and install" or by clicking on the
"update available" link when it appears.
</li></li></ol>
</p><p>
If you would like to verify the trusted update keys, they are also
<a href="http://stats.i2p/i2p/signingkeys.html">posted and signed here</a>.
</p><p>
The new release will be announced here, on
<a href="http://forum.i2p/">the forums</a>, on IRC, and on Syndie.
New users may install 0.6.1.31 from the
<a href="http://www.i2p2.de/download">www.i2p2.de download page</a>.
Thank you for your support during this transition. For help please contact us on #i2p.
</p><p>
Amiga, Complication, welterde, zzz

View File

@@ -16,7 +16,7 @@ import net.i2p.CoreVersion;
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.548 $ $Date: 2008-02-10 15:00:00 $";
public final static String VERSION = "0.6.1.31";
public final static String VERSION = "0.6.1.32";
public final static long BUILD = 0;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);

View File

@@ -128,11 +128,15 @@ public class StatisticsManager implements Service {
if (false)
stats.putAll(_context.profileManager().summarizePeers(_publishedStats));
// provide cover for developers, change to false or comment out below after .32 is out
boolean commentMeOutInDot32 = RouterVersion.VERSION.equals("0.6.1.31");
includeThroughput(stats);
if (commentMeOutInDot32) {
includeRate("router.invalidMessageTime", stats, new long[] { 10*60*1000 });
includeRate("router.duplicateMessageId", stats, new long[] { 24*60*60*1000 });
//includeRate("tunnel.duplicateIV", stats, new long[] { 24*60*60*1000 });
includeRate("tunnel.fragmentedDropped", stats, new long[] { 10*60*1000, 3*60*60*1000 });
}
//includeRate("tunnel.fullFragments", stats, new long[] { 10*60*1000, 3*60*60*1000 });
//includeRate("tunnel.smallFragments", stats, new long[] { 10*60*1000, 3*60*60*1000 });
includeRate("tunnel.testFailedTime", stats, new long[] { 10*60*1000 });
@@ -141,6 +145,7 @@ public class StatisticsManager implements Service {
includeRate("tunnel.buildSuccess", stats, new long[] { 60*60*1000 });
//includeRate("tunnel.batchDelaySent", stats, new long[] { 10*60*1000, 60*60*1000 });
if (commentMeOutInDot32)
includeRate("tunnel.batchMultipleCount", stats, new long[] { 10*60*1000, 60*60*1000 });
includeRate("tunnel.corruptMessage", stats, new long[] { 60*60*1000l, 3*60*60*1000l });
@@ -150,6 +155,7 @@ public class StatisticsManager implements Service {
includeRate("router.fastPeers", stats, new long[] { 60*60*1000 });
if (commentMeOutInDot32) {
includeRate("udp.statusOK", stats, new long[] { 20*60*1000 });
includeRate("udp.statusDifferent", stats, new long[] { 20*60*1000 });
includeRate("udp.statusReject", stats, new long[] { 20*60*1000 });
@@ -157,6 +163,7 @@ public class StatisticsManager implements Service {
includeRate("udp.statusKnownCharlie", stats, new long[] { 1*60*1000, 10*60*1000 });
includeRate("udp.addressUpdated", stats, new long[] { 1*60*1000 });
includeRate("udp.addressTestInsteadOfUpdate", stats, new long[] { 1*60*1000 });
}
includeRate("clock.skew", stats, new long[] { 10*60*1000, 3*60*60*1000, 24*60*60*1000 });
@@ -164,12 +171,15 @@ public class StatisticsManager implements Service {
//includeRate("jobQueue.jobRunSlow", stats, new long[] { 10*60*1000l, 60*60*1000l });
includeRate("crypto.elGamal.encrypt", stats, new long[] { 60*1000, 60*60*1000 });
includeRate("tunnel.participatingTunnels", stats, new long[] { 5*60*1000, 60*60*1000 });
if (commentMeOutInDot32)
includeRate("tunnel.testSuccessTime", stats, new long[] { 10*60*1000l });
includeRate("client.sendAckTime", stats, new long[] { 60*60*1000 }, true);
if (commentMeOutInDot32) {
includeRate("udp.sendConfirmTime", stats, new long[] { 10*60*1000 });
includeRate("udp.sendVolleyTime", stats, new long[] { 10*60*1000 });
includeRate("udp.ignoreRecentDuplicate", stats, new long[] { 60*1000 });
includeRate("udp.congestionOccurred", stats, new long[] { 10*60*1000 });
}
//includeRate("stream.con.sendDuplicateSize", stats, new long[] { 60*60*1000 });
//includeRate("stream.con.receiveDuplicateSize", stats, new long[] { 60*60*1000 });
@@ -178,9 +188,11 @@ public class StatisticsManager implements Service {
if (publishedUptime < 60*60*1000) publishedUptime = 60*60*1000;
stats.setProperty("stat_uptime", DataHelper.formatDuration(publishedUptime));
if (commentMeOutInDot32)
stats.setProperty("stat__rateKey", "avg;maxAvg;pctLifetime;[sat;satLim;maxSat;maxSatLim;][num;lifetimeFreq;maxFreq]");
includeRate("tunnel.buildRequestTime", stats, new long[] { 60*1000, 10*60*1000 });
if (commentMeOutInDot32)
includeRate("tunnel.decryptRequestTime", stats, new long[] { 60*1000, 10*60*1000 });
includeRate("tunnel.buildClientExpire", stats, new long[] { 60*1000, 10*60*1000 });
includeRate("tunnel.buildClientReject", stats, new long[] { 60*1000, 10*60*1000 });
@@ -189,8 +201,10 @@ public class StatisticsManager implements Service {
includeRate("tunnel.buildExploratoryReject", stats, new long[] { 60*1000, 10*60*1000 });
includeRate("tunnel.buildExploratorySuccess", stats, new long[] { 60*1000, 10*60*1000 });
includeRate("tunnel.rejectTimeout", stats, new long[] { 60*1000, 10*60*1000 });
if (commentMeOutInDot32) {
includeRate("udp.packetDequeueTime", stats, new long[] { 60*1000 });
includeRate("udp.packetVerifyTime", stats, new long[] { 60*1000 });
}
includeRate("tunnel.rejectOverloaded", stats, new long[] { 60*1000, 10*60*1000 });
includeRate("tunnel.acceptLoad", stats, new long[] { 60*1000, 10*60*1000 });

View File

@@ -255,6 +255,9 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
return false;
}
// Right here is where we should use a persistent lease and caching like
// we do for outbound tunnel selection below???
// randomize the ordering (so leases with equal # of failures per next
// sort are randomly ordered)
Collections.shuffle(leases);
@@ -435,39 +438,79 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
}
}
/**
* Clean out old tunnels from a set.
* Caller must synchronize on tc.
*/
private void cleanTunnelCache(HashMap tc) {
List deleteList = new ArrayList();
for (Iterator iter = tc.keySet().iterator(); iter.hasNext(); ) {
Destination dest = (Destination) iter.next();
TunnelInfo tunnel = (TunnelInfo) tc.get(dest);
if (!getContext().tunnelManager().isValidTunnel(_from.calculateHash(), tunnel))
deleteList.add(dest);
}
for (Iterator iter = deleteList.iterator(); iter.hasNext(); ) {
Destination dest = (Destination) iter.next();
tc.remove(dest);
}
}
/**
* Use the same outbound tunnel as we did for the same destination previously,
* if possible, to keep the streaming lib happy
* Use two caches - although a cache of a list of tunnels per dest might be
* more elegant.
* Key the caches just on the dest, not on source+dest, as different sources
* simultaneously talking to the same dest is probably rare enough
* to not bother separating out.
*
*/
private static HashMap _tunnelCache = new HashMap();
private static HashMap _backloggedTunnelCache = new HashMap();
private static long _cleanTime = 0;
private TunnelInfo selectOutboundTunnel(Destination to) {
TunnelInfo tunnel;
long now = getContext().clock().now();
synchronized (_tunnelCache) {
if (now - _cleanTime > 5*60*1000) { // clean out periodically
List deleteList = new ArrayList();
for (Iterator iter = _tunnelCache.keySet().iterator(); iter.hasNext(); ) {
Destination dest = (Destination) iter.next();
tunnel = (TunnelInfo) _tunnelCache.get(dest);
if (!getContext().tunnelManager().isValidTunnel(_from.calculateHash(), tunnel))
deleteList.add(dest);
}
for (Iterator iter = deleteList.iterator(); iter.hasNext(); ) {
Destination dest = (Destination) iter.next();
_tunnelCache.remove(dest);
}
cleanTunnelCache(_tunnelCache);
cleanTunnelCache(_backloggedTunnelCache);
_cleanTime = now;
}
/**
* If old tunnel is valid and no longer backlogged, use it.
* This prevents an active anonymity attack, where a peer could tell
* if you were the originator by backlogging the tunnel, then removing the
* backlog and seeing if traffic came back or not.
*/
tunnel = (TunnelInfo) _backloggedTunnelCache.get(to);
if (tunnel != null) {
if (getContext().tunnelManager().isValidTunnel(_from.calculateHash(), tunnel)) {
if (!getContext().commSystem().isBacklogged(tunnel.getPeer(1))) {
if (_log.shouldLog(Log.WARN))
_log.warn("Switching back to tunnel " + tunnel + " for dest " + to.calculateHash().toBase64());
_backloggedTunnelCache.remove(to);
_tunnelCache.put(to, tunnel);
return tunnel;
} // else still backlogged
} else // no longer valid
_backloggedTunnelCache.remove(to);
}
// Use the same tunnel unless backlogged
tunnel = (TunnelInfo) _tunnelCache.get(to);
if (tunnel != null) {
if (getContext().tunnelManager().isValidTunnel(_from.calculateHash(), tunnel))
return(tunnel);
else
_tunnelCache.remove(to);
if (getContext().tunnelManager().isValidTunnel(_from.calculateHash(), tunnel)) {
if (tunnel.getLength() <= 1 || !getContext().commSystem().isBacklogged(tunnel.getPeer(1)))
return tunnel;
// backlogged
if (_log.shouldLog(Log.WARN))
_log.warn("Switching from backlogged " + tunnel + " for dest " + to.calculateHash().toBase64());
_backloggedTunnelCache.put(to, tunnel);
} // else no longer valid
_tunnelCache.remove(to);
}
// Pick a new tunnel
tunnel = selectOutboundTunnel();
if (tunnel != null)
_tunnelCache.put(to, tunnel);

View File

@@ -66,9 +66,14 @@ class PersistentDataStore extends TransientDataStore {
public void put(Hash key, DataStructure data) {
if ( (data == null) || (key == null) ) return;
super.put(key, data);
_writer.queue(key, data);
// Don't bother writing LeaseSets to disk
if (data instanceof RouterInfo)
_writer.queue(key, data);
}
/*
* We don't store leasesets here anymore, use the TransientDataStore count
*
public int countLeaseSets() {
File dbDir = null;
try {
@@ -84,6 +89,7 @@ class PersistentDataStore extends TransientDataStore {
else
return leaseSetFiles.length;
}
*/
private void accept(LeaseSet ls) {
super.put(ls.getDestination().calculateHash(), ls);
@@ -103,7 +109,7 @@ class PersistentDataStore extends TransientDataStore {
}
public String getName() { return "Remove Key"; }
public void runJob() {
_log.info("Removing key " + _key, getAddedBy());
_log.info("Removing key " + _key /* , getAddedBy() */);
try {
File dbDir = getDbDir();
removeFile(_key, dbDir);
@@ -113,6 +119,9 @@ class PersistentDataStore extends TransientDataStore {
}
}
/*
* Queue up writes, write up to 300 files every 10 minutes
*/
private class Writer implements Runnable {
private Map _keys;
private List _keyOrder;
@@ -137,12 +146,15 @@ class PersistentDataStore extends TransientDataStore {
public void run() {
Hash key = null;
DataStructure data = null;
int count = 0;
while (true) { // hmm, probably want a shutdown handle... though this is a daemon thread
try {
synchronized (_keys) {
if (_keyOrder.size() <= 0) {
count = 0;
_keys.wait();
} else {
count++;
key = (Hash)_keyOrder.remove(0);
data = (DataStructure)_keys.remove(key);
}
@@ -153,7 +165,10 @@ class PersistentDataStore extends TransientDataStore {
write(key, data);
key = null;
data = null;
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
if (count >= 300)
count = 0;
if (count == 0)
try { Thread.sleep(10*60*1000); } catch (InterruptedException ie) {}
}
}
}
@@ -227,6 +242,7 @@ class PersistentDataStore extends TransientDataStore {
int routerCount = 0;
try {
File dbDir = getDbDir();
/****
if (getContext().router().getUptime() < 10*60*1000) {
File leaseSetFiles[] = dbDir.listFiles(LeaseSetFilter.getInstance());
if (leaseSetFiles != null) {
@@ -237,6 +253,7 @@ class PersistentDataStore extends TransientDataStore {
}
}
}
****/
File routerInfoFiles[] = dbDir.listFiles(RouterInfoFilter.getInstance());
if (routerInfoFiles != null) {
routerCount += routerInfoFiles.length;
@@ -259,6 +276,7 @@ class PersistentDataStore extends TransientDataStore {
}
}
/****
private class ReadLeaseJob extends JobImpl {
private File _leaseFile;
private Hash _key;
@@ -313,6 +331,7 @@ class PersistentDataStore extends TransientDataStore {
}
}
}
****/
private class ReadRouterJob extends JobImpl {
private File _routerFile;

View File

@@ -60,8 +60,17 @@ class TransientDataStore implements DataStore {
}
}
public int countLeaseSets() { return 0; }
public int countLeaseSets() {
int count = 0;
synchronized (_data) {
for (Iterator iter = _data.values().iterator(); iter.hasNext();) {
DataStructure data = (DataStructure)iter.next();
if (data instanceof LeaseSet)
count++;
}
}
return count;
}
/** nothing published more than 5 minutes in the future */
private final static long MAX_FUTURE_PUBLISH_DATE = 5*60*1000;

View File

@@ -13,6 +13,7 @@ import java.util.Set;
import java.util.TreeSet;
import net.i2p.data.Hash;
import net.i2p.data.RouterInfo;
import net.i2p.router.RouterContext;
/**
@@ -52,7 +53,7 @@ class ProfileOrganizerRenderer {
buf.append("<table border=\"1\">");
buf.append("<tr>");
buf.append("<td><b>Peer</b> (").append(order.size()).append(", hiding ").append(peers.size()-order.size()).append(")</td>");
buf.append("<td><b>Groups</b></td>");
buf.append("<td><b>Groups (Caps)</b></td>");
buf.append("<td><b>Speed</b></td>");
buf.append("<td><b>Capacity</b></td>");
buf.append("<td><b>Integration</b></td>");
@@ -109,6 +110,9 @@ class ProfileOrganizerRenderer {
default: buf.append("Failing"); break;
}
if (isIntegrated) buf.append(", Integrated");
RouterInfo info = _context.netDb().lookupRouterInfoLocally(peer);
if (info != null)
buf.append(" (" + info.getCapabilities() + ")");
buf.append("<td align=\"right\">").append(num(prof.getSpeedValue()));
//buf.append('/').append(num(prof.getOldSpeedValue()));
@@ -123,7 +127,9 @@ class ProfileOrganizerRenderer {
buf.append("</tr>");
}
buf.append("</table>");
buf.append("<i>Definitions:<ul>");
buf.append("<p><i>Definitions:<ul>");
buf.append("<li><b>groups</b>: as determined by the profile organizer</li>");
buf.append("<li><b>caps</b>: capabilities in the netDb, not used to determine profiles</li>");
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>");
buf.append("<li><b>capacity</b>: how many tunnels can we ask them to join in an hour?</li>");
buf.append("<li><b>integration</b>: how many new peers have they told us about lately?</li>");
@@ -131,8 +137,8 @@ class ProfileOrganizerRenderer {
buf.append("</ul></i>");
buf.append("Red peers prefixed with '--' means the peer is failing, and blue peers prefixed ");
buf.append("with '++' means we've sent or received a message from them ");
buf.append("in the last five minutes</i><br />");
buf.append("<b>Thresholds:</b><br />");
buf.append("in the last five minutes.</i><br />");
buf.append("<p><b>Thresholds:</b><br />");
buf.append("<b>Speed:</b> ").append(num(_organizer.getSpeedThreshold())).append(" (").append(fast).append(" fast peers)<br />");
buf.append("<b>Capacity:</b> ").append(num(_organizer.getCapacityThreshold())).append(" (").append(reliable).append(" high capacity peers)<br />");
buf.append("<b>Integration:</b> ").append(num(_organizer.getIntegrationThreshold())).append(" (").append(integrated).append(" well integrated peers)<br />");

View File

@@ -31,11 +31,11 @@ class FIFOBandwidthRefiller implements Runnable {
public static final String PROP_OUTBOUND_BANDWIDTH_PEAK = "i2np.bandwidth.outboundBurstKBytes";
//public static final String PROP_REPLENISH_FREQUENCY = "i2np.bandwidth.replenishFrequencyMs";
// no longer allow unlimited bandwidth - the user must specify a value, and if they do not, it is 16KBps
public static final int DEFAULT_INBOUND_BANDWIDTH = 16;
// no longer allow unlimited bandwidth - the user must specify a value, and if they do not, it is 32/16KBps
public static final int DEFAULT_INBOUND_BANDWIDTH = 32;
public static final int DEFAULT_OUTBOUND_BANDWIDTH = 16;
public static final int DEFAULT_INBOUND_BURST_BANDWIDTH = 16;
public static final int DEFAULT_OUTBOUND_BURST_BANDWIDTH = 16;
public static final int DEFAULT_INBOUND_BURST_BANDWIDTH = 48;
public static final int DEFAULT_OUTBOUND_BURST_BANDWIDTH = 32;
public static final int DEFAULT_BURST_SECONDS = 60;

View File

@@ -555,7 +555,8 @@ public class EventPumper implements Runnable {
con.setKey(key);
try {
NTCPAddress naddr = con.getRemoteAddress();
if (naddr.getPort() <= 0) throw new IOException("Invalid NTCP address: " + naddr);
if (naddr.getPort() <= 0)
throw new IOException("Invalid NTCP address: " + naddr);
InetSocketAddress saddr = new InetSocketAddress(naddr.getHost(), naddr.getPort());
boolean connected = con.getChannel().connect(saddr);
if (connected) {

View File

@@ -268,8 +268,8 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
try { wantsWrite = ( (_conKey.interestOps() & SelectionKey.OP_WRITE) != 0); } catch (Exception e) {}
int blocks = 0;
synchronized (_writeBufs) { blocks = _writeBufs.size(); }
if (_log.shouldLog(Log.ERROR))
_log.error("Too backlogged for too long (" + _consecutiveBacklog + " messages for " + DataHelper.formatDuration(queueTime()) + ", sched? " + wantsWrite + ", blocks: " + blocks + ") sending to " + _remotePeer.calculateHash().toBase64());
if (_log.shouldLog(Log.WARN))
_log.warn("Too backlogged for too long (" + _consecutiveBacklog + " messages for " + DataHelper.formatDuration(queueTime()) + ", sched? " + wantsWrite + ", blocks: " + blocks + ") sending to " + _remotePeer.calculateHash().toBase64());
_context.statManager().addRateData("ntcp.closeOnBacklog", getUptime(), getUptime());
close();
}
@@ -325,10 +325,12 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
int writeBufs = 0;
synchronized (_writeBufs) { writeBufs = _writeBufs.size(); }
if (_log.shouldLog(Log.WARN))
_log.warn("Too backlogged: queue time " + queueTime + " and the size is " + size
try {
_log.warn("Too backlogged: queue time " + queueTime + " and the size is " + size
+ ", wantsWrite? " + (0 != (_conKey.interestOps()&SelectionKey.OP_WRITE))
+ ", currentOut set? " + currentOutboundSet
+ ", writeBufs: " + writeBufs + " on " + toString());
} catch (Exception e) {} // java.nio.channels.CancelledKeyException
_context.statManager().addRateData("ntcp.sendBacklogTime", queueTime, size);
return true;
//} else if (size > 32) { // another arbitrary limit.

View File

@@ -167,8 +167,7 @@ public class InboundEstablishState {
int off = 0;
System.arraycopy(_receivedX, 0, signed, off, _receivedX.length);
off += _receivedX.length;
if (_sentY == null)
_sentY = getSentY();
getSentY();
System.arraycopy(_sentY, 0, signed, off, _sentY.length);
off += _sentY.length;
System.arraycopy(_aliceIP, 0, signed, off, _aliceIP.length);
@@ -300,6 +299,7 @@ public class InboundEstablishState {
off = 0;
System.arraycopy(_receivedX, 0, signed, off, _receivedX.length);
off += _receivedX.length;
getSentY();
System.arraycopy(_sentY, 0, signed, off, _sentY.length);
off += _sentY.length;
System.arraycopy(_aliceIP, 0, signed, off, _aliceIP.length);

View File

@@ -80,7 +80,7 @@ public class OutboundMessageDistributor {
_target = target;
_tunnel = id;
}
public String getName() { return "distribute outbound message"; }
public String getName() { return "Distribute outbound message"; }
public void runJob() {
RouterInfo info = getContext().netDb().lookupRouterInfoLocally(_target);
if (info != null) {

View File

@@ -338,14 +338,19 @@ public class TunnelDispatcher implements Service {
_log.debug("removing " + cfg);
boolean removed = false;
int numParticipants = 0;
synchronized (_participatingConfig) {
removed = (null != _participatingConfig.remove(recvId));
numParticipants = _participatingConfig.size();
}
if (!removed) {
if (_log.shouldLog(Log.WARN))
_log.warn("Participating tunnel, but no longer listed in participatingConfig? " + cfg);
}
_context.statManager().addRateData("tunnel.participatingTunnels", numParticipants, 0);
_context.statManager().addRateData("tunnel.participatingMessageCount", cfg.getProcessedMessagesCount(), 10*60*1000);
synchronized (_participants) {
removed = (null != _participants.remove(recvId));
}
@@ -357,8 +362,6 @@ public class TunnelDispatcher implements Service {
synchronized (_outboundEndpoints) {
removed = (null != _outboundEndpoints.remove(recvId));
}
_context.statManager().addRateData("tunnel.participatingMessageCount", cfg.getProcessedMessagesCount(), 10*60*1000);
}
/**
@@ -635,32 +638,41 @@ public class TunnelDispatcher implements Service {
_times = new ArrayList(128);
}
private static final int LEAVE_BATCH_TIME = 10*1000;
public void add(HopConfig cfg) {
Long dropTime = new Long(cfg.getExpiration() + 2*Router.CLOCK_FUDGE_FACTOR);
Long dropTime = new Long(cfg.getExpiration() + 2*Router.CLOCK_FUDGE_FACTOR + LEAVE_BATCH_TIME);
boolean noTunnels;
synchronized (LeaveTunnel.this) {
noTunnels = _configs.size() <= 0;
_configs.add(cfg);
_times.add(dropTime);
}
// Make really sure we queue or requeue the job only when we have to, or else bad things happen.
// Locking around this part may not be sufficient but there was nothing before.
// Symptom is the Leave Participant job not running for 12m, leading to seesaw participating tunnel count
long oldAfter = getTiming().getStartAfter();
long oldStart = getTiming().getActualStart();
if ( noTunnels || (oldAfter <= 0) ||
(oldAfter < getContext().clock().now() && oldAfter <= oldStart) || // if oldAfter > oldStart, it's late but it will run, so don't do this (race)
(oldAfter >= dropTime.longValue()) ) {
getTiming().setStartAfter(dropTime.longValue());
getContext().jobQueue().addJob(LeaveTunnel.this);
} else {
// already scheduled for the future, and before this expiration
}
}
if (_log.shouldLog(Log.INFO)) {
long now = getContext().clock().now();
_log.info("Scheduling leave in " + DataHelper.formatDuration(dropTime.longValue()-now) +": " + cfg);
}
long oldAfter = getTiming().getStartAfter();
if ( (oldAfter <= 0) || (oldAfter < getContext().clock().now()) || (oldAfter >= dropTime.longValue()) ) {
getTiming().setStartAfter(dropTime.longValue());
getContext().jobQueue().addJob(LeaveTunnel.this);
} else {
// already scheduled for the future, and before this expiration
}
}
public String getName() { return "Leave participant"; }
public void runJob() {
HopConfig cur = null;
Long nextTime = null;
long now = getContext().clock().now();
long now = getContext().clock().now() + LEAVE_BATCH_TIME; // leave all expiring in next 10 sec
while (true) {
synchronized (LeaveTunnel.this) {
if (_configs.size() <= 0)
@@ -685,8 +697,10 @@ public class TunnelDispatcher implements Service {
}
if (nextTime != null) {
getTiming().setStartAfter(nextTime.longValue());
getContext().jobQueue().addJob(LeaveTunnel.this);
synchronized (LeaveTunnel.this) {
getTiming().setStartAfter(nextTime.longValue());
getContext().jobQueue().addJob(LeaveTunnel.this);
}
}
}
}

View File

@@ -224,6 +224,10 @@ class BuildHandler {
for (int i = 0; i < cfg.getLength(); i++) {
Hash peer = cfg.getPeer(i);
int record = order.indexOf(new Integer(i));
if (record < 0) {
_log.error("Bad status index " + i);
return;
}
int howBad = statuses[record];
if (_log.shouldLog(Log.INFO))
_log.info(msg.getUniqueId() + ": Peer " + peer.toBase64() + " replied with status " + howBad);

View File

@@ -19,31 +19,17 @@ class ExpireJob extends JobImpl {
// so we rebuild out of sync. otoh, we will honor tunnel messages on it
// up through the full lifetime of the tunnel, plus a clock skew, since
// others may be sending to the published lease expirations
// Also skew the inbound away from the outbound
long expire = cfg.getExpiration();
_dropAfter = expire + Router.CLOCK_FUDGE_FACTOR;
expire -= ctx.random().nextLong(5*60*1000);
expire -= ctx.random().nextLong(60*1000);
if (_pool.getSettings().isInbound())
expire -= ctx.random().nextLong(15*1000);
cfg.setExpiration(expire);
getTiming().setStartAfter(expire);
}
public String getName() {
if (_pool.getSettings().isExploratory()) {
if (_pool.getSettings().isInbound()) {
return "Expire exploratory inbound tunnel";
} else {
return "Expire exploratory outbound tunnel";
}
} else {
StringBuffer rv = new StringBuffer(32);
if (_pool.getSettings().isInbound())
rv.append("Expire inbound client tunnel for ");
else
rv.append("Expire outbound client tunnel for ");
if (_pool.getSettings().getDestinationNickname() != null)
rv.append(_pool.getSettings().getDestinationNickname());
else
rv.append(_pool.getSettings().getDestination().toBase64().substring(0,4));
return rv.toString();
}
return "Expire tunnel";
}
public void runJob() {
if (!_leaseUpdated) {

View File

@@ -43,9 +43,11 @@ public abstract class TunnelPeerSelector {
else
length -= off;
}
if (length < 0)
length = 0;
}
if (length < 0)
length = 0;
if (length > 8) // as documented in tunnel.html
length = 8;
/*
if ( (ctx.tunnelManager().getOutboundTunnelCount() <= 0) ||
(ctx.tunnelManager().getFreeTunnelCount() <= 0) ) {

View File

@@ -1,5 +1,6 @@
package net.i2p.router.tunnel.pool;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
@@ -16,6 +17,8 @@ import net.i2p.router.RouterContext;
import net.i2p.router.TunnelPoolSettings;
import net.i2p.router.TunnelInfo;
import net.i2p.router.tunnel.HopConfig;
import net.i2p.stat.Rate;
import net.i2p.stat.RateStat;
import net.i2p.util.Log;
/**
@@ -36,7 +39,8 @@ public class TunnelPool {
private long _started;
private long _lastRateUpdate;
private long _lastLifetimeProcessed;
private String _rateName;
private final String _rateName;
private static final int TUNNEL_LIFETIME = 10*60*1000;
public TunnelPool(RouterContext ctx, TunnelPoolManager mgr, TunnelPoolSettings settings, TunnelPeerSelector sel) {
_context = ctx;
@@ -148,25 +152,46 @@ public class TunnelPool {
// if there are nonzero hop tunnels and the zero hop tunnels are fallbacks,
// avoid the zero hop tunnels
TunnelInfo backloggedTunnel = null;
if (avoidZeroHop) {
for (int i = 0; i < _tunnels.size(); i++) {
TunnelInfo info = (TunnelInfo)_tunnels.get(i);
if ( (info.getLength() > 1) && (info.getExpiration() > _context.clock().now()) ) {
_lastSelected = info;
return info;
// avoid outbound tunnels where the 1st hop is backlogged
if (_settings.isInbound() || !_context.commSystem().isBacklogged(info.getPeer(1))) {
_lastSelected = info;
return info;
} else {
backloggedTunnel = info;
}
}
}
// return a random backlogged tunnel
if (backloggedTunnel != null) {
if (_log.shouldLog(Log.WARN))
_log.warn(toString() + ": All tunnels are backlogged");
return backloggedTunnel;
}
}
// ok, either we are ok using zero hop tunnels, or only fallback tunnels remain. pick 'em
// randomly
for (int i = 0; i < _tunnels.size(); i++) {
TunnelInfo info = (TunnelInfo)_tunnels.get(i);
if (info.getExpiration() > _context.clock().now()) {
//_log.debug("Selecting tunnel: " + info + " - " + _tunnels);
_lastSelected = info;
return info;
// avoid outbound tunnels where the 1st hop is backlogged
if (_settings.isInbound() || info.getLength() <= 1 ||
!_context.commSystem().isBacklogged(info.getPeer(1))) {
//_log.debug("Selecting tunnel: " + info + " - " + _tunnels);
_lastSelected = info;
return info;
} else {
backloggedTunnel = info;
}
}
}
// return a random backlogged tunnel
if (backloggedTunnel != null)
return backloggedTunnel;
if (_log.shouldLog(Log.WARN))
_log.warn(toString() + ": after " + _tunnels.size() + " tries, no unexpired ones were found: " + _tunnels);
}
@@ -431,6 +456,17 @@ public class TunnelPool {
public long getLifetimeProcessed() { return _lifetimeProcessed; }
/**
* Keep a separate stat for each type, direction, and length of tunnel.
*/
private final String buildRateName() {
if (_settings.isExploratory())
return "tunnel.buildRatio.exploratory." + (_settings.isInbound() ? "in" : "out");
else
return "tunnel.buildRatio.l" + _settings.getLength() + "v" + _settings.getLengthVariance() +
(_settings.isInbound() ? ".in" : ".out");
}
/**
* Gather the data to see how many tunnels to build, and then actually compute that value (delegated to
* the countHowManyToBuild function below)
@@ -445,6 +481,115 @@ public class TunnelPool {
boolean allowZeroHop = ((getSettings().getLength() + getSettings().getLengthVariance()) <= 0);
/**
* This algorithm builds based on the previous average length of time it takes
* to build a tunnel. This average is kept in the _buildRateName stat.
* It is a separate stat for each pool, since in and out building use different methods,
* and each pool can have separate length and length variance settings.
* We add one minute to the stat for safety.
*
* We linearly increase the number of builds per expiring tunnel from
* 1 to PANIC_FACTOR as the time-to-expire gets shorter.
*
* The stat will be 0 for first 10m of uptime so we will use the conservative algorithm
* further below instead. It will take about 30m of uptime to settle down.
* Or, if we are building more than 33% of the time something is seriously wrong,
* we also use the conservative algorithm instead
*
**/
// Compute the average time it takes us to build a single tunnel of this type.
int avg = 0;
RateStat rs = _context.statManager().getRate(buildRateName());
if (rs == null) {
// Create the RateStat here rather than at the top because
// the user could change the length settings while running
_context.statManager().createRateStat(buildRateName(),
"Tunnel Build Frequency", "Tunnels",
new long[] { TUNNEL_LIFETIME });
rs = _context.statManager().getRate(buildRateName());
}
if (rs != null) {
Rate r = rs.getRate(TUNNEL_LIFETIME);
if (r != null)
avg = (int) ( TUNNEL_LIFETIME * r.getAverageValue() / wanted);
}
if (avg > 0 && avg < TUNNEL_LIFETIME / 3) {
final int PANIC_FACTOR = 4; // how many builds to kick off when time gets short
avg += 60*1000; // one minute safety factor
if (_settings.isExploratory())
avg += 60*1000; // two minute safety factor
long now = _context.clock().now();
int expireSoon = 0;
int expireLater = 0;
int expireTime[];
int fallback = 0;
synchronized (_tunnels) {
expireTime = new int[_tunnels.size()];
for (int i = 0; i < _tunnels.size(); i++) {
TunnelInfo info = (TunnelInfo)_tunnels.get(i);
if (allowZeroHop || (info.getLength() > 1)) {
int timeToExpire = (int) (info.getExpiration() - now);
if (timeToExpire > 0 && timeToExpire < avg) {
expireTime[expireSoon++] = timeToExpire;
} else {
expireLater++;
}
} else if (info.getExpiration() - now > avg) {
fallback++;
}
}
}
int inProgress;
synchronized (_inProgress) {
inProgress = _inProgress.size();
}
int remainingWanted = (wanted - expireLater) - inProgress;
if (allowZeroHop)
remainingWanted -= fallback;
int rv = 0;
int latesttime = 0;
if (remainingWanted > 0) {
if (remainingWanted > expireSoon) {
rv = PANIC_FACTOR * (remainingWanted - expireSoon); // for tunnels completely missing
remainingWanted = expireSoon;
}
// add from 1 to PANIC_FACTOR builds, depending on how late it is
// only use the expire times of the latest-expiring tunnels,
// the other ones are extras
for (int i = 0; i < remainingWanted; i++) {
int latestidx = 0;
// given the small size of the array this is efficient enough
for (int j = 0; j < expireSoon; j++) {
if (expireTime[j] > latesttime) {
latesttime = expireTime[j];
latestidx = j;
}
}
expireTime[latestidx] = 0;
if (latesttime > avg / 2)
rv += 1;
else
rv += 2 + ((PANIC_FACTOR - 2) * (((avg / 2) - latesttime) / (avg / 2)));
}
}
if (rv > 0 && _log.shouldLog(Log.DEBUG))
_log.debug("New Count: rv: " + rv + " allow? " + allowZeroHop
+ " avg " + avg + " latesttime " + latesttime
+ " soon " + expireSoon + " later " + expireLater
+ " std " + wanted + " inProgress " + inProgress + " fallback " + fallback
+ " for " + toString());
_context.statManager().addRateData(buildRateName(), rv + inProgress, 0);
return rv;
}
// fixed, conservative algorithm - starts building 3 1/2 - 6m before expiration
// (210 or 270s) + (0..90s random)
long expireAfter = _context.clock().now() + _expireSkew; // + _settings.getRebuildPeriod() + _expireSkew;
int expire30s = 0;
int expire90s = 0;
@@ -491,8 +636,11 @@ public class TunnelPool {
}
}
return countHowManyToBuild(allowZeroHop, expire30s, expire90s, expire150s, expire210s, expire270s,
int rv = countHowManyToBuild(allowZeroHop, expire30s, expire90s, expire150s, expire210s, expire270s,
expireLater, wanted, inProgress, fallback);
_context.statManager().addRateData(buildRateName(), (rv > 0 || inProgress > 0) ? 1 : 0, 0);
return rv;
}
/**
@@ -590,7 +738,7 @@ public class TunnelPool {
if ( (lifetime < 60*1000) && (rv + inProgress + fallback >= standardAmount) )
rv = standardAmount - inProgress - fallback;
if (_log.shouldLog(Log.DEBUG))
if (rv > 0 && _log.shouldLog(Log.DEBUG))
_log.debug("Count: rv: " + rv + " allow? " + allowZeroHop
+ " 30s " + expire30s + " 90s " + expire90s + " 150s " + expire150s + " 210s " + expire210s
+ " 270s " + expire270s + " later " + expireLater