Compare commits

...

2258 Commits

Author SHA1 Message Date
dfb8830802 0.9.23 2015-11-19 00:31:15 +00:00
9483e095d9 build.xml: Stop building SUD and SU2 update files in "ant release" (ticket #1709) 2015-11-19 00:30:22 +00:00
bbaa6f7f87 Tweaks after review 2015-11-16 19:32:00 +00:00
046ef07efd -29-rc 2015-11-15 19:12:53 +00:00
fc7939b404 Translation updates 2015-11-15 19:12:05 +00:00
dd6a3f14ec geoip updates based on Maxmind GeoLite Country database from 2015-11-03. 2015-11-15 19:07:08 +00:00
7a75e2e662 up version for interrupt() 2015-11-13 23:32:55 +00:00
e6644236ed Interrupt when cancelling events 2015-11-13 23:28:02 +00:00
zzz
8a1f02aa89 Console: Fix lifetime participating bandwidth display (ticket #1706)
Add locking to HopConfig counts
Split participatingMessageCount stat into two stats,
participatingMessageCountAvgPerTunnel for throttle (same as old participatingMessagecount)
and participatingMessageCount for console (straight total)
Fix calculation of stat for throttle by adjusting for new
stat coalesce time (50 not 20 seconds)
2015-11-13 21:18:21 +00:00
zzz
a028bba997 Console: Fix filtering and escaping on /configclients
Fix autostart setting on new client, was inverted
2015-11-12 20:39:58 +00:00
e93e76a362 Remove netdb.rows.io and its associated certs
The DNS record for the subdomain was removed about a month ago.
2015-11-11 16:36:32 +00:00
zzz
3fa2fb4c8d Timers: State fix 4th try (tickets #1694, #1705)
log tweaks
2015-11-11 13:38:24 +00:00
zzz
ffddf415c0 snark add .cue mime type 2015-11-11 13:23:04 +00:00
zzz
03a99adaab snark increase max pieces 2015-11-11 13:22:35 +00:00
zzz
48f294024c snark log tweak 2015-11-11 13:20:42 +00:00
123b4ca460 Fix locking on _nextExpire field 2015-11-09 17:48:19 +00:00
c944fcce96 log if we can't cancel the future 2015-11-09 17:44:54 +00:00
zzz
077c4a073f replaceAll -> replace 2015-11-07 12:47:31 +00:00
zzz
f5bf4ec8ea escape referer 2015-11-07 12:06:56 +00:00
c901010d96 Make parameters of NegativeLookupCache configurable 2015-11-07 02:56:59 +00:00
9f0f1f5ec8 Make more ISJ parameters configurable 2015-11-07 02:46:33 +00:00
7175b1cdb9 Make the search limit configurable 2015-11-07 02:22:17 +00:00
ca4642e0f0 Reduce the memory footprint of Rate objects by changing longs to ints and doubles to floats 2015-11-06 20:19:43 +00:00
6bb156a436 Do not expose ISJ lock 2015-11-06 19:01:44 +00:00
zzz
19090343ba add more links in README 2015-11-06 14:16:25 +00:00
zzz
b15138dd67 i2pwiki.i2p icon
license: creative commons
2015-11-06 01:42:43 +00:00
zzz
5f50f23fe1 Streaming: Split blacklist into one for EC and one for Ed 2015-11-05 21:37:21 +00:00
zzz
d5e2defb5f synch fix 2015-11-05 21:34:47 +00:00
zzz
c1d77dfe5c I2CP: Fix additional connections getting rejected during tunnel open (ticket #1650)
State change cleanups
State checking consolidation
2015-11-05 21:18:01 +00:00
zzz
eca234c187 i2ptunnel: Add longer tunnel options in advanced mode 2015-11-05 20:24:12 +00:00
zzz
1a6074a62b Add lenta.i2p icon, public domain 2015-11-05 17:09:52 +00:00
9baeedbc27 merge of '380c87670c1c931cf39e93d5600c4954c6e13d1e'
and '4fe47402bea065caae229256d58d87e60607602a'
2015-11-04 22:22:58 +00:00
3f91e448c0 Add serialization methods to StatManager, FrequencyStat and Frequency
for easier collection
2015-11-04 21:41:33 +00:00
zzz
3e25ff251b Console: Add new home page links as approved at meeting
exchanged.i2p icon license: WTFPL
i2pwiki.i2p and lenta.i2p: Awaiting icons that meet our requirements
2015-11-04 15:08:44 +00:00
zzz
f8830a759e Threads: More conversions to I2PAppThread 2015-11-04 15:01:56 +00:00
zzz
b15ea8ba2f Timers: Improve OutboundMessageRegistry locking
SimpleTimer2 cleanups
possible fix for ticket #1694
2015-11-04 14:57:07 +00:00
zzz
ef428d559e merge of '7db2f97711361f598cb14aa579cb008ac8438577'
and 'cb9b4af48ca3c515eeddd44aefc040857a109b05'
2015-11-04 14:50:17 +00:00
39d749ba16 Fixed generation of eepget target filenames for basic page URLs, URLs with query parameters, certain edge cases. 2015-11-02 17:27:04 +00:00
zzz
a3a092a454 Utils: Double IP lookup cache size (ticket #1700) 2015-11-01 19:31:22 +00:00
zzz
787921aa89 spelling 2015-11-01 17:29:20 +00:00
zzz
bbb6da2ac6 cleanups, javadoc 2015-11-01 16:47:59 +00:00
zzz
b7dc55e326 checklist update 2015-11-01 00:45:30 +00:00
zzz
805979b987 UPnP: Fix deadlock in callbacks (ticket #1699)
possibly more to do
2015-10-31 22:58:51 +00:00
zzz
c37cc7ad52 Convert remaining Threads to I2PThread or I2PAppThread 2015-10-31 19:13:57 +00:00
zzz
02c1417cc5 update ancient snark docs 2015-10-31 14:20:10 +00:00
zzz
627d0d29db Router: Fix cascading I2CP error (ticket #1692)
caused by not setting message ID.
only happens when serialized (external I2CP)
2015-10-30 16:53:45 +00:00
zzz
c595895877 i2psnark: More consistency and torrent links in messages 2015-10-21 13:22:32 +00:00
zzz
6efce31eed Increase timer thread priority 2015-10-21 13:11:35 +00:00
zzz
f713a19785 Disable TLS_DHE_DSS_WITH_AES_128_CBC_SHA 2015-10-17 20:13:03 +00:00
zzz
abc0f4c720 lint core, console, i2ptunnel, jetty 2015-10-17 17:38:57 +00:00
zzz
71bc55b470 lint core, i2psnark, jetty, susimail 2015-10-17 16:49:37 +00:00
zzz
5f175455c7 lint console,streaming 2015-10-17 15:47:49 +00:00
zzz
9bddba56a0 lint router 2015-10-17 14:38:02 +00:00
zzz
4e6ddfcea3 lint core 2015-10-17 14:01:08 +00:00
zzz
3411a7c884 Crypto: Consolidate duplicate unlimited strength crypto check code 2015-10-17 12:55:39 +00:00
zzz
70921a2b09 i2psnark: Don't balloon files on ARM (ticket #1684) 2015-10-16 22:17:09 +00:00
zzz
dd36176997 big fat Java 6 warning 2015-10-16 21:38:12 +00:00
zzz
fe26052189 add mime type for .mka 2015-10-16 20:54:12 +00:00
zzz
ba1488bcce i2psnark: Add "smart sort" option, set sort based on language (tickets #637, #1303) 2015-10-16 19:45:23 +00:00
zzz
39b218b216 i2psnark: Fix deadlock (ticket #1432) 2015-10-16 14:25:55 +00:00
zzz
b43417bf77 update jetty javadoc link 2015-10-15 18:59:37 +00:00
zzz
649a63db6f Update: Fix persistence of the available dev version
Java 7 check at startup with persisted versions
2015-10-14 19:18:10 +00:00
zzz
6aa8ed1280 Update: Require Java 7 to download dev builds 2015-10-14 18:22:35 +00:00
zzz
9224afb78d i2psnark: Don't show empty fields on details page 2015-10-13 21:38:19 +00:00
zzz
5e879b85a8 fix installer build 2015-10-13 19:49:18 +00:00
zzz
2c03b434e1 Startup: Delete our old RI from netDB when rekeying 2015-10-13 19:24:30 +00:00
zzz
55a6f44651 Crypto: Test for broken Gentoo ECDSA support
Add SystemVersion.isJava9()
2015-10-11 15:39:28 +00:00
zzz
971a2652e3 adjust date in warning 2015-10-10 19:53:34 +00:00
zzz
68aa8800b6 increase rekey probability 2015-10-10 15:45:54 +00:00
zzz
dd4d12f287 i2psnark: Increase max piece size to 16 MB, max files to 999,
close files faster based on file count (tickets #1626, #1671)
Remove dup synchs
2015-10-10 14:02:48 +00:00
zzz
7063609f05 JobQueue: Only adjust timing for negative clock shifts 2015-10-10 13:33:46 +00:00
zzz
b32c8d5fa4 NamingServices: Add support for lookups prefixed with "www." 2015-10-10 12:29:52 +00:00
zzz
419d6a8e18 SimpleTimer2: Additional fix for uncaught IllegalStateException
affecting streaming timers (ticket #1672)
Minor streaming cleanup
2015-10-08 13:42:31 +00:00
03f9df4ff0 JobQueue: Listen to clock shifts as well as clock changes (ticket #1014).
Restarter: Don't restart the JobQueue or PeerManager (ticket #1014)/undo previous commit.
More to do.
2015-10-04 15:17:26 +00:00
zzz
f4a6cf2002 Show 'none' if no part. tunnels on /tunnels 2015-10-03 14:06:12 +00:00
zzz
f93da93cf0 Router: Minor cleanup, remove some deprecated and small methods 2015-10-02 13:45:42 +00:00
zzz
b068f9a262 Router: Don't check config files for reload on Android 2015-10-02 13:43:54 +00:00
5fa059b4a8 Adding the new reseed server hosted by our friends at TorontoCrypto. Thanks. :) 2015-09-29 19:41:01 +00:00
2f92b27446 Ticket #1596 - part 2
Removing 193.150.121.66 as a reseed host from the source and its certificate.
2015-09-29 19:30:13 +00:00
zzz
5d345f65a3 SusiDNS: Hide table headers and buttons if there are no search results 2015-09-28 16:58:18 +00:00
zzz
ccc8c04782 i2psnark: Support adding plain base 32 hashes
convert plain hashes to upper case
2015-09-28 14:52:55 +00:00
zzz
58ccfed41d Addressbook:
- Use Patterns instead of replaceAll()
- Fix isValidDest() for EC/Ed dests
2015-09-28 14:50:53 +00:00
zzz
59b05d4214 Util: Speed up IP address validation by using Apache's implementation (ticket #1198) 2015-09-27 21:54:14 +00:00
f46a902256 Router: Fix soft restarts for 'massive' clock jumps (over +150s or -61s) and recover from standby/hibernate (ticket #1014).
I2P should now recover (better) from a system hibernate/standby and be able to reconnect to peers automatically.
2015-09-27 21:15:51 +00:00
zzz
39b810bd79 Tunnels: Use max of 2 not-failing peers in an exploratory tunnel,
use high cap for the rest; change outbound exploratory
default length from 2 + 0-1 to 3+0.
2015-09-27 16:01:22 +00:00
zzz
22417715e7 javadoc 2015-09-27 15:58:47 +00:00
zzz
d21777fbc1 log tweak 2015-09-27 15:57:53 +00:00
zzz
b22a6bc163 log tweak 2015-09-27 15:57:22 +00:00
zzz
1c3527e1a4 Console:
- Export SSL cert on creation
 - new /certs page to show local SSL certs
2015-09-27 15:56:03 +00:00
zzz
4d7ad6ef7f Console: show 'none' if no leases
log timing for /netdb (ticket #1532)
2015-09-27 15:53:37 +00:00
zzz
3ea8b477d8 Streaming: Move throttler from context timer to streaming timer 2015-09-27 15:14:18 +00:00
zzz
ea4dd12bff SimpleTimer2:
- Fix bug in forceReschedule() that caused subsequent uncaught IllegalStateException;
    forceReschedule() is only used by streaming timers
  - Log uncaught exceptions
  - Enforce 5 second minimum delay for periodic events
  - atomic count
  - de-wtf
2015-09-27 15:10:59 +00:00
a13552dd8d Fix news (ant poupdate), typos in bundle-* 2015-09-25 21:49:47 +00:00
89c14c2e9a javadoc 2015-09-25 20:21:03 +00:00
22b9876b68 Rename _() for translation to _t() for Java 9 compatibility (ticket #1456) 2015-09-25 19:55:36 +00:00
zzz
04690bed9f close before rename 2015-09-24 19:08:36 +00:00
zzz
0faa5ba2f4 i2psnark:
- Rename bad .torrent files instead of deleting them
  - Add mime type for .xz
2015-09-24 18:28:26 +00:00
zzz
04d653a8b9 comment out main() 2015-09-21 15:21:54 +00:00
zzz
3f213cf1db register I2CP with the PortMapper 2015-09-21 15:13:39 +00:00
zzz
53ae727935 synch fix 2015-09-21 14:54:08 +00:00
zzz
62acfc0cae use standard error message 2015-09-21 12:35:39 +00:00
5a2f22b00f history 2015-09-20 19:34:10 +00:00
7dd438b5f0 bump 2015-09-20 19:29:47 +00:00
6685b81834 /configreseed: Add 'Reset URL list' button for revert to default hosts (ticket #1554, thanks dzirtt@gmail.com) 2015-09-20 19:28:11 +00:00
c56f686d8c Fix typo. 2015-09-20 19:23:50 +00:00
zzz
b81cbedd5c format multiplies by 100, so complete is 1.0 2015-09-20 11:08:27 +00:00
zzz
02a0ef3526 include man pages in the update 2015-09-20 00:44:51 +00:00
zzz
cfc0664756 Don't try to fetch subscriptions, news, or plugin updates while in VM Comm system 2015-09-19 19:06:07 +00:00
zzz
2a3b55f3a4 i2psnark: Add check progress output 2015-09-19 17:54:07 +00:00
zzz
287f94ad19 i2psnark: Add recheck/start/stop buttons to details page (ticket #372)
remove dup CSS item
2015-09-19 17:05:09 +00:00
zzz
462c882f4e i2psnark: Improve directory listing efficiency (ticket #1079) 2015-09-18 22:54:32 +00:00
zzz
b8a909c4cc Fix eepget man page (ticket #1631)
retry default was changed to 0 a while ago
2015-09-18 20:43:54 +00:00
zzz
83791b2d10 i2psnark: Don't display "Tracker Error" if torrent is stopped (ticket #1654) 2015-09-18 20:15:06 +00:00
zzz
ff420278c5 only log once 2015-09-18 20:08:40 +00:00
zzz
1a385b6dca i2ptunnel:
- Pass Accept-Encoding header through HTTP client and server proxies,
   to allow end-to-end compression
 - Don't do transparent response compression if response
   Content-Encoding indicates it is already compressed
 - Minor encoding cleanups
EepGet:
 - Send Accept-Encoding: gzip even when proxied
 - Minor cleanups
2015-09-18 18:15:32 +00:00
zzz
64889b2bc2 Streaming: Move remaining timers from the context to streaming's SimpleTimer2;
these were the ones migrated from SimpleScheduler earlier
2015-09-18 14:36:49 +00:00
zzz
bfc6534b20 Don't delete torrent config file after error on initial startup (ticket #1658) 2015-09-17 21:20:21 +00:00
zzz
84abfa0190 Store magnet parameters across restart (ticket #1485) 2015-09-17 20:19:10 +00:00
zzz
d5a0d95c61 news appearance tweaks 2015-09-17 19:51:01 +00:00
zzz
1de840ce59 Profiles: Bias slightly away from floodfills 2015-09-16 21:07:46 +00:00
zzz
0f6176b7bf News: Add author to entry headers 2015-09-16 17:26:03 +00:00
zzz
3d533a406d News:
- Fix retrieval of entry links from feed
 - Linkify entry headers
2015-09-16 16:42:24 +00:00
zzz
37597b8c7d Build:
- Include geoip in update files for next release
 - Add created-by string to release torrents
i2psnark:
 - Store torrent added and completed times in config files, display on details page
 - Display dates on details page in local time zone
 - Add metainfo creation command line support for created-by string
2015-09-16 14:21:02 +00:00
zzz
addc9c5ca3 News: connect it all together (ticket #1425):
- Enable new NewsManager to load/store feed items on disk by UUID
 - News items are stored forever, not lost when they are removed from feed
 - News read in once at startup, not at every summary bar refresh
 - Convert old initialNews.xml and news.xml to NewsEntry format
 - Limit display to 2 news items in summary bar, /home and /console
 - New /news page to show all news
2015-09-15 13:33:29 +00:00
zzz
a2e38503fe News: New /news page and helper to show all news
WIP, not yet hooked in
2015-09-14 16:15:21 +00:00
zzz
7912d7650d News: new NewsManager to maintain current news entries.
WIP, not yet hooked in.
2015-09-14 14:49:20 +00:00
zzz
6f5739b9d8 News: Store/load individual news entries as XML in separate files by UUID.
WIP, not yet hooked in.
2015-09-14 11:06:35 +00:00
zzz
ed3e444d1e log tweak 2015-09-13 13:38:19 +00:00
zzz
ac1a28e988 print usage if no arg 2015-09-13 13:34:51 +00:00
zzz
7117438b04 RIP ugha 2015-09-13 13:34:10 +00:00
zzz
d5cbccf186 checklist update 2015-09-13 13:33:00 +00:00
zzz
fd606064d9 0.9.22 2015-09-12 13:55:30 +00:00
zzz
9d05424202 Router: Reduce rekey probability from 10% to 5% 2015-09-11 13:24:10 +00:00
157d494dee bump build to -8-rc 2015-09-11 00:54:45 +00:00
fa792a9d5e GeoIP db updates from 2015-09-02. 2015-09-11 00:54:03 +00:00
ab134261f0 Translation updates from Transifex 2015-09-11 00:53:13 +00:00
de2431e9ee Fix auto-start of new .torrents in the Snark folder 2015-09-07 18:18:16 +00:00
c4cbd7d5c4 (hopefully temporarily) disable netdb.rows.io as it's been down for nearly a month. 2015-09-06 08:01:28 +00:00
zzz
e978bb81a0 checked in correct file 2015-09-05 14:02:21 +00:00
zzz
2c6edf401f add extra to bumpBuild output after change 2015-09-04 21:15:48 +00:00
zzz
fe69d3b8f7 UPnP: Fix "content not allowed in trailing section" (tickets #481, #1653)
patch from 'kay" in #1653, dev agreement received
2015-09-04 21:05:38 +00:00
61edd01e3d Switch URL/certificate for backup's reseed server 2015-09-04 18:44:05 +00:00
zzz
483d7c43ee Router: Change thread name so it truncates better (ticket #1648) 2015-09-01 11:56:58 +00:00
zzz
7c703953be Data: Cache P256 and Ed255i9 key certificates
- Enable P256 caching
 - Create cached Ed25519 cert and enable
 - Fix cached P256 hashcode
2015-08-31 13:25:58 +00:00
zzz
f577a94012 i2psnark: Change default sig type to Ed25519 2015-08-31 13:19:29 +00:00
zzz
b10b8581cc Router:
- Change default RI sig type to Ed25519, with a 10% chance od
     rekeying from DSA at each restart
   - Don't initialize KeyManager before selecting sig type
   - Don't log KeyManager error when changing sig type
2015-08-29 14:20:13 +00:00
zzz
601376561b add Closeable/Flushable interfaces 2015-08-27 14:36:19 +00:00
zzz
5a11a28a35 i2psnark:
- Return partial piece to coordinator after reject
   - Fix tracking of downloaded portion of piece after reject
   - Send reject on receipt of bad request
   - Mark piece unrequested after receiving bad data, so it
     will be requested again, but not from the same peer
   - Fix NPE in Request constructor on error
   - Fix stuck before completion due to reject handling (ticket #1633)
2015-08-24 17:30:32 +00:00
fde0ae8349 sync debian/changelog with packaged version 2015-08-02 15:06:50 +00:00
b5944045fb sync apparmor rules with the 0.9.21 package 2015-08-02 15:04:08 +00:00
zzz
ecd0231cd0 Fix console SSL excluded ciphers (thx lazyg)
Fix typo in local address in I2PSSLSocketFactory
Another findbugs char encoding fix
Add keystore password option to SU3File command line
2015-08-02 12:58:00 +00:00
zzz
44b35f328b 0.9.21 2015-07-31 14:22:03 +00:00
zzz
f3bb20d750 minor updates after review 2015-07-30 20:41:45 +00:00
20cb284f9d update geoip, bump to -23-rc 2015-07-30 17:03:46 +00:00
b4993d42b3 updated i2prouter po files (deb related) 2015-07-30 07:11:45 +00:00
9b466f3261 refresh debian patch so my automated update builds will run again 2015-07-30 06:52:18 +00:00
zzz
0bf9cb3bf2 add news cert 2015-07-28 13:55:10 +00:00
zzz
9efe60d7a8 Fix processing of translated news 2015-07-27 18:10:01 +00:00
zzz
d848a19ab0 update translations, bump -20-rc 2015-07-26 14:22:33 +00:00
zzz
bfde521cf9 NetDB: Fix NPE (ticket #1619) 2015-07-25 13:37:45 +00:00
zzz
fea6b8aec3 i2psnark: Fix total_size in metadata message (ticket #1618) 2015-07-25 13:15:56 +00:00
1681598dec merge of '30be1cda5a1ad30d33bbd355f4d85785a889c9fb'
and '8ec6b122079156e35f7515afa5eb433a13ce41b0'
2015-07-23 01:31:39 +00:00
809a533573 Updated history 2015-07-23 01:22:12 +00:00
265e4b58a5 Throw DataFormatException if not enough bytes 2015-07-23 01:15:11 +00:00
93854e93b5 bump -18-rc 2015-07-22 23:36:19 +00:00
f6605d05d9 merge of '1ba9885122d9a9ec69c77342719d8464aae244be'
and 'c61353ade089ac0e1fa83fab661dc6893b51b95a'
2015-07-22 23:34:32 +00:00
c20772702a I2PSnark: Don't let tunnels start unless we're starting torrents (regression, #766) 2015-07-22 22:05:44 +00:00
ba5af15c6f Fix KeyCert bug 2015-07-21 01:19:37 +00:00
9af197e590 Add KeyCert test that fails 2015-07-21 01:19:23 +00:00
2f59a4b3e6 Fix test 2015-07-21 00:40:35 +00:00
63e934f8f2 Update English PO files 2015-07-17 01:36:45 +00:00
zzz
dd5f804150 Console: Add dates to news headings
Spacing for news headings in summary bar
2015-07-16 18:06:48 +00:00
35b0e99ff0 I2PSnark: Fix torrent-stopping (#766) 2015-07-14 14:33:41 +00:00
zzz
1ed1e4414b Findbugs all over #4
char encoding
2015-07-12 19:19:32 +00:00
zzz
d087fd674b Findbugs all over #3
char encoding, remove FileReader/FileWriter
Fix TunnelConfig bug
2015-07-12 16:34:24 +00:00
zzz
1f9bb046f5 Findbugs all over #2
Mostly char encoding
Use StringWriter rather than OSW->BAOS->String
2015-07-12 16:06:49 +00:00
zzz
914cc120ad Findbugs all over 2015-07-12 14:02:55 +00:00
631a0674ab bump 2015-07-08 21:26:13 +00:00
17d26976d5 lang fixups 2015-07-08 21:25:33 +00:00
dc9d60e261 I2PSnark:
- Fix NPE (#1615, h/t kytv)
- Fix start/stop status resumption on restart (#766, h/t backup)
2015-07-08 21:22:45 +00:00
zzz
2c191e7bf8 Tunnels: New Bloom filter size, increase bandwidth limit (ticket #1505) 2015-07-08 13:40:26 +00:00
zzz
817888c23c i2psnark: Tweak dest display in footer 2015-07-07 18:42:26 +00:00
zzz
1eaf376ee7 Crypto: Check for error return from sign() 2015-07-07 13:46:04 +00:00
zzz
6cb3d1d330 Updates: New news URL 2015-07-07 13:38:44 +00:00
zzz
2681c4b42f Streaming: New config to add to DSA-only list 2015-07-07 13:35:55 +00:00
zzz
05959d5199 SSU: Request outbound bandwidth on the way into the
sender queue, not on the way out, so that SSU requests
bandwidth allocations for each packet in parallel
and competes more effectively with NTCP for bandwidth.
Inbound stubbed-out only.
2015-07-05 12:30:01 +00:00
zzz
113a8a52f3 Transport: Raise bandwidth refiller thread priority
so I/O doesn't stall under high CPU load
- Raise DH generator thread priority to keep
  DH building out of event pumper thread
- Raise PRNG and YK generator thread priorites one notch
- Set I2PThread priority in constructor
Fixes problems mainly seen on Windows, which seems
to be much more sensitive to priority settings
2015-07-05 12:08:33 +00:00
zzz
98a4460bde fix test compile 2015-07-02 15:20:58 +00:00
3645c906e8 merge of 'a0b025f180c1f7befcc1eb504c24140cf9e3fc0f'
and 'e0773d79a9bc8820024206f39686541ddb393c4a'
2015-06-29 20:22:10 +00:00
zzz
fcdd8be7a7 Transport: More fixes for SSU stalling -
Don't skip further bandwidth allocations for SSU, since
it needs the entire allocation to proceed.
Log tweaks
More synchronization of requests
2015-06-29 16:02:07 +00:00
zzz
34f6f65104 UPnP main() test tweak 2015-06-29 15:59:45 +00:00
zzz
4c516cd2af log tweak 2015-06-29 15:58:41 +00:00
8ea6805f8d Prevent double-save for now and auto start all torrents if autostart is already set (don't make the user restart each one). 2015-06-28 19:43:57 +00:00
zzz
23f2261bd9 Apache Tomcat 6.0.44 2015-06-28 12:13:52 +00:00
zzz
dd47389ad1 Console: Use registered host/port for eepsite link (ticket #1604)
Jetty starter: Register host/port when started
PortMapper: Add hostname support
2015-06-25 17:00:52 +00:00
zzz
25268e7cb2 Transport: Add failsafe to prevent complete SSU stall waiting
for bandwidth limiter, root cause unknown
2015-06-24 19:11:05 +00:00
zzz
355b2a1528 I2CP: Don't try to decrypt an LS before it's encrypted (ticket #1608)
log tweaks
2015-06-23 21:16:34 +00:00
zzz
975149d049 Router: Increase default outbound bandwidth to 60 KBps;
raise class L/M boundary to match so defaulted routers are still L
2015-06-23 20:50:22 +00:00
zzz
af394e13ad GeoIP: Add countries and flags for Asia/Pacific, Bonaire, St. Barts,
St. Maarten, South Sudan
AP: black flag copied from A1
BL: official flag is France, copied from FR
BQ, SX, SS: PNG files generated from public domain SVG files from Wikipedia
Shortened some other country names (remove "Republic of", etc.)
Change spelling to Macau, Vietnam
2015-06-23 20:33:38 +00:00
zzz
e3f64f6edf Console: Fix NPE on /configtunnels 2015-06-23 20:26:02 +00:00
2fbbfa388e NetDB: Partially revert last NetDB change: flood because we don't want to create a hole in the DHT before publisher resends to somebody else. 2015-06-22 20:11:29 +00:00
zzz
0b4d4ddcbc update hardcoded tags 2015-06-21 15:42:30 +00:00
zzz
428d89a307 Update: Add config to disable translated news
Rewrite addLang() for efficiency
2015-06-21 15:41:33 +00:00
feff6c003b bump 2015-06-20 10:30:14 +00:00
699d550992 NetDB: Don't say we stored, and don't flood, if we're shutting down 2015-06-20 10:06:54 +00:00
c6896c4418 I2PSnark: Auto-start now only starts torrents which were running at shutdown (#766) 2015-06-20 10:03:47 +00:00
zzz
1b2d4c75eb I2CP: Fix simple session lookups, broken in prop 2015-06-19 15:55:07 +00:00
zzz
586defc802 Tunnels: Increase default max tunnels 2015-06-19 14:57:59 +00:00
zzz
2499aad51d I2PSocketEepGet: Do hostname lookups in-session for efficiency 2015-06-19 14:55:49 +00:00
zzz
addb142ecd I2CP: Move client-side implementation classes to
new package net.i2p.client.impl, leaving only the
factories and interfaces in net.i2p.client
2015-06-18 21:20:00 +00:00
zzz
20c796e87a Update: Add language param to news fetch, to support translated news (ticket #1425) 2015-06-18 15:05:48 +00:00
zzz
cd62d7170c I2CP: Don't send the first LS request to the client until we have
at least one OB tunnel, so the client waits until we are ready.
This will reduce drops, retransmissions, and failures on new client tunnels.
Fixes to prevent multiple pending LS requests.
2015-06-18 15:02:21 +00:00
acc647822f sync debian changelog in mtn 2015-06-18 10:34:54 +00:00
zzz
1cf544f1d4 fix unit test compile 2015-06-18 00:41:58 +00:00
zzz
0f4e09500c javadocs 2015-06-17 23:46:11 +00:00
zzz
7c5dfaee20 I2CP: More fixes after prop, w.r.t. restore after close-on-idle
- When socket is closed, set sessionID and LS to null,
    close subsession and set its sessionID and LS to null
  - Checks on client side for null session ID
  - Check for null session in Destroy Session message
  - Don't kill I2CP connection due to a bad session ID
    in a SendMessage, just drop the message and send
    a MessageStatusMessage
  - Log tweaks
2015-06-17 23:44:12 +00:00
zzz
8d9cced128 history for prop, -6 2015-06-17 16:17:46 +00:00
zzz
8096e4f65d propagate from branch 'i2p.i2p.zzz.multisess' (head 655a0c2bbd50625c804b8de8c809b40ed63f53f4)
to branch 'i2p.i2p' (head b977ab50209475c0e74825f361924e05dbd470c7)
2015-06-17 16:00:53 +00:00
zzz
036b77746b Catch uncaught exceptions in ClientConnectionRunner and stop connection
Catch null SessionId in messages and stop connection instead of NPE
Wait for LS in SubSession in connect() so we don't send data w/o
a session ID and leaseset
Log tweaks
2015-06-17 02:16:06 +00:00
zzz
bc85543ef2 Fix removal of subsession aliases from tunnel manager on
I2CP connection shutdown
Sort tweaks for shared clients in summary bar
2015-06-15 14:35:15 +00:00
627f7076b0 debian: Add support for setting open file limits to initscript, add comment to explain how to do it with systemd 2015-06-14 20:16:16 +00:00
863e120204 Hard-depend on gmp >> 5. 2015-06-14 20:12:00 +00:00
53cfba4cbd merge of 'cb89dec5190f295ba301666166448929f1b7f3c1'
and 'f13d8499995c44dc76ae61d4b5c4c936e307eb89'
2015-06-14 20:07:43 +00:00
3a774b7c37 Rename i2p.mooo.com2.crt to i2p.mooo.com.crt, certificate has been switched out on the server 2015-06-14 20:07:35 +00:00
zzz
0ad34a4b00 Timestamper: Reduce NTP timeouts to shorten startup time
when NTP is blocked
2015-06-13 16:25:58 +00:00
zzz
2b9ffc1270 javadoc fixes after review 2015-06-13 15:14:21 +00:00
zzz
93c7860d2b NetDB: Improve routing of DatabaseStoreMessage acks
Send our own RI unsolicited in reply if we aren't floodfill
  Don't ack or flood a store of an unknown type
PeerTestJob: Don't generate zero reply token
Tunnels: More checks of messages received down exploratory tunnels
javadocs and comments
2015-06-13 15:13:35 +00:00
25f6c3d9e1 apparmor: tweaks to TMPDIR rules 2015-06-13 15:05:28 +00:00
zzz
b9e07bc9aa i2psnark: Fix NPE (ticket #1602) 2015-06-13 14:20:08 +00:00
zzz
09f68e44ca enable ECDSA by default for shared clients 2015-06-10 23:24:38 +00:00
zzz
013b5fd85b more @since updates 2015-06-10 19:24:20 +00:00
zzz
8962bfb6bc more @since updates 2015-06-10 19:23:26 +00:00
zzz
605602e001 @since updates 2015-06-10 19:15:01 +00:00
zzz
f341e5566b Pass session in connect();
Store the session in Connection;
Don't create a new ConnectionManager for a subsession,
now that all components track the session properly.
@since updates
2015-06-10 19:14:33 +00:00
zzz
7b84676f4a remove session ref from PacketQueue 2015-06-10 12:37:19 +00:00
dev
c666f8a4f9 Javadoc fixes. 2015-06-09 14:30:42 +00:00
dev
e067761947 Added a new flavour of checkAvailable() to UpdateManager interface. 2015-06-09 03:57:44 +00:00
dev
226bee64ef Added more variants of isUpdateInProgress to UpdateManager. 2015-06-09 03:44:34 +00:00
dev
1a40e57413 Added isUpdateInProgress() to UpdaterManager interface. 2015-06-09 03:32:33 +00:00
dev
f73101b014 Added checkAvailable(), update() and getStatus() to UpdateManager interface. 2015-06-09 01:09:23 +00:00
zzz
fef65c996f Store the session in Packet, so we may more easily and efficiently
handle multisession, especially on the incoming side.
More refactoring to follow
2015-06-08 22:18:14 +00:00
zzz
cbc2f899a6 fixup after prop 2015-06-08 22:14:49 +00:00
zzz
099515adff propagate from branch 'i2p.i2p' (head 1de143fff53bb56e6eac926d6293d62200f0c392)
to branch 'i2p.i2p.zzz.multisess' (head 70fc07857232668b93ca6ba02c433dffc7639132)
2015-06-08 21:50:42 +00:00
ff2ea9ac3e Irc{Outbound,Inbound}Filter:
- Silence 'no streams' warning when we can't connect to an IRC server. Change to WARN.
2015-06-08 19:35:18 +00:00
97aeecd865 FloodfillMonitorJob, FloodfillRouterInfoFloodJob:
- Directly connect to nearby floodfills to share our RI to speed up integration of new floodfills (#1195).
- Called on both non-ff -> ff OR ff -> non-ff.
- Create FloodfillRouterInfoFloodJob to do so.
2015-06-08 19:24:28 +00:00
8098d705f9 Make netDb.storeFloodNew graphable for testing (#1195) 2015-06-08 16:39:41 +00:00
fa8c390267 Language fixups. 2015-06-08 16:14:08 +00:00
zzz
e8f4e19bac NetDB: Fix early NPE 2015-06-07 16:29:41 +00:00
zzz
9041a2c69f SSU: Possible fix for NPE in establisher 2015-06-07 14:13:58 +00:00
zzz
384e9118c6 Logs: Correct wrapper.config location when running as a Linux service 2015-06-07 12:44:29 +00:00
0936a2ee23 disable 193.150.121.66 (ticket #1596) 2015-06-06 21:36:24 +00:00
bc6b0c12ac update debian changelog to reflect the latest release 2015-06-06 21:33:51 +00:00
f6f051cfa4 remove unneeded user-tmp abstraction; tighten tmpdir perms 2015-06-06 21:31:38 +00:00
zzz
fb131a040c fix snark sort by rate of stopped torrents 2015-06-06 20:54:13 +00:00
zzz
9f2ded6073 cleanup 2015-06-06 20:53:33 +00:00
zzz
55e36ee458 Console: Add indication of current ff status on /configadvanced,
change immediately when config changes, force republish
Router: RI rebuild locking
2015-06-06 16:01:39 +00:00
7c13fb2ba0 Android's SimpleDateFormat doesn't support XXX at any API 2015-06-06 09:24:46 +00:00
663ccb72d7 Bump router version 2015-06-05 01:53:52 +00:00
78e0a37fc9 Define I2PTunnelClientBase stats in one place 2015-06-04 22:36:45 +00:00
09cdc00939 i2ptunnel: Don't call startup() in chained constructor (ticket #1593) 2015-06-04 22:34:13 +00:00
2590e7d4ff i2ptunnel: Don't connect manager to router in constructor (ticket #815) 2015-06-04 22:25:44 +00:00
zzz
27f56776ca Console: Fix display of n/a for events that never happened on floodfill profiles 2015-06-03 20:45:15 +00:00
zzz
657f13af29 Remove ConnectionManager ref from PacketQueue 2015-06-03 17:25:25 +00:00
zzz
e2ca74963f Console: Click on version or country in /netdb table to get list of those routers 2015-06-03 16:55:01 +00:00
zzz
9304cb2bbc SAM message quoting fix 2015-06-03 12:33:42 +00:00
zzz
362086994a history for props, -1 2015-06-03 12:03:07 +00:00
zzz
f57e37d588 comment fix 2015-06-03 12:02:25 +00:00
zzz
d96ddd1a0e propagate from branch 'i2p.i2p.zzz.sam' (head 68de14d0053dea374413f9e0419b1c0f7e9ec3af)
to branch 'i2p.i2p' (head 54f5dd288f7c0c5a50f7f63f911aec4008be27e2)
2015-06-03 11:42:54 +00:00
zzz
7b711ebba0 propagate from branch 'i2p.i2p.zzz.test2' (head 47586aa88408845c51ee4c5fce40c617bdb8e398)
to branch 'i2p.i2p' (head bacb6048bc596f064ff237dd8569014a421b4ef6)
2015-06-03 11:40:28 +00:00
zzz
0762715264 i2psnark: Don't lose sort param when hiding peers 2015-06-02 21:04:12 +00:00
zzz
8a69dc0a97 only log reseed network disconnected warning once 2015-06-02 20:44:10 +00:00
zzz
39dc60cf8a only log UPnP network disconnected error once 2015-06-02 20:19:46 +00:00
zzz
09e867b194 i2psnark: Don't say 'download finished' unless we downloaded something
atomics
2015-06-02 20:14:33 +00:00
zzz
dc9256f274 Console: Prevent bad line-wrap of very long menu items 2015-06-02 16:41:04 +00:00
zzz
272f63dbbd Console: Nicer "move" icons on /configsidebar, add tooltips
Icons from silk, rotated, same license as before
2015-06-02 16:30:35 +00:00
zzz
06104118d0 EepGet: Recognize 418/420 responses 2015-06-02 15:44:17 +00:00
zzz
525ec01c1e Console: Don't allow unbanning of all-zero hash 2015-06-02 15:41:42 +00:00
zzz
f8594c316f DataHelper: make formatDuration() days to years be monotonic 2015-06-02 15:36:19 +00:00
zzz
3c89bd4e19 0.9.20 2015-06-02 12:00:59 +00:00
zzz
1f8408f417 Stats: Reduce number of rates in required stats to save memory 2015-05-31 14:03:39 +00:00
zzz
915b35f0c1 LogWriter: Write dup message to wrapper log and crit buf also 2015-05-31 13:22:36 +00:00
zzz
4521156ecb Fortuna: Catch AIOOBE (ticket #1576) 2015-05-31 12:43:06 +00:00
zzz
c58fd8f84e i2ptunnel: Fix +/- variance config (ticket #1587) 2015-05-30 15:46:37 +00:00
zzz
f02b401b7a SSU: More synchronization in PeerState 2015-05-30 14:25:40 +00:00
zzz
4fdcb6ce29 I2CP: Prevent sending lookup or bw limit messages before handshake with router is complete 2015-05-30 14:13:13 +00:00
zzz
94824e4d2b I2CP: Prevent sending data message before handshake with router is complete 2015-05-30 14:02:38 +00:00
zzz
280fc05c91 susidns, addressbook: Don't attempt to fetch subscriptions if
HTTP proxy is down (ticket #1530)
2015-05-30 13:53:56 +00:00
zzz
89745f5002 HTTP Client: Greatly simplify decompression by using
InflaterOutputStream, available since Java 6.
Removes PipedInputStream, PipedOutputStream.
Removes Pusher threads.
Remove delay workaround for truncated pages, no longer required.
2015-05-30 13:19:29 +00:00
zzz
7715e6484c Router: Add gzip caches to clearCaches() 2015-05-30 11:18:04 +00:00
zzz
c807194e93 propagate from branch 'i2p.i2p' (head 07028378508ab46278d193039b97c543d12ee22e)
to branch 'i2p.i2p.zzz.test2' (head 0074b91cb9fe0ed875457dc0bf1989df03fa9e9a)
2015-05-30 11:16:00 +00:00
zzz
3602f73497 HTTP client: Fix occasional truncation of compressed responses
log tweaks
2015-05-29 17:37:58 +00:00
zzz
4bf115b5f6 javadoc 2015-05-27 21:07:56 +00:00
zzz
7ab85a0a20 Graphs: prevent NaNs if we are skewed ahead of system time 2015-05-27 21:05:44 +00:00
zzz
fba0372339 Banlist: Ban all-zero hash
NetDb: Drop all-zero lookups and stores, add stats
SSU:
 - Fix debug logging of dumped packets
 - Drop sessions with bad clock skew, banlist peer, add stats
 - Drop sessions with corrupt DSM, banlist peer, add stats
Log tweaks
2015-05-27 21:00:46 +00:00
zzz
03dfa6515b SSU: send destroy message in a couple cases where we previously just called dropPeer() 2015-05-27 20:54:22 +00:00
zzz
5e33ed1169 log tweaks 2015-05-27 20:52:00 +00:00
zzz
11ab7fc56c add comment 2015-05-27 20:51:01 +00:00
zzz
716bff41d7 remove cast 2015-05-27 20:50:29 +00:00
zzz
1d8842cfc8 Gunzip: Add tests to main() 2015-05-27 20:49:51 +00:00
zzz
042b03d6b8 DataHelper: Add year output to formatDuration() 2015-05-27 20:48:51 +00:00
ab753651b9 Add new reseed server
Thanks parg!
2015-05-26 20:55:44 +00:00
zzz
4ea99b8a10 I2CP: Take 2 of fix, so a newly created session
isn't destroyed and immediately replaced by i2ptunnel,
which caused dup shared clients in a race at startup;
Clarify session exception text if not open
2015-05-24 00:14:32 +00:00
zzz
3d07e1a10b I2CP: Revert part of prior checkin, prevented idle tunnel from opening;
(treat INIT as CLOSED) better fix to follow
2015-05-23 20:02:46 +00:00
zzz
86525e7239 i2ptunnel: Strip top-level supercookies too 2015-05-23 17:13:15 +00:00
zzz
195171f9ed I2CP: Add an INIT state for session, so a newly created session
isn't treated as CLOSED and immediately replaced by i2ptunnel,
which caused dup shared clients in a race at startup
(possible related tickets #642, #650, #815, #1545)
2015-05-23 16:07:49 +00:00
33c4be5b2f Updates to geoip.txt and geoipv6.dat.gz based on Maxmind GeoLite Country database from 2015-05-06. 2015-05-21 17:32:35 +00:00
fea2c3c6b2 Install the apparmor profiles in complain mode
Instead of enabling exceptions when needed for custom set-ups, some users will
opt for disabling all security functions.
2015-05-21 17:27:29 +00:00
281686ba58 clarify comment 2015-05-21 17:24:32 +00:00
0b91fcb636 sync Translations with Transifex 2015-05-21 17:11:50 +00:00
807f1381fb sync debian/changelog 2015-05-21 16:54:35 +00:00
ac56a63809 remove /dev/(u)?random since these are included in the base abstraction 2015-05-21 16:52:09 +00:00
e4798b9ed8 allow user scripts installed to cgi-bin to be executed 2015-05-21 16:46:19 +00:00
7584346c82 fix indentation of i2p abstraction 2015-05-21 16:44:00 +00:00
zzz
29330aa5d3 i2psnark: Another place to send reject; switch to LBQ 2015-05-19 23:21:18 +00:00
zzz
65ff2c0afe i2psnark: Log tweaks and cleanups after testing 2015-05-19 21:56:21 +00:00
zzz
de4d47de95 i2psnark: Add support for fast extensions (BEP 6)
untested
2015-05-19 18:13:32 +00:00
zzz
ae41a3f316 SSU:
Synchronize UDPPacket methods, possible fix for bad
packets and UDP stalls caused by cache corruption?
Cleanup unused methods and fields
2015-05-19 14:49:02 +00:00
zzz
2dc3d68418 propagate from branch 'i2p.i2p' (head d046bffcd4f94b253e1aa2bfc9a90482974363dd)
to branch 'i2p.i2p.zzz.test2' (head d00c6fd9c9aef6c37218a791a12f2da957181cd2)
2015-05-18 11:09:26 +00:00
zzz
5eb43b6ae4 Translate: Clear ResourceBundle cache too,
available since Java 6 / Android API 9
2015-05-18 11:08:40 +00:00
zzz
0c672ecc49 Update: Fix NPE in initialization 2015-05-16 13:10:07 +00:00
3b6d98fe38 Translate "Dest" instead of "Dest:", tabbing (thx zzz) 2015-05-15 22:36:49 +00:00
b3472cfe80 Show the I2PSnark dest on the main page (#1436) 2015-05-15 20:51:45 +00:00
38f2b93c7a typo 2015-05-15 20:30:59 +00:00
zzz
e7af87a981 Update: Ignore su3 dev build version at startup if older 2015-05-15 19:15:51 +00:00
zzz
d698a67660 Deprecate Router.setConfigSetting() and removeConfigSetting() 2015-05-15 15:50:16 +00:00
zzz
b38f2d62a8 bump -23 2015-05-15 14:58:54 +00:00
zzz
10556bca75 merge of '174649506cd8a9665ad798c090e39481af967011'
and '67eb724b7638284d33f1b4997183cc9f197d2883'
2015-05-15 14:17:41 +00:00
zzz
1f17d2a149 add cacapo plugin cert 2015-05-15 14:17:08 +00:00
dc777c8de5 fix on non-full stats routers (thx zzz)
doh
2015-05-15 13:42:16 +00:00
zzz
1fb9643916 i2psnark: Fix deletion of single-file torrent outside snark dir (ticket #1544) 2015-05-13 14:00:19 +00:00
zzz
081f1865a8 Console: Fix URLs caught in XSS filter on /confighome (ticket #1569)
Fix name and URL escaping
Truncate long URLs in display
2015-05-13 12:04:28 +00:00
zzz
0e17c560b3 NTCP: Catch race in Reader (ticket #1534) 2015-05-13 10:52:26 +00:00
zzz
a3b1327934 javadoc fixes 2015-05-13 10:48:48 +00:00
zzz
e68ca573f0 remove status message 2015-05-13 10:41:49 +00:00
zzz
b5455cee6e SAM: Set keepalive on sockets (ticket #1573)
Also on both sides of I2CP.
BOB already does it.
2015-05-12 20:13:17 +00:00
cbdc1403bf remove old check
bump
2015-05-12 19:53:19 +00:00
zzz
40130a8a61 SAM:
- Close sockets and stop tunnels when router-side SAM stops (ticket #1572)
- Better checks for quoting status message strings (ticket #1488)
- Set encoding for sam.keys file
- Don't throw NPE on rare stream errors
- Comment out unused dumpProperties()
- Cleanups, log tweaks, thread name tweaks
2015-05-12 19:07:42 +00:00
ca14055976 fix build 2015-05-12 19:02:00 +00:00
8303016b48 - Job Queue/stats: add stat/graph for amount of scheduled jobs (router.tunnelBacklog)
- FloodfillMonitorJob:
  - Use avg of router.tunnelBacklog instead of current backlog
- Some language/spelling fixes
2015-05-12 18:46:40 +00:00
287862887d runplain.sh improvements 2015-05-11 01:12:13 +00:00
zzz
f25d2a3d3f Util: Fix corruption of cached ReusableGZIPInputStreams,
caused by calling close() from HTTPResponseOutputStream.Pusher,
but close() rendered the underlying InflaterInputStream unusable.
Broken in -15. Caused failed HTTP fetches and other flakiness.
2015-05-11 00:08:26 +00:00
zzz
7f30f481b2 i2ptunnel: Improve error handling for UDP tunnels,
Sink.send() may now throw RuntimeException,
converted from IOException or I2PSessionException;
interrupt runner threads on error;
ignore I2PSessionException in Pinger.close();
logging and javadoc improvements;
untested
2015-05-09 22:22:13 +00:00
zzz
5ee6826241 Plugins: Add support for custom icons (ticket #1550) 2015-05-09 15:28:43 +00:00
zzz
68951c4c6b remove http in linkify() 2015-05-09 13:19:46 +00:00
zzz
5dc7497802 Reseed: Don't reseed while shutting down (ticket #1565) 2015-05-08 12:27:40 +00:00
zzz
31cfddc218 Router: Clear I2CP lookup cache on exit 2015-05-07 16:46:15 +00:00
zzz
c1e70ac7d2 SAM: Close datagram or raw session when underlying
I2P session closes (ticket #1563)
2015-05-07 16:04:08 +00:00
zzz
dd9abd3f09 set installed dev version 2015-05-07 14:18:47 +00:00
zzz
2f5e64e532 Update: Add support for su3-signed development builds (ticket #1381)
Full version is used as the su3 version.
Uses same su3 certs as release updates. Users may add additional certs
to ~/.i2p/certificates/router/ as necessary.
Copy echelon's reseed key for use as a router signer.
Unsigned update remains a separate option for now.
Various update subsystem cleanups.
2015-05-07 13:04:43 +00:00
zzz
b12f988390 javadoc fixes 2015-05-07 13:03:17 +00:00
9f3d5bf57b use the full version string (including build number) in the signed-* build targets 2015-05-06 23:24:08 +00:00
zzz
7f9e958e5a Datagram: Convert IOE to DFE and throw on datagram load error
rather than failing silently
2015-05-06 20:05:30 +00:00
zzz
c4877ea092 Crypto: Comment out Cryptix debug logging 2015-05-06 01:53:50 +00:00
zzz
2aafc23774 PrintWriter doesn't throw exceptions, so call checkError() 2015-05-06 01:51:57 +00:00
zzz
77c9a644ac Naming services: Export address books with Windows line endings on Windows (ticket #1557) 2015-05-06 01:48:47 +00:00
zzz
abd8ca34dc Transport: Add config to force IPv4 (only) to firewalled (ticket #1541)
since we cannot reliably detect DS-lite (ticket #1458)
Hide transport status on /peers unless routerconsole.advanced
2015-05-06 01:45:33 +00:00
dev
31435685bf Added disclaimer about not being a part of the public API. 2015-05-05 22:16:51 +00:00
zzz
7337fd0670 i2ptunnel: Add Connection: close headers to errors and proxy.i2p responses
where it was missing (ticket #1531)
2015-05-04 16:36:49 +00:00
zzz
f7b7a98b9d i2ptunnel: Close input stream when HTTP client decompressor terminates (ticket #1506)
streaming: Minor cleanups, log tweaks
2015-05-04 14:43:54 +00:00
2226936737 i2prouter 'console' bugfix: Don't report failure for INT signal 2015-05-04 14:10:25 +00:00
8b293b2190 symlink instead of copying
I created this patch a couple of years ago and at that time symlinking (for
reasons I don't remember anymore) didn't work. Now it works with symlinks, so
let's go with that. (Tested in OpenBSD 5.7)
2015-05-04 13:47:32 +00:00
zzz
94bba8d11f I2CP: Fix external I2CP SendMessageExpires, broken in previous cleanup 2015-05-04 12:36:03 +00:00
5c2b5075f9 support OpenBSD in i2prouter
We don't include a wrapper for OpenBSD and Tanuki doesn't offer OpenBSD
binaries either. It is available as an OpenBSD package. Therefore, if the
wrapper is not found (likely), advise the user to install it. The next time
`i2prouter start` is run, the wrapper will be copied to the I2P install
directory and it should "just work".
2015-05-04 09:22:25 +00:00
ca6820a4c0 refresh debian patch 2015-05-04 00:26:26 +00:00
zzz
2fafa3337f Console: Add floodfill configuration form to /configadvanced 2015-05-03 18:49:34 +00:00
zzz
b5f75a4bb9 Router: Allow class M to become floodfill;
add bandwidth classes P and X (ticket #1447)
2015-05-03 17:35:09 +00:00
zzz
707bfbbf8b Router: Put the GarlicMessageParser in the RouterContext
to reduce object churn, we only need one
Add DeliveryInstructions.create() to return immmutable
local instructions, to reduce object churn
Minor cleanups
2015-05-03 17:00:22 +00:00
zzz
1eba6c5167 SusiDNS: Add export button 2015-05-03 13:21:16 +00:00
zzz
a14208b841 Move Indonesian po files used by Java om _id to _in, since
Locale.getDefault().getLanguage() will only return "in".
See Locale javadocs. Same change already made in Android.
2015-05-02 23:23:13 +00:00
83966f9a7f Switch out the certificate for netdb.i2p2.no, replacing it with a stronger one
certificates/ssl/netdb.i2p2.no2.crt was checked in on 2014-12-08 with the
intention of its replacing certificates/ssl/netdb.i2p2.no.crt after a
transition period of a few months had passed. The certificate has already been
switched out on the server.
2015-05-02 20:49:50 +00:00
zzz
d89f06015b merge of '7cc7b74d018c5e2d5d571000d066e65ad034c114'
and 'd87b6870e67271b703a38f82cb6fc9b753bf9698'
2015-05-02 17:46:48 +00:00
zzz
49f786c928 Transport: Ticket #1458 continued...
enum fixes so we don't always force a peer test quickly
set reachability status at startup when interfaces are configured
prevent firewalled -> OK -> firewalled+OK transition
2015-05-02 17:45:37 +00:00
zzz
e8bc0bd5d1 Stats: randomize router count at startup also 2015-05-02 17:42:49 +00:00
8d69b69357 Switch out the certificate for ieb9oopo.mooo.com
certificates/ssl/ieb9oopo.mooo.com2 was checked in on 11/23/2014 with the
intention of its replacing certificates/ssl/ieb9oopo.mooo.com.crt after a
transition period of a few months had passed. The certificate has already been
switched out on the server.
2015-05-02 15:59:33 +00:00
e7b9a230e6 add 'bump' as an alias for the 'bumpBuild' ant target 2015-05-02 15:50:25 +00:00
6385c412fd Disable https://jp.reseed.i2p2.no:444/ due to extended downtime, unresponsive host (ticket #1422) 2015-05-02 15:48:46 +00:00
zzz
bb33b358b4 Change log level for Jetty warnings with exceptions
from error to warn (ticket #1551)
2015-05-02 14:36:39 +00:00
zzz
572f071cfe Jetty 8.1.17.v20150415 2015-05-02 14:09:59 +00:00
zzz
42cb89f525 bump -12 2015-04-30 21:14:56 +00:00
zzz
1868d2b50f Transport: Ticket #1458 continued...
Implement methods to remove only a single IPv4 or IPv6 address,
so that IPv6 addresses will remain when SSU detects that IPv4 is firewalled
Summary bar status fixes
Fix getIsPortFixed() for more enum cases
log tweaks, cleanups
2015-04-30 20:33:46 +00:00
zzz
4588f1ec75 I2CP: Periodically send a SetDate message to external clients
so they stay in sync
2015-04-29 15:22:55 +00:00
zzz
629f7f05c7 Transports: Track IPv4/v6 reachability separately (ticket #1458)
Don't include NTCP conns established too long ago in clock skew vector
Hide unestablished outbound NTCP conns from /peers view
Add per-transport status to /peers
Put status description instead of code into event log reachability changes
2015-04-29 12:50:33 +00:00
zzz
0f18686243 Clock: Make forward slewing work better
when now() is not called too frequently
2015-04-29 11:48:17 +00:00
zzz
2a2587b13d fix logic bug 2015-04-29 02:41:25 +00:00
zzz
489fdd5e4b NTCP: Use context time, not system time, in NTCPConnection
so that clock skew calculations work right
2015-04-29 02:35:22 +00:00
zzz
fe680eb192 Transports: Fix clock skew calculations
- NTCP inbound skew calculation had flipped sign
- Include RTT in NTCP skew calulation
- Set SSU skew on first packet so it's right from the beginning
- Above should fix the "ignoring clock offset" error
- Javadocs
RouterClock:
- Add config to disable clock adjustment for testing
- Reduce window in skew vector for slew calculation
- Double max slew rate
2015-04-29 01:30:33 +00:00
zzz
613440ff63 CSF: New enums for SNAT/OK and SNAT/UNKNOWN 2015-04-28 22:26:40 +00:00
zzz
64121b1e92 catch OOM in the OOM listener 2015-04-28 22:24:05 +00:00
zzz
f16927f316 JobQueueRunner: Don't call System.exit() on OOM,
let the shutdown progress normally;
Make it an I2PThread instead of a Runner so we can
call fireOOM() for consistent logging (ticket #1549)
Router: Don't add OOM listener on Android so
we don't hang onto the context
2015-04-28 21:57:13 +00:00
zzz
cb50c1bd8b improve UDP test 2015-04-28 12:44:53 +00:00
zzz
921ad86274 Comm System: More prep for ticket #1458
- Big method to handle status transitions, not yet used
 - Status enum tweaks, unknown must be higher code than known
2015-04-28 03:25:20 +00:00
zzz
ac76107752 Transports:
- More transition to status enum
 - Don't set TCP keepalive for IPv6
2015-04-28 03:21:28 +00:00
zzz
2359b1edd2 Transports: Convert internal state to enums (ticket #1458) 2015-04-27 17:05:16 +00:00
zzz
2750681d78 CommSystem: Stubs for separate IPv4/v6 status (ticket #1458) 2015-04-27 15:44:05 +00:00
zzz
eaac4d3de0 NamingService: Add export methods,
fill in subclass methods for efficient exporting,
fill in getBase64Entires() and getNames() where unimplemented
SusiDNS: Add export support, no UI yet
2015-04-27 15:41:38 +00:00
zzz
f243968dfa i2ptunnel: Reduce sleep time in runners to reduce latency
greatly improves "loopback" performance
minor cleanups
2015-04-26 17:50:06 +00:00
zzz
8d9e2bdc71 log tweaks 2015-04-26 17:46:48 +00:00
zzz
6dbbb6b61b minor cleanup 2015-04-26 17:46:14 +00:00
zzz
f89bf32390 target=_top 2015-04-26 17:45:31 +00:00
zzz
ef195aa4ef re-add fixed reseed 2015-04-26 17:45:01 +00:00
843230a1cb Fixed MessageInputStreamTest after constructor changes 2015-04-26 01:43:34 +00:00
zzz
84e63f3b38 reseed tweaks for SNI 2015-04-26 00:12:17 +00:00
zzz
b90816fdf8 add package.html files 2015-04-25 23:15:52 +00:00
zzz
40c4a42921 I2PSSLSocketFactory:
- Add hostname verification using code from
Apache HttpClient 4.4.1 (Apache 2.0 license)
and one small class from HttpCore 4.4.1,
slightly modified to remove additional Apache dependencies
and unneeded code.
- Includes support for public suffix list;
use basic list with standard TLDs,
and also support loading the big Mozilla list,
but don't bundle the 150KB Mozilla list for now.
- For Android, use its default verifier, which
should actually work (unlike Oracle)
- Java 7 not required, although servers requiring SNI will now
fail on Java 6, which does not support SNI
SSLEepGet:
- Rework recent setSoTimeout code changes, as they broke SNI
- Add option to save certs even if no errors
- Add option to disable hostname verification
2015-04-25 23:06:44 +00:00
zzz
26f89391d3 Mods to remove additional Apache dependencies
and unneeded code, now compiles
2015-04-25 22:56:51 +00:00
zzz
aaae72cf84 - Initial checkin of Apache classes from
Apache HttpClient 4.4.1 (Apache 2.0 license)
and one small class from HttpCore 4.4.1,
unmodified as a baseline for future merges.
Does not compile.
See following checkins for more info
2015-04-25 22:54:05 +00:00
zzz
3e55cff153 Util: Catch and convert OOM in I2PThread.start() to a RuntimeException,
to give better message to users and prevent JVM shutdown
on what is unlikely to be a heap issue.
2015-04-25 00:02:55 +00:00
zzz
bd778a2204 Remove old pre-0.6.1.30 TunnelCreateMessage and TunnelCreateStatusMessage,
moved to junit years ago but not part of any tests
2015-04-24 22:25:17 +00:00
zzz
235c196f14 log tweaks 2015-04-24 21:37:22 +00:00
zzz
e475c161cb i2ptunnel: Don't register port mapper in clients overriding startRunning()
if super.startRunning() failed
Register as HTTPS proxy also in HTTP client
2015-04-24 21:16:45 +00:00
zzz
08e96109a7 i2ptunnel: Fix shutdown of client tunnels on server socket errors,
broken in fix for ticket #815
TCG still doesn't go back to stopped, to be fixed.
Test case: configure low port.
2015-04-24 19:19:18 +00:00
zzz
81ad33d9e3 lint unchecked 2015-04-24 16:27:03 +00:00
zzz
aecc95825b Updates: Fail fast if HTTP proxy is not running (ticket #1530)
Covers router, unsigned router, plugin, and news updates
2015-04-24 16:08:08 +00:00
zzz
37c6ac3a88 i2ptunnel: Fix Socks and SocksIRC tunnels not starting,
broken in fix for ticket #815
2015-04-24 01:48:07 +00:00
zzz
772d0beac3 Streaming: Don't wait too long to send a dup ACK, so the other
side isn't stuck forever at a window size of 1.
Cleanups, log tweaks, javadocs
2015-04-23 15:34:24 +00:00
zzz
64fdfd81ee remove excess logging 2015-04-23 13:38:44 +00:00
zzz
1b09b9faa4 Streaming: More efficient checking for input buffer overflow,
add additional checks.
Fix bug if available buffer calculation is negative
Check log level before calling displayPacket()
Log tweaks
2015-04-23 13:19:18 +00:00
zzz
6f0ebb2d94 Streaming: Reduce min RTO so that "loopback" connections
recover quicker after packet loss;
Reduce default initial ack delay;
Rename misspelled method
2015-04-23 10:28:02 +00:00
zzz
cbe91e3012 I2PSocketEepGet: Fix i2psnark NPE caused by -6 (ticket #1543) 2015-04-22 20:34:04 +00:00
zzz
238501919b i2psnark: Fix deletion of config files, cleanup
orphaned ones at startup (ticket #1498)
2015-04-22 20:22:17 +00:00
zzz
ae3a5f7b25 name tunnel starter threads 2015-04-22 20:17:33 +00:00
zzz
638cadc3c9 NetDB: Disable floodfill for non-ARM Android also 2015-04-22 15:54:18 +00:00
zzz
da0036581c thread name tweak 2015-04-22 14:51:40 +00:00
zzz
59a58ea310 NTCP: Reduce min send finisher threads to 1 2015-04-22 14:48:59 +00:00
zzz
bebe5f8a4e PortMapper: Status output for /debug 2015-04-22 14:45:40 +00:00
zzz
c3af99685d log tweak 2015-04-22 12:00:46 +00:00
zzz
e1d9e05b8d i2ptunnel: Fixes and cleanups for command line testing;
catch IAE from getInstance() if i2ptunnel.config isn't found
in app context; log tweaks; config command tweaks
Unit tests: Fix several NPEs in LocalClientManager,
implement HostLookup
2015-04-22 11:59:40 +00:00
zzz
212f6b472a i2ptunnel: Catch and log uncaught errors in thread pool 2015-04-21 20:37:59 +00:00
zzz
fdada78edf Reseed: Disable non-su3 reseeding 2015-04-21 18:48:11 +00:00
zzz
638c5429d2 NTP:
- close socket in finally
 - really comment out main()
2015-04-21 14:49:48 +00:00
zzz
b67bbd7065 improved locking 2015-04-21 14:33:59 +00:00
zzz
1caf3e778b Router timestamper:
- Add country-to-continent mapping
 - Add continent pool.ntp.org zones as first fallback,
   this will improve time service for countries that don't have a zone
 - Don't start threads in constructors
 - Fix logging, better prevention of initialization loops
 - Log severe errors to wrapper log also
continent.txt file from http://dev.maxmind.com/geoip/legacy/codes/country_continent/
Creative Commons Attribution-ShareAlike 3.0 Unported License
http://dev.maxmind.com/geoip/legacy/geolite/
Terms already met in LICENSE.txt
2015-04-21 14:22:05 +00:00
zzz
fd82fff07a Transports: Reduce idle timeouts 2015-04-21 09:58:46 +00:00
zzz
a6ac8f8c09 Blockfile: Unroll recursive initialization of BSkipLevels 2015-04-20 22:56:08 +00:00
zzz
19a26f8e22 Reseed: Prep for disabling non-su3 fetches (ticket #1513) 2015-04-20 18:48:00 +00:00
zzz
46e85cf265 only reset the sotimeout if not proxied 2015-04-20 17:57:57 +00:00
zzz
8f321b5427 EepGet: Set soTimeout for non-proxied fetches to enforce
header timeout and prevent long reseed hangs
2015-04-20 17:53:29 +00:00
zzz
e1f8f1a3f4 Reseed: Remove all default HTTP URLs (ticket #1514) 2015-04-20 16:11:33 +00:00
zzz
935a5b573d Reseed: Better error message if no valid URLs for configuration 2015-04-20 15:45:49 +00:00
zzz
8c2636aa99 Reseed: Honor SSL/non-SSL setting when custom reseed list is set (ticket #1136)
patch from "Inondle", cleaned up and tested
2015-04-20 15:33:03 +00:00
zzz
03ddb1075c BuildHandler: Don't enforce conn limits for P or X 2015-04-20 13:15:30 +00:00
zzz
72eb2c058c Streaming: Move Packet.writeSignedPacket() to PacketLocal 2015-04-20 13:13:55 +00:00
zzz
a100d2ccf9 javadoc, remove unneeded volatile and initializer in TCG 2015-04-20 13:12:21 +00:00
zzz
ecfb3e94c8 javadoc and debug log tweaks for ST2 2015-04-20 13:09:48 +00:00
zzz
c31d6b1ac1 javadoc fix 2015-04-20 13:09:13 +00:00
zzz
65993e1d50 add methods to simplify logging 2015-04-20 13:05:14 +00:00
zzz
47c4c0d6bb add all known dsa-only hosts to list 2015-04-19 19:35:38 +00:00
zzz
b2872e6110 I2CP Multisession - Work in progress:
Start availability notifier in subsession
Availability notifier cleanup
Various log tweaks added while chasing this down
Better subsession state management
I2PSocketManagerFull verifies subsession to force connect()
Successfully tested
2015-04-19 19:05:53 +00:00
zzz
b8c8d5b447 I2CP Multisession - Work in progress:
Accept subclient data message down client's tunnel in IMD
2015-04-19 15:49:02 +00:00
zzz
32049d7bfc I2CP Multisession - Work in progress:
Reuse LS encryption keypair from primary LS
Log tweaks
2015-04-19 14:49:13 +00:00
zzz
f0fdb35ba6 I2CP Multisession - Work in progress:
Fix creating subsession LS from primary LS
2015-04-19 03:35:40 +00:00
zzz
d8baf62966 I2CP Multisession - Work in progress:
Stub out hardcoded list of DSA-only destinations
Tweak client name length in summary bar
Force initial leaseset request for subsession
Send SessionStatus msg before LS request for subsession
2015-04-19 03:11:37 +00:00
zzz
be8f7f9676 I2CP Multisession - Work in progress:
Fix sending CreateSessionMessage for subsession
New AliasedTunnelPool for subsessions, don't reuse TunnelPool,
so it has its own settings
Fix addAlias()
Simplify refreshSettings()
Send status message on subsession create failure
Fix settings for subsession
2015-04-19 01:32:30 +00:00
zzz
57b641bf63 I2CP Multisession - Work in progress:
Fix NPE in receiveMessage()
2015-04-18 20:45:30 +00:00
zzz
ff5d29de1a I2CP Multisession - Work in progress:
Fix NPE in addSubsession() by creating key stream
Set sigtype for subsession
2015-04-18 19:50:14 +00:00
zzz
91e98ba447 I2CP Multisession Work in progress:
Fix NPE in requestLeaseSet()
Fix setting new session ID in SessionStatusMessage
Fix subsession support detection
Streaming: one socket manager, multiple connection managers.
Change data structure for subessions in socket manager
Subsession cleanup on destroy
I2PTunnel: add DSA subsession for non-DSA shared client
Javadocs
2015-04-18 19:01:23 +00:00
zzz
6a644dd0e5 propagate from branch 'i2p.i2p' (head 66743cfb9b4e1c257e4f0a20a318ee7eb1fb607c)
to branch 'i2p.i2p.zzz.multisess' (head 4533ba250cb8e49044f5144b34014e9bc618cdc7)
2015-04-18 14:08:22 +00:00
zzz
7b82393336 atomics and finals 2015-04-17 17:15:22 +00:00
22993e1ea6 installer/resources/eepsite/jetty-ssl.xml: fix comments 2015-04-17 14:18:56 +00:00
341bd6d7ca tweak to debian apparmor rules 2015-04-17 14:15:05 +00:00
13d5a36cfc drop unneeded patch (ty zzz) 2015-04-17 14:14:06 +00:00
f3bb84f2c0 merge of '4cd641356d3ecf443fa79aa64c8ad553a37022da'
and 'b9d4479f7e0f562a5fd47f2d494fe1b2b0925cbe'
2015-04-17 13:46:44 +00:00
1d496404be Separate loading and starting of TunnelControllers 2015-04-17 13:45:37 +00:00
zzz
51233371e0 history for prop, -5 2015-04-17 13:43:48 +00:00
zzz
bc0a7ebbbc propagate from branch 'i2p.i2p.zzz.test2' (head b6de226d1664089488ab2b438fe7457e9fb8e563)
to branch 'i2p.i2p' (head 0cf35c87b68a5360bd35257e36dfe7f740e53693)
2015-04-17 13:18:22 +00:00
zzz
72c78b3870 config for SSL to eepsite 2015-04-17 13:03:48 +00:00
zzz
5555c52376 Streaming: Locking for next send time,
rename shadowing field in inner class
2015-04-17 13:00:16 +00:00
e1842be049 Don't automatically start TCG on Android 2015-04-17 11:21:26 +00:00
zzz
6ceb4fcf42 history for prop, -4 2015-04-16 23:25:49 +00:00
zzz
50b68d4e1c propagate from branch 'i2p.i2p.zzz.815' (head 43bce385eecdf95bba08985211b80099d1224462)
to branch 'i2p.i2p' (head 1b89427bd2952dc4be08fba14ad1d814d722739f)
2015-04-16 23:19:48 +00:00
zzz
3f46228f0b ISJ: Reduce max search depth to reduce ff load
- from 7 to 6 if not ff
- from 7 to 3 if ff (we don't need to backtrack much if any, we know most of the ffs)
2015-04-16 22:02:35 +00:00
zzz
6c954f0b68 Transport: Fix NTCP countPeers()
O/P conn limit adjustment
2015-04-16 21:55:43 +00:00
zzz
69c2ed77a0 recognize Intel model 69 2015-04-16 15:38:13 +00:00
zzz
6f09224bdc sort clients on /configclients 2015-04-16 15:07:08 +00:00
zzz
568c90806d I2CP: Run DistributeLocal jobs inline (ticket #1506) 2015-04-16 14:24:56 +00:00
zzz
6e451c8d4d javadocs 2015-04-16 14:18:10 +00:00
zzz
12fd585625 Transport: Fix active peer count for NTCP,
which will make the network-down message in the console consistent.
Javadocs for getActivePeers() and getActiveSendPeers()
Make getActivePeers() and getActiveSendPeers() abstract in TransportImpl
Make getActivePeers() and getActiveSendPeers() more efficient
Preliminary conn limits for P/X
Log tweaks
2015-04-16 14:13:23 +00:00
zzz
997fbb3392 log on failed plugin update check 2015-04-16 13:14:40 +00:00
zzz
089626f6b1 increase max i2psnark tunnels to 10 2015-04-16 13:13:32 +00:00
zzz
71d2049fe8 OOM log tweak 2015-04-16 13:11:34 +00:00
zzz
e5aee3001f bump -2 2015-04-15 18:20:52 +00:00
dev
ec62bcbf8e propagate from branch 'i2p.i2p.tuna.tmp' (head 73f55ef56c4b4800364bc92d69794a7b6715c5a7)
to branch 'i2p.i2p' (head 20e0a6d51df8fa6918a48ac01c808e56d3540bf1)
2015-04-15 16:25:58 +00:00
dev
a8f013f3e4 merge of '303a05a4ccfb4162f4cca475bca49d77dceb06f9'
and '9c1c14d60b15e3d9eed4b291a7fae39c11d3c993'
2015-04-15 16:17:24 +00:00
dev
037cd78dc7 #1069: Propagate fix into i2p.i2p from i2p.i2p.tuna.tmp
* Replace SimpleScheduler with SimpleTimer2
 * Bump version number
2015-04-15 16:15:53 +00:00
dev
b31ae4bae5 propagate from branch 'i2p.i2p.tuna.tmp' (head 1bba286bdb7f8ba879c4db3f356676151674a201)
to branch 'i2p.i2p' (head 5698b31632398b8156a3b4cc215fed677cf205bf)
2015-04-15 16:08:29 +00:00
dev
54dba980b4 #1069: Replaced SimpleScheduler with SimpleTimer2 in a few places 2015-04-15 15:32:40 +00:00
dev
dc19d2fab3 SimpleTimer2: Removed debug print 2015-04-15 15:18:02 +00:00
dev
3a57310fbe SimpleTimer2: Call the 3-arg addPeridicEvenet() from the 2-arg addPeridicEvenet() 2015-04-15 14:42:39 +00:00
749e19a1c3 fixes to apparmor profile for i2prouter 2015-04-14 18:50:45 +00:00
zzz
de6608f6b8 Streaming: Handle reset packets without a FROM field, validate
signature using connection's destination
Log tweaks
Remove 0 arg from addRateData() calls
2015-04-14 14:11:48 +00:00
zzz
cd6d9cdd94 Router: Fix NPE on bad share bandwidth config (ticket #1524) 2015-04-14 14:04:31 +00:00
zzz
e45413d417 Update: Don't log an error for the "dummy" updater (ticket #1525) 2015-04-14 14:01:50 +00:00
11c3230150 updates to apparmor profiles
- hardening (restrict access to proc to owner)
- removing files covered by abstractions
- indentation per apparmor profile style
2015-04-14 01:00:10 +00:00
zzz
dd99978b19 0.9.19 2015-04-12 13:32:49 +00:00
zzz
dd265bbd54 Updates after review:
Remove meeh.i2p as update host (ticket #1515)
Re-add 193.xxx https reseed
Fix SocketManagerFactory property handling
Restore UPnP locale fix lost in the merge
i2ptunnel finals
I2NP unique id fixes
duplicate done() in ReseedChecker
bigger langbox in CSS
reformatting
Javadocs
2015-04-11 19:34:34 +00:00
dev
f5ba1b1b97 #1069: Replaced getInstance() with this 2015-04-09 22:32:59 +00:00
zzz
7825f0f84f i2ptunnel: Remove null workaround and stat, testing passed (ticket #335) 2015-04-09 16:04:06 +00:00
69a0324e86 update debian changelog; bump build 2015-04-09 12:06:26 +00:00
957d3545b6 Translation updates pulled from Transifex; start of Malagasy translation 2015-04-09 11:59:17 +00:00
466348a8c5 Updates to geoip.txt and geoipv6.dat.gz based on Maxmind GeoLite Country database from 2015-04-07. 2015-04-09 11:51:55 +00:00
zzz
e5b7e97ff4 Jetty: Set session cookies to HttpOnly in all webapps
i2psnark: Remove extra mime types in i2psnark web.xml;
added to Jetty's default by now, or in our mime.properties file
2015-04-08 19:45:37 +00:00
dev
4613e5f847 #1069: Improved patch according to feedback in ticket 2015-04-08 17:49:28 +00:00
dev
44f8154f07 #1069: Improved patch according to ticket feedback 2015-04-08 17:47:27 +00:00
zzz
5486874d1a Tunnels: Add config to disable Bloom filter for testing 2015-04-08 14:50:12 +00:00
zzz
d868ca4740 Tunnels: Add new Bloom filter size, increase bandwidth limit (ticket #1505) 2015-04-08 14:40:53 +00:00
zzz
780479be4b Tunnel: Add bloom filter warning if high bw but low memory 2015-04-08 13:36:56 +00:00
zzz
4705f01bc5 Router: Move update extraction code to new class in tasks/ 2015-04-08 12:33:16 +00:00
zzz
2f5f91a084 log tweaks 2015-04-08 11:52:02 +00:00
dev
e44fe98c7e propagate from branch 'i2p.i2p' (head 6ae35262874a1828d53ddad22e6a6c4db7b031c1)
to branch 'i2p.i2p.tuna.tmp' (head 7d48c8e1a01f6c6f6cef802e0436c50785d89716)
2015-04-07 17:01:47 +00:00
dev
d8fbc9c170 Formatting 2015-04-06 21:10:49 +00:00
dev
facbe8f9a0 #1069: Deprecated SimpleScheduler and moved functionality into SimpleTimer2 2015-04-06 21:05:24 +00:00
dev
4d8e577ffd findbugs: Added companion equals() and hashCode() methods to existing compareTo() 2015-04-06 16:04:05 +00:00
dev
80eb7635c1 findbugs: Added companion equals() and hashCode() methods to existing compareTo() 2015-04-06 15:40:39 +00:00
dev
e3103762b6 findbugs: Removed synchronization on concurrent object 2015-04-06 15:00:40 +00:00
zzz
cce710e377 IRC Server: Better timeout handling when reading initial lines (ticket #723)
Send error responses for timeout, EOF, and bad registration.
Only affects "user" mode, not webirc.
detab
move private fields to top
2015-04-05 17:36:30 +00:00
013c79bc45 Debian: Refresh patch 2015-04-04 21:59:36 +00:00
dev
1e375886bd merge of '2cb50c2864d750f33039bdbaeb6c15d2bd636ce4'
and 'cb2fbb74aa4412375fdbc546fe2218ca1704cd7d'
2015-04-04 19:49:47 +00:00
dev
d1ac24c65d findbugs: Covariant equals() method defined, Object.equals(Object) inherited 2015-04-04 19:49:37 +00:00
zzz
6aa1284848 i2ptunnel: Check for total header size too big,
log tweaks
2015-04-04 19:31:20 +00:00
zzz
bb082c35fc recognize more error codes 2015-04-04 19:14:30 +00:00
zzz
f7577e7de8 i2ptunnel: Return specific error pages to client on errors
in HTTP header processing in the HTTP server (ticket #1507)
2015-04-04 19:12:18 +00:00
zzz
b5df13d8b7 propagate from branch 'i2p.i2p' (head 2cb50c2864d750f33039bdbaeb6c15d2bd636ce4)
to branch 'i2p.i2p.zzz.test2' (head 9775e688503ec47dc12efa860a5571317af5f063)
2015-04-04 17:04:52 +00:00
zzz
9d76790cc5 javadoc 2015-04-04 17:01:40 +00:00
zzz
706ee243a5 Streaming read timeout fixes:
i2ptunnel:
- Better timeout handling when reading headers in HTTP server (improved fix for ticket #723)
  Enforce total header timeout with new readLine()
- Prep for returning specific HTTP errors to client on request timeout and header errors,
  instead of just closing socket... further work to be in i2p.i2p.zzz.test2 branch
Streaming:
- Fix read timeout on input stream - was waiting too long, often twice as long as timeout, or more
  Enforce total timeout even when notify()ed
- Fix read() returning 0 on read timeout instead of -1 (possible fix for ticket #335)
  This prevents passing partial headers to server on timeout
- Fix javadocs for read timeout to match current behavior
- Fix StandardSocket SoTimeout to account for differences with I2PSocket readTimeout
- log tweaks
2015-04-04 17:00:57 +00:00
zzz
351a1a8d27 i2ptunnel: Fix NoSuchElementException processing proxyList
caused by 03-31 checkin
2015-04-04 16:59:21 +00:00
zzz
6916cd7977 merge of '18f97452ba9fd5a7274ca689084ffe49b55c2cf3'
and 'c9caed8c48615dc740061fd28315ee659e1afe20'
2015-04-04 15:42:14 +00:00
dev
a444c25c2c silence findbugs: use of uninitialized value 2015-04-04 13:44:37 +00:00
dev
45bc533e38 findbugs fix: equals() used to compare array and nonarray 2015-04-04 13:37:18 +00:00
zzz
03e890b01c merge of '2e3b52a13c62422d86931cd194870b7e2698f3c2'
and 'fde331f6b10f0ef936a2aa0d68092df22348a581'
2015-04-04 11:21:50 +00:00
dev
0c90162e20 Copy directly into buffer without intermediate buffer 2015-04-04 02:27:24 +00:00
dev
ddc3ef8db3 Removed unnecessry buffering 2015-04-04 00:05:29 +00:00
zzz
fcec43b7ca i2ptunnel: Fix stopping tunnel on bad args when starting,
broken by new state code
2015-04-03 23:46:24 +00:00
zzz
edb614d970 wrapper.config: Remove old mortbay properties, unused by new Jetty 2015-04-03 23:40:39 +00:00
dev
820b99e3d3 Commented out java runtime argument 2015-04-03 23:20:39 +00:00
dev
cf0453cee0 Initialize uniqueId lazily to avoid wasting entropy for messages where it isn't used 2015-04-03 23:01:16 +00:00
zzz
75a8d8f6d3 more ssl config tweaks 2015-04-03 13:33:59 +00:00
zzz
1ac8d99145 i2ptunnel: Send HTTP server port 443 traffic to the server
transparently, to support HTTPS over the same tunnel,
when so configured.
Jetty: Add extensive help to jetty-ssl.xml for setting
up SSL on the same server.
2015-04-03 12:19:41 +00:00
dev
b7b5512e7a Formatting 2015-04-02 23:01:41 +00:00
zzz
485acd6c8d Remove all the startRunning() calls in constructors,
which duplicated the new ones in I2PTunnel, causing all sorts of trouble.
May still need more locking. TBD.
2015-04-02 20:52:40 +00:00
dev
bb68728c82 Added link to blog post explaining why the flag was added 2015-04-02 20:44:52 +00:00
dev
f3b2eb69d2 Fixed syntax error 2015-04-02 16:32:38 +00:00
dev
168d688fc9 Disable JVM stats being written to file, to prevent long (up to ~400ms) pauses.
- Blog post: http://www.evanjones.ca/jvm-mmap-pause.html
    - This change prevents tools that use the stats-file (/tmp/hsperfdata) from working (like jstat)
2015-04-02 16:05:43 +00:00
dev
ade93ea76d Added model name for Xeon E3-1230v2 2015-04-02 15:58:46 +00:00
44503af88b * Job Queue/stats: add stat/graph for amount of scheduled jobs. 2015-04-01 22:34:39 +00:00
zzz
eb7693561b spelling 2015-04-01 13:59:51 +00:00
zzz
3ccb03f9be propagate from branch 'i2p.i2p' (head bf7fc6bb213e734788d6527a4a689184ff73d6ad)
to branch 'i2p.i2p.zzz.test2' (head 6a04d890ef0ebf179ec6801d9d96afff26a2e515)
2015-04-01 13:48:18 +00:00
zzz
f3a2af8f10 make job runner quantity configurable 2015-04-01 13:48:06 +00:00
zzz
2ef615a3f7 I2CP: Allow larger client clock skew (ticket #1503),
better error message to client
javadocs
2015-04-01 12:50:51 +00:00
zzz
20197fc3ec i2psnark: Fix changing data directory on Windows (ticket #1503) 2015-04-01 12:41:38 +00:00
zzz
fadc624f7c API: Fix some client-side APIs to honor defaults in Properties;
add javadocs to specify where we do and don't (ticket #1491)
2015-03-31 13:18:11 +00:00
zzz
22c4149358 fix another split() bug 2015-03-31 11:26:02 +00:00
zzz
c770c6bc6a i2ptunnel: Fix multiple SSL outproxies in HTTP client
escape and truncate URL on error page
2015-03-31 11:21:32 +00:00
zzz
891408191e UPnP: Don't rescan when shutting down 2015-03-29 14:59:11 +00:00
zzz
9a8fa246a9 I2CP: Prevent NPE when router receives messages without prior session (ticket #1503) 2015-03-29 13:45:14 +00:00
zzz
83c3152b5d JobQueue: Don't start thread in constructor (ticket #973) 2015-03-29 13:40:04 +00:00
zzz
956730c5e9 log tweak to help diagnose ServerSocket closed 2015-03-28 10:54:00 +00:00
zzz
72b9c92a6e better 7 bit error message 2015-03-28 10:51:59 +00:00
zzz
349255d252 exit code checks and javadocs 2015-03-28 10:49:43 +00:00
zzz
ac902badcd log tweak to hide i2pd badness 2015-03-28 10:47:10 +00:00
zzz
9dc2ae0d7e fixup after prop 2015-03-28 10:25:45 +00:00
zzz
188bd6db7b propagate from branch 'i2p.i2p' (head 2ce39645bf3b3b7fc2f083ebcb073f104114e939)
to branch 'i2p.i2p.zzz.815' (head 4f0279eb4cf13e547a64913443ff7819a43962c0)
2015-03-27 14:47:49 +00:00
zzz
3a8ce64c84 I2PTunnel client-side locking fixes (ticket #815)
Checkin of patches from Oct. 2013, based on 0.9.8.1.
Had some issues back then, and not tested recently.
Prop from i2p.i2p to follow.
2015-03-27 14:16:41 +00:00
zzz
f3d573cab0 i2ptunnel HTTP client: Replace all getBytes() calls
with a Writer or getBytes("UTF-8") for efficiency and to
avoid encoding issues.
Store strings as strings, not bytes.
Catch IOEs to prevent cascading error pages.
Minor cleanups
2015-03-25 12:10:14 +00:00
zzz
9e18c7ea18 Streaming: Throw I2PSocketException when connection is reset,
display new error page in HTTP client (ticket #643)
javadocs
2015-03-24 14:33:36 +00:00
zzz
a975dc4427 Summary bar: linkify news headings, remove 'show news' link 2015-03-23 15:47:33 +00:00
zzz
b875e284af merge of '33b368d75d4b7536dd4a29efa35fba64e6dc409d'
and '8eb5a0d367c4b34eadc326e0ba727e998e6f5505'
2015-03-23 14:21:05 +00:00
46fe4298b9 States for TunnelController (#815) 2015-03-23 13:59:05 +00:00
9790d3ba64 Tweak so TODO is marked in IDEs 2015-03-23 12:50:33 +00:00
2d31f30a22 ReadWriteLock in TunnelControlGroup (#815) 2015-03-23 12:49:30 +00:00
2fefe93922 merge of '91e8b79f2d8c4ffd26867eb6ddd0ee63d22b0ca9'
and 'dd39c6a48fec46017ce527d8b8b8208369ecda5e'
2015-03-23 12:47:40 +00:00
399b068a4e Fixed NPE in test 2015-03-23 03:54:21 +00:00
zzz
dcffde6eeb Javadoc: missing package.html files in applications (ticket #1109) 2015-03-22 18:37:40 +00:00
zzz
78074f6a7e Javadoc: missing package.html files in i2p.jar (ticket #1109) 2015-03-22 17:32:35 +00:00
zzz
79dc01f7e4 Javadoc: missing package.html files in router.jar (ticket #1109) 2015-03-22 16:35:21 +00:00
zzz
0f6040ecb1 enforce a minimum number of RIs to bundle 2015-03-22 12:44:32 +00:00
zzz
a0ab72e362 more /configreseed help text 2015-03-22 12:26:05 +00:00
zzz
2c45378c6d Console: Better status feedback on manual reseed from URL
Reseed: Better status feedback and cleanup in summary bar
2015-03-22 10:08:48 +00:00
zzz
44c75187f5 set tunnel name for ping 2015-03-22 08:30:38 +00:00
zzz
2609a4d124 Floodfill: Don't become ff w/o ECDSA support
Don't transition to non-ff when shutting down if configured true
Set ff for cap P and X
2015-03-22 08:30:10 +00:00
zzz
2d58501db3 Plugins: Add form to browse for local plugin file to install,
easy since we have multipart in console now
Better status feedback from update manager to console
2015-03-21 17:23:19 +00:00
zzz
a337185820 better temp dir fallback and logging 2015-03-21 12:38:48 +00:00
zzz
9c0aa0c271 randomize i2psnark temp dir name 2015-03-21 12:19:03 +00:00
zzz
b2e908f094 add removed certs to delete list 2015-03-21 12:14:07 +00:00
zzz
ef32d37073 TunnelPool: Reduce expl. quantity adder for ff since we're
doing mostly direct lookups now, and delay adding them at
startup to give client tunnels a chance
2015-03-21 12:13:22 +00:00
zzz
f0961a9658 more accurate job stats 2015-03-21 12:10:10 +00:00
876b5714be merge of '7c32d2fbb882e6d56cb06fc0e272f05ee2c0b8ed'
and '7e72459b27feb5176e98c5efc843f63e46e8f63d'
2015-03-21 09:59:00 +00:00
825cd7ff4c Docstring spelling fix 2015-03-21 04:29:45 +00:00
47f3476078 More I2PTunnel UI logic into GeneralHelper 2015-03-21 04:29:32 +00:00
7b10ebc117 fix previous commit 2015-03-20 19:43:01 +00:00
e5cdfd206d Re-enable uk.reseed.i2p2.no; it's back up (ticket #1487) 2015-03-20 19:25:42 +00:00
zzz
dd4c62b560 TunnelDispatcher: Start part. tunnel cleanup job sooner since
we're accepting tunnels sooner.
2015-03-20 16:54:03 +00:00
zzz
aae801efaf sort config tabs 2015-03-20 16:51:34 +00:00
zzz
e02d44433d missed file from last checkin 2015-03-20 13:32:42 +00:00
zzz
590a3c98e5 charset 2015-03-20 12:32:53 +00:00
zzz
7f472e4ee9 Console:
- Move multipart form support from susimail to jetty-i2p.jar
    so console can use it
  - Add multipart form support to formhandler.jsi and FormHandler.java
Reseed:
  - Fix zip magic number
  - Finish manual reseed from local file
package.html files for jetty-i2p.jar
2015-03-20 12:30:04 +00:00
zzz
a3802d4d8b javadoc fix 2015-03-20 12:29:40 +00:00
zzz
59348f8dbd Reseed:
- Add form to manually reseed from zip or su3 URL
    (result status not yet working)
  - Add form to manually reseed from local zip or su3 file
    (not yet working, needs multipart/form-date moved from susimail)
  - Add form to create reseed zip file to share
    (working)
  - Backend support and refactoring in reseed code
2015-03-19 23:17:18 +00:00
zzz
8742a66f2f fix susimail HTTP headers 2015-03-19 21:36:23 +00:00
zzz
a2f027e136 NetDB: Don't publish non-ff RI on exit if we are coming right back 2015-03-18 19:58:31 +00:00
zzz
cb4359cd0a Streaming: Reduce min RTT again 2015-03-18 17:50:40 +00:00
zzz
163c172823 StatisticsManager: Publish dummy LS count if we just started 2015-03-18 17:29:08 +00:00
zzz
80a2d2c1f5 Router: Allow disabling the setting of some System properties, for embedded applications 2015-03-18 14:40:17 +00:00
zzz
486f282999 add CoreVersion.getVersion() 2015-03-18 14:13:05 +00:00
zzz
1293dccf35 I2CP Multisession support and multiple destinations in one tunnel pool.
Work in progress.
Router-side I2CP mostly done.
Client-side I2CP mostly done but undecided on how to handle
listeners.
Streaming stubbed out but may be wrong, may need multiple socket managers,
not clear how to proceed.
I2PTunnel not started.
Blacklist of DSA-only dests not started.
Router leaseset publishing not correct. Not clear whether to have
additional tunnel pools with flags, or put the tunnel pools into
the client hashmap twice. Client config contains destination,
may need to move that to tunnel pool.
2015-03-18 12:59:50 +00:00
zzz
91fe62eee3 History for prop, -6:
Prop from i2p.i2p.zzz.upnp, containing:
Cyberlink for Java v3.0 + (2015-02-15) from github
See branch revs for more info and fixups.
Previous was Cyberlink for Java v2.1 (2011-09-16) from SVN.
From a scan of the 2.1-to-3.0 diff, it's mostly
formatting changes, getting rid of DOS line endings,
and a couple of new features we don't need.
I see very few fixes. And the Device.getAbsoluteURL()
"fixes" did not work in my testing, I had to fix them again.
Unlikely to fix any of the open UPnP tickets #481 #725 #728 #1194 #1480.
But now we're current.
2015-03-18 12:15:41 +00:00
zzz
d3f5596cb2 propagate from branch 'i2p.i2p.zzz.upnp' (head 8719ae9a1473d748947733043f465a4589cc23d5)
to branch 'i2p.i2p' (head 5ae9785903c4b9452f4241758e8ddc1338e94574)
2015-03-18 12:13:41 +00:00
zzz
d7a88db87a NetDB:
- Send exploratory lookups directly to the floodfill if
    we are already connected to him
  - Don't encrypt RI lookups when overloaded
  - Don't explore when overloaded
  - SearchJob cleanups
Tunnels: Drop instead of reject requests on high job lag
2015-03-18 12:10:30 +00:00
zzz
0af1f67c33 Router: Revert deprecation;
addCapabilities() tweaks
2015-03-17 21:38:59 +00:00
zzz
8dde7b70db UPnP:
- New fix Device.getAbsoluteURL() once again after merge
 - Don't load local files in Service.getSCPDNode()
2015-03-17 21:29:03 +00:00
zzz
64faeef6c4 restore previous javadoc fixes after merge 2015-03-17 19:11:21 +00:00
zzz
c79e4aeaea propagate from branch 'i2p.i2p' (head 97716ce246bcbee153cf1a28253bac2385ddf7be)
to branch 'i2p.i2p.zzz.upnp' (head e508f71db90f382080b98d11efbdb4d88c1bc406)
2015-03-17 18:49:37 +00:00
zzz
8b6a86e391 merge of 'c5e201203713f0fefcdef642ca50597f8936c79c'
and 'fbd68f812db1e891f96e212b3a5938beec0233b5'
2015-03-17 18:21:12 +00:00
zzz
92daf4a8df Cyberlink for Java v3.0 + (2015-02-15) from github:
Unmodified cybergarage-upnp from github rev 9499b03 2015-02-05
https://github.com/cybergarage/cybergarage-upnp/commits/master
which is the same as rev 3ed1af9 2014-07-28 except for
the addition of README.md which we aren't using.
This is post-version 3.0.

Omitted files:
  router/java/src/org/cybergarage/xml/parser/XercesParser.java
  router/java/src/org/cybergarage/xml/parser/XmlPullParser.java
  router/java/src/org/cybergarage/xml/parser/kXML2Parser.java
chmod all files back to 644.

Diverging from 2.1 checkin rev 59eae97dbb470d8c4a1e4dba3a9763e134bb0c53
in prep for merging.

License unchanged.
Compile tested only.
2015-03-17 14:36:05 +00:00
zzz
819b07a52a minor refactor 2015-03-17 13:18:30 +00:00
zzz
b8f8c6129d prevent negative sleep 2015-03-17 13:17:38 +00:00
zzz
25d1ae195a New translations from tx:
Indonesian, Finnish, Malagasy, Albanian, Korean, Ukrainian, Brazilian Portuguese, Dutch
Note broken translations in TX config file
2015-03-17 13:16:40 +00:00
zzz
d22b05e114 NetDB: Send RI lookups directly to the floodfill if
we are already connected to him
(from ISJ only; does not affect exploration, verifies, LSes, ...)
2015-03-16 22:40:25 +00:00
zzz
db25eff74a log tweak 2015-03-16 22:38:29 +00:00
zzz
c927441d66 case-insensitive sort of stats 2015-03-16 20:14:32 +00:00
zzz
7e4832d5f2 lint 2015-03-16 15:44:45 +00:00
zzz
819b35c760 Router: Increase exploratory tunnel quantity if floodfill 2015-03-16 15:20:03 +00:00
zzz
071498c413 Router: Republish RI early if capabilities change
- RI javadoc clarifications WRT caps
2015-03-16 15:10:36 +00:00
zzz
7125ed0492 Apache Tomcat 6.0.43 2015-03-16 09:34:37 +00:00
zzz
de201bdd9c Throttle: Reject tunnels based on job lag 2015-03-16 09:12:41 +00:00
zzz
4fccd258e6 javadoc fixes 2015-03-16 09:08:03 +00:00
56d705739b Migrate accessors to GeneralHelper, fix broken outproxyAuth boolean 2015-03-15 20:26:36 +00:00
2a9d61b1ed merge of '6eb0d9bd5731afaa33fa1a0c82dd08a1d16d104b'
and 'f4fa275a1d6e014c64c5ff063fb890dd05e4ed60'
2015-03-15 20:13:16 +00:00
zzz
a9f6839a04 NetDb: Track flood success 2015-03-15 13:37:22 +00:00
zzz
5b555855ef Clear displayed tracker issues when restarting torrent
lint
2015-03-15 12:52:26 +00:00
zzz
76cf80a3d0 Job Queue:
- Fix overload dropping
   - Add drop count to job stats
   - Decrease overload threshold again
   - Concurrent tweaks
2015-03-15 11:48:12 +00:00
zzz
4c6aaa32b6 Router javadocs, stub out class P,
throw ISE instead of exit() if another router running
2015-03-15 11:42:00 +00:00
zzz
74ab1bff53 threshold tweaks for floodfill 2015-03-15 11:37:03 +00:00
zzz
b5bba5e3c8 log tweak 2015-03-15 11:35:49 +00:00
7e5bd17714 Move saveTunnel() and deleteTunnel() from IndexBean into i2ptunnel-ui.jar 2015-03-14 02:52:16 +00:00
zzz
ec6207fc78 Job Queue:
- Drop garlic message decryption jobs on overload
  - Decrease overload threshold
2015-03-13 17:50:32 +00:00
zzz
36d47a0ba9 minor cleanup 2015-03-13 17:48:29 +00:00
zzz
0289cefd8d lint 2015-03-13 17:26:15 +00:00
521eb2d8f8 Router: create router.integratedPeers (floodfills) stat, and allow graphing of it. 2015-03-13 16:53:08 +00:00
zzz
0494266649 i2psnark:
- Auto-reduce tunnel quantity based on peer count
  - Increase max tunnels
2015-03-13 14:56:35 +00:00
zzz
8fac5c064e fix i2ptunnel.war 2015-03-13 14:14:49 +00:00
0b6f74e646 Enable proxy authentication type to be configured 2015-03-11 23:46:38 +00:00
b8b272a5b8 Better multi-mode setters 2015-03-11 10:57:07 +00:00
a570e09166 Explicit boolean setters in TunnelConfig 2015-03-11 10:34:02 +00:00
1919e36c30 Move TunnelConfig to .ui, separate it from i2ptunnel.jar 2015-03-11 03:58:24 +00:00
812c00f11e Move TunnelController config creation logic into class that Android UI can use 2015-03-10 20:05:45 +00:00
419e27cfd1 Disable (jp|uk).reseeder.i2p2.no (tickets #1422, #1487) 2015-03-09 15:49:52 +00:00
d761c02909 Remove commented out reseed server i2p-netdb.innovatio.no and its associated certificates. 2015-03-09 15:40:40 +00:00
zzz
c7d1d2b69a console: Hide cancel graceful shutdown button unless we are shutting down 2015-03-08 20:23:00 +00:00
zzz
0972b6b56a more test cases 2015-03-08 20:20:50 +00:00
zzz
6e3cf7869f log tweak 2015-03-08 20:20:06 +00:00
zzz
f7337b4891 i2psnark: Increase min and default bandwidth
Add creation date to created torrents
log tweaks
more test cases
2015-03-08 20:19:12 +00:00
zzz
55161dec17 Router Throttle: Tweak messages during probabalistic rejection,
other cleanup
2015-03-08 20:07:05 +00:00
zzz
b65b53b0df Transport: Add missing bogons to IP validity check
192.0.0.2 seen out there (RFC 6333)
2015-03-08 20:05:50 +00:00
zzz
49e1e1c8a4 minor transport cleanup 2015-03-08 20:02:28 +00:00
9b73fcda40 Include priority for logged strings 2015-03-04 19:07:28 +00:00
b92e1ee9aa Split LogWriter to make Android subsititution simpler 2015-03-02 10:56:50 +00:00
04ac54cd35 Re-enabling host; its su3 files are now properly signed. 2015-03-01 23:37:27 +00:00
d47916f753 re-enable jp.reseed.i2p2.no (ticket #1422) 2015-03-01 22:34:15 +00:00
zzz
b0ea1d691a log fix, comment fix 2015-02-23 09:50:43 +00:00
zzz
ce041dfbc1 0.9.18 2015-02-22 09:52:27 +00:00
zzz
4613da093d log level tweak, bump for review 2015-02-19 09:47:44 +00:00
2d5f7aaae5 year typo fix 2015-02-18 23:48:21 +00:00
5a7a7ac83d typo fix 2015-02-18 22:36:52 +00:00
f217af2deb extend checkcerts.sh to print bits and hash information 2015-02-18 22:36:33 +00:00
6d58f9a354 Updates to geoip.txt and geoipv6.dat.gz based on Maxmind GeoLite Country database from 2014-02-04. 2015-02-18 22:34:09 +00:00
29953ea5e4 Debian: confine daemon with apparmor (ticket #1061) 2015-02-18 22:25:24 +00:00
bb9cef1e40 Add example apparmor profile (ticket #1092) 2015-02-18 21:38:25 +00:00
ece2f1484c refresh debian patch 2015-02-18 21:32:34 +00:00
a3c8a4363d Pulling in translations from Transifex 2015-02-18 20:20:52 +00:00
2f90b5a201 refresh debian patch 2015-02-17 19:27:11 +00:00
d4bbdc28f3 FloodfillMonitorJob: use the 60 min rate avg instead of lifetime avg, but fallback to the lifetime.
SAMStreamSend: fix tabbing from earlier commit.
2015-02-16 17:27:17 +00:00
f41df969b7 merge of '3e2231827648f614c5df325d9904e8d454e9a847'
and 'cddd2e9d2cf6f5c50a7d9948fbb2b3247d9768eb'
2015-02-16 08:07:54 +00:00
f87d006a1c FloodfillMonitorJob:
- Use lifetime average value for job lag
 - Change the job lag limit to less than 25ms
 - Consider and set the limit of backlogged tunnels to less than 5
2015-02-15 22:40:36 +00:00
f4fa9a7d8f New cert for i2p.mooo.com. Will be switched on the server in a future release. 2015-02-15 19:16:07 +00:00
c52047e6cd Remove reseed host by hoster's request 2015-02-15 19:10:48 +00:00
9163d41228 * I2PSnark, Jetty, SAM, crypto: findbugs resource leaks. 2015-02-10 21:57:27 +00:00
1be9bb29e8 disabling us.i2p2.no over http 2015-02-08 15:05:04 +00:00
522a89a045 reseed: remove reseed.info; hoster is discontinuing the service. 2015-02-08 15:00:01 +00:00
zzz
06b9b6a7fb more clock log tweaks 2015-02-08 12:52:51 +00:00
zzz
7f9c565cd7 fix early NPE 2015-02-08 00:42:43 +00:00
zzz
201afc823e SSU: Limit range for valid clock skew
Reduce log level for ignored clock adjustment
2015-02-07 14:13:14 +00:00
zzz
f4c79c885a Transport: Ban routers if they are too old and we are non-DSA 2015-02-07 14:03:42 +00:00
zzz
656202c9db debug tweak 2015-02-07 14:01:56 +00:00
zzz
72b64072d5 missed file for event log change 2015-02-07 13:59:11 +00:00
zzz
b72271f9a4 NTCP: Block IP for a while when incoming connection is dropped before
receiving a message. Possible workaround for tickets #551, #1075, #1411.
Root cause of problem not yet found.
- Increase threshold for loop throttle, this probably isn't the problem.
- Log tweaks
2015-02-06 15:09:45 +00:00
zzz
b0d09d28f4 SSU: Change peer test log error to warn.
This is caused by an i2pd bug, already fixed.
2015-02-06 11:18:20 +00:00
zzz
b9197e35b5 NetDB: Reduce max job lag for floodfill, was far too high 2015-02-06 00:51:32 +00:00
zzz
e431be2cbe NTCP minor cleanups, javadocs, atomics 2015-02-06 00:49:21 +00:00
zzz
761c883c1f Add event log for reachability change 2015-02-06 00:47:41 +00:00
zzz
60f86f342b Decrease DH refiller initial delay and increase buffer size
to reduce chance of running out on high-bandwidth routers
2015-02-06 00:46:13 +00:00
zzz
1234b6b148 stat tweak 2015-02-06 00:45:24 +00:00
6f45242fc8 Plugin SU3 cert for str4d@mail.i2p 2015-02-04 23:03:42 +00:00
zzz
36c45ccb7b Console: Show UPnP status even if disabled (ticket #1459) 2015-02-04 16:11:17 +00:00
zzz
90cf71b5bc rename headers after review 2015-02-04 11:54:18 +00:00
zzz
7165dc7860 NetDB: Don't flood an RI back to itself. While Java ffs self-flood,
other implementations may not.
2015-02-01 19:57:18 +00:00
zzz
5491287931 OCMOSJ: Pick a OB tunnel at random, not with the OBEP closest
to the lease, as that may be reducing the odds of trying a
different path and hurting connection reliability.
While the change may slightly increase connection congestion,
if it helps with reliability then it's worth it.
2015-02-01 19:53:11 +00:00
zzz
7256096b8a Router: Call warmupCrypto() earlier in the initialization, so it
actually happens before some other thread needs the crypto
2015-02-01 19:49:25 +00:00
zzz
b6008b5414 Crypto: Catch IAE in generateCertificate() 2015-02-01 19:47:09 +00:00
zzz
1042d21278 log tweak 2015-02-01 14:07:56 +00:00
zzz
47eff7ee86 PRNG: Don't hang forever at startup waiting for SecureRandom init 2015-01-31 17:37:59 +00:00
zzz
3da850a6b9 bump -17 2015-01-31 15:20:37 +00:00
zzz
a1358deda2 private method 2015-01-31 15:16:42 +00:00
zzz
df0bbfd615 Netdb: Encrypt lookups for 32-bit x86 also 2015-01-31 15:13:52 +00:00
zzz
0568ac3aa5 javadoc 2015-01-31 15:13:04 +00:00
zzz
e63a69170e Transport: set 4 MBps max bw due to bloom filter 2015-01-31 15:12:21 +00:00
zzz
711f8dedd9 console: disable changing log path 2015-01-31 15:10:45 +00:00
zzz
09c3737a94 reduce log level 2015-01-31 12:53:49 +00:00
zzz
9384424173 disable floodfill in laptop mode 2015-01-31 00:12:25 +00:00
zzz
4936f08212 Console: Don't display invalid IPv6 addresses as options on /confignet 2015-01-30 17:26:45 +00:00
zzz
03f4ebbe35 add throttle stat 2015-01-30 16:17:39 +00:00
zzz
0671785ab2 NTCP: Throttle event pumper if looping too fast (tickets #551, #1075, #1411)
This is just a simple workaround, root cause unknown.
May need tuning.
2015-01-30 16:00:45 +00:00
zzz
381dbc4b4a Proxy error page tweaks 2015-01-30 15:55:12 +00:00
zzz
84cf531f5f SSU: Fix transition from firewalled to non-firewalled 2015-01-29 22:23:28 +00:00
zzz
175806115b SSU:
- Sort introducers in router address, so we won't force a republish
due to a different ordering of the same introducers
- Don't publish an address if we need introducers but don't have any,
so the user won't see a 'firewalled with inbound NTCP enabled' message
2015-01-29 20:34:49 +00:00
zzz
86b45ab1e5 SSU: Fix replaceExternalAddress churn when firewalled,
caused by change in 0.9.17 removing IP/port from published address
when firewalled. We must now keep a local unpublished address
also, containing the detected IP/port.
2015-01-29 15:53:04 +00:00
zzz
17939036bc move comparators to their own class 2015-01-29 12:52:46 +00:00
zzz
5bf515441e Router: Ensure nonzero tunnel IDs 2015-01-28 21:43:27 +00:00
zzz
06edb9f2a6 Router: Stub out capabilities P and X (ticket #1447) 2015-01-28 18:07:45 +00:00
zzz
33b58f5fab UPnP:
- Callback when device removed
  - Consolidate callbacks
  - Clear ignored devices after primary device removed
    to allow one to be promoted on rescan
2015-01-28 17:38:52 +00:00
zzz
47a012a4dd initialize blocklist sooner 2015-01-28 17:36:53 +00:00
zzz
e5801be43e only use valid IP for geoIP 2015-01-28 16:25:50 +00:00
zzz
d5a6ac591c more UPnP locking fixes 2015-01-28 16:25:08 +00:00
zzz
59373f9bdf UPnP:
- Rescan for devices periodically and when reachability changes (tickets #661, #959)
  - Don't put "I2P" in registered protocol name
  - Add uptime to UPnP info
  - HTML escaping
  - Remove static log on Android
  - Javadocs and cleanups
2015-01-28 15:04:59 +00:00
zzz
5da492b9e5 spelling 2015-01-19 12:44:31 +00:00
zzz
9bcc951f10 i2psnark: Skip incompatible welterde tracker if we are ECDSA 2015-01-11 18:21:45 +00:00
zzz
3270ba840e I2PTunnel: Add option for multihoming optimization 2015-01-11 17:36:39 +00:00
zzz
45b3e44cc2 NetDB: Stubs for bandwidth estimation during reseed (ticket #935)
Incomplete and may not ever be, for evaluation only.
2015-01-10 16:51:13 +00:00
zzz
7ed855b2d2 NetDB: Publish RI faster when costs change (ticket #1437)
PLRIJ interval was 37-50 minutes. Reduce that by 4x,
but for 3 out of 4 times, only publish if something changes,
including cost. 4th time, always publish, as before.
This will hopefully reduce routers getting slammed to
conn limits on a transport.
2015-01-09 17:03:33 +00:00
zzz
f08552c2d1 javadocs 2015-01-09 16:58:57 +00:00
zzz
9a4c19b24b reduce log level 2015-01-08 19:32:42 +00:00
zzz
690b695373 remove jisko.i2p, down since 2014-11-08 2015-01-08 18:21:11 +00:00
zzz
65348b2365 more renaming 2015-01-08 18:20:08 +00:00
zzz
285c13d900 fix reseed checking at startup, broken in previous checkin 2015-01-07 23:15:10 +00:00
zzz
0a938d9048 Router: Don't reset uptime after a soft restart
Tunnels: Temporarily increase exploratory tunnel quantity at startup,
so that netdb refresh will work better
2015-01-07 20:11:04 +00:00
zzz
a02a265802 trim all xml news data 2015-01-07 19:55:37 +00:00
zzz
eeeeef81cf NetDB: Possible fixes for reseed completion not recognized (ticket #1384) 2015-01-07 19:16:55 +00:00
zzz
bcb9fe5f24 Startup: Accept tunnels after 10 minutes instead of 20 (ticket #1152) 2015-01-07 19:14:44 +00:00
zzz
37f34d83f8 Router: Add startup/shutdown state machine
Tunnels: Cleanup, catch more cases of zero-hop configuration
ClientAppConfig: Start i2ptunnel sooner
  Since BuildRequestor won't use a zero-hop exploratory as a paired tunnel
  for client builds, it's now safe to start client tunnels
  before the expl. tunnels are ready. This will save up to 90 seconds.
2015-01-07 17:54:21 +00:00
zzz
b3238079c3 reorder 2015-01-06 14:39:14 +00:00
zzz
ee1edb3383 renaming 2015-01-06 14:10:25 +00:00
zzz
7767430af2 EepGet: Fix PcapWriter 2015-01-05 17:05:36 +00:00
zzz
2e5185aa99 EepGet: Change command line default to 0 retries 2015-01-05 15:22:32 +00:00
zzz
6e847a4cc4 Streaming: Add API for sending/receiving payload in ping/pong 2015-01-05 15:09:12 +00:00
zzz
045f6dccf8 Latency reduction all over:
- SSU: Reduce ack delay
- Streaming: Reduce min RTO and flusher delay
- Tunnels: Reduce GW batching time
2015-01-05 13:19:34 +00:00
zzz
d7895a456a minor optimization 2015-01-05 13:17:59 +00:00
zzz
7753d05b61 UrlLauncher:
- Configure browser with routerconsole.browser (ticket #1159)
- Convert to ClientApp interface
2015-01-05 12:42:39 +00:00
zzz
043b4776c3 move port under interface in form 2015-01-05 12:40:46 +00:00
zzz
5db764de5f Blocklist:
- Rewrite to read and merge multiple files
- Include in update, use version in base dir too
- Increase limits
- Bug fixes
2015-01-05 12:38:38 +00:00
zzz
3ae846a713 m4b mime type 2015-01-03 14:15:48 +00:00
zzz
927e29b8ef I2PTunnel: Persist leaseset keys
I2CP: Use configured leaseset keys if available
2015-01-03 13:32:24 +00:00
d271411552 Added Dock fix for Mac OSX 10.10 2015-01-03 01:51:32 +00:00
31d98ac4a5 new reseed host 2014-12-30 02:18:30 +00:00
78f4cc8e30 Add two certs to deletelist (missed in last commit) 2014-12-22 16:27:58 +00:00
cce30a8f42 reseed changes
- cowpuncher is moving to rows.io
- (temporarily) disabling 193.150.* due to downtime
- removing unnecessary certs
2014-12-21 20:41:34 +00:00
zzz
a9e928fb46 Eepsite help: Removed statements requiring dest to end in AAAA.
Translations updated also, but may need some further fixup.
2014-12-19 14:14:04 +00:00
zzz
60017f7c55 Crypto: Stubs for encryption key types 2014-12-17 14:41:24 +00:00
zzz
eb46f74e24 I2CP: Don't log full session config on error 2014-12-17 14:30:11 +00:00
5e890bd781 checkremotecerts.sh: torify was recently deprecated and now is just an alias pointing to
torsocks, so let's use torsocks directly
2014-12-15 15:18:19 +00:00
zzz
20facf78d0 bump -3 2014-12-15 14:51:34 +00:00
zzz
96db43cc8e unchoke new peer faster 2014-12-15 14:43:37 +00:00
zzz
ab4f209c10 remove xml stats link 2014-12-15 14:40:38 +00:00
zzz
fa51a0aef4 enhance logging for inproxy rejections 2014-12-15 14:40:00 +00:00
zzz
aa6a5e053c raise max concurrent tunnel builds 2014-12-15 14:38:33 +00:00
zzz
03df6c2ba0 less casting 2014-12-15 14:38:07 +00:00
501f645e60 disabling reseed host i2p-netdb.innovatio.no: unresponsive hoster + config issues.
Could be re-enabled when/if problems are fixed.
2014-12-14 23:32:11 +00:00
zzz
23534b31c6 SU3File: Infer SigType from private key when signing,
Change default to RSA 4096
SigUtil: Add conversion methods for Java keys with unknown types
2014-12-14 17:52:23 +00:00
zzz
d35363cdbc SU3File: Fix getContentOffset(); fail on excess data after sig 2014-12-14 15:52:44 +00:00
zzz
ba34c90b7f EdDSA cleanup, another null resource check 2014-12-13 20:56:49 +00:00
94a19171ed reseed server and comment updates 2014-12-13 18:54:28 +00:00
8099591589 correct certificate line endings 2014-12-13 18:38:41 +00:00
df6bbc59b3 update of reseed ssl certificates:
The webpack* and cloudflare* certificates are for ssl.webpack.de and
cowpuncher.drollette.com, respectively.  I'm removing the smartcom.org
certificate because it's unused.
2014-12-13 18:29:12 +00:00
zzz
05a616aa0d SU3File: Implement 'extract -k' 2014-12-11 20:58:04 +00:00
zzz
c84105e783 add cacert cert to deletelist 2014-12-10 17:57:16 +00:00
zzz
262721cc90 SSU: reduce log level of uncaught errors processing I2NP message 2014-12-10 17:56:37 +00:00
c24168d5cd remove unused and weak md5 certficate 2014-12-10 14:39:44 +00:00
zzz
4e529a68d3 Console: Prevent two-word translations from splitting across lines in summary bar 2014-12-09 15:16:41 +00:00
4f3244e93b add new, stronger certificate for netdb.i2p2.no
The old certificate will not be replaced on the server yet.  The old cert is
SHA/1024-bit. New cert is SHA256/2048-bit key.
2014-12-08 23:50:06 +00:00
zzz
b2e17916e4 HTTP Proxy: Fix parsing of ECDSA address helper,
ignore '=' when comparing, reindent test
2014-12-08 14:12:00 +00:00
zzz
57ac344e7f show infohash in upper case 2014-12-08 14:08:45 +00:00
zzz
98e275d908 javadoc typo 2014-12-08 14:05:35 +00:00
zzz
8420b6c715 NetDB: Increase lookup throttle time 2014-12-08 14:05:08 +00:00
3dfcb2d5cc (temporarily?) disable jp.reseed.i2p2.no (ticket #1422), add a note that netdb.i2p2.no is currently v3 only 2014-12-07 15:42:57 +00:00
zzz
540720a912 unit test fixes 2014-12-05 16:18:25 +00:00
zzz
f86200e3ae history for prop, -1 2014-12-05 15:37:01 +00:00
zzz
9e43618028 Plugins: More thread group debugging for isRunning check;
Don't count Jetty RolloverFileOutputStream in the thread group,
to fix restart of a plugin
2014-12-05 15:35:38 +00:00
zzz
aacdba1bc7 KeyGenerator: main() test improvements
Allow specification of sig types on command line
2014-12-05 15:32:34 +00:00
zzz
c28d060d52 Update: Use last-modified instead of last-checked for the next
if-modified-since fetch, to fix failing to fetch the latest news
2014-12-05 15:30:53 +00:00
zzz
bf3fdbb1ab Increase default class O conn. limits to 350 NTCP, 1050 SSU 2014-12-05 15:27:24 +00:00
zzz
0a7a637d46 javadocs 2014-12-05 15:21:45 +00:00
zzz
e842165265 more argument checking, javadocs 2014-12-05 15:21:26 +00:00
zzz
2db82da910 cleanup 2014-12-05 15:19:26 +00:00
zzz
9953bc3024 javadoc 2014-12-05 15:18:24 +00:00
zzz
2ba4992d88 propagate from branch 'i2p.i2p.zzz.test2' (head 0feb2e6806927f68c7333aaa0892de185bb2629c)
to branch 'i2p.i2p' (head 0482fa843cb1e9d7ec281440056eef3a0ab07bdb)
2014-12-05 15:14:40 +00:00
zzz
5e67008d26 I2PTunnel: Reduce i2ptunnel threads, more thread pooling.
Big savings is on client side (two less threads per connection)
 - Move client pool from static inI2PTunnelClientBase to TCG.
 - Use client pool for some server threads
 - Run some things inline that were formerly threads
 - Client-side I2PTunnelRunner thread used to do nothing but start 2 more
   threads; now it runs one inline (like we do for server-side HTTP)
 - Javadocs and cleanups
Was originally intended to reduce load for high-traffic servers
but most of the savings for now is on the client side.
Ref: http://zzz.i2p/topics/1741
Todo: Figure out how to run the HTTP client-side gunzipper inline too
Todo: More server-side improvements

---

Client side:

before:
4-5 threads, 1-2 pooled

  I2PTunnel Client Runner (BlockingRunner from client pool)
      starts I2PTunnelRunner or I2PTunnelHTTPClientRunner and exits
          starts StreamForwarder toI2P and waits
          starts StreamForwarder fromI2P and waits
              starts HTTPResponseOutputStream (HTTP gunzip only) (from client pool)
now:
2-3 threads, 1-2 pooled

  I2PTunnel Client Runner (BlockingRunner from client pool)
      runs I2PTunnelRunner or I2PTunnelHTTPClientRunner inline
          starts StreamForwarder toI2P and waits
          runs StreamForwarder fromI2P inline
              starts HTTPResponseOutputStream (HTTP gunzip only) (from client pool)

---

Server side:

before:
1-4 threads, 0-1 pooled

  Server Handler Pool (Handler from server pool) execpt for standard server, blockingHandle() inline in acceptor
      starts I2PTunnelRunner or CompressedRequestor and exits
          starts StreamForwarder toI2P and waits   (inline for HTTP)
          starts StreamForwarder fromI2P and waits  (except not for HTTP GET)

now:
1-4 threads, 0-2 pooled

  Server Handler Pool (Handler from server pool) execpt for standard server, blockingHandle() inline in acceptor
      starts I2PTunnelRunner or CompressedRequestor and exits (using client pool)
          starts StreamForwarder toI2P and waits   (inline for HTTP)
          starts StreamForwarder fromI2P and waits  (except not for HTTP GET)
2014-12-05 15:12:51 +00:00
zzz
e7b50c5940 reduce auto-stop threshold again 2014-12-02 15:23:50 +00:00
zzz
78d7277298 show b32 for local leasesets too 2014-12-02 15:11:12 +00:00
zzz
fb641187b8 use new getVersion() 2014-12-02 13:42:58 +00:00
zzz
4b2715c36f RouterInfo: Add convenience method getVersion() 2014-12-02 13:30:31 +00:00
zzz
f1e9f5d4fd DatabaseStoreMessage: Mask the unused bits in the type field,
in case we ever want to use them for options
2014-12-02 13:28:48 +00:00
zzz
2d43d349ab add more invalid ports 2014-12-02 13:22:26 +00:00
zzz
7ab6708a3c 0.9.17 2014-11-30 16:41:57 +00:00
7010d9b524 really bump 2014-11-28 20:43:42 +00:00
947a3a2181 bump build (-11-rc) 2014-11-28 20:42:33 +00:00
0ff87ef8cb merge of '3e6cfe9a01136316f39f1bd294a515e6bc91ff8e'
and 'b4b595d294ace07f7fde583957d8e00e96af347c'
2014-11-28 20:39:57 +00:00
ec20150ffd geoip updates (2014-11-05) 2014-11-28 19:29:16 +00:00
30876a9cd3 PO files pulled from tx 2014-11-28 19:25:26 +00:00
zzz
1773fc0e0d Add more clues to file locations in default config files 2014-11-28 14:23:34 +00:00
zzz
6d6f7fb89b Data: Disallow duplicate keys in a Mapping 2014-11-28 13:45:33 +00:00
zzz
449ce3176e propagate from branch 'i2p.i2p' (head b4b595d294ace07f7fde583957d8e00e96af347c)
to branch 'i2p.i2p.zzz.test2' (head 90c482d231ea639bff8d37d390dac081e361f48f)
2014-11-28 13:13:00 +00:00
zzz
be8832e87f link to Russian version of ECDSA help page 2014-11-27 18:17:07 +00:00
zzz
5999690665 link ECDSA warning to wiki help page 2014-11-27 12:55:16 +00:00
zzz
285fa6cbc9 BuildRequestor: Reduce delay when client build can't find
a paired tunnel (possible fix for ticket #1412)
2014-11-26 17:32:56 +00:00
zzz
9700f30c35 Tunnels: Disallow changing allowZeroHop setting for exploratory 2014-11-26 16:18:37 +00:00
zzz
a38bd0b5cf Data: Fix NPE on unknown sig type in destination
Fix hashcode and equals for typed data
2014-11-26 16:06:09 +00:00
zzz
5383f9f097 Profiles: Change slice selection argument from an int to an enum for clarity 2014-11-25 14:25:42 +00:00
zzz
a16d17c422 SusiMail: Add save-as button
Fix encoding for filename in Content-Disposition header
New icon from Silk, same license as the others
2014-11-24 18:36:16 +00:00
zzz
5f2b620819 PrivateKeyFile: Don't rewrite file in main() if no options 2014-11-24 14:26:53 +00:00
zzz
fd47cb88de i2ptunnel: Fix automatic setting of random key 2014-11-24 14:15:44 +00:00
zzz
77e7982e74 Drop i2p.feared.eu ssl cert for reseed 2014-11-23 14:24:22 +00:00
zzz
04cd1cedda Reseed update from backup@mail.i2p:
please commit some updates for my reseed servers: Add new ssl-certs:
	ieb9oopo.mooo.com2.crt	-->  certificates/ssl/	
	link.mx24.eu.crt	-->  certificates/ssl/

The first one is a new ssl-cert as exchange for the current one.
On http-server side the exchange will take place sometimes next year,
until then the current existing ieb9oopo.mooo.com.crt is still valid.
The second is a new reseed server from me.

Reseeder.java: Please add to DEFAULT_SSL_SEED_URL:	
	https://link.mx24.eu/
with this comment:	
	// Only HTTPS and SU3 (v3) support

Also the list can be cleaned up from these other dead servers:
2014-11-23 14:18:29 +00:00
zzz
3ef89f49e7 SAM: Fix v3 bug accepting incoming connections
It was starting both the v3 and v1 acceptors.
2014-11-22 17:19:40 +00:00
zzz
2a681608b5 PeerSelector: If non-DSA, don't use incompatible peers
for exploratory tunnels or closest-hop in client tunnels
2014-11-22 14:05:06 +00:00
zzz
a52c06a6c6 point to Jetty 8 Javadocs 2014-11-22 13:17:39 +00:00
49b8a65ad9 Integer.compare() is 1.7 syntax 2014-11-21 22:52:19 +00:00
9781cb72ac Bump version 2014-11-21 13:11:47 +00:00
f7e83fb839 Require at least one update in a release 2014-11-21 13:09:58 +00:00
ce2a2cf684 Only need one torrent magnet; tighten update type spec 2014-11-21 13:02:57 +00:00
c88fa70f82 Cleanups 2014-11-21 12:52:24 +00:00
f76744a0c0 Improved SU3 news file specification 2014-11-21 12:46:33 +00:00
zzz
31cc0764a9 Logger: Configurable flush interval 2014-11-18 14:49:23 +00:00
zzz
15137d9b62 NetDB: Exclude A1/A2 "countries" from auto-floodfill 2014-11-17 14:19:00 +00:00
zzz
8f8adfa39e propagate from branch 'i2p.i2p' (head bde4ef3680071b416b3528bad4c16245964f432a)
to branch 'i2p.i2p.zzz.test2' (head 183d2a30edd10165451d0cbbf75636f3b1dfda16)
2014-11-15 17:48:39 +00:00
zzz
5044f3e58f I2NP:
Move some data structures away from ByteArray; offsets were always zero
  - New BuildRequestRecord constructors
  - BuildRequestRecord field becomes final byte[222]
  - IV becomes byte[16]
  - Build record becomes EncryptedBuildRecord
Remove extra copy in BuildRequestRecord.encryptRecord()
Remove unused BuildRequestRecord.readOurIdentityMatches()
2014-11-15 17:48:11 +00:00
zzz
279e102d7a I2NP:
- Set lookup type flags even if no reply tunnel specified
- Reduce object churn when writing some messages
2014-11-15 17:45:14 +00:00
7f72830ec8 JavaDoc fixes 2014-11-14 22:00:51 +00:00
2caaad95ec Comment out not yet implemented tests 2014-11-14 21:52:47 +00:00
09b995aca6 BigIntegerFieldElement.isNonZero() tests 2014-11-14 21:51:53 +00:00
a0bf8433e4 Tests: copy the EdDSA test.data file to where the classloader can find it 2014-11-14 21:16:28 +00:00
zzz
9104bd7304 Tests: Copy the new EdDSA test vectors
to where the classloader can find them.
Throw a better error message if not found.
2014-11-14 16:44:04 +00:00
zzz
2f2aa7f5a8 I2PTunnel:
- Fix bug that left server acceptor thread running after close
- Add destroy() methods to release all resources when closing a tunnel for good,
  particularly the streaming timer threads
- Use COWAL to prevent concurrency problems
- Javadocs
Streaming:
- Don't return null from accept() any more; actually throw
  ConnectException as the javadocs have always specified
- Throw ConnectException from accept() if interrupted; previously caught and ignored
- Throw exceptions from ConnectionHandler.accept(), not higher up
- Close ServerSocket when ConnectionManager is shut down
- Synchronize setActive(), clear queue when starting to accept,
  better handling of calls that don't change state
- Javadocs
ConfigClientsHelper: Call isPluginRunning() less often
PluginStarter: Simplify detection of active threads

Above changes mostly in support of zzzot plugin implementing ClientApp
and being able to shut down completely so there are no threads
in its thread group, so /configclients will all show status as stopped.
Previously, the I2PTunnelServer acceptor thread and
one or more streaming timer threads would remain.
2014-11-13 20:12:55 +00:00
0773a30578 add hamcrest-all to classpaths and minor formatting fixes 2014-11-12 17:42:50 +00:00
962f5efe6b merge of '1e0d390eeacce432f968251f1bbbe03ef031a116'
and 'f61d617d9bfd5759366102b0b5ff45effde08e84'
2014-11-12 14:52:52 +00:00
6dc3cd9650 build.xml: signing
- move signing to ant macros so they can be used by multiple build targets
- add support for signed devbuilds
- add support for generating i2pseeds.su3 (for testing)
2014-11-12 14:51:27 +00:00
zzz
397ae536f9 Data: Clear more caches when under memory pressure and at shutdown 2014-11-12 14:44:49 +00:00
zzz
f19ec4bd44 Plugins: Fix bug in stopping a ClientApp plugin with $parameters in the args 2014-11-12 14:38:13 +00:00
fd7e549915 Added EdDSA tests
Source:
https://github.com/str4d/ed25519-java
Git commit:
58e4efadf972f4dc4f67c05152f82b49fb22bac6
2014-11-12 10:21:46 +00:00
7a7ae77c83 Updated EdDSA code
Source:
https://github.com/str4d/ed25519-java
Git commit:
58e4efadf972f4dc4f67c05152f82b49fb22bac6
2014-11-12 10:20:28 +00:00
zzz
1a9fb381ed new su3 reseed cert (bugme/mooo.com) 2014-11-11 21:45:32 +00:00
zzz
ae7bfceafb snark tweaks 2014-11-11 14:26:23 +00:00
zzz
a961843aa6 bump -4 2014-11-10 16:27:53 +00:00
zzz
43c6a4ddac fix some issues with tracker config form 2014-11-09 14:33:26 +00:00
zzz
ae1d5648d5 Router, i2ptunnel: Add option for per-pool persistent random key,
so peer ordering does not change across restarts
2014-11-09 13:51:19 +00:00
zzz
2d3e8e0c4e disable spellcheck in custom options field 2014-11-09 13:46:47 +00:00
zzz
4691fc69d5 SSU: Fix bug preventing inbound connection from non-DSA router (ticket #1408)
Transports: If we are non-DSA, check for compatibility before connecting out
2014-11-08 18:01:13 +00:00
zzz
cb87f9f307 ProfileOrganizer: More efficient slice calculation,
don't pollute Hash cache
2014-11-08 17:57:17 +00:00
zzz
5f1e5bc271 Data: make getKeysAndCert() public 2014-11-08 17:53:55 +00:00
zzz
1c6d5ad2db EdDSA: Bump minimum router version to 0.9.17
due to previous bugs
2014-11-08 17:52:35 +00:00
zzz
555189f123 i2psnark: Add support for specifying data dir in add form (ticket #1028) 2014-11-08 17:50:27 +00:00
zzz
049044b827 javadoc fix 2014-11-08 17:47:51 +00:00
zzz
cfd9e2c3ab Fix compile error; history for prop; -2 2014-11-06 18:09:14 +00:00
zzz
a0b457b9a1 propagate from branch 'i2p.i2p.zzz.test2' (head 9dca19f228a66b5ac646c3d97d4f018c733081de)
to branch 'i2p.i2p' (head e7f2b0990f1ff9ab0e0d8633ac2faf35a993b917)
2014-11-06 17:53:02 +00:00
zzz
23f24c7d39 javadoc 2014-11-06 17:50:47 +00:00
zzz
6112cc5a38 i2psnark:
- Add new opentrackers, remove welterde
  - Support multiple default opentrackers
  - Don't link to opentrackers at the top
2014-11-06 17:45:06 +00:00
zzz
7deb8c1bcb Console: Don't disable updates when restarting from /configupdate
Recognize router.newsRefreshFrequency=0 as "never"
2014-11-06 16:41:29 +00:00
zzz
76e4b49d9d Transports: Consolidate port checking code
Disallow SSDP port
2014-11-06 15:20:24 +00:00
5ae267a8a2 EdDSA bugfixes 2014-11-06 03:02:25 +00:00
zzz
f524351041 Console: Add ECDSA warning to sidebar 2014-11-05 17:20:45 +00:00
zzz
893d1bb45f Job Queue: Only drop lookup jobs if lagged 2014-11-05 16:59:19 +00:00
zzz
945988dfb7 i2psnark: Fix NPE when deleting torrent if the data directory
was deleted out from under us (ticket #1407)
2014-11-05 16:39:54 +00:00
zzz
62698664a2 SU3 News: Blacklist HTML event-handler attributes in content 2014-11-05 16:04:21 +00:00
zzz
0d2892c75d SSU: Fix corruption of ack-only packets containing bitfields
Full acks were included in the bitfield portion, which
ran over and appeared to be fragments.
Also clean up setting bytes with initial data, for clarity.
2014-11-04 14:51:31 +00:00
zzz
ecc72e6825 SU3 News: Add echelon cert, change default URL 2014-11-04 13:56:46 +00:00
zzz
531d520ceb Blockfile:
- Add block size to superblock
 - Add span size to skiplist block
 - Bump version to 1.2
2014-11-02 19:37:23 +00:00
zzz
4e72e150ad reduce log level of expired certs on android 2014-11-02 17:36:28 +00:00
zzz
b28628b8e1 Console: Log warning if no pack200 2014-11-02 16:42:35 +00:00
zzz
702830ad0e Reseed: SSL only by default 2014-11-02 16:16:01 +00:00
zzz
6ca0c54ba7 i2ptunnel:
ECDSA default for all new server tunnels
ECDSA default for streamr client tunnels
Fix display of server destination on edit page when not running (privkey file path wasn't absolute)
Fix display of persistent client key b32 on edit page when not running
Fix display of server sig type on edit page when we have a privkey file
Add KeysAndCert.getSigType()
Javadocs
2014-11-02 15:23:13 +00:00
zzz
634bf5f7e3 0.9.16
Fix history.txt UTF-8 breakage
Javadoc fixes after review
2014-11-01 18:50:26 +00:00
zzz
2284c963af drop dummy crypto stubs 2014-11-01 15:52:02 +00:00
zzz
ad2052395f bump -19-rc 2014-10-31 12:47:35 +00:00
e9a1dbf8f1 merge of '3baf6884e9804b23ac99e38fb031fc6c04b6134a'
and '995a4e27dc6bd096a6eb83acfc9e2e09c9cb61aa'
2014-10-31 02:03:44 +00:00
703b21e89b Eclipse classpath fix 2014-10-31 01:58:27 +00:00
36ea2cca6b Removed 20 unnecessary variable definitions from multiply()
Android build tools 21.0.* caused dalvikvm runtime errors before this change.
2014-10-31 01:58:05 +00:00
zzz
8b2cf770a5 bump -18-rc 2014-10-30 20:51:28 +00:00
zzz
7d6d801943 merge of '76a3db43068c5b8578dfad10bf0dad884846f608'
and 'feed7db1184a2b8a06ddf35d45dc0e993895e2be'
2014-10-30 20:50:03 +00:00
d705b43f3a update en po files before pushing to tx 2014-10-30 20:11:11 +00:00
a18ed194cb update debian changelog 2014-10-30 20:09:13 +00:00
a3e4293fd8 geoip updates 2014-10-30 20:03:13 +00:00
df144d8434 Arabic, Chinese, Czech, Dutch, French, German, Russian, Spanish updates from Transifex 2014-10-30 20:01:45 +00:00
zzz
bab1e05235 Router: Fix rare NPE building garlic message (ticket #1403) 2014-10-30 15:14:52 +00:00
zzz
a1fdd41b0e SU3 News: Tweaks after testing
Console /debug: Move DHT section to bottom
2014-10-29 15:34:52 +00:00
zzz
60d9c1651a SU3File: Show content and file types in showversion 2014-10-29 14:31:14 +00:00
zzz
ec1380dfa1 i2psnark: Convert '+' to ' ' in magnet dn param 2014-10-29 14:11:41 +00:00
zzz
798275608e jbigi: Save and report extracted library name 2014-10-28 14:50:40 +00:00
zzz
0f2affd414 SSU: Don't publish direct info if introducers are required 2014-10-28 14:00:37 +00:00
zzz
7695b51d89 Make recognition of a hidden router consistent,
whether specified in the caps or the cert
2014-10-28 13:50:09 +00:00
zzz
fb99122d83 log Java 6 warning 2014-10-28 13:18:48 +00:00
zzz
6d53838e20 javadoc clarification 2014-10-28 13:18:27 +00:00
zzz
ec3fd9a7d7 null check in zip entry name 2014-10-28 13:17:20 +00:00
zzz
304f2ebb7b dont OOM when thread dies 2014-10-28 13:16:20 +00:00
zzz
4976e84488 use recent method 2014-10-28 13:13:40 +00:00
zzz
2ebacb1b9b fix static access 2014-10-28 13:11:39 +00:00
zzz
d085f9ea66 SSU: Fix ACK Sender thread dying on corrupt packet 2014-10-26 22:09:38 +00:00
zzz
e275117569 i2ptunnel: Fix description entered via wizard 2014-10-24 14:25:33 +00:00
zzz
eae277fb77 dont add whitespace to XHTML output 2014-10-24 14:11:40 +00:00
zzz
d7130c15cc SSL: Don't prohibit SSLv3 ciphers if that's all we have 2014-10-23 15:32:07 +00:00
zzz
937a17c5dd SessionKeyManager:
- Raise inbound limit
- Delete oldest tagsets when limit is hit
- Don't delete recent tagsets when limit is hit
- Log tweaks
2014-10-23 15:31:00 +00:00
zzz
b6234e1d5e javadoc fixes 2014-10-23 15:26:03 +00:00
zzz
7955b8ae71 SU3 News: Fix parsing of the XHTMl nodes 2014-10-22 18:20:31 +00:00
zzz
a36ef62358 SU3 News:
- Fix SU3File support (tested)
 - Finish implementation (untested)
 - Output metadata as comments in news.xml
 - Support signed HTML
 - Copy router certs to news
2014-10-22 16:07:18 +00:00
zzz
bcbda3cd27 SSU: Don't resend ACKS that are too old (ticket #772)
untested
2014-10-21 18:37:11 +00:00
zzz
239fe518a9 Update: Partial implementation of su3 news with atom feed.
No spec yet, just followed str4d's testnews.atom.xml proposal.
Atom parsing is tested, su3 part is incomplete and untested.
Todo: add spec to http://i2p-projekt.i2p/en/docs/spec/updates,
finish su3 and test.
2014-10-21 18:35:06 +00:00
zzz
44d6e117d5 Console and Eepsite Jetty:
Switch back to QueuedThreadPool (ticket #1395)
In Jetty 5/6, the default QTP was not concurrent, so we switched to
ThreadPoolExecutor with a fixed-size queue, a set maxThreads,
and a RejectedExecutionPolicy of CallerRuns.
Unfortunately, CallerRuns causes lockups in Jetty NIO.
In addition, no flavor of TPE gives us what QTP does:
- TPE direct handoff (which we were using) never queues.
  This doesn't provide any burst management when maxThreads is reached.
  CallerRuns was an attempt to work around that.
- TPE unbounded queue does not adjust the number of threads.
  This doesn't provide automatic resource management.
- TPE bounded queue does not add threads until the queue is full.
  This doesn't provide good responsiveness to even small bursts.
QTP adds threads as soon as the queue is non-empty.
QTP as of Jetty 7 uses concurrent.
QTP unbounded queue is the default in Jetty.
So switch back to QTP with a bounded queue, which does what we want,
which is first expand the thread pool, then start queueing, then reject.

ref:
http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html
https://wiki.eclipse.org/Jetty/Howto/High_Load
2014-10-20 14:01:36 +00:00
zzz
8a12b7cb41 snark HTML fix 2014-10-18 15:22:39 +00:00
zzz
4d4308c486 NTCP: Deadlock fix 3rd try (ticket #1394) 2014-10-17 14:15:40 +00:00
zzz
abcdcf2e8c log tweaks (SSU) 2014-10-16 20:38:12 +00:00
zzz
44b753d1e5 NTCP: Deadlock fix 2nd try (ticket #1394) 2014-10-16 20:21:03 +00:00
zzz
83b3f242a9 Console, I2CP, i2ptunnel, SSLEepGet: Set allowed SSL protocols and ciphers 2014-10-15 20:44:23 +00:00
zzz
86c43f4734 propagate from branch 'i2p.i2p' (head b82e829752729679ee6b9ece7ce8c7279c70aedf)
to branch 'i2p.i2p.zzz.test2' (head 8e441b5ba1384e499901127e10ab79b96f0f0cb5)
2014-10-14 16:47:50 +00:00
zzz
be0cb84f97 Util: Use write-sync-close-rename for config file writing 2014-10-14 16:47:41 +00:00
zzz
3bea7f5ad5 drop unused HarvesterJob 2014-10-14 16:32:41 +00:00
zzz
266a20d55e I2NP: Implement DatabaseLookupMessage search type field,
to replace all-zeros hash, and ease implementation for
separate LS and RI databases, as documented in i2np spec.
2014-10-14 13:57:02 +00:00
zzz
d2c6a80d24 i2ptunnel: Set default sig type to ECDSA P256 for client tunnel
types Standard, IRC, and Socks IRC, if non-shared.
2014-10-13 16:46:58 +00:00
zzz
cd51fbc2a6 doc fix 2014-10-13 16:46:43 +00:00
zzz
73256f6030 Move BundleRouterInfos out of router.jar 2014-10-10 19:40:49 +00:00
zzz
e081f94d9f GeoIP:
- Don't rate peers in some countries as high capacity
   - Don't enable auto-floodfill in some countries
   - Don't prefer floodfills in some countries
2014-10-10 15:26:17 +00:00
zzz
e96cc09d75 Banlist: Remove unused banlist tracking in the profile causing deadlock (ticket #1394) 2014-10-10 15:21:10 +00:00
zzz
d87178fec3 UPnP: Comment out unused parsers 2014-10-08 17:47:19 +00:00
zzz
28ad95f892 findbugs all over 2014-10-07 14:59:49 +00:00
zzz
8270a92a44 SSU: Improve handling of socket that gets closed (ticket #1385) 2014-10-07 12:09:10 +00:00
zzz
088290c544 Startup: Delay ReadConfigJob another minute
- code cleanup
2014-10-07 12:04:55 +00:00
zzz
6685acfef4 i2ptunnel: Handle named sig types from i2ptunnel.config in the GUI 2014-10-07 12:03:00 +00:00
zzz
1d1a05ee7b log tweak 2014-10-07 11:57:03 +00:00
zzz
bbeb429a59 Graphs: Catch an error caused by missing fonts 2014-10-07 11:56:18 +00:00
zzz
55af588c2c CPUID: Remove Intel model 2 again, this is spoofed in the VM 2014-10-07 11:49:51 +00:00
zzz
80d0313fe5 Crypto: EdDSA cleanup
- Remove duplicate load3 and load4 methods
 - Change load3 return type to int
 - Comment out dead stores
 - Re-roll the add, subtract, and negate loops;
   there's no speed benefit or timing reason to unroll them
 - Check for field already set
 - Remove shifts by 0
2014-10-05 12:11:21 +00:00
zzz
853d309960 i2ptunnel: Fix js confirm for delete button 2014-10-04 13:54:09 +00:00
zzz
564400597a i2psnark: Disable changing types for predefined trackers 2014-10-04 13:21:14 +00:00
zzz
1c2b6fc00e CPUID: Fix Intel processor identification 2014-10-03 17:45:34 +00:00
zzz
7b6f32e5b2 Console: New add-to-addressbook links on leaseset page 2014-10-03 17:44:24 +00:00
zzz
dd4acc88a1 i2psnark: Fix adding magnet links with % encoding (ticket #1391) 2014-10-03 17:40:19 +00:00
zzz
6e566f6e3d log tweak 2014-10-03 15:12:38 +00:00
zzz
fff7fbe121 Base64: Catch NPE on bad input to main() decode 2014-10-03 15:11:29 +00:00
zzz
a50afeb5d5 SAM: Fix v3 LS publish, broken in -4 (ticket #1390)
- code cleanup in direction handling
2014-09-30 12:17:56 +00:00
zzz
49eeb99d43 Logs: Fix displayed filename when empty (ticket #1386)
- More synchronization
2014-09-30 12:12:22 +00:00
zzz
bfd51097c9 i2psnark: Show subdirectory in table header on details page 2014-09-29 13:07:08 +00:00
zzz
a21e3cd842 CPUID:
- Fix main() model and family calculation
  - Add model string fetch from processor
  - AMD model string tweaks
2014-09-29 13:05:38 +00:00
zzz
0f298cf48e CPUID:
- Fix model and family calculation
  - Fix most AMD family 15 IDs
  - Add AMD Llano, Jaguar, Bulldozer 2
  - Add Intel Ivy Bridge, Haswell, Broadwell, Penryn, Pineview, Cedarview, Bay Trail, Avoton, and others
  - Set best-guess capabilities for most Intel processors
  - Supply best-guess model string in most cases
  - Processors listed above, and some others, may see crypto speedups as a result
  - Code cleanup, reduce number of JNI calls
  - Merge dup cases
  - Tab removal
  - Javadocs
2014-09-27 19:27:58 +00:00
zzz
4b074b8dcf I meant CREATE
SAM:
 - Don't publish LS for DIRECTION=RECEIVE
 - Set default tunnel name
2014-09-26 20:24:53 +00:00
zzz
2c79853ffe i2psnark:
- Increase default to 3 hops (ticket #966)
   - Reduce upload threshold for auto-stop
   - Revert addition of js mime type, it was already in the default
2014-09-26 14:24:21 +00:00
zzz
72f57255f0 Transport: Hooks for pluggable transports (ticket #1170) 2014-09-26 14:16:08 +00:00
zzz
1053bc8bb0 go back to release w/o geoip 2014-09-25 20:14:28 +00:00
zzz
4835e6fcb9 i2psnark:
- Show info hash on details page
 - Null storage check just in case
2014-09-25 20:11:47 +00:00
zzz
7ec02a1620 NetDB: Increase max age of RIs to reduce number refreshed after restart 2014-09-24 13:57:26 +00:00
zzz
10993cc6ef EdDSA: Use our PRNG by default for keygen 2014-09-24 13:54:33 +00:00
zzz
81409369bc measure keygen time in test 2014-09-24 13:46:38 +00:00
zzz
edb8590da8 move log outside synch 2014-09-24 13:45:50 +00:00
zzz
3a7bfd28fc snark: Don't enable sort-by-remaining link when complete 2014-09-24 13:44:55 +00:00
zzz
36fdb4ee2f Fix junit compile fails due to data structure moves 2014-09-23 14:15:27 +00:00
zzz
b06f772647 history for prop, -2 2014-09-23 13:23:04 +00:00
zzz
012cc740d6 propagate from branch 'i2p.i2p.zzz.test2' (head 6ccd9ca652057494bb2857e87636f18aadcd33f3)
to branch 'i2p.i2p' (head 376f751adc13923cdbf4f659c3f23ca957cf47b3)
2014-09-23 13:06:36 +00:00
zzz
1407cff49d fix anonymous proxy flag 2014-09-23 12:18:23 +00:00
zzz
3331e1c152 SSU: Return unused DH to the queue 2014-09-22 18:49:20 +00:00
zzz
591f48856d add sort links for details page
fix tooltips on images
2014-09-22 17:06:02 +00:00
zzz
479b9691fd snark sorters for details page
no links yet
2014-09-22 15:18:20 +00:00
zzz
0e48557b48 * SSU: Fix 100% CPU after socket failure
* UPnP: Catch reported error on FreeBSD
2014-09-22 13:22:35 +00:00
zzz
3fae6f06dd reduce object churn in ElG decrypt 2014-09-21 22:20:37 +00:00
zzz
7639c24bfe restore dh.calculateSessionTime stat 2014-09-21 21:54:31 +00:00
zzz
39fd1c3ab8 center icons in details first column 2014-09-21 16:12:46 +00:00
zzz
abf9dbae6d itoopie for update files 2014-09-21 15:51:53 +00:00
zzz
98062f830a 0.9.15 2014-09-20 19:17:58 +00:00
zzz
c259347917 javadoc fixes after review 2014-09-20 15:08:55 +00:00
zzz
9c4558d891 Catch SSU packet read errors in one place
IMS PartialBitfield tweaks
Log tweaks
2014-09-20 12:26:45 +00:00
zzz
9e7e2948e3 dont return next IV to cache 2014-09-20 12:20:08 +00:00
zzz
43430da25f bump for review -21-rc 2014-09-19 12:41:01 +00:00
zzz
eca7ac21a0 remove bogus check 2014-09-18 15:48:48 +00:00
zzz
bc463f6d0b NetDB: Don't auto-ff if ARM or ElG decrypt is too slow 2014-09-18 14:48:08 +00:00
zzz
ec2708a1fd Jetty 8.1.16.v20140903 2014-09-18 13:56:48 +00:00
zzz
082922de01 NTCP: Return unused DH keypairs to the pool 2014-09-18 13:32:27 +00:00
zzz
ea02a7c70b Transport DH:
- Add method to return an unused keypair to the pool
2014-09-18 00:16:39 +00:00
zzz
ab7e25bd52 NTCP EstablishState:
- Prep for future enhancements by refactoring to a state machine model
  - Reduce object churn; use SimpleByteCache
  - Synchronization
  - Define some constants
  - More finals
  - Log tweaks
2014-09-17 22:29:03 +00:00
d4876dd25e debian: add 0.9.14.1 changelog 2014-09-17 22:16:22 +00:00
89ee0bbab4 translation updates pulled from transifex (cs, es, fi, fr, ja, nb, pl, ro, ru,
uk), and English po file updates
2014-09-17 22:13:04 +00:00
06ae882064 geoip updates:
Updates to geoip.txt and geoipv6.dat.gz based on the Maxmind GeoLite Country
database from 2014-09-04.
2014-09-17 21:29:42 +00:00
zzz
6517fe7515 set default SSL outproxy 2014-09-17 14:19:25 +00:00
zzz
d510aad2ab fix class 2014-09-17 12:52:20 +00:00
zzz
3db297de95 * i2psnark:
- Forward port from trunk: Don't send HTML-only headers for icons (2nd try)
  - Consolidate HTML header code
  - Set no-cache headers
  - Don't set HTML headers for redirects
2014-09-17 02:21:31 +00:00
zzz
8688f26f15 * i2psnark: Don't send HTML-only headers for icons (2nd try) 2014-09-16 22:32:05 +00:00
zzz
85d38e7af2 I2PTunnelGUI: Deleted, moved to i2p.scripts 2014-09-15 19:17:24 +00:00
zzz
0448348154 javadoc fix 2014-09-15 18:30:59 +00:00
zzz
ceab4f1ffc improve efficiency of addressbook parser 2014-09-15 18:28:35 +00:00
zzz
3781b8db09 sanity check 2014-09-15 18:24:37 +00:00
zzz
7a450c526c exception tweak 2014-09-15 18:23:58 +00:00
zzz
c1e8ea0e4a RoutingKeyGenerator:
- Move from core to RouterKeyGenerator in router.jar
  - Leave RoutingKeyGenerator as a simple abstract class
  - DatabaseEntry now uses timestamp instead of mod data
    to determine if mod data has changed. Don't expose
    mod data to DatabaseEntry any more.
  - I2PAppContext.routingKeyGenerator() now returns null;
    you must be in RouterContext to get a generator.
2014-09-15 18:23:01 +00:00
zzz
f248a33eaa SSU:
- Fix IB ACKBitfield.highestReceived()
- More efficient OMS.acked()
- Log tweaks
2014-09-14 18:54:46 +00:00
zzz
67fb4e7007 SSU InboundMessageState.PartialBitfield, PacketBuilder:
- Add ACKBitfield.highestReceived() for efficiency
- Only write as many partial bitfield bytes as required,
  rather than 10 (for 64 bits) every time.
- Don't allow more than 10 bytes when reading in bitfield
- Don't send an extra byte if (fragments % 7) == 0
- Don't send a corrupt ack packet if the partial ack got completed (race)
- Log tweaks
2014-09-14 17:51:29 +00:00
zzz
0a41052f3f SSU InboundMessageState -
Rewrite PartialBitfield for efficiency, less space and object churn
SSU ACKBitfield: Add ackCount()
PeerState.fetchPartialACKs() improvements
2014-09-14 14:32:23 +00:00
zzz
a7763a08dc SSU OutboundMessageState -
Fix SSU Output Queue errors due to races with PacketBuilder:
   - Remove all buffer caching as it can't be made thread-safe.
     Just allocate buffer in constructor and let GC handle it
   - Do fragmenting in constructor and make all fragment fields final
   - Don't track per-fragment retransmissions as it wasn't used
   - Move ack tracking from an array to a long
   - Sync all ack methods
   - Entire class now thread-safe (thx dg)
2014-09-14 13:04:48 +00:00
zzz
fcfb471a8a log OS version too 2014-09-14 11:55:33 +00:00
zzz
b9e383130e i2psnark: Sort themes in config form
Don't return null from getThemes()
2014-09-14 11:48:56 +00:00
zzz
cd2159b873 i2psnark: Switch from checkbox to radio for tracker configuration form 2014-09-14 11:38:22 +00:00
zzz
e492d5e0cf fixup remaining field on details page 2014-09-13 18:21:58 +00:00
zzz
9a0f6490ba i2psnark: Consolidate code for creating img entities 2014-09-13 18:09:48 +00:00
zzz
5183b44d8b port new styles to the other two themes 2014-09-13 15:32:17 +00:00
zzz
156d86835a propagate from branch 'i2p.i2p' (head 60a9a2297abeaf042645e3f0bc8d106f1ff585bf)
to branch 'i2p.i2p.zzz.test2' (head 6ff6f0bcee835d32aad62449a37f5171afde915a)
2014-09-13 14:50:11 +00:00
zzz
eab4397b0f * i2ptunnel:
- Fixes for stopping client tunnels
   - Fix status display for shared clients
   - Log tweaks
2014-09-13 14:49:38 +00:00
zzz
d808b999c6 better error message 2014-09-13 14:36:21 +00:00
zzz
603b345405 * i2ptunnel: Fix updating session options on a running delay-open client tunnel 2014-09-12 21:48:29 +00:00
zzz
682534f468 * i2psnark: More escape fixes 2014-09-12 18:38:11 +00:00
zzz
42eb43f713 SSU: Implement bundling of multiple fragments in a single data message.
This has always been in the spec and implemented in the receive side
since the beginning, so it is compatible with all versions.
- Switch preparePackets() return value from a "sparse array" to a list
- UDPPacketReader cleanups
- UDPPacket javadocs
2014-09-12 15:17:14 +00:00
zzz
0817b58b9d i2psnark:
- Add file type sorter
 - Cycle through name/type sorters
2014-09-11 16:36:14 +00:00
zzz
9ab766375d i2psnark: Fix downloaded comparator 2014-09-11 15:56:57 +00:00
zzz
6c2799fe53 i2psnark:
- Cycle through downloaded/size sorters
 - Cycle through uploaded/ratio sorters
 - Fix ratio comparator
 - Display ratio when sorted by ratio, and on details page (ticket #1298)
2014-09-11 15:47:53 +00:00
zzz
ef81a575cd i2psnark:
- Add ratio sorter
 - Catch IAE on unstable sort
 - Only sort if necessary
 - toImg() cleanup
2014-09-11 14:42:08 +00:00
zzz
cce0d94fbb - Conditionally enable sort links 2014-09-11 14:13:13 +00:00
zzz
22b5203334 i2psnark:
- Tweak column tooltips
 - Tweak status sort
2014-09-11 13:39:10 +00:00
zzz
d4be5abe67 better shutdown message 2014-09-10 23:30:49 +00:00
zzz
9985a02efc i2psnark:
- Consolidate and clean up parameters code
 - Click to sort by column
2014-09-10 23:28:41 +00:00
zzz
41c2c60ab0 i2psnark:
- Comment out command-line code
 - Clean up ID generation
2014-09-10 23:18:09 +00:00
zzz
f285364f46 icons on buttons when enabled 2014-09-09 20:24:57 +00:00
zzz
1c5e9b7fe3 i2psnark:
- More CSS
 - .js mime type
2014-09-09 19:53:08 +00:00
zzz
12cc501e25 fixup after prop 2014-09-09 19:29:02 +00:00
zzz
49118b8bf1 propagate from branch 'i2p.i2p' (head e606c473eb1e461a477e45419f6295b6430a7353)
to branch 'i2p.i2p.zzz.test2' (head 6212892778308db10a86e58f9f275c838f604973)
2014-09-09 19:27:10 +00:00
zzz
09dfea7dea * i2psnark: Escape fixes
- fix ':' in name (again)
   - Change priority key from file name to file number so we don't hav to escape
2014-09-09 19:23:12 +00:00
zzz
00bd469f8e bump -15-rc 2014-09-09 16:13:49 +00:00
zzz
18e7e56a6c i2psnark:
- Set-all priority buttons (ticket #1376)
 - Move icons to resources dir, add js dir
 - Todo: more CSS
2014-09-09 15:27:53 +00:00
zzz
34d14a720b atomics 2014-09-09 14:22:47 +00:00
c4d7f9924f checkcerts.sh: check for extraneous spaces
(trying to catch the problem noted at http://zzz.i2p/topics/1663)
2014-09-06 22:14:06 +00:00
80d6921a66 fix certificate line endings 2014-09-06 22:11:06 +00:00
3c95144b83 close tag 2014-09-06 22:10:15 +00:00
84ad155ab8 remove extraneous trailing whitespace 2014-09-06 18:21:41 +00:00
zzz
330a5ddd0f NetDB:
- Better handling of unsupported encryption in destinations
 - Implement handling of unsupported encryption in router identities
 - Banlist forever all RIs with unsupported encryption
 - New negative cache of all dests with unsupported encryption
 - New methods for destination lookup that will succeed even if
   the LS is expired or encryption is unsupported
 - Use new dest lookup so client will get the right error code
   later, rather than failing with no LS when we really got it
   but just couldn't verify it.
 - Cleanups and javadocs

OCMOSJ: Detect unsupported encryption on dest and return the correct failure code
   through I2CP to streaming to i2ptunnel

Streaming: Re-enable message status override, but treat LS lookup failure
   as a soft failure for now.

HTTP Client: Add error page for unsupported encryption
2014-09-05 22:52:23 +00:00
zzz
3b2f1d35c4 I2CP: Fix LS keypair check 2014-09-05 22:42:06 +00:00
zzz
0f1036b0e1 better message on EOF reading data 2014-09-04 15:21:03 +00:00
zzz
86935f10a8 update link 2014-09-04 15:14:33 +00:00
zzz
1078c42a14 I2CP: Enforce strict authorization when auth is enabled 2014-09-04 13:28:40 +00:00
zzz
09cf973712 BuildHandler: Enforce request record timestamp
BuildRequestor: Randomize timestamp to prevent hop ID at top of hour
2014-09-04 01:08:23 +00:00
zzz
5af749a226 NetDB: Encrypt exploratory lookups too
SearchUpdateReplyFoundJob: finals
2014-09-03 23:26:34 +00:00
zzz
f84b86a752 * BundleRouterInfos:
- Move to its own class
   - Run GeoIP, exclude bad countries
   - Exclude class K
   - Exclude dup IPs
   - GeoIP mods for use in I2PAppContext
2014-09-03 15:19:18 +00:00
zzz
ca7873eda7 CryptoChecker: add main() 2014-09-03 13:22:56 +00:00
f87ebaf214 re-enable i2p.mooo.com (ticket #1351) 2014-09-02 20:54:49 +00:00
zzz
a9802eb6a7 NetDB: Encrypt RI lookups and request encrypted reply on
faster boxes, as a test, to prevent scraping by OBEPs and IBGWs
2014-09-02 14:23:06 +00:00
zzz
5d5a68cb3e * CryptoChecker: Log tweaks, handle gij 2014-09-02 14:11:22 +00:00
zzz
c6b1f5053f dont bundle IPv6-only RIs 2014-09-02 14:09:41 +00:00
zzz
1d2e01c8cd i2ptunnel filter tweaks 2014-09-02 14:08:41 +00:00
zzz
0c5c18a767 * Build: Add support for bundling router infos in the package 2014-08-31 16:19:46 +00:00
zzz
6826ba05e7 stubs for su3 news 2014-08-31 14:12:18 +00:00
zzz
053ce88743 * I2PTunnel: Allow changing of spoof host and target host/port without
restarting server tunnel
2014-08-31 13:17:44 +00:00
4a216c57d4 Updated EdDSA code from upstream
Source: https://github.com/str4d/ed25519-java
Git commit: f9a9213e1446adb46756d3a23b614fe09324ae16
2014-08-31 00:11:03 +00:00
zzz
03cec7fd5a just check availability once 2014-08-30 20:46:16 +00:00
zzz
1238001add bump -13 2014-08-30 19:38:56 +00:00
zzz
fa1c077fdd * Console: Show unavailable crypto on /logs
* Router: Log warnings for unavailable crypto at startup
2014-08-30 19:00:57 +00:00
zzz
8a7c3390f5 /configclients:
- Re-enable plugin installation by default
 - Don't show configuration section or update-all button if no plugins installed
2014-08-30 16:14:41 +00:00
zzz
2302aee819 su3 plugin key 2014-08-30 14:06:20 +00:00
zzz
a72866ee6a RouterInfo: Backport fix for verification of EdDSA RI sig type
from i2p.i2p.zzz.test2
2014-08-30 12:35:14 +00:00
0f7a3dba87 Catch AIOOB in upnp code (triggered in I2P Android on shutdown) 2014-08-30 02:38:27 +00:00
zzz
5decf18eb5 import, @since 2014-08-29 13:40:53 +00:00
zzz
c318760398 javadoc fixes and package.html files 2014-08-29 13:21:14 +00:00
629eff20dd copy flag icons in preppkg-base target 2014-08-28 23:31:07 +00:00
zzz
f6e508ca14 * Streaming: Fix verify of Ed25519 signatures in CLOSE packets
- cleanup writtenSize()
2014-08-28 13:57:52 +00:00
zzz
588ab86abb * Streaming: Fix P521 and RSA sig types 2014-08-27 22:43:44 +00:00
zzz
387629372b i2psnark: Don't retry announce if we get back HTML 2014-08-27 18:21:58 +00:00
zzz
0a01700e3e NetDB: Don't abort initialization on an unsupported RI sig type
(backport from i2p.i2p.zzz.test2)
2014-08-27 17:44:24 +00:00
zzz
59504deb7f i2psnark:
- Recognize Vuze tracker rejections
 - Don't retry rejected announces unless seeding
 - Better UI handling of announces with ports or full destination
2014-08-27 17:06:44 +00:00
zzz
8ee660c238 i2psnark:
- Persist uploaded count (tickets #1034, #1298)
 - Show uploaded count even when stopped
2014-08-27 16:00:02 +00:00
zzz
176c106427 I2CP: Catch bad private key 2014-08-26 20:12:29 +00:00
zzz
ed4fe56e7e I2CP:
- Verify crypto key pair in LS
 - Verfiy same dest as before in LS
Router: Don't try to use an unavailable sig type for the router,
   even if it's the default
RouterInfo: Work around unsupported raw signatures for
   RI Ed25519 sig type
2014-08-26 19:14:51 +00:00
zzz
310cd54aa0 remove unused EC curves 2014-08-26 13:47:21 +00:00
zzz
3217b4ac90 move radio buttons closer together thx Shinobiwan 2014-08-26 13:47:06 +00:00
zzz
7bf1949061 remove unused method 2014-08-26 13:46:28 +00:00
zzz
51f9d6d421 NTCP RI sig types 2014-08-25 20:33:56 +00:00
zzz
ddb32c65fb add getPadding() 2014-08-25 20:32:47 +00:00
zzz
c5c158e983 PrivateKeyFile: Add validateKeyPairs()
Router: Validate router key pairs read in from file
2014-08-25 16:55:16 +00:00
zzz
f83007e038 KeyGenerator: Add support for converting
all signing key types from private to public
2014-08-25 16:20:39 +00:00
zzz
2b9a368b18 propagate from branch 'i2p.i2p' (head 695c0048cc8ce28df0574a5e188c77c07c9b42ce)
to branch 'i2p.i2p.zzz.test2' (head c116da02ea4b4d01dd028bc58ea02b43ae9af8cd)
2014-08-25 12:05:15 +00:00
zzz
6ad6974452 javadoc warnings about EdDSA raw sigs 2014-08-24 23:11:56 +00:00
zzz
308923448b PrivateKeyFile: New constructor with padding
Router:
 - Use eepPriv.dat format for router keys file (thx orignal)
 - Consolidate router keys readin code
 - Update killKeys file list
RouterPrivateKeyFile: New extension to add getRouterIdentity()
2014-08-24 19:15:26 +00:00
zzz
04ad7de2e1 SSU: Handle RI sig types
TransportManager: Banlist unsupported RI sig types
2014-08-24 14:54:17 +00:00
zzz
54563b0b42 catch swapped args 2014-08-23 23:49:34 +00:00
zzz
593779b54f Router: Prep for RI sig types:
- New router.sigType config
 - Generate / regenerate router keys based on config
 - New router.keys2 file format for sig types and padding
 - Fix RouterInfo.readBytes() signature verification with sig types
 - Catch unset padding in KeysAndCert.writeBytes()
 - Catch key errors in ReadRouterJob
 - Show RI sig type on /netdb in console
 - Move some things from Router to startup classes
 - Startup classes package private
 - Buffer readin of key files
 - Remove configurability of router.info and router.keys file locations
2014-08-23 23:48:16 +00:00
zzz
34d3704680 sig type availability check 2014-08-23 15:09:24 +00:00
zzz
613f90bcf7 SSU: Drop peer tests as Bob from unestablished Alices 2014-08-23 14:22:06 +00:00
zzz
6ff500f7cb increase RI publish interval slightly 2014-08-23 13:49:26 +00:00
zzz
c79e33896e SSU intro key checks 2014-08-23 13:48:13 +00:00
zzz
68b15aadca proxy no LS error pages tweak 2014-08-23 13:46:10 +00:00
zzz
819504f08f console escape fixes and cleanups 2014-08-23 13:44:56 +00:00
zzz
e65ec2a589 i2ptunnel escape fixes 2014-08-23 13:20:25 +00:00
zzz
1bc355b8fd i2psnark escape fixes 2014-08-23 13:19:44 +00:00
zzz
d76164679f move null check to constructor 2014-08-23 13:16:57 +00:00
zzz
efebecfc67 * SigTypes:
- Add isSupportedSince(), use in floodfill selection
  - Handle mixed-case 25519 enum
  - Fix 25519 type code
  - Add dup type code check
2014-08-22 14:34:13 +00:00
7b64586c87 temporarily disable reseed host (ticket #1351) 2014-08-22 10:13:37 +00:00
0fe15b8e1d Use DataHelper instead of TestUtils 2014-08-21 23:43:57 +00:00
a1cb00b5a3 Java implementation of Ed25519
Source: https://github.com/str4d/ed25519-java
Git commit: be161ee7c6da29129b5ec6c4739ec3a99114a846
License: Public domain
2014-08-21 23:27:45 +00:00
5041d819a9 propagate from branch 'i2p.i2p' (head b026fe071e77884ef6d104635c793ef16357ec71)
to branch 'i2p.i2p.str4d.eddsa' (head 0d928736c4a34d8a337e1f55e095fe90564ea1fb)
2014-08-21 23:27:34 +00:00
zzz
02ab6eac62 javadoc 2014-08-21 17:38:35 +00:00
zzz
d7feab116f Core: Move router data structures, and the deprecated RouterAddress sorter, from core to router.
This will break Android and the i2pcontrol plugin but shouldn't affect anything else.
2014-08-21 17:36:06 +00:00
zzz
4f9e13d0f6 unit test fix take 2 2014-08-21 15:01:15 +00:00
zzz
d0b0e6a58e fix clock.skew rates 2014-08-21 14:27:16 +00:00
a12f898096 Corrected Ed25519 SigType name 2014-08-21 13:08:21 +00:00
zzz
c921ecca05 fix unit test 2014-08-21 12:46:11 +00:00
zzz
975378b224 * i2ptunnel:
- Add local SSL support for std. and IRC client tunnels (ticket #1107)
    Keystore goes in ~/.i2p/keystore; pubkey cert goes in ~/.i2p/certificates/i2ptunnel
  - Escape messages to index page
  - Show message for uncaught exception
2014-08-21 12:21:29 +00:00
zzz
915e003355 * i2ptunnel: Use I2PAppThread 2014-08-21 11:58:09 +00:00
zzz
51e45d128a * Tunnels: Debug code and other cleanups 2014-08-21 11:55:03 +00:00
zzz
57650ef058 remove dup conversion 2014-08-21 11:51:05 +00:00
zzz
dee6e16e6c * i2psnark:
- Escape control chars in encodePath()
   - Increase max piece size to 8 MB (ticket #1347)
2014-08-21 11:49:58 +00:00
c860674613 propagate from branch 'i2p.i2p' (head e8883e85a7761bbda9df59b3f6b57601cc01bb5a)
to branch 'i2p.i2p.str4d.eddsa' (head a1cc4ae4a17efaca2825dae64b2cc55aa520ca27)
2014-08-20 02:11:15 +00:00
zzz
33b7f08d5c * i2psnark:
- Don't filter create torrent form, and
     fix exception on ':' in file names (ticket #1342)
   - Don't remap file names on torrents we created, and
     save remap setting in torrent config file (tickets #571, 771)
   - Escaping fixes since names may not be remapped
   - Use better encodePath() from Jetty
   - Don't say create torrent succeeded when it didn't
   - Add more sanity checks for torrent creation
2014-08-19 20:34:46 +00:00
zzz
66bbe21a87 * Tunnels: Use consistent tunnel pair for Delivery Status Message
to reduce network connections (ticket #1350)
2014-08-18 18:57:19 +00:00
zzz
51995cc428 * i2psnark:
- Don't send HTML-only headers for icons
   - Catch IllegalStateException for icons
2014-08-18 18:52:47 +00:00
a3e3a305ce removed notification of port 8887 2014-08-17 14:54:50 +00:00
zzz
15facc72b3 * Console: Escaping fix (ticket #1348) 2014-08-15 11:49:56 +00:00
zzz
3839c8d1c0 * I2CP: Lookup synch cleanups 2014-08-15 11:48:02 +00:00
d5edcbc6e1 * Console, EventLog: Added {BECAME,NOT}_FLOODFILL events. They will now be shown on the console's /events page when the router's ff status changes.
* EventLog: Fix a minor typo.
2014-08-13 21:29:17 +00:00
zzz
eb97ef4cb2 * i2psnark: Fix add torrent NPE 2014-08-13 19:17:26 +00:00
zzz
9c38e1e191 * Console: Escaping fix (ticket #1346) 2014-08-13 19:10:25 +00:00
zzz
7c3d3b4128 fix dependency checking for ministreaming po files 2014-08-13 19:07:39 +00:00
zzz
367cea4b1f new translation files 2014-08-10 19:32:11 +00:00
zzz
a63bfeaeec fix SKM test broken by TSKM move 2014-08-10 15:48:18 +00:00
zzz
41672dde64 include geoip.txt in updater for next release 2014-08-10 14:57:28 +00:00
zzz
3b18cb7eca history for prop, -3 2014-08-10 14:22:16 +00:00
zzz
c9ce1751c1 propagate from branch 'i2p.i2p.zzz.snarkconfig' (head ad48ab1a9e769c58ea2e286337927f5c0e1568be)
to branch 'i2p.i2p' (head 0cd9e265bd38c40839e68de8f51233489acad346)
2014-08-10 14:14:00 +00:00
zzz
4ba40b340a history for prop, -2 2014-08-10 14:08:05 +00:00
zzz
e3be1d1a04 propagate from branch 'i2p.i2p.zzz.test2' (head c182b371bc28158dd47262b89e5bd0cdda29e07b)
to branch 'i2p.i2p' (head 4fc776f7b76b028bb890affccfdcfbefbb932c58)
2014-08-10 13:56:15 +00:00
zzz
6fa2a416be Console: Hide client delete button too 2014-08-10 12:18:18 +00:00
fdb54c315b propagate from branch 'i2p.i2p' (head b8f5da367cf5d16bc1d91aa2097830c350c9ef8a)
to branch 'i2p.i2p.str4d.eddsa' (head 6fcc5b5019abb36251e28fe0f7723fd1a046a8e9)
2014-08-10 11:41:45 +00:00
zzz
c7de4e46c1 0.9.14.1 2014-08-09 21:24:18 +00:00
zzz
22a7757461 Console: Show share options below 30% (ticket #1329) 2014-08-09 18:08:00 +00:00
zzz
0bacbbc553 SigType: Add static isAvailable() methods
SU3File:
 - Add -x option to bypass signature verification
 - Add -k option to use specified private key cert for verification
 - Don't verify signature in showversion
2014-08-09 17:55:17 +00:00
zzz
fbdc535287 * i2psnark: Fix more escaped messages 2014-08-08 20:05:42 +00:00
zzz
03d8314842 dir for plugin certs 2014-08-08 16:41:27 +00:00
zzz
fe4d98f0df javadoc 2014-08-08 16:40:56 +00:00
zzz
b1d60122a3 better msg to client on unsupported sigtype 2014-08-08 16:40:48 +00:00
64ec9f6a00 GeoIP db updates
Updates to geoip.txt and geoipv6.dat.gz based on Maxmind GeoLite Country
database from 2014-08-06
2014-08-07 23:28:51 +00:00
2d6f71dc12 debian: changelog update 2014-08-07 23:26:17 +00:00
zzz
c9e20c5d23 log tweak 2014-08-07 21:22:18 +00:00
zzz
381f494754 SU3File: Fix NPE on EOF reading input 2014-08-07 20:17:51 +00:00
zzz
506419964b Plugins: SU3 support in form, type checking,
don't require DSA key in SU3
2014-08-07 19:27:53 +00:00
zzz
35bb8c5348 Plugins: partial SU3 support 2014-08-07 19:06:41 +00:00
zzz
79fe799aeb Plugins: Stub out SU3 support 2014-08-07 18:45:04 +00:00
zzz
2878a6487e KeysAndCert: Change hashcode to prevent possible collisions
caused by apps with zeroed pubkey
2014-08-07 17:05:25 +00:00
zzz
d4722e0d2c * i2psnark: Fix excaped message 2014-08-07 13:39:24 +00:00
zzz
9655e79d26 UPnP: Disable external entities in XML parser 2014-08-06 18:13:54 +00:00
zzz
d1a2e24f0e SSU: Speed up introductions by responding to HolePunch (ticket #1333) 2014-08-06 16:35:08 +00:00
zzz
086381d958 SU3File: Add support for XML and NEWS types 2014-08-06 16:32:10 +00:00
zzz
7187f6f714 * Console: Display full path to config file
* i2ptunnel: More escaping
2014-08-06 13:40:25 +00:00
e10e05166f refresh patch 2014-08-06 09:03:18 +00:00
b0f8d84a7f updated debian/po/uk.po 2014-08-06 09:03:02 +00:00
zzz
0e9ceba057 * i2ptunnel: Fix filtering of custom options 2014-08-05 21:26:48 +00:00
zzz
fe3059f0ab * Plugins: Enforce signing key matches that in plugin.config 2014-08-05 21:23:48 +00:00
bd566f52cf Adding SWAT's reseed(su3) certificate. 2014-08-05 09:27:24 +00:00
zzz
b7e0dabe61 fix manual wrapper URL 2014-08-04 15:49:46 +00:00
zzz
2d2348f671 payload bounds check 2014-08-03 14:36:20 +00:00
zzz
b28eb708a4 * Console:
- Fix update buttons
   - Don't filter parameter names starting with "nofilter_"
   - Re-allow configadvanced, news URL, and unsigned update URL if routerconsole.advanced=true
   - Re-allow plugin install if routerconsole.advanced=true or routerconsole.enablePluginInstall=true
   - Only allow whitelisted plugin signers, unless routerconsole.allowUntrustedPlugins=true
   - Re-allow clients.config changes if routerconsole.advanced=true or routerconsole.enableClientChange=true
   - More escaping
 * i2psnark: Fix add torrent form
2014-08-03 13:58:51 +00:00
bf9c4b2346 new su3 cert as pwd for old lost, old one not in use till yet 2014-07-31 19:11:48 +00:00
zzz
d33aa097fe bump 2014-07-31 14:56:04 +00:00
zzz
8673c232b6 Whitelist of known plugin public keys
Compiled by kytv from plugins.i2p
todo: implementation
2014-07-31 14:51:02 +00:00
zzz
d3ea5d2122 drop ExecNamingService, moving to i2p.scripts 2014-07-31 14:44:52 +00:00
zzz
370d2555c7 Notes and logging re: compiling with Java 8 2014-07-31 14:42:51 +00:00
zzz
5332cee3e8 update credit as requested 2014-07-27 11:02:59 +00:00
zzz
1246e1c498 0.9.14 2014-07-26 20:32:26 +00:00
zzz
d6b0b1b93c refresh tweaks
another escape html
2014-07-26 20:14:01 +00:00
zzz
1e0c970c95 remove add client button 2014-07-26 19:31:36 +00:00
zzz
db9f49c7d4 updates after review:
Disable clients.config editing in UI
Strip single quotes too
Fix double-escaping in susimail folder page
2014-07-26 18:58:58 +00:00
zzz
1603353ae8 Susimail escaping from psi plus some more 2014-07-26 16:50:58 +00:00
zzz
6753d23309 Add filtering for getParameterMap()
Don't return null entries in getParameterValues() array
Log in getParameterValues() too
static
2014-07-26 15:09:40 +00:00
zzz
ca5755b0fd javadoc move new classes 2014-07-26 13:51:48 +00:00
zzz
2c8223274d filter pattern tweaks 2014-07-26 13:43:52 +00:00
zzz
f0dd09cf9c filter logging 2014-07-26 12:18:35 +00:00
zzz
4746d9eb80 Fix CSP to allow inline style and refresh
Add filter to all webapps
2014-07-26 11:01:16 +00:00
zzz
99401c5639 fix link 2014-07-26 10:51:42 +00:00
zzz
58578d9020 Console:
XSSFilter patch from str4d:
  XSSFilter and XSSRequestWrapper were from http://ricardozuasti.com/2012/stronger-anti-cross-site-scripting-xss-filter-for-java-web-apps/
  No provided license, but it is clearly intended for public consumption.
  But most of it is boilerplate provided by the Servlet Filter system.
  In fact, now that I have stripped out his JS-specific patterns and replaced it with the whitelist,
  it is effectively identical to what I would have written from scratch.
2014-07-26 09:39:31 +00:00
zzz
af575d6c95 * Console:
- Fix several XSS issues (thx Aaron Portnoy of Exodus Intel)
  - Add Content-Security-Policy and X-XSS-Protection headers
  - Disable changing news feed URL from UI
  - Disable plugin install from UI
  - Disable setting unsigned update URL from UI
  - Disable /configadvanced
* DataHelper: Disallow \r in storeProps() (thx joernchen of Phenoelit)
* ExecNamingService: Disable (thx joernchen of Phenoelit)
* Startup: Add susimail.config to migrated files
2014-07-26 09:32:26 +00:00
e9c8748c0b Updated Eclipse settings 2014-07-26 02:48:49 +00:00
08409d016b translation updates from Transifex 2014-07-23 13:55:58 +00:00
42bfbfc60b geoip database updates 2014-07-23 13:54:36 +00:00
c7c087d964 fix poupdate target 2014-07-23 13:49:09 +00:00
zzz
89764c12e7 bob finals, synch 2014-07-23 13:12:32 +00:00
bd45d5483f Added new reseed host, thanks to Backup.
Notes: Only HTTPS and SU3 (v2) support.
2014-07-22 17:56:50 +00:00
zzz
328d7d0008 SAM:
- Don't spawn a thread for each transmitted datagram
 - Set protocol field for raw and signed datagrams
 - Enforce a 60s timeout for HELLO
 - Use naming service cache to reduce Destination object churn
 - Get Log object from the log manager
 - Log spelling fixes
2014-07-22 14:52:08 +00:00
zzz
cca5bef8c1 propagate from branch 'i2p.i2p' (head 79d0ad4538a0adc4ced6ac26cb725abe3d5ccee3)
to branch 'i2p.i2p.zzz.test2' (head 73032545b42f6f9caffffca08d0a8b97f5cf7e3a)
2014-07-22 14:38:28 +00:00
zzz
ce4874d825 better logging of reseed su3 errors 2014-07-21 20:05:05 +00:00
9b408b67ef Adding Matt's SU3 reseed key. 2014-07-21 18:07:02 +00:00
zzz
c3bf100082 readme_fr.html thx hummingbird 2014-07-21 13:24:13 +00:00
zzz
b282ccd890 increment error count on exception 2014-07-21 13:23:14 +00:00
f38b741813 Adding sindu's reseed key. ( i2p-netdb.innovatio.no ) 2014-07-21 01:47:37 +00:00
3a899d52d1 Don't grab the ClientApp if we don't need to 2014-07-19 23:55:43 +00:00
zzz
a2567b0ee2 * SusiMail: Better error message on decode fail
http://forum.i2p/viewtopic.php?t=11469
2014-07-19 16:31:59 +00:00
zzz
4b0019c732 * SAM: Add support for RAW on the bridge socket in v3 (ticket #1334)
log fixes
2014-07-19 15:43:51 +00:00
zzz
5d21738410 * i2psnark: Don't prefer leeches during end game, to
prevent slowdowns or stalls
2014-07-19 12:48:16 +00:00
zzz
df81006b42 javadoc 2014-07-19 12:40:23 +00:00
zzz
2c7006e9bd Streaming; Disable fail-fast for now. It's failing on leaseset lookup
far too often. Need to fix that first.
2014-07-19 12:39:37 +00:00
b1caa8d5a3 fix URL in initialNews: It's i2p-projekt not i2p-project
(thanks to SeekingFor for the heads-up)
2014-07-15 23:46:08 +00:00
zzz
8b2ffada10 - fix test
- final
- last week's history
2014-07-15 14:30:19 +00:00
0998738e94 Updated history 2014-07-15 12:59:56 +00:00
c04062bbdf Forgot to update @since 2014-07-15 12:58:58 +00:00
0c7a3a3a39 Stubs for I2CP connections over Unix domain sockets 2014-07-15 12:54:22 +00:00
zzz
f364a83f4f mtn.i2p-projekt.i2p 2014-07-14 20:40:36 +00:00
zzz
9dabc75866 * SU3File: Disable the X.509 CN checking of local certs on Android,
as the javax.naming classes are not available.
   Any issues with local certs will be discovered in non-Android testing.
2014-07-13 13:29:55 +00:00
zzz
2c185ea76c * Datagrams:
- Redefine the repliable datagram signature for non-DSA_SHA1 sig types;
    was the sig of the SHA-256 of the payload, now the sig of the payload itself.
    This is an incompatible change but nobody is yet using the new
    sig types for datagram applications.
  - Don't pollute the hash cache with hashes of payloads
  - Check for too-big datagrams
  - Remove assertion check
  - Cleanups
2014-07-11 19:31:44 +00:00
zzz
39e859c368 javadoc 2014-07-11 19:29:44 +00:00
2cfe5e678a propagate from branch 'i2p.i2p' (head e02e6d733a703970e20e732e5156cbabc394e88e)
to branch 'i2p.i2p.str4d.eddsa' (head 3910d01bed7c5a216f52bfd1d9fd96b59f058745)
2014-07-10 09:29:34 +00:00
zzz
d48991f71f Crypto: Move TransientSessionKeyManager from core to router.
I2PAppContext will return the dummy SessionKeyManager which
is sufficient for non-tag uses (e.g. Bote).
Client use of end-to-end encryption using SessionTags was
disabled in release 0.6, 2005-07-27.
2014-07-09 13:52:26 +00:00
zzz
dfbe3c4eb1 signing key type check 2014-07-09 13:29:52 +00:00
zzz
b8170a544b add reseed cert 2014-07-09 13:27:57 +00:00
4e7f92ec89 Removing certificate + added it to delete list 2014-07-09 00:46:18 +00:00
292683268b Thanks for the past support in reseeding pkol!
Removing reseed host after request.


From: pkol <pkol@mail.i2p>
To: Meeh <meeh@mail.i2p>
Subject: Reseed server shutdown
X-Mailer: smtp.postman.i2p - Official I2P Mailer

Hi meeh,

I wanted to announce the discontinuation of my reseed server
(reseed.pkol.de) at the end of July/beginning of August.

Thanks for your support during the initial setup.

Cheers
pkol
2014-07-09 00:29:59 +00:00
zzz
dc14abd4d3 BFNS: Trim whitespace from hosts.txt when importing
DataStructureImpl: Throw unique exception on bad base 64
2014-07-05 21:58:48 +00:00
zzz
dd782f08f7 hosts.txt: Remove trailing whitespace causing test failure 2014-07-05 21:44:23 +00:00
zzz
d57dc9a8a2 * Reseed: Check su3 version as date code 2014-07-05 19:15:26 +00:00
zzz
4e463d57ce * Reseed: Send If-Modified-Since in fetches
* EepGet: Fixes for adding etag or lastmod headers before fetch
2014-07-05 18:41:09 +00:00
zzz
e0c0cc8b63 Avoid publishing null IP when using forced address config 2014-07-05 17:02:44 +00:00
zzz
cc50d47376 log warning on very low MTU 2014-07-05 17:01:29 +00:00
zzz
4da7548caa * Reseed:
- Fix URLs without trailing /
   - Cleanups of su3 code
2014-07-05 13:39:51 +00:00
zzz
91a676cb36 public constructors for SKM 2014-07-05 13:37:53 +00:00
zzz
48a32fb3b8 spacing 2014-07-05 13:37:35 +00:00
zzz
845b45a57d javadoc 2014-07-05 13:36:29 +00:00
zzz
7b7a620999 * Console: Add event log viewer (ticket #1117) 2014-07-03 13:13:57 +00:00
zzz
82217d5ebc increase default refresh on graphs page 2014-07-03 13:08:24 +00:00
zzz
b95ec70d7d Console: Check wrapper version before calling WrapperManager.getProperties() 2014-07-03 13:07:41 +00:00
zzz
aa3d3670a4 * PrivateKeyFile: Check for key type mismatch 2014-07-03 13:06:21 +00:00
zzz
8198c83982 * Base64:
- Catch numerous decoding errors that were previously misdecoded (ticket #1318)
  - Improve decoding efficiency, reduce copies
  - encode(String) now uses UTF-8 encoding
  - decode() now accepts short strings without trailing '='
  - whitespace in decode will now cause an error, was previously ignored
  - Cleanups
2014-07-03 13:03:56 +00:00
75ff7987b8 re-enable reseed.pkol.de:443 (ticket #1326) as it seems to be working again 2014-07-02 22:02:27 +00:00
9c87685c02 fix date in history.txt 2014-07-02 13:57:24 +00:00
ce2bb85440 Update Java Service Wrapper to v3.5.25
- Windows: x86 and x64 versions self-compiled with VS2010 in
  Windows 7. The icon has been changed from Tanuki's default to Itoopie.
- Linux ARMv6: Compiled on a RaspberryPi using gcc 4.6.3-14+rpi1,
  Oracle Java 1.7.0+update40 and stripped
- All other binaries are from the "community edition" deltapack offered by
  Tanuki.
2014-07-02 13:54:47 +00:00
43fdff2292 postinstall: remove some redundancy, update comments 2014-07-02 13:51:17 +00:00
zzz
06525adf3d Chinese eepsite help from xkimo 2014-06-30 13:23:06 +00:00
zzz
cff4210dfd merge of 'a88d14e53014d9ab4a5d6e156e3abe2e496284c2'
and 'bcf2bb5bf040195d80e26c4bf643ba0df8386f8a'
2014-06-29 11:44:37 +00:00
zzz
d855c5de50 * NetDB: Add more su3 checks
* SU3File: Improve CLI help
2014-06-29 11:43:57 +00:00
f1a738340f checkcerts.sh: remove unnecessary echos 2014-06-29 11:37:24 +00:00
9827c48527 checkremotecerts.sh: support for ports 2014-06-29 11:27:57 +00:00
367d68e552 Adding three reseed hosts, all with reseed-v2 support
* uk.reseed.i2p2.no
* us.reseed.i2p2.no
* jp.reseed.i2p2.no
2014-06-29 02:15:26 +00:00
1498ed361e Added my reseed key 2014-06-29 02:13:02 +00:00
zzz
91bc16ce05 * NetDB: Fix handling reseed URLs with ports (ticket #1278)
by fixing the dup host check
2014-06-29 00:44:31 +00:00
861a1e26d7 merge of '2542a527f53e4df3896ae26f5b0cf7d0a45128ff'
and '4944f31a9bec7dcacd3a97f6e451fd4eaf5f4096'
2014-06-28 21:58:50 +00:00
a5b2f9a5e9 temporarily disable reseed.pkol.de:443 (ticket #1326) 2014-06-28 21:55:24 +00:00
9550484037 checkremotecerts.sh: fix regex so that commented out hosts are not matched
(//" was needed and  // " would pass through)
2014-06-28 21:51:09 +00:00
b33284bb8e added echelon su3 reseed cert 2014-06-28 20:01:03 +00:00
zzz
ce2694e8fb * NetDB: Add support for reseeding with su3 files (ticket #934) 2014-06-28 19:37:59 +00:00
44073732e2 build.xml: copy built binaries to build/ in the build* targets
This will hopefully make it easier for apps to use bits of I2P as build-deps.
2014-06-28 16:51:38 +00:00
zzz
fef591412e SAM: Cherrypick from patch in ticket #1318:
- Add SIGNATURE_TYPE support to GENERATE and CREATE
   - Don't NPE checking dest+privkeys
   - Simplify HELLO checking
   - Don't require two params in HELLO message
   - Make MIN parameter optional too
   - Version checking fixes
   - Bump version to 3.1, only visible if requested
   - Cleanups, javadocs
2014-06-28 14:14:39 +00:00
f191e50b14 Custom target so I2P-Bote can be built against source 2014-06-28 05:57:34 +00:00
zzz
3379432e5f SAM: Cherrypick from patch in ticket #1318:
- Check for extra bytes in private key string
   - checkPrivateDestination() returns boolean instead of throws
2014-06-27 21:05:54 +00:00
zzz
bb9129b61b SAM: Cherrypick from patch in ticket #1318:
- Fix empty properties check
   - Overrides
   - Statics
2014-06-27 20:53:01 +00:00
zzz
0fc3029aaa SAM:
Version handling (ticket #1318)
   - MAX param now optional
   - 1-digit versions now accepted for MIN and MAX
   - Use VersionComparator for version tests
   - Don't require a minor version of 0
   - Fix empty properties check
   - Overrides
   - Prep for version 3.1
  Throw exception on null option key (ticket #1325)
2014-06-27 20:36:34 +00:00
zzz
d8c8586ccf SAM: No synch needed for finals;
Move fields to top
2014-06-27 16:53:05 +00:00
zzz
38a4728283 SAM: Use SAMHandler.writeString() where possible,
Use DataHelper.getASCII() for byte conversion
2014-06-27 16:46:57 +00:00
zzz
7888705b01 final 2014-06-27 16:31:24 +00:00
zzz
31938f49d6 SAM: Fix checkPrivateDestination() for key certs (ticket #1318) 2014-06-27 16:19:07 +00:00
zzz
c95ed2ea96 SAM: Rename exceptions, make serialVersionUID private,
add new SAMException constructor
2014-06-27 16:15:22 +00:00
zzz
b5ed247a53 SAM: more Log conditionals, javadocs 2014-06-27 15:55:12 +00:00
zzz
22aff49747 SAM: Log conditionals, javadocs 2014-06-27 15:53:16 +00:00
zzz
e4430f05e4 2 more pkg private 2014-06-27 15:32:56 +00:00
zzz
1047691c64 SAM: Make all classes package private except the SAMBridge entry point 2014-06-27 15:26:44 +00:00
zzz
f3180b3f6f SAM client logging cleanup 2014-06-27 15:14:21 +00:00
zzz
616866cc9e Build: Move remaining jars to Java 6, as we will require
API 9 in the next Android release.
2014-06-27 13:57:43 +00:00
58512b8230 build.xml: add new macros for use in the release target
Also move away from using external binaries when an ant task can do the job.
2014-06-26 20:01:07 +00:00
zzz
ca4555c496 lint redundant cast all over 2014-06-26 15:26:58 +00:00
zzz
bc99bc7206 javadoc fixes 2014-06-26 12:51:33 +00:00
zzz
8f2dc67430 - Fix files not found in listing at top level of torrent
- Fix loading of files outside of snark dir
2014-06-25 13:58:34 +00:00
zzz
1420c773a6 * Streaming; Drop the preliminary channel implementations,
as added by 'dream' in late 2011. Testing couldn't have happened,
   as they don't work and can't ever work as designed.
   Channels must have underlying file descriptors unless you implement
   your own Selector and that would probably require JNI.
   See http://zzz.i2p/topics/1229 for details.
   Also http://stackoverflow.com/questions/911780/how-do-i-define-my-own-selectablechannel
2014-06-24 12:49:18 +00:00
888ef37808 propagate from branch 'i2p.i2p' (head 5a3ad2a39b0e0f06e70cb8b4d4f7b1d6461afc1a)
to branch 'i2p.i2p.str4d.eddsa' (head b2a13496a248ebfdac0aa3a8528a27ceff091b6b)
2014-06-24 02:14:05 +00:00
zzz
690b40ed77 * Tunnels: Reject participating tunnels when hidden (ticket #1314) 2014-06-23 20:23:32 +00:00
zzz
986de4c1d6 Streaming: Fix connection error message 2014-06-23 20:12:12 +00:00
zzz
01da32364f Streaming: Bundle I2PSocketException messages for translation 2014-06-23 20:10:11 +00:00
zzz
8b1abc08db Add Destination.toBase32() 2014-06-23 20:06:03 +00:00
69e56f8f6b 'Home': (temporarily?) disable salt.i2p.
At this point it's been offline for a month with no sign of returning.
2014-06-23 08:19:30 +00:00
b611d0238a build.xml: minor tweaks to comments, indentation 2014-06-22 00:45:50 +00:00
zzz
c987a9735d fixup after prop 2014-06-21 13:16:38 +00:00
zzz
3b9549c2c1 propagate from branch 'i2p.i2p' (head 1f9b91f318a0f2369243844a3cf7f485528492d7)
to branch 'i2p.i2p.zzz.snarkconfig' (head 37b27b6d354d62487294fd9276504b98a23f1057)
2014-06-21 13:02:22 +00:00
zzz
2dcc9b7a1e i2psnark:
- Display webapp name in html title (ticket #1311)
  - Use tracker from magnet link in display (ticket #1313)
  - Clarify auto-start (ticket #1293)
  - Include tracker in magnet link on details page (ticket #964)
  - Recognize .azw4 extension as ebook
  - Cleanups
2014-06-21 02:30:25 +00:00
zzz
3e54b5d544 New Spanish eepsite help page from 'lati2p' 2014-06-19 01:13:17 +00:00
zzz
8845ce6e1c Findbugs all over:
- Serializable
 - hashCode()
 - Make DataStructureImpl Serializable (removed from DataStructure in 2005)
2014-06-15 16:14:13 +00:00
ff189e796c slackbuild: minor changes to the comments 2014-06-14 09:15:55 +00:00
89c07ac969 slackbuild: remove gettext as a run-time requirement as it's not *strictly* req'd 2014-06-14 09:15:14 +00:00
a8e878f894 SlackBuild: version extraction using awk (thanks 'ihavei2p') (ticket #1310) 2014-06-14 00:08:49 +00:00
1f8f3eb4d9 Fix up the included SlackBuild (ticket #1310) 2014-06-13 22:44:42 +00:00
zzz
8fd2a05bf9 duh 2014-06-13 22:12:38 +00:00
zzz
002d057c92 findbugs all over 2014-06-13 21:37:18 +00:00
ab44488e4c i2prouter: don't use uname -p to determine the arch
- This came from the script from Tanuki but it does return useful information
  (as far as its use in the script) in my testing. uname -m is better for our
  needs. (The problem is only seen on certain CPUs when *all* available wrapper
  binaries are present and the script tries to resolve the correct binary to use..
2014-06-13 20:55:36 +00:00
653ffbc82e build.xml: add jbigi-linux-x86-only target 2014-06-13 20:28:02 +00:00
zzz
95fd0291e3 * Tunnels: Don't get stuck only building tunnels for an empty pool (ticket #1300) 2014-06-13 13:40:52 +00:00
zzz
2a269ff1a9 * Transports: Disallow Carrier Grade NAT (RFC 6598) addresses 2014-06-13 13:39:15 +00:00
zzz
83ccfb4596 * i2psnark: Fix NPE when fetching invalid torrent (ticket #1307) 2014-06-13 13:38:30 +00:00
e968828916 i2prouter: add amdfx* as an x64 CPU / move ldd check 2014-06-12 00:41:14 +00:00
ed85a2b82b Executables get 755, not 744
While this may be the primary cause of the problem mentioned in ticket #1310,
plenty of other fixes/changes will be forthcoming.
2014-06-11 19:27:54 +00:00
e692e21dc9 updates to SlackBuild READMEs 2014-06-11 19:24:58 +00:00
zzz
662fe3ebc2 * i2psnark: Fix decoding of negative numbers (ticket #1307) 2014-06-10 19:54:05 +00:00
zzz
1bf8fd92e4 * NewsFetcher: Only treat correct status codes as success
The last-modified date was getting updated even when
   the server returned e.g. 503, preventing routers from
   getting the latest file on a subsequent fetch.
2014-06-10 19:52:55 +00:00
zzz
4dd8a6421a Tomcat: Bundle a stripped tomcat-coyote.jar with the utils
required to precompile jsps with tags (SusiDNS and Bote).
As of 6.0.39, these utils are required but they are not bundled
in the Tomcat deployer package, the main package is required.
This checkin has only the classes required from the jar.
2014-06-10 00:17:19 +00:00
zzz
884b285bf5 * Jetty 8.1.15.v20140411
* Tomcat 6.0.41
2014-06-09 20:39:49 +00:00
zzz
cb340152df * i2psnark:
- Linkify all announce URLs on details page
   - Sanitize announce URLs
2014-06-09 14:14:01 +00:00
zzz
299a44e7eb i2psnark: display peer version when available 2014-06-07 17:07:44 +00:00
zzz
40e5bcbdbb * NetDB: Reduce negative lookup cache time
* OCMOSJ:
   - Increase timeout if we must lookup leaseset
 * Streaming:
   - Shorter expire time in TCBCache
   - Don't fail a connection once it is up
   - Log tweaks
2014-06-07 13:23:38 +00:00
zzz
d328e78727 * SusiMail: Extend times on background checker (still disabled by default) 2014-06-07 13:17:40 +00:00
zzz
1bcb9b24b6 * Console: Fix NPE in summary bar 2014-06-07 13:16:19 +00:00
zzz
3c1c130bf0 * i2psnark: Fix errors when checking read-only files 2014-06-07 13:15:13 +00:00
zzz
df3442563c * Eepsite: Updated French help page (thx hummingbird) 2014-06-07 13:13:33 +00:00
zzz
331b1fa742 fix test breakage 2014-06-01 18:04:04 +00:00
zzz
b97a53177e * i2psnark:
- Store seed/leech status in DHT tracker (ticket #1280)
   - Increase max received DHT nodes (Vuze sends more than K)
   - Recognize not-registered message from diftracker
   - Fix bug in DHT unannounce()
2014-06-01 17:13:00 +00:00
zzz
633b71ba19 history for prop, -2 2014-05-31 16:58:05 +00:00
zzz
f3dd42143d cleanups 2014-05-29 12:44:27 +00:00
zzz
7c79f5d5e5 propagate from branch 'i2p.i2p.zzz.test2' (head 9aee013cf961ba795a6b5333481634c52d43abc5)
to branch 'i2p.i2p' (head e439e67c49695a624fabdf6f3cd1a8f7a3fd7ea5)
2014-05-29 12:31:49 +00:00
zzz
af5c0bd8a7 Console, i2psnark, susimail: Recognize emacs-w3m as a text-mode browser
As reported at http://zzz.i2p/topics/1630
untested
2014-05-28 21:25:35 +00:00
c07bfe34ab s/www\.i2p2\.i2p/i2p-projekt.i2p/g 2014-05-27 12:55:53 +00:00
49681415e2 Change "view source" link from Trac to Github. 2014-05-27 12:54:46 +00:00
190e8c01b7 update irc servers mentioned in the router console
- remove freshcoffee, add dg and echelon
2014-05-27 12:48:01 +00:00
zzz
6ae86f7d81 * i2psnark: Support ports in announce URLs, 2nd try (ticket #1283) 2014-05-27 12:06:59 +00:00
0aeb3ca75e s/i2plugins/plugins/ since i2plugins hasn't existed for years 2014-05-26 14:28:41 +00:00
1d3e12abb7 router console: fix links to i2p project pages
Some pages, such as Arabic linked to the German version.
Most pages mentioned "i2p-projekt and its mirror i2p-projekt.i2p"
2014-05-26 14:27:55 +00:00
5e8428ef6c router console: s;forum\.i2p2\.de;forum.i2p;g 2014-05-26 14:18:59 +00:00
19e3064529 remove #i2p-help from the router console (merged into #i2p) 2014-05-26 14:10:47 +00:00
f9dbd74ad8 update links to syndie to point to its eepsite 2014-05-26 13:59:22 +00:00
zzz
ff837cf66e i2ptunnel: Define standard tunnel properties and types in one place 2014-05-26 13:36:41 +00:00
zzz
e0914c358e susimail: fix NPE (ticket #1296) 2014-05-25 23:17:19 +00:00
zzz
0e9bb23c7b i2psnark:
- Respond to get_peers with an empty peers list instead of
    a nodes list if the requester was the only peer (ticket #1279)
  - Fix sendError() (still unused)
2014-05-25 21:41:43 +00:00
zzz
7ff5d36f07 i2psnark DHT tweaks (ticket #1281)
- Extend DHT tracker expire time from 45m to 3h
  - Extend DHT announce interval from 10m to 40m
  - Increase announces from 1 peer to 4
2014-05-25 20:38:39 +00:00
zzz
5a3eab0c7c i2psnark:
- Change "private" value in infohash from string to number,
    to match what everybody else does
  - Send seed/leech status in DHT announces (ticket #1280)
2014-05-25 19:41:01 +00:00
zzz
c28f707f55 cleanup 2014-05-25 19:23:04 +00:00
zzz
ef96c88719 HTTP Client:
- Add GUI options for user-agent, referer, accept
  - Fix SSL (initial socket data in I2PTunnelRunner)
  - Disable SSL to i2p addresses by default, add GUI option
  - Fix NPE in error handler
2014-05-25 19:17:36 +00:00
faa2435e33 checkremotecerts: fail if CN doesn't match
Since all reseed hosts now have proper certificates with matching CNs, I'm
making this script enforce a stricter policy, requiring matching CNs.
2014-05-24 13:13:35 +00:00
0537a221d3 temporarily disabling uk.reseed.i2p2.no 2014-05-24 10:08:58 +00:00
99c5a1978f merge of 'be06d7987687efb0d6b027f04a2efbf702218677'
and 'f6541fdc88966f2e0e510c2291b33cf716a3a62a'
2014-05-22 18:09:55 +00:00
zzz
d106f483a1 0.9.13 2014-05-22 14:59:02 +00:00
dee84e70ae Eclipse project for entire routerconsole dir 2014-05-22 01:51:05 +00:00
09995b77b4 Eclipse project for entire installer dir 2014-05-21 02:02:36 +00:00
06894f9f0b Export jstl.jar and standard.jar in Eclipse 2014-05-20 21:34:45 +00:00
zzz
73943b1a08 javadocs 2014-05-20 13:23:31 +00:00
zzz
b573dab05f javadocs 2014-05-20 13:22:07 +00:00
zzz
a766eca283 Crypto: Don't start YK thread in constructor (ticket #973) 2014-05-20 13:14:55 +00:00
zzz
a65edbef92 SSU: Fix peer test deadlock (ticket #1286) 2014-05-20 12:35:48 +00:00
zzz
7479aa235e fixes after review 2014-05-20 12:03:19 +00:00
zzz
4167cd955b Console: Cheap workaround for old wrappers (ticket #1285) 2014-05-18 23:24:03 +00:00
zzz
d1bd893a7b * I2PTunnel:
- Display custom error pages for I2PSocketExceptions (ticket #788)
   - Tag I2PSocketException text for translation (no bundles yet)
   - Move methods from superclasses to I2PTunnelHTTPClientBase
   - Fix connect client error pages, but they aren't displayed anyway
   - Don't start I2PTunnelRunner threads in constructor (ticket #973)
   - Synch close() in I2PTunnelServer
   - Cleanups and javadocs
2014-05-18 21:13:22 +00:00
zzz
2467856011 * Streaming: Cleanup, don't fail hard on no tunnels (ticket #788) 2014-05-18 00:44:51 +00:00
zzz
d32b4e9f24 * I2CP: Per-message status codes back through streaming (ticket #788)
- New I2PSessionException
   - Streaming PacketQueue requests status for SYNs on outbound conns
   - PacketQueue throws I2PSessionException in streams
2014-05-18 00:05:13 +00:00
zzz
1acd5caaa8 * HTTP client: Fix 'connection reset' browser messages
after an error in the first line (ticket #1277)
   - A SocketException is an IOE
   - out can't be null
2014-05-17 23:44:16 +00:00
zzz
f69b757305 * i2psnark: Support ports in announce URLs (ticket #1283) 2014-05-17 22:10:10 +00:00
d2db41bc89 remove cert from delete list 2014-05-16 14:04:45 +00:00
f3b4377ee1 re-add netdb.i2p2.no.crt 2014-05-16 13:58:51 +00:00
551a8091a9 GeoIP db updates; Japanese Susimail translation, -21-rc 2014-05-15 23:22:40 +00:00
f994590ad7 Translation updates
sk, ja, de, fr, it zh, nl, uk, nb
2014-05-15 23:14:38 +00:00
zzz
8371b8f806 * I2CP: Client-side prep for asynch status for sent messages (ticket #788)
- Clean up and reuse MessageState for asynch notification
   - New I2PSession sendMessage() method and listener
   - Move VerifyUsage from SimpleScheduler to SimpleTimer2 for efficiency
   - Fix up javadocs
2014-05-15 20:11:21 +00:00
5d04f8db89 checkremotecerts.sh fix test logic
Script would return 0 even connecting to the remote host failed.
2014-05-15 03:38:29 +00:00
06de347373 -20-rc 2014-05-14 14:18:24 +00:00
2bf2eb482e update outbound UA to match TBB's 2014-05-14 14:14:23 +00:00
zzz
a93666cd36 * I2CP: Prep for per-message reliability settings (ticket #788)
Router side:
     Store message nonce in ClientMessage, so we may send
     a MessageStatusMessage with a failure code to the client
     without sending an ACCEPTED MessageStatusMessage first.
     All MessageStatusMessages sent in response to outbound messages will now have a valid nonce.
2014-05-14 13:49:42 +00:00
zzz
dbb7eb3d88 * I2CP: Prep for per-message reliability settings (ticket #788)
Add bounds checks for flags
2014-05-14 12:15:57 +00:00
zzz
39169f0450 reveal key cert settings in i2ptunnel 2014-05-14 12:13:43 +00:00
zzz
df71308664 Susimail: Don't let an exception on one mail break others 2014-05-13 21:36:06 +00:00
zzz
e393f82eb7 * i2psnark: Escaping fixes on details page 2014-05-13 21:35:12 +00:00
zzz
8480a204ea * BOB, SAM, i2psnark: Fix datagram NPE (ticket #1275)
This could only happen on an extremely overloaded router.
2014-05-13 18:45:54 +00:00
zzz
197be5f60f * SusiMail: AIOOBE fix 3nd try (ticket #1269) 2014-05-13 18:39:56 +00:00
zzz
5621e9b390 * SusiMail: AIOOBE fix 2nd try (ticket #1269) 2014-05-12 20:46:30 +00:00
485d785e0b merge of 'dcf98ef995380862d3e668685caaa0acd403f068'
and 'f9fdb1592f632ef5de78e3dc7dac3f75ce4e3c39'
2014-05-10 15:38:20 +00:00
8d71d496be new self signed certificate which fits to the host name reseed.i2p.projekt.de 2014-05-10 15:21:54 +00:00
zzz
738bae46d2 * SusiMail:
- Remove deleted messages from memory too
   - Disable delete button when really-delete button shown
2014-05-10 14:47:46 +00:00
zzz
d519228efb change exception type 2014-05-10 14:44:09 +00:00
zzz
72c404c4d4 * NTCP: Fix NPE (ticket #996)
(hopefully)
2014-05-10 14:42:13 +00:00
zzz
d2e3547a2e * Crypto: JVM AES only faster for larger data size 2014-05-09 19:13:28 +00:00
zzz
8d9790fd77 * CPUID:
- Add hasAES()
   - Fix bugs in unused hasSSE3(), hasSSE41(), hasSSE42()
 * Crypto: Use JVM AES when faster
 * SystemVersion: Add isJava7() and isX86()
2014-05-09 15:28:54 +00:00
zzz
cd91a6b2a4 * SusiMail: Add more locking (ticket #1269) 2014-05-09 12:15:12 +00:00
zzz
e165c1805d unnecessary cast 2014-05-09 12:14:19 +00:00
292b0a81c0 remove debugging cruft 2014-05-09 10:33:01 +00:00
b9e9c07d95 checkremotecerts.sh: clean-ups, compatibility updates
It now works with either gnutls or openssl, and both gnutls v2 and gnutls v3.
2014-05-09 10:21:15 +00:00
837bf9eafe add i2pdocs.str4d.i2p to hosts.txt
It's linked on the website but wasn't in any of the default lists.
2014-05-09 10:11:22 +00:00
zzz
cfdbef05c5 set GPG key ID in release target 2014-05-08 19:23:15 +00:00
47b10e9771 checkremotecerts.sh: explicit check that cert exists 2014-05-08 17:56:37 +00:00
1b5a2ddef3 updated cert for ieb9oopo per email in ticket #1266 2014-05-08 17:55:41 +00:00
c161649ed5 Add script to check reseeder host certificate validity 2014-05-08 13:31:32 +00:00
c9b5c03e1b remove certs that are no longer used 2014-05-08 12:47:46 +00:00
c4c04d7ec5 rename i2pproject cert
The other self-signed certs are named after the host that they're being used
for. Maintaining this naming scheme will make automated testing easier.
2014-05-08 12:46:44 +00:00
b4e03fa969 Removing netdb.i2p2.* certs
These have not been used for some time. netdb.i2p2.no is using an *.i2p2.de
cert from Commodo.
2014-05-08 12:45:31 +00:00
zzz
1cdcf1cb0a i2ptunnel: Display warning for duplicate client ports (ticket #1265) 2014-05-07 16:00:38 +00:00
zzz
56b6992ca8 i2psnark: Add log message if directory does not exist (ticket #1263) 2014-05-07 15:58:24 +00:00
zzz
2beaea4a86 Tunnels: Revert expl. OB default back to 2 + 0-1 for now 2014-05-07 14:50:45 +00:00
zzz
2dc97b160a i2psnark: Allow click on entire table cell for viewing torrent details 2014-05-07 14:48:42 +00:00
zzz
a014918c0d Transports: Use constant time method for HMAC verification 2014-05-07 14:47:15 +00:00
zzz
fb9a4eb87a SSU: Extend establishment phase retx timeout 2014-05-07 14:43:46 +00:00
zzz
cd83c48526 DSAEngine: Minor cleanup 2014-05-07 14:41:28 +00:00
zzz
5b2766ddfb Data: Use Arrays.equals() directly, same as DataHelper.eq() 2014-05-07 14:40:03 +00:00
zzz
f912b01137 Fix console getting disabled when saving client config (ticket #1260)
Router: Add warning at startup if console is disabled
2014-05-07 14:36:41 +00:00
zzz
b0db4e4fff * SusiMail:
- Don't fetch headers from folder sorters
   - Update debug setting when saving config
2014-05-07 14:34:51 +00:00
zzz
649f76fb06 add hiddengate.i2p 2014-05-07 14:33:20 +00:00
zzz
91408cbdce SigUtil: Catch EdDSA IAE
SU3File: Hide EdDSA and unavailable sig types from help text
2014-05-05 19:49:24 +00:00
97c1ba2d02 merge of '477b2b4e4f6f8a2e406fb9729cd603d8caeadb40'
and 'ef12e90467e2bdbf5e64a9e55230ce56121d7347'
2014-05-04 14:52:06 +00:00
zzz
284802bfa5 add caching of EdDSA keys 2014-05-04 14:09:02 +00:00
zzz
48b6e0693e finals 2014-05-02 19:43:21 +00:00
zzz
67ea2f3717 SusiMail: Remove dups in war 2014-05-01 17:05:57 +00:00
zzz
e9e535cb94 * SusiMail:
- Move js to resources
   - js for delete boxes in folder view
2014-05-01 14:34:02 +00:00
zzz
7822b5c3ac SusiMail: header padding 2014-05-01 13:13:20 +00:00
zzz
767bd05ce1 SusiMail: new sorter base class 2014-05-01 13:02:44 +00:00
zzz
36ebe19cd7 SusiMail po update for TX 2014-05-01 12:04:10 +00:00
zzz
943ea957a2 * Plugins: Retry deletion at restart if it fails (ticket #1257) 2014-04-30 14:22:25 +00:00
zzz
04a3673366 remove UTF8 in commented-out test 2014-04-30 11:28:13 +00:00
zzz
1dfbe73b73 * SusiMail:
- Add print css
   - Add some divs
   - Hide header and footer in mobile css
   - Fix 'from' address in compose
   - Boolean config parse cleanup
   - Config textarea row count
2014-04-29 19:50:28 +00:00
zzz
87889bb322 * UDP:
- Locking fixes on peer testing
   - More locking fixes on rebuilding address
   - Slow down peer test frequency, esp. when firewalled
* Transports:
   - Deprecate unused recheckReachability()
2014-04-27 18:46:11 +00:00
zzz
aa0616d7c5 * UDP:
- Locking fixes on rebuilding address
   - Don't rapidly churn address when we don't have enough introducers
2014-04-27 15:47:43 +00:00
zzz
611ff6357e * NTCP: Remove published NTCP address if SSU becomes firewalled,
to fix the "Firewalled with NTCP enabled" message
2014-04-27 15:01:01 +00:00
zzz
91d7a0ab98 * SusiMail:
- Add locking for disk cache
   - Remove cancel button from login page
   - New configuration page
   - Move set page form to configuration page
   - Theme and folder js enhancements
   - Wrench icon from Silk, same license as the others
2014-04-27 14:57:28 +00:00
zzz
f5661da595 * Router: Set killVMOnEnd before runRouter() (for azi2phelper)
* RoutingKeyGenerator: Don't assume UTC (for azi2phelper)
2014-04-27 14:53:15 +00:00
d867f9f36e Fix for SigType.isAvailable() 2014-04-27 01:56:01 +00:00
55d92fc9f2 Support "raw" EdDSA signatures (in reality they are double-hashed) 2014-04-26 13:03:38 +00:00
2e2d3c39e6 Added Ed25519-SHA-512 to I2PTunnel advanced UI 2014-04-26 12:11:02 +00:00
3cd01acb73 Fixed Ed25519-SHA-512 algorithm name 2014-04-26 12:10:18 +00:00
02c0ddb3d3 Generalized to support any EdDSA parameter spec 2014-04-26 11:59:16 +00:00
ce397f5858 Added EdDSA support (directly, not using Provider) 2014-04-26 11:24:31 +00:00
zzz
3f56ce206d * SusiMail:
- Subject sort enhancements
   - Tag Re: and Fwd:
2014-04-25 20:05:23 +00:00
zzz
8a2308b411 * SusiMail:
- Send delete to server for mails already downloaded
   - Fix idle closer waiting for deletions
   - Add tooltips for icons
   - Add new options to properties resource
   - Add feedback when reload config button pushed (ticket #1158)
   - Reset page size when config reloaded
   - Remove max page size limit
   - Show page nav buttons on bottom too if page is big
   - Set title to subject on message view
   - Log tweaks
2014-04-25 18:47:47 +00:00
zzz
04cabf40b5 * SusiMail:
- Move delete and confirmation button in folder view to bottom left,
     page size form to bottom right
   - Attachment finals and cleanup
   - Increase max size for full download again
   - Fix repeated re-saves of mail to disk
   - Enable auto-deletion of downloaded mails
   - Consolidate check box processing
   - Button spacing tweaks
2014-04-25 16:11:35 +00:00
zzz
4e0c4f6f98 * SusiMail:
- Tweak sort button display based on current sort
   - Secondary sort based on date
   - Ignore "Re:" in subject sort
2014-04-25 14:09:28 +00:00
zzz
75bd235eb2 * SusiMail:
- Add raw attachment download method
   - Display image attachments inline
   - Don't rezip certain attachment types, just offer link
   - Handle attachment sending directly, don't put ref in session
2014-04-25 13:04:04 +00:00
zzz
05236b093a * SusiMail:
- Fix sorting buttons, broken by POST check
2014-04-25 04:15:50 +00:00
zzz
260ebe512c * SusiMail:
- Add icon for new mail
     (from Silk icons, same license as others)
   - Attachment logic tweak
2014-04-25 04:09:14 +00:00
zzz
c2dab16c8c * SusiMail:
- Add icons for attachments and spam
     (from Silk icons, same license as others)
   - Add checks for POST for XSS prevention
2014-04-25 03:42:18 +00:00
zzz
945d455f33 * SusiMail:
- Different colors for new mail and spam
2014-04-24 21:33:43 +00:00
zzz
c8f8f6ff34 * SusiMail:
- Add background mail checker, not yet enabled
   - Add idle timeout connection closer
   - Rely on idle checker for most delayed deletions
   - Cleanup resources better when shutting down session
   - Don't add deleted mails to folder, caused errors after deletions
   - Set socket soTimeouts so things don't hang forever
   - Display errors after check mail button pushed
   - More IOE debug logging
2014-04-24 20:54:22 +00:00
zzz
0d4f597a59 SusiDNS: Fix subscription edit page, thx bubbles 2014-04-24 14:26:21 +00:00
zzz
775047fbc2 * SusiMail:
- Fix HeaderLine decoder going past the headers,
     which was causing corruption in forwarded mails
   - More efficient output buffer allocation in HeaderLine decoder
2014-04-24 01:25:50 +00:00
zzz
1e4b43314c * SusiMail:
- Fix fetching of new mail
   - More Folder cleanup
   - Prep for not leaving on server
   - Prep for background checker
2014-04-23 22:46:57 +00:00
zzz
b365817c99 * SusiMail:
- Queue deletions for a delayed background thread
   - Synch all folder access
   - NPE fixes
   - Javadoc fixes
2014-04-23 19:40:57 +00:00
zzz
bbb04774d1 compile fix 2014-04-22 20:52:08 +00:00
zzz
1823e5e641 * SusiMail:
- Load all mails from disk at startup
   - Add offline mode
   - MailCache now has the total UIDL view
   - Copy silk folder icon from snark to console for use by susimail
2014-04-22 20:01:24 +00:00
zzz
4d2dc1c8e8 * SusiMail:
- Show sender name in folder view
   - Add support for configured sender name
   - Add HTML escaping of '&'
   - Fix Folder sorting so UP is up and DOWN is down
   - Use replace() instead of replaceAll() where appropriate
   - Fix capture by show page after back button
2014-04-22 18:45:09 +00:00
zzz
6986f90bf8 * SusiMail:
- Fix encoding in sent mails on non-UTF8 platforms (thx cryptosynthesis)
   - Clean up all other getBytes() calls
   - Tweak spacing on up buttons
2014-04-22 11:48:45 +00:00
zzz
b43ebd2486 * SusiMail:
- Add persistent cache
   - Remove ID sorter
   - Mail size getter/setter
   - Set mail size when setting body
   - Only send CAPA once
   - Tagged string tweaks
2014-04-22 11:18:56 +00:00
611f991fdd Added a security provider for I2P-internal crypto 2014-04-22 07:20:30 +00:00
zzz
7bf3ea5200 * SusiMail:
- Pipeline all deletes and quit
   - Don't reconnect after delete and quit
   - Verify connected before each POP3 operation
   - Null check in comparators
   - Don't clear messages if a reconnection fails
   - Use locale-based sorting for strings
   - Increase limit for full fetch again
   - Increase default page size back again
2014-04-21 23:00:46 +00:00
490727b401 fix i2ptunnel 2014-04-21 20:59:29 +00:00
zzz
49f4f3398d * SusiMail:
- Add MailPart constructor, make fields final
   - Add ReadBuffer constructor, make fields final
   - Move decoding to MailPart method
   - Setters/getters for Mail header, body, part
   - Classes package private
   - Finals, constructors
2014-04-21 20:17:08 +00:00
b84682fdc9 * findbugs: mostly stream closure fixes in router, apps, core 2014-04-21 10:54:52 +00:00
zzz
b9491b269b * SusiMail:
- Pipeline initial fetch of messages, huge speedup
2014-04-20 22:22:22 +00:00
zzz
b70cbb28b2 * SusiMail:
- Send CAPA
   - Pipeline STAT, UIDL, and LIST
2014-04-20 19:31:28 +00:00
zzz
673c14287a * SusiMail:
- Rework in POP3 in prep for more pipelining
2014-04-20 18:38:54 +00:00
zzz
b4a0ffdbbd * SusiMail:
- Don't require an attachment to be "uploaded" to send it
   - Move delete attachment button, hide if no attachments
   - Icon for delete attachment button
   - Fix html error in bccToSelf input
2014-04-20 17:12:21 +00:00
zzz
3b2e5bded2 * SusiMail:
- Don't store encoding class names in config
   - New susimail.debug setting in config
   - Use DataHelper to load config file
   - Close any open POP3 socket when session is unbound
   - Don't keep returning user to compose page (ticket #1252)
   - Add javascript capture of back button from compose page
2014-04-20 15:19:30 +00:00
67eb3cc140 unblocking USERS (ticket #1249) and various safe Inspircd commands 2014-04-20 11:53:39 +00:00
zzz
5a683149ab * SusiMail:
- New reply button icon (from Silk, same license as the others)
   - Save BCC-to-self preference in the session
   - Tweak the BCC-to-self layout
   - Fix date format in reply
2014-04-20 02:45:01 +00:00
zzz
b75ad1ca5a * SusiMail:
- Use pipelining in SMTP
   - Rewrite SMTP response processing
   - Translate SMTP error messages
   - Right-justify msg size in folder view
   - String.compareTo() cleanup
2014-04-20 01:26:11 +00:00
zzz
552ab31559 Console: Remove the classpath workarounds for SusiMail,
since it isn't using the jetty classes any more
2014-04-19 20:46:31 +00:00
zzz
4abfde4047 SusiMail:
- CSS padding in inputs
   - Flush writes in SMTP
   - Don't wait for SMTP response after QUIT
   - Translate the "login failed" message
   - Show "no messages" in folder view if none
   - Message view attachment cleanups
   - Fix the message view layout in CSS
   - Pipeline USER and PASS to save a round-trip at startup
   - Better synchronization in POP3
   - Properly de-byte-stuff in POP3
   - Flush writes in POP3 for speedup
   - Remove unnecessary caching in POP3, this is handled in MailCache
   - More efficient handling of POP3 server responses
   - Remove 60s timeout for fetching a message,
     so retrieval of large messages doesn't fail
   - Don't allow line breaks in date/time or size in folder view
   - Use DataHelper.formatSize2() for message size
   - Identify susimail log messages in wrapper
   - Debug log tweaks
2014-04-19 20:44:50 +00:00
zzz
6ecfedba37 SusiMail:
- Increase max size of mails that are fetched in full,
     previous limit was so small it never happened.
   - Move page nav to top of folder view, hide if only one page
   - Put message nav buttons on second line
   - Refuse to send mail with no "to"
   - Reduce default page size as it slows startup
   - Remove unnecessary casts
   - Right justify some input fields
2014-04-19 16:57:56 +00:00
zzz
43883a90d2 SusiMail: Successfully extend session expiration (ticket #1253)
by renaming the cookie, so we don't have a common session ID
with the base context and get it expired there.
2014-04-18 21:32:45 +00:00
zzz
3930113f00 I2PTunnel IRC Client: Prevent AIOOBE (ticket #1254) 2014-04-18 16:44:39 +00:00
zzz
029198c213 * SusiMail:
- Don't force reconnection on folder view (ticket #1253)
   - Only show logout button on folder view
   - Switch subject and date headers on message view
   - Button theme tweaks
   - Debug logging
   - Fix NPE when RELEASE=false
   - Synch tweaks
   - hellip
   - Footer tweak
2014-04-18 16:43:07 +00:00
zzz
493788f4f8 merge of '9f159df098940fb0feecf6eae0c990c62736bb9c'
and 'ba82e9e4c57bd8d9f567c9252fe7b5815972e370'
2014-04-18 01:50:14 +00:00
zzz
028776de88 * SusiMail:
- Extend session expiration (ticket #1253)
   - Handle non-UTF8 encoding on header lines (ticket #508)
   - Display dates in current locale and time zone
   - Display sender name on message view
   - Remove sort-by-ID buttons
   - Hide "reload config" button unless config file is present
   - Increase default page size
   - Add dependency tracking to build
2014-04-18 01:48:03 +00:00
705de68aa3 allow PROTOCTL and LINKS through the filter.
http://www.unrealircd.com/files/docs/technical/protoctl.txt

We already allow /MAP and /LINKS is pretty much the same.
2014-04-18 01:46:19 +00:00
zzz
eb96a74e32 configclients: Don't allow console disable 2014-04-18 01:14:23 +00:00
zzz
614f34c6b4 Stats: clean up addRateData() calls 2014-04-17 18:58:38 +00:00
zzz
f77a3c7f56 NTCP: Log tweaks to help on ticket #996 2014-04-17 18:54:58 +00:00
zzz
6de81d41d2 SSU: SessionRequest replay prevention (ticket #1212)
NTCP: Just use first 8 bytes of Hx^Hi for replay check
2014-04-17 18:52:40 +00:00
zzz
7ac9dc5542 Tunnels: Increase OBEP throttle limit for now 2014-04-17 18:50:24 +00:00
zzz
2195c2fe98 SusiMail: Button styling for prev,next,list 2014-04-17 18:48:52 +00:00
zzz
3f35e927dd SusiMail:
- Initializer cleanup, finals
   - Escape "--" inside HTML comments
   - Log errors to router log too
   - Notes on ticket #508 header line issues
2014-04-17 18:48:07 +00:00
zzz
5ec659513b SusiDNS:
- Move some methods to BaseBean
   - Locking on config file accesses
   - Remove static log and context
2014-04-17 18:39:52 +00:00
zzz
1039a4b7a0 i2psnark: Randomize announce list order and limit size 2014-04-17 18:36:37 +00:00
zzz
88899c1233 clean up unused router stuff 2014-04-06 18:28:34 +00:00
d429514a3a debian: remove dep on ${misc:Depends}
This causes the 'i2p' package to force the version of i2p-router to match.
2014-04-06 16:04:17 +00:00
zzz
b2c6fcbb73 merge of '0c93d925b9ac38f2475b39aa2b80eaa1454214d6'
and '97ec023f8ba85ebdabe5ee0bd3f9e107710f170f'
2014-04-06 15:19:30 +00:00
zzz
3b1e030b39 NetDB: Iterative search improvements
- Pass DSRM hashes through IMD to ILJ for client tunnels too
- Query unknown DRSM hashes in ILJ without looking up
  when using client tunnels; look up after querying
  when using expl. tunnels to speed things up
- Don't look up banlisted hashes
- Check 'from' hash in DSRM against list of peers sent to
- Don't query an unknown peer through a zero-hop OB tunnel
- Log tweaks
Extend expiration of returned message in IMD
2014-04-06 15:18:16 +00:00
zzz
e097a1caeb NetDB: Skip LS verifies when shutting down
remove unneeded null check
2014-04-06 15:15:23 +00:00
d6b09f8bab don't check launch4j xml 2014-04-06 14:36:36 +00:00
zzz
6d46344171 drop launch4j demos, docs, and source 2014-04-06 14:03:43 +00:00
zzz
24e807b238 Skip key cert LS verifies for floodfills that don't support them
Fix continuation after skipping key cert LS stores for floodfills
that don't support them; ditto big leasesets
2014-04-05 14:05:40 +00:00
zzz
fdf6f5d51f -2 2014-04-05 12:59:11 +00:00
zzz
4b938a02e7 log tweak 2014-04-05 12:33:53 +00:00
zzz
44a5740a04 Add server option for unique local address per-client
as suggested in https://lists.torproject.org/pipermail/tor-dev/2014-March/006576.html
2014-04-05 12:30:58 +00:00
zzz
8d73b2e838 Fix changing outproxy without stopping tunnel (ticket #1164) 2014-04-05 12:24:50 +00:00
zzz
e1fc6893b4 SocketErrorListener callback is unimplemented 2014-04-05 12:18:14 +00:00
7487ab8848 i2ptunnel: remove extraneous '>' from editClient 2014-04-02 01:25:47 +00:00
e675416b8c debian: re-enable javadocs pkgs, bump changelog 2014-04-01 21:27:49 +00:00
24a133fe67 add .pc/ to .*ignore 2014-04-01 21:22:41 +00:00
zzz
0570feda6f * NetDB: Handle RI response from non-floodfill router down a client tunnel 2014-04-01 13:05:51 +00:00
zzz
b206665c72 TunnelPoolSettings constructor tweak 2014-04-01 13:03:40 +00:00
zzz
8a6fb132f5 * Console: Fix summary bar html when displaying an update constraint 2014-04-01 13:01:13 +00:00
zzz
6992ca8b98 build path update 2014-04-01 13:00:28 +00:00
zzz
fd916a7646 test script updates 2014-04-01 12:59:27 +00:00
zzz
90cd68900e 0.9.12 2014-03-31 12:43:15 +00:00
zzz
3f865edb4f Convert pt_BR getopt translation from ISO-8859-15 to escaped UTF-8 2014-03-31 12:36:50 +00:00
2e8681de2c getopt translations 2014-03-28 20:23:53 +00:00
zzz
2d85b98c20 * i2ptunnel.config: Remove irc.freshcoffee.i2p
* NetDbRenderer: Adjust debug floodfill estimate
 * StatManager: Don't start thread for an empty config
 * StatisticsManager: Don't publish client tunnel stats
 * Log tweaks
2014-03-28 14:01:39 +00:00
d28d6efb79 geoip updates 2014-03-28 12:21:52 +00:00
43d84a5f07 fr, nb, and ru translation updates 2014-03-28 12:21:32 +00:00
e4d57f62bb merge of '1202f5d3645add930a96dfa77cd2b2ebfb56ca95'
and '5c131297d763f8953029fea257681d55f2103aaa'
2014-03-24 11:57:46 +00:00
a974268e7b postinstall: fix freebsd x86 wrapper path
Spotted in the FreeBSD Port (http://svnweb.freebsd.org/ports/head/security/i2p/files/patch-installer__resources__postinstall.sh?view=markup)
2014-03-24 11:57:04 +00:00
zzz
1695af7011 belated jisko.i2p 2014-03-23 20:44:47 +00:00
682c4cd0b8 remove extraneous '>' from editServer 2014-03-23 18:33:29 +00:00
0f6d039391 Console: Handle stopping plugin ClientApps 2014-03-23 10:55:00 +00:00
d6233a8798 add *.torrent to .gitignore 2014-03-21 11:35:37 +00:00
4f12e81dbb build: add -pre-release target, add addt'l files to distclean
Moving the pre-release checks to a new target (to be run at the very start of
"release")
2014-03-21 11:35:04 +00:00
ab612d0088 cleanup of *clean targets, remove more generated files in distclean 2014-03-19 22:00:43 +00:00
3fa7bb9dc5 mtn-ignore: ignore .torrent 2014-03-19 21:59:27 +00:00
22b3d4d70b translation updates 2014-03-16 23:56:43 +00:00
zzz
bd6c588c74 * SSU: Fix corruption of introducer keys 2014-03-16 18:27:46 +00:00
zzz
6c202e8f1d fix router identity test broken by previous checkin 2014-03-15 19:40:41 +00:00
zzz
24e6750529 * Certificate: Fix null cert hash code
* Hash: Cleanup of cached hash
* NetDB: Randomize returned DSM timestamp
2014-03-15 18:43:42 +00:00
af7ce8e18e remove extraneous <a> tag
(fixing my mistake)
2014-03-15 13:47:53 +00:00
zzz
c73f0eeeb5 more Jetty classpath cleanup 2014-03-13 13:58:50 +00:00
zzz
c68769cf7f MultiMap: Cleanups, javadocs after review 2014-03-13 13:57:10 +00:00
zzz
3e639a319d SAM:
- Classes static/private
 - Fields private/final
 - Remove unused fields
 - Remove shadowing fields
 - Remove dup method overrides
 - Remove static Logs
 - Remove unnecessary field initialization
 - Atomics
 - Findbugs
2014-03-13 12:22:04 +00:00
zzz
1bbb79f5b1 log tweaks 2014-03-13 12:17:34 +00:00
84e6991374 Add .su3 to .mtn-ignore, create new .gitignore file 2014-03-13 11:27:37 +00:00
5d1796bb6f Debian: Remove service directory when package is purged
This was in the 0.9.11 packages but not checked into mtn.
2014-03-13 02:31:23 +00:00
bfba732f76 Debian: Add systemd support (ticket #1208)
Currently just for Debian unstable and Ubuntu Saucy and newer.
2014-03-13 02:29:41 +00:00
zzz
738c5ed14e Streaming: Workaround for jwebcache and i2phex (ticket #1231) 2014-03-12 16:02:23 +00:00
zzz
beed080390 anoncoin.i2p 2014-03-12 15:21:17 +00:00
zzz
3624d66c12 send message on HTTP Server OOM 2014-03-12 15:18:41 +00:00
zzz
2cca2781fd * Streaming: Track recently closed connections (ticket #1161)
Consolidate and synchronize code for selecting a random stream ID
2014-03-12 12:39:53 +00:00
zzz
31d485299c log tweak 2014-03-12 12:36:00 +00:00
zzz
a39f667c2f set BAOS size 2014-03-12 12:35:29 +00:00
zzz
5283fc923e * Wrapper: Fix failed restarts on ARM (ticket #1230);
extend shutdown timeouts for all archs.
2014-03-12 12:33:36 +00:00
zzz
c57552f4e9 * Console: Handle ISO-639-2 language codes (ticket #1229) 2014-03-12 12:29:38 +00:00
zzz
96b4c6b219 findbugs sam/bob 2014-03-12 12:27:23 +00:00
zzz
51911bd9a8 fix jetty deprecations 2014-03-12 12:25:30 +00:00
zzz
1f5926e4e9 * PeerManager: Restore profileOrganizer.sameCountryBonus advanced config,
inadvertently removed in 0.9.10
2014-03-08 16:03:35 +00:00
zzz
d6a02a13ad * Router:
- Look for DeliveryStatusMessages beyond the message expiration,
     so we don't throw out a tagset that gets acked late
   - Allow re-adding of a "failed" tagset to the SKM
   - Extend max message age in MessageValidator
   - Remove unused and confusing timeout param when registering a selector
   - Log tweaks, javadocs, cleanups
2014-03-07 14:17:11 +00:00
e282491798 merge of '10a291d2283174a7527515a7448d220d5023ffc0'
and '6ace0f7ffbda402db7e1af21a74ca29ad54829c2'
2014-03-07 08:35:12 +00:00
2b0dfed012 Fixed Android API version detection, load cacerts dir for API >= 14 2014-03-07 08:27:14 +00:00
zzz
9d80aff977 * GarlicClove, CloveSet, GarlicMessageParser:
- Cleanup, reduce object churn, comment out unused code
   - Limit max cloves to 32
2014-03-06 19:31:09 +00:00
zzz
a0724dc009 * Router: Encrypt DeliveryStatusMessages sent in garlics (ticket #1217) 2014-03-06 16:21:36 +00:00
zzz
8c820bb237 clean up build classpath (ticket #1165) 2014-03-06 06:03:58 +00:00
zzz
3fdc964eac javadoc fixes 2014-03-05 16:53:04 +00:00
zzz
597662d0dc * Transports: Don't send a duplicate store of our RI at
start of a connection (ticket #1187)
 * NTCP:
   - Lower send priority of the RI at exchange
   - Bob will now send his RI even if he doesn't have Alice's
   - Send RI again sooner on long-lived connections
2014-03-05 16:32:04 +00:00
17c80c29e6 Updated history.txt 2014-03-05 03:35:52 +00:00
5d0bfc63fa Updated readme.html files for new website paths 2014-03-05 03:34:53 +00:00
0c449f8b8e susimail: Removed remaining Jetty dependencies in susimail (ticket #1165)
Thanks for the patch, wockenfuss!
2014-03-05 03:02:08 +00:00
36b6baa33e Updated .mtn-ignore 2014-03-05 02:58:07 +00:00
2c049878c6 Enable addressbook.jar building (for I2P-Android) 2014-03-03 03:49:48 +00:00
zzz
81c58c1796 log tweak 2014-03-01 13:13:52 +00:00
zzz
36a3edf612 - DatabaseStoreMessage: Don't instantiate an ArrayList unless we need it
- Overrides in GarlicConfig/PGC for efficiency and clarity
 - Check for valid ID in DeliveryStatusMessage
 - Misc. log tweaks, javadocs, cleanups
2014-02-27 13:37:11 +00:00
zzz
4b6fd3d387 format tweak 2014-02-24 14:06:24 +00:00
zzz
f777696e14 finals, volatiles, cleanups 2014-02-24 14:02:48 +00:00
zzz
c9c181c14a * NetDB: Slow down router refresh after startup to reduce load
on exploratory tunnels
2014-02-24 14:01:35 +00:00
zzz
a62b7a4374 * Tunnels: Rate-limit connections at the OBEP (ticket #1134) 2014-02-24 14:00:39 +00:00
zzz
9d7a9c9895 * NTCP:
- Add check for replayed session requests (ticket #1212)
   - Disable inbound check connection
   - Reduce object churn in EstablishmentManager
   - Don't pollute Hash cache in EstablishmentManager
   - addRateData() cleanup
2014-02-24 13:54:52 +00:00
zzz
5d6a1c5e35 reduce log level 2014-02-24 13:52:44 +00:00
zzz
c48266fdc4 * Transports: Use SigUtil.rectify() in DH 2014-02-24 13:51:20 +00:00
zzz
895d54d36d minor cleanup 2014-02-24 13:46:07 +00:00
ba0e1a3aa9 * I2PTunnel: add 'irc.dg.i2p' to the default IRC2P tunnel (for more information, see http://echelon.i2p/docs/IRC2p/irc2p_userguide.txt) 2014-02-23 21:38:12 +00:00
6ec665db50 Br. Portugese, French, Japanese, Polish translation updates 2014-02-23 16:54:49 +00:00
7f4c52cf42 remove #i2p-help from initialNews 2014-02-23 16:40:28 +00:00
37728e38c9 (hopefully) langbox fixes 2014-02-22 23:58:25 +00:00
zzz
18b4a2427b * I2CP Client: Generate revocation key of same type as signing key
* i2ptunnel: Only offer Sig options that are available in the JVM
 * LeaseSet: Add check for SigTYpe mismatch
 * SigType: Add isAvailable()
2014-02-21 17:47:30 +00:00
zzz
3102970540 * RouterAddress: Restore storage of expiration and use in signature
calculation, broken in 0.9.3, in anticipation of using it someday
2014-02-21 14:57:28 +00:00
zzz
c679091afd target build property 2014-02-21 13:59:27 +00:00
zzz
91cdf85772 * Router: Allow null args to main() (broke Android) 2014-02-20 14:08:05 +00:00
zzz
aab8b10adf * i2ptunnel: Add inproxy block option to HTTP server 2014-02-20 14:07:02 +00:00
5bcfe1ec72 don't link to docs.i2p2.de in the router console
docs.i2p2.de was last updated in October of 2010!
2014-02-18 19:51:35 +00:00
zzz
4209c291ba * history for prop, -9 (ticket #1090) 2014-02-17 14:18:18 +00:00
zzz
7c5dc7fa55 propagate from branch 'i2p.i2p.zzz.jetty8' (head 0a03ce60906c508b08cc84b3044954844a6ee157)
to branch 'i2p.i2p' (head d99392e09883a92b99a316b4deed0586dcf4ea5b)
2014-02-17 14:01:13 +00:00
zzz
c6dfb8744a Jetty 8.1.14 jars 2014-02-17 13:58:19 +00:00
zzz
6e0ca92041 * getopt fix for PrivateKeyFile -t sigtype, busted in prop
* history for prop, -8
2014-02-17 13:39:32 +00:00
zzz
2f7eb56790 propagate from branch 'i2p.i2p.zzz.ecdsa' (head e83bcdc842f5995d310a4295147f9326a993e010)
to branch 'i2p.i2p' (head 4983f716f8740bc7ddfae5561a562a0d42a815ae)
2014-02-17 13:29:41 +00:00
zzz
8c98ef7328 update version 2014-02-17 13:14:23 +00:00
zzz
45997fd1d5 * SSU:
- Restrict authentication with Bob's intro key to session created packet
2014-02-17 13:05:17 +00:00
zzz
6a3e5ec620 * SSU:
- Use session key for relay request/response if available (ticket #1206)
   - Remove packetAuthTime stats
   - Misc. cleanups and logging
2014-02-17 12:56:08 +00:00
zzz
18cbf3d253 * HMAC:
- Replace BC MD5 with JVM version, refactor I2PHMAC to use
     MessageDigest instead of BC Digest (ticket #1189)
   - Use JVM HmacSHA256 instead of I2PHMAC for Syndie since it is standard
2014-02-17 12:03:22 +00:00
zzz
4df6a6f47b min java version for izpack 2014-02-16 22:31:17 +00:00
5542406f3d Merge pull request from https://github.com/i2p/i2p.i2p/pull/1 2014-02-16 11:28:48 +00:00
zzz
a9fceae181 * I2CP:
- Add session limit, add new status code for refused
   - Ramdomize session ID, prevent dups
   - Make session IDs immutable
2014-02-14 17:05:32 +00:00
zzz
c79ff0dc09 minor cleanups 2014-02-14 17:02:14 +00:00
zzz
e2fc5c6957 * Tunnels: Change expl. OB default to 3+0 2014-02-13 15:46:34 +00:00
zzz
5667a6647f * Router: Convert to getopt (ticket #1173) 2014-02-13 14:43:23 +00:00
zzz
b70d616083 update links 2014-02-12 23:06:30 +00:00
75fa2b1809 typo fix 2014-02-12 21:38:42 +00:00
zzz
66d9017d58 fix PingTest 2014-02-11 19:45:52 +00:00
53efb7119a merge of '12c51adcf9862cc57488b27ec00002b1bb399294'
and 'b870e2fda1291f95ae4e6e35cc5ded300578d92b'
2014-02-11 14:15:35 +00:00
8b946bb56b Remove mention of Pebble in the router console for reasons noted in ticket #865 2014-02-11 14:15:04 +00:00
zzz
8ed34e3edf * HTTP client proxy: Don't flush after headers for a POST,
so the POST data is included in the SYN packet,
   to improve speed and reliability of small POSTs
2014-02-11 13:44:37 +00:00
d8fef53aef i2prouter: - note FBSD10 workaround in ticket #1118
- remove tanuki's script version checks
2014-02-11 01:54:45 +00:00
zzz
6af82f2a9a history for prop, -2 2014-02-10 20:32:20 +00:00
zzz
36b2547ca4 propagate from branch 'i2p.i2p.zzz.test2' (head 7db2f2b73bc7c44b4be1077185314201c5b0bfe6)
to branch 'i2p.i2p' (head ea9844ecc27e816a09cf5d9b36c10ee2c3d1bcc9)
2014-02-10 18:46:38 +00:00
zzz
72e96cdd23 remove concatentation within appends 2014-02-10 18:33:32 +00:00
zzz
a2ba9bbdb1 * Checklist updates
* Console:
   - Don't reset graph settings when clicking restart or shutdown on graphs page
   - Don't recommend guest login on trac, it's disabled
   - Catch and remove corrupt jrb file (ticket #1186)
   - Always set default language on /configui
 * Readme: Update links
 * Transports: Reduce target connection count again to reduce
               tunnel reject rate further
2014-02-10 14:22:43 +00:00
f6d9a6917f Removed a comment line from french translation 2014-02-09 20:27:42 +00:00
zzz
2e91890401 Javadoc fixes to correct release number
Remove unused lock object
 Add irc.dg.i2p
 0.9.11
2014-02-08 18:09:46 +00:00
zzz
1956068698 * Addressbook:
- Rewrite subscriptions.txt to convert to new default URL
   - Static method call cleanups
2014-02-08 16:02:50 +00:00
zzz
855cae0a45 propagate from branch 'i2p.i2p' (head eac6caabd2ea6731ee27111f0dbadf5afcd3695b)
to branch 'i2p.i2p.zzz.test2' (head 911a8782667d878dd7a2976c7fb10d481d80e023)
2014-02-07 16:33:59 +00:00
zzz
ef3a12f01a * UpdateManager:
- Convert to RouterApp and remove update hooks from context
     (ticket #1185)
2014-02-07 15:40:23 +00:00
zzz
37bf750ab9 * I2PTunnel:
- Convert to getopt (ticket #1173)
   - Add more argument sanity checking
   - Add a usage output
2014-02-07 14:24:09 +00:00
zzz
090a790a9d * Services:
- Move backup news to psi.i2p
   - Move default addressbook subscription to i2p-projekt.i2p
   - Remove www.i2p2.i2p from default update lists
   - Add psi.i2p to hosts.txt
   - Update links on help pages to avoid redirects on new website
     and select the correct language
 * SusiDNS: Fix whitespace issues
2014-02-07 12:52:54 +00:00
8ef3bb3d82 version number fix 2014-02-06 18:50:54 +00:00
388019249d -10-rc
Debian changelog update, Korean debconf translation, history.txt update
2014-02-06 18:45:11 +00:00
91d1364832 February 2014 geoip db updates 2014-02-06 18:43:45 +00:00
2ec1d8484f Brazilian Portuguese, Danish, French, Japanese, Polish, Russian, Ukrainian 2014-02-06 18:32:23 +00:00
zzz
9a01fdf57c * PrivateKeyFile:
- Convert to getopt (ticket #1173)
   - New option -e for hashcash effort, instead of -h with optional arg
   - Stub out -t option, to be propped from ecdsa branch
   Will require manual merge with ecdsa branch...
2014-02-06 15:30:03 +00:00
zzz
deec84713f * EepHead, PartialEepGet, SSLEepGet:
- Convert to getopt (ticket #1173)
 * EepHead, PartialEepGet:
   - New option -c for clearnet (no proxy), same as -p:0
   - New option -o, same as EepGet
   - Proxy option -p with host name arg only (no ':') now allowed
   - Add proxy auth support with -u and -x options (ticket #1173)
 * EepGet:
   - Catch error in -h option
   - Cleanups
2014-02-06 14:18:51 +00:00
zzz
0d028122a6 * EepGet:
- Support Digest proxy authentication(ticket #1173)
   - Move authentication parsing method from I2PTunnelHTTPClientBase
2014-02-06 01:29:46 +00:00
zzz
4998f86efe * EepGet:
- Convert to getopt (ticket #1173)
   - New option -c for clearnet (no proxy), same as -p:0
   - Proxy option -p with host name arg only (no ':') now allowed
   - Proxy password option is now -x, not the second arg to -u
   - Prompt for proxy password if not supplied in options
   - Line length option is now -l, not the second arg to -m
   - Error on nonproxied .onion hosts
   - Update man page, sort options (ticket #1173)
2014-02-05 16:10:56 +00:00
zzz
839bd51bc8 javadoc fix 2014-02-05 14:46:23 +00:00
zzz
936f2bb317 combine help strings 2014-02-04 14:32:36 +00:00
zzz
0cd774273c * I2Ping:
- Convert to getopt (ticket #1173)
   - Add support for from/to ports
2014-02-04 14:11:09 +00:00
zzz
fe391ff29f Convert all jars and wars to compile to 1.6 target,
except for the following which are used by android,
to maintain compatibility with very old phones, for now:

	addressbook.war
	BOB.jar
	i2p.jar
	i2ptunnel.jar
	mstreaming.jar
	router.jar
	streaming.jar
2014-02-03 23:59:48 +00:00
zzz
001b127258 * Jetty:
- Update to Jetty 8.x, Servlet 3.0, JSP 2.2
   - Require Java 6
   - Use Servlet and JSP jars from Jetty instead of Tomcat
   - Tomcat remains at 6.0.37 supporting Servlet 2.5 / JSP 2.1
   - Remove Jetty dependency in console error pages
   - Build files for Jetty 8.1.14
   - Doc updates
   - Delete Jetty 7.6.14
   - Jetty 8.1.14 not yet checked in,
     waiting to see if a new version is released soon,
     but build will download it for testing
2014-02-03 23:24:45 +00:00
zzz
7c00a5165f Build: Honor require.gettext=false for i2prouter translations 2014-02-03 20:43:02 +00:00
zzz
e1c3e2c1c7 * Getopt bundle fixes for Java Properties standard:
Fix comment lines
   Encoding conversion to UTF-8 with escapes
   Add unicode escapes for all chars over 0x7f
   Change Transifex type to PROPERTIES
   Also:
    - Remove BOMs
    - Remove \r
    - Remove blank lines
   Encodings were as follows:
     cs: marked ISO-8859-2
     pl: marked ISO-8859-2, possibly corrupt, ?? in two strings
     de, es, fr: marked ISO-8859-1
     hu: detected as ISO-8859-2
     it: apparently ISO-8859-1
     ja: Unicode escaped already
     nb, nl: ASCII
     ro: marked ISO-8859-2 but actually UTF-8
     zh: detected as GB2312 w/ CRLF
     zh_TW: UTF-8 w/ BOM w/ CRLF
2014-02-02 21:05:14 +00:00
zzz
e9b3577eec snark: cache PeerID.toString() 2014-02-02 17:19:06 +00:00
zzz
3622501471 * Streaming:
- Set ports on many packets that were missing them
   - Use connection throttling methods on pings too (ticket #1142)
   - Add methods to set ports on pings
   - Argument checking on ping methods
2014-02-02 16:47:29 +00:00
zzz
b7207fd29f Use getopt lib in SU3File (ticket #1173) 2014-02-02 15:14:00 +00:00
zzz
4dc1241d2f Add lightweight getopt command line parsing lib
(ticket #1173)
This is Java getopt 1.0.14 (released 2012/02/08)
Source was retrieved from https://github.com/arenn/java-getopt
Previous version 1.0.13 (released 2006/08/29)
is available at http://www.urbanophile.com/arenn/hacking/getopt/
Copyright (c) 1998 by Aaron M. Renn (arenn@urbanophile.com),
LGPL v2.
Include the small translation files, add to build.xml and to .tx/config
Fixes:
  Simplified Chinese
    MessagesBundle_chs.properties renamed to MessagesBundle_zh.properties
  Traditional Chinese
    MessagesBundle_cht.properties renamed to MessagesBundle_zh_TW.properties
  Norwegian Bokmaal
    MessagesBundle_no.properties renamed to MessagesBundle_nb.properties
2014-02-02 15:12:44 +00:00
zzz
c59603d31b fix swapped Dutch and Norwegian on /configui 2014-02-02 14:39:41 +00:00
zzz
3ab149a399 streaming javadoc fixes 2014-02-01 12:37:45 +00:00
zzz
99f28519fb * SOCKS: Remove static logs 2014-01-31 18:38:15 +00:00
zzz
05aa88b4e8 * /logs: Fix encoding of wrapper log section (ticket #1193)
- remove a cast in FileUtil
2014-01-31 18:34:27 +00:00
zzz
887f953efb * NetDB: Fix cases where corrupt RouterInfo files were not deleted (ticket #1190) 2014-01-31 18:32:22 +00:00
zzz
5e16c42e4e * InboundMessageDistributor: Set reply flag on LeaseSets 2014-01-30 13:02:16 +00:00
2cea7cdb30 fix 2014-01-29 21:41:52 +00:00
e60da8e8ff Added new https reseed, i2p-netdb.innovatio.no (Sindu) 2014-01-29 19:45:10 +00:00
zzz
be12995753 * Tunnels: Change expl. IB default to 2 + 0-1 2014-01-28 22:50:51 +00:00
zzz
c30419107f * /configclients: Add link to plugins.i2p; don't show delete button for console 2014-01-28 22:48:52 +00:00
zzz
2cacded182 datagram sigtype bugfix 2014-01-28 22:40:36 +00:00
zzz
ec22a1dafc - Only store LS with more than 6 leases to routers that support it 2014-01-28 22:35:33 +00:00
434bf13be9 * I2PSnark: Make 'kitty.png' transparent. 2014-01-28 21:11:39 +00:00
236df32f30 volatiles 2014-01-28 17:42:14 +00:00
zzz
28575dbdae * Key certs:
- Hide setting in i2ptunnel edit pages unless advanced user
  - Only store LS with key certs to routers that support it
2014-01-28 14:21:54 +00:00
zzz
5b9d669d79 * I2CP: Use client tunnels for b32 lookups (ticket #1166)
- convert some calls to use getDestHash()
   - javadocs
2014-01-28 13:27:44 +00:00
zzz
b2f4fde7e5 history for prop, -6 2014-01-27 18:50:44 +00:00
zzz
9eefe1e935 propagate from branch 'i2p.i2p.zzz.i2cp' (head d4ac8162a4ba299ac912640f19076c3c90afdc67)
to branch 'i2p.i2p' (head adc5102c93383e01c74b87f04449dc9c307f6e75)
2014-01-27 16:47:22 +00:00
zzz
b91f041ad7 I2CP:
- Add missing session ID assignments in HostLookup/Reply constructors
2014-01-27 16:38:00 +00:00
zzz
ba96f72899 help tweak 2014-01-27 16:37:39 +00:00
5d322245d8 Ticket #1183 - move message serialization later in the SSU pipeline 2014-01-27 14:47:58 +00:00
zzz
47712a39ac i2psnark:
- Support arbitrary location for torrent data. Save location in
   per-torrent config file. TODO: Fix torrent browse pages
   (ticket #1028)
 - Enhance idle shutdown message
 - Javadocs
2014-01-27 13:41:38 +00:00
zzz
6b16907e40 * i2ptunnel HTTP Proxy: Fix default enable for outproxy plugin 2014-01-27 13:32:24 +00:00
zzz
18146daad8 i2psnark:
- Add missing nonce protection for file priority setting
 - Add torrent mime type
 - String append cleanup
2014-01-26 14:26:16 +00:00
zzz
0c326f989e Remove outproxy hook vestiges in context, history for prop, -3 2014-01-25 18:23:46 +00:00
zzz
e0a499dd0f propagate from branch 'i2p.i2p.zzz.outproxy' (head 02da481346e0bf35b289f00b32f50871da202afb)
to branch 'i2p.i2p' (head eb2820957208e17c76e8c10a2c36e59e0da61895)
2014-01-25 18:16:38 +00:00
zzz
0f862124fe - Tweak display name of HTTP client tunnel
- Show outproxy plugin status on i2ptunnel index page
2014-01-25 17:56:35 +00:00
zzz
d00be4ceee update error pages for HTTPS 2014-01-25 15:52:04 +00:00
zzz
ec8354860e * NetDB: Fix NPE after client shutdown (ticket #1174) 2014-01-25 15:08:56 +00:00
zzz
f9144f2fbf * StatisticsManager: Lower frequency for publishing stats again 2014-01-25 15:07:57 +00:00
zzz
5d2ff5e648 * Installer: Update links
* Update release checklist
2014-01-25 15:06:51 +00:00
zzz
ce475d2cd6 sort imports 2014-01-25 15:05:43 +00:00
zzz
72bd1fe91b * i2psnark: Lower threshold for auto-stop
* Update: All updates via torrent
2014-01-25 14:58:34 +00:00
747d833392 Fix 2014-01-25 00:59:42 +00:00
3427464de6 Move OutNetMessage buffer preparation to the Writer threads
(Ticket #1184)
 Up version to -1
2014-01-25 00:46:30 +00:00
zzz
9ca625a64e - Fix up the header processing for SSL thru HTTP proxy
- Fix the CONNECT line output
- Set use-plugin default to true
- Log tweaks
- rename a variable
2014-01-24 16:52:29 +00:00
9e87fd9b13 Sync fix for NTCPConnection._currentOutbound 2014-01-24 15:35:55 +00:00
zzz
5b6ed48ec0 0.9.10 2014-01-22 01:30:33 +00:00
zzz
96f6865835 bump for review 2014-01-21 00:51:08 +00:00
fa50f9f246 * Adding http(s) uk.reseed.i2p2.no (Meeh)
* Adding http i2p-netdb.innovatio.no (Sindu)
2014-01-21 00:00:27 +00:00
538b4b10d7 Translation updates from Transifex 2014-01-20 17:00:24 +00:00
bdb3e26d07 geoip (v4 and v6) updates 2014-01-20 16:17:32 +00:00
ec87600e80 Chinese language update 2014-01-20 16:13:31 +00:00
zzz
0624f46e67 * Console: Change www.i2p2.i2p links to i2p-projekt.i2p
* Reseed: Remove netdb.i2p2.de
2014-01-20 15:52:14 +00:00
ece1198dd4 Fixed NPE 2014-01-15 02:31:07 +00:00
zzz
8bbab31872 * NetDB: Fix handling of DSM down client tunnels 2014-01-12 19:21:52 +00:00
zzz
8c6922ac5f * NetDB: Fix handling of DSRM down client tunnels
ISJ log tweak
2014-01-12 15:24:13 +00:00
zzz
6b67f399f6 * NetDB:
- Reduce min part tunnels for ffs to 35
   - Use client tunnels for LS lookups from OCMOSJ (ticket #1166)
2014-01-12 01:10:38 +00:00
a9598633b3 Missing file from BOB logging fix 2014-01-11 17:14:09 +00:00
1fb2672b67 BOB: Pass through I2CP host/port (ticket #827) 2014-01-11 04:30:59 +00:00
4308ce6347 Fixed logging for BOB-one.jar 2014-01-11 01:56:47 +00:00
32b095efbd BOB: Implement ClientApp interface (ticket #347) 2014-01-10 21:11:55 +00:00
zzz
eb4bdfcefb add i2pjump 2014-01-10 16:31:39 +00:00
fc6554cabc typo fix (a03adeb0, part 2) 2014-01-10 11:44:37 +00:00
058590f69b Fixed language names in routerconsole 2014-01-10 06:15:17 +00:00
zzz
576984badc I2CP:
- Add SessionID to HostLookup/Reply messages, for future
    use when we have multiple sessions
  - New SessionID constructor w/ value
  - Throw IAE on invalid SessionID values
  - Bump all comments from 0.9.10 to 0.9.11
2014-01-10 02:24:15 +00:00
9825fcf97b update of en source files, bump build 2014-01-09 19:33:54 +00:00
1ed96d72b2 i2prouter translation updates 2014-01-09 19:24:45 +00:00
a29935abb3 New Brazilian Portuguese translation
- New translation from Transifex
- Update langbox widths
2014-01-09 19:24:11 +00:00
e92a5da5a5 tx: update hostname in config, add pt_BR 2014-01-09 19:21:38 +00:00
f08e0299ef Updated translations from Transifex 2014-01-09 19:17:38 +00:00
zzz
9757435b09 NewsFetcher: Delay news fetch on new installs (ticket #1153) 2014-01-09 14:03:49 +00:00
zzz
80fadb4580 Kad: Fix NPE when removing yourself 2014-01-09 12:27:18 +00:00
8658c23974 susimail: Fixed pagination with zero entries (ticket #1168) 2014-01-09 04:31:30 +00:00
0264cc9030 susimail: UTF-8 support from wockenfuss (ticket #508) 2014-01-09 03:34:45 +00:00
bd5b6b32b5 Updated history 2014-01-09 03:33:57 +00:00
dc0a1281bf Migrated overlap fix from Fux (ticket #773) 2014-01-09 03:10:50 +00:00
zzz
c20c697126 RouterAppManager: Allow registration of untracked ClientApps,
required for orchid plugin
2014-01-08 15:17:09 +00:00
zzz
44e7110c9a Fix StandardServerSocket.isClosed() and close()
thx cacapo
ref: http://zzz.i2p/topics/1547
2014-01-08 00:32:51 +00:00
zzz
c860c49c6b Add jisko.i2p to home page
Icon source: http://jisko.i2p/wiki/File:Jisko_console_icon.png
Icon license: Copyleft: This work of art is free; you can redistribute it and/or modify it.
ref: http://zzz.i2p/topics/1539
2014-01-08 00:30:28 +00:00
zzz
b16e66d39a Add GUI outproxy plugin enable setting for all tunnel proxies
(only implemented in HTTP)
More SSL support in I2PTunnelHTTPClient
  - Add separate config for SSL outproxy
2014-01-06 16:56:00 +00:00
3b06f0b83c Change the test url to www.i2p-projekt.i2p 2014-01-06 16:06:20 +00:00
zzz
0bc6c23ac9 Remove outproxy hook in context, use ClientAppManager:
- Add clientAppManager() to I2PAppContext so it can be used there
  - Add routerAppManager() to RouterContext for convenience inside router

Start of SSL support in I2PTunnelHTTPClient
  - Add initialSocketData support back to I2PTunnelOutproxyRunner
  - Works for orchid (and in-net?)
  - TODO Doesn't work for in-net proxy
  - Need separate config for SSL proxy
2014-01-06 13:57:45 +00:00
zzz
17e63b054c add sigtype to i2ptunnel client gui too 2014-01-05 16:38:39 +00:00
zzz
0fae0640d6 missing file 2014-01-05 02:55:46 +00:00
zzz
d054e12952 New interface and context hooks for in-jvm outproxy
Support in HTTP client proxy
All preliminary, maybe better to use ClientAppManager?
2014-01-05 00:52:00 +00:00
dc60c2b478 * Console: Change /configclients 'advanced warning' to include 'toopie, no red 2014-01-04 23:40:41 +00:00
zzz
b59aa1fb69 move I2PSocketOptionsImpl from mini to impl 2014-01-04 22:10:10 +00:00
54a21bfa7b Fix compilation of non-JUnit tests (disabled by default) 2014-01-04 19:57:47 +00:00
50f55877f8 make public method protected 2014-01-04 19:56:55 +00:00
f9ff262318 Fix junit tests for streaming, thank you zab (and thank you zzz) for helping out. 2014-01-04 19:45:52 +00:00
91ba76f2a6 merge of '1fd43bf251a91d33bb1ea9b06f2b35a40be3b9c9'
and '766a92b57cdf82d3b1d1e3a71ef2a3109e883add'
2014-01-04 17:41:15 +00:00
ec97bc2f81 Stab at fixing streaming tests.
Add javadoc package.html
Fix import order
2014-01-04 17:39:32 +00:00
zzz
fba209ca7d restore method used by bote 2014-01-04 17:32:38 +00:00
zzz
b91b242a1a bump 2014-01-04 16:54:12 +00:00
zzz
38186c8f75 TunnelPoolSettings:
Split out the defaults for expl/client IB/OB.
  Client default now 3 hops.
  Expl default still 2 hops, with OB Expl + 0-1,
  en route to 3+0.
2014-01-04 16:48:45 +00:00
zzz
1b3aefbbce PeerManager: Remove small same-country bonus
This was done back when we were desperate for
 build improvement but it's bad for anonymity
 and probably a little slow also
2014-01-04 16:43:54 +00:00
zzz
c03511b971 exception causes 2014-01-04 16:40:06 +00:00
zzz
78e7599a8a better wording 2014-01-04 16:39:10 +00:00
zzz
dc871cf1eb XSS 2014-01-04 16:38:05 +00:00
e98b9d0af5 bump for testing 2014-01-04 14:27:51 +00:00
2a09d5baa6 * Streaming: Move streaming to new package (ticket #1135) 2014-01-04 14:09:33 +00:00
zzz
41e071efe5 * Key cert GUI support:
- Add setting in i2ptunnel server edit page
  - Comment out cert setting on i2ptunnel server edit page
  - Show key type on susidns details page
  - Show key type on LS debug page
2014-01-03 15:31:08 +00:00
zzz
e8e239616f * Crypto: More implementation for key certs
- Support i2cp.destination.sigType option in TunnelController and
    I2PSocketManagerFactory
  - Fixup of Destination.create() and Destination.size()
  - Add generic off/len methods in DSAEngine, needed for streaming
  - Fixup of sign/verify in streaming Packet
  - Javadocs
2014-01-03 00:22:44 +00:00
1feb317f8b typo 2013-12-25 09:39:19 +00:00
09668453d0 * Console: Add 'advanced warning' to /confgiclients
* SOCKS5Server: Remove redundant, commented out line from my previous findbugs
2013-12-25 09:37:46 +00:00
zzz
5842e25205 Initial support for key certificates and arbitrary types and lengths
of signing keys and signatures in RouterIdentities and Destinations.
Untested, not even for regressions, except with command line
using PrivateKeyFile.
Based on preliminary spec at http://zzz.i2p/topics/1442?page=1#p7524
Not done:
 - Transport handshake signing
 - Configuration of default type
 - Specification of type in options to I2PSocketManagerFactory
 - Specification of type in i2ptunnel
 - Fix up caching of SigningPublicKey and P256 key cert
 - Any non-default crypto type in the key cert
 - Documentation
2013-12-24 16:41:05 +00:00
zzz
a2e7fa8b7b another minor dir listing speedup 2013-12-22 14:23:01 +00:00
zzz
30ccf1b334 i2psnark:
- Refactor file deletion in prep for better file name handling (ticket #571)
 - Don't use canonical files in directory listings,
   for speed and to avoid file comparison problems (tickets #1079, #1148)
 - Set base file/dir in Storage constructor, make final,
   in prep for arbitrary locations (ticket #1028)
2013-12-22 13:52:35 +00:00
zzz
5219791673 I2CP:
- Add support for b64 conversion in destLookup()
  - Catch invalid message length sooner
I2Ping:
  - Extend I2PTunnelClientBase so non-shared-client,
    I2CP options, and other features will work
  - Fixes for fields and threading
Streaming:
  - Send LS with ping (broken since 0.9.2)
  - Set the NO_ACK flag on pings and pongs
2013-12-21 18:10:59 +00:00
zzz
bf485d8bce history update and date fixes 2013-12-21 18:01:04 +00:00
zzz
cc97a19d3c I2CP:
- Add support for hostname lookups over I2CP with new
    HostLookup and HostReply messages.
  - Move username / password from CreateSession
    to GetDate for early authentication;
    this is an incompatible chage.
    Outside router context with authentication enabled,
    new clients will not work with old routers.
    Early authentication is not yet enforced, enable with
    i2cp.strictAuth=true. Will change default to true in a later release.
  - Block all actions before authentication.
  - Better disconnect messages to clients for diagnostics
  - Improve lookup command, add auth command in i2ptunnel CLI for testing
  - Don't start ClientWriterRunner thread in constructor
  - Don't flush in ClientWriterRunner unless necessary
  - Send GetDate even in SimpleSession outside of RouterContext
  - Improve SetDate wait logic to reduce locks and break out when
    Disconnect received
  - Add Disconnect handler to SimpleSession
  - I2Ping cleanups
  - Javadocs
2013-12-21 00:21:48 +00:00
zzz
38c02b44b9 Streaming: final, volatile, logging 2013-12-19 12:24:51 +00:00
zzz
04a596899a NetDB: Fixes for ExpireRoutersJob
- Don't expire if too few routers
  - Don't expire if net is disconnected
  - Don't run in VMCommSystem
2013-12-19 12:23:29 +00:00
zzz
ee1ed1bb82 Nice message during graceful shutdown
May need to tweak the wording
2013-12-19 12:20:32 +00:00
zzz
2b39d28e99 fix comment 2013-12-19 12:16:39 +00:00
zzz
01b153488a i2psnark:
- Move config file and DHT persistence file to a config dir
   - Move per-torrent configuration from "zmeta" in the main config file
     to a per-torrent config file (ticket #1132)
   - Split timestamp and bitfield into separate configs
   - Fix misspelling of autoStart config
   - Remove two unused SnarkManager methods
2013-12-16 16:12:32 +00:00
zzz
8cb503d8bb EepGet: Allow override of the User-Agent
i2psnark: Set User-Agent
2013-12-15 15:16:54 +00:00
zzz
efff25a87c NetDB:
- Just before midnight, flood to new location too so lookups
   don't fail after keyspace rotation (ticket #510)
 - Refactor RoutingKeyGenerator and UpdateRoutingKeyModifierJob
   in support of the above
 - Display next key on LS debug page
2013-12-14 14:38:00 +00:00
zzz
6e2583ad92 NetDB:
- Increase new kad size to K=24, B=4
 - Fix router count by counting in the data store, not the kbuckets
 - Randomize the order we load router infos at startup so we
   don't bias the kbuckets
2013-12-13 17:50:39 +00:00
zzz
af84bcf945 i2ptunnel:
- Show destination for persistent client key only if available;
   show b32 for the key as well
2013-12-13 17:45:35 +00:00
zzz
3dc429415b use advanced setting to show LS debug 2013-12-13 17:31:13 +00:00
zzz
ec9dd25631 sort i2ptunnel CLI help for sanity 2013-12-13 17:30:18 +00:00
zzz
2bda87d5a7 comment out main 2013-12-13 17:29:43 +00:00
a7a816e0a7 wrapper: 3.5.23 updates for win64 2013-12-10 23:23:06 +00:00
zzz
3d9d722cee history for props, -1 2013-12-10 11:39:45 +00:00
zzz
289a8e7b40 merge of '3f93d2c09c89b5c68487c33fd700ef7c2feeeb61'
and 'b2c58f8462ab5c08682b711436c387b421bdd0c2'
2013-12-10 11:11:08 +00:00
7d3aa33c25 Fixed type argument problem causing infinite recursion 2013-12-10 05:55:19 +00:00
zzz
0db1314595 propagate from branch 'i2p.i2p.zzz.netdbkad' (head bc7310e940f01e68bd6be0ed0681eb624dada332)
to branch 'i2p.i2p' (head 98569f30891693e6888913f50b88d1f37969fe45)
2013-12-10 02:31:08 +00:00
zzz
68641626aa propagate from branch 'i2p.i2p.zzz.test2' (head ec8e362ce8b93280b518c599a3cc075b89085d2b)
to branch 'i2p.i2p' (head c9b1eef91f61f4482ad11c4f2b2d01be67a17ad2)
2013-12-10 02:26:32 +00:00
zzz
5b9fb403c9 Jetty 7.6.14.v20131031 2013-12-10 02:26:00 +00:00
a4114b96fd Deprecation warning fixes 2013-12-09 20:45:11 +00:00
de184ed139 propagate from branch 'i2p.i2p.str4d.cleanup' (head 736423cc308e964bab55068e625f8a1852932ec5)
to branch 'i2p.i2p' (head 0ac335d5dc4ccaeb113af4fb5c0e993a6f42fdbe)
2013-12-09 19:51:39 +00:00
zzz
04c342ec6a PrivateKeyFile: Fix ISE (ticket #1145)
broken in 0.9.9
2013-12-09 16:38:00 +00:00
zzz
27ce28027d i2ptunnel: Disable streaming pings for clients (ticket #1142)
i2psnark: Disable streaming pings (ticket #1142)
2013-12-09 16:11:53 +00:00
zzz
f8a54bde19 0.9.9 2013-12-07 15:30:29 +00:00
zzz
3acfdbe8f7 i2ptunnel IRC client: Do not filter server PING or client PONG (ticket #1141) 2013-12-06 15:26:12 +00:00
zzz
d9fed57c89 more finals 2013-12-05 16:25:16 +00:00
zzz
46e7e9be82 finals 2013-12-05 16:21:36 +00:00
zzz
d87d4eb232 I2CP: Disconnect client on attempt to publish invalid leaseset 2013-12-05 16:14:51 +00:00
zzz
88ea451f81 propagate from branch 'i2p.i2p' (head 2634e424f06e58231c47f1ec318e9ae21c94a8b3)
to branch 'i2p.i2p.zzz.test2' (head 68ca880caf69a06c0fd01fc70675df795aef1de2)
2013-12-05 16:07:32 +00:00
822ec4aa53 Debian: patch refresh 2013-12-04 18:46:28 +00:00
zzz
7b0b07933f finals 2013-12-04 14:21:03 +00:00
zzz
7fe8573df4 i2psnark ConnectionAcceptor:
- Fix ConnectionAcceptor not restarting after tunnel
    restart, preventing incoming connections
  - locking tweaks
  - cleaner reschedule tweaks
  - don't store server socket locally
  - constructor tweaks / finals
  - Stop acceptor when tunnel disconnects
  - javadocs
2013-12-04 14:17:38 +00:00
c180292358 Style fix: leave brackets around for() one-liners 2013-12-04 03:51:02 +00:00
a3fa48dcbe Removed dead code 2013-12-04 03:50:26 +00:00
zzz
445e4301d5 bump for review 2013-12-01 21:27:43 +00:00
736da22bba update geoip from maxmind's 2013-11-05 db 2013-12-01 20:15:32 +00:00
f29c64cd70 merge of '37bb29ce149260c55fb90ec8e56262262382fd9d'
and 'c4f7358a50c9982c5d63e9e5201f4e3f9562422f'
2013-12-01 20:13:49 +00:00
aa4b4b9d2b French, Italian, Romanian, Spanish, and Swedish translation updates 2013-12-01 20:09:16 +00:00
1112fc8544 Yes it's deprecated, it should still use proper generics 2013-11-30 12:52:50 +00:00
9b361ac445 Fixed history. Last commit was actually blocking "X-Powered-By". Oops. 2013-11-28 21:12:35 +00:00
0ff423fc57 I2PTunnel: Don't send 'X-Forwarded-For' on HTTP server tunnels for anonymity reasons (reported by 'trixie' on IRC). 2013-11-28 21:03:19 +00:00
efe3bd2c05 Use for each when Iterator not needed 2013-11-28 11:56:54 +00:00
f112baac48 propagate from branch 'i2p.i2p' (head cbfe85d22c4d0b05c901db3fa751b57889d9b2d6)
to branch 'i2p.i2p.str4d.cleanup' (head 94fe1764f50b459da18222434034ad46d604c7a1)
2013-11-28 11:12:41 +00:00
707f616498 Changes from -rc diff review 2013-11-28 11:10:57 +00:00
ed2feb3ff7 Core: findbugs 2013-11-27 23:22:49 +00:00
a17b1b99c0 Moved StatLogSplitter to i2p.scripts/java-utils 2013-11-27 22:48:46 +00:00
27bc32f2f3 Core: findbugs exclusions (for use in Eclipse or Jenkins) 2013-11-27 11:17:17 +00:00
b535054e13 generics 2013-11-27 11:14:16 +00:00
97a9a6090a Use copy constructor instead of clone() 2013-11-27 01:55:29 +00:00
8b8e2c88c1 type argument 2013-11-27 01:55:14 +00:00
9d7ee30c15 More cleanups 2013-11-27 01:42:34 +00:00
4ee144533a Another warning suppression to be removed at Java6 2013-11-27 01:25:20 +00:00
0f2a983bb7 i2psnark: type arguments, warning suppression (to be removed at Java6) 2013-11-27 01:11:48 +00:00
8fd2f9090e propagate from branch 'i2p.i2p' (head 7903431c2a396fceb1e0428b2be3dde03ba24635)
to branch 'i2p.i2p.str4d.cleanup' (head cfbae7380c3fa106f578d5de399701cfb72d5747)
2013-11-27 00:57:19 +00:00
8770d7eae0 i2psnark: Comparable type arguments 2013-11-26 21:09:36 +00:00
c59ef24acf i2psnark: more type arguments 2013-11-26 20:16:45 +00:00
85aa2fb083 i2psnark: MetaInfo type arguments (thx zzz) 2013-11-26 19:54:53 +00:00
zzz
434b9fa0d1 GeoIP: Thread the periodic lookup so it doesn't clog the timer queue 2013-11-26 16:28:24 +00:00
zzz
56116ad8c2 PeerManager: Thread the periodic reorg so it doesn't clog the timer queue 2013-11-26 15:51:00 +00:00
zzz
c0ef19a281 i2psnark: Fix mixed public/private tracker detection
(thx str4d)
2013-11-26 03:07:21 +00:00
9804e5b7d9 i2psnark: more type arguments 2013-11-26 01:34:08 +00:00
2f33186e58 i2psnark: type arguments, unused imports, for each 2013-11-26 00:20:03 +00:00
0347c56c96 Deprecation fixes 2013-11-25 23:29:48 +00:00
e77409e57a Close resources 2013-11-25 23:14:09 +00:00
615ba94559 propagate from branch 'i2p.i2p' (head d12a1fd746cd9314de5de5e1000c02cf4c59100d)
to branch 'i2p.i2p.str4d.cleanup' (head e20c143dd50a9c802999068a95e12198b07e4c36)
2013-11-25 22:36:27 +00:00
ce0596d5b1 Reseed: Listen to "Require SSL" config option 2013-11-25 21:11:56 +00:00
35b6926e4f Ticket #1047 : Do not adjust window on receiving dups. 2013-11-25 19:21:27 +00:00
zzz
76925fa3bd console: add debug link if advanced config is set 2013-11-25 15:59:34 +00:00
zzz
dbdf36d85c Update: Increase torrent from 30% to 60% 2013-11-25 15:34:49 +00:00
zzz
60aa8c57a4 I2PTunnel: Fix a shared client configured with i2cp.newDestOnResume
not restarting correctly, caused by previous checkin
2013-11-24 23:42:53 +00:00
zzz
001070f677 fix setting of BC_AVAILABLE thx str4d 2013-11-24 23:42:13 +00:00
c6f2d4948b Class generics 2013-11-24 23:41:06 +00:00
zzz
8699c82614 Kad unit tests:
- Port KBSTest from i2p.zzz.kademlia branch
  - Fix RandomTrimmer so it always returns true, so it may be used
    as the trimmer in the unit tests
2013-11-24 23:39:47 +00:00
zzz
1d7eedd463 Kad unit tests:
- Move KBucketSetTest to new directory
  - Fix testSelf() as new implementation will never include myself
  - Delete KBucketImplTest, not applicable/useful now
  Next todo: port KBSTest from i2p.zzz.kademlia branch
2013-11-24 21:58:42 +00:00
zzz
796a231f54 NetDB:
- Move net.i2p.kademlia package from i2psnark to core, and convert
    netdb to use it.
  - Delete old implementation in netdb
  - Fixups in netdb for generics
  - Add debug output to /debug

  This is the next step in the development plan, in which we previously:
    - Copied the code from netdb to the i2p.zzz.kademlia branch, fixed it,
      and made it generic for hash size (June 2012);
    - Moved it from the i2p.zzz.kademlia branch to the i2p.i2p.zzz.dhtsnark
      branch, and implemented KRPC with it (June 2012);
    - Propped it from i2p.i2p.zzz.dhtsnark to trunk for 0.9.2 (July-Sept. 2012);
    - Proved it out in 0.9.2 - 0.9.9 (Oct. 2012 - Nov. 2013)

  The plan was to maintain the KBucketSet public methods throughout the development
  so we could drop the new version back into netdb, so here we drop it in.

  Setting of K=16, B=3 is just an initial guess, to be reviewed.
  This moves about 18 KB from i2psnark.jar to i2p.jar and removes about 12 KB from router.jar.
  Unit test fixup: todo.
2013-11-24 16:38:51 +00:00
e1fcad686c propagate from branch 'i2p.i2p' (head 72c44737466e553fec443a79fffa7636894fe383)
to branch 'i2p.i2p.str4d.cleanup' (head 5a2425d7523b732840e55039f88cea5699f1aa83)
2013-11-24 01:20:11 +00:00
zzz
ffa03f2b83 IterativeSearchJob:
- Recheck completion status just before sending out a wrapped message
 - log tweaks
2013-11-23 17:56:40 +00:00
zzz
54fb91ba8e I2PTunnel: Call destroySocketManager() when replacing
a client socket manager configured with i2cp.newDestOnResume,
  or a shared client.
  This prevents lots of orphaned StreamingTimer threads.
  There are still cases where these threads may stick around,
  when a tunnel is stopped but not restarted. We don't know in
  some cases when a tunnel could be restarted and when it can't.
  destroySocketManager() should always be called when discarding a
  SocketManager but i2ptunnel doesn't do that now. More to do,
  but this fixes the most common case of leaked threads.
  Related tickets: ##642 #961
2013-11-23 17:54:01 +00:00
zzz
e498e2113f Snark: make a set of the default trackers so the config array
can be private and the lookup for the form is more efficient.
2013-11-23 14:45:38 +00:00
zzz
f42ac71fe0 UDP PeerState findbugs volatile/atomic/synch 2013-11-23 14:37:33 +00:00
zzz
74f2fd06cc Deprecate Signature.FAKE_SIGNATURE 2013-11-23 14:33:58 +00:00
zzz
143a0dfc47 Transport: Reduce target connections from 60% to 45% of limit.
This will improve network capacity.
   Apparent problems with lower limits were actually due to
   unrelated bugs that were fixed by 0.9.8.1-22.
   This can go lower still; I've been testing 33% without issues.
2013-11-23 14:29:23 +00:00
fdb0097934 Temporarily moved old help.jsp translations back 2013-11-23 11:44:07 +00:00
0dde4162e6 susimail: Fix NPE when deleting last message (ticket #414) 2013-11-23 04:24:30 +00:00
zzz
844bae18ba fixup after prop 2013-11-22 22:19:06 +00:00
zzz
9e4d5c0e61 propagate from branch 'i2p.i2p' (head da40262a8b7685de3877c1d7d6d16a155caa9e7c)
to branch 'i2p.i2p.zzz.test2' (head 6263bb149b8301059d0471bcc1d47caeca660f4e)
2013-11-22 17:29:45 +00:00
zzz
9b8d3eb688 Startup:
Wait a while and recheck if a recent ping file is there,
    so that a crashed router doesn't prevent a restart (ticket #633)
2013-11-22 17:27:49 +00:00
8478bfbddc BOB: for each 2013-11-22 11:46:39 +00:00
d6bb5f6a4d i2ptunnel: type arguments 2013-11-22 11:41:12 +00:00
e9fec9354b ministreaming: type arguments 2013-11-22 11:37:44 +00:00
f9f0e6d0a2 SAM: for each 2013-11-22 11:36:26 +00:00
3bc0be1cbe susidns: type arguments, for each 2013-11-22 11:25:22 +00:00
8d826cee93 susimail:
- Generics in Folder
- for each
- type arguments
2013-11-22 11:18:41 +00:00
e853d9a40b Router: more type arguments, for each 2013-11-22 10:16:34 +00:00
15bf94b479 Core: type arguments 2013-11-22 09:34:42 +00:00
6314f33d8f desktopgui: unused imports 2013-11-22 04:25:48 +00:00
5fa0376f58 SAM: type arguments, unused imports 2013-11-22 04:22:14 +00:00
552dd189a5 streaming: type arguments, unused imports 2013-11-22 04:18:26 +00:00
57144f3e6a Added Eclipse projects for SAM and streaming 2013-11-22 03:58:02 +00:00
zzz
0454639db8 bump -30-rc 2013-11-21 23:02:21 +00:00
c32b451733 i2psnark: type arguments, unused imports 2013-11-21 12:43:45 +00:00
2f4765665d routerconsole: type arguments, unused imports 2013-11-21 11:31:50 +00:00
bff79cdae8 susimail: type arguments 2013-11-21 10:49:15 +00:00
4bddf8ae0b susidns: type arguments, unused imports 2013-11-21 10:17:35 +00:00
ae79deff39 net.i2p.jetty.*: type arguments, unused imports 2013-11-21 10:13:34 +00:00
e3aeb267f8 Eclipse classpath consolidation 2013-11-21 09:38:09 +00:00
c5c26c440d Eclipse Ant builders for core, router and jettylib 2013-11-21 09:11:42 +00:00
77971624b4 Created Eclipse project for installer/resources
Reverts a change in 7fe82070
This project can be added to the classpath of a JUnit runner
2013-11-21 08:54:42 +00:00
f5621c5082 Converted lib Eclipse project to standard folder 2013-11-21 08:52:04 +00:00
3fa7fe9733 Updated routerconsole Eclipse classpath 2013-11-21 08:40:05 +00:00
c97d07e10a org.cybergarage.*: more type arguments 2013-11-21 06:08:41 +00:00
567c328331 org.cybergarage.*: type arguments, unused imports 2013-11-21 05:58:54 +00:00
3aa982529e org.xlattice.crypto.*: type arguments 2013-11-21 05:56:14 +00:00
0c07f9ff96 More type arguments in UDPTransport 2013-11-21 05:23:35 +00:00
f0055ccbfe Made type argument for Transport.getClockSkews() consistent 2013-11-21 02:27:53 +00:00
693cc828c2 Type arguments in OutNetMessage 2013-11-21 02:27:03 +00:00
688dd23111 gnu.crypto.prng.*: type arguments 2013-11-21 02:18:59 +00:00
e38db5eb44 i2ptunnel: type arguments, unused imports 2013-11-20 23:36:39 +00:00
817f531619 merge of '743aa294fa15c3243bb6ad56d4de64f5eff15051'
and '85fa37bf6c3090c0d4c10f4b7b2d679549090c37'
2013-11-20 23:15:31 +00:00
53623da2eb addressbook: type arguments, unused imports 2013-11-20 23:14:40 +00:00
4910266d9b merge of '63ea1d70b3fd3886a050d7b196cd7ae261844164'
and '6a57f7039fe5697b9770d642ac1d4653e4b9878c'
2013-11-20 23:10:52 +00:00
24ae66df6d Core JUnit tests: type arguments, unused imports 2013-11-20 23:06:17 +00:00
228bd980db Router JUnit tests: type arguments, unused imports 2013-11-20 22:47:14 +00:00
f161a2dfc9 BOB: NamedDB accesses are synchronized, correct findbugs fix is to remove volatile 2013-11-20 22:12:44 +00:00
abe1dc676e Dead code, type arguments 2013-11-20 22:05:37 +00:00
zzz
9de57a5d5a log tweak; bump -29-rc 2013-11-20 21:16:13 +00:00
2cc742c3ed Fixed stupid pasting bug 2013-11-20 19:54:10 +00:00
5bcfe025d5 fix build 2013-11-20 15:40:21 +00:00
6dc6ca7713 avoid <? extends Object> generics 2013-11-20 15:11:35 +00:00
eabcc96a99 remove useless string 2013-11-20 14:52:44 +00:00
28b6675979 findbugs BOB/SAM. more to do. 2013-11-20 12:02:44 +00:00
413ad6b0e6 BOB findbugs 2013-11-20 09:56:57 +00:00
a7a7e96188 Findbugs in imported core code 2013-11-20 09:15:12 +00:00
796dbc5d2e Fixed bug hidden by Set<RouterInfo> -> Set -> Set<Hash> unchecked conversion 2013-11-20 04:18:15 +00:00
c86845078c Reverted change in net.i2p.router.Router 2013-11-20 04:06:59 +00:00
89dcceefee Core: type arguments, unused imports 2013-11-20 04:02:28 +00:00
bacce17990 Router: type arguments, unused imports 2013-11-20 02:46:24 +00:00
e61e950713 update patch / update debian changelog 2013-11-20 00:50:39 +00:00
244209d3b7 Translation updates, addition of Japanese language
-28
2013-11-19 23:59:46 +00:00
zzz
dbe0a8240e Translations:
- Add support for country variants (ticket #1133)
  - Refactor data in ConfigUIHelper
Config files: Allow empty values
2013-11-18 23:18:46 +00:00
zzz
7e3e08532f more static atomics 2013-11-17 15:03:10 +00:00
zzz
1d4190734d Findbugs all over
- volatile -> atomic
 - unused code and fields
 - closing streams
 - hashCode / equals
 - known non-null
 - Number.valueOf
 - new String
 Still avoiding SAM, BOB, SusiMail
2013-11-16 13:22:05 +00:00
zzz
96cf1d60c2 * Jetty: Fix eepsite and webapp cache control directives.
Eepsite fix for new installs only.
  Fix i2psnark BasicServlet javadoc about param prefix.
  (ticket #1128)
2013-11-15 18:51:14 +00:00
3aa33378c1 i2prouter: s/3\.5\.20/3.5.22/g 2013-11-15 01:02:37 +00:00
747bd0c5a3 Update Java Service Wrapper to v3.5.22
- Windows: Self-compiled with VS2010 in Windows 7. The icon has been
  changed from Tanuki's default to Itoopie.
- Linux ARMv6: Compiled on a RaspberryPi using gcc 4.6.3-14+rpi1,
  Icedtea6 6b27-1.12.5-1+rpi1 and stripped
- All other binaries are from the "community edition" deltapack offered by
  Tanuki.
2013-11-15 01:01:49 +00:00
zzz
ea7b42810f * InboundMessageDistributor:
- Put garlicked DSM messages in the InNetMessagePool instead of handling directly,
     so the IterativeSearchJob will see the response and declare success.
     Only affected LS lookups as we do not request encrypted replies for RI lookups.
     Similar to the fix for verifies 6dc5bed94321ae2b290cfe351511d18465e08f91
     This bug was causing initial lookups to fail but subsequent ones to succeed.
     Broken since 0.9.7 when encrypted replies was introduced.
     Ticket #1125
2013-11-14 17:39:31 +00:00
zzz
19022baa27 log tweaks, final 2013-11-14 17:36:57 +00:00
e8248f5005 volatile 2013-11-14 15:18:46 +00:00
f8178b7165 ticket #1125: revert previous change as it is not relevant
to test failure
2013-11-13 11:43:24 +00:00
79b5d9748d patch refresh 2013-11-13 01:03:19 +00:00
zzz
b53ed94e8f Findbugs:
- Fix several 'increment of volatile is not atomic' all over
    Remaining: UDP PeerState.java, to be checked in separately
  - Comment out all of unused MessageStateMonitor
2013-11-12 19:28:23 +00:00
zzz
df84a2fcd0 save server status text to return to user 2013-11-12 19:19:21 +00:00
25e7dea370 merge of '4f6d64a50c7c5c27682914984831fc581724659d'
and 'e5def490e4eba793ca0d2bcb739771dcdf8c0242'
2013-11-11 23:49:02 +00:00
90919ebf6b Make ObjectCounter Serializable 2013-11-11 23:48:15 +00:00
zzz
76078deb3f handle numeric private value in metainfo 2013-11-11 23:24:14 +00:00
1b95a03d2e merge of '3a7591d75dacb165b1b1d26c6bdd94184076fb03'
and 'ba02b6daf2d660339ff05cfe0479344391e6e34f'
2013-11-10 23:27:39 +00:00
108039de08 partial revert of 6df9f4e154d148867ee158cbe9e9acf3fb73d680 2013-11-10 23:00:57 +00:00
addd2e6d6a merge of '3f85581f65aedde0f96729d197aaab223174f2e4'
and '6df9f4e154d148867ee158cbe9e9acf3fb73d680'
2013-11-10 22:22:10 +00:00
5c38d5a6c9 Findbugs: More findbugs fixes. Including but not limited to: null check fixes and some synchronization 2013-11-10 22:20:13 +00:00
zzz
69489dd19e use DataHelper.skip() in a few more places 2013-11-10 22:20:06 +00:00
zzz
3fce0e8e45 xlattice findbugs 2013-11-10 22:19:45 +00:00
35fb332c2c moar test cases 2013-11-10 21:13:42 +00:00
zzz
1b5309be05 junit test for new DataHelper.skip() 2013-11-10 20:42:24 +00:00
zzz
d2a1025b3f about 20 findbugs fixes all over 2013-11-10 20:07:46 +00:00
0a8f79f0e3 Findbugs: A stab at squashing some issues across the board. Probably more to follow. 2013-11-10 19:04:57 +00:00
zzz
18e4c2ac63 log tweak 2013-11-10 15:34:44 +00:00
zzz
90c2e08489 Streaming:
- Fix uncaught exception when log level = WARN, broken in -23
2013-11-10 15:32:54 +00:00
zzz
598ef67c4e Tunnel fragments:
- more checks, don't allow fragment #0 in follow-on fragment
  - Set message ID in constructor
2013-11-10 15:27:28 +00:00
zzz
1b9d870b91 i2psnark: Don't announce more than torrent size as downloaded amount 2013-11-10 15:20:07 +00:00
zzz
68f67b7c8e UPnP:
(ticket #1123)
 - Add new config i2np.upnp.ignore to specify UDNs of ignored devices
 - Add display of ignored devices on /peers
2013-11-10 15:17:42 +00:00
d2f0c251c0 use four digit umask in wrapper.config
According to http://wrapper.tanukisoftware.com/doc/english/prop-umask.html the
umask is a four digit number.
2013-11-09 16:19:33 +00:00
zzz
2b2f34b3f1 A better killyourtv.i2p icon
New icon from FatCow, licensed as specified in our docs.
   ref: http://zzz.i2p/topics/1492
2013-11-08 18:28:35 +00:00
zzz
4e680479da Home page: replace all default eepsite icons.
New icons from FatCow, licensed as specified in our docs.
   ref: http://zzz.i2p/topics/1492
2013-11-08 15:26:32 +00:00
zzz
d1b93e0705 DeliveryInstructions:
- Comment out unused encryption fields to save space
  - New static immutable LOCAL instruction to reduce object churn
2013-11-08 14:39:43 +00:00
zzz
4382def62f log tweak 2013-11-08 14:35:28 +00:00
zzz
952a56c537 JobQueue: Log a warning if a job is scheduled too far in the future,
to catch bugs like the one in -7 where requeue() is called
          with an absolute time instead of a delay
2013-11-08 14:34:33 +00:00
zzz
67aead214b Tunnel Endpoints:
- Reject type 3 (undefined) delivery instructions at both OBEP and IBEP,
     would be treated as LOCAL
   - Reject type 0 (LOCAL) delivery instructions at OBEP, no current usage,
     would cause NPE if handled
2013-11-08 14:31:14 +00:00
zzz
50f45a50a7 minor optimization 2013-11-08 14:24:06 +00:00
6b326c3705 merge of '15e16e2fd4c5be75a63b28616b413a8d1e13e1d6'
and '2449ac4142097e34b7ad4c4c4cb16c163a786a16'
2013-11-07 20:39:59 +00:00
919ec3af01 work on failing JUnit test 2013-11-07 20:38:52 +00:00
ca5a301a4f i2prouter: create i2p.dir.config with umask from wrapper.config 2013-11-07 19:56:01 +00:00
zzz
ae76a6ee1a findbugs correctness fixes, all over the place 2013-11-07 19:20:25 +00:00
zzz
5cbecb3599 log IP change in event log 2013-11-07 13:13:21 +00:00
zzz
5a34e1de4f * NetDB: Fix RI publish interval, broken in -7 2013-11-07 12:31:46 +00:00
zzz
c810694e07 * i2psnark: Fix file links, broken in -12 (ticket #1114) 2013-11-07 12:29:05 +00:00
zzz
ca866d48e6 * Logging: Track duplicates across flush interval (ticket #1110) 2013-11-07 12:23:37 +00:00
f1e77499e2 allow webapps.config to be 'preseeded' with values 2013-11-04 22:05:22 +00:00
zzz
9007db1485 Expire wasUnreachable entries, so inbound tunnel build failures don't escalate
and the peer doesn't have a severe penalty in the CapacityCalculator forever.
This may fix the tunnel build problems that started in -10. Or not.
2013-11-03 15:26:21 +00:00
zzz
85c998e500 HTTP proxy: Fix addressbook name on redirect page 2013-11-03 15:04:37 +00:00
zzz
8296f8229e + * NetDB: Allow store of leaseset as long as one lease has not expired 2013-11-03 15:01:31 +00:00
zzz
059ae3a80e - Add network status to event log 2013-11-03 15:00:00 +00:00
67e242c441 Debian patch refresh and readme file update 2013-11-02 17:31:31 +00:00
zzz
e23f3b4875 comments 2013-11-02 14:10:06 +00:00
zzz
06ea9af733 i2psnark: Log name of offending file causing IOException (ticket #1099) 2013-11-02 14:09:00 +00:00
zzz
884818f518 log tweaks, generics 2013-11-02 13:58:12 +00:00
zzz
3f39bd0f7b remove unused static log 2013-11-02 13:53:42 +00:00
48cce6435b routerconsole war dies with .jsp files in a subdir 2013-11-01 11:00:37 +00:00
zzz
777e08c8b6 * Transport: Fix GeoIPv6 (ticket #1096)
due to int/long problem, they were being corrupted
   and then looked up as IPv4
2013-11-01 01:44:29 +00:00
zzz
8c4b0b7c00 merge of '0af9bde8ae97c3b08f2c934236532121ce135817'
and 'b324a96172089b549e53fb1c0c2a01807fe64699'
2013-10-31 21:30:02 +00:00
zzz
dae8b25374 Transports:
- Increase threshold for idle timeout reduction from 33% to 60%.
   This was reduced from 75% to 33% in -10 and it caused significant
   tunnel build problems, for reasons that aren't entirely clear.
 - Don't change the SSU idle timeout quicker when firewalled.
 - log tweaks
2013-10-31 21:27:26 +00:00
2ae293444e Split routerconsole help into several files (no frontend change)
The old full-page translations of help.jsp are deprecated. The help text will
be tagged for translation on Transifex.
2013-10-31 21:22:24 +00:00
zzz
0f11d3566a log tweaks 2013-10-31 21:15:09 +00:00
zzz
fa70d439c3 minor optimization 2013-10-31 21:08:02 +00:00
zzz
0010581405 TunnelPoolSettings:
- Make dest hash final
 - Ensure allowZeroHop is always true for exploratory
2013-10-31 21:07:11 +00:00
zzz
1d659e4f8a i2psnark: Always verify file lengths at startup (ticket #1099) 2013-10-31 21:02:59 +00:00
509f00c5e2 Override toString() 2013-10-30 18:09:40 +00:00
aeb3241abb * i2psnark: Start torrents by default (ticket #1072) 2013-10-29 23:05:50 +00:00
zzz
8909df3c88 * i2psnark: Fix start and start-all buttons on text-mode browsers
and Opera (ticket #1093)
2013-10-29 21:49:20 +00:00
zzz
1cffcae36b merge of '2c288e0ac5d4a6039b3f08e6bbae9439bb038955'
and 'fa8975b2dbcb60d5f181bc21fc1245d5f82baef0'
2013-10-29 21:04:40 +00:00
zzz
d2ee5b96ad Log tweaks and minor cleanups, -15 2013-10-29 21:03:20 +00:00
zzz
0506a5915b * Tunnels:
- Build a new exploratory fallback tunnel in the BuildExecutor
     loop if we run out.
   - Don't use closest expl. tunnel as the paired tunnel for a build,
     use a random one instead (partially back out change from -12)
   - Log tweaks
2013-10-29 21:01:53 +00:00
zzz
91ef3fd0bc * InboundMessageDistributor:
- Don't discard an encrypted DSRM received
     down a tunnel, just strip the hashes like we do for unencrypted
   - Send a store of our own encrypted LS received down a tunnel to
     the InNetMessagePool so the FloodfillVerifyStoreJob will see it.
 * NetDB: Fix LS store verifies with encrypted replies
   by storing the tagset with the correct SKM for the inbound tunnel used.
   Broken since 0.9.7 when it was introduced.
2013-10-29 20:57:00 +00:00
79f5484f87 Fix history. 2013-10-29 20:38:32 +00:00
6afd2c4b97 * Adding no.i2p registrar 2013-10-29 00:05:06 +00:00
zzz
06b09f89de add SU3File bulksign CLI 2013-10-28 23:22:17 +00:00
zzz
bd0eee6aa9 * configstats: Page will now always reflect results of a previous
change, by querying the config instead of StatSummarizer to
   determine if a stat is graphed.
  - Don't append to a string in a loop
  - parseConfig() return a Set instead of List to avoid O(n**2) behavior
    when deteriming config changes
2013-10-28 21:48:02 +00:00
5bc13c16dc merge of '40e39576b76cc1261e0eda2c63a052544021f2e3' and '81c0ce21efaae02bbc2b5d3ce4e25b2d315dc2eb' 2013-10-28 20:09:57 +00:00
626daeb86e * I2PTunnel: Enable persistent keying for SOCKS tunnels (ticket #1088) 2013-10-28 19:15:46 +00:00
zzz
a92913da4c * Streaming:
- Ensure minimum randomized initial conn throttle period
   - Change order of throttle checks again
   - Don't continue throttle checks if throttled
2013-10-28 17:59:50 +00:00
zzz
f0f363e8c3 * Streaming: Fix instantiation failure with blacklist entries,
caused by bad fix for ticket #1070
2013-10-27 17:09:29 +00:00
zzz
7839c0fec3 * Tunnels:
- Don't use fallback expl. tunnels as the paired tunnel
     for a client tunnel build.
     This will cause more client tunnel breakage but it's
     really bad to use a zero-hop for this.
   - Fix selection of an expl. tunnel close to a hash
   - Don't update build generation stat if the generation failed
   - log tweaks
2013-10-26 20:52:56 +00:00
zzz
4d24d65c1f * Profiles: Ensure we select random peers even before the first reorganization -
we were picking the not-failing peers in-order for early expl. tunnel builds
2013-10-26 20:47:41 +00:00
zzz
ddf761b1f8 * Streaming: Randomize end of first conn limit period
to prevent correlation
2013-10-26 20:45:30 +00:00
zzz
2814fe75b1 sort custom options 2013-10-26 20:44:19 +00:00
zzz
7316c82ef3 * i2psnark: Display base name, not torrent file name (ticket #985) 2013-10-26 20:42:16 +00:00
zzz
e04646bd37 finals 2013-10-26 14:21:53 +00:00
zzz
8f8022347d * I2PTunnel HTTPServer:
New POST limiter
2013-10-26 14:21:26 +00:00
acc0ab66a3 My RSA 4096 pubkey for update signing 2013-10-26 11:25:07 +00:00
zzz
5a6acf1d85 * Router: Only log pingfile error once (ticket #1086) 2013-10-25 19:55:09 +00:00
zzz
ca45194c30 * Streaming:
- Check blacklist/whitelist before connection limits, so
     a blacklisted peer does not increment the counters
   - Don't increment total throttle if peer is throttled
   - Fix blacklist NPE after config change (ticket #1070)
2013-10-25 14:09:02 +00:00
zzz
102506ebe8 * Transports: Reduce connection idle time sooner 2013-10-25 14:05:50 +00:00
zzz
d06f1c4a30 /confighome: Remove config when restoring default so user will again see changes from updates 2013-10-24 21:46:03 +00:00
zzz
c732c1c038 I2PTunnel: Catch unchecked exceptions in server accept loop (ticket #1070) 2013-10-24 20:56:37 +00:00
zzz
4aa1bba575 * NetDB:
- We don't verify RI stores any more, so save RI-last-published time when we store it.
2013-10-24 20:54:21 +00:00
zzz
9d3925eb20 * i2psnark:
- Drop incoming connections on HTTP port
   - Define port 6881 in one place
   - Don't let random DHT port be 6881
   - Exception tweak
2013-10-24 20:52:37 +00:00
zzz
80fdf4e917 * I2PTunnel - fix anonymity characterization in dropdowns
(2 hops is not high anonymity)
2013-10-24 19:18:53 +00:00
zzz
35a86e603b * I2PTunnel standard, HTTP, and IRC servers:
Route connections to specific targets based on incoming I2P port
   with custom option targetForPort.xxxx=myserver:yyyy
   This allows multiple services on a single server tunnel (ticket #1066)
2013-10-24 11:38:28 +00:00
zzz
8f7b31aed3 * I2PTunnel standard and IRC clients:
- Allow host:port targets; set defaults in i2ptunnel.config (ticket #1066)
   - Don't fail start if hostname is unresolvable; retry at connect time (ticket #946)
   - Output IRC message on connect fail
   - Update target list on-the-fly when configuration changes
2013-10-23 20:20:54 +00:00
zzz
0f5a0b6b1b * NetDB:
- Increase RI publish interval to reduce the connection load on ffs
   - Save RI-last-published time; check it before publishing
   - Minor cleanups
2013-10-23 14:56:27 +00:00
zzz
4cf3906ed2 * Home page:
- Add salt.i2p. Icon from efkt, free to use.
   - Change icon for stats.i2p. Icon from Fat Cow, see license info in LICENSES.txt
2013-10-23 12:41:36 +00:00
zzz
57875586cf reduce same-country bonus, less countries 2013-10-19 22:10:03 +00:00
zzz
ad8ec011d0 more transport categories 2013-10-19 22:09:23 +00:00
zzz
0d93b86a56 sfv mime type 2013-10-19 22:09:07 +00:00
zzz
63712002e2 merge of '4eee3780cfb882747ad68e39ac08b721f91c48a7'
and 'cca89ae05036ab7a2fe0080fdd1cfac19968246a'
2013-10-19 21:27:59 +00:00
zzz
67af1a17c1 - Don't display UPnP info on peers page in Android
to prevent crash
2013-10-19 21:26:23 +00:00
zzz
9cac546547 add IPv6 categories to /netdb transport chart 2013-10-19 16:37:13 +00:00
zzz
3ffb321f46 * NetDB: Reinstate ExpireRoutersJob 2013-10-19 14:51:11 +00:00
zzz
14ea6d8d0a delay multiple ExploreJobs slightly 2013-10-19 14:47:27 +00:00
zzz
8e0dbf31ba * NetDB (ticket #1076)
- Reduce flood redundancy from 4 to 3
   - Reduce min part. tunnels for ff from 100 to 50
2013-10-19 14:45:52 +00:00
zzz
5187bf1eae * I2PTunnelHTTPServer: Start timer before reading the first line (ticket #1071) 2013-10-19 14:40:34 +00:00
zzz
99471d8e1b css tweak to fix i2ptunnel ssl box layout on firefox 2013-10-19 14:37:28 +00:00
zzz
012e999354 fix unit tests broken by previous checkin 2013-10-18 19:58:39 +00:00
zzz
bdd9900d0d * OutNetMessage: Remove setters, make fields final 2013-10-18 18:42:48 +00:00
zzz
c71b485083 mark ipv6 only as experimental on /confignet 2013-10-18 18:38:39 +00:00
zzz
a78d34ab4b * I2PTunnel SSL cleanup, log SSL exceptions as errors to help find cert problems 2013-10-18 18:37:25 +00:00
zzz
255ebe7efb * Streaming: Throw IOE if socket is closed (ticket #1077),
never return null from stream getters
2013-10-17 13:39:00 +00:00
zzz
5f7a761e42 * I2CP: Move SSL client socket code to util,
move cert location to certificates/i2cp.
 * I2PTunnel: Support SSL for connection to local server
   for Standard, HTTP, and IRC server tunnels.
   Put server cert in certificates/i2ptunnel if necessary.
2013-10-17 13:22:17 +00:00
zzz
09548358fa increase translate initial map size, clear on exit 2013-10-17 11:17:58 +00:00
zzz
df381c37ff 3gp mime type 2013-10-17 11:15:20 +00:00
31e96b416d Update Trac links: s|http://trac\.i2p2\.de|https://trac.i2p2.de|g 2013-10-16 23:12:11 +00:00
53b0f7b579 french updates 2013-10-16 23:11:06 +00:00
zzz
45deaa3a87 * open4you icon and text
from hosting@mail.i2p
   image free to use
2013-10-14 20:06:57 +00:00
zzz
0c8eabcdf6 merge of '2bb222d33ec817b78fcf506c32da44d10b1eff3b'
and '59e86e3176465259a67927b042c1307cd0a94aa4'
2013-10-14 17:10:55 +00:00
zzz
f9571740ae address check cleanup 2013-10-14 17:02:08 +00:00
zzz
eb2af2b5fd * ClientManager: Remove setters, make all fields final 2013-10-14 17:01:32 +00:00
zzz
ded00300b4 javadoc fixes 2013-10-14 17:00:14 +00:00
zzz
811819af69 * Tests:
- Fix LogSettingsTest broken by recent LogManager changes
   - Remove empty LogSettings.java
2013-10-14 16:58:50 +00:00
1804c852bb French language translation updates from Transifex 2013-10-14 15:43:39 +00:00
zzz
3ec602865d * Translations: Move country names to a new resource bundle 2013-10-14 15:29:12 +00:00
zzz
0c0a25b038 merge of 'ad0ab5020bb253c5233ac2f036c0cf4f40001d51'
and 'bc7c0fa32e955a7d8185456815652d4baab500ae'
2013-10-13 19:38:48 +00:00
zzz
208192f445 * I2CP: Fix bug in handling external I2CP clients, introduced in -2
by the immutable destination patch
2013-10-13 19:33:04 +00:00
d0f635e30c ticket #1062 - count duplicate packets towards RTT if we have
never sampled it
2013-10-13 17:05:59 +00:00
zzz
20b2f7dcb1 fix date, restore tunnel length changed in previous checkin 2013-10-13 12:03:57 +00:00
zzz
cf66951818 cleanup after prop, history for prop, -2 2013-10-13 11:55:23 +00:00
zzz
c6f41cc8fa crypto cleanup 2013-10-13 11:53:43 +00:00
zzz
45a579403a propagate from branch 'i2p.i2p.zzz.test2' (head 5c1b78bd78845b0c8b90fbb60412c68e7dc4f3e6)
to branch 'i2p.i2p' (head 8bdc25c8e6f40491f20b533d94eacab012adba35)
2013-10-13 11:48:12 +00:00
zzz
74a57abfb4 Streaming:
- Make I2PSocketFull.close() nonblocking; it will now cause any user-side
     writes blocked in I/O (Connection.packetSendChoke()) to throw
     an exception (tickets #629, #1041)
   - Don't ignore InterruptedExceptions; throw InterruptedIOException
   - Back out static disconnect exception
   - MessageInputStream locking fixes
   - Cleanups
 I2PSnark:
   - Close socket before closing output stream to avoid blocking in
     Peer.disconnect(), and prevent Peer.disconnect() loop
2013-10-12 17:39:49 +00:00
zzz
380783c1ba Snark DHT:
- Combine getPeers and announce into a single method, as we must announce to
     the closest from the getPeers, not the closest from the kbuckets
   - Stop getPeers when nothing closer is found
2013-10-09 21:09:34 +00:00
c8843a736d make _ackSinceCongestion atomic 2013-10-09 14:08:44 +00:00
e69fefda62 cleanup: remove boolean parameter that is always true 2013-10-09 14:06:16 +00:00
513da3b743 cleanup: remove no-op invocation 2013-10-09 14:04:34 +00:00
zzz
7513d42e9e Snark DHT:
- Increase dest lookup and search timeouts
   - Increase max search depth
   - Loop tracker client faster when in magnet mode
   - Loop tracker client faster if DHT announce fails
   - Don't return an empty peers list if we only know about the requestor
   - volatiles, log tweaks
   - Major fixes of getPeers() to follow
2013-10-09 13:06:47 +00:00
zzz
8872437caf Another snark refactoring bug, log tweaks 2013-10-08 01:17:36 +00:00
712c77a4b6 add my "su3" certificate 2013-10-08 00:17:41 +00:00
zzz
38cef14cf4 synch cleanup thx zab 2013-10-07 19:26:33 +00:00
zzz
05c3b0d391 Fix bug causing writes past end of file, introduced in refactoring, not in trunk 2013-10-07 15:47:44 +00:00
zzz
854090e9d8 - Console: Set per-connector acceptors back to 1, Jetty default changed to 2? 2013-10-07 14:51:49 +00:00
zzz
f035815f7a - Don't truncate initial news header if it appears in summary bar
(unlikely as we don't show the "hide news" button for initial news)
     Also prevent string IOOBE
2013-10-07 14:45:11 +00:00
zzz
df4302dda0 * Update:
- Thread news fetcher so it doesn't clog the scheduler
2013-10-07 14:43:18 +00:00
zzz
31f117e74c * Data Structures:
- Make Destination and RouterIdentity keys and cert immutable
   - Add Destination cache
2013-10-07 13:04:01 +00:00
zzz
890f40b2ac more log tweaks 2013-10-07 12:11:42 +00:00
zzz
3ac8083faf log tweaks 2013-10-07 12:10:10 +00:00
zzz
249319f76f * Disallow 2001:db8::/32 (RFC 3849) addresses 2013-10-07 11:22:54 +00:00
zzz
efe87060b4 add missing start.jar thx kytv 2013-10-06 22:55:59 +00:00
zzz
afe3ff57cf history for prop, -1 2013-10-06 17:13:29 +00:00
zzz
6bb1505d3b propagate from branch 'i2p.i2p.zzz.ecdsa' (head 1dd9522809f801ca68dd331cfba1c5c914dc1481)
to branch 'i2p.i2p' (head a1c2ba4663abc7470f427c6a14854707d58b486a)


 Prop from branch i2p.i2p.zzz.ecdsa:
 * Build:
   - Generate su3 file in release target
   - Add zzz's new RSA 4096 pubkey cert for updates
   - Fix checkcerts.sh
 * Console: Move advanced setting to HelperBase
 * DSAEngine changes:
   - Implement raw sign/verify for other SigTypes
   - Add sign/verify methods using Java keys
 * ECDSA Support:
   - Add ECConstants which looks for named curves and falls back to
     explicitly defining the curves
   - Add support for ECDSA to SigType, DSAEngine and KeyGenerator
   - Attempt to add BC as a Provider
   - genSpec: fallback to BC provider
 * EepGet:
   - Fix non-proxied PartialEepGet
   - Prevent non-proxied eepget for an I2P host
 * KeyGenerator changes:
   - Generate key pairs for all supported SigTypes
   - KeyPairGen: Catch ProviderException, fallback to BC provider
   - Add KeyGenerator main() tests
 * KeyRing and DirKeyRing added: simple backend for storing X.509 certs
 * KeyStoreUtil added:
   - Consolidate KeyStore code from SSLEepGet, I2CPSSLSocketFactory,
     SSLClientListenerRunner, and RouterConsoleRunner into new
     KeyStoreUtil and CertUtil classes in net.i2p.crypto (ticket #744)
   - Change default to RSA 2048 (ticket #1017)
   - Set file modes on written keys
   - Overwrite check in createKeys()
   - New getCert(), getKey()
   - Extend keygen max wait
   - Read back private key to verify after keygen
   - Validate cert after reading from file
   - Validate CN in cert
   - Specify cert signature algorithm when generating keys
 * NativeBigInteger: Tweak to prevent early context instantiation
 * RSA support added: constants, parameters, sig types, support in DSAEngine, KeyGenerator, SigUtil
 * SHA1Hash: Add no-arg constructor
 * SigType changes:
   - Add parameters (curve specs) to SigTypes
   - Add getHashInstance()
   - Add RSA, fix ECDSA
   - Renumber, rename, comment out types that are too short.
 * SigUtil added:
   - Converters from Java formats (ASN.1, X.509, PKCS#8)
     to I2P formats for Signatures and SigningKeys
   - Move ASN.1 converter from DSAEngine to SigUtil, generalize
     for variable length, add support for longer sequences,
     add more sanity checks, add more exceptions
   - Move I2P-to-Java DSA key conversion from DSAEngine to SigUtil
   - Add Java-to-I2P DSA key conversion
   - Add Java key import
   - New split() and combine() methods
 * SSLEepGet: Move all certificates to certificates/ssl, in preparation
   for other certificate uses by SU3File
 * SU3File changes:
   - Support all SigTypes
   - Implement keygen
   - Readahead to get sigtype on verify, as we need the hash type
   - Enum for content type
   - Add unknown content type, make default
   - Fix NPE if private key not found or sign fails
   - Store generated keys in keystore, and get private key from keystore
     for signing, in Java format
   - Use Java keys to sign and verify so we don't
     lose the key parameters in the conversion to I2P keys
   - Type checking of Java private key vs. type when signing
   - Use certs instead of public keys for verification
   - Fix arg processing
   - Improve validate-without-extract
   - New extract command
   - Change static fields to avoid early context init
   - Reduce PRNG buffer size for faster signing
 * Update: Preliminary work for su3 router updates:
   - New ROUTER_SIGNED_SU3 UpdateType
   - Add support for torrent and HTTP
   - Refactor UpdateRunners to return actual UpdateType
   - Deal with signed/su3 conflicts
   - Verify and extract su3 files.
   - Stub out support for clearnet su3 updating
   - New config for proxying news, separate from proxying update
   - PartialEepGet and SSLEepGet tweaks to support clearnet update
   - Remove proxy, key, and url config from /configupdate
   - More URI checks in UpdateRunner
   - Add https support for news fetch
   - Add su3 mime type
   - Reset found version in update loop so we don't fetch from
     the next host too.
   - Prevent NPE on version after SSL fetch
2013-10-06 17:09:56 +00:00
zzz
a1c8e3eae3 reduce search limit 2013-10-06 17:08:51 +00:00
zzz
aa171bbaa6 less scary message 2013-10-06 17:07:56 +00:00
zzz
845b70fe0c add missing sidebar 2013-10-06 17:07:27 +00:00
zzz
82b1eb7c18 * Update:
- Check proxy setting before calling runner for method
2013-10-06 16:39:30 +00:00
zzz
4bd27ea1d3 * Update:
- Reset found version in update loop so we don't fetch from
     the next host too.
   - Prevent NPE on version after SSL fetch
   - Fix su3 version check
 * EepGet:
   - Fix non-proxied PartialEepGet
   - Prevent non-proxied eepget for an I2P host
   - Fail if no hostname in URL
2013-10-06 16:02:33 +00:00
zzz
d0f6be3161 fix cert dir 2013-10-06 01:15:40 +00:00
zzz
7764257e41 more synching for coherence 2013-10-06 00:43:12 +00:00
zzz
af0e72ac4d * SSU: More efficient ImboundMessageState
(reduce ByteArray[] size where possible)
2013-10-05 18:38:55 +00:00
zzz
0534440695 - Treat 6bone 3ffe::/16 as local 2013-10-05 14:04:40 +00:00
zzz
c2fa2d0c5b * Logging:
- Require strict match of class name component
   - parseLimits() cleanup
2013-10-05 13:07:33 +00:00
zzz
887017b54c * Transport: Treat more IPs as local
25/8 - Hamachi (moved from 5/8 Nov. 2012)
   2620:9b::/32 - Hamachi
   0::/8 - Includes IPv4 compatibility addresses ::xxxx:xxxx
2013-10-05 12:56:39 +00:00
zzz
3a4f5a2f1b jetty 7.6.13.v20130916 2013-10-04 23:43:38 +00:00
zzz
3fb4643742 - Add https support for news fetch 2013-10-04 20:28:43 +00:00
zzz
a5e3bc9b85 Update:
- New config for proxying news, separate from proxying update
 - Default logic cleanup
2013-10-04 20:21:54 +00:00
zzz
8a0c3f10f4 Update:
- Stub out support for clearnet su3 updating
 - PartialEepGet and SSLEepGet tweaks to support clearnet update
 - Remove proxy, key, and url config from /configupdate
 - More URI checks in UpdateRunner
 - Add su3 mime type
 - Move advanced setting to HelperBase
2013-10-04 19:06:39 +00:00
zzz
e1d808a284 add msg when stopping tunnel on idle 2013-10-04 16:50:37 +00:00
zzz
e755051ebe * i2psnark:
- Add torrent auto-stop support; enable for update file
   - Add tunnel auto-close when no torrents are running
   - Log/msg tweaks on add/create failures
2013-10-04 16:40:14 +00:00
zzz
d7c3ffa4de 0.9.8.1 2013-10-02 14:14:18 +00:00
zzz
cba3b249dd * Startup: Fix rekeying on Windows (tickets #1056, 1057) 2013-10-01 14:22:17 +00:00
zzz
32f250003e NBI: Tweak to prevent early context instantiation 2013-09-30 19:25:21 +00:00
zzz
e004b0e6e9 Build:
- Generate su3 file in release target
  - Add my new RSA 4096 pubkey cert for updates
  - Fix checkcerts.sh
2013-09-30 19:21:25 +00:00
zzz
a5c5917a5f add key length to RSA SigType names 2013-09-30 17:13:35 +00:00
cbd24946b6 refresh patch, en po 2013-09-30 16:33:01 +00:00
zzz
9b4842931a 0.9.8 2013-09-30 12:57:13 +00:00
zzz
e04cf132cc HTTPServer: Log tweak for better diagnosis of delays 2013-09-29 16:40:50 +00:00
zzz
7d237b4cf6 Watchdog: Format messages better 2013-09-29 16:38:57 +00:00
zzz
3cbfd09722 Console: Tag strings on /jobs (ticket #969) 2013-09-29 16:36:32 +00:00
zzz
0ae774dd68 bump for review 2013-09-28 12:00:20 +00:00
zzz
2884df873e * Streaming: Major rework of connection disconnect process. Tickets 1040-1042.
- Prevent multiple calls or reentrancy in disconnect() (ticket #1041)
   - Implement processing of close to skip TIME-WAIT, and
     wait for all packets to be acked (not just the CLOSE) before
     doing so, if possible (ticket #1042)
   - Don't call disconnect() or disconnectComplete() from I2PSocketFull.destroy()
     so retransmissions and acks can still happen (removes some close loops)
   - Don't call disconnect() until we have both sent and received a CLOSE (ticket #1040)
   - Don't reset the connection from CPH just because we sent a CLOSE
     and it was acked (ticket #1040)
   - Ack packets even if we sent a CLOSE  (ticket #1040)
   - Retransmit CLOSE if not acked (ticket #1040)
   - Send received packets to the MessageInputStream even if we haven't received a SYN
   - Don't call MessageInputStream.messageReceived() for ack-only packets, that was pointless
   - Don't send a RESET after timeout of an outbound connection
   - Work around bugs on other end by limiting retransmission of CLOSE packets
   - Make _isInbound final
   - More cleanups, javadocs, log tweaks
2013-09-28 11:47:47 +00:00
d4d1424c4f update debian changelog 2013-09-27 20:15:02 +00:00
33827f9aaf switch from elipsis to three "."s 2013-09-27 20:14:36 +00:00
zzz
30a666c833 Streaming: Don't queue a message for an unknown connection on the SYN queue
if it has a send ID set, it must be for a recently closed connection
2013-09-27 01:50:38 +00:00
zzz
9a00621fa4 log tweaks 2013-09-27 01:48:12 +00:00
46bc479884 update geoip based on Maxmind GeoLite Country database from 2013-09-03 2013-09-26 21:47:53 +00:00
6ab6abf4dd French, German, Russian, and Swedish translation updates from Transifex 2013-09-26 21:47:06 +00:00
zzz
0c6a9ff2a0 proof delimiter tweak 2013-09-25 23:13:42 +00:00
zzz
aefc5b5317 javadoc fix 2013-09-25 17:42:37 +00:00
zzz
25682fdea7 log tweaks, javadoc 2013-09-25 17:42:13 +00:00
zzz
9318099845 * Streaming:
- Cleanups
   - Remove setCloseReceivedOn(), unused outside Connection
   - OR the isFlagSet parameter instead of multiple calls
   - Remove acked packets from _outboundPackets inside synced iterator
   - Short-circuit _outboundPackets iterator if empty
   - Small optimization if not logging in ConnectionPacketHandler
   - Stub out processing of close ack (ticket #1042)
2013-09-24 16:01:20 +00:00
zzz
fdf38a952d atomic default value cleanup 2013-09-24 14:45:30 +00:00
zzz
fb40ab1f00 * Streaming: Atomics for close/reset send/receive
so we only do things once. (Ticket #1041)
2013-09-24 14:01:48 +00:00
zzz
3499ed7bb0 * Streaming: Consolidate scheduling of DisconnectEvent, and ensure
we only do it once. (Ticket #1041)
2013-09-24 13:22:46 +00:00
zzz
b05906a3c2 SigType: Renumber, comment out all the types that are
too short or for testing. Turn off debug logging.
2013-09-24 12:55:22 +00:00
zzz
61d5f46295 * Streaming: Fix active stream counting so it doesn't count streams
that are closed and in TIME-WAIT state. Also, break out of the
   counting loop as soon as we know the answer. (Ticket #1039)
2013-09-24 12:40:35 +00:00
zzz
9ebfccd8f6 * Console: Add /proof page which can copied to prove you run a router 2013-09-23 16:39:40 +00:00
zzz
4fb3e86e4d Truncate and linkify magnet link in summary bar update message 2013-09-23 12:13:44 +00:00
zzz
837517e94e Update: Verify and extract su3 files.
untested...
2013-09-22 19:19:36 +00:00
zzz
f47ec65b8f Update: Preliminary work for su3 router updates:
- new ROUTER_SIGNED_SU3 UpdateType
   - Add support for torrent and HTTP
   - Refactor UpdateRunners to return actual UpdateType
   - Deal with signed/su3 conflicts
   - unpack/verify stubbed only
2013-09-22 18:03:56 +00:00
zzz
6fede7f524 log tweaks 2013-09-22 14:13:50 +00:00
zzz
bd0c18b2e3 * Console: Implement webapp state detection and stop button for webapps
on /configclients (Ticket #1025)
2013-09-21 16:11:55 +00:00
zzz
fba596c78c geoipv6 Sept 19 2013 from Maxmind 2013-09-21 12:30:06 +00:00
61f2b49022 another extraneous script name 2013-09-20 23:09:27 +00:00
e71a1a5c4d remove extraneous script name 2013-09-20 23:07:11 +00:00
683ce3254f testscripts build target: check shell scripts for validity
(also adding missing shebang lines)
2013-09-20 22:32:05 +00:00
df555731c4 minor script changes
- mbuild.sh: don't require bash
- Slackware/i2p/doinst.sh: add bash shebang
2013-09-20 22:17:48 +00:00
641fc0cae9 fix langbox alignment, bump build number 2013-09-20 21:06:57 +00:00
5ab1d6896a jbigi scripts: look in /usr/local (for *BSD) 2013-09-20 19:39:25 +00:00
zzz
0ae2d92fcd * Update: Support notification of updates that cannot be downloaded
due to "constraints". Add constraint checks for java version,
   router version, configuration, and base permissions. (ticket #1024)
2013-09-20 18:56:54 +00:00
zzz
26c8201e03 spellcheck off 2013-09-20 18:42:51 +00:00
37521c69a2 look for openjdk6 in OpenBSD if v7 isn't available 2013-09-20 18:33:11 +00:00
43383a5b3c changes to fix compilation on OpenBSD 2013-09-20 10:44:56 +00:00
bfea3e4dd6 translation updates from Transifex 2013-09-20 10:43:13 +00:00
35b02a52e1 redirect output of which command to /dev/null 2013-09-20 02:00:41 +00:00
8e3e566915 typo fix 2013-09-20 01:45:09 +00:00
968b9a0304 fix previous check-in 2013-09-20 01:38:20 +00:00
c97f0f3d22 OpenBSD compilation fix: set JAVAC in bundle targets if javac not found and require.gettext is set to true
This solves the following problem which was found on OpenBSD:

bundle:
     [exec] Generating net.i2p.desktopgui.messages_ar ResourceBundle...
     [exec] ERROR - msgfmt failed on locale/messages_ar.po, not updating translations
     [exec] msgfmt: Java compiler not found, try installing gcj or set $JAVAC
     [exec] msgfmt: compilation of Java class failed, please try --verbose or set $JAVAC
     [exec] 9 translated messages.


In OpenBSD 5.4, neither java nor javac are in the PATH.
2013-09-20 01:21:43 +00:00
65b1124d81 various updates to i2prouter
- check status of i2psvc with ldd
- only warn about libiconv in FreeBSD if the package isn't installed. In recent
  versions of FreeBSD, OpenJDK depends on libiconv so it should always be
  available.
2013-09-19 20:56:56 +00:00
zzz
89034e1f9d SU3File:
- Fix arg processing again
   - Change static fields to avoid early context init
   - Reduce PRNG buffer size for faster signing
2013-09-19 15:21:53 +00:00
zzz
9f2fa6a8be fix arg processing 2013-09-19 13:59:39 +00:00
zzz
19cf8787d8 - Allow getRawAlgo() for public keys
- SU3File better arg processing, implement content type arg
   - Type checking of Java private key vs. type when signing
   - Add unknown content type, make default
2013-09-18 16:53:38 +00:00
zzz
a80c34c1df * i2psnark:
- Refactor Storage file data structures
   - Sort files when creating torrents
2013-09-18 15:41:10 +00:00
zzz
ab8900f910 * I2PTunnelHTTPServer: Don't thread a receiver for GET or HEAD 2013-09-18 15:39:12 +00:00
zzz
ce2d0b0e12 - Revert expl. default back to 2 hops, wait for next release
- Eepsite index.html better help on redirects
   - Remove exotrack (again)
2013-09-17 13:53:20 +00:00
zzz
87d98781a9 Read back private key to verify after keygen
Validate cert after reading from file
   Validate CN in cert
   Javadoc fixes
2013-09-16 15:48:54 +00:00
zzz
79dc95dd66 Fix RSA_SHA384
Fix DSAEngine for RSA
   Fix KeyGenerator for RSA
   New split() and combine() methods in SigUtil
   Fix private key conversions for RSA
2013-09-15 16:49:59 +00:00
zzz
c6533202f7 Add RSAConstants
Specify RSA parameters
  Add RSA sig types
  Specify cert signature algorithm when generating keys
  Extend keygen max wait
  Catch NPE if sign fails in SU3File
  Fix signature conversion for RSA
  Fix public key conversion for RSA
2013-09-15 15:12:07 +00:00
zzz
b5dc9bc0ba DSAEngine: Add sign/verify methods using Java keys
SU3File: Use Java keys to sign and verify so we don't
           lose the key parameters in the conversion to I2P keys
2013-09-14 15:53:08 +00:00
zzz
79891c6677 open4you.i2p 2013-09-14 15:28:36 +00:00
zzz
68aa1aea8e stub out RSA 2013-09-13 15:26:38 +00:00
zzz
4ffaf4128e SU3File:
- enum for content type
  - fix NPE if private key not found
  - use certs instead of public keys for verification
  - improve validate-without-extract
  - new extract command
2013-09-13 13:02:37 +00:00
zzz
801ca47a0c add Koblitz curves for testing 2013-09-13 00:49:10 +00:00
zzz
43f5062169 SSLEepGet: Move all certificates to certificates/ssl, in preparation
for other certificate uses by SU3File
2013-09-12 21:47:25 +00:00
zzz
7ab4dd7f4b KeyStoreUtil:
- Overwrite check in createKeys()
  - New getCert(), getKey()
  SU3File:
  - Store generated keys in keystore
  - Get private key for signing from keystore
2013-09-12 20:22:30 +00:00
zzz
71c0104236 Add base algorithm type in prep for RSA 2013-09-12 18:23:28 +00:00
zzz
a608d21571 KeyStore: change keygen default to RSA 2048 (ticket #1017)
fix key length setting
2013-09-12 14:55:16 +00:00
zzz
935ddaa0b2 fix default expiration 2013-09-12 14:41:25 +00:00
zzz
945e7b75fd Crypto - prep for using certificates in SU3File:
Consolidate KeyStore code from SSLEepGet, I2CPSSLSocketFactory,
  SSLClientListenerRunner, and RouterConsoleRunner into new
  KeyStoreUtil and CertUtil classes in net.i2p.crypto (ticket #744)
2013-09-12 14:27:16 +00:00
5e90780590 jbigi/jcpuid build scripts: Look for OpenJDK7 in kFreeBSD (it has landed in Debian testing) 2013-09-11 14:04:58 +00:00
zzz
a8a21ea7ce propagate from branch 'i2p.i2p' (head 6667c4a9f9fcc0705e407006d1933dd31942ffb2)
to branch 'i2p.i2p.zzz.ecdsa' (head bf746450400fc5ffa0e727ed0cd6a3966f6ce51f)
2013-09-10 13:03:40 +00:00
zzz
23444e4b81 * Router: Log new router hash in event log after rekeying 2013-09-10 12:25:24 +00:00
zzz
a3ea1f9429 remove static log 2013-09-10 12:23:45 +00:00
zzz
78d4b6d8a7 - Simple DirKeyRing backend for testing 2013-09-09 19:46:24 +00:00
zzz
3e3399adc6 - Add Java key import to SigUtil
- Import priv key to SU3File in Java encoded format instead of I2P format
  - New KeyRing stub
2013-09-09 00:49:14 +00:00
zzz
1e554dd0fe - Move I2P-to-Java DSA key conversion from DSAEngine to SigUtil
- Add Java-to-I2P DSA key conversion to SigUtil
  - Export keys from SU3File in Java encoded format instead of I2P format
2013-09-08 21:47:48 +00:00
388e7088e1 Updating cert for reseed.info 2013-09-08 16:14:53 +00:00
e65289cd0d Document logCloseLoop() methods 2013-09-08 15:23:09 +00:00
c4d68a8352 minor cleanup 2013-09-08 15:21:25 +00:00
7be0a93251 Use AtomicBoolean to prevent multiple close()-s 2013-09-08 13:18:47 +00:00
175f47293a Ticket #1012 - remove nested locking on close() and
finishInboundEstablishment()
2013-09-08 13:13:14 +00:00
zzz
27936fce04 cache key conversion 2013-09-08 13:06:30 +00:00
592680302f make the logCloseLoop() methods members of the Log class
so they can be used everywhere
2013-09-08 12:55:05 +00:00
zzz
55318cf14b Crypto: Set file modes on written keys; don't overwrite existing files 2013-09-08 11:57:15 +00:00
zzz
83ead0c304 - SU3File: Readahead to get sigtype on verify, as we need the hash type 2013-09-07 20:24:40 +00:00
zzz
38ec55bc72 - DSAEngine: Implement raw ECDSA sign/verify
- SU3File: Implement keygen
2013-09-07 19:37:02 +00:00
zzz
c4f97ed65e - DSAEngine: Start of support for signing hashes with other SigTypes
- KeyGenerator: Measure sign and verify separately in test
 - SU3File: Start to support other SigTypes
 - SigType: Add getHashInstance(), fix hash length for ECDSA_SHA256_P192
 - SHA1Hash: Add no-arg constructor
2013-09-07 18:12:19 +00:00
zzz
78a426e9ac * Crypto: Don't use "short exponent" on faster platforms.
Rebuild router identity if key length doesn't match setting.
   This affects RI and LS encryption keys, and DH and YK.
   Faster = 64 bit with working jbigi, non-ARM, non-GNU (for now)
   Override default with crypto.elGamal.useLongKey=true/false
   LS key is built at client startup (Dest key unused)
   This will churn most of the RIs at the release.
 * SystemVersion: Add isARM()
2013-09-07 13:43:28 +00:00
zzz
928b4bbbe5 - genSpec: fallback to BC provider 2013-09-06 13:53:15 +00:00
zzz
d27c465371 - KeyPairGen: Catch ProviderException, fallback to BC provider 2013-09-06 13:30:47 +00:00
zzz
4d62f63c71 * Start of ECDSA branch:
- Add ECConstants which looks for named curves and falls back to
     explicitly defining the curves
   - Add SigUtil with converters from Java formats (ASN.1, X.509,
     PKCS#8) to I2P formats for Signatures and SigningKeys
   - Move ASN.1 converter from DSAEngine to SigUtil, generalize
     for variable length, add support for longer sequences,
     add more sanity checks, add more exceptions
   - Attempt to add BC as a Provider
   - Add parameters (curve specs) to SigTypes
   - Add support for ECDSA to DSAEngine and KeyGenerator
   - Add KeyGenerator main() tests
   - More javadocs

  All is Java 1.5 compatible but the actual algorithms, curves,
  and other support aren't necessarily present in any JVM.
  Todo: More tests, more fallbacks for various JVMs
2013-09-06 12:04:22 +00:00
zzz
f4039b085a * Crypto: SigType tweaks, prep for parameters, show type in toString()
* NativeBigInteger: Don't use native for negative arguments, which aren't supported in jbigi.c
2013-09-06 11:40:50 +00:00
53ed10cfc8 typo fix (s/lt/le/) 2013-09-04 01:42:12 +00:00
zzz
0859dbe57f * i2ptunnel: Reduce buffer size and use cache in HTTPServer
* Jetty: Increase maxIdleTime
2013-09-04 00:46:43 +00:00
zzz
42bc4bb1f4 reduce log level 2013-09-03 12:13:07 +00:00
zzz
caead8a3a4 consolidate maxMemory() calls 2013-09-03 11:37:36 +00:00
zzz
7394c7997b change pw restart warning to error so people dont miss it 2013-09-03 10:25:18 +00:00
zzz
0298e4ab4c use different sort for floodfill profiles display 2013-09-01 12:12:40 +00:00
zzz
e3a5cdbbc2 deprecate most of LeaseSetKeys 2013-09-01 12:12:05 +00:00
6ae46abac0 fix ticket number 2013-08-31 18:42:07 +00:00
615a5f3c39 update history 2013-08-31 18:40:39 +00:00
6812dc1db8 Ticket #1007 use only non-retransmitted packets in RTT
sampling.  (RFC 6298)
2013-08-31 18:39:29 +00:00
zzz
41595cafce * Addressbook: Don't write to log file on Android (ticket #859) 2013-08-31 15:35:57 +00:00
zzz
d6c4e411be highlight snark table rows on hover 2013-08-31 15:19:00 +00:00
zzz
6ca797ec1f * Console: Display "accepting tunnels" instead of "rejecting tunnels" after 20 minutes (ticket #902) 2013-08-30 12:07:42 +00:00
zzz
8655988c66 * NTCP: Handle race where peer's NTCP address goes away 2013-08-30 12:01:51 +00:00
zzz
de5f2940ce * SSU, confignet: Add support for specifiying multiple addresses 2013-08-30 10:27:22 +00:00
zzz
1933e6239b * SusiDNS: Don't require last subscription to be terminated by newline (ticket #1000) 2013-08-30 10:21:57 +00:00
zzz
8aec1e2eb6 * Addresses: Treat Teredo addresses 2001:0::/32 as local 2013-08-30 10:20:43 +00:00
def30c5903 javadoc update 2013-08-14 20:29:40 +00:00
193f0bbc42 More elegant 2013-08-11 20:21:06 +00:00
b7a3b7bf05 debian: add missing timestamp to changelog 2013-08-11 17:00:26 +00:00
a2bd45fa9b * Translation updates from Transifex
- French, Portugeuse, Russian, Spanish, and Turkish updates from Transifex
   - Start of Romanian translation from Transifex
   - Update English POs for sending to TX
 * Debian: Update changelog
2013-08-11 16:58:19 +00:00
fd297118f9 fix NPE if stats are not enabled 2013-08-11 11:58:51 +00:00
zzz
7171edad24 Jetty 7.6.12.v20130726 2013-08-11 11:28:33 +00:00
zzz
d8466333f3 more snark mime types 2013-08-11 11:26:57 +00:00
zzz
a5e4d586eb dont display jump server msg if we dont know any 2013-08-11 11:26:40 +00:00
28a1c22438 Update Java Service Wrapper to v3.5.20
- Windows: Self-compiled with VS2010 in Windows 7. The icon has been
      changed from Tanuki's default to Itoopie.
    - Linux ARMv6: Compiled on a RaspberryPi using gcc 4.6.3-14+rpi1,
      Icedtea6 6b27-1.12.5-1+rpi1 and stripped
    - All other binaries are from the "community edition" deltapack offered by
      Tanuki.
2013-08-11 01:26:19 +00:00
74e238322d bump version for testing 2013-08-10 21:53:47 +00:00
1f3227409b Reduce initial ack delay to 1000
Rework the logic for acking duplicate packets
2013-08-10 21:03:05 +00:00
afda1da9c3 volatile 2013-08-10 21:00:09 +00:00
zzz
f2857e8f97 bump after prop 2013-08-10 17:16:50 +00:00
zzz
4802b1e2cd propagate from branch 'i2p.i2p.0971' (head 6cb629b61e0177deda1e539b2f85a2473f3af7fb)
to branch 'i2p.i2p' (head 8e86ef70afbbbbdc2db06cec34f17dedd528c7e7)
2013-08-10 17:06:17 +00:00
zzz
0328304f04 dont specify i2p.i2p branch so we can release from a different branch 2013-08-10 16:23:23 +00:00
zzz
06d2db0046 0.9.7.1 2013-08-10 16:00:46 +00:00
0539610219 volatile 2013-08-09 21:06:39 +00:00
zzz
170be8f033 Extend IB tunnel expiration
applied changes from 2f2fc980d396aa295ce972afc4298e8f2e763fea
             through c2bc3b29484ec8a689c72f2ab4e823a2a72f6430

New update hosts, thx Meeh and dg
2013-08-08 22:13:38 +00:00
zzz
ca0bb1ab76 Plucks from trunk for 0.9.7.1:
Streaming RTO changes:
 apps/streaming/java/src/net/i2p/client/streaming/ConnectionOptions.java
 apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java
 apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptionsImpl.java

new reseed:
 applied changes from dbfea0ca35dbf9df85b5703db6f97a9579beb364
             through 325a9ed6f0f47eeabb33710073edf973671c63c9

disable RI verifies:
 applied changes from 4ef48b93946923e3371ab62719a474d869520697
             through a77990850b3534101571c88db4704676645914df

i2prouter bashism fix:
 applied changes from b5a0148f96728466561ece9be0e50ac9ad3f1468
             through e301d0499f4c688ed3a5febe30bf8098c7f2cdf9

i2psnark increase max piece size, mime type updates:
 apps/i2psnark/java/src/org/klomp/snark/Storage.java
 apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
 apps/i2psnark/mime.properties

UPnP fix:
 applied changes from 3d4a5cd3d933f75fdff7696f560c569f4674bd73
             through 75e5f5d4e0f0dd44140908bb6e73830e3448bdde
2013-08-08 12:07:16 +00:00
zzz
cdccb51456 * Start of 0.9.7.1 branch
* i2psnark: Increase update-via-torrent to 30%
2013-08-07 17:36:55 +00:00
870ecb847f Updated Eclipse files 2013-08-04 00:02:22 +00:00
8ba493c60e debian: compress package with xz
All currently supported distros support this format.
2013-08-01 23:29:34 +00:00
f3affff5be Atomic 2013-07-31 16:01:26 +00:00
zzz
5941a52a0d * Tunnels: Extend local expiration of IB tunnels, to allow for
more clock skew and not drop valid messages at their destination
2013-07-30 22:10:02 +00:00
zzz
04e6beb43c javadoc, log, comment, and su3file help tweaks 2013-07-30 22:05:46 +00:00
zzz
1284c7ace0 * i2psnark: Increase max piece size to 4 MB (ticket #993) 2013-07-30 21:50:07 +00:00
63414f0348 Override prepareOutbound() in VerifiedEstablishState 2013-07-30 17:13:34 +00:00
c8f22fdfd0 Adding new reseed host. Thanks to isdf! 2013-07-29 23:01:04 +00:00
zzz
7737bf5212 * GeoIPv6: Fix NPE (ticket #992) 2013-07-29 14:02:08 +00:00
zzz
4340f70d72 * Signatures:
- Prep for new signature algorithms; new SigType enum;
     Signature, SigningPublicKey, SigningPrivateKey store type
   - New Hash384 and Hash512 classes
   - Remove length field in SimpleDataStructure
   - New SU3File generator/verifier/extractor
2013-07-29 13:49:05 +00:00
zzz
6dbd8a6d1a add mobi mime type 2013-07-28 13:21:01 +00:00
zzz
076871fe44 * NetDB: Disable RI verifies for now 2013-07-28 13:02:12 +00:00
zzz
be753d7a1a * Addresses: Treat RFC 4193 addresses fc00::/7 as local 2013-07-28 12:52:41 +00:00
zzz
e3f02553fd javadoc 2013-07-28 12:52:10 +00:00
zzz
767ef8c489 add webm mime type 2013-07-28 12:52:00 +00:00
zzz
482787fbc3 * Transports:
- Really fix IPv6-only option
   - Treat RFC 4193 addresses fc00::/7 as local
   - Log tweaks, javadocs
2013-07-26 22:39:35 +00:00
b2d72f90ce merge of '5ad8235a14f2f52799755969e5c877f4f1c159cc'
and 'f5d75b2ebc648c43182d685f30e96242e43caa69'
2013-07-25 20:08:31 +00:00
dd181a90e1 Fix NPE when cancelling PacketLocal's 2013-07-25 20:07:12 +00:00
zzz
19faa352e3 * Transports:
- Prefer IPv6 by default
   - Fix IPv6-only option
   - Don't try NTCP IPv6 addresses unless we have one
   - Fix non-%16 SSU padding in data and session confirmed packets; enable by default
   - Log tweaks
2013-07-25 18:52:45 +00:00
zzz
ffda7f6326 * Tunnels:
- Make expl. default 3 hops  (ticket #966)
   - Allow expl. fallback up to -2 hops
2013-07-25 18:49:22 +00:00
zzz
8ebacf4c10 log tweak 2013-07-25 18:47:47 +00:00
zzz
a02cc25844 UPnP Fix for devices that return base URLs with trailing '/' (ticket #986) 2013-07-24 18:03:50 +00:00
zzz
8aeca5b433 catch NPE in main when no state table available 2013-07-24 14:24:29 +00:00
zzz
7b4855d7cf * UPnP: main() tweaks for debugging 2013-07-24 12:38:15 +00:00
zzz
803d7ff282 * GeoIP: Fix lookups, broken in IPv6 branch 2013-07-24 12:36:36 +00:00
a1c724f866 reduce initialRTO to 9000 2013-07-23 14:18:51 +00:00
96609e9173 change default loglevel for duplicate close()s to INFO 2013-07-23 14:17:26 +00:00
zzz
f5518739e2 javadoc fixes 2013-07-23 00:49:37 +00:00
zzz
e7c8d28b99 * HashComparator:
- Don't pollute Hash cache with hashes
   - cleanups, less object churn
2013-07-22 23:07:37 +00:00
zzz
dff357a658 unit test compile fix 2013-07-22 15:14:58 +00:00
zzz
cc271de7df * BuildReplyHandler:
- Make non-static
   - Don't pollute Hash cache with build response record hashes
   - Use SimpleByteCache
   - cleanups
2013-07-22 14:25:30 +00:00
zzz
a7485ab5a3 * I2CP:
- Oops, must enforce property length limits even when inside router JVM
     as the properties are serialized for signing.
2013-07-21 20:17:42 +00:00
7133736702 Fix more NPEs ticket #984 2013-07-21 19:41:48 +00:00
2313d82369 toclet #984 : fix deadlock introduced in -4 (ticket #972) 2013-07-21 14:54:36 +00:00
zzz
1b42d99e66 * Console: Fix /peers table summary alignment
* I2CP:
   - Don't NPE when loglevel=warn
   - Don't enforce property length limits when inside router JVM
 * I2PSnark: Log uncaught error in ThreadedStarter to router log
 * I2PThread: Log uncaught error to wrapper log
2013-07-21 14:04:27 +00:00
d709f46183 Update unit test 2013-07-20 18:45:19 +00:00
97c1676bcb Rework locking and state management of NTCP connections
trac ticket #972
	up version to -4
2013-07-20 17:37:46 +00:00
zzz
02b92ac3fe fix compile for test 2013-07-20 13:46:50 +00:00
zzz
29eb1d5dc5 fixup after prop; history for prop; -3 2013-07-20 13:41:31 +00:00
zzz
a87fc68cfd propagate from branch 'i2p.i2p.zzz.ipv6' (head 5c147c6e394fae03752dcf497923a90e3f2db529)
to branch 'i2p.i2p' (head 7af6987d5546664f76589afe0cbeeb780f4b5d58)
2013-07-20 12:59:03 +00:00
zzz
bc1cf64df4 remove extra 2013-07-20 12:35:38 +00:00
zzz
b607d7b223 generic 2013-07-20 12:34:24 +00:00
zzz
4e00eaf9a3 checkpo fix; history for prop; -2 2013-07-20 12:25:31 +00:00
zzz
90cc71d14d propagate from branch 'i2p.i2p.zzz.test2' (head d80f8632ef0a2aa350eee9a38ba6a4c56471f5bc)
to branch 'i2p.i2p' (head e8b712c826e44211217f06eb3a4da2703323a42f)
2013-07-20 11:53:41 +00:00
zzz
554a3a6b0e * PRNG:
- Don't delay the refiller if we need more (don't limit max output)
   - Add FortunaRandomSource.main() to output to stdout for testing e.g. with dieharder
2013-07-19 21:31:25 +00:00
zzz
8505e8a1ca fix streaming property 2013-07-19 21:28:14 +00:00
54ec878698 merge of '90720c051863f44c6386493f3d5df546d988a663'
and 'fa509893effa9445a0833115160aed8fe6fed268'
2013-07-19 00:18:08 +00:00
ea4606fe79 Prepare for merge 2013-07-18 22:45:11 +00:00
96de87fdde compute rttDev in updateRTT 2013-07-18 22:33:23 +00:00
55d571ffec Hardcode TCP constants
Various suggestions by zzz
2013-07-18 22:25:10 +00:00
ae347c4fa1 sync getters 2013-07-18 15:52:40 +00:00
e93beb7c63 Updated .mtn-ignore 2013-07-18 13:48:36 +00:00
018098b8ef better loading from cache 2013-07-18 01:52:46 +00:00
1e2fb4bea5 propagate from branch 'i2p.i2p' (head e301d0499f4c688ed3a5febe30bf8098c7f2cdf9)
to branch 'i2p.i2p.979' (head 2dfdeb022c9495461b2ec1d90f28ef9cd0bd9e22)
2013-07-17 23:04:04 +00:00
171f0d2671 Implement RTT update on first ack 2013-07-17 21:13:19 +00:00
175cb0817e fix bashim in i2prouter 2013-07-17 19:45:43 +00:00
zzz
3b46acc285 * I2CP client session - improvements after review:
- Move more cleanups to finally block
   - Bounded wait
   - Don't ignore InterruptedExceptions, wrap in I2PSessionException and throw
   - More finals
   - Synch tweaks
2013-07-17 18:56:26 +00:00
zzz
d31ce49e77 change resource name 2013-07-17 18:55:12 +00:00
8937c4bf2a Store stdev of rtt in the TCB cache as per RFC 2140 2013-07-17 18:13:42 +00:00
2902a708f9 debian updates
- check script validity in build target
- refresh patch
- changelog update
2013-07-16 22:17:50 +00:00
zzz
c1210b1c04 * Translations:
- Tag initialNews.xml for TranslateReader
   - Drop static translated initialNews pages
   - Add new routerconsole bundle for the news alone, shipped in the jar
   - Use TranslateReader in HTTP proxy for initial news
   - Initial translations created manually from translated xml filesx
   - Add translated proxy error pages and initial news to deletelist.txt
   TODO: ar translation fails checkpo.sh
2013-07-13 23:38:11 +00:00
zzz
71038c311f * Translations:
- New varargs method in Translate
   - New TranslateReader to translate static files on-the-fly using _("") tagging
   - Tag proxy error pages for TranslateReader
   - Drop static translated proxy error pages
   - Add new i2ptunnel bundle for the proxy alone, shipped in the jar
   - Use TranslateReader in HTTP proxy for error pages
   - Move HTTP proxy strings from the web *war) to proxy (jar) bundle so they will be loaded
   - Initial translations created by msgmerge from i2ptunnel and routerconsole po files, un-fuzzied
2013-07-13 19:58:11 +00:00
zzz
70a8ab1d1a * DHSessionKeyBuilder: Fix for session and mac keys if DH key is between 32 and 63 bytes.
Was: NPE. Now: mac key is hash of ssession key. Won't ever happen. (Ticket #963)
   javadocs
2013-07-10 18:59:46 +00:00
zzz
f3c4a26483 * I2CP/I2PTunnel locking fixes (partial fixes for tickets 650. 815, 946, 947, 953):
- I2PSocketManagerFactory: New createDisconnectedManager(), javadocs
   - I2PSessionImpl: Rewrite state management and locking, prevent multiple
     connect() calls, but allow disconnect() to interrupt connect()
   - I2PSimpleSession: Changes to match I2PSessionImpl
   - I2PTunnelServer: Don't connect in constructor, use createDisconnectedManager()
     for a final manager, finals and cleanups
   Lightly tested.
   Todo: I2PTunnelClientBase
2013-07-10 18:54:25 +00:00
zzz
9a1e1a92ca dont use == on doubles 2013-07-10 18:42:13 +00:00
zzz
732eddd1b9 toString() fix (NO_ACK) 2013-07-10 18:14:18 +00:00
zzz
2caa6ad975 * Router I2CP:
- Make classes extensible for router-side test stubs
   - Add router-side local-only test implementation, no full router required.
     Only tested with external clients, probably doesn't work in-JVM.
   - Don't start threads in ClientManager constructor
   - Remove unused Reader param in ClientMessageEventListener methods
   - Cleanups, volatiles, finals, javadocs
2013-07-10 18:12:47 +00:00
zzz
d3e0161a6b * Transports: Consolidate translation methods in super,
ngettext fix for "peers" string
2013-07-10 17:59:10 +00:00
zzz
aabbdc1c1b Hopefully fix SSU NPE (ticket #967) 2013-07-06 13:25:11 +00:00
zzz
3aafea0d98 add ipv6 to /confignet 2013-06-29 15:13:05 +00:00
zzz
79f8e88e5f propagate from branch 'i2p.i2p' (head 2a2c708bf9fee43e69469bdf896dfe489c32bdea)
to branch 'i2p.i2p.zzz.ipv6' (head c33552d7026b0a445d1dd7e138bf454144130eb2)
2013-06-28 16:10:49 +00:00
zzz
34b7081303 change congestion cost increment back to 1 for now 2013-06-14 16:13:20 +00:00
zzz
e0cd71069f propagate from branch 'i2p.i2p' (head 1acb4077a56ccb4079538caa28648e27f0bf5b8b)
to branch 'i2p.i2p.zzz.ipv6' (head f87d396c445dc58e677a56d8ed69544c7f5ecab1)
2013-06-14 14:46:08 +00:00
zzz
378c5a0d4e propagate from branch 'i2p.i2p' (head fd10b04ca3a6cf66e669bfad32d3011ed9f7e33c)
to branch 'i2p.i2p.zzz.ipv6' (head 6f6e16f14691f359322e665a7ad5ab65cbe1ca5e)
2013-05-29 00:22:15 +00:00
zzz
6c62c1f362 enable IPv6 geoip lookup 2013-05-24 14:11:35 +00:00
zzz
3daf287de8 GeoIPv6:
- Handle gzipped input data in merge tool
  - Add script to generate compressed data
  - Add local additions
  - Add compressed data file, generated from Maxmind data fetched 2013-05-24
  - Include data in installer and updater
  - Update Maxmind license info, now CC-SA 3.0
2013-05-24 13:46:17 +00:00
zzz
9a4cd11748 * SSU: "rectify" IPv4/v6 MTUs differently due to different header size (mod 16)
* Penalize addresses w/o IP in sort
2013-05-21 21:10:23 +00:00
zzz
c0350702fd * RouterAddress:
- Deprecate some setters
  - Add warning about setCost()
  - Change cost storage from int to short
  - Cost range checks
* NTCP:
  - Republish even if only changing cost
* Transports:
  - Sort multiple peer addresses by cost, with adjustment for local IPv6 preference
  - Add default IPv6Config for ease of changing later
2013-05-19 18:36:29 +00:00
zzz
55880844a5 * SSUDemo: Adapt for NTCP testing too
* RouterAddress and RouterInfo toString() cleanups; don't cache RI in _stringified
* NTCP: Fix publishing address when host specified but interface is not
* log tweaks
2013-05-19 15:18:45 +00:00
zzz
729282c0c4 * UDPAddress: Remove dependency in console; make package private 2013-05-18 20:10:10 +00:00
zzz
d603c3b5cd - UDPAddress reduce object churn, check intro key length,
don't look for ihost3, reject ports < 1024, cleanups
2013-05-18 19:58:10 +00:00
zzz
5cda1ec703 - Handle IPv6 in too-close checks 2013-05-18 19:24:16 +00:00
zzz
ec3756a69f * SSUDemo: Use IPv6; don't use System properties 2013-05-18 18:30:38 +00:00
zzz
0b49fa98f9 * SSU: Fixes for i2np.udp.allowLocal, log tweaks, sender/receiver thread name tweaks
* Limit tunnel GW pumper threads when testing
2013-05-18 18:00:17 +00:00
zzz
226c7eb8e3 * SSUDemo: configuration fixes, delete RI on exit, log tweaks 2013-05-18 14:27:11 +00:00
zzz
be262c6a70 * NetDb:
- Add floodfillEnabled() to NetworkDatabaseFacade so callers don't
    have to cast to FNDF, and Dummy NDF will work
  - Remove static FNDF.floodfillEnabled()
* SSUDemo: cleanups
2013-05-17 15:11:23 +00:00
zzz
a374f00613 * Fix UDPEndpointTestStandalone:
- init context
  - Add unit test buildPacket() method to PacketBuilder
  - Fix NPE in MessageHistory
* Minor PacketPusher optimization
2013-05-16 23:08:06 +00:00
zzz
fcdf837f33 * New buildTest and prepTest targets
* Fix UDPEndpoint usage in unit tests:
  - Restore receive()
  - Handle null UDPTransport
* Fix UDPEndpointTestStandalone compilation
2013-05-16 17:57:33 +00:00
zzz
febc0a5237 RouterContext: Fix disabling client manager with i2p.dummyClientFacade=true 2013-05-16 15:35:23 +00:00
zzz
a19140e186 GeoIPv6 2013-05-13 20:43:30 +00:00
zzz
e0b25cdcf9 remove unused method 2013-05-13 20:39:32 +00:00
zzz
e332c8bc27 FloodfillPeerSelector, ProfileOrganizer: Use 8 bytes for IPv6 check
Transports:
- Add IPv6 column on /peers
- Other minor /peers cleanup
2013-05-13 13:57:15 +00:00
zzz
7318632db9 strip scope from returned address strings 2013-05-12 15:23:02 +00:00
zzz
1b38a6478b UPnP:
- Pass device IP back in forward port callback
 - Only declare success if forwarded IP is public

NTCP: Bad bind config not fatal

GeoIP:
 - Use cached IP in RouterAddresses
 - Use both NTCP and SSU addresses
 - Skip IPv6 for now

Blocklist:
 - Add IPv6 in-memory single list
 - Limit in-memory single list size
 - Fix dup check in getAddresses()
2013-05-12 14:44:42 +00:00
zzz
6ceea60c92 addresses:
- blocklist 192.88.88.0/24 6to4 anycast
- invalidate 2002::/16
2013-05-12 00:24:01 +00:00
zzz
fcaebb4416 * Fix UPnP address received before startListening(),
broken by isAlive() check
* log tweakws
2013-05-11 22:11:02 +00:00
zzz
0be3beb30e * SSU fixes for per-address and IPv6 MTU
* MTU.main() print all interfaces
2013-05-11 21:39:25 +00:00
zzz
5e51c6abef * CSFI compile fix
* Start transports in a standard order to make testing easier
* When transports learn of interface addresses before being started, save them
  and use them at startup
* Pick SSU random port before startListening() and have the TransportManager
  pass it to NTCP before starting
* Only restart NTCP after changing addresses when necessary;
  prevent thrashing at startup (ticket #459)
* Only call rebuildRouterInfo() once at startup
* More checking of min/max SSU port config
* Invalid SSU bind config no longer fatal
* Allow "true" for ipv6 config
* log tweaks
* javadocs
2013-05-11 19:22:20 +00:00
zzz
5e953b0857 * Fixes for IPv4 and other breakage after basic testing
* Catch exception from UPnP callback
* Log tweaks
2013-05-10 18:34:02 +00:00
zzz
c76c80043f * NTCP:
- Drop NTCPAddress, just use RouterAddress
  - Drop _myAddress field, use super's currentAddress
2013-05-09 17:32:29 +00:00
zzz
3a49d6d28f * NTCP:
Move SSU address notification handling from CSFI to NTCPTransport
2013-05-09 16:18:58 +00:00
zzz
94e34ff366 RouterAddress:
- Add new constructor
 - Add add getHost() and deepEquals()
 - Compare host string, not IP, in equals()

SSU:
 - Remove all _external* fields; use _currentAddresses in super
 - Big rework of externalAddressReceived(), rebuildExternalAddress(),
   needsRebuild(), and replaceAddress() for multiple addresses and IPv6
 - Add caching in UDPAddress
 - More IPv6 flavors of utility methods
 - Remove two-art replaceAddress()
2013-05-08 16:48:39 +00:00
zzz
af27c76b2c * Only treat IPv6 addresses as valid if we have a public IPv6 address
* SSU Introduction:
 - Document that Alice-Bob RelayRequest/RelayResponse may be IPv4 or IPv6,
   but don't implement IPv6 yet.
   Changes required in IntroductionManager and PacketBuilder to send Alice's
   IPv4 address in the RelayRequest packet over IPv6, and to publish
   IPv6 introducer IPs.
 - Bob-Charlie RelayIntro must be IPv4
 - Only offer/accept relay tags as Bob or Charlie if the Bob-Charlie session is IPv4
 - Alice-Charlie communication must be IPv4
 - javadocs
2013-05-07 22:46:55 +00:00
zzz
60336c9555 - Shuffle SSU addresses before picking one
- Change address sources to enum
2013-05-07 19:49:13 +00:00
zzz
a85b7aa9f8 - Hash IPv6 addresses in IPThrottler
- CSFI: Pass TransportManager instead of CSFI to GetBidsJob;
        remove unused methods
- Add i2np.disable property for testing
2013-05-07 18:22:20 +00:00
zzz
228e6d7d03 fixup after prop 2013-05-06 13:30:11 +00:00
zzz
31531ee882 propagate from branch 'i2p.i2p' (head 17371fd6f9ef94bbb60a66c6bacb6828d6a4cde5)
to branch 'i2p.i2p.zzz.ipv6' (head 065a076899a2581b4196e626f2b0654c3d39518a)
2013-05-06 11:27:10 +00:00
zzz
368c2073b2 - Fix multiple-detection code in externalAddressReceived()
- Synchronize tracking of last IP/port
- Don't accept IPv6 address changes from peers
- Remove unused getLocalAddress()
- Pkg private getLocalPort()

Peer tests:
 - Use only IPv4 peer for Alice and Bob in peer tests; Charlie may be an IPv6 peer.
 - Enforce IPv4 (Alice's) address inside PeerTest packet
2013-05-05 12:08:28 +00:00
zzz
757df8c726 prep for multiple address discovery 2013-05-03 16:34:02 +00:00
zzz
c6121cb31e Prep for multiple SSU sockets:
- Change from single UDPEndpoint to a List of UDPEndpoints
 - Move (single) receive queue from UDPReceiver to PacketHandler
 - Multiple transmit queues (one for each UDPEndpoint/UDPSender),
   select queue in PacketPusher
 - Throw exception on UDPEndpoint.startup() failure
2013-05-03 15:03:55 +00:00
zzz
eecab472eb IPv6 SSU MTU adjustments 2013-05-03 11:27:21 +00:00
zzz
b71631d2ec Fixes to isPubliclyRoutable() based on IPv6 config 2013-05-02 14:12:53 +00:00
zzz
3ec78e27b4 Start new IPv6 branch
- Add new TransportUtil for getting/setting IPv6 config
- Prep for supporting multiple RouterAddresses per-transport
- RouterAddress hashCode/equals tweaks
2013-05-02 12:55:35 +00:00
2079 changed files with 333338 additions and 179493 deletions

48
.gitignore vendored Normal file
View File

@ -0,0 +1,48 @@
# Just to try and prevent some noob disasters.
# Use git add -f foo.jar to ignore this ignore list
# generated release files
*.exe
*.[gx]z
*.bz2
*.[rwjt]ar
*.sig
*.su[d23]
*.deb
*.zip
*.torrent
*~
web-fragment.xml
web-out.xml
*.out
# Temporary/build dirs
build/
pkg-temp/
classes/
dist/
/installer/resources/locale/mo
/tmp
/apps/jetty/jettylib
*_jsp.java
*.class
# Debian-related
/debian/copyright
/debian/changelog
.pc/
# Build property overrides
/override.properties
# Reporting
*.fba
sloccount.sc
/reports/
# Don't allow patches
*.(diff|patch)
# but allow debian/patches
!/debian/patches/*.(patch|diff)

View File

@ -1,5 +1,7 @@
# Just to try and prevent some noob disasters.
# Use mtn add --no-respect-ignore foo.jar to ignore this ignore list
# Temporary/build files
_jsp\.java$
\.bz2$
\.tar$
@ -14,18 +16,35 @@ _jsp\.java$
\.sig$
\.sud$
\.su2$
.\su3$
\.tar$
\.war$
.\deb$
\.zip$
\.torrent$
^\.
^build
^pkg-temp/
~$
web-fragment.xml
web-out.xml
# Temporary/build dirs
^build
^pkg-temp
/build
/classes/
/classes
/dist
^installer/resources/locale/mo
/tmp
^apps/jetty/jettylib
# Debian-related
^debian/copyright
^debian/changelog
^.pc/
# Build property overrides
override.properties
# Reporting
sloccount.sc
^reports/

View File

@ -9,16 +9,46 @@ trans.es = apps/i2ptunnel/locale/messages_es.po
trans.fr = apps/i2ptunnel/locale/messages_fr.po
trans.hu = apps/i2ptunnel/locale/messages_hu.po
trans.it = apps/i2ptunnel/locale/messages_it.po
trans.ja = apps/i2ptunnel/locale/messages_ja.po
trans.nb = apps/i2ptunnel/locale/messages_nb.po
trans.nl = apps/i2ptunnel/locale/messages_nl.po
trans.nn = apps/i2ptunnel/locale/messages_nn.po
trans.pl = apps/i2ptunnel/locale/messages_pl.po
trans.pt = apps/i2ptunnel/locale/messages_pt.po
trans.pt_BR = apps/i2ptunnel/locale/messages_pt_BR.po
trans.ro = apps/i2ptunnel/locale/messages_ro.po
trans.ru_RU = apps/i2ptunnel/locale/messages_ru.po
trans.sk = apps/i2ptunnel/locale/messages_sk.po
trans.sv_SE = apps/i2ptunnel/locale/messages_sv.po
trans.uk_UA = apps/i2ptunnel/locale/messages_uk.po
trans.vi = apps/i2ptunnel/locale/messages_vi.po
trans.zh_CN = apps/i2ptunnel/locale/messages_zh.po
[I2P.proxy]
source_file = apps/i2ptunnel/locale-proxy/messages_en.po
source_lang = en
trans.ar = apps/i2ptunnel/locale-proxy/messages_ar.po
trans.cs = apps/i2ptunnel/locale-proxy/messages_cs.po
trans.de = apps/i2ptunnel/locale-proxy/messages_de.po
trans.es = apps/i2ptunnel/locale-proxy/messages_es.po
trans.fr = apps/i2ptunnel/locale-proxy/messages_fr.po
trans.hu = apps/i2ptunnel/locale-proxy/messages_hu.po
;; Java converts id to in
trans.id = apps/i2ptunnel/locale-proxy/messages_in.po
trans.it = apps/i2ptunnel/locale-proxy/messages_it.po
trans.nb = apps/i2ptunnel/locale-proxy/messages_nb.po
trans.nl = apps/i2ptunnel/locale-proxy/messages_nl.po
trans.pl = apps/i2ptunnel/locale-proxy/messages_pl.po
trans.pt = apps/i2ptunnel/locale-proxy/messages_pt.po
trans.pt_BR = apps/i2ptunnel/locale-proxy/messages_pt_BR.po
trans.ro = apps/i2ptunnel/locale-proxy/messages_ro.po
trans.ru_RU = apps/i2ptunnel/locale-proxy/messages_ru.po
trans.sk = apps/i2ptunnel/locale-proxy/messages_sk.po
trans.sv_SE = apps/i2ptunnel/locale-proxy/messages_sv.po
trans.uk_UA = apps/i2ptunnel/locale-proxy/messages_uk.po
trans.vi = apps/i2ptunnel/locale-proxy/messages_vi.po
trans.zh_CN = apps/i2ptunnel/locale-proxy/messages_zh.po
[I2P.routerconsole]
source_file = apps/routerconsole/locale/messages_en.po
source_lang = en
@ -33,10 +63,13 @@ trans.fi = apps/routerconsole/locale/messages_fi.po
trans.fr = apps/routerconsole/locale/messages_fr.po
trans.hu = apps/routerconsole/locale/messages_hu.po
trans.it = apps/routerconsole/locale/messages_it.po
trans.ja = apps/routerconsole/locale/messages_ja.po
trans.nb = apps/routerconsole/locale/messages_nb.po
trans.nl = apps/routerconsole/locale/messages_nl.po
trans.pl = apps/routerconsole/locale/messages_pl.po
trans.pt = apps/routerconsole/locale/messages_pt.po
trans.pt_BR = apps/routerconsole/locale/messages_pt_BR.po
trans.ro = apps/routerconsole/locale/messages_ro.po
trans.ru_RU = apps/routerconsole/locale/messages_ru.po
trans.sv_SE = apps/routerconsole/locale/messages_sv.po
trans.tr_TR = apps/routerconsole/locale/messages_tr.po
@ -44,6 +77,66 @@ trans.uk_UA = apps/routerconsole/locale/messages_uk.po
trans.vi = apps/routerconsole/locale/messages_vi.po
trans.zh_CN = apps/routerconsole/locale/messages_zh.po
[I2P.welcome]
source_file = apps/routerconsole/locale-news/messages_en.po
source_lang = en
trans.ar = apps/routerconsole/locale-news/messages_ar.po
trans.de = apps/routerconsole/locale-news/messages_de.po
trans.es = apps/routerconsole/locale-news/messages_es.po
trans.fi = apps/routerconsole/locale-news/messages_fi.po
trans.fr = apps/routerconsole/locale-news/messages_fr.po
trans.he = apps/routerconsole/locale-news/messages_he.po
;; Java converts id to in
trans.id = apps/routerconsole/locale-news/messages_in.po
trans.it = apps/routerconsole/locale-news/messages_it.po
trans.ja = apps/routerconsole/locale-news/messages_ja.po
trans.ko = apps/routerconsole/locale-news/messages_ko.po
trans.mg = apps/routerconsole/locale-news/messages_mg.po
trans.nb = apps/routerconsole/locale-news/messages_nb.po
trans.nl = apps/routerconsole/locale-news/messages_nl.po
trans.pl = apps/routerconsole/locale-news/messages_pl.po
trans.pt = apps/routerconsole/locale-news/messages_pt.po
trans.pt_BR = apps/routerconsole/locale-news/messages_pt_BR.po
trans.ro = apps/routerconsole/locale-news/messages_ro.po
trans.ru_RU = apps/routerconsole/locale-news/messages_ru.po
trans.sk = apps/routerconsole/locale-news/messages_sk.po
trans.sq = apps/routerconsole/locale-news/messages_sq.po
trans.sv_SE = apps/routerconsole/locale-news/messages_sv.po
trans.tr_TR = apps/routerconsole/locale-news/messages_tr.po
trans.uk_UA = apps/routerconsole/locale-news/messages_uk.po
trans.zh_CN = apps/routerconsole/locale-news/messages_zh.po
[I2P.countries]
type = PO
source_file = apps/routerconsole/locale-countries/messages_en.po
source_lang = en
trans.ca = apps/routerconsole/locale-countries/messages_ca.po
trans.da = apps/routerconsole/locale-countries/messages_da.po
trans.de = apps/routerconsole/locale-countries/messages_de.po
trans.el = apps/routerconsole/locale-countries/messages_el.po
trans.es = apps/routerconsole/locale-countries/messages_es.po
trans.et_EE = apps/routerconsole/locale-countries/messages_et.po
trans.fi = apps/routerconsole/locale-countries/messages_fi.po
trans.fr = apps/routerconsole/locale-countries/messages_fr.po
trans.hu = apps/routerconsole/locale-countries/messages_hu.po
trans.it = apps/routerconsole/locale-countries/messages_it.po
trans.ja = apps/routerconsole/locale-countries/messages_ja.po
trans.mg = apps/routerconsole/locale-countries/messages_mg.po
trans.nb = apps/routerconsole/locale-countries/messages_nb.po
trans.nl = apps/routerconsole/locale-countries/messages_nl.po
trans.pl = apps/routerconsole/locale-countries/messages_pl.po
trans.pt = apps/routerconsole/locale-countries/messages_pt.po
trans.pt_BR = apps/routerconsole/locale-countries/messages_pt_BR.po
trans.ro = apps/routerconsole/locale-countries/messages_ro.po
trans.ru_RU = apps/routerconsole/locale-countries/messages_ru.po
trans.sk = apps/routerconsole/locale-countries/messages_sk.po
trans.sq = apps/routerconsole/locale-countries/messages_sq.po
trans.sv_SE = apps/routerconsole/locale-countries/messages_sv.po
trans.uk_UA = apps/routerconsole/locale-countries/messages_uk.po
trans.tr_TR = apps/routerconsole/locale-countries/messages_tr.po
trans.vi = apps/routerconsole/locale-countries/messages_vi.po
trans.zh_CN = apps/routerconsole/locale-countries/messages_zh.po
[I2P.i2psnark]
source_file = apps/i2psnark/locale/messages_en.po
source_lang = en
@ -58,7 +151,10 @@ trans.nb = apps/i2psnark/locale/messages_nb.po
trans.nl = apps/i2psnark/locale/messages_nl.po
trans.pl = apps/i2psnark/locale/messages_pl.po
trans.pt = apps/i2psnark/locale/messages_pt.po
trans.pt_BR = apps/i2psnark/locale/messages_pt_bR.po
trans.ro = apps/i2psnark/locale/messages_ro.po
trans.ru_RU = apps/i2psnark/locale/messages_ru.po
trans.sk = apps/i2psnark/locale/messages_sk.po
trans.sv_SE = apps/i2psnark/locale/messages_sv.po
trans.vi = apps/i2psnark/locale/messages_vi.po
trans.zh_CN = apps/i2psnark/locale/messages_zh.po
@ -75,11 +171,15 @@ trans.es = apps/susidns/locale/messages_es.po
trans.fr = apps/susidns/locale/messages_fr.po
trans.hu = apps/susidns/locale/messages_hu.po
trans.it = apps/susidns/locale/messages_it.po
trans.ja = apps/susidns/locale/messages_ja.po
trans.nl = apps/susidns/locale/messages_nl.po
trans.pl = apps/susidns/locale/messages_pl.po
trans.pt = apps/susidns/locale/messages_pt.po
trans.pt_BR = apps/susidns/locale/messages_pt_BR.po
trans.ro = apps/susidns/locale/messages_ro.po
trans.ru_RU = apps/susidns/locale/messages_ru.po
trans.sv_SE = apps/susidns/locale/messages_sv.po
trans.tr_TR = apps/susidns/locale/messages_tr.po
trans.uk_UA = apps/susidns/locale/messages_uk.po
trans.vi = apps/susidns/locale/messages_vi.po
trans.zh_CN = apps/susidns/locale/messages_zh.po
@ -96,9 +196,13 @@ trans.es = apps/desktopgui/locale/messages_es.po
trans.fr = apps/desktopgui/locale/messages_fr.po
trans.hu = apps/desktopgui/locale/messages_hu.po
trans.it = apps/desktopgui/locale/messages_it.po
trans.ja = apps/desktopgui/locale/messages_ja.po
trans.nl = apps/desktopgui/locale/messages_nl.po
trans.pl = apps/desktopgui/locale/messages_pl.po
trans.pt_BR = apps/desktopgui/locale/messages_pt_BR.po
trans.ro = apps/desktopgui/locale/messages_ro.po
trans.ru_RU = apps/desktopgui/locale/messages_ru.po
trans.sk = apps/desktopgui/locale/messages_sk.po
trans.sv_SE = apps/desktopgui/locale/messages_sv.po
trans.uk_UA = apps/desktopgui/locale/messages_uk.po
trans.tr_TR = apps/desktopgui/locale/messages_tr.po
@ -109,16 +213,25 @@ trans.zh_CN = apps/desktopgui/locale/messages_zh.po
source_file = apps/susimail/locale/messages_en.po
source_lang = en
trans.cs = apps/susimail/locale/messages_cs.po
trans.da = apps/susimail/locale/messages_da.po
trans.de = apps/susimail/locale/messages_de.po
trans.es = apps/susimail/locale/messages_es.po
trans.fi = apps/susimail/locale/messages_fi.po
trans.fr = apps/susimail/locale/messages_fr.po
trans.hu = apps/susimail/locale/messages_hu.po
;; Java converts id to in
trans.id = apps/susimail/locale/messages_in.po
trans.it = apps/susimail/locale/messages_it.po
trans.ja = apps/susimail/locale/messages_ja.po
trans.mg = apps/susimail/locale/messages_mg.po
trans.nl = apps/susimail/locale/messages_nl.po
trans.ru_RU = apps/susimail/locale/messages_ru.po
trans.sv_SE = apps/susimail/locale/messages_sv.po
trans.pl = apps/susimail/locale/messages_pl.po
trans.pt = apps/susimail/locale/messages_pt.po
trans.pt_BR = apps/susimail/locale/messages_pt_BR.po
trans.ro = apps/susimail/locale/messages_ro.po
trans.ru_RU = apps/susimail/locale/messages_ru.po
trans.sq = apps/susimail/locale/messages_sq.po
trans.sv_SE = apps/susimail/locale/messages_sv.po
trans.uk_UA = apps/susimail/locale/messages_uk.po
trans.vi = apps/susimail/locale/messages_vi.po
trans.zh_CN = apps/susimail/locale/messages_zh.po
@ -130,12 +243,21 @@ trans.cs = debian/po/cs.po
trans.de = debian/po/de.po
trans.el = debian/po/el.po
trans.es = debian/po/es.po
trans.fi = debian/po/fi.po
trans.fr = debian/po/fr.po
trans.id = debian/po/id.po
trans.it = debian/po/it.po
trans.hu = debian/po/hu.po
trans.ja = debian/po/ja.po
trans.ko = debian/po/ko.po
trans.nl = debian/po/nl.po
trans.pl = debian/po/pl.po
trans.pt = debian/po/pt.po
trans.pt_BR = debian/po/pt_BR.po
trans.ro = debian/po/ro.po
trans.ru_RU = debian/po/ru.po
trans.sk = debian/po/sk.po
trans.sq = debian/po/sq.po
trans.sv_SE = debian/po/sv.po
trans.uk_UA = debian/po/uk.po
trans.tr_TR = debian/po/tr.po
@ -144,14 +266,80 @@ trans.zh_CN = debian/po/zh.po
[I2P.i2prouter-script]
source_file = installer/resources/locale/po/messages_en.po
source_lang = en
;; currently fails check
;;trans.ca = installer/resources/locale/po/messages_ca.po
trans.de = installer/resources/locale/po/messages_de.po
trans.es = installer/resources/locale/po/messages_es.po
;; currently fails check
;;trans.fi = installer/resources/locale/po/messages_fi.po
trans.fr = installer/resources/locale/po/messages_fr.po
trans.id = installer/resources/locale/po/messages_id.po
trans.it = installer/resources/locale/po/messages_it.po
trans.sv_SE = installer/resources/locale/po/messages_sv.po
trans.pl = installer/resources/locale/po/messages_pl.po
trans.ja = installer/resources/locale/po/messages_ja.po
;; currently fails check
;;trans.ko = installer/resources/locale/po/messages_ko.po
trans.nl = installer/resources/locale/po/messages_nl.po
trans.pl = installer/resources/locale/po/messages_pl.po
trans.pt = installer/resources/locale/po/messages_pt.po
trans.pt_BR = installer/resources/locale/po/messages_pt_BR.po
trans.ro = installer/resources/locale/po/messages_ro.po
trans.ru_RU = installer/resources/locale/po/messages_ru.po
trans.sk = installer/resources/locale/po/messages_sk.po
trans.sv_SE = installer/resources/locale/po/messages_sv.po
trans.tr_TR = installer/resources/locale/po/messages_tr.po
;; currently fails check
;;trans.uk_UA = installer/resources/locale/po/messages_uk.po
trans.zh_CN = installer/resources/locale/po/messages_zh.po
[main]
host = http://www.transifex.net
[I2P.getopt]
source_file = core/java/src/gnu/getopt/MessagesBundle.properties
source_lang = en
type = PROPERTIES
trans.cs = core/java/src/gnu/getopt/MessagesBundle_cs.properties
trans.de = core/java/src/gnu/getopt/MessagesBundle_de.properties
trans.es = core/java/src/gnu/getopt/MessagesBundle_es.properties
trans.fi = core/java/src/gnu/getopt/MessagesBundle_fi.properties
trans.fr = core/java/src/gnu/getopt/MessagesBundle_fr.properties
trans.hu = core/java/src/gnu/getopt/MessagesBundle_hu.properties
;; Java converts id to in
trans.id = core/java/src/gnu/getopt/MessagesBundle_in.properties
trans.it = core/java/src/gnu/getopt/MessagesBundle_it.properties
trans.ja = core/java/src/gnu/getopt/MessagesBundle_ja.properties
trans.ko = core/java/src/gnu/getopt/MessagesBundle_ko.properties
trans.nl = core/java/src/gnu/getopt/MessagesBundle_nl.properties
trans.nb = core/java/src/gnu/getopt/MessagesBundle_nb.properties
trans.pl = core/java/src/gnu/getopt/MessagesBundle_pl.properties
;; currently corrupt, non-UTF-8
;;trans.pt = core/java/src/gnu/getopt/MessagesBundle_pt.properties
;; currently corrupt, non-UTF-8
;;trans.pt_BR = core/java/src/gnu/getopt/MessagesBundle_pt_BR.properties
trans.ro = core/java/src/gnu/getopt/MessagesBundle_ro.properties
trans.ru_RU = core/java/src/gnu/getopt/MessagesBundle_ru.properties
trans.sk = core/java/src/gnu/getopt/MessagesBundle_sk.properties
;; currently corrupt, non-UTF-8
;;trans.sq = core/java/src/gnu/getopt/MessagesBundle_sq.properties
trans.uk_UA = core/java/src/gnu/getopt/MessagesBundle_uk.properties
trans.zh_CN = core/java/src/gnu/getopt/MessagesBundle_zh.properties
[I2P.streaming]
source_file = apps/ministreaming/locale/messages_en.po
source_lang = en
trans.ca = apps/ministreaming/locale/messages_ca.po
trans.de = apps/ministreaming/locale/messages_de.po
trans.es = apps/ministreaming/locale/messages_es.po
trans.fr = apps/ministreaming/locale/messages_fr.po
;; Java converts id to in
trans.id = apps/ministreaming/locale/messages_in.po
trans.it = apps/ministreaming/locale/messages_it.po
trans.nb = apps/ministreaming/locale/messages_nb.po
trans.pl = apps/ministreaming/locale/messages_pl.po
trans.ro = apps/ministreaming/locale/messages_ro.po
trans.ru_RU = apps/ministreaming/locale/messages_ru.po
trans.sv_SE = apps/ministreaming/locale/messages_sv.po
trans.uk_UA = apps/ministreaming/locale/messages_uk.po
trans.zh_CN = apps/ministreaming/locale/messages_zh.po
[main]
host = https://www.transifex.com

View File

@ -12,7 +12,7 @@ you may use:
to configure the router.
If you're having trouble, swing by http://forum.i2p/, check the
website at http://www.i2p2.de/, or get on irc://irc.freenode.net/#i2p
website at https://geti2p.net/, or get on irc://irc.freenode.net/#i2p
I2P will create and store files and configuration data in the user directory
~/.i2p/ on Linux and %APPDATA%\I2P\ on Windows. This directory is created
@ -39,7 +39,10 @@ To uninstall I2P:
rm -rf $I2PInstallDir ~/.i2p
Supported JVMs:
Windows: Latest available from http://java.com/download (1.5+ supported)
Linux: Latest available from http://java.com/download (1.5+ supported)
FreeBSD: 1.5-compatible (NIO required)
Other operating systems and JVMs: See http://trac.i2p2.de/wiki/java
All platforms: Java 1.6 or higher required; 1.7 or higher recommended
Windows: OpenJDK or Oracle from http://java.com/download
Linux: OpenJDK or Oracle from http://java.com/download
FreeBSD: OpenJDK or Oracle from http://java.com/download
Raspberry Pi: Oracle 8 Early Access https://jdk8.java.net/download.html
PowerPC: IBM SDK 7 http://www.ibm.com/developerworks/java/jdk/linux/download.html
Other operating systems and JVMs: See https://trac.i2p2.de/wiki/java or https://geti2p.net/download

View File

@ -2,7 +2,7 @@ I2P source installation instructions
Prerequisites to build from source:
Java SDK (preferably Oracle/Sun or OpenJDK) 1.6.0 or higher
Non-linux operating systems and JVMs: See http://trac.i2p2.de/wiki/java
Non-linux operating systems and JVMs: See https://trac.i2p2.de/wiki/java
Apache Ant 1.7.0 or higher
The xgettext, msgfmt, and msgmerge tools installed
from the GNU gettext package http://www.gnu.org/software/gettext/

View File

@ -36,7 +36,7 @@ Public domain except as listed below:
Copyright (c) 2003, TheCrypto
See licenses/LICENSE-ElGamalDSA.txt
SHA256 and HMAC-SHA256:
SHA256 and HMAC:
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
See licenses/LICENSE-SHA256.txt
@ -76,13 +76,22 @@ Public domain except as listed below:
Copyright 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
See licenses/LICENSE-Apache2.0.txt
Getopt:
Copyright (c) 1998 by Aaron M. Renn (arenn@urbanophile.com)
See licenses/LICENSE-LGPLv2.1.txt
HostnameVerifier:
From Apache HttpClient 4.4.1 and HttpCore 4.4.1
See licenses/LICENSE-Apache2.0.txt
Router (router.jar):
Public domain except as listed below:
UPnP.java:
From freenet
See licenses/LICENSE-GPLv2.txt
UPnP subsystem (CyberLink) 2.1:
UPnP subsystem (CyberLink) 3.0:
Copyright (C) 2003-2010 Satoshi Konno
See licenses/LICENSE-UPnP.txt
@ -132,7 +141,7 @@ Installer:
Java Service Wrapper Community Edition 32-bit 3.5.19:
Java Service Wrapper Community Edition 32-bit 3.5.25:
Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
See licenses/LICENSE-Wrapper.txt
@ -177,7 +186,7 @@ Applications:
By welterde.
See licenses/LICENSE-GPLv2.txt
Jetty 7.6.11.v20130520:
Jetty 8.1.17.v20150415:
See licenses/ABOUT-Jetty.html
See licenses/NOTICE-Jetty.html
See licenses/LICENSE-Apache2.0.txt
@ -207,7 +216,7 @@ Applications:
FatCow icons: See licenses/LICENSE-FatCowIcons.txt
GeoIP Data:
Copyright (c) 2008 MaxMind, Inc. All Rights Reserved.
This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/
See licenses/LICENSE-GeoIP.txt
Router Console and I2PSnark themes:
@ -243,8 +252,8 @@ Applications:
Bundles systray4j-2.4.1:
See licenses/LICENSE-LGPLv2.1.txt
Tomcat 6.0.37:
Copyright 1999-2013 The Apache Software Foundation
Tomcat 6.0.44:
Copyright 1999-2015 The Apache Software Foundation
See licenses/LICENSE-Apache2.0.txt
See licenses/NOTICE-Tomcat.txt

View File

@ -1,6 +1,6 @@
Prerequisites to build from source:
Java SDK (preferably Oracle/Sun or OpenJDK) 1.6.0 or higher
Non-linux operating systems and JVMs: See http://trac.i2p2.de/wiki/java
Non-linux operating systems and JVMs: See https://trac.i2p2.de/wiki/java
Apache Ant 1.7.0 or higher
The xgettext, msgfmt, and msgmerge tools installed
from the GNU gettext package http://www.gnu.org/software/gettext/
@ -15,25 +15,35 @@ To build:
ant installer-osx
Run 'ant' with no arguments to see other build options.
See INSTALL.txt or http://www.i2p2.de/download.html for installation instructions.
See INSTALL.txt or https://geti2p.net/download for installation instructions.
Documentation:
http://www.i2p2.de/how
API: run 'ant javadoc' then start at build/javadoc/index.html
https://geti2p.net/how
API: http://docs.i2p-projekt.de/javadoc/
or run 'ant javadoc' then start at build/javadoc/index.html
Latest release:
http://www.i2p2.de/download.html
https://geti2p.net/download
To get development branch from source control:
http://www.i2p2.de/newdevelopers.html
https://geti2p.net/newdevelopers
FAQ:
http://www.i2p2.de/faq.html
https://geti2p.net/faq
Need help?
IRC irc.freenode.net #i2p
http://forum.i2p/
Bug reports:
https://trac.i2p2.de/report/1
Contact information, security issues, press inquiries:
https://geti2p.net/en/contact
Twitter:
@i2p, @geti2p
Licenses:
See LICENSE.txt

View File

@ -1,30 +1,70 @@
ou will need atleast monotone > = 0.41 to get the most recent build source
and connect it to an already running i2p router.
Getting the sources
===================
OR:
Monotone
--------
You may download the actual "stable" source from
http://code.google.com/p/i2p/downloads/list
The bleeding-edge source code is available both within and outside of I2P. The
I2P project uses Monotone to maintain the codebase.
You will need to follwing tools to build the i2p and i2p-base packages:
Information on retrieving the source with monotone is available within I2P at
http://i2p-projekt.i2p/monotone and from the internet at https://geti2p.net/monotone.
bash >= 3.1.017
requiredbuilder >= 0.16.3 ( http://www.stabellini.net/requiredbuilder.html )
jre >= 6u11
jdk >= 6u11
apache-ant >= 1.7.1
perl >= 5.10.0
python >= 2.5.2
Monotone 1.0 Slackbuilds are available at http://slackbuilds.org/.
Reccomended:
monotone >= 0.41 ( http://pkgs.dr.ea.ms )
Git
---
See also:
Git is also an option to retrieve the I2P source code. That said, the I2P
Monotone servers are *the* authoritative source.
i2p/readme.txt
Public Git repositories hosting the I2P source and managed by I2P project team members include
AND
- https://github.com/i2p/i2p.i2p
- http://git.repo.i2p/w/i2p.i2p.git (mirrored from Github)
- http://sourceforge.net/p/i2p/code/
i2p-base/readme.txt
for information and handy tips.
Tarball
-------
The latest stable release is always available from the I2P homepage at
https://geti2p.net/get/.
This SlackBuild
===============
Requirements
-------------
The following are needed to build the i2p package:
* jre >= 6
* jdk >= 6
* gettext
* apache-ant >= 1.7.1
If you don't care about bundling the translations, the gettext requirement can
be avoided by adding -Drequire.gettext=false to the ant lines in
i2p/i2p.SlackBuild
A JRE >= v6 is the only requirement to run I2P.
Building
--------
As the root user, run either $I2PSRC/Slackware/i2p/i2p.SlackBuild or `ant slackpkg` to create a package
in $I2PSRC/Slackware/i2p which can be installed using the Slackware packaging tools.
See also
========
Please also take a look at
* i2p/README
* eepget(1)
* i2prouter(1)
* http://i2p-projekt.i2p / https://geti2p.net
for additional information and tips.

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<project basedir="." default="slackpkg">
<target name="slackpkg">
<echo message="Building Slackware package." />
<exec executable="./i2p-base.SlackBuild">
</exec>
</target>
</project>

View File

@ -1,157 +0,0 @@
#!/bin/sh
#
#
# Now in the future we only need to look for '#I2P' and '#/I2P'
# for modifications to rc.local and rc.local_shutdown.
# I was a moron for not doing it this way in the first place :-) -- Sponge
#
#
touch /etc/rc.d/rc.local
touch /etc/rc.d/rc.local_shutdown
echo
echo -n "Check 1: /etc/rc.d/rc.local "
I2PRCA=`grep -c /etc/rc.d/rc.local -e '/etc/rc.d/rc.i2p'`
if [ $I2PRCA -eq 0 ] ; then
echo '#I2P' >> /etc/rc.d/rc.local
echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local
echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local
echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local
echo "fi" >> /etc/rc.d/rc.local
echo '#/I2P' >> /etc/rc.d/rc.local
echo "modified."
else
echo -n "looks OK so far,"
# Fix old installs, or where people have modified.
echo -n " Check 1A: "
I2PRCC=`grep -c /etc/rc.d/rc.local -e 'i2p-\*\.tmp'`
if [ $I2PRCC -eq 0 ] ; then
DATA=$(cat /etc/rc.d/rc.local | sed -re 's/if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/#I2P\n\( cd \/tmp ; rm -Rf i2p-*.tmp \)\nif \[ -x \/etc\/rc.d\/rc.i2p \] ; then/')
echo "${DATA}" > /etc/rc.d/rc.local
echo -n "additional modifications applied,"
else
echo -n "looks OK so far,"
fi
echo -n " Check 1B: "
I2PRCE=`grep -c /etc/rc.d/rc.local -e 'i2p-\*\.tmp'`
if [ $I2PRCE -eq 0 ] ; then
DATATOP=$(cat /etc/rc.d/rc.local | sed -n '0,/i2p-\*\.tmp/p' | sed '$d' )
DATABOT=$(cat /etc/rc.d/rc.local | sed -n '/i2p-\*\.tmp/,$p' | sed -n '/^fi/,$p' | sed "1d")
echo "${DATATOP}" > /etc/rc.d/rc.local
echo '#I2P' >> /etc/rc.d/rc.local
echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local
echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local
echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local
echo "fi" >> /etc/rc.d/rc.local
echo '#/I2P' >> /etc/rc.d/rc.local
echo "${DATABOT}" >> /etc/rc.d/rc.local
echo -n "additional modifications applied,"
else
echo -n "looks ok so far,"
fi
echo -n " Check 1C: "
I2PRCF=`grep -c /etc/rc.d/rc.local -e '#/I2P'`
if [ $I2PRCF -eq 0 ] ; then
DATATOP=$(cat /etc/rc.d/rc.local | sed -n '0,/^#I2P/p' | sed '$d' )
DATABOT=$(cat /etc/rc.d/rc.local | sed -n '/^#I2P/,$p' | sed -n '/^fi/,$p' | sed "1d")
echo "${DATATOP}" > /etc/rc.d/rc.local
echo '#I2P' >> /etc/rc.d/rc.local
echo '( cd /tmp ; rm -Rf i2p-*.tmp )' >> /etc/rc.d/rc.local
echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local
echo " sh /etc/rc.d/rc.i2p start" >> /etc/rc.d/rc.local
echo "fi" >> /etc/rc.d/rc.local
echo '#/I2P' >> /etc/rc.d/rc.local
echo "${DATABOT}" >> /etc/rc.d/rc.local
echo -n "additional modifications applied,"
else
echo -n "looks ok so far,"
fi
echo " Done."
fi
echo -n "Check 2: /etc/rc.d/rc.local_shutdown "
I2PRCB=`grep -c /etc/rc.d/rc.local_shutdown -e '/etc/rc.d/rc.i2p'`
if [ $I2PRCB -eq 0 ] ; then
echo "#I2P" >> /etc/rc.d/rc.local_shutdown
echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown
echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown
echo "fi" >> /etc/rc.d/rc.local_shutdown
echo "#/I2P" >> /etc/rc.d/rc.local_shutdown
echo "modified."
else
echo -n "looks OK so far,"
# Fix old installs
echo -n " Check 1A: "
I2PRCG=`grep -c /etc/rc.d/rc.local_shutdown -e '#I2P'`
if [ $I2PRCG -eq 0 ] ; then
DATATOP=$(cat /etc/rc.d/rc.local_shutdown | sed -n '0,/^if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/p' | sed '$d' )
DATABOT=$(cat /etc/rc.d/rc.local_shutdown | sed -n '/^if \[ -x \/etc\/rc\.d\/rc\.i2p \] ; then/,$p' | sed -n '/^fi/,$p' | sed "1d")
echo "${DATATOP}" > /etc/rc.d/rc.local_shutdown
echo '#I2P' >> /etc/rc.d/rc.local_shutdown
echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown
echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown
echo "fi" >> /etc/rc.d/rc.local_shutdown
echo "#/I2P" >> /etc/rc.d/rc.local_shutdown
echo "${DATABOT}" >> /etc/rc.d/rc.local_shutdown
echo -n "additional modifications applied,"
else
echo -n "looks OK so far,"
fi
echo -n " Check 1B: "
I2PRCH=`grep -c /etc/rc.d/rc.local_shutdown -e '#/I2P'`
if [ $I2PRCH -eq 0 ] ; then
DATATOP=$(cat /etc/rc.d/rc.local_shutdown | sed -n '0,/^#I2P/p' | sed '$d' )
DATABOT=$(cat /etc/rc.d/rc.local_shutdown | sed -n '/^#I2P/,$p' | sed -n '/^fi/,$p' | sed "1d")
echo "${DATATOP}" > /etc/rc.d/rc.local_shutdown
echo '#I2P' >> /etc/rc.d/rc.local_shutdown
echo "if [ -x /etc/rc.d/rc.i2p ] ; then" >> /etc/rc.d/rc.local_shutdown
echo " sh /etc/rc.d/rc.i2p stop" >> /etc/rc.d/rc.local_shutdown
echo "fi" >> /etc/rc.d/rc.local_shutdown
echo "#/I2P" >> /etc/rc.d/rc.local_shutdown
echo "${DATABOT}" >> /etc/rc.d/rc.local_shutdown
echo -n "additional modifications applied,"
else
echo -n "looks OK so far,"
fi
echo " Done."
fi
if [ -f /etc/rc.d/rc.i2p ] ; then
if [ -x /etc/rc.d/rc.i2p ] ; then
chmod +x /etc/rc.d/rc.i2p.new
fi
# Hopefully get admin's attention.
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -e "\007" ; sleep 0.3
echo "It apears that you already have /etc/rc.d/rc.i2p"
echo "You should replace it with /etc/rc.d/rc.i2p.new as soon as possible"
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -ne "\007" ; sleep 0.3
echo -e "\007" ; sleep 0.3
else
mv /etc/rc.d/rc.i2p.new /etc/rc.d/rc.i2p
echo
echo "Installation finished. The i2p start/stop script has been"
echo "installed in /etc/rc.d . You should chmod +x"
echo '/etc/rc.d/rc.i2p to start it on boot.'
echo
fi
exit

View File

@ -1,57 +0,0 @@
#!/bin/sh
#
# Heavily based on the Slackware 12.2 SlackBuild
# Slackware build script for I2P
#
# PLEASE READ THIS:
# How to start I2P:
# After installpkg command, doinst.sh will execute a post-installation script
# needed by I2P. After that you have to chmod +x /etc/rc.d/rc.i2p and start
# I2P service with /etc/rc.d/rc.i2p start.
#
# Now tell your browser to user this proxy: localhost on port 4444 and open
# this page: http://localhost:7657/index.jsp
#
# Here you can configure I2P, watch network status and navigate anonimously.
# It's suggested to subscribe to various dns host, like i2host.i2p
# For any additional information, visit i2host.i2p and forum.i2p
#
CWD=$(pwd)
TMP=/tmp
PKG=/$TMP/package-base-i2p
NAME=i2p-base
VERSION=0.0.4
BUILD=1sponge
ARCH=noarch
INSTALL_DIR=opt
# Less than slackware 13?
SLKPLT=$(cat /etc/slackware-version | sed -re "s/(Slackware )([0-9]*)(.*)/\2/")
if [ $SLKPLT -lt 13 ] ; then
EXT=tgz
else
EXT=txz
fi
rm -rf $PKG
mkdir -p $PKG
cd $PKG
chown -R root:root .
mkdir -p $PKG/etc/rc.d
mkdir -p $PKG/install
sed "s|directory|/$INSTALL_DIR/i2p/i2prouter|g" "$CWD/rc.i2p_def" > $PKG/etc/rc.d/rc.i2p.new
chmod 644 $PKG/etc/rc.d/rc.i2p.new
cat "$CWD/doinst.sh" > $PKG/install/doinst.sh
cat "$CWD/slack-desc" > $PKG/install/slack-desc
cd $PKG
#
# Not really that important to exec this
# as there aren't any deps we don't know.
#
# requiredbuilder -v -y -s $CWD $PKG
#
cat "$CWD/slack-required" > $PKG/install/slack-required
makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.$EXT

View File

@ -1,68 +0,0 @@
#!/bin/sh
# Start/stop i2p service.
i2p_start() {
# Check if router is up first!
/bin/su - -c "/bin/bash -l -c '( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\" ; directory status )'" > /dev/null
if [ $? -eq 0 ] ; then {
# I2p is already running, so tell the user.
echo "I2P is already running..."
i2p_status
}
else
{
# Just in-case there are leftover junk in /tmp...
rm -Rf `grep /tmp/hsperfdata_root/* -le i2p` /tmp/i2p-*.tmp /tmp/router.ping
# Now that all junk is cleaned up, start.
/bin/su - -c "/bin/bash -l -c '( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\" ; directory start )'"
}
fi
}
i2p_stop() {
/bin/su - -c "/bin/bash -l -c '( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\" ; directory stop )'"
rm -Rf `grep /tmp/hsperfdata_root/* -le i2p` /tmp/i2p-*.tmp /tmp/router.ping
}
i2p_restart() {
# We want a FULL cycle here, not the wrappers idea of this!
i2p_stop
i2p_start
}
i2p_status() {
/bin/su - -c "/bin/bash -l -c '( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\" ; directory status )'"
}
i2p_console() {
/bin/su - -c "/bin/bash -l -c '( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\" ; directory console )'"
}
i2p_dump() {
/bin/su - -c "/bin/bash -l -c '( export PATH=\"$PATH:/usr/lib/java/bin:/usr/lib/java/jre/bin\" ; directory dump )'"
}
case "$1" in
'start')
i2p_start
;;
'stop')
i2p_stop
;;
'restart')
i2p_restart
;;
'status')
i2p_status
;;
'console')
i2p_console
;;
'dump')
i2p_dump
;;
*)
echo "usage $0 start|stop|restart|status|console|dump"
;;
esac

View File

@ -1,10 +0,0 @@
An rc file called rc.i2p has been placed into the /etc/rc.d directory.
If you want to change installation dir, change the variable INSTALL_DIR
on base-i2p.SlackBuild and rebuild the package. You also will need to do the
same for the i2p package.
The install script will insert everything needed into /etc/rc.d/rc.local and
into /etc/rc.d/rc.local_shutdown automatically.
If you want to start I2P at boot you have to chmod +x /etc/rc.d/rc.i2p

View File

@ -1,19 +0,0 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
base-i2p: base-i2p (I2P anonymizing network base config files)
base-i2p:
base-i2p: I2P is an anonymizing network, offering a simple layer that
base-i2p: identity-sensitive applications can use to securely communicate. All
base-i2p: data is wrapped with several layers of encryption, and the network is
base-i2p: both distributed and dynamic, with no trusted parties.
base-i2p: Many applications are available that interface with I2P, including
base-i2p: mail, peer-peer file sharing, IRC chat, and others.
base-i2p:
base-i2p: This package provides the startup files.
base-i2p:

View File

@ -1 +0,0 @@
bash >= 3.1.017

89
Slackware/i2p/README Normal file
View File

@ -0,0 +1,89 @@
The I2P package will be installed to /opt/i2p.
To install to another location, set the variable INSTALL_DIR in i2p.SlackBuild
and rebuild the package.
Installing and Upgrading:
=========================
I2P has an auto-update function but generally speaking packages are managed by
packaging systems. Changing a package's files outside of the package system can
cause problems. To upgrade when there's a new I2P release, retrieve the new
source, re-run the SlackBuild, then use upgradepkg to update.
To ignore all this and upgrade "in-network", simply change the permissions of the installation
directory (/opt/i2p by default). Something like the following would suffice:
chown -R USERNAME /opt/i2p
Starting and using I2P
======================
Using the initscript
--------------------
To start I2P at boot, set the executable bit on /etc/rc.d/rc.i2p, add this
script to rc.local*, and set the variable "RUN_AS_USER" in /etc/rc.d/rc.i2p.
Optionally, create a new user/group with limited rights to run I2P.
Something like the following would work to start I2P at system boot, running under the
"i2p" account:
echo '[ -x /etc/rc.d/rc.i2p ] && /etc/rc.d/rc.i2p start' >> /etc/rc.d/rc.local
echo '[ -x /etc/rc.d/rc.i2p ] && /etc/rc.d/rc.i2p stop' >> /etc/.rc.d/rc.local_shutdown
sed -i .bak 's/^.*\(RUN_AS_USER\)=.*/\1=i2p/' /etc/rc.d/rc.i2p
chmod 755 /etc/rc.d/rc.i2p
Unless running as a user named "i2psvc", I2P's config directory defaults to
$HOME/.i2p. In the case of the "i2psvc" user, the default config directory is
/var/lib/i2p/i2p-config.
It should not need to be said that using the "root" account is not recommended.
When running using the initscript, I2P will write its logs to /var/log/i2p.
Starting I2P "on-demand"
------------------------
As with a normal installation, I2P can be started with "i2prouter start". The
i2prouter and eepget scripts hve been installed to /usr/bin so they'll be
accessible in the default system PATH.
When running using the i2prouter script, I2P will write its logs to $HOME/.i2p.
Configuring your browser
------------------------
In order to access eepSites (I2P-internal web sites) your web browser needs to
be configured. Set the HTTP Proxy to 127.0.0.1 and port 4444. For more information, see
https://geti2p.net/en/about/browser-config
The I2P router console is reachable at http://127.0.0.1:7657.
Addressbook subscriptions
-------------------------
Please see the FAQs at http://i2p-projekt.i2p/faq or https://geti2p.net/faq for information about
the various addressbook services.
Chatting on IRC
---------------
I2P comes preconfigured with a tunnel pointing to the I2P-only IRC network,
Irc2P. Signing on is easy, just connect to 127.0.0.1 on port 6668. Do not
configure a proxy in your IRC client.
Additional information
======================
Within I2P: http://i2p-projekt.i2p/, http://forum.i2p/, http://zzz.i2p/, http://trac.i2p2.i2p/
On the Internet: https://geti2p.net/, https://trac.i2p2.de
Manpages: i2prouter(1), eepget(1)

View File

@ -2,7 +2,7 @@
<project basedir="." default="slackpkg">
<target name="slackpkg">
<echo message="Building Slackware package." />
<exec executable="./i2p.SlackBuild">
</exec>
<chmod file="./i2p.Slackbuild" perm="755" />
<exec executable="./i2p.SlackBuild" failifexecutionfails="true" />
</target>
</project>

View File

@ -1,72 +1,60 @@
#!/bin/sh
# Abort on error or unset variables
set -e
set -u
# This is changed by i2p.SlackBuild
INST_DIR=directory
PKGNAME="%pkg"
( cd install
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $NEW ]; then
# If we get here there's a flaw in the packaging. We'll just return so that
# we don't emit a spurious error for the user. (It's not the user's problem).
return
fi
echo
for i in *.config ; {
if [ -f $INST_DIR/$i ] ; then
echo "Please check ${INST_DIR}${i}, as there is a new version."
cp $i $INST_DIR/$i.new
else
cp $i $INST_DIR/$i
fi
# If this file doesn't exist yet, drop the .new extension.
if [ ! -r $OLD ]; then
mv $NEW $OLD
return
elif [ "$(md5sum $OLD | cut -d' ' -f1)" = "$(md5sum $NEW | cut -d' ' -f1)" ]; then
# If there are no differences in the files, remove the file with the .new extension.
rm $NEW
return
fi
# Alert the admin if they differ, but let's not be terribly obnoxious about it.
echo "WARNING: The files $OLD and $NEW differ." >&2
}
)
# Unlike previous versions of the package, we install i2prouter and eepget to /usr/bin
# to make them available within the system PATH.
( cd $INST_DIR
if [ -f blocklist.txt ] ; then
echo "Please check ${INST_DIR}blocklist.txt, as there is a new version."
else
mv blocklist.txt.new blocklist.txt
fi
)
# Users might still want to /opt/i2p/i2prouter or /opt/i2p/eepget so we'll create symlinks
# in the installation directory.
ln -sf /usr/bin/eepget $INST_DIR
ln -sf /usr/bin/i2prouter $INST_DIR
(cd /usr/doc/$PKGNAME; ln -sf $INST_DIR/history.txt changelog)
( cd $INST_DIR/eepsite
if [ -f jetty.xml ] ; then
echo "Please check ${INST_DIR}/eepsite, as there are new files."
else
find $PKG/$INSTALL_DIR/i2p -name "*.xml.new" -exec sh -c 'mv "$0" "${0/.new}"' {} \;
fi
)
( cd $INST_DIR/eepsite/docroot
if [ -f index.html ] ; then
rm index.html.new
else
mv index.html.new index.html
fi
if [ -f favicon.ico ] ; then
rm favicon.ico.new
else
mv favicon.ico.new favicon.ico
fi
)
echo
echo "FINISHING I2P INSTALLATION. PLEASE WAIT."
cd $INST_DIR
OS_ARCH=`uname -m`
X86_64=`echo "$OS_ARCH" | grep x86_64`
if [ "X$X86_64" = "X" ]; then
wrapperpath="./lib/wrapper/linux"
if $(uname -m | grep -q '64'); then
(cd $INST_DIR; ln -sf i2psvc-linux-x86-64 i2psvc)
else
wrapperpath="./lib/wrapper/linux64"
(cd $INST_DIR; ln -sf i2psvc-linux-x86-32 i2psvc)
fi
cp $wrapperpath/libwrapper.so ./lib/
cp $wrapperpath/wrapper.jar ./lib/
cp $wrapperpath/i2psvc .
rm -rf ./lib/wrapper
chmod 744 ./i2psvc
echo
echo "Installation finished."
echo
config /etc/rc.d/rc.i2p.new
config $INST_DIR/wrapper.config.new
exit
if [ -e /var/log/packages/i2p-base* ]; then
echo "Warning: This package supercedes the 'i2p-base' package." >&2
echo
echo "You may want to 'removepkg i2p-base'" >&2
echo "and check the contents of /etc/rc.d/rc.local*" >&2
echo "for correctness" >&2
fi
# Remove extraneous 'sh' from sponge's set-up
sed -i 's|sh /etc/rc\.d/rc\.i2p|/etc/rc.d/rc.i2p|g' /etc/rc.d/rc.local*

View File

@ -3,135 +3,124 @@
# Heavily based on the Slackware 12.2 SlackBuild
# Slackware build script for I2P
#
# PLEASE READ THIS:
# Probably you will never have to update I2P packages with upgradepkg,
# just because I2P has an auto-update function.
# Really you should not ever use any "upgrade" method.
#
# The correct way to upgrade is to:
# 1: install the upgrade
# 2: remove the old package
#
# It is a terrible shame that upgradepkg doesn't do this, infact,
# it would actually be the correct way for *any* package!
# Packages are generally prohibited from being updated outside
# of the package manager; this I2P SlackBuild is no different.
#
# If you'd like to use the I2P "in-network" updates anyway, you'll need to
# grant the user that I2P will run as write permission to the installation directory
# (/opt/i2p by default).
#
# For safety's sake, a user's I2P config files will *never* be overwritten by any upgrade method.
# In the future this SlackBuild may alert when a default config file is updated.
##
BUILD=1sponge
# Make sure makepkg and friends can be found
PATH=$PATH:/sbin
# abort on error and unset variables (same as set -e and set -u, respectively)
set -o errexit
set -o nounset
if [ $(id -ur) -ne 0 ]; then
echo "ERROR: SlackBuilds require root access." >&2
exit 1
fi
BUILD=1kytv
# INSTALL_DIR is referenced from /, don't prefix it with a '/'
INSTALL_DIR=opt
NAME=i2p
ARCH=noarch
# Less than slackware 13?
SLKPLT=$(cat /etc/slackware-version | sed -re "s/(Slackware )([0-9]*)(.*)/\2/")
if [ $SLKPLT -lt 13 ] ; then
EXT=tgz
else
EXT=txz
fi
#
# This mess is here due to the totally moronic way i2p does versioning.
# We correct it here.
#
ROUTER=$(echo -ne "_")$(cat ../../router/java/src/net/i2p/router/RouterVersion.java | grep -e "public final static long BUILD" | cut -f2 -d"=" | cut -f1 -d";" | sed -re "s/ //g")
if [ "$ROUTER" == "_" ] ; then
ROUTER="_0"
fi
#
# That was the easy one, now for the tough one.
#
CORE=$(cat ../../core/java/src/net/i2p/CoreVersion.java | grep -e "public final static String VERSION" | cut -f2 -d'"' | sed -re "s/ //g")
CORE1=$(echo -n $CORE.x.x | sed -re "s/(.*)\.(.*)\.(.*)\.(.*)/\1/")
CORE2=$(echo -n $CORE.x | sed -re "s/(.*)\.(.*)\.(.*)\.(.*)/\1/")
if [ "$CORE.x.x" == "$CORE1" ] ; then
CORE=$(echo -ne $CORE".0.0")
fi
if [ "$CORE.x" == "$CORE2" ] ; then
CORE=$(echo -ne $CORE".0")
fi
VERSION=$(echo $CORE$ROUTER)
#
# Whew!
# OK, let's build i2p
#
CWD=$(pwd)
CWD=$(readlink -m $(dirname $0))
I2PSRC=$(readlink -m $CWD/../../)
TMP=/tmp
PKG=$TMP/package-i2p
rm -rf $PKG
mkdir -p $PKG
cd $CWD/../../
if [ -e "/etc/slackware-version" ]; then
# Older than Slackware 13?
SLACKVER=$(sed -e "s/Slackware\s\+\([0-9]\+\)\.\?\([0-9]\+\)\?/\1/" /etc/slackware-version)
if [ $SLACKVER -lt 13 ] ; then
EXT=tgz
else
EXT=txz
fi
else
echo "ERROR: This script is only intended for use on Slackware systems.">&2
exit 1
fi
# Extract version strings
I2PBUILD=$(sed -e '/^.\+long\s\+BUILD/!d' -e 's/^.\+long\s\+BUILD\s\+=\s\+\([0-9]\+\);/\1/' $I2PSRC/router/java/src/net/i2p/router/RouterVersion.java)
# Thanks to user "ihavei2p" for the second awk statement
# If the version is x.y, it'll be set to x.y.0. Otherwise the version string will be unchanged
CORE=$(awk -F'"' '/static\s+String\s+VERSION/{print $2}' $I2PSRC/core/java/src/net/i2p/CoreVersion.java | \
awk -F. '{ if (NF > 3) { print; exit } else if ($3 == "") { $3=0; print $1"."$2"."$3 } else print }')
VERSION="${CORE}_${I2PBUILD}"
[ -d $PKG ] && rm -rf $PKG
mkdir -p $PKG/$INSTALL_DIR $PKG/install
cd "$I2PSRC"
ant distclean
#ant dist
ant tarball
ant jbigi-linux-x86-only preppkg-unix
tar xjvf i2p.tar.bz2 -C $TMP
chown -R root:root $I2PSRC/pkg-temp
cp -a $I2PSRC/pkg-temp $PKG/$INSTALL_DIR/i2p
cd $TMP/i2p
chown -R root:root .
mkdir -p $PKG/$INSTALL_DIR/
cp -a ../i2p $PKG/$INSTALL_DIR/
mkdir -p $PKG/install
#############################################################################
# Preconfigureation to make package smaller, and...
# we keep as much as reasonable in the installation directory.
# This makes the install map fairly well to the standard installation.
# It also makes it easier to find the log and pid files!
#############################################################################
# $INSTALL_DIR is used by this SlackBuild.
# [%$]INSTALL_PATH , [%$]SYSTEM_java_io_tmpdir, and [%$]USER_HOME have the correct paths set
# by the IzPack installer.
cd $PKG/$INSTALL_DIR/i2p
for file in wrapper.config eepget i2prouter runplain.sh; do
sed -i "s|[%$]INSTALL_PATH|/$INSTALL_DIR/i2p|g;s|[$%]SYSTEM_java_io_tmpdir|$TMP|g;s/[%$]USER_HOME/\$HOME/g" $file
done
mv wrapper.config wrapper.config.new
# wrapper.config $INSTALL_PATH and $SYSTEM_java_io_tmpdir
sed "s|\$INSTALL_PATH|/$INSTALL_DIR/i2p|g" wrapper.config > a
sed "s|\$SYSTEM_java_io_tmpdir|/$INSTALL_DIR/i2p|g" a > wrapper.config
# eepget %INSTALL_PATH
sed "s|\$INSTALL_PATH|/$INSTALL_DIR/i2p|g" eepget > a
rm eepget
mv a eepget
# runplain.sh %INSTALL_PATH and %SYSTEM_java_io_tmpdir
sed "s|%INSTALL_PATH|/$INSTALL_DIR/i2p|g" runplain.sh > a
sed "s|%SYSTEM_java_io_tmpdir|/$INSTALL_DIR/i2p|g" a > runplain.sh
# i2prouter %INSTALL_PATH and %SYSTEM_java_io_tmpdir
sed "s|%INSTALL_PATH|/$INSTALL_DIR/i2p|g" i2prouter > a
rm i2prouter
mv a i2prouter
sed "s|%SYSTEM_java_io_tmpdir|/$INSTALL_DIR/i2p|g" i2prouter > a
sed "s|#ALLOW_ROOT=true|ALLOW_ROOT=true|g" a > i2prouter
install -d $PKG/usr/bin
install -d $PKG/usr/doc/$NAME-$VERSION
install -d $PKG/etc/rc.d
mv licenses LICENSE.txt -t $PKG/usr/doc/$NAME-$VERSION
chmod 744 ./i2prouter
chmod 744 ./osid
chmod 744 ./runplain.sh
chmod 744 ./eepget
chmod 744 ./scripts/i2pbench.sh
chmod 744 ./scripts/i2ptest.sh
rm -Rf ./lib/*.dll ./*.bat ./*.exe ./installer ./icons ./a postinstall.sh
# runplain.sh will live in the installation directory. eepget and i2prouter will go to /usr/bin
# with symlinks in INST_DIR (created in doinst.sh)
install -m755 i2prouter $PKG/usr/bin
install -m755 eepget $PKG/usr/bin
chmod 755 ./runplain.sh
mv $PKG/$INSTALL_DIR/i2p/*.config $PKG/install
mv $PKG/$INSTALL_DIR/i2p/blocklist.txt $PKG/$INSTALL_DIR/i2p/blocklist.txt.new
find $PKG/$INSTALL_DIR/i2p -name "*.xml" -exec mv {} {}.new \;
mv $PKG/$INSTALL_DIR/i2p/eepsite/docroot/index.html $PKG/$INSTALL_DIR/i2p/eepsite/docroot/index.html.new
mv $PKG/$INSTALL_DIR/i2p/eepsite/docroot/favicon.ico $PKG/$INSTALL_DIR/i2p/eepsite/docroot/favicon.ico.new
sed "s|directory|/$INSTALL_DIR/i2p/|g" $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
if [ $INSTALL_DIR != 'opt' ]; then
sed "s|\(The I2P package\)\s\+will be\s\+\(installed to\).+|\1 has been \2 $INSTALL_DIR/i2p|g" $CWD/README > $PKG/usr/doc/$NAME-$VERSION/README
else
sed "s|will be installed|has been installed|" $CWD/README > $PKG/usr/doc/$NAME-$VERSION/README
fi
install -d $PKG/usr/man/man1
gzip -9 man/*.1
install -m644 man/*.1.gz $PKG/usr/man/man1
rm -rf ./man
# We install all x86 wrapper binaries.
# The i2prouter script will try to determine the OS (linux), the bits (32 VS 64) and should be able
# to figure out the correct wrapper binary to use.
# However: In case the i2prouter script's detection fails, "$INST_DIR/i2psvc" will point to
# what 'we' think the correct binary is.
#
# A good reason for installing all binaries: in case the user, for whatever reason, switches from an
# x64 JRE to an x86 JRE, I2P should continue to work without needing to be reinstalled.
install -m755 $I2PSRC/installer/lib/wrapper/linux/i2psvc ./i2psvc-linux-x86-32
install -m644 $I2PSRC/installer/lib/wrapper/linux/libwrapper.so ./lib/libwrapper-linux-x86-32.so
install -m755 $I2PSRC/installer/lib/wrapper/linux64/i2psvc ./i2psvc-linux-x86-64
install -m644 $I2PSRC/installer/lib/wrapper/linux64/libwrapper.so ./lib/libwrapper-linux-x86-64.so
install -m644 $I2PSRC/installer/lib/wrapper/all/wrapper.jar ./lib/wrapper.jar
install -m644 $I2PSRC/build/jbigi.jar $PKG/$INSTALL_DIR/i2p/lib/jbigi.jar
rm -f ./postinstall.sh ./osid ./INSTALL-*.txt
sed "s|directory|/$INSTALL_DIR/i2p|" $CWD/doinst.sh > $PKG/install/doinst.sh
sed -i "s|%pkg|$NAME-$VERSION|" $PKG/install/doinst.sh
sed "s|%INST_DIR|/$INSTALL_DIR/i2p|" $CWD/rc.i2p> $PKG/etc/rc.d/rc.i2p.new
cp $CWD/slack-desc $PKG/install/slack-desc
cd $PKG
#
# requiredbuilder messes up REALLY bad, and thinks java is perl?!
# It also did not catch the shell requirements! BOOOOOOOOOOO! HISSSSSSSS!
#
# requiredbuilder -v -y -s $CWD $PKG
#
cat $CWD/slack-required > $PKG/install/slack-required
cp $CWD/slack-required $PKG/install/slack-required
makepkg -l y -c n $CWD/${NAME}-$VERSION-$ARCH-$BUILD.$EXT

185
Slackware/i2p/rc.i2p Normal file
View File

@ -0,0 +1,185 @@
#!/bin/sh
# Abort on errors
set -e
##
# This *must* be configured. Set this to the user that will run I2P.
# Note: If you don't want I2P to start automatically at boot,
# use "i2prouter start" as a non-root user to start I2P.
#RUN_AS_USER=
##
##
# Set the locale as desired.
# Note: this is not the same as the language shown in the I2P router console.
# This affects the locale used in wrapper.log. For best results, use a
# unicode enabled locale. This is especially important for foreign language torrents.
#
# If not set the user's configured locale will be used.
#RCLOCALE=
##
#####################################################
# Nothing below this point should need to be edited #
#####################################################
# %INST_DIR is set by i2p.SlackBuild
INSTALL_DIR="%INST_DIR"
# Make sure the package is installed and that the wrapper can be found
[ -d $INSTALL_DIR ] && [ -x $INSTALL_DIR/i2psvc ] || (echo "The I2P package is not installed" >&2 ; exit 1)
if [ -z $RUN_AS_USER ]; then
echo "ERROR: RUN_AS_USER not configured in $0" >&2
exit 1
fi
if [ $(id -ur) -ne 0 ]; then
echo 'ERROR: You must be root to start this service.' >&2
echo
exit 1
fi
if [ -z $RCLOCALE ]; then
if [ ! $(locale -a |grep -q "en_US\.utf8") ]; then
RCLOCALE="en_US.utf8"
fi
fi
# Abort this script if any referenced variables haven't been set
set -u
if $(uname -m |grep -q '64'); then
BITS='64'
else
BITS=''
fi
PATH="$PATH:/usr/lib$BITS/java/bin:/usr/lib$BITS/java/jre/bin"
RUN=/var/run/i2p
PIDFILE="$RUN/i2p.pid"
WRAPPER_CONF="$INSTALL_DIR/wrapper.config"
WRAPPERLOG=/var/log/i2p/wrapper.log
I2PTEMP="/tmp/i2p-daemon"
DESC="The I2P daemon"
JAVABINARY=$(awk -F'=' '/^ *wrapper\.java\.command/{print $2}' "$WRAPPER_CONF")
if [ ! $(which $JAVABINARY 2>/dev/null) ]; then
for rc in /etc/profile.d/*jdk*.sh /etc/profile.d/*java*.sh; do
[ -r $rc ] && . $rc
done
if [ ! $(which $JAVABINARY 2>/dev/null) ]; then
echo "ERROR: Cannot find java. Please set the path to java in $WRAPPER_CONF" >&2
exit 1
fi
fi
JAVA=$(which $JAVABINARY 2>/dev/null)
I2P_ARGS="$WRAPPER_CONF \
wrapper.java.additional.1=-DloggerFilenameOverride=/var/log/i2p/log-router-@.txt \
wrapper.java.additional.10=-Dwrapper.logfile=$WRAPPERLOG \
wrapper.java.additional.11=-Di2p.dir.pid=$RUN \
wrapper.java.additional.12=-Di2p.dir.temp=$I2PTEMP \
wrapper.java.command=$JAVA \
wrapper.logfile=$WRAPPERLOG \
wrapper.pidfile=$PIDFILE \
wrapper.daemonize=TRUE"
LC_ALL=$RCLOCALE
LANG=$RCLOCALE
export LC_ALL LANG
is_running() {
if [ -r $PIDFILE ]; then
PID="$(cat ${PIDFILE})" 2>/dev/null 2>&1
if ! kill -0 $PID >/dev/null 2>&1; then
rm "$PIDFILE"
return 1
else
return 0
fi
else
return 1
fi
}
start() {
if is_running; then
echo "ERROR: $DESC is already running." >&2
fi
for DIR in $RUN $I2PTEMP; do
test -d $DIR && rm -rf $DIR
mkdir -p $DIR
chown -R $RUN_AS_USER $DIR
done
[ -d /var/log/i2p ] || mkdir /var/log/i2p
chown -R $RUN_AS_USER /var/log/i2p
echo -n "Starting $DESC..."
TZ=UTC su $RUN_AS_USER -c "$INSTALL_DIR/i2psvc $I2P_ARGS"
is_running
echo "[pid: $PID]"
}
stop(){
if is_running; then
echo -n "Stopping $DESC [pid: $PID] (this could take a while)."
kill "$PID" >/dev/null 2>&1
while kill -0 "$PID" > /dev/null 2>&1; do
echo -n .
sleep 1
done
rm -rf "$RUN" "$I2PTEMP"
echo done.
return 0
else
echo "$DESC is not running." >&2
return 1
fi
}
# Unset +u to allow the 'usage' text to be displayed
set +u
case "$1" in
start)
start
;;
status)
if is_running; then
echo "$DESC is running [pid: $PID]" >&2
else
echo "$DESC is not running." >&2
fi
;;
stop)
stop
;;
graceful)
if is_running; then
kill -HUP $PID
echo "Graceful shutdown of $DESC initiated." >&2
echo "This may take up to 11 minutes." >&2
fi
;;
dump)
if is_running; then
kill -3 $PID
echo "Threads dumped to $WRAPPERLOG" >&2
else
echo "$DESC is not running." >&2
fi
;;
restart)
if is_running; then
stop
start
else
echo "$DESC is not running." >&2
fi
;;
*)
echo "usage: $0 start|stop|status|restart|graceful|dump"
;;
esac

View File

@ -1,47 +0,0 @@
Building:
The i2p package will be installed in /opt/i2p
If you want to change installation dir, change the variable INSTALL_DIR
on i2p.SlackBuild and rebuild the package. You will also need to do the same
in the base-i2p package.
Installation and Upgrade:
Probably you will never have to update i2p packages. However if you do,
be sure to installpkg first, then removepkg or custom config files can
be lost with upgradepkg. I2P has an auto-update function. However using
installpkg then removepkg lowers the demand on the I2P network as a
whole, and is by far faster.
After installpkg command, doinst.sh will execute a postinstallation script
needed by I2P. Be sure to also install the base-i2p package.
Optional:
chmod +x /etc/rc.d/rc.i2p only if you want it to start on boot and stop on
shutdown.
How to start I2P:
Start I2P service with-
sh /etc/rc.d/rc.i2p start
Now tell your browser to user this proxy: localhost on port 4444 and open
this page: http://localhost:7657/index.jsp
Here you can configure I2P, watch network status and navigate anonimously.
It's suggested to subscribe to various addressbook hosts so that you can
get to the many available eepsites and other service on I2P. These are not
set up by default for security reasons.
Please see the faqs on http://www.i2p2.i2p/ or http://www.i2p2.de/ on how
to subscribe to the various addressbook services.
To stop I2P:
/etc/rc.d/rc.i2p stop
For any additional information:
Within I2P- http://www.i2p2.i2p/, http://forum.i2p/, http://zzz.i2p
Internet (not reccomended!) - http://www.i2p2.de/, http://forum.i2p2.de/

View File

@ -6,7 +6,7 @@
# leave one space after the ':'.
|-----handy-ruler----------------------------------------------------------|
i2p: i2p (an anonymizing network)
i2p: I2P (an anonymizing network)
i2p:
i2p: I2P is an anonymizing network, offering a simple layer that
i2p: identity-sensitive applications can use to securely communicate. All
@ -14,6 +14,6 @@ i2p: data is wrapped with several layers of encryption, and the network is
i2p: both distributed and dynamic, with no trusted parties.
i2p: Many applications are available that interface with I2P, including
i2p: mail, peer-peer file sharing, IRC chat, and others.
i2p: WARNING: To upgrade installpkg FIRST _THEN_ removepkg.
i2p: For more information, see: http://www.i2p2.de/
i2p:
i2p: For more information, see: https://geti2p.net/
i2p:

View File

@ -1,4 +1 @@
jre >= 5
i2p-base >= 0.0.1
bash >= 3.1.017
jre >= 6

8
apps/BOB/.classpath Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry combineaccessrules="false" kind="src" path="/i2p_sdk"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/ministreaming"/>
<classpathentry kind="output" path="build"/>
</classpath>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>lib</name>
<name>BOB</name>
<comment></comment>
<projects>
</projects>

View File

@ -15,6 +15,8 @@
*/
package net.i2p.BOB;
import static net.i2p.app.ClientAppState.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@ -25,13 +27,17 @@ import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.util.Arrays;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import net.i2p.I2PAppContext;
import net.i2p.app.*;
import net.i2p.client.I2PClient;
import net.i2p.util.Log;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.I2PAppThread;
import net.i2p.util.SimpleTimer2;
/**
@ -105,57 +111,78 @@ import net.i2p.util.SimpleTimer2;
*
* @author sponge
*/
public class BOB {
public class BOB implements Runnable, ClientApp {
public final static String PROP_CONFIG_LOCATION = "BOB.config";
public final static String PROP_BOB_PORT = "BOB.port";
public final static String PROP_BOB_HOST = "BOB.host";
public final static String PROP_CFG_VER = "BOB.CFG.VER";
private static NamedDB database;
private static Properties props = new Properties();
private static AtomicBoolean spin = new AtomicBoolean(true);
/** unused when started via the ClientApp interface */
private static BOB _bob;
private final NamedDB database;
private final Properties props = new Properties();
private final AtomicBoolean spin = new AtomicBoolean(true);
private static final String P_RUNNING = "RUNNING";
private static final String P_STARTING = "STARTING";
private static final String P_STOPPING = "STOPPING";
private static AtomicBoolean lock = new AtomicBoolean(false);
private final AtomicBoolean lock = new AtomicBoolean(false);
// no longer used.
// private static int maxConnections = 0;
/**
* Log a warning
*
* @param arg
*/
public static void info(String arg) {
System.out.println("INFO:" + arg);
(new Log(BOB.class)).info(arg);
}
private final Logger _log;
private final ClientAppManager _mgr;
private final String[] _args;
private volatile ClientAppState _state = UNINITIALIZED;
/**
* Log a warning
*
* @param arg
*/
public static void warn(String arg) {
System.out.println("WARNING:" + arg);
(new Log(BOB.class)).warn(arg);
}
/**
* Log an error
*
* @param arg
*/
public static void error(String arg) {
System.out.println("ERROR: " + arg);
(new Log(BOB.class)).error(arg);
}
private volatile ServerSocket listener;
private volatile Thread _runner;
/**
* Stop BOB gracefully
* @deprecated unused
*/
public static void stop() {
spin.set(false);
public synchronized static void stop() {
if (_bob != null)
_bob.shutdown(null);
}
/**
* For ClientApp interface.
* Does NOT open the listener socket or start threads; caller must call startup()
*
* @param mgr may be null
* @param args non-null
* @throws Exception on bad args
* @since 0.9.10
*/
public BOB(I2PAppContext context, ClientAppManager mgr, String[] args) {
// If we were run from command line, log to stdout
boolean logToStdout = false;
URL classResource = BOB.class.getResource("BOB.class");
if (classResource != null) {
String classPath = classResource.toString();
if (classPath.startsWith("jar")) {
String manifestPath = classPath.substring(0, classPath.lastIndexOf("!") + 1) +
"/META-INF/MANIFEST.MF";
try {
Manifest manifest = new Manifest(new URL(manifestPath).openStream());
Attributes attrs = manifest.getMainAttributes();
String mainClass = attrs.getValue("Main-Class");
if ("net.i2p.BOB.Main".equals(mainClass))
logToStdout = true;
} catch (IOException ioe) {}
}
}
_log = new Logger(context.logManager().getLog(BOB.class), logToStdout);
_mgr = mgr;
_args = args;
_state = INITIALIZED;
database = new NamedDB();
loadConfig();
}
/**
@ -163,129 +190,169 @@ public class BOB {
*
* @param args
*/
public static void main(String[] args) {
database = new NamedDB();
ServerSocket listener = null;
public synchronized static void main(String[] args) {
try {
_bob = new BOB(I2PAppContext.getGlobalContext(), null, args);
_bob.startup();
} catch (RuntimeException e) {
e.printStackTrace();
throw e;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
/**
* @since 0.9.10
*/
private void loadConfig() {
int i = 0;
boolean save = false;
// Set up all defaults to be passed forward to other threads.
// Re-reading the config file in each thread is pretty damn stupid.
String configLocation = System.getProperty(PROP_CONFIG_LOCATION, "bob.config");
// This is here just to ensure there is no interference with our threadgroups.
SimpleScheduler Y1 = SimpleScheduler.getInstance();
SimpleTimer2 Y2 = SimpleTimer2.getInstance();
i = Y1.hashCode();
i = Y2.hashCode();
Log _log = new Log(BOB.class);
try {
{
File cfg = new File(configLocation);
if (!cfg.isAbsolute()) {
cfg = new File(I2PAppContext.getGlobalContext().getConfigDir(), configLocation);
}
try {
FileInputStream fi = new FileInputStream(cfg);
props.load(fi);
fi.close();
} catch (FileNotFoundException fnfe) {
warn("Unable to load up the BOB config file " + cfg.getAbsolutePath() + ", Using defaults.");
warn(fnfe.toString());
save = true;
} catch (IOException ioe) {
warn("IOException on BOB config file " + cfg.getAbsolutePath() + ", using defaults.");
warn(ioe.toString());
}
{
File cfg = new File(configLocation);
if (!cfg.isAbsolute()) {
cfg = new File(I2PAppContext.getGlobalContext().getConfigDir(), configLocation);
}
// Global router and client API configurations that are missing are set to defaults here.
if (!props.containsKey(I2PClient.PROP_TCP_HOST)) {
props.setProperty(I2PClient.PROP_TCP_HOST, "localhost");
save = true;
}
if (!props.containsKey(I2PClient.PROP_TCP_PORT)) {
props.setProperty(I2PClient.PROP_TCP_PORT, "7654");
save = true;
}
if (!props.containsKey(PROP_BOB_PORT)) {
props.setProperty(PROP_BOB_PORT, "2827"); // 0xB0B
save = true;
}
if (!props.containsKey("inbound.length")) {
props.setProperty("inbound.length", "1");
save = true;
}
if (!props.containsKey("outbound.length")) {
props.setProperty("outbound.length", "1");
save = true;
}
if (!props.containsKey("inbound.lengthVariance")) {
props.setProperty("inbound.lengthVariance", "0");
save = true;
}
if (!props.containsKey("outbound.lengthVariance")) {
props.setProperty("outbound.lengthVariance", "0");
save = true;
}
if (!props.containsKey(PROP_BOB_HOST)) {
props.setProperty(PROP_BOB_HOST, "localhost");
save = true;
}
// PROP_RELIABILITY_NONE, PROP_RELIABILITY_BEST_EFFORT, PROP_RELIABILITY_GUARANTEED
if (!props.containsKey(PROP_CFG_VER)) {
props.setProperty(I2PClient.PROP_RELIABILITY, I2PClient.PROP_RELIABILITY_NONE);
props.setProperty(PROP_CFG_VER,"1");
save = true;
}
if (save) {
File cfg = new File(configLocation);
if (!cfg.isAbsolute()) {
cfg = new File(I2PAppContext.getGlobalContext().getConfigDir(), configLocation);
}
try {
warn("Writing new defaults file " + cfg.getAbsolutePath());
FileOutputStream fo = new FileOutputStream(cfg);
props.store(fo, cfg.getAbsolutePath());
fo.close();
} catch (IOException ioe) {
error("IOException on BOB config file " + cfg.getAbsolutePath() + ", " + ioe);
}
}
i = 0;
boolean g = false;
spin.set(true);
FileInputStream fi = null;
try {
info("BOB is now running.");
listener = new ServerSocket(Integer.parseInt(props.getProperty(PROP_BOB_PORT)), 10, InetAddress.getByName(props.getProperty(PROP_BOB_HOST)));
Socket server = null;
listener.setSoTimeout(500); // .5 sec
while (spin.get()) {
//DoCMDS connection;
try {
server = listener.accept();
server.setKeepAlive(true);
g = true;
} catch (ConnectException ce) {
g = false;
} catch (SocketTimeoutException ste) {
g = false;
}
if (g) {
DoCMDS conn_c = new DoCMDS(spin, lock, server, props, database, _log);
Thread t = new Thread(conn_c);
t.setName("BOB.DoCMDS " + i);
t.start();
i++;
}
}
fi = new FileInputStream(cfg);
props.load(fi);
} catch (FileNotFoundException fnfe) {
_log.warn("Unable to load up the BOB config file " + cfg.getAbsolutePath() + ", Using defaults.", fnfe);
save = true;
} catch (IOException ioe) {
error("IOException on socket listen: " + ioe);
ioe.printStackTrace();
_log.warn("IOException on BOB config file " + cfg.getAbsolutePath() + ", using defaults.", ioe);
} finally {
if (fi != null) try { fi.close(); } catch (IOException ioe) {}
}
}
// Global router and client API configurations that are missing are set to defaults here.
if (!props.containsKey(I2PClient.PROP_TCP_HOST)) {
props.setProperty(I2PClient.PROP_TCP_HOST, "localhost");
save = true;
}
if (!props.containsKey(I2PClient.PROP_TCP_PORT)) {
props.setProperty(I2PClient.PROP_TCP_PORT, "7654");
save = true;
}
if (!props.containsKey(PROP_BOB_PORT)) {
props.setProperty(PROP_BOB_PORT, "2827"); // 0xB0B
save = true;
}
if (!props.containsKey("inbound.length")) {
props.setProperty("inbound.length", "1");
save = true;
}
if (!props.containsKey("outbound.length")) {
props.setProperty("outbound.length", "1");
save = true;
}
if (!props.containsKey("inbound.lengthVariance")) {
props.setProperty("inbound.lengthVariance", "0");
save = true;
}
if (!props.containsKey("outbound.lengthVariance")) {
props.setProperty("outbound.lengthVariance", "0");
save = true;
}
if (!props.containsKey(PROP_BOB_HOST)) {
props.setProperty(PROP_BOB_HOST, "localhost");
save = true;
}
// PROP_RELIABILITY_NONE, PROP_RELIABILITY_BEST_EFFORT, PROP_RELIABILITY_GUARANTEED
if (!props.containsKey(PROP_CFG_VER)) {
props.setProperty(I2PClient.PROP_RELIABILITY, I2PClient.PROP_RELIABILITY_NONE);
props.setProperty(PROP_CFG_VER,"1");
save = true;
}
if (save) {
File cfg = new File(configLocation);
if (!cfg.isAbsolute()) {
cfg = new File(I2PAppContext.getGlobalContext().getConfigDir(), configLocation);
}
FileOutputStream fo = null;
try {
_log.warn("Writing new defaults file " + cfg.getAbsolutePath());
fo = new FileOutputStream(cfg);
props.store(fo, cfg.getAbsolutePath());
} catch (IOException ioe) {
_log.error("IOException on BOB config file " + cfg.getAbsolutePath(), ioe);
} finally {
if (fo != null) try { fo.close(); } catch (IOException ioe) {}
}
}
}
/**
* @since 0.9.10
*/
private void startListener() throws IOException {
listener = new ServerSocket(Integer.parseInt(props.getProperty(PROP_BOB_PORT)), 10, InetAddress.getByName(props.getProperty(PROP_BOB_HOST)));
listener.setSoTimeout(500); // .5 sec
}
/**
* @since 0.9.10
*/
private void startThread() {
I2PAppThread t = new I2PAppThread(this, "BOBListener");
t.start();
_runner = t;
}
/**
* @since 0.9.10
*/
public void run() {
if (listener == null) return;
changeState(RUNNING);
_log.info("BOB is now running.");
if (_mgr != null)
_mgr.register(this);
int i = 0;
boolean g = false;
spin.set(true);
try {
Socket server = null;
while (spin.get()) {
//DoCMDS connection;
try {
server = listener.accept();
server.setKeepAlive(true);
g = true;
} catch (ConnectException ce) {
g = false;
} catch (SocketTimeoutException ste) {
g = false;
}
if (g) {
DoCMDS conn_c = new DoCMDS(spin, lock, server, props, database, _log);
Thread t = new I2PAppThread(conn_c);
t.setName("BOB.DoCMDS " + i);
t.start();
i++;
}
}
changeState(STOPPING);
} catch (Exception e) {
if (spin.get())
_log.error("Unexpected error while listening for connections", e);
else
e = null;
changeState(STOPPING, e);
} finally {
info("BOB is now shutting down...");
_log.info("BOB is now shutting down...");
// Clean up everything.
try {
listener.close();
@ -308,7 +375,7 @@ public class BOB {
database.releaseReadLock();
database.getWriteLock();
nickinfo.getWriteLock();
nickinfo.add(P_STOPPING, new Boolean(true));
nickinfo.add(P_STOPPING, Boolean.valueOf(true));
nickinfo.releaseWriteLock();
database.releaseWriteLock();
} else {
@ -316,8 +383,8 @@ public class BOB {
database.releaseReadLock();
}
}
info("BOB is now stopped.");
changeState(STOPPED);
_log.info("BOB is now stopped.");
}
}
@ -369,4 +436,86 @@ public class BOB {
waitjoin(groups[i], level + 1, groups[i].getName());
}
}
////// begin ClientApp interface
/**
* @since 0.9.10
*/
@Override
public void startup() throws IOException {
if (_state != INITIALIZED)
return;
changeState(STARTING);
try {
startListener();
} catch (IOException e) {
_log.error("Error starting BOB on"
+ props.getProperty(PROP_BOB_HOST)
+ ":" + props.getProperty(PROP_BOB_PORT), e);
changeState(START_FAILED, e);
throw e;
}
startThread();
}
/**
* @since 0.9.10
*/
@Override
public void shutdown(String[] args) {
if (_state != RUNNING)
return;
changeState(STOPPING);
spin.set(false);
if (_runner != null)
_runner.interrupt();
else
changeState(STOPPED);
}
/**
* @since 0.9.10
*/
@Override
public ClientAppState getState() {
return _state;
}
/**
* @since 0.9.10
*/
@Override
public String getName() {
return "BOB";
}
/**
* @since 0.9.10
*/
@Override
public String getDisplayName() {
return "BOB " + Arrays.toString(_args);
}
////// end ClientApp interface
////// begin ClientApp helpers
/**
* @since 0.9.10
*/
private void changeState(ClientAppState state) {
changeState(state, null);
}
/**
* @since 0.9.10
*/
private synchronized void changeState(ClientAppState state, Exception e) {
_state = state;
if (_mgr != null)
_mgr.notify(this, state, null, e);
}
////// end ClientApp helpers
}

View File

@ -25,13 +25,13 @@ import java.util.Locale;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.I2PAppContext;
import net.i2p.I2PException;
import net.i2p.client.I2PClientFactory;
//import net.i2p.data.DataFormatException;
import net.i2p.data.Destination;
//import net.i2p.i2ptunnel.I2PTunnel;
import net.i2p.util.Log;
import net.i2p.util.I2PAppThread;
// needed only for debugging.
// import java.util.logging.Level;
// import java.util.logging.Logger;
@ -56,7 +56,7 @@ public class DoCMDS implements Runnable {
private ByteArrayOutputStream prikey;
private boolean dk, ns, ip, op;
private NamedDB nickinfo;
private Log _log;
private Logger _log;
private AtomicBoolean LIVE;
private AtomicBoolean lock;
/* database strings */
@ -164,7 +164,7 @@ public class DoCMDS implements Runnable {
* @param database
* @param _log
*/
DoCMDS(AtomicBoolean LIVE, AtomicBoolean lock, Socket server, Properties props, NamedDB database, Log _log) {
DoCMDS(AtomicBoolean LIVE, AtomicBoolean lock, Socket server, Properties props, NamedDB database, Logger _log) {
this.lock = lock;
this.LIVE = LIVE;
this.server = server;
@ -606,7 +606,7 @@ public class DoCMDS implements Runnable {
break die;
}
} catch (I2PException ipe) {
BOB.error("Error generating keys" + ipe);
_log.error("Error generating keys", ipe);
out.println("ERROR generating keys");
}
@ -665,7 +665,7 @@ public class DoCMDS implements Runnable {
break die;
}
try {
nickinfo.add(P_QUIET, new Boolean(Boolean.parseBoolean(Arg) == true));
nickinfo.add(P_QUIET, Boolean.valueOf(Arg));
} catch (Exception ex) {
try {
wunlock();
@ -817,10 +817,10 @@ public class DoCMDS implements Runnable {
try {
database.add(Arg, nickinfo);
nickinfo.add(P_NICKNAME, Arg);
nickinfo.add(P_STARTING, new Boolean(false));
nickinfo.add(P_RUNNING, new Boolean(false));
nickinfo.add(P_STOPPING, new Boolean(false));
nickinfo.add(P_QUIET, new Boolean(false));
nickinfo.add(P_STARTING, Boolean.valueOf(false));
nickinfo.add(P_RUNNING, Boolean.valueOf(false));
nickinfo.add(P_STOPPING, Boolean.valueOf(false));
nickinfo.add(P_QUIET, Boolean.valueOf(false));
nickinfo.add(P_INHOST, "localhost");
nickinfo.add(P_OUTHOST, "localhost");
Properties Q = new Properties();
@ -989,7 +989,7 @@ public class DoCMDS implements Runnable {
prt = Integer.parseInt(Arg);
if (prt > 1 && prt < 65536) {
try {
nickinfo.add(P_INPORT, new Integer(prt));
nickinfo.add(P_INPORT, Integer.valueOf(prt));
} catch (Exception ex) {
try {
wunlock();
@ -1076,7 +1076,7 @@ public class DoCMDS implements Runnable {
prt = Integer.parseInt(Arg);
if (prt > 1 && prt < 65536) {
try {
nickinfo.add(P_OUTPORT, new Integer(prt));
nickinfo.add(P_OUTPORT, Integer.valueOf(prt));
} catch (Exception ex) {
try {
wunlock();
@ -1308,7 +1308,7 @@ public class DoCMDS implements Runnable {
// wait
}
tunnel = new MUXlisten(lock, database, nickinfo, _log);
Thread t = new Thread(tunnel);
Thread t = new I2PAppThread(tunnel);
t.start();
// try {
// Thread.sleep(1000 * 10); // Slow down the startup.
@ -1355,7 +1355,7 @@ public class DoCMDS implements Runnable {
break die;
}
nickinfo.add(P_STOPPING, new Boolean(true));
nickinfo.add(P_STOPPING, Boolean.valueOf(true));
try {
wunlock();

View File

@ -18,11 +18,12 @@ package net.i2p.BOB;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.I2PException;
import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.util.Log;
import net.i2p.util.I2PAppThread;
/**
* Listen on I2P and connect to TCP
@ -31,25 +32,23 @@ import net.i2p.util.Log;
*/
public class I2Plistener implements Runnable {
private NamedDB info, database;
private Log _log;
public I2PSocketManager socketManager;
public I2PServerSocket serverSocket;
private AtomicBoolean lives;
private final NamedDB info, database;
private final Logger _log;
private final I2PServerSocket serverSocket;
private final AtomicBoolean lives;
/**
* Constructor
* @param SS
* @param S
* @param S unused
* @param info
* @param database
* @param _log
*/
I2Plistener(I2PServerSocket SS, I2PSocketManager S, NamedDB info, NamedDB database, Log _log, AtomicBoolean lives) {
I2Plistener(I2PServerSocket SS, I2PSocketManager S, NamedDB info, NamedDB database, Logger _log, AtomicBoolean lives) {
this.database = database;
this.info = info;
this._log = _log;
this.socketManager = S;
this.serverSocket = SS;
this.lives = lives;
}
@ -80,7 +79,7 @@ public class I2Plistener implements Runnable {
conn++;
// toss the connection to a new thread.
I2PtoTCP conn_c = new I2PtoTCP(sessSocket, info, database, lives);
Thread t = new Thread(conn_c, Thread.currentThread().getName() + " I2PtoTCP " + conn);
Thread t = new I2PAppThread(conn_c, Thread.currentThread().getName() + " I2PtoTCP " + conn);
t.start();
}

View File

@ -19,7 +19,9 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.util.I2PAppThread;
/**
* Process I2P->TCP
@ -111,8 +113,8 @@ public class I2PtoTCP implements Runnable {
// setup to cross the streams
TCPio conn_c = new TCPio(in, Iout, lives); // app -> I2P
TCPio conn_a = new TCPio(Iin, out, lives); // I2P -> app
t = new Thread(conn_c, Thread.currentThread().getName() + " TCPioA");
q = new Thread(conn_a, Thread.currentThread().getName() + " TCPioB");
t = new I2PAppThread(conn_c, Thread.currentThread().getName() + " TCPioA");
q = new I2PAppThread(conn_a, Thread.currentThread().getName() + " TCPioB");
// Fire!
t.start();
q.start();

View File

@ -15,7 +15,7 @@
*/
package net.i2p.BOB;
import java.util.Enumeration;
import java.util.Map;
import java.util.Properties;
/**
@ -39,10 +39,8 @@ public class Lifted {
*
**/
public static void copyProperties(Properties src_prop, Properties dest_prop) {
for (Enumeration propertyNames = src_prop.propertyNames();
propertyNames.hasMoreElements();) {
Object key = propertyNames.nextElement();
dest_prop.put(key, src_prop.get(key));
for (Map.Entry<Object, Object> e : src_prop.entrySet()) {
dest_prop.put((String)e.getKey(), (String)e.getValue());
}
}
}

View File

@ -0,0 +1,44 @@
package net.i2p.BOB;
import net.i2p.util.Log;
public class Logger {
public Log log;
private boolean logToStdout;
public Logger(Log log, boolean logToStdout) {
this.log = log;
this.logToStdout = logToStdout;
}
public void info(String msg) {
if (logToStdout)
System.out.println("INFO: " + msg);
if (log.shouldLog(Log.INFO))
log.info(msg);
}
public void warn(String msg) {
warn(msg, null);
}
public void warn(String msg, Throwable e) {
if (logToStdout) {
System.out.println("WARNING: " + msg);
if (e != null)
e.printStackTrace();
}
if (log.shouldLog(Log.WARN))
log.warn(msg, e);
}
public void error(String msg, Throwable e) {
if (logToStdout) {
System.out.println("ERROR: " + msg);
if (e != null)
e.printStackTrace();
}
if (log.shouldLog(Log.ERROR))
log.error(msg, e);
}
}

View File

@ -21,10 +21,13 @@ import java.net.InetAddress;
import java.net.ServerSocket;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.I2PException;
import net.i2p.client.I2PClient;
import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.client.streaming.I2PSocketManagerFactory;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
/**
@ -36,7 +39,7 @@ import net.i2p.util.Log;
public class MUXlisten implements Runnable {
private NamedDB database, info;
private Log _log;
private Logger _log;
private I2PSocketManager socketManager;
private ByteArrayInputStream prikey;
private ThreadGroup tg;
@ -57,7 +60,7 @@ public class MUXlisten implements Runnable {
* @throws net.i2p.I2PException
* @throws java.io.IOException
*/
MUXlisten(AtomicBoolean lock, NamedDB database, NamedDB info, Log _log) throws I2PException, IOException, RuntimeException {
MUXlisten(AtomicBoolean lock, NamedDB database, NamedDB info, Logger _log) throws I2PException, IOException, RuntimeException {
try {
int port = 0;
InetAddress host = null;
@ -70,7 +73,7 @@ public class MUXlisten implements Runnable {
this.database.getWriteLock();
this.info.getWriteLock();
this.info.add("STARTING", new Boolean(true));
this.info.add("STARTING", Boolean.valueOf(true));
this.info.releaseWriteLock();
this.database.releaseWriteLock();
this.database.getReadLock();
@ -96,15 +99,25 @@ public class MUXlisten implements Runnable {
this.database.releaseReadLock();
this.info.releaseReadLock();
String i2cpHost = Q.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");
int i2cpPort = 7654;
String i2cpPortStr = Q.getProperty(I2PClient.PROP_TCP_PORT, "7654");
try {
i2cpPort = Integer.parseInt(i2cpPortStr);
} catch (NumberFormatException nfe) {
throw new IllegalArgumentException("Invalid I2CP port specified [" + i2cpPortStr + "]");
}
if (this.come_in) {
this.listener = new ServerSocket(port, backlog, host);
}
socketManager = I2PSocketManagerFactory.createManager(prikey, Q);
socketManager = I2PSocketManagerFactory.createManager(
prikey, i2cpHost, i2cpPort, Q);
} catch (IOException e) {
// Something went bad.
this.database.getWriteLock();
this.info.getWriteLock();
this.info.add("STARTING", new Boolean(false));
this.info.add("STARTING", Boolean.valueOf(false));
this.info.releaseWriteLock();
this.database.releaseWriteLock();
throw new IOException(e.toString());
@ -112,7 +125,7 @@ public class MUXlisten implements Runnable {
// Something went bad.
this.database.getWriteLock();
this.info.getWriteLock();
this.info.add("STARTING", new Boolean(false));
this.info.add("STARTING", Boolean.valueOf(false));
this.info.releaseWriteLock();
this.database.releaseWriteLock();
throw new RuntimeException(e);
@ -120,7 +133,7 @@ public class MUXlisten implements Runnable {
// Something else went bad.
this.database.getWriteLock();
this.info.getWriteLock();
this.info.add("STARTING", new Boolean(false));
this.info.add("STARTING", Boolean.valueOf(false));
this.info.releaseWriteLock();
this.database.releaseWriteLock();
e.printStackTrace();
@ -160,7 +173,7 @@ public class MUXlisten implements Runnable {
try {
wlock();
try {
info.add("RUNNING", new Boolean(true));
info.add("RUNNING", Boolean.valueOf(true));
} catch (Exception e) {
lock.set(false);
wunlock();
@ -190,21 +203,21 @@ public class MUXlisten implements Runnable {
// I2P -> TCP
SS = socketManager.getServerSocket();
I2Plistener conn = new I2Plistener(SS, socketManager, info, database, _log, lives);
t = new Thread(tg, conn, "BOBI2Plistener " + N);
t = new I2PAppThread(tg, conn, "BOBI2Plistener " + N);
t.start();
}
if (come_in) {
// TCP -> I2P
TCPlistener conn = new TCPlistener(listener, socketManager, info, database, _log, lives);
q = new Thread(tg, conn, "BOBTCPlistener " + N);
q = new I2PAppThread(tg, conn, "BOBTCPlistener " + N);
q.start();
}
try {
wlock();
try {
info.add("STARTING", new Boolean(false));
info.add("STARTING", Boolean.valueOf(false));
} catch (Exception e) {
wunlock();
break quit;
@ -258,9 +271,9 @@ public class MUXlisten implements Runnable {
try {
wlock();
try {
info.add("STARTING", new Boolean(false));
info.add("STOPPING", new Boolean(true));
info.add("RUNNING", new Boolean(false));
info.add("STARTING", Boolean.valueOf(false));
info.add("STOPPING", Boolean.valueOf(true));
info.add("RUNNING", Boolean.valueOf(false));
} catch (Exception e) {
lock.set(false);
wunlock();
@ -309,9 +322,9 @@ public class MUXlisten implements Runnable {
try {
wlock();
try {
info.add("STARTING", new Boolean(false));
info.add("STOPPING", new Boolean(false));
info.add("RUNNING", new Boolean(false));
info.add("STARTING", Boolean.valueOf(false));
info.add("STOPPING", Boolean.valueOf(false));
info.add("RUNNING", Boolean.valueOf(false));
} catch (Exception e) {
lock.set(false);
wunlock();

View File

@ -15,7 +15,6 @@
*/
package net.i2p.BOB;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer2;
/**
@ -31,12 +30,10 @@ public class Main {
*/
public static void main(String[] args) {
// THINK THINK THINK THINK THINK THINK
SimpleScheduler Y1 = SimpleScheduler.getInstance();
SimpleTimer2 Y2 = SimpleTimer2.getInstance();
BOB.main(args);
Y2.stop();
Y1.stop();
}
}

View File

@ -23,7 +23,7 @@ package net.i2p.BOB;
public class NamedDB {
private volatile Object[][] data;
private volatile int index, writersWaiting, readers;
private int index, writersWaiting, readers;
/**
* make initial NULL object
@ -31,7 +31,6 @@ public class NamedDB {
*/
public NamedDB() {
this.data = new Object[1][2];
this.index = this.writersWaiting = this.readers = 0;
}
synchronized public void getReadLock() {
@ -65,7 +64,7 @@ public class NamedDB {
}
/**
* Find objects in the array, returns it's index or throws exception
* Find objects in the array, returns its index or throws exception
* @param key
* @return an objects index
* @throws ArrayIndexOutOfBoundsException when key does not exist

View File

@ -116,7 +116,6 @@ public class TCPio implements Runnable {
Aout.close();
} catch (IOException ex) {
}
return;
}
}
}

View File

@ -20,9 +20,10 @@ import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.util.Log;
import net.i2p.util.I2PAppThread;
/**
* Listen on TCP port and connect to I2P
@ -31,12 +32,11 @@ import net.i2p.util.Log;
*/
public class TCPlistener implements Runnable {
private NamedDB info, database;
private Log _log;
public I2PSocketManager socketManager;
public I2PServerSocket serverSocket;
private ServerSocket listener;
private AtomicBoolean lives;
private final NamedDB info, database;
private final Logger _log;
private final I2PSocketManager socketManager;
private final ServerSocket listener;
private final AtomicBoolean lives;
/**
* Constructor
@ -45,7 +45,7 @@ public class TCPlistener implements Runnable {
* @param database
* @param _log
*/
TCPlistener(ServerSocket listener, I2PSocketManager S, NamedDB info, NamedDB database, Log _log, AtomicBoolean lives) {
TCPlistener(ServerSocket listener, I2PSocketManager S, NamedDB info, NamedDB database, Logger _log, AtomicBoolean lives) {
this.database = database;
this.info = info;
this._log = _log;
@ -77,7 +77,7 @@ public class TCPlistener implements Runnable {
conn++;
// toss the connection to a new thread.
TCPtoI2P conn_c = new TCPtoI2P(socketManager, server, info, database, lives);
Thread t = new Thread(conn_c, Thread.currentThread().getName() + " TCPtoI2P " + conn);
Thread t = new I2PAppThread(conn_c, Thread.currentThread().getName() + " TCPtoI2P " + conn);
t.start();
g = false;
}

View File

@ -24,13 +24,14 @@ import java.net.NoRouteToHostException;
import java.net.Socket;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.I2PAppContext;
import net.i2p.I2PException;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.data.DataFormatException;
import net.i2p.data.Destination;
//import net.i2p.i2ptunnel.I2PTunnel;
import net.i2p.I2PAppContext;
import net.i2p.util.I2PAppThread;
/**
*
@ -70,12 +71,10 @@ public class TCPtoI2P implements Runnable {
* @throws IOException
*/
private static String lnRead(InputStream in) throws IOException {
String S;
StringBuilder builder = new StringBuilder();
int b;
char c;
S = new String();
while (true) {
b = in.read();
if (b == 13) {
@ -87,9 +86,9 @@ public class TCPtoI2P implements Runnable {
break;
}
c = (char) (b & 0x7f); // We only care about ASCII
S = new String(S + c);
builder.append(c);
}
return S;
return builder.toString();
}
/**
@ -101,7 +100,7 @@ public class TCPtoI2P implements Runnable {
*/
private void Emsg(String e, OutputStream out) throws IOException {
// Debugging System.out.println("ERROR TCPtoI2P: " + e);
out.write("ERROR ".concat(e).getBytes());
out.write("ERROR ".concat(e).getBytes("UTF-8"));
out.write(13);
out.write(10);
out.flush();
@ -160,8 +159,8 @@ public class TCPtoI2P implements Runnable {
// setup to cross the streams
TCPio conn_c = new TCPio(in, Iout, lives); // app -> I2P
TCPio conn_a = new TCPio(Iin, out, lives); // I2P -> app
t = new Thread(conn_c, Thread.currentThread().getName() + " TCPioA");
q = new Thread(conn_a, Thread.currentThread().getName() + " TCPioB");
t = new I2PAppThread(conn_c, Thread.currentThread().getName() + " TCPioA");
q = new I2PAppThread(conn_a, Thread.currentThread().getName() + " TCPioB");
// Fire!
t.start();
q.start();

View File

@ -34,15 +34,17 @@ import net.i2p.util.Log;
* The skeletal frame is here, just needs to be finished.
*
* @author sponge
* @deprecated incomplete, unused
*/
public class UDPIOthread implements I2PSessionListener, Runnable {
private NamedDB info;
private Log _log;
private Socket socket;
private final NamedDB info;
private final Log _log;
private final Socket socket;
private DataInputStream in;
private DataOutputStream out;
private I2PSession _session;
private final I2PSession _session;
// FIXME never set
private Destination _peerDestination;
private boolean up;
@ -58,7 +60,6 @@ public class UDPIOthread implements I2PSessionListener, Runnable {
this._log = _log;
this.socket = socket;
this._session = _session;
}
/**
@ -106,8 +107,10 @@ public class UDPIOthread implements I2PSessionListener, Runnable {
// _log.debug("Message available: id = " + msgId + " size = " + size);
try {
byte msg[] = session.receiveMessage(msgId);
out.write(msg);
out.flush();
if (msg != null) {
out.write(msg);
out.flush();
}
} catch (I2PSessionException ise) {
up = false;
} catch (IOException ioe) {

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="java/src"/>
<classpathentry combineaccessrules="false" kind="src" path="/i2p_sdk"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/jetty/jettylib/javax.servlet.jar"/>
<classpathentry kind="output" path="build"/>
</classpath>

17
apps/addressbook/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>addressbook</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -7,6 +7,7 @@
<property name="jar" value="addressbook.jar"/>
<property name="war" value="addressbook.war"/>
<property name="javac.compilerargs" value="" />
<property name="javac.version" value="1.6" />
<target name="init">
<mkdir dir="${build}"/>
@ -24,6 +25,18 @@
<typefound name="depend" />
</condition>
<target name="depend" if="depend.available">
<depend
cache="../../build"
srcdir="${src}"
destdir="${build}" >
<!-- Depend on classes instead of jars where available -->
<classpath>
<pathelement location="../../core/java/build/obj" />
</classpath>
</depend>
</target>
<target name="dependServlet" if="depend.available">
<depend
cache="../../build"
srcdir="${src}"
@ -37,9 +50,22 @@
</target>
<target name="compile" depends="init, depend">
<javac debug="true" deprecation="on" source="1.5" target="1.5"
<javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
includeAntRuntime="false"
srcdir="${src}" destdir="${build}">
srcdir="${src}" destdir="${build}"
excludes="net/i2p/addressbook/Servlet.java">
<compilerarg line="${javac.compilerargs}" />
<classpath>
<pathelement location="../../core/java/build/i2p.jar" />
</classpath>
</javac>
</target>
<target name="compileServlet" depends="init, dependServlet, compile">
<javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
includeAntRuntime="false"
srcdir="${src}" destdir="${build}"
includes="net/i2p/addressbook/Servlet.java">
<compilerarg line="${javac.compilerargs}" />
<classpath>
<pathelement location="../../core/java/build/i2p.jar" />
@ -48,11 +74,11 @@
</javac>
</target>
<!-- unused for now, as we oddly ship addressbook as a .war -->
<!-- unused for now (except for Android), as we oddly ship addressbook as a .war -->
<target name="jar" depends="compile, changes">
<jar basedir="${build}" destfile="${dist}/${jar}">
<!-- set if unset -->
<property name="workspace.changes" value="" />
<jar basedir="${build}" destfile="${dist}/${jar}">
<manifest>
<attribute name="Main-Class" value="addressbook.Daemon"/>
<attribute name="Implementation-Version" value="${full.version}" />
@ -64,7 +90,7 @@
</jar>
</target>
<target name="war" depends="compile, changes, warUpToDate" unless="war.uptodate">
<target name="war" depends="compileServlet, changes, warUpToDate" unless="war.uptodate">
<mkdir dir="${dist}/tmp"/>
<mkdir dir="${dist}/tmp/WEB-INF"/>
<mkdir dir="${dist}/tmp/WEB-INF/classes"/>

View File

@ -27,6 +27,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.regex.Pattern;
import net.i2p.I2PAppContext;
import net.i2p.util.EepGet;
@ -49,6 +50,26 @@ class AddressBook {
private boolean modified;
private static final boolean DEBUG = false;
private static final int MIN_DEST_LENGTH = 516;
private static final int MAX_DEST_LENGTH = MIN_DEST_LENGTH + 100; // longer than any known cert type for now
/**
* 5-67 chars lower/upper case
*/
private static final Pattern HOST_PATTERN =
Pattern.compile("^[0-9a-zA-Z\\.-]{5,67}$");
/**
* 52 chars lower/upper case
* Always ends in 'a' or 'q'
*/
private static final Pattern B32_PATTERN =
Pattern.compile("^[2-7a-zA-Z]{51}[aAqQ]$");
/** not a complete qualification, just a quick check */
private static final Pattern B64_PATTERN =
Pattern.compile("^[0-9a-zA-Z~-]{" + MIN_DEST_LENGTH + ',' + MAX_DEST_LENGTH + "}={0,2}$");
/**
* Construct an AddressBook from the contents of the Map addresses.
*
@ -120,11 +141,11 @@ class AddressBook {
subscription.setLastFetched(I2PAppContext.getGlobalContext().clock().now());
subf = tmp;
} else {
a = Collections.EMPTY_MAP;
a = Collections.emptyMap();
tmp.delete();
}
} catch (IOException ioe) {
a = Collections.EMPTY_MAP;
a = Collections.emptyMap();
}
this.addresses = a;
this.subFile = subf;
@ -148,7 +169,7 @@ class AddressBook {
try {
a = ConfigParser.parse(file);
} catch (IOException exp) {
a = new HashMap();
a = new HashMap<String, String>();
}
this.addresses = a;
this.subFile = null;
@ -159,8 +180,13 @@ class AddressBook {
* @since 0.8.7
*/
public Iterator<Map.Entry<String, String>> iterator() {
if (this.subFile != null)
return new ConfigIterator(this.subFile);
if (this.subFile != null) {
try {
return new ConfigIterator(this.subFile);
} catch (IOException ioe) {
return new ConfigIterator();
}
}
return this.addresses.entrySet().iterator();
}
@ -201,9 +227,6 @@ class AddressBook {
return "Map containing " + this.addresses.size() + " entries";
}
private static final int MIN_DEST_LENGTH = 516;
private static final int MAX_DEST_LENGTH = MIN_DEST_LENGTH + 100; // longer than any known cert type for now
/**
* Do basic validation of the hostname
* hostname was already converted to lower case by ConfigParser.parse()
@ -220,9 +243,10 @@ class AddressBook {
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 &&
HOST_PATTERN.matcher(host).matches() &&
// Base32 spoofing (52chars.i2p)
(! (host.length() == 56 && host.substring(0,52).replaceAll("[a-z2-7]", "").length() == 0)) &&
// We didn't do it this way, we use a .b32.i2p suffix, but let's prohibit it anyway
(! (host.length() == 56 && B32_PATTERN.matcher(host.substring(0,52)).matches())) &&
// ... or maybe we do Base32 this way ...
(! host.equals("b32.i2p")) &&
(! host.endsWith(".b32.i2p")) &&
@ -246,7 +270,7 @@ class AddressBook {
(dest.length() > MIN_DEST_LENGTH && dest.length() <= MAX_DEST_LENGTH)) &&
// B64 comes in groups of 2, 3, or 4 chars, but never 1
((dest.length() % 4) != 1) &&
dest.replaceAll("[a-zA-Z0-9~-]", "").length() == 0
B64_PATTERN.matcher(dest).matches()
;
}
@ -260,7 +284,7 @@ class AddressBook {
* An AddressBook to merge with.
* @param overwrite True to overwrite
* @param log
* The log to write messages about new addresses or conflicts to.
* The log to write messages about new addresses or conflicts to. May be null.
*
* @throws IllegalStateException if this was created with the Subscription constructor.
*/
@ -332,4 +356,27 @@ class AddressBook {
protected void finalize() {
delete();
}
/****
public static void main(String[] args) {
String[] tests = { "foo.i2p",
"3bnipzzu67cdq2rcygyxz52xhvy6ylokn4zfrk36ywn6pixmaoza.b32.i2p",
"9rhEy4dT9fMlcSOhDzfWRxCV2aen4Zp4eSthOf5f9gVKMa4PtQJ-wEzm2KEYeDXkbM6wEDvMQ6ou4LIniSE6bSAwy7fokiXk5oabels-sJmftnQWRbZyyXEAsLc3gpJJvp9km7kDyZ0z0YGL5tf3S~OaWdptB5tSBOAOjm6ramcYZMWhyUqm~xSL1JyXUqWEHRYwhoDJNL6-L516VpDYVigMBpIwskjeFGcqK8BqWAe0bRwxIiFTPN6Ck8SDzQvS1l1Yj-zfzg3X3gOknzwR8nrHUkjsWtEB6nhbOr8AR21C9Hs0a7MUJvSe2NOuBoNTrtxT76jDruI78JcG5r~WKl6M12yM-SqeBNE9hQn2QCHeHAKju7FdRCbqaZ99IwyjfwvZbkiYYQVN1xlUuGaXrj98XDzK7GORYdH-PrVGfEbMXQ40KLHUWHz8w4tQXAOQrCHEichod0RIzuuxo3XltCWKrf1xGZhkAo9bk2qXi6digCijvYNaKmQdXZYWW~RtAAAA",
"6IZTYacjlXjSAxu-uXEO5oGsj-f4tfePHEvGjs5pu-AMXMwD7-xFdi8kdobDMJp9yRAl96U7yLl~0t9zHeqqYmNeZnDSkTmAcSC2PT45ZJDXBobKi1~a77zuqfPwnzEatYfW3GL1JQAEkAmiwNJoG7ThTZ3zT7W9ekVJpHi9mivpTbaI~rALLfuAg~Mvr60nntZHjqhEZuiU4dTXrmc5nykl~UaMnBdwHL4jKmoN5CotqHyLYZfp74fdD-Oq4SkhuBhU8wkBIM3lz3Ul1o6-s0lNUMdYJq1CyxnyP7jeekdfAlSx4P4sU4M0dPaYvPdOFWPWwBuEh0pCs5Mj01B2xeEBhpV~xSLn6ru5Vq98TrmaR33KHxd76OYYFsWwzVbBuMVSd800XpBghGFucGw01YHYsPh3Afb01sXbf8Nb1bkxCy~DsrmoH4Ww3bpx66JhRTWvg5al3oWlCX51CnJUqaaK~dPL-pBvAyLKIA5aYvl8ca66jtA7AFDxsOb2texBBQAEAAcAAA==",
"te9Ky7XvVcLLr5vQqvfmOasg915P3-ddP3iDqpMMk7v5ufFKobLAX~1k-E4WVsJVlkYvkHVOjxix-uT1IdewKmLd81s5wZtz0GQ3ZC6p0C3S2cOxz7kQqf7QYSR0BrhZC~2du3-GdQO9TqNmsnHrah5lOZf0LN2JFEFPqg8ZB5JNm3JjJeSqePBRk3zAUogNaNK3voB1MVI0ZROKopXAJM4XMERNqI8tIH4ngGtV41SEJJ5pUFrrTx~EiUPqmSEaEA6UDYZiqd23ZlewZ31ExXQj97zvkuhKCoS9A9MNkzZejJhP-TEXWF8~KHur9f51H--EhwZ42Aj69-3GuNjsMdTwglG5zyIfhd2OspxJrXzCPqIV2sXn80IbPgwxHu0CKIJ6X43B5vTyVu87QDI13MIRNGWNZY5KmM5pilGP7jPkOs4xQDo4NHzpuJR5igjWgJIBPU6fI9Pzq~BMzjLiZOMp8xNWey1zKC96L0eX4of1MG~oUvq0qmIHGNa1TlUwBQAEAAEAAA==",
"(*&(*&(*&(*",
"9rhEy4dT9fMlcSOhDzfWRxCV2aen4Zp4eSthOf5f9gVKMa4PtQJ-wEzm2KEYeDXkbM6wEDvMQ6ou4LIniSE6bSAwy7fokiXk5oabels-sJmftnQWRbZyyXEAsLc3gpJJvp9km7kDyZ0z0YGL5tf3S~OaWdptB5tSBOAOjm6ramcYZMWhyUqm~xSL1JyXUqWEHRYwhoDJNL6-L516VpDYVigMBpIwskjeFGcqK8BqWAe0bRwxIiFTPN6Ck8SDzQvS1l1Yj-zfzg3X3gOknzwR8nrHUkjsWtEB6nhbOr8AR21C9Hs0a7MUJvSe2NOuBoNTrtxT76jDruI78JcG5r~WKl6M12yM-SqeBNE9hQn2QCHeHAKju7FdRCbqaZ99IwyjfwvZbkiYYQVN1xlUuGaXrj98XDzK7GORYdH-PrVGfEbMXQ40KLHUWHz8w4tQXAOQrCHEichod0RIzuuxo3XltCWKrf1xGZhkAo9bk2qXi6digCijvYNaKmQdXZYWW~RtAAA",
"6IZTYacjlXjSAxu-uXEO5oGsj-f4tfePHEvGjs5pu-AMXMwD7-xFdi8kdobDMJp9yRAl96U7yLl~0t9zHeqqYmNeZnDSkTmAcSC2PT45ZJDXBobKi1~a77zuqfPwnzEatYfW3GL1JQAEkAmiwNJoG7ThTZ3zT7W9ekVJpHi9mivpTbaI~rALLfuAg~Mvr60nntZHjqhEZuiU4dTXrmc5nykl~UaMnBdwHL4jKmoN5CotqHyLYZfp74fdD-Oq4SkhuBhU8wkBIM3lz3Ul1o6-s0lNUMdYJq1CyxnyP7jeekdfAlSx4P4sU4M0dPaYvPdOFWPWwBuEh0pCs5Mj01B2xeEBhpV~xSLn6ru5Vq98TrmaR33KHxd76OYYFsWwzVbBuMVSd800XpBghGFucGw01YHYsPh3Afb01sXbf8Nb1bkxCy~DsrmoH4Ww3bpx66JhRTWvg5al3oWlCX51CnJUqaaK~dPL-pBvAyLKIA5aYvl8ca66jtA7AFDxsOb2texBBQAEAAcAAA===",
"!e9Ky7XvVcLLr5vQqvfmOasg915P3-ddP3iDqpMMk7v5ufFKobLAX~1k-E4WVsJVlkYvkHVOjxix-uT1IdewKmLd81s5wZtz0GQ3ZC6p0C3S2cOxz7kQqf7QYSR0BrhZC~2du3-GdQO9TqNmsnHrah5lOZf0LN2JFEFPqg8ZB5JNm3JjJeSqePBRk3zAUogNaNK3voB1MVI0ZROKopXAJM4XMERNqI8tIH4ngGtV41SEJJ5pUFrrTx~EiUPqmSEaEA6UDYZiqd23ZlewZ31ExXQj97zvkuhKCoS9A9MNkzZejJhP-TEXWF8~KHur9f51H--EhwZ42Aj69-3GuNjsMdTwglG5zyIfhd2OspxJrXzCPqIV2sXn80IbPgwxHu0CKIJ6X43B5vTyVu87QDI13MIRNGWNZY5KmM5pilGP7jPkOs4xQDo4NHzpuJR5igjWgJIBPU6fI9Pzq~BMzjLiZOMp8xNWey1zKC96L0eX4of1MG~oUvq0qmIHGNa1TlUwBQAEAAEAAA==",
"x"
};
for (String s : tests) {
test(s);
}
}
public static void test(String s) {
System.out.println(s + " valid host? " + isValidKey(s) + " valid dest? " + isValidDest(s));
}
****/
}

View File

@ -22,6 +22,7 @@
package net.i2p.addressbook;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@ -41,7 +42,7 @@ import java.util.NoSuchElementException;
*
* @since 0.8.7
*/
class ConfigIterator implements Iterator<Map.Entry<String, String>> {
class ConfigIterator implements Iterator<Map.Entry<String, String>>, Closeable {
private BufferedReader input;
private ConfigEntry next;
@ -54,11 +55,9 @@ class ConfigIterator implements Iterator<Map.Entry<String, String>> {
/**
* An iterator over the key/value pairs in the file.
*/
public ConfigIterator(File file) {
try {
public ConfigIterator(File file) throws IOException {
FileInputStream fileStream = new FileInputStream(file);
input = new BufferedReader(new InputStreamReader(fileStream));
} catch (IOException ioe) {}
input = new BufferedReader(new InputStreamReader(fileStream, "UTF-8"));
}
public boolean hasNext() {
@ -138,7 +137,8 @@ class ConfigIterator implements Iterator<Map.Entry<String, String>> {
public boolean equals(Object o) {
if (!(o instanceof Map.Entry))
return false;
Map.Entry e = (Map.Entry) o;
@SuppressWarnings("unchecked")
Map.Entry<Object, Object> e = (Map.Entry<Object, Object>) o;
return key.equals(e.getKey()) && value.equals(e.getValue());
}
}

View File

@ -64,10 +64,11 @@ class ConfigParser {
if (inputLine.startsWith(";")) {
return "";
}
if (inputLine.split("#").length > 0) {
return inputLine.split("#")[0];
int hash = inputLine.indexOf('#');
if (hash >= 0) {
return inputLine.substring(0, hash);
} else {
return "";
return inputLine;
}
}
@ -87,11 +88,11 @@ class ConfigParser {
*
*/
public static Map<String, String> parse(BufferedReader input) throws IOException {
Map<String, String> result = new HashMap();
Map<String, String> result = new HashMap<String, String>();
String inputLine;
inputLine = input.readLine();
while (inputLine != null) {
inputLine = ConfigParser.stripComments(inputLine);
inputLine = stripComments(inputLine);
String[] splitLine = inputLine.split("=");
if (splitLine.length == 2) {
result.put(splitLine[0].trim().toLowerCase(Locale.US), splitLine[1].trim());
@ -115,8 +116,8 @@ class ConfigParser {
public static Map<String, String> parse(File file) throws IOException {
FileInputStream fileStream = new FileInputStream(file);
BufferedReader input = new BufferedReader(new InputStreamReader(
fileStream));
Map<String, String> rv = ConfigParser.parse(input);
fileStream, "UTF-8"));
Map<String, String> rv = parse(input);
try {
fileStream.close();
} catch (IOException ioe) {}
@ -136,7 +137,7 @@ class ConfigParser {
public static Map<String, String> parse(String string) throws IOException {
StringReader stringReader = new StringReader(string);
BufferedReader input = new BufferedReader(stringReader);
return ConfigParser.parse(input);
return parse(input);
}
/**
@ -153,7 +154,7 @@ class ConfigParser {
public static Map<String, String> parse(File file, Map<String, String> map) {
Map<String, String> result;
try {
result = ConfigParser.parse(file);
result = parse(file);
for (Map.Entry<String, String> entry : map.entrySet()) {
if (!result.containsKey(entry.getKey()))
result.put(entry.getKey(), entry.getValue());
@ -161,7 +162,7 @@ class ConfigParser {
} catch (IOException exp) {
result = map;
try {
ConfigParser.write(result, file);
write(result, file);
} catch (IOException exp2) {
}
}
@ -179,10 +180,10 @@ class ConfigParser {
*/
public static List<String> parseSubscriptions(BufferedReader input)
throws IOException {
List<String> result = new LinkedList();
List<String> result = new LinkedList<String>();
String inputLine = input.readLine();
while (inputLine != null) {
inputLine = ConfigParser.stripComments(inputLine).trim();
inputLine = stripComments(inputLine).trim();
if (inputLine.length() > 0) {
result.add(inputLine);
}
@ -204,8 +205,8 @@ class ConfigParser {
public static List<String> parseSubscriptions(File file) throws IOException {
FileInputStream fileStream = new FileInputStream(file);
BufferedReader input = new BufferedReader(new InputStreamReader(
fileStream));
List<String> rv = ConfigParser.parseSubscriptions(input);
fileStream, "UTF-8"));
List<String> rv = parseSubscriptions(input);
try {
fileStream.close();
} catch (IOException ioe) {}
@ -224,7 +225,7 @@ class ConfigParser {
public static List<String> parseSubscriptions(String string) throws IOException {
StringReader stringReader = new StringReader(string);
BufferedReader input = new BufferedReader(stringReader);
return ConfigParser.parseSubscriptions(input);
return parseSubscriptions(input);
}
/**
@ -234,18 +235,30 @@ class ConfigParser {
*
* @param file
* A File to attempt to parse.
* @param list list of files to parse
* @param list The default subscriptions to be saved and returned if the file cannot be read
* @return A List consisting of one element for each line in file, or if
* file cannot be read, list.
*/
public static List<String> parseSubscriptions(File file, List<String> list) {
List<String> result;
try {
result = ConfigParser.parseSubscriptions(file);
result = parseSubscriptions(file);
// Fix up files that contain the old default
// which was changed in 0.9.11
if (result.remove(Daemon.OLD_DEFAULT_SUB)) {
for (String sub : list) {
if (!result.contains(sub))
result.add(sub);
}
try {
writeSubscriptions(result, file);
// TODO log
} catch (IOException ioe) {}
}
} catch (IOException exp) {
result = list;
try {
ConfigParser.writeSubscriptions(result, file);
writeSubscriptions(result, file);
} catch (IOException exp2) {
}
}
@ -289,8 +302,7 @@ class ConfigParser {
boolean success = false;
if (!isWindows) {
File tmp = SecureFile.createTempFile("temp-", ".tmp", file.getAbsoluteFile().getParentFile());
ConfigParser
.write(map, new BufferedWriter(new OutputStreamWriter(new SecureFileOutputStream(tmp), "UTF-8")));
write(map, new BufferedWriter(new OutputStreamWriter(new SecureFileOutputStream(tmp), "UTF-8")));
success = tmp.renameTo(file);
if (!success) {
tmp.delete();
@ -299,8 +311,7 @@ class ConfigParser {
}
if (!success) {
// hmm, that didn't work, try it the old way
ConfigParser
.write(map, new BufferedWriter(new OutputStreamWriter(new SecureFileOutputStream(file), "UTF-8")));
write(map, new BufferedWriter(new OutputStreamWriter(new SecureFileOutputStream(file), "UTF-8")));
}
}
@ -337,7 +348,7 @@ class ConfigParser {
*/
public static void writeSubscriptions(List<String> list, File file)
throws IOException {
ConfigParser.writeSubscriptions(list, new BufferedWriter(
writeSubscriptions(list, new BufferedWriter(
new OutputStreamWriter(new SecureFileOutputStream(file), "UTF-8")));
}

View File

@ -37,6 +37,7 @@ import net.i2p.client.naming.SingleFileNamingService;
import net.i2p.data.DataFormatException;
import net.i2p.data.Destination;
import net.i2p.util.SecureDirectory;
import net.i2p.util.SystemVersion;
/**
* Main class of addressbook. Performs updates, and runs the main loop.
@ -49,6 +50,9 @@ public class Daemon {
private static final Daemon _instance = new Daemon();
private volatile boolean _running;
private static final boolean DEBUG = false;
private static final String DEFAULT_SUB = "http://i2p-projekt.i2p/hosts.txt";
/** @since 0.9.12 */
static final String OLD_DEFAULT_SUB = "http://www.i2p2.i2p/hosts.txt";
/**
* Update the router and published address books using remote data from the
@ -168,7 +172,7 @@ public class Daemon {
if (publishedNS == null)
publishedNS = new SingleFileNamingService(I2PAppContext.getGlobalContext(), published.getAbsolutePath());
success = publishedNS.putIfAbsent(key, dest);
if (!success) {
if (log != null && !success) {
try {
log.append("Save to published address book " + published.getCanonicalPath() + " failed for new key " + key);
} catch (IOException ioe) {}
@ -250,14 +254,14 @@ public class Daemon {
}
delay *= 60 * 60 * 1000;
List<String> defaultSubs = new LinkedList();
List<String> defaultSubs = new LinkedList<String>();
// defaultSubs.add("http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/hosts.txt");
defaultSubs.add("http://www.i2p2.i2p/hosts.txt");
defaultSubs.add(DEFAULT_SUB);
SubscriptionList subscriptions = new SubscriptionList(subscriptionFile,
etagsFile, lastModifiedFile, lastFetchedFile, delay, defaultSubs, settings
.get("proxy_host"), Integer.parseInt(settings.get("proxy_port")));
Log log = new Log(logFile);
Log log = SystemVersion.isAndroid() ? null : new Log(logFile);
// If false, add hosts via naming service; if true, write hosts.txt file directly
// Default false
@ -330,7 +334,7 @@ public class Daemon {
homeFile = new SecureDirectory(System.getProperty("user.dir"));
}
Map<String, String> defaultSettings = new HashMap();
Map<String, String> defaultSettings = new HashMap<String, String>();
defaultSettings.put("proxy_host", "127.0.0.1");
defaultSettings.put("proxy_port", "4444");
defaultSettings.put("master_addressbook", "../userhosts.txt");

View File

@ -25,6 +25,7 @@ import java.util.Properties;
import net.i2p.I2PAppContext;
import net.i2p.client.naming.NamingServiceUpdater;
import net.i2p.util.I2PAppThread;
/**
* A thread that waits five minutes, then runs the addressbook daemon.
@ -32,7 +33,7 @@ import net.i2p.client.naming.NamingServiceUpdater;
* @author Ragnarok
*
*/
public class DaemonThread extends Thread implements NamingServiceUpdater {
public class DaemonThread extends I2PAppThread implements NamingServiceUpdater {
private String[] args;

View File

@ -23,8 +23,9 @@ package net.i2p.addressbook;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Date;
/**
@ -56,8 +57,8 @@ class Log {
public void append(String entry) {
BufferedWriter bw = null;
try {
bw = new BufferedWriter(new FileWriter(this.file,
true));
bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(this.file,
true), "UTF-8"));
String timestamp = new Date().toString();
bw.write(timestamp + " -- " + entry);
bw.newLine();

View File

@ -41,7 +41,9 @@ import javax.servlet.http.HttpServletResponse;
*
*/
public class Servlet extends HttpServlet {
private DaemonThread thread;
private static final long serialVersionUID = 1L;
private transient DaemonThread thread;
//private String nonce;
//private static final String PROP_NONCE = "addressbook.nonce";

View File

@ -26,6 +26,7 @@ import java.util.Iterator;
import java.util.List;
import net.i2p.I2PAppContext;
import net.i2p.util.PortMapper;
/**
* An iterator over the subscriptions in a SubscriptionList. Note that this iterator
@ -69,11 +70,14 @@ class SubscriptionIterator implements Iterator<AddressBook> {
* Yes, the EepGet fetch() is done in here in next().
*
* see java.util.Iterator#next()
* @return an AddressBook (empty if the minimum delay has not been met)
* @return non-null AddressBook (empty if the minimum delay has not been met,
* or there is no proxy tunnel, or the fetch otherwise fails)
*/
public AddressBook next() {
Subscription sub = this.subIterator.next();
if (sub.getLastFetched() + this.delay < I2PAppContext.getGlobalContext().clock().now()) {
if (sub.getLastFetched() + this.delay < I2PAppContext.getGlobalContext().clock().now() &&
I2PAppContext.getGlobalContext().portMapper().getPort(PortMapper.SVC_HTTP_PROXY) >= 0 &&
!I2PAppContext.getGlobalContext().getBooleanProperty("i2p.vmCommSystem")) {
//System.err.println("Fetching addressbook from " + sub.getLocation());
return new AddressBook(sub, this.proxyHost, this.proxyPort);
} else {
@ -81,7 +85,7 @@ class SubscriptionIterator implements Iterator<AddressBook> {
// DataHelper.formatDuration(I2PAppContext.getGlobalContext().clock().now() - sub.getLastFetched()) +
// " ago but the minimum delay is " +
// DataHelper.formatDuration(this.delay));
return new AddressBook(Collections.EMPTY_MAP);
return new AddressBook(Collections.<String, String> emptyMap());
}
}

View File

@ -69,7 +69,7 @@ class SubscriptionList {
public SubscriptionList(File locationsFile, File etagsFile,
File lastModifiedFile, File lastFetchedFile, long delay, List<String> defaultSubs, String proxyHost,
int proxyPort) {
this.subscriptions = new LinkedList();
this.subscriptions = new LinkedList<Subscription>();
this.etagsFile = etagsFile;
this.lastModifiedFile = lastModifiedFile;
this.lastFetchedFile = lastFetchedFile;
@ -84,17 +84,17 @@ class SubscriptionList {
try {
etags = ConfigParser.parse(etagsFile);
} catch (IOException exp) {
etags = new HashMap();
etags = new HashMap<String, String>();
}
try {
lastModified = ConfigParser.parse(lastModifiedFile);
} catch (IOException exp) {
lastModified = new HashMap();
lastModified = new HashMap<String, String>();
}
try {
lastFetched = ConfigParser.parse(lastFetchedFile);
} catch (IOException exp) {
lastFetched = new HashMap();
lastFetched = new HashMap<String, String>();
}
for (String location : locations) {
this.subscriptions.add(new Subscription(location, etags.get(location),
@ -121,9 +121,9 @@ class SubscriptionList {
* won't be read back correctly; the '=' should be escaped.
*/
public void write() {
Map<String, String> etags = new HashMap();
Map<String, String> lastModified = new HashMap();
Map<String, String> lastFetched = new HashMap();
Map<String, String> etags = new HashMap<String, String>();
Map<String, String> lastModified = new HashMap<String, String>();
Map<String, String> lastFetched = new HashMap<String, String>();
for (Subscription sub : this.subscriptions) {
if (sub.getEtag() != null) {
etags.put(sub.getLocation(), sub.getEtag());

View File

@ -0,0 +1,11 @@
<html>
<body>
<p>
The addressbook application, which fetches hosts.txt files from subscription URLS via
HTTP and adds new hosts to the local database.
While implemented as a webapp, this application contains no user interface.
May also be packaged as a jar, as is done for Android.
The webapp named 'addressbook' in the console is actually SusiDNS.
</p>
</body>
</html>

View File

@ -4,6 +4,15 @@
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<filter>
<filter-name>XSSFilter</filter-name>
<filter-class>net.i2p.servlet.filters.XSSFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>XSSFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>addressbook</servlet-name>
<servlet-class>net.i2p.addressbook.Servlet</servlet-class>
@ -19,4 +28,11 @@
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!-- this webapp doesn't actually use sessions or cookies -->
<session-config>
<session-timeout>30</session-timeout>
<cookie-config>
<http-only>true</http-only>
</cookie-config>
</session-config>
</web-app>

View File

@ -0,0 +1,99 @@
# Last Modified: Sun Apr 12 22:08:32 2015
# vim:syntax=apparmor et ts=8 sw=4
#include <tunables/global>
$INSTALL_PATH/{i2prouter,runplain.sh} flags=(complain) {
#include <abstractions/base>
#include <abstractions/fonts>
#include <abstractions/nameservice>
#include <abstractions/ssl_certs>
capability sys_ptrace,
network inet stream,
network inet6 stream,
$INSTALL_PATH/ r,
$INSTALL_PATH/{i2psvc,wrapper} rmix,
owner $INSTALL_PATH/** rwklm,
# Needed for Java
owner @{PROC} r,
owner @{PROC}/[0-9]*/ r,
owner @{PROC}/[0-9]*/status r,
owner @{PROC}/[0-9]*/stat r,
owner @{PROC}/[0-9]*/cmdline r,
@{PROC}/uptime r,
@{PROC}/sys/kernel/pid_max r,
/sys/devices/system/cpu/ r,
/sys/devices/system/cpu/** r,
/dev/random r,
/dev/urandom r,
@{PROC}/1/comm r,
/etc/ssl/certs/java/** r,
/etc/timezone r,
/usr/share/javazi/** r,
# Debian
/etc/java-{6,7,8}-openjdk/** r,
/usr/lib/jvm/default-java/jre/bin/java rix,
# Debian, Ubuntu, openSUSE
/usr/lib{,32,64}/jvm/java-*-openjdk-*/jre/bin/java rix,
/usr/lib{,32,64}/jvm/java-*-openjdk-*/jre/bin/keytool rix,
# Raspbian
/usr/lib/jvm/jdk-*-oracle-*/jre/bin/java rix,
/usr/lib/jvm/jdk-*-oracle-*/jre/bin/keytool rix,
# Fonts are needed for I2P's graphs
/usr/share/java/java-atk-wrapper.jar r,
# Used by some plugins
/usr/share/java/eclipse-ecj-*.jar r,
/{,var/}tmp/ rwm,
owner /{,var/}tmp/** rwklm,
/{,usr/}bin/{,b,d}ash rix,
/{,usr/}bin/cat rix,
/{,usr/}bin/cut rix,
/{,usr/}bin/dirname rix,
/{,usr/}bin/expr rix,
/{,usr/}bin/{,g,m}awk rix,
/{,usr/}bin/grep rix,
/{,usr/}bin/id rix,
/{,usr/}bin/ldd rix,
/{,usr/}bin/ls rix,
/{,usr/}bin/mkdir rix,
/{,usr/}bin/nohup rix,
/{,usr/}bin/ps rix,
/{,usr/}bin/rm rix,
/{,usr/}bin/sed rix,
/{,usr/}bin/sleep rix,
/{,usr/}bin/tail rix,
/{,usr/}bin/tr rix,
/{,usr/}bin/uname rix,
/{,usr/}bin/which rix,
@{HOME}/.java/fonts/** r,
owner @{HOME}/.i2p/ rw,
owner @{HOME}/.i2p/** rwk,
# Prevent spamming the logs
deny owner @{HOME}/.java/ wk,
deny @{HOME}/.fontconfig/ wk,
deny @{HOME}/.java/fonts/** w,
deny /dev/tty rw,
deny /dev/pts/[0-9]* rw,
deny @{PROC}/[0-9]*/fd/ r,
deny /usr/local/share/fonts/ r,
deny /var/cache/fontconfig/ wk,
# Used by some versions of the Tanuki wrapper but never used by I2P
deny /usr/share/java/hamcrest*.jar r,
deny /usr/share/java/junit*.jar r,
}

View File

@ -3,7 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry combineaccessrules="false" kind="src" path="/i2p_router"/>
<classpathentry combineaccessrules="false" kind="src" path="/i2p_sdk"/>
<classpathentry kind="lib" path="/lib/wrapper/all/wrapper.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/installer"/>
<classpathentry kind="output" path="build"/>
</classpath>

View File

@ -7,12 +7,13 @@
<property name="jar" value="desktopgui.jar"/>
<property name="resources" value="resources"/>
<property name="javadoc" value="javadoc"/>
<property name="javac.compilerargs" value=""/>
<property name="javac.version" value="1.6" />
<property name="require.gettext" value="true" />
<condition property="no.bundle">
<isfalse value="${require.gettext}" />
</condition>
<property name="javac.compilerargs" value=""/>
<property name="require.gettext" value="true" />
<target name="init">
<mkdir dir="${build}"/>
@ -27,7 +28,7 @@
</target>
<target name="compile" depends="init">
<javac debug="true" deprecation="on" source="1.5" target="1.5"
<javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
includeAntRuntime="false"
srcdir="${src}" destdir="${build}">
<compilerarg line="${javac.compilerargs}" />
@ -44,6 +45,7 @@
<target name="bundle" unless="no.bundle">
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
<env key="JAVA_HOME" value="${java.home}" />
<arg value="./bundle-messages.sh" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" >

View File

@ -16,18 +16,22 @@ TMPFILE=build/javafiles.txt
export TZ=UTC
RC=0
if ! $(which javac > /dev/null 2>&1); then
export JAVAC=${JAVA_HOME}/../bin/javac
fi
if [ "$1" = "-p" ]
then
POUPDATE=1
fi
# on windows, one must specify the path of commnad find
# since windows has its own retarded version of find.
# since windows has its own version of find.
if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH
fi
# Fast mode - update ondemond
# set LG2 to the language you need in envrionment varibales to enable this
# set LG2 to the language you need in environment variables to enable this
# add ../java/ so the refs will work in the po file
JPATHS="src"
@ -60,19 +64,19 @@ do
echo "Updating the $i file from the tags..."
# extract strings from java and jsp files, and update messages.po files
# translate calls must be one of the forms:
# _("foo")
# _t("foo")
# _x("foo")
# intl._("foo")
# intl._t("foo")
# intl.title("foo")
# handler._("foo")
# formhandler._("foo")
# handler._t("foo")
# formhandler._t("foo")
# net.i2p.router.web.Messages.getString("foo")
# In a jsp, you must use a helper or handler that has the context set.
# To start a new translation, copy the header from an old translation to the new .po file,
# then ant distclean updater.
find $JPATHS -name *.java > $TMPFILE
xgettext -f $TMPFILE -F -L java --from-code=UTF-8 --add-comments\
--keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \
--keyword=_t --keyword=_x --keyword=intl._ --keyword=intl.title \
--keyword=handler._ --keyword=formhandler._ \
--keyword=net.i2p.router.web.Messages.getString \
-o ${i}t

View File

@ -11,6 +11,7 @@ msgstr ""
"POT-Creation-Date: 2011-02-20 11:53+0000\n"
"PO-Revision-Date: 2011-02-26 19:46-0000\n"
"Last-Translator: hamada <hamada@mail.i2p>\n"
"Language: ar\n"
"Language-Team: duck <duck@mail.i2p>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -3,19 +3,19 @@
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
# foo <foo@bar>, 2009.
#
#
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-09 18:07+0000\n"
"PO-Revision-Date: 2011-03-22 15:49+0000\n"
"Last-Translator: blabla <blabla@trash-mail.com>\n"
"Language-Team: German <>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
@ -46,10 +46,10 @@ msgstr "I2P neustarten"
msgid "Stop I2P"
msgstr "I2P beenden"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:43
msgid "Tray icon configuration"
msgstr "Systemleistensymbol konfigurieren"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:46
msgid "Should tray icon be enabled?"
msgstr "Systemleistensymbol aktivieren?"

View File

@ -8,11 +8,11 @@ msgid ""
msgstr ""
"Project-Id-Version: I2P desktopgui\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"POT-Creation-Date: 2014-01-09 19:27+0000\n"
"PO-Revision-Date: 2010-06-15 14:09+0100\n"
"Last-Translator: duck <duck@mail.i2p>\n"
"Language-Team: duck <duck@mail.i2p>\n"
"Language: \n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -46,10 +46,10 @@ msgstr ""
msgid "Stop I2P"
msgstr ""
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:43
msgid "Tray icon configuration"
msgstr ""
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:46
msgid "Should tray icon be enabled?"
msgstr ""

View File

@ -2,7 +2,7 @@
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
#
# Translators:
# blabla <blabla@trash-mail.com>, 2011
# ducki2p <ducki2p@gmail.com>, 2011
@ -11,15 +11,16 @@
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-09 19:14+0000\n"
"PO-Revision-Date: 2013-06-08 04:50+0000\n"
"Last-Translator: Boxoa590\n"
"Language-Team: French (http://www.transifex.com/projects/p/I2P/language/fr/)\n"
"Language-Team: French (http://www.transifex.com/projects/p/I2P/language/"
"fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
@ -50,10 +51,10 @@ msgstr "Redémarrer I2P"
msgid "Stop I2P"
msgstr "Arrêter I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:43
msgid "Tray icon configuration"
msgstr "Configuration de l'icône de notification"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:46
msgid "Should tray icon be enabled?"
msgstr "Activer l'icône de notification ?"

View File

@ -0,0 +1,56 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# Translators:
# plazmism <gomidori@live.jp>, 2013
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"PO-Revision-Date: 2013-11-26 10:38+0000\n"
"Last-Translator: plazmism <gomidori@live.jp>\n"
"Language-Team: Japanese (http://www.transifex.com/projects/p/I2P/language/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "I2P を開始"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P 起動中!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "起動中"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "I2P ブラウザを起動"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "desktopgui を設定"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "I2P を再起動"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "I2P を停止"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "トレイアイコン設定"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "トレイアイコンを有効にしますか?"

View File

@ -3,20 +3,22 @@
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# <b790979@klzlk.com>, 2011.
# Translators:
# PolishAnon <b790979@klzlk.com>, 2011
# polacco <polacco@i2pmail.org>, 2015
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"PO-Revision-Date: 2011-05-25 18:36+0000\n"
"Last-Translator: PolishAnon <b790979@klzlk.com>\n"
"Language-Team: Polish (http://www.transifex.net/projects/p/I2P/team/pl/)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-09 19:27+0000\n"
"PO-Revision-Date: 2015-02-17 20:54+0000\n"
"Last-Translator: polacco <polacco@i2pmail.org>\n"
"Language-Team: Polish (http://www.transifex.com/projects/p/I2P/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
@ -32,7 +34,7 @@ msgstr "Uruchamianie"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Uruchom Przeglądarke I2P"
msgstr "Uruchom przeglądarkę I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
@ -46,12 +48,10 @@ msgstr "Zrestartuj I2P"
msgid "Stop I2P"
msgstr "Zatrzymaj I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:43
msgid "Tray icon configuration"
msgstr "Konfiguracja ikony zasobnika"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:46
msgid "Should tray icon be enabled?"
msgstr "Czy ikona zasobnika powinna być aktywna?"

View File

@ -0,0 +1,57 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# Translators:
# testsubject67 <deborinha97@hotmail.com>, 2014
# blueboy, 2013
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-09 19:27+0000\n"
"PO-Revision-Date: 2014-07-05 17:40+0000\n"
"Last-Translator: testsubject67 <deborinha97@hotmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/I2P/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Conectar-se à I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "Conectando-se a I2P!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Conectando"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Lançar o navegador I2P "
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Configurar desktopgui"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Reinicializar o roteador I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Interromper o roteador I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:43
msgid "Tray icon configuration"
msgstr "Configuração de ícone de bandeja"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:46
msgid "Should tray icon be enabled?"
msgstr "Ativar ícone de bandeja?"

View File

@ -0,0 +1,57 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-09 19:03+0000\n"
"PO-Revision-Date: 2013-11-11 11:31+0000\n"
"Last-Translator: polearnik <polearnik@mail.ru>\n"
"Language-Team: Romanian (http://www.transifex.com/projects/p/I2P/language/"
"ro/)\n"
"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?"
"2:1));\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Start I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P se pornește!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Începere"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Lansare I2P Browser"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Configurarea desktopgui"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Restart I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Stop I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:43
msgid "Tray icon configuration"
msgstr "Configurare pictogramei din bara de sistem"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:46
msgid "Should tray icon be enabled?"
msgstr "Ar trebui să fie activata pictograma din bara de sistem?"

View File

@ -6,14 +6,14 @@
# Translators:
# ducki2p <ducki2p@gmail.com>, 2011
# foo <foo@bar>, 2009
# Roman Azarenko <x12ozmouse@ya.ru>, 2013
# Роман Азаренко <transifex@basicxp.ru>, 2013
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: https://trac.i2p2.de/\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"PO-Revision-Date: 2013-07-07 11:44+0000\n"
"Last-Translator: Roman Azarenko <x12ozmouse@ya.ru>\n"
"PO-Revision-Date: 2013-12-04 11:46+0000\n"
"Last-Translator: Bergitte <alvina_alexandrova@mail.ru>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/projects/p/I2P/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -0,0 +1,57 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# Translators:
# Krantišek <jaksrn@gmail.com>, 2014
# Svistwarrior273 <romanbeno273@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-09 19:27+0000\n"
"PO-Revision-Date: 2014-04-20 09:56+0000\n"
"Last-Translator: Svistwarrior273 <romanbeno273@gmail.com>\n"
"Language-Team: Slovak (http://www.transifex.com/projects/p/I2P/language/sk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: sk\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Spustiť I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P sa spúšťa!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Spúšťa sa"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Spustiť I2P prehliadač"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Nakonfigurovať desktopgui"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Reštartovať I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Zastaviť I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:43
msgid "Tray icon configuration"
msgstr "Konfigurácia ikony v lište"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:46
msgid "Should tray icon be enabled?"
msgstr "Mala by byť ikona v lište povolená?"

View File

@ -3,20 +3,23 @@
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# <gribua@gmail.com>, 2011.
# Translators:
# Denis Lysenko <gribua@gmail.com>, 2011
# LinuxChata, 2014
# madjong <madjong@i2pmail.org>, 2014
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"PO-Revision-Date: 2011-06-19 14:01+0000\n"
"Last-Translator: Pharmasolin <gribua@gmail.com>\n"
"Language-Team: Ukrainian (Ukraine) (http://www.transifex.net/projects/p/I2P/team/uk_UA/)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-09 19:27+0000\n"
"PO-Revision-Date: 2015-08-07 16:31+0000\n"
"Last-Translator: Denis Lysenko <gribua@gmail.com>\n"
"Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/otf/I2P/language/uk_UA/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: uk_UA\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
@ -46,12 +49,10 @@ msgstr "Перезапустити I2P"
msgid "Stop I2P"
msgstr "Зупинити I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:43
msgid "Tray icon configuration"
msgstr "Настройка трей-іконки"
msgstr "Налаштування трей-іконки"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:46
msgid "Should tray icon be enabled?"
msgstr "Чм повинна трей-іконка бути включена?"
msgstr "Чи повинна трей-іконка бути включена?"

View File

@ -20,7 +20,7 @@ public class ExternalTrayManager extends TrayManager {
@Override
public PopupMenu getMainMenu() {
PopupMenu popup = new PopupMenu();
MenuItem startItem = new MenuItem(_("Start I2P"));
MenuItem startItem = new MenuItem(_t("Start I2P"));
startItem.addActionListener(new ActionListener() {
@Override
@ -35,7 +35,7 @@ public class ExternalTrayManager extends TrayManager {
@Override
protected void done() {
trayIcon.displayMessage(_("Starting"), _("I2P is starting!"), TrayIcon.MessageType.INFO);
trayIcon.displayMessage(_t("Starting"), _t("I2P is starting!"), TrayIcon.MessageType.INFO);
//Hide the tray icon.
//We cannot stop the desktopgui program entirely,
//since that risks killing the I2P process as well.

View File

@ -23,7 +23,7 @@ public class InternalTrayManager extends TrayManager {
public PopupMenu getMainMenu() {
PopupMenu popup = new PopupMenu();
MenuItem browserLauncher = new MenuItem(_("Launch I2P Browser"));
MenuItem browserLauncher = new MenuItem(_t("Launch I2P Browser"));
browserLauncher.addActionListener(new ActionListener() {
@Override
@ -47,7 +47,7 @@ public class InternalTrayManager extends TrayManager {
}.execute();
}
});
MenuItem desktopguiConfigurationLauncher = new MenuItem(_("Configure desktopgui"));
MenuItem desktopguiConfigurationLauncher = new MenuItem(_t("Configure desktopgui"));
desktopguiConfigurationLauncher.addActionListener(new ActionListener() {
@Override
@ -64,7 +64,7 @@ public class InternalTrayManager extends TrayManager {
}
});
MenuItem restartItem = new MenuItem(_("Restart I2P"));
MenuItem restartItem = new MenuItem(_t("Restart I2P"));
restartItem.addActionListener(new ActionListener() {
@Override
@ -82,7 +82,7 @@ public class InternalTrayManager extends TrayManager {
}
});
MenuItem stopItem = new MenuItem(_("Stop I2P"));
MenuItem stopItem = new MenuItem(_t("Stop I2P"));
stopItem.addActionListener(new ActionListener() {
@Override

View File

@ -7,9 +7,6 @@ package net.i2p.desktopgui;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import java.awt.GraphicsEnvironment;
import net.i2p.I2PAppContext;
import net.i2p.desktopgui.router.RouterManager;
import net.i2p.desktopgui.util.*;
import net.i2p.util.Log;

View File

@ -1,28 +1,15 @@
package net.i2p.desktopgui;
import java.awt.AWTException;
import java.awt.Desktop;
import java.awt.Image;
import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.awt.SystemTray;
import java.awt.Toolkit;
import java.awt.TrayIcon;
import java.awt.Desktop.Action;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import javax.swing.SwingWorker;
import net.i2p.desktopgui.i18n.DesktopguiTranslator;
import net.i2p.desktopgui.router.RouterManager;
import net.i2p.desktopgui.util.BrowseException;
import net.i2p.desktopgui.util.ConfigurationManager;
import net.i2p.desktopgui.util.I2PDesktop;
import net.i2p.util.Log;
/**
@ -91,7 +78,7 @@ public abstract class TrayManager {
return image;
}
protected static String _(String s) {
return DesktopguiTranslator._(s);
protected static String _t(String s) {
return DesktopguiTranslator._t(s);
}
}

View File

@ -32,7 +32,6 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame {
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
@ -41,10 +40,10 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame {
cancelButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle(_("Tray icon configuration"));
setTitle(_t("Tray icon configuration"));
desktopguiEnabled.setSelected(true);
desktopguiEnabled.setText(_("Should tray icon be enabled?"));
desktopguiEnabled.setText(_t("Should tray icon be enabled?"));
desktopguiEnabled.setActionCommand("shouldDesktopguiBeEnabled");
okButton.setText("OK");
@ -99,8 +98,8 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame {
configureDesktopgui();
}//GEN-LAST:event_okButtonMouseReleased
protected static String _(String s) {
return DesktopguiTranslator._(s);
protected static String _t(String s) {
return DesktopguiTranslator._t(s);
}
private void configureDesktopgui() {
@ -115,7 +114,7 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame {
System.out.println("Enabling desktopgui");
}
try {
RouterManager.getRouterContext().setProperty(property, value);
RouterManager.getRouterContext().router().saveConfig(property, value);
} catch (Exception ex) {
Logger.getLogger(DesktopguiConfigurationFrame.class.getName()).log(Level.SEVERE, null, ex);
}

View File

@ -16,11 +16,11 @@ public class DesktopguiTranslator {
return ctx;
}
public static String _(String s) {
public static String _t(String s) {
return Translate.getString(s, getRouterContext(), BUNDLE_NAME);
}
public static String _(String s, Object o) {
public static String _t(String s, Object o) {
return Translate.getString(s, o, getRouterContext(), BUNDLE_NAME);
}
}

View File

@ -5,8 +5,6 @@ import java.io.IOException;
import org.tanukisoftware.wrapper.WrapperManager;
import net.i2p.I2PAppContext;
import net.i2p.desktopgui.i18n.DesktopguiTranslator;
import net.i2p.desktopgui.util.ConfigurationManager;
import net.i2p.router.Router;
import net.i2p.router.RouterContext;
import net.i2p.util.Log;

View File

@ -78,7 +78,7 @@ public class ConfigurationManager {
* @return The value of a configuration: true if found, defaultValue if not found.
*/
public boolean getBooleanConfiguration(String arg, boolean defaultValue) {
Boolean value = ((Boolean) booleanConfigurations.get("startWithI2P"));
Boolean value = booleanConfigurations.get("startWithI2P");
System.out.println(value);
if(value != null) {
return value;

View File

@ -1,13 +1,8 @@
package net.i2p.desktopgui.util;
import java.awt.Desktop;
import java.awt.TrayIcon;
import java.awt.Desktop.Action;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import net.i2p.desktopgui.router.RouterManager;
import net.i2p.util.Log;
public class I2PDesktop {

View File

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="java/src"/>
<classpathentry combineaccessrules="false" kind="src" path="/i2p_sdk"/>
<classpathentry combineaccessrules="false" kind="src" path="/ministreaming"/>
<classpathentry kind="lib" path="/jetty/jettylib/javax.servlet.jar"/>
<classpathentry kind="lib" path="/jetty/jettylib/jetty-util.jar"/>
<classpathentry kind="lib" path="/jetty/jettylib/org.mortbay.jetty.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/i2p_sdk"/>
<classpathentry combineaccessrules="false" kind="src" path="/jetty"/>
<classpathentry combineaccessrules="false" kind="src" path="/ministreaming"/>
<classpathentry kind="output" path="java/build/obj"/>
</classpath>

View File

@ -1,340 +1 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
See ../../licenses/LICENSE-GPLv2.txt

View File

@ -1,24 +0,0 @@
- I2PSnark:
- add multitorrent support by checking the metainfo hash in the
PeerAcceptor and feeding it off to the appropriate coordinator
- add a web interface
- BEncode
- Byte array length indicator can overflow.
- Support really big BigNums (only 256 chars allowed now)
- Better BEValue toString(). Uses stupid heuristic now for debugging.
- Implemented bencoding.
- Remove application level hack to calculate sha1 hash for metainfo
(But can it be done as efficiently?)
- Storage
- Check file name filter.
- TrackerClient
- Support undocumented &numwant= request.
- PeerCoordinator
- Disconnect from other seeds as soon as you are a seed yourself.
- Text UI
- Make it completely silent.

View File

@ -17,29 +17,28 @@
<classpath>
<pathelement location="../../../core/java/build/obj" />
<pathelement location="../../ministreaming/java/build/obj" />
<pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../../jetty/jettylib/jetty-servlet.jar" />
<pathelement location="../../jetty/jettylib/jetty-util.jar" />
</classpath>
</depend>
</target>
<property name="javac.compilerargs" value="" />
<property name="javac.version" value="1.6" />
<property name="require.gettext" value="true" />
<condition property="no.bundle">
<isfalse value="${require.gettext}" />
</condition>
<property name="javac.compilerargs" value="" />
<property name="require.gettext" value="true" />
<target name="compile" depends="depend">
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
<javac
srcdir="./src"
debug="true" deprecation="on" source="1.5" target="1.5"
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
destdir="./build/obj"
includeAntRuntime="false"
classpath="../../../core/java/build/i2p.jar:../../jetty/jettylib/org.mortbay.jetty.jar:../../jetty/jettylib/javax.servlet.jar:../../jetty/jettylib/jetty-servlet.jar:../../jetty/jettylib/jetty-util.jar:../../ministreaming/java/build/mstreaming.jar" >
classpath="../../../core/java/build/i2p.jar:../../jetty/jettylib/javax.servlet.jar:../../ministreaming/java/build/mstreaming.jar" >
<compilerarg line="${javac.compilerargs}" />
</javac>
</target>
@ -101,15 +100,15 @@
<target name="war" depends="jar, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<copy todir="build/icons/.icons" >
<fileset dir="../icons/" />
<copy todir="build/resources/.resources" >
<fileset dir="../resources/" />
</copy>
<!-- mime.properties must be in with the classes -->
<copy file="../mime.properties" todir="build/obj/org/klomp/snark/web" />
<war destfile="../i2psnark.war" webxml="../web.xml" >
<!-- include only the web stuff, as of 0.7.12 the router will add i2psnark.jar to the classpath for the war -->
<classes dir="./build/obj" includes="**/web/*" />
<fileset dir="build/icons/" />
<fileset dir="build/resources/" />
<manifest>
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
@ -122,7 +121,7 @@
<target name="warUpToDate">
<uptodate property="war.uptodate" targetfile="../i2psnark.war" >
<srcfiles dir= "." includes="build/obj/org/klomp/snark/web/*.class ../icons/* ../web.xml" />
<srcfiles dir= "." includes="build/obj/org/klomp/snark/web/*.class ../resources/**/* ../web.xml" />
</uptodate>
</target>
@ -130,6 +129,7 @@
<!-- Update the messages_*.po files.
We need to supply the bat file for windows, and then change the fail property to true -->
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
<env key="JAVA_HOME" value="${java.home}" />
<arg value="./bundle-messages.sh" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" >

View File

@ -15,18 +15,22 @@ TMPFILE=build/javafiles.txt
export TZ=UTC
RC=0
if ! $(which javac > /dev/null 2>&1); then
export JAVAC=${JAVA_HOME}/../bin/javac
fi
if [ "$1" = "-p" ]
then
POUPDATE=1
fi
# on windows, one must specify the path of commnad find
# since windows has its own retarded version of find.
# since windows has its own version of find.
if which find|grep -q -i windows ; then
export PATH=.:/bin:/usr/local/bin:$PATH
fi
# Fast mode - update ondemond
# set LG2 to the language you need in envrionment varibales to enable this
# set LG2 to the language you need in environment variables to enable this
# add ../java/ so the refs will work in the po file
JPATHS="../java/src"
@ -59,13 +63,13 @@ do
echo "Updating the $i file from the tags..."
# extract strings from java and jsp files, and update messages.po files
# translate calls must be one of the forms:
# _("foo")
# _t("foo")
# _x("foo")
# To start a new translation, copy the header from an old translation to the new .po file,
# then ant distclean poupdate.
find $JPATHS -name *.java > $TMPFILE
xgettext -f $TMPFILE -F -L java --from-code=UTF-8 --add-comments\
--keyword=_ --keyword=_x \
--keyword=_t --keyword=_x \
-o ${i}t
if [ $? -ne 0 ]
then

View File

@ -4,7 +4,6 @@
*/
package org.klomp.snark;
import java.util.Arrays;
import java.util.Properties;
import net.i2p.client.I2PSessionException;

View File

@ -20,6 +20,8 @@
package org.klomp.snark;
import java.util.Arrays;
/**
* Container of a byte array representing set and unset bits.
@ -66,7 +68,7 @@ public class BitField
/**
* This returns the actual byte array used. Changes to this array
* effect this BitField. Note that some bits at the end of the byte
* affect this BitField. Note that some bits at the end of the byte
* array are supposed to be always unset if they represent bits
* bigger then the size of the bitfield.
*/
@ -105,6 +107,37 @@ public class BitField
}
}
/**
* Sets the given bit to false.
*
* @exception IndexOutOfBoundsException if bit is smaller then zero
* bigger then size (inclusive).
* @since 0.9.22
*/
public void clear(int bit)
{
if (bit < 0 || bit >= size)
throw new IndexOutOfBoundsException(Integer.toString(bit));
int index = bit/8;
int mask = 128 >> (bit % 8);
synchronized(this) {
if ((bitfield[index] & mask) != 0) {
count--;
bitfield[index] &= ~mask;
}
}
}
/**
* Sets all bits to true.
*
* @since 0.9.21
*/
public void setAll() {
Arrays.fill(bitfield, (byte) 0xff);
count = size;
}
/**
* Return true if the bit is set or false if it is not.
*

View File

@ -54,7 +54,15 @@ public interface CompleteListener {
*/
public void gotPiece(Snark snark);
// not really listeners but the easiest way to get back to an optional SnarkManager
/** not really listeners but the easiest way to get back to an optional SnarkManager */
public long getSavedTorrentTime(Snark snark);
public BitField getSavedTorrentBitField(Snark snark);
/**
* @since 0.9.15
*/
public boolean getSavedPreserveNamesSetting(Snark snark);
/**
* @since 0.9.15
*/
public long getSavedUploaded(Snark snark);
}

View File

@ -24,6 +24,7 @@ import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ConnectException;
import net.i2p.I2PAppContext;
import net.i2p.I2PException;
@ -41,51 +42,49 @@ import net.i2p.util.SimpleTimer2;
class ConnectionAcceptor implements Runnable
{
private final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(ConnectionAcceptor.class);
private I2PServerSocket serverSocket;
private PeerAcceptor peeracceptor;
private final PeerAcceptor peeracceptor;
private Thread thread;
private final I2PSnarkUtil _util;
private final ObjectCounter<Hash> _badCounter = new ObjectCounter();
private final ObjectCounter<Hash> _badCounter = new ObjectCounter<Hash>();
private final SimpleTimer2.TimedEvent _cleaner;
private volatile boolean stop;
private boolean socketChanged;
// protocol errors before blacklisting.
private static final int MAX_BAD = 1;
private static final long BAD_CLEAN_INTERVAL = 30*60*1000;
/**
* Multitorrent
* Multitorrent. Caller MUST call startAccepting()
*/
public ConnectionAcceptor(I2PSnarkUtil util) {
public ConnectionAcceptor(I2PSnarkUtil util, PeerCoordinatorSet set) {
_util = util;
_cleaner = new Cleaner();
peeracceptor = new PeerAcceptor(set);
}
public synchronized void startAccepting(PeerCoordinatorSet set, I2PServerSocket socket) {
if (serverSocket != socket) {
if ( (peeracceptor == null) || (peeracceptor.coordinators != set) )
peeracceptor = new PeerAcceptor(set);
serverSocket = socket;
/**
* May be called even when already running. May be called to start up again after halt().
*/
public synchronized void startAccepting() {
stop = false;
socketChanged = true;
if (_log.shouldLog(Log.WARN))
_log.warn("ConnectionAcceptor startAccepting new thread? " + (thread == null));
if (thread == null) {
thread = new I2PAppThread(this, "I2PSnark acceptor");
thread.setDaemon(true);
thread.start();
_cleaner.schedule(BAD_CLEAN_INTERVAL);
_cleaner.reschedule(BAD_CLEAN_INTERVAL, false);
}
}
}
/**
* Unused (single torrent)
* Unused (single torrent).
* Do NOT call startAccepting().
*/
public ConnectionAcceptor(I2PSnarkUtil util, I2PServerSocket serverSocket,
public ConnectionAcceptor(I2PSnarkUtil util,
PeerAcceptor peeracceptor)
{
this.serverSocket = serverSocket;
this.peeracceptor = peeracceptor;
_util = util;
@ -95,55 +94,79 @@ class ConnectionAcceptor implements Runnable
_cleaner = new Cleaner();
}
public void halt()
/**
* May be restarted later with startAccepting().
*/
public synchronized void halt()
{
if (stop) return;
stop = true;
locked_halt();
Thread t = thread;
if (t != null) {
t.interrupt();
thread = null;
}
}
I2PServerSocket ss = serverSocket;
if (ss != null)
/**
* Caller must synch
* @since 0.9.9
*/
private void locked_halt()
{
I2PServerSocket ss = _util.getServerSocket();
if (ss != null) {
try
{
ss.close();
}
catch(I2PException ioe) { }
Thread t = thread;
if (t != null)
t.interrupt();
}
_badCounter.clear();
_cleaner.cancel();
}
/**
* Effectively unused, would only be called if we changed
* I2CP host/port, which is hidden in the gui if in router context
* FIXME this only works if already running
*/
public void restart() {
serverSocket = _util.getServerSocket();
socketChanged = true;
public synchronized void restart() {
Thread t = thread;
if (t != null)
t.interrupt();
_cleaner.schedule(BAD_CLEAN_INTERVAL);
}
public int getPort()
{
return 6881; // serverSocket.getLocalPort();
return TrackerClient.PORT; // serverSocket.getLocalPort();
}
public void run()
{
try {
run2();
} finally {
synchronized(this) {
thread = null;
}
}
}
private void run2()
{
while(!stop)
{
if (socketChanged) {
// ok, already updated
socketChanged = false;
}
I2PServerSocket serverSocket = _util.getServerSocket();
while ( (serverSocket == null) && (!stop)) {
if (!(_util.isConnecting() || _util.connected())) {
stop = true;
break;
}
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
serverSocket = _util.getServerSocket();
if (serverSocket == null)
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
}
if(stop)
break;
@ -151,25 +174,25 @@ class ConnectionAcceptor implements Runnable
{
I2PSocket socket = serverSocket.accept();
if (socket == null) {
if (socketChanged) {
continue;
} else {
I2PServerSocket ss = _util.getServerSocket();
if (ss != serverSocket) {
serverSocket = ss;
socketChanged = true;
}
}
} else {
if (socket.getPeerDestination().equals(_util.getMyDestination())) {
_log.error("Incoming connection from myself");
try { socket.close(); } catch (IOException ioe) {}
continue;
}
int bad = _badCounter.count(socket.getPeerDestination().calculateHash());
Hash h = socket.getPeerDestination().calculateHash();
if (socket.getLocalPort() == 80) {
_badCounter.increment(h);
if (_log.shouldLog(Log.WARN))
_log.error("Dropping incoming HTTP from " + h);
try { socket.close(); } catch (IOException ioe) {}
continue;
}
int bad = _badCounter.count(h);
if (bad >= MAX_BAD) {
if (_log.shouldLog(Log.WARN))
_log.warn("Rejecting connection from " + socket.getPeerDestination().calculateHash() +
_log.warn("Rejecting connection from " + h +
" after " + bad + " failures, max is " + MAX_BAD);
try { socket.close(); } catch (IOException ioe) {}
continue;
@ -180,26 +203,48 @@ class ConnectionAcceptor implements Runnable
}
catch (I2PException ioe)
{
if (!socketChanged) {
_log.error("Error while accepting", ioe);
stop = true;
int level = stop ? Log.WARN : Log.ERROR;
if (_log.shouldLog(level))
_log.log(level, "Error while accepting", ioe);
synchronized(this) {
if (!stop) {
locked_halt();
thread = null;
stop = true;
}
}
}
catch (ConnectException ioe)
{
// This is presumed to be due to socket closing by I2PSnarkUtil.disconnect(),
// which does not currently call our halt(), although it should
if (_log.shouldWarn())
_log.warn("Error while accepting", ioe);
synchronized(this) {
if (!stop) {
locked_halt();
thread = null;
stop = true;
}
}
}
catch (IOException ioe)
{
_log.error("Error while accepting", ioe);
stop = true;
int level = stop ? Log.WARN : Log.ERROR;
if (_log.shouldLog(level))
_log.log(level, "Error while accepting", ioe);
synchronized(this) {
if (!stop) {
locked_halt();
thread = null;
stop = true;
}
}
}
// catch oom?
}
try
{
if (serverSocket != null)
serverSocket.close();
}
catch (I2PException ignored) { }
if (_log.shouldLog(Log.WARN))
_log.warn("ConnectionAcceptor closed");
}
private class Handler implements Runnable {

View File

@ -31,7 +31,7 @@ abstract class ExtensionHandler {
public static final int ID_DHT = 3;
/** not using the option bit since the compact format is different */
public static final String TYPE_DHT = "i2p_dht";
/** Pieces * SHA1 Hash length, + 25% extra for file names, benconding overhead, etc */
/** Pieces * SHA1 Hash length, + 25% extra for file names, bencoding overhead, etc */
private static final int MAX_METADATA_SIZE = Storage.MAX_PIECES * 20 * 5 / 4;
private static final int PARALLEL_REQUESTS = 3;
@ -43,8 +43,8 @@ abstract class ExtensionHandler {
* @return bencoded outgoing handshake message
*/
public static byte[] getHandshake(int metasize, boolean pexAndMetadata, boolean dht) {
Map<String, Object> handshake = new HashMap();
Map<String, Integer> m = new HashMap();
Map<String, Object> handshake = new HashMap<String, Object>();
Map<String, Integer> m = new HashMap<String, Integer>();
if (pexAndMetadata) {
m.put(TYPE_METADATA, Integer.valueOf(ID_METADATA));
m.put(TYPE_PEX, Integer.valueOf(ID_PEX));
@ -56,7 +56,7 @@ abstract class ExtensionHandler {
}
// include the map even if empty so the far-end doesn't NPE
handshake.put("m", m);
handshake.put("p", Integer.valueOf(6881));
handshake.put("p", Integer.valueOf(TrackerClient.PORT));
handshake.put("v", "I2PSnark");
handshake.put("reqq", Integer.valueOf(5));
return BEncoder.bencode(handshake);
@ -90,17 +90,20 @@ abstract class ExtensionHandler {
peer.setHandshakeMap(map);
Map<String, BEValue> msgmap = map.get("m").getMap();
if (msgmap.get(TYPE_PEX) != null) {
if (log.shouldLog(Log.DEBUG))
log.debug("Peer supports PEX extension: " + peer);
// peer state calls peer listener calls sendPEX()
}
if (log.shouldLog(Log.DEBUG))
log.debug("Peer " + peer + " supports extensions: " + msgmap.keySet());
if (msgmap.get(TYPE_DHT) != null) {
if (log.shouldLog(Log.DEBUG))
log.debug("Peer supports DHT extension: " + peer);
// peer state calls peer listener calls sendDHT()
}
//if (msgmap.get(TYPE_PEX) != null) {
// if (log.shouldLog(Log.DEBUG))
// log.debug("Peer supports PEX extension: " + peer);
// // peer state calls peer listener calls sendPEX()
//}
//if (msgmap.get(TYPE_DHT) != null) {
// if (log.shouldLog(Log.DEBUG))
// log.debug("Peer supports DHT extension: " + peer);
// // peer state calls peer listener calls sendDHT()
//}
MagnetState state = peer.getMagnetState();
@ -110,7 +113,8 @@ abstract class ExtensionHandler {
// drop if we need metainfo and we haven't found anybody yet
synchronized(state) {
if (!state.isInitialized()) {
log.debug("Dropping peer, we need metadata! " + peer);
if (log.shouldLog(Log.DEBUG))
log.debug("Dropping peer, we need metadata! " + peer);
peer.disconnect();
}
}
@ -124,7 +128,8 @@ abstract class ExtensionHandler {
// drop if we need metainfo and we haven't found anybody yet
synchronized(state) {
if (!state.isInitialized()) {
log.debug("Dropping peer, we need metadata! " + peer);
if (log.shouldLog(Log.DEBUG))
log.debug("Dropping peer, we need metadata! " + peer);
peer.disconnect();
}
}
@ -202,30 +207,31 @@ abstract class ExtensionHandler {
if (log.shouldLog(Log.DEBUG))
log.debug("Got request for " + piece + " from: " + peer);
byte[] pc;
int totalSize;
synchronized(state) {
pc = state.getChunk(piece);
totalSize = state.getSize();
}
sendPiece(peer, piece, pc);
sendPiece(peer, piece, pc, totalSize);
// Do this here because PeerConnectionOut only reports for PIECE messages
peer.uploaded(pc.length);
listener.uploaded(peer, pc.length);
} else if (type == TYPE_DATA) {
int size = map.get("total_size").getInt();
if (log.shouldLog(Log.DEBUG))
log.debug("Got data for " + piece + " length " + size + " from: " + peer);
// On close reading of BEP 9, this is the total metadata size.
// Prior to 0.9.21, we sent the piece size, so we can't count on it.
// just ignore it. The actual length will be verified in saveChunk()
//int size = map.get("total_size").getInt();
//if (log.shouldLog(Log.DEBUG))
// log.debug("Got data for " + piece + " length " + size + " from: " + peer);
boolean done;
int chk = -1;
synchronized(state) {
if (state.isComplete())
return;
int len = is.available();
if (len != size) {
// probably fatal
if (log.shouldLog(Log.WARN))
log.warn("total_size " + size + " but avail data " + len);
}
peer.downloaded(len);
listener.downloaded(peer, len);
// this checks the size
done = state.saveChunk(piece, bs, bs.length - len, len);
if (log.shouldLog(Log.INFO))
log.info("Got chunk " + piece + " from " + peer);
@ -274,7 +280,7 @@ abstract class ExtensionHandler {
/** REQUEST and REJECT are the same except for message type */
private static void sendMessage(Peer peer, int type, int piece) {
Map<String, Object> map = new HashMap();
Map<String, Object> map = new HashMap<String, Object>();
map.put("msg_type", Integer.valueOf(type));
map.put("piece", Integer.valueOf(piece));
byte[] payload = BEncoder.bencode(map);
@ -288,11 +294,15 @@ abstract class ExtensionHandler {
}
}
private static void sendPiece(Peer peer, int piece, byte[] data) {
Map<String, Object> map = new HashMap();
private static void sendPiece(Peer peer, int piece, byte[] data, int totalSize) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("msg_type", Integer.valueOf(TYPE_DATA));
map.put("piece", Integer.valueOf(piece));
map.put("total_size", Integer.valueOf(data.length));
// BEP 9
// "This key has the same semantics as the 'metadata_size' in the extension header"
// which apparently means the same value. Fixed in 0.9.21.
//map.put("total_size", Integer.valueOf(data.length));
map.put("total_size", Integer.valueOf(totalSize));
byte[] dict = BEncoder.bencode(map);
byte[] payload = new byte[dict.length + data.length];
System.arraycopy(dict, 0, payload, 0, dict.length);
@ -332,7 +342,7 @@ abstract class ExtensionHandler {
if (ids.length < HASH_LENGTH)
return;
int len = Math.min(ids.length, (I2PSnarkUtil.MAX_CONNECTIONS - 1) * HASH_LENGTH);
List<PeerID> peers = new ArrayList(len / HASH_LENGTH);
List<PeerID> peers = new ArrayList<PeerID>(len / HASH_LENGTH);
for (int off = 0; off < len; off += HASH_LENGTH) {
byte[] hash = new byte[HASH_LENGTH];
System.arraycopy(ids, off, hash, 0, HASH_LENGTH);
@ -380,7 +390,7 @@ abstract class ExtensionHandler {
public static void sendPEX(Peer peer, List<Peer> pList) {
if (pList.isEmpty())
return;
Map<String, Object> map = new HashMap();
Map<String, Object> map = new HashMap<String, Object>();
byte[] peers = new byte[HASH_LENGTH * pList.size()];
int off = 0;
for (Peer p : pList) {
@ -404,7 +414,7 @@ abstract class ExtensionHandler {
* @since DHT
*/
public static void sendDHT(Peer peer, int qport, int rport) {
Map<String, Object> map = new HashMap();
Map<String, Object> map = new HashMap<String, Object>();
map.put("port", Integer.valueOf(qport));
map.put("rport", Integer.valueOf(rport));
byte[] payload = BEncoder.bencode(map);

View File

@ -3,18 +3,18 @@ package org.klomp.snark;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
import net.i2p.I2PAppContext;
import net.i2p.I2PException;
import net.i2p.client.I2PClient;
import net.i2p.client.I2PSession;
import net.i2p.client.I2PSessionException;
import net.i2p.client.streaming.I2PServerSocket;
@ -33,7 +33,6 @@ import net.i2p.util.FileUtil;
import net.i2p.util.Log;
import net.i2p.util.SecureDirectory;
import net.i2p.util.SecureFile;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer;
import net.i2p.util.Translate;
@ -76,11 +75,10 @@ public class I2PSnarkUtil {
private static final int EEPGET_CONNECT_TIMEOUT_SHORT = 5*1000;
public static final int DEFAULT_STARTUP_DELAY = 3;
public static final boolean DEFAULT_USE_OPENTRACKERS = true;
public static final String DEFAULT_OPENTRACKERS = "http://tracker.welterde.i2p/a";
public static final int DEFAULT_MAX_UP_BW = 8; //KBps
public static final int MAX_CONNECTIONS = 16; // per torrent
public static final String PROP_MAX_BW = "i2cp.outboundBytesPerSecond";
public static final boolean DEFAULT_USE_DHT = true;
public static final String EEPGET_USER_AGENT = "I2PSnark";
public I2PSnarkUtil(I2PAppContext ctx) {
this(ctx, "i2psnark");
@ -94,23 +92,22 @@ public class I2PSnarkUtil {
_context = ctx;
_log = _context.logManager().getLog(Snark.class);
_baseName = baseName;
_opts = new HashMap();
_opts = new HashMap<String, String>();
//setProxy("127.0.0.1", 4444);
setI2CPConfig("127.0.0.1", 7654, null);
_banlist = new ConcurrentHashSet();
_banlist = new ConcurrentHashSet<Hash>();
_maxUploaders = Snark.MAX_TOTAL_UPLOADERS;
_maxUpBW = DEFAULT_MAX_UP_BW;
_maxUpBW = SnarkManager.DEFAULT_MAX_UP_BW;
_maxConnections = MAX_CONNECTIONS;
_startupDelay = DEFAULT_STARTUP_DELAY;
_shouldUseOT = DEFAULT_USE_OPENTRACKERS;
// FIXME split if default has more than one
_openTrackers = Collections.singletonList(DEFAULT_OPENTRACKERS);
_openTrackers = Collections.emptyList();
_shouldUseDHT = DEFAULT_USE_DHT;
// This is used for both announce replies and .torrent file downloads,
// so it must be available even if not connected to I2CP.
// so much for multiple instances
_tmpDir = new SecureDirectory(ctx.getTempDir(), baseName);
FileUtil.rmdir(_tmpDir, false);
_tmpDir = new SecureDirectory(ctx.getTempDir(), baseName + '-' + ctx.random().nextInt());
//FileUtil.rmdir(_tmpDir, false);
_tmpDir.mkdirs();
}
@ -139,6 +136,7 @@ public class I2PSnarkUtil {
public boolean configured() { return _configured; }
@SuppressWarnings({"unchecked", "rawtypes"})
public void setI2CPConfig(String i2cpHost, int i2cpPort, Map opts) {
if (i2cpHost != null)
_i2cpHost = i2cpHost;
@ -220,10 +218,8 @@ public class I2PSnarkUtil {
_log.debug("Connecting to I2P", new Exception("I did it"));
Properties opts = _context.getProperties();
if (_opts != null) {
for (Iterator iter = _opts.keySet().iterator(); iter.hasNext(); ) {
String key = (String)iter.next();
opts.setProperty(key, _opts.get(key).toString());
}
for (Map.Entry<String, String> entry : _opts.entrySet() )
opts.setProperty(entry.getKey(), entry.getValue());
}
if (opts.getProperty("inbound.nickname") == null)
opts.setProperty("inbound.nickname", _baseName.replace("i2psnark", "I2PSnark"));
@ -259,6 +255,10 @@ public class I2PSnarkUtil {
opts.setProperty("i2p.streaming.enforceProtocol", "true");
if (opts.getProperty("i2p.streaming.disableRejectLogging") == null)
opts.setProperty("i2p.streaming.disableRejectLogging", "true");
if (opts.getProperty("i2p.streaming.answerPings") == null)
opts.setProperty("i2p.streaming.answerPings", "false");
if (opts.getProperty(I2PClient.PROP_SIGTYPE) == null)
opts.setProperty(I2PClient.PROP_SIGTYPE, "EdDSA_SHA512_Ed25519");
_manager = I2PSocketManagerFactory.createManager(_i2cpHost, _i2cpPort, opts);
_connecting = false;
}
@ -324,14 +324,18 @@ public class I2PSnarkUtil {
if (_banlist.contains(dest))
throw new IOException("Not trying to contact " + dest.toBase64() + ", as they are banlisted");
try {
// TODO opts.setPort(xxx); connect(addr, opts)
// DHT moved above 6881 in 0.9.9
I2PSocket rv = _manager.connect(addr);
if (rv != null)
_banlist.remove(dest);
return rv;
} catch (I2PException ie) {
_banlist.add(dest);
_context.simpleScheduler().addEvent(new Unbanlist(dest), 10*60*1000);
throw new IOException("Unable to reach the peer " + peer + ": " + ie.getMessage());
_context.simpleTimer2().addEvent(new Unbanlist(dest), 10*60*1000);
IOException ioe = new IOException("Unable to reach the peer " + peer);
ioe.initCause(ie);
throw ioe;
}
}
@ -394,6 +398,7 @@ public class I2PSnarkUtil {
}
}
EepGet get = new I2PSocketEepGet(_context, _manager, retries, out.getAbsolutePath(), fetchURL);
get.addHeader("User-Agent", EEPGET_USER_AGENT);
if (get.fetch(timeout)) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Fetch successful [" + url + "]: size=" + out.length());
@ -435,6 +440,7 @@ public class I2PSnarkUtil {
}
ByteArrayOutputStream out = new ByteArrayOutputStream(initialSize);
EepGet get = new I2PSocketEepGet(_context, _manager, retries, -1, maxSize, null, out, fetchURL);
get.addHeader("User-Agent", EEPGET_USER_AGENT);
if (get.fetch(timeout)) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Fetch successful [" + url + "]: size=" + out.size());
@ -454,7 +460,7 @@ public class I2PSnarkUtil {
return null;
}
String getOurIPString() {
public String getOurIPString() {
Destination dest = getMyDestination();
if (dest != null)
return dest.toBase64();
@ -513,7 +519,7 @@ public class I2PSnarkUtil {
if (_log.shouldLog(Log.INFO))
_log.info("Using existing session for lookup of " + ip);
try {
return sess.lookupDest(h);
return sess.lookupDest(h, 15*1000);
} catch (I2PSessionException ise) {
}
}
@ -563,22 +569,37 @@ public class I2PSnarkUtil {
return rv;
}
/** @param ot non-null */
/** @param ot non-null list of announce URLs */
public void setOpenTrackers(List<String> ot) {
_openTrackers = ot;
}
/** List of open trackers to use as backups
/** List of open tracker announce URLs to use as backups
* @return non-null, possibly unmodifiable, empty if disabled
*/
public List<String> getOpenTrackers() {
if (!shouldUseOpenTrackers())
return Collections.EMPTY_LIST;
return Collections.emptyList();
return _openTrackers;
}
/**
* List of open trackers to use as backups even if disabled
* Is this announce URL probably for an open tracker?
*
* @since 0.9.17
*/
public boolean isKnownOpenTracker(String url) {
try {
URL u = new URL(url);
String host = u.getHost();
return host != null && SnarkManager.KNOWN_OPENTRACKERS.contains(host);
} catch (MalformedURLException mue) {
return false;
}
}
/**
* List of open tracker announce URLs to use as backups even if disabled
* @return non-null
* @since 0.9.4
*/
@ -640,7 +661,7 @@ public class I2PSnarkUtil {
* The {0} will be replaced by the parameter.
* Single quotes must be doubled, i.e. ' -> '' in the string.
* @param o parameter, not translated.
* To tranlslate parameter also, use _("foo {0} bar", _("baz"))
* To translate parameter also, use _t("foo {0} bar", _t("baz"))
* Do not double the single quotes in the parameter.
* Use autoboxing to call with ints, longs, floats, etc.
*/

View File

@ -22,46 +22,79 @@ import net.i2p.util.SimpleTimer2;
*/
class IdleChecker extends SimpleTimer2.TimedEvent {
private final SnarkManager _mgr;
private final I2PSnarkUtil _util;
private final PeerCoordinatorSet _pcs;
private final Log _log;
private int _consec;
private int _consecNotRunning;
private boolean _isIdle;
private String _lastIn = "3";
private String _lastOut = "3";
private final Object _lock = new Object();
private static final long CHECK_TIME = 63*1000;
private static final int MAX_CONSEC_IDLE = 4;
private static final int MAX_CONSEC_NOT_RUNNING = 20;
/**
* Caller must schedule
*/
public IdleChecker(I2PSnarkUtil util, PeerCoordinatorSet pcs) {
super(util.getContext().simpleTimer2());
_log = util.getContext().logManager().getLog(IdleChecker.class);
_util = util;
public IdleChecker(SnarkManager mgr, PeerCoordinatorSet pcs) {
super(mgr.util().getContext().simpleTimer2());
_util = mgr.util();
_log = _util.getContext().logManager().getLog(IdleChecker.class);
_mgr = mgr;
_pcs = pcs;
}
public void timeReached() {
synchronized (_lock) {
locked_timeReached();
}
}
private void locked_timeReached() {
if (_util.connected()) {
boolean hasPeers = false;
boolean torrentRunning = false;
int peerCount = 0;
for (PeerCoordinator pc : _pcs) {
if (pc.getPeers() > 0) {
hasPeers = true;
break;
if (!pc.halted()) {
torrentRunning = true;
peerCount += pc.getPeers();
}
}
if (hasPeers) {
if (_isIdle)
restoreTunnels();
if (torrentRunning) {
_consecNotRunning = 0;
} else {
if (_consecNotRunning++ >= MAX_CONSEC_NOT_RUNNING) {
if (_log.shouldLog(Log.WARN))
_log.warn("Closing tunnels on idle");
_util.disconnect();
_mgr.addMessage(_util.getString("No more torrents running.") + ' ' +
_util.getString("I2P tunnel closed."));
schedule(3 * CHECK_TIME);
return;
}
}
if (peerCount > 0) {
restoreTunnels(peerCount);
} else {
if (!_isIdle) {
if (_consec++ >= MAX_CONSEC_IDLE)
reduceTunnels();
else
restoreTunnels(1); // pretend we have one peer for now
}
}
} else {
_isIdle = false;
_consec = 0;
_consecNotRunning = 0;
_lastIn = "3";
_lastOut = "3";
}
schedule(CHECK_TIME);
}
@ -77,12 +110,13 @@ class IdleChecker extends SimpleTimer2.TimedEvent {
}
/**
* Restore tunnel count
* Restore or adjust tunnel count based on current peer count
* @param peerCount greater than zero
*/
private void restoreTunnels() {
_isIdle = false;
if (_log.shouldLog(Log.INFO))
private void restoreTunnels(int peerCount) {
if (_isIdle && _log.shouldLog(Log.INFO))
_log.info("Restoring tunnels on activity");
_isIdle = false;
Map<String, String> opts = _util.getI2CPOptions();
String i = opts.get("inbound.quantity");
if (i == null)
@ -96,7 +130,30 @@ class IdleChecker extends SimpleTimer2.TimedEvent {
String ob= opts.get("outbound.backupQuantity");
if (ob == null)
ob = "0";
setTunnels(i, o, ib, ob);
// we don't need more tunnels than we have peers, reduce if so
// reduce to max(peerCount / 2, 2)
int in, out;
try {
in = Integer.parseInt(i);
} catch (NumberFormatException nfe) {
in = 3;
}
try {
out = Integer.parseInt(o);
} catch (NumberFormatException nfe) {
out = 3;
}
int target = Math.max(peerCount / 2, 2);
if (target < in && in > 2) {
in = target;
i = Integer.toString(in);
}
if (target < out && out > 2) {
out = target;
o = Integer.toString(out);
}
if (!(_lastIn.equals(i) && _lastOut.equals(o)))
setTunnels(i, o, ib, ob);
}
/**
@ -108,12 +165,16 @@ class IdleChecker extends SimpleTimer2.TimedEvent {
if (mgr != null) {
I2PSession sess = mgr.getSession();
if (sess != null) {
if (_log.shouldLog(Log.INFO))
_log.info("New tunnel settings " + i + " / " + o + " / " + ib + " / " + ob);
Properties newProps = new Properties();
newProps.setProperty("inbound.quantity", i);
newProps.setProperty("outbound.quantity", o);
newProps.setProperty("inbound.backupQuantity", ib);
newProps.setProperty("outbound.backupQuantity", ob);
sess.updateOptions(newProps);
_lastIn = i;
_lastOut = o;
}
}
}

View File

@ -6,7 +6,6 @@ import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;
import net.i2p.util.RandomSource;
@ -188,9 +187,9 @@ class MagnetState {
* @return true if this was the last piece
* @throws NPE, IllegalArgumentException, IOException, ...
*/
public MetaInfo buildMetaInfo() throws Exception {
private MetaInfo buildMetaInfo() throws Exception {
// top map has nothing in it but the info map (no announce)
Map<String, BEValue> map = new HashMap();
Map<String, BEValue> map = new HashMap<String, BEValue>();
InputStream is = new ByteArrayInputStream(metainfoBytes);
BDecoder dec = new BDecoder(is);
BEValue bev = dec.bdecodeMap();

View File

@ -42,7 +42,7 @@ public class MagnetURI {
name = util.getString("Magnet") + ' ' + ihash;
String dn = getParam("dn", url);
if (dn != null)
name += " (" + Storage.filterName(dn) + ')';
name += " (" + dn + ')';
} else if (url.startsWith(MAGGOT)) {
// maggot://0691e40aae02e552cfcb57af1dca56214680c0c5:0b557bbdf8718e95d352fbe994dec3a383e2ede7
ihash = url.substring(MAGGOT.length()).trim();
@ -82,7 +82,7 @@ public class MagnetURI {
}
/**
* @return pretty name or null
* @return pretty name or null, NOT HTML escaped
*/
public String getName() {
return _name;
@ -133,7 +133,7 @@ public class MagnetURI {
}
if (idx < 0 || idx > uri.length())
return null;
List<String> rv = new ArrayList();
List<String> rv = new ArrayList<String>();
while (true) {
String p = uri.substring(idx);
uri = p;
@ -175,18 +175,25 @@ public class MagnetURI {
}
/**
* Decode %xx encoding, convert to UTF-8 if necessary
* Copied from i2ptunnel LocalHTTPServer
* Decode %xx encoding, convert to UTF-8 if necessary.
* Copied from i2ptunnel LocalHTTPServer.
* Also converts '+' to ' ' so the dn parameter comes out right
* These are coming in via a application/x-www-form-urlencoded form so
* the pluses are in there...
* hopefully any real + is encoded as %2B.
*
* @since 0.9.1
*/
private static String decode(String s) {
if (!s.contains("%"))
if (!(s.contains("%") || s.contains("+")))
return s;
StringBuilder buf = new StringBuilder(s.length());
boolean utf8 = false;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c != '%') {
if (c == '+') {
buf.append(' ');
} else if (c != '%') {
buf.append(c);
} else {
try {

View File

@ -55,11 +55,13 @@ class Message
byte type;
// Used for HAVE, REQUEST, PIECE and CANCEL messages.
// Also SUGGEST, REJECT, ALLOWED_FAST
// low byte used for EXTENSION message
// low two bytes used for PORT message
int piece;
// Used for REQUEST, PIECE and CANCEL messages.
// Also REJECT
int begin;
int length;
@ -104,15 +106,18 @@ class Message
int datalen = 1;
// piece is 4 bytes.
if (type == HAVE || type == REQUEST || type == PIECE || type == CANCEL)
if (type == HAVE || type == REQUEST || type == PIECE || type == CANCEL ||
type == SUGGEST || type == REJECT || type == ALLOWED_FAST)
datalen += 4;
// begin/offset is 4 bytes
if (type == REQUEST || type == PIECE || type == CANCEL)
if (type == REQUEST || type == PIECE || type == CANCEL ||
type == REJECT)
datalen += 4;
// length is 4 bytes
if (type == REQUEST || type == CANCEL)
if (type == REQUEST || type == CANCEL ||
type == REJECT)
datalen += 4;
// msg type is 1 byte
@ -131,15 +136,18 @@ class Message
dos.writeByte(type & 0xFF);
// Send additional info (piece number)
if (type == HAVE || type == REQUEST || type == PIECE || type == CANCEL)
if (type == HAVE || type == REQUEST || type == PIECE || type == CANCEL ||
type == SUGGEST || type == REJECT || type == ALLOWED_FAST)
dos.writeInt(piece);
// Send additional info (begin/offset)
if (type == REQUEST || type == PIECE || type == CANCEL)
if (type == REQUEST || type == PIECE || type == CANCEL ||
type == REJECT)
dos.writeInt(begin);
// Send additional info (length); for PIECE this is implicit.
if (type == REQUEST || type == CANCEL)
if (type == REQUEST || type == CANCEL ||
type == REJECT)
dos.writeInt(length);
if (type == EXTENSION)
@ -173,21 +181,32 @@ class Message
case UNINTERESTED:
return "UNINTERESTED";
case HAVE:
return "HAVE(" + piece + ")";
return "HAVE(" + piece + ')';
case BITFIELD:
return "BITFIELD";
case REQUEST:
return "REQUEST(" + piece + "," + begin + "," + length + ")";
return "REQUEST(" + piece + ',' + begin + ',' + length + ')';
case PIECE:
return "PIECE(" + piece + "," + begin + "," + length + ")";
return "PIECE(" + piece + ',' + begin + ',' + length + ')';
case CANCEL:
return "CANCEL(" + piece + "," + begin + "," + length + ")";
return "CANCEL(" + piece + ',' + begin + ',' + length + ')';
case PORT:
return "PORT(" + piece + ")";
return "PORT(" + piece + ')';
case EXTENSION:
return "EXTENSION(" + piece + ',' + data.length + ')';
// fast extensions below here
case SUGGEST:
return "SUGGEST(" + piece + ')';
case HAVE_ALL:
return "HAVE_ALL";
case HAVE_NONE:
return "HAVE_NONE";
case REJECT:
return "REJECT(" + piece + ',' + begin + ',' + length + ')';
case ALLOWED_FAST:
return "ALLOWED_FAST(" + piece + ')';
default:
return "<UNKNOWN>";
return "UNKNOWN (" + type + ')';
}
}
}

View File

@ -74,10 +74,11 @@ public class MetaInfo
* @param files null for single-file torrent
* @param lengths null for single-file torrent
* @param announce_list may be null
* @param created_by may be null
*/
MetaInfo(String announce, String name, String name_utf8, List<List<String>> files, List<Long> lengths,
int piece_length, byte[] piece_hashes, long length, boolean privateTorrent,
List<List<String>> announce_list)
List<List<String>> announce_list, String created_by)
{
this.announce = announce;
this.name = name;
@ -91,8 +92,8 @@ public class MetaInfo
this.privateTorrent = privateTorrent;
this.announce_list = announce_list;
this.comment = null;
this.created_by = null;
this.creation_date = 0;
this.created_by = created_by;
this.creation_date = I2PAppContext.getGlobalContext().clock().now();
// TODO if we add a parameter for other keys
//if (other != null) {
@ -156,11 +157,11 @@ public class MetaInfo
if (val == null) {
this.announce_list = null;
} else {
this.announce_list = new ArrayList();
this.announce_list = new ArrayList<List<String>>();
List<BEValue> bl1 = val.getList();
for (BEValue bev : bl1) {
List<BEValue> bl2 = bev.getList();
List<String> sl2 = new ArrayList();
List<String> sl2 = new ArrayList<String>();
for (BEValue bev2 : bl2) {
sl2.add(bev2.getString());
}
@ -216,7 +217,18 @@ public class MetaInfo
// BEP 27
val = info.get("private");
privateTorrent = val != null && val.getString().equals("1");
if (val != null) {
Object o = val.getValue();
// Is it supposed to be a number or a string?
// i2psnark does it as a string. BEP 27 doesn't say.
// Transmission does numbers. So does libtorrent.
// We handle both as of 0.9.9.
// We switch to storing as number as of 0.9.14.
privateTorrent = "1".equals(o) ||
((o instanceof Number) && ((Number) o).intValue() == 1);
} else {
privateTorrent = false;
}
val = info.get("piece length");
if (val == null)
@ -250,9 +262,9 @@ public class MetaInfo
if (size == 0)
throw new InvalidBEncodingException("zero size files list");
List<List<String>> m_files = new ArrayList(size);
List<List<String>> m_files_utf8 = new ArrayList(size);
List<Long> m_lengths = new ArrayList(size);
List<List<String>> m_files = new ArrayList<List<String>>(size);
List<List<String>> m_files_utf8 = new ArrayList<List<String>>(size);
List<Long> m_lengths = new ArrayList<Long>(size);
long l = 0;
for (int i = 0; i < list.size(); i++)
{
@ -278,7 +290,7 @@ public class MetaInfo
if (path_length == 0)
throw new InvalidBEncodingException("zero size file path list");
List<String> file = new ArrayList(path_length);
List<String> file = new ArrayList<String>(path_length);
Iterator<BEValue> it = path_list.iterator();
while (it.hasNext()) {
String s = it.next().getString();
@ -301,7 +313,7 @@ public class MetaInfo
path_list = val.getList();
path_length = path_list.size();
if (path_length > 0) {
file = new ArrayList(path_length);
file = new ArrayList<String>(path_length);
it = path_list.iterator();
while (it.hasNext())
file.add(it.next().getString());
@ -433,7 +445,7 @@ public class MetaInfo
/**
* The creation date (ms) or zero.
* Not available for locally-created torrents.
* As of 0.9.19, available for locally-created torrents.
* @since 0.9.7
*/
public long getCreationDate() {
@ -506,9 +518,10 @@ public class MetaInfo
sha1.update(bs, off, length);
byte[] hash = sha1.digest();
for (int i = 0; i < 20; i++)
for (int i = 0; i < 20; i++) {
if (hash[i] != piece_hashes[20 * piece + i])
return false;
}
return true;
}
@ -517,7 +530,6 @@ public class MetaInfo
* @since 0.9.1
*/
boolean checkPiece(PartialPiece pp) {
MessageDigest sha1 = SHA1.getInstance();
int piece = pp.getPiece();
byte[] hash;
try {
@ -529,9 +541,10 @@ public class MetaInfo
_log.warn("Error checking", ioe);
return false;
}
for (int i = 0; i < 20; i++)
for (int i = 0; i < 20; i++) {
if (hash[i] != piece_hashes[20 * piece + i])
return false;
}
return true;
}
@ -565,10 +578,10 @@ public class MetaInfo
*/
public MetaInfo reannounce(String announce) throws InvalidBEncodingException
{
Map<String, BEValue> m = new HashMap();
Map<String, BEValue> m = new HashMap<String, BEValue>();
if (announce != null)
m.put("announce", new BEValue(DataHelper.getUTF8(announce)));
Map info = createInfoMap();
Map<String, BEValue> info = createInfoMap();
m.put("info", new BEValue(info));
return new MetaInfo(m);
}
@ -578,12 +591,20 @@ public class MetaInfo
*/
public synchronized byte[] getTorrentData()
{
Map m = new HashMap();
Map<String, Object> m = new HashMap<String, Object>();
if (announce != null)
m.put("announce", announce);
if (announce_list != null)
m.put("announce-list", announce_list);
Map info = createInfoMap();
// misc. optional top-level stuff
if (comment != null)
m.put("comment", comment);
if (created_by != null)
m.put("created by", created_by);
if (creation_date != 0)
m.put("creation date", creation_date / 1000);
Map<String, BEValue> info = createInfoMap();
m.put("info", info);
// don't save this locally, we should only do this once
return BEncoder.bencode(m);
@ -607,31 +628,44 @@ public class MetaInfo
if (_log.shouldLog(Log.WARN))
_log.warn("Creating new infomap", new Exception());
// otherwise we must create it
Map info = new HashMap();
info.put("name", name);
Map<String, BEValue> info = new HashMap<String, BEValue>();
info.put("name", new BEValue(DataHelper.getUTF8(name)));
if (name_utf8 != null)
info.put("name.utf-8", name_utf8);
info.put("name.utf-8", new BEValue(DataHelper.getUTF8(name_utf8)));
// BEP 27
if (privateTorrent)
info.put("private", "1");
// switched to number in 0.9.14
//info.put("private", new BEValue(DataHelper.getUTF8("1")));
info.put("private", new BEValue(Integer.valueOf(1)));
info.put("piece length", Integer.valueOf(piece_length));
info.put("pieces", piece_hashes);
info.put("piece length", new BEValue(Integer.valueOf(piece_length)));
info.put("pieces", new BEValue(piece_hashes));
if (files == null)
info.put("length", Long.valueOf(length));
info.put("length", new BEValue(Long.valueOf(length)));
else
{
List l = new ArrayList();
List<BEValue> l = new ArrayList<BEValue>();
for (int i = 0; i < files.size(); i++)
{
Map file = new HashMap();
file.put("path", files.get(i));
if ( (files_utf8 != null) && (files_utf8.size() > i) )
file.put("path.utf-8", files_utf8.get(i));
file.put("length", lengths.get(i));
l.add(file);
Map<String, BEValue> file = new HashMap<String, BEValue>();
List<String> fi = files.get(i);
List<BEValue> befiles = new ArrayList<BEValue>(fi.size());
for (int j = 0; j < fi.size(); j++) {
befiles.add(new BEValue(DataHelper.getUTF8(fi.get(j))));
}
file.put("path", new BEValue(befiles));
if ( (files_utf8 != null) && (files_utf8.size() > i) ) {
List<String> fiu = files_utf8.get(i);
List<BEValue> beufiles = new ArrayList<BEValue>(fiu.size());
for (int j = 0; j < fiu.size(); j++) {
beufiles.add(new BEValue(DataHelper.getUTF8(fiu.get(j))));
}
file.put("path.utf-8", new BEValue(beufiles));
}
file.put("length", new BEValue(lengths.get(i)));
l.add(new BEValue(file));
}
info.put("files", l);
info.put("files", new BEValue(l));
}
// TODO if we add the ability for other keys in the first constructor

View File

@ -31,7 +31,7 @@ import net.i2p.util.SecureFile;
*
* @since 0.8.2
*/
class PartialPiece implements Comparable {
class PartialPiece implements Comparable<PartialPiece> {
// we store the piece so we can use it in compareTo()
private final Piece piece;
@ -108,7 +108,8 @@ class PartialPiece implements Comparable {
/**
* Convert this PartialPiece to a request for the next chunk.
* Used by PeerState only.
* Used by PeerState only. This depends on the downloaded value
* as set by setDownloaded() or read().
*/
public Request getRequest() {
@ -128,14 +129,16 @@ class PartialPiece implements Comparable {
}
/**
* How many bytes are good - only valid by setDownloaded()
* How many bytes are good - as set by setDownloaded() or read()
*/
public int getDownloaded() {
return this.off;
}
/**
* Call this before returning a PartialPiece to the PeerCoordinator
* Call this if necessary before returning a PartialPiece to the PeerCoordinator.
* We do not use a bitmap to track individual chunks received.
* Any chunks after a 'hole' will be lost.
* @since 0.9.1
*/
public void setDownloaded(int offset) {
@ -191,11 +194,20 @@ class PartialPiece implements Comparable {
/**
* Blocking.
* If offset matches the previous downloaded amount
* (as set by a previous call to read() or setDownlaoded()),
* the downloaded amount will be incremented by len.
*
* @since 0.9.1
*/
public void read(DataInputStream din, int off, int len) throws IOException {
public void read(DataInputStream din, int offset, int len) throws IOException {
if (bs != null) {
din.readFully(bs, off, len);
din.readFully(bs, offset, len);
synchronized (this) {
// only works for in-order chunks
if (this.off == offset)
this.off += len;
}
} else {
// read in fully before synching on raf
ByteArray ba;
@ -211,8 +223,11 @@ class PartialPiece implements Comparable {
synchronized (this) {
if (raf == null)
createTemp();
raf.seek(off);
raf.seek(offset);
raf.write(tmp);
// only works for in-order chunks
if (this.off == offset)
this.off += len;
}
if (ba != null)
_cache.release(ba, false);
@ -295,8 +310,7 @@ class PartialPiece implements Comparable {
* then rarest first,
* then highest downloaded first
*/
public int compareTo(Object o) throws ClassCastException {
PartialPiece opp = (PartialPiece)o;
public int compareTo(PartialPiece opp) {
int d = this.piece.compareTo(opp.piece);
if (d != 0)
return d;

View File

@ -28,6 +28,8 @@ import java.io.OutputStream;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PSocket;
@ -37,7 +39,7 @@ import net.i2p.util.Log;
import org.klomp.snark.bencode.BEValue;
public class Peer implements Comparable
public class Peer implements Comparable<Peer>
{
private final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(Peer.class);
// Identifying property, the peer id of the other side.
@ -55,8 +57,8 @@ public class Peer implements Comparable
private DataOutputStream dout;
/** running counters */
private long downloaded;
private long uploaded;
private final AtomicLong downloaded = new AtomicLong();
private final AtomicLong uploaded = new AtomicLong();
// Keeps state for in/out connections. Non-null when the handshake
// was successful, the connection setup and runs
@ -68,22 +70,24 @@ public class Peer implements Comparable
private I2PSocket sock;
private boolean deregister = true;
private static long __id;
private long _id;
private static final AtomicLong __id = new AtomicLong();
private final long _id;
private final AtomicBoolean _disconnected = new AtomicBoolean();
final static long CHECK_PERIOD = PeerCoordinator.CHECK_PERIOD; // 40 seconds
final static int RATE_DEPTH = PeerCoordinator.RATE_DEPTH; // make following arrays RATE_DEPTH long
private long uploaded_old[] = {-1,-1,-1};
private long downloaded_old[] = {-1,-1,-1};
// bytes per bt spec: 0011223344556677
static final long OPTION_EXTENSION = 0x0000000000100000l;
static final long OPTION_FAST = 0x0000000000000004l;
static final long OPTION_DHT = 0x0000000000000001l;
// bytes per bt spec: 0011223344556677
private static final long OPTION_EXTENSION = 0x0000000000100000l;
private static final long OPTION_FAST = 0x0000000000000004l;
//private static final long OPTION_DHT = 0x0000000000000001l;
/** we use a different bit since the compact format is different */
/* no, let's use an extension message
static final long OPTION_I2P_DHT = 0x0000000040000000l;
*/
static final long OPTION_AZMP = 0x1000000000000000l;
//private static final long OPTION_AZMP = 0x1000000000000000l;
private long options;
/**
@ -98,7 +102,7 @@ public class Peer implements Comparable
this.my_id = my_id;
this.infohash = infohash;
this.metainfo = metainfo;
_id = ++__id;
_id = __id.incrementAndGet();
//_log.debug("Creating a new peer with " + peerID.toString(), new Exception("creating"));
}
@ -123,7 +127,7 @@ public class Peer implements Comparable
byte[] id = handshake(in, out);
this.peerID = new PeerID(id, sock.getPeerDestination());
_id = ++__id;
_id = __id.incrementAndGet();
if (_log.shouldLog(Log.DEBUG))
_log.debug("Creating a new peer " + peerID.toString(), new Exception("creating " + _id));
}
@ -190,9 +194,8 @@ public class Peer implements Comparable
* Compares the PeerIDs.
* @deprecated unused?
*/
public int compareTo(Object o)
public int compareTo(Peer p)
{
Peer p = (Peer)o;
int rv = peerID.compareTo(p.peerID);
if (rv == 0) {
if (_id > p._id) return 1;
@ -294,7 +297,7 @@ public class Peer implements Comparable
if (_log.shouldLog(Log.DEBUG))
_log.debug("Start running the reader with " + toString());
// Use this thread for running the incomming connection.
// Use this thread for running the incoming connection.
// The outgoing connection creates its own Thread.
out.startup();
Thread.currentThread().setName("Snark reader from " + peerID);
@ -335,6 +338,9 @@ public class Peer implements Comparable
dout.write("BitTorrent protocol".getBytes("UTF-8"));
// Handshake write - options
long myOptions = OPTION_EXTENSION;
// we can't handle HAVE_ALL or HAVE_NONE if we don't know the number of pieces
if (metainfo != null)
myOptions |= OPTION_FAST;
// FIXME get util here somehow
//if (util.getDHT() != null)
// myOptions |= OPTION_I2P_DHT;
@ -382,15 +388,15 @@ public class Peer implements Comparable
if (options != 0) {
// send them something in runConnection() above
if (_log.shouldLog(Log.DEBUG))
_log.debug("Peer supports options 0x" + Long.toString(options, 16) + ": " + toString());
_log.debug("Peer supports options 0x" + Long.toHexString(options) + ": " + toString());
}
return bs;
}
/** @since 0.8.4 */
public long getOptions() {
return options;
/** @since 0.9.21 */
public boolean supportsFast() {
return (options & OPTION_FAST) != 0;
}
/** @since 0.8.4 */
@ -457,6 +463,8 @@ public class Peer implements Comparable
void disconnect()
{
if (!_disconnected.compareAndSet(false, true))
return;
PeerState s = state;
if (s != null)
{
@ -476,9 +484,11 @@ public class Peer implements Comparable
PeerConnectionIn in = s.in;
if (in != null)
in.disconnect();
PeerConnectionOut out = s.out;
if (out != null)
out.disconnect();
// this is blocking in streaming, so do this after closing the socket
// so it won't really block
//PeerConnectionOut out = s.out;
//if (out != null)
// out.disconnect();
PeerListener pl = s.listener;
if (pl != null)
pl.disconnected(this);
@ -492,6 +502,13 @@ public class Peer implements Comparable
_log.warn("Error disconnecting " + toString(), ioe);
}
}
if (s != null) {
// this is blocking in streaming, so do this after closing the socket
// so it won't really block
PeerConnectionOut out = s.out;
if (out != null)
out.disconnect();
}
}
/**
@ -604,7 +621,7 @@ public class Peer implements Comparable
* @since 0.8.4
*/
public void downloaded(int size) {
downloaded += size;
downloaded.addAndGet(size);
}
/**
@ -612,7 +629,7 @@ public class Peer implements Comparable
* @since 0.8.4
*/
public void uploaded(int size) {
uploaded += size;
uploaded.addAndGet(size);
}
/**
@ -621,7 +638,7 @@ public class Peer implements Comparable
*/
public long getDownloaded()
{
return downloaded;
return downloaded.get();
}
/**
@ -630,7 +647,7 @@ public class Peer implements Comparable
*/
public long getUploaded()
{
return uploaded;
return uploaded.get();
}
/**
@ -638,8 +655,8 @@ public class Peer implements Comparable
*/
public void resetCounters()
{
downloaded = 0;
uploaded = 0;
downloaded.set(0);
uploaded.set(0);
}
public long getInactiveTime() {

View File

@ -26,8 +26,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.SequenceInputStream;
import java.util.Iterator;
import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.data.Base64;
@ -170,8 +168,7 @@ class PeerAcceptor
if (b != PROTO[i])
throw new IOException("Bad protocol 0x" + Integer.toHexString(b) + " at byte " + i);
}
if (in.skip(8) != 8)
throw new IOException("EOF before hash");
DataHelper.skip(in, 8);
byte buf[] = new byte[20];
int read = DataHelper.read(in, buf);
if (read != buf.length)

View File

@ -24,7 +24,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;
import net.i2p.util.Log;
@ -73,9 +72,11 @@ class PeerCheckerTask implements Runnable
// Keep track of peers we remove now,
// we will add them back to the end of the list.
List<Peer> removed = new ArrayList();
List<Peer> removed = new ArrayList<Peer>();
int uploadLimit = coordinator.allowedUploaders();
boolean overBWLimit = coordinator.overUpBWLimit();
if (_log.shouldLog(Log.DEBUG))
_log.debug("peers: " + peerList.size() + " limit: " + uploadLimit + " overBW? " + overBWLimit);
DHT dht = _util.getDHT();
for (Peer peer : peerList) {
@ -222,7 +223,8 @@ class PeerCheckerTask implements Runnable
peer.keepAlive();
// announce them to local tracker (TrackerClient does this too)
if (dht != null && (_runCount % 5) == 0) {
dht.announce(coordinator.getInfoHash(), peer.getPeerID().getDestHash());
dht.announce(coordinator.getInfoHash(), peer.getPeerID().getDestHash(),
peer.isCompleted());
}
}
@ -265,13 +267,29 @@ class PeerCheckerTask implements Runnable
// close out unused files, but we don't need to do it every time
Storage storage = coordinator.getStorage();
if (storage != null && (_runCount % 4) == 0) {
if (storage != null) {
// The more files a torrent has, the more often we call the cleaner,
// to keep from running out of FDs
int files = storage.getFileCount();
int skip;
if (files == 1)
skip = 6;
else if (files <= 4)
skip = 4;
else if (files <= 20)
skip = 3;
else if (files <= 50)
skip = 2;
else
skip = 1;
if ((_runCount % skip) == 0)
storage.cleanRAFs();
}
// announce ourselves to local tracker (TrackerClient does this too)
if (dht != null && (_runCount % 16) == 0) {
dht.announce(coordinator.getInfoHash());
dht.announce(coordinator.getInfoHash(), coordinator.completed());
}
}
}

View File

@ -65,7 +65,7 @@ class PeerConnectionIn implements Runnable
try {
din.close();
} catch (IOException ioe) {
_log.warn("Error closing the stream from " + peer, ioe);
//_log.warn("Error closing the stream from " + peer, ioe);
}
}
}
@ -98,44 +98,48 @@ class PeerConnectionIn implements Runnable
}
byte b = din.readByte();
Message m = new Message();
m.type = b;
switch (b)
{
case 0:
case Message.CHOKE:
ps.chokeMessage(true);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received choke from " + peer);
break;
case 1:
case Message.UNCHOKE:
ps.chokeMessage(false);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received unchoke from " + peer);
break;
case 2:
case Message.INTERESTED:
ps.interestedMessage(true);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received interested from " + peer);
break;
case 3:
case Message.UNINTERESTED:
ps.interestedMessage(false);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received not interested from " + peer);
break;
case 4:
case Message.HAVE:
piece = din.readInt();
ps.haveMessage(piece);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received havePiece(" + piece + ") from " + peer);
break;
case 5:
case Message.BITFIELD:
byte[] bitmap = new byte[i-1];
din.readFully(bitmap);
ps.bitfieldMessage(bitmap);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received bitmap from " + peer + ": size=" + (i-1) /* + ": " + ps.bitfield */ );
break;
case 6:
case Message.REQUEST:
piece = din.readInt();
begin = din.readInt();
len = din.readInt();
@ -143,7 +147,8 @@ class PeerConnectionIn implements Runnable
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received request(" + piece + "," + begin + ") from " + peer);
break;
case 7:
case Message.PIECE:
piece = din.readInt();
begin = din.readInt();
len = i-9;
@ -165,7 +170,8 @@ class PeerConnectionIn implements Runnable
_log.debug("Received UNWANTED data(" + piece + "," + begin + ") from " + peer);
}
break;
case 8:
case Message.CANCEL:
piece = din.readInt();
begin = din.readInt();
len = din.readInt();
@ -173,13 +179,15 @@ class PeerConnectionIn implements Runnable
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received cancel(" + piece + "," + begin + ") from " + peer);
break;
case 9: // PORT message
case Message.PORT:
int port = din.readUnsignedShort();
ps.portMessage(port);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received port message from " + peer);
break;
case 20: // Extension message
case Message.EXTENSION:
int id = din.readUnsignedByte();
byte[] payload = new byte[i-2];
din.readFully(payload);
@ -187,6 +195,43 @@ class PeerConnectionIn implements Runnable
_log.debug("Received extension message from " + peer);
ps.extensionMessage(id, payload);
break;
// fast extensions below here
case Message.SUGGEST:
piece = din.readInt();
ps.suggestMessage(piece);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received suggest(" + piece + ") from " + peer);
break;
case Message.HAVE_ALL:
ps.haveMessage(true);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received have_all from " + peer);
break;
case Message.HAVE_NONE:
ps.haveMessage(false);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received have_none from " + peer);
break;
case Message.REJECT:
piece = din.readInt();
begin = din.readInt();
len = din.readInt();
ps.rejectMessage(piece, begin, len);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received reject(" + piece + ',' + begin + ',' + len + ") from " + peer);
break;
case Message.ALLOWED_FAST:
piece = din.readInt();
ps.allowedFastMessage(piece);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received allowed_fast(" + piece + ") from " + peer);
break;
default:
byte[] bs = new byte[i-1];
din.readFully(bs);

View File

@ -22,14 +22,15 @@ package org.klomp.snark;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicLong;
import net.i2p.I2PAppContext;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
//import net.i2p.util.SimpleScheduler;
//import net.i2p.util.SimpleTimer;
class PeerConnectionOut implements Runnable
@ -42,10 +43,10 @@ class PeerConnectionOut implements Runnable
private boolean quit;
// Contains Messages.
private final List<Message> sendQueue = new ArrayList();
private final BlockingQueue<Message> sendQueue = new LinkedBlockingQueue<Message>();
private static long __id = 0;
private long _id;
private static final AtomicLong __id = new AtomicLong();
private final long _id;
long lastSent;
@ -53,10 +54,9 @@ class PeerConnectionOut implements Runnable
{
this.peer = peer;
this.dout = dout;
_id = ++__id;
_id = __id.incrementAndGet();
lastSent = System.currentTimeMillis();
quit = false;
}
public void startup() {
@ -66,7 +66,7 @@ class PeerConnectionOut implements Runnable
/**
* Continuesly monitors for more outgoing messages that have to be send.
* Stops if quit is true of an IOException occurs.
* Stops if quit is true or an IOException occurs.
*/
public void run()
{
@ -116,15 +116,25 @@ class PeerConnectionOut implements Runnable
// And remove piece messages if we are choking.
// this should get fixed for starvation
Iterator it = sendQueue.iterator();
Iterator<Message> it = sendQueue.iterator();
while (m == null && it.hasNext())
{
Message nm = (Message)it.next();
Message nm = it.next();
if (nm.type == Message.PIECE)
{
if (state.choking) {
it.remove();
//SimpleTimer.getInstance().removeEvent(nm.expireEvent);
if (peer.supportsFast()) {
Message r = new Message();
r.type = Message.REJECT;
r.piece = nm.piece;
r.begin = nm.begin;
r.length = nm.length;
if (_log.shouldLog(Log.DEBUG))
_log.debug("Send " + peer + ": " + r);
r.sendMessage(dout);
}
}
nm = null;
}
@ -135,15 +145,15 @@ class PeerConnectionOut implements Runnable
nm = null;
}
if (m == null && nm != null)
if (nm != null)
{
m = nm;
//SimpleTimer.getInstance().removeEvent(nm.expireEvent);
it.remove();
}
}
if (m == null && !sendQueue.isEmpty()) {
m = sendQueue.remove(0);
if (m == null) {
m = sendQueue.poll();
//SimpleTimer.getInstance().removeEvent(m.expireEvent);
}
}
@ -160,6 +170,8 @@ class PeerConnectionOut implements Runnable
lastSent = System.currentTimeMillis();
// Remove all piece messages after sending a choke message.
// FiXME this causes REJECT messages to be sent before sending the CHOKE;
// BEP 6 recommends sending them after.
if (m.type == Message.CHOKE)
removeMessage(Message.PIECE);
@ -215,13 +227,13 @@ class PeerConnectionOut implements Runnable
thread.interrupt();
sendQueue.clear();
sendQueue.notify();
sendQueue.notifyAll();
}
if (dout != null) {
try {
dout.close();
} catch (IOException ioe) {
_log.warn("Error closing the stream to " + peer, ioe);
//_log.warn("Error closing the stream to " + peer, ioe);
}
}
}
@ -234,7 +246,7 @@ class PeerConnectionOut implements Runnable
{
synchronized(sendQueue)
{
sendQueue.add(m);
sendQueue.offer(m);
sendQueue.notifyAll();
}
}
@ -274,15 +286,26 @@ class PeerConnectionOut implements Runnable
boolean removed = false;
synchronized(sendQueue)
{
Iterator it = sendQueue.iterator();
Iterator<Message> it = sendQueue.iterator();
while (it.hasNext())
{
Message m = (Message)it.next();
if (m.type == type)
{
Message m = it.next();
if (m.type == type) {
it.remove();
removed = true;
}
if (type == Message.PIECE && peer.supportsFast()) {
Message r = new Message();
r.type = Message.REJECT;
r.piece = m.piece;
r.begin = m.begin;
r.length = m.length;
if (_log.shouldLog(Log.DEBUG))
_log.debug("Send " + peer + ": " + r);
try {
r.sendMessage(dout);
} catch (IOException ioe) {}
}
}
}
sendQueue.notifyAll();
}
@ -297,7 +320,7 @@ class PeerConnectionOut implements Runnable
synchronized(sendQueue)
{
if(sendQueue.isEmpty())
sendQueue.add(m);
sendQueue.offer(m);
sendQueue.notifyAll();
}
}
@ -350,23 +373,30 @@ class PeerConnectionOut implements Runnable
void sendBitfield(BitField bitfield)
{
Message m = new Message();
m.type = Message.BITFIELD;
m.data = bitfield.getFieldBytes();
m.off = 0;
m.len = m.data.length;
addMessage(m);
boolean fast = peer.supportsFast();
if (fast && bitfield.complete()) {
sendHaveAll();
} else if (fast && bitfield.count() <= 0) {
sendHaveNone();
} else {
Message m = new Message();
m.type = Message.BITFIELD;
m.data = bitfield.getFieldBytes();
m.off = 0;
m.len = m.data.length;
addMessage(m);
}
}
/** reransmit requests not received in 7m */
private static final int REQ_TIMEOUT = (2 * SEND_TIMEOUT) + (60 * 1000);
void retransmitRequests(List requests)
void retransmitRequests(List<Request> requests)
{
long now = System.currentTimeMillis();
Iterator it = requests.iterator();
Iterator<Request> it = requests.iterator();
while (it.hasNext())
{
Request req = (Request)it.next();
Request req = it.next();
if(now > req.sendTime + REQ_TIMEOUT) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Retransmit request " + req + " to peer " + peer);
@ -375,12 +405,12 @@ class PeerConnectionOut implements Runnable
}
}
void sendRequests(List requests)
void sendRequests(List<Request> requests)
{
Iterator it = requests.iterator();
Iterator<Request> it = requests.iterator();
while (it.hasNext())
{
Request req = (Request)it.next();
Request req = it.next();
sendRequest(req);
}
}
@ -391,10 +421,10 @@ class PeerConnectionOut implements Runnable
// (multiple choke/unchokes received cause duplicate requests in the queue)
synchronized(sendQueue)
{
Iterator it = sendQueue.iterator();
Iterator<Message> it = sendQueue.iterator();
while (it.hasNext())
{
Message m = (Message)it.next();
Message m = it.next();
if (m.type == Message.REQUEST && m.piece == req.getPiece() &&
m.begin == req.off && m.length == req.len)
{
@ -419,10 +449,10 @@ class PeerConnectionOut implements Runnable
int total = 0;
synchronized(sendQueue)
{
Iterator it = sendQueue.iterator();
Iterator<Message> it = sendQueue.iterator();
while (it.hasNext())
{
Message m = (Message)it.next();
Message m = it.next();
if (m.type == Message.PIECE)
total += m.length;
}
@ -480,7 +510,6 @@ class PeerConnectionOut implements Runnable
m.len = length;
// since we have the data already loaded, queue a timeout to remove it
// no longer prefetched
//SimpleScheduler.getInstance().addEvent(new RemoveTooSlow(m), SEND_TIMEOUT);
addMessage(m);
}
@ -489,10 +518,10 @@ class PeerConnectionOut implements Runnable
// See if it is still in our send queue
synchronized(sendQueue)
{
Iterator it = sendQueue.iterator();
Iterator<Message> it = sendQueue.iterator();
while (it.hasNext())
{
Message m = (Message)it.next();
Message m = it.next();
if (m.type == Message.REQUEST
&& m.piece == req.getPiece()
&& m.begin == req.off
@ -511,7 +540,8 @@ class PeerConnectionOut implements Runnable
}
/**
* Remove all Request messages from the queue
* Remove all Request messages from the queue.
* Does not send a cancel message.
* @since 0.8.2
*/
void cancelRequestMessages() {
@ -523,17 +553,20 @@ class PeerConnectionOut implements Runnable
}
}
// Called by the PeerState when the other side doesn't want this
// request to be handled anymore. Removes any pending Piece Message
// from out send queue.
/**
* Called by the PeerState when the other side doesn't want this
* request to be handled anymore. Removes any pending Piece Message
* from out send queue.
* Does not send a cancel message.
*/
void cancelRequest(int piece, int begin, int length)
{
synchronized (sendQueue)
{
Iterator it = sendQueue.iterator();
Iterator<Message> it = sendQueue.iterator();
while (it.hasNext())
{
Message m = (Message)it.next();
Message m = it.next();
if (m.type == Message.PIECE
&& m.piece == piece
&& m.begin == begin
@ -561,4 +594,50 @@ class PeerConnectionOut implements Runnable
m.piece = port;
addMessage(m);
}
/**
* Unused
* @since 0.9.21
*/
void sendSuggest(int piece) {
Message m = new Message();
m.type = Message.SUGGEST;
m.piece = piece;
addMessage(m);
}
/** @since 0.9.21 */
private void sendHaveAll() {
Message m = new Message();
m.type = Message.HAVE_ALL;
addMessage(m);
}
/** @since 0.9.21 */
private void sendHaveNone() {
Message m = new Message();
m.type = Message.HAVE_NONE;
addMessage(m);
}
/** @since 0.9.21 */
void sendReject(int piece, int begin, int length) {
Message m = new Message();
m.type = Message.REJECT;
m.piece = piece;
m.begin = begin;
m.length = length;
addMessage(m);
}
/**
* Unused
* @since 0.9.21
*/
void sendAllowedFast(int piece) {
Message m = new Message();
m.type = Message.ALLOWED_FAST;
m.piece = piece;
addMessage(m);
}
}

Some files were not shown because too many files have changed in this diff Show More