Compare commits

...

2207 Commits

Author SHA1 Message Date
zzz
20e152e79a 0.9.7 2013-07-15 14:15:43 +00:00
zzz
1cf9ae381d bump for review 2013-07-13 18:23:09 +00:00
4cb5a27a05 geoip update from 02-JUL-13 2013-07-11 21:52:00 +00:00
b0b0124138 Chinese, Russian, Spanish, and Turkish language updates from Transifex 2013-07-11 21:48:05 +00:00
9e12801503 susimail: Improvements to layout in mobile browsers 2013-07-11 00:19:31 +00:00
67859f67b0 Make activeResends field atomic 2013-07-09 13:55:09 +00:00
b486ae5c26 bump for moar testin' 2013-07-07 20:13:42 +00:00
aab4a3ab44 Change criteria for resending on NACK to match comment 2013-07-07 20:13:11 +00:00
e9e550fb55 cleanup, sync, more logging 2013-07-07 19:15:08 +00:00
f80ea386a0 Log errors to logger if available 2013-07-07 17:20:06 +00:00
7429762d2e bump i2prouter-script version 2013-07-06 23:30:25 +00:00
zzz
3af766bd6e * TunnelPool: Don't reuse peers for exploratory tunnels 2013-07-06 13:18:19 +00:00
614b8b4cdd Russian and Portuguese translation updates 2013-07-05 22:42:34 +00:00
bec62c1be7 Remove unused field
Use atomics to manage closed state and IOExceptions
2013-07-05 19:48:31 +00:00
7f8efca0ba minor cleanup, more to follow 2013-07-05 19:05:54 +00:00
76de4faf62 better sync 2013-07-05 18:29:00 +00:00
dfc4948a6f cleanup & sync 2013-07-05 18:21:42 +00:00
ba0e58e66a fix compilation 2013-07-05 12:53:13 +00:00
18531f0c09 Log close() loops 2013-07-05 12:43:58 +00:00
93df048bd6 Cleanups, make I2PSocket a Closeable 2013-07-05 11:54:18 +00:00
2927382a2b refresh patch 2013-07-04 17:01:42 +00:00
b4780d16eb updated en (before pushing to tx) & ru (pulled from tx) pofiles 2013-07-04 16:52:00 +00:00
zzz
6f5f4d179b * Streaming:
- Don't stop timers when session disconnects (tickets #644, #810)
   - Throw exception on attempt to use destroyed socket manager
   - Clear TCBShare cache when stopped
   - Javadocs
2013-07-04 14:54:46 +00:00
zzz
b9a5dd48f6 Console: Hide dead tunnel pools on /tunnels 2013-07-03 19:14:21 +00:00
zzz
0db7e2873c * Updater: Fix plugin update checker (ticket #897)
* Utils: Reduce logging in wrapper log when extracting zip files
2013-07-03 17:12:32 +00:00
zzz
b84bfd575f bump 2013-07-03 12:44:19 +00:00
70bb81bcc3 merge of '3dbb3a0ff30032f71e1ef6dd6d90f3b8117f3cd1'
and 'ccdac8f0911b798c42e9079d47e07c0e7c652815'
2013-07-02 20:08:28 +00:00
7ebb26b734 refresh patch
This change is required after de-parameterizing the i2prouter script.  I
hardcoded the file name because the $0 variable isn't expanded (because of
single quotes). When using double-quotes (and escaping with back-slashes), the
strings weren't translated. I've decided to de-parameterize until I figure out
what the problem is.
2013-07-02 18:38:35 +00:00
fb93609d8b merge of '7d480c0749394d3ee1b10c1f714a1be3091596f8'
and '9cb464ed9b358b1e9807792b37f703977d6f5f96'
2013-07-02 18:17:02 +00:00
eb051d64c7 disapproval of revision 'fd10b04ca3a6cf66e669bfad32d3011ed9f7e33c' 2013-07-02 18:08:52 +00:00
58bb94a960 French, German, Portuguese, Russian, and Turkish translation updates from transifex 2013-07-02 17:41:27 +00:00
98d932a0f5 build.xml: minor tweak for jenkins
Jenkins' cobertura plugin wasn't finding the streaming source. This change
should correct that.
2013-07-02 16:58:40 +00:00
zzz
de4b0198b7 javadoc fixes 2013-06-30 17:13:53 +00:00
zzz
570f8526b0 getSession() cannot be null 2013-06-30 17:00:14 +00:00
zzz
d173b79949 drop build request with bad flags 2013-06-30 16:58:57 +00:00
67f73d7198 wip 2013-06-29 21:22:28 +00:00
6e36d374ea wip 2013-06-29 21:12:11 +00:00
740b37b70c wait until client thread finishes before declaring victory 2013-06-29 21:03:19 +00:00
782e38bdcf add TODO, make server thread daemon 2013-06-29 21:02:30 +00:00
937404b39c test seems to be hopelessly out of date 2013-06-29 20:35:27 +00:00
a0bf223031 return the Thread object for join()-ing 2013-06-29 20:34:57 +00:00
zzz
6b15caab4b drop ancient ministreaming doc 2013-06-29 15:14:04 +00:00
1c68852f45 Finish rename 2013-06-28 22:32:05 +00:00
4f6065b4fa refactoring most tests
remove standalone test from junit wildcard
2013-06-28 22:27:31 +00:00
14944982fb Trying to fix the Jenkins build.. 2013-06-28 20:50:38 +00:00
10bf74e045 add streaming lib tests to the top-level ant targets 2013-06-28 18:48:39 +00:00
a9d9e6b572 work on test 2013-06-28 18:43:36 +00:00
bddfe3ed86 Convert most streaming tests to JUnit4 2013-06-28 16:00:47 +00:00
a308179d81 Fix and junit-ify tests 2013-06-28 15:21:02 +00:00
f8648ff4c4 Explicitly check the type of I2PSocketManager 2013-06-28 14:56:55 +00:00
zzz
552f91b6b8 dont start thread in constructor 2013-06-28 12:40:09 +00:00
zzz
726eb58724 * i2psnark:
- Show comment metadata on details page
   - Fix rar icon
   - Escape [] in URLs, chrome doesn't do it for us
   - Tweak column spacing
2013-06-28 12:19:56 +00:00
zzz
eb5a23fc5b finals, remove static log 2013-06-28 12:17:19 +00:00
zzz
d4c8e03f86 remove static log 2013-06-28 12:12:37 +00:00
zzz
46d13d2b08 divide by zero check 2013-06-28 12:10:34 +00:00
zzz
003dc37817 merge of 'bde6736c06f94ff24285aeff0a64ec7dc3a52a4b'
and 'f4b18bbf4329a48a182a57db594a58d4a32a9da7'
2013-06-28 12:06:22 +00:00
zzz
847a441d59 disapproval of revision '8611baad56e8e18941721b156256783ba996a3cd'
Revert 8611baad56e8e18941721b156256783ba996a3cd
Don't use intern() on externally-supplied strings
as it could be used to exhaust memory
2013-06-28 12:01:13 +00:00
a5f3220df0 merge of '6844f955ddd2febe54ce677ef19309712f55113c'
and '8611baad56e8e18941721b156256783ba996a3cd'
2013-06-27 19:23:54 +00:00
a5df6d419d use String.intern() instead of a homebrew equivalent 2013-06-27 19:04:28 +00:00
78a25f0b17 Updating certificate on 193.150.121.66. Will reload server to use
the new certificate on the next I2P release day.
2013-06-27 18:42:15 +00:00
dc7ea9c126 Removing the self-signed certificate. cowpuncher.drollette.com uses
a certificate signed by GlobalSign now.
2013-06-27 18:29:14 +00:00
70adc4df32 debug log the criteria for FF 2013-06-27 16:16:55 +00:00
c47f491e2f fail if cert expires within 60 days 2013-06-27 09:53:38 +00:00
1d9b89db23 volatiles, generics warning cleanup 2013-06-26 21:38:00 +00:00
ec70f2420c more volatiles 2013-06-26 21:03:18 +00:00
f525685765 volatiles, finals 2013-06-26 20:43:34 +00:00
zzz
4970fd22dc save a little space by avoiding BigInteger when possible 2013-06-23 17:52:36 +00:00
zzz
ac9392b9e6 * i2psnark: When receiving a metainfo via magnet and saving it to disk,
preserve all non-standard fields (such as those created by Robert) so the
   infohash doesn't change on restart, splitting the swarm.
   (http://zzz.i2p/topics/1327 thx 'backup')
2013-06-23 15:21:40 +00:00
zzz
5ba86ca254 * SSU:
- Pad all messages with random data instead of zeros
   - Implement non-mod-16 padding, disabled for now
2013-06-22 19:09:55 +00:00
zzz
87826daae9 mac static, final 2013-06-22 19:02:59 +00:00
7df52a155e Run the FloodfillMonitorJob more frequently 2013-06-22 17:17:17 +00:00
zzz
d2184f418f * NetDB: Increase upper limit on ffs again
* SSU: Pad session created message with random data instead of zeros
2013-06-22 13:51:50 +00:00
f91f81158f * Changing the default connect proxy after h2ik's AWOL. (Last seen 6th March 2013) 2013-06-22 12:05:34 +00:00
zzz
bb100de702 * SSU:
- Ignore padding beyond last multiple of 16 (prep for obfuscation)
  - Comment out xor with 0 (version)
  - Don't need to zero IV buf before overwriting
* AES:
  - Decrypt speedup by XOR in place
  - Log if decrypt not mod 16
2013-06-21 19:21:02 +00:00
zzz
322e76d2a9 speed up XORComparators 2013-06-21 15:13:37 +00:00
zzz
1444f1239f lookup stat tweak 2013-06-21 15:13:16 +00:00
zzz
5bd028bff5 i2psnark: Show start-all button even if tunnel is open,
if at least one torrent is stopped (ticket #808)
2013-06-20 21:21:07 +00:00
25feb745bc Volatil-ize some fields 2013-06-18 17:09:05 +00:00
zzz
7e0654ae0a * I2CP: Don't send SendMessageEndMessages from client to router if
in fast receive mode and the router doesn't require them.
2013-06-17 19:57:59 +00:00
zzz
00d1b7519f * Streaming: Flush debug pcap stream after closing connection 2013-06-17 19:54:22 +00:00
zzz
faadbf700d debug log tweak 2013-06-17 19:53:01 +00:00
zzz
180d42541a * NetDB:
- Don't instantiate unused success job for republish LS
   - Add debug setting to encrypt RI lookups
2013-06-17 19:47:04 +00:00
zzz
bdc4eff1c4 * NTCP: Extend interval for sending time sync messages,
might help expire idle conns
2013-06-17 19:45:46 +00:00
zzz
fa0b52fc3a * Console: Don't display 'unsupported' message on some config pages when restart/shutdown buttons clicked 2013-06-17 19:43:32 +00:00
zzz
f9f1391057 * SusiMail: Fix classpath problem when started manually (ticket #957)
- Remove a couple of dependencies
   - Add jetty-util.jar to console classpath just in case
2013-06-17 19:39:21 +00:00
zzz
36e898d668 * I2CP: Fix deserialization of new RVLSM; enable by default 2013-06-14 13:34:36 +00:00
zzz
a90827c9b2 * i2psnark: Fix bug creating torrent with a single file in a directory
(thx oskar/Nightweb)
2013-06-14 13:33:49 +00:00
dd451d3ccd po file fix / add i2prouter script's po files to checkpo.sh 2013-06-14 01:27:58 +00:00
937f4f2f40 parameterize & refresh patch 2013-06-13 18:48:58 +00:00
dev
e7718b1fba Threaded the calling of runRouter() to improve startup times. 2013-06-13 17:02:53 +00:00
dev
29b599bc8d merge of '80aa8cd653ef7ee96cd6603b9646c53b2ff84760'
and 'da25b770e65a36f3056b905cc6b96be431076a6b'
2013-06-13 15:05:54 +00:00
dev
6bbd34eed9 Fixed MultiRouter. Removed MultiRouterBuilder as it no longer serves any purpose. Added the router.rejectStartupTime property to allow for quicker testing with MultiRouter. 2013-06-13 14:38:13 +00:00
f939f689fc fix flag alignment 2013-06-13 01:01:08 +00:00
zzz
a48fba0102 * I2PTunnel: Add advanced quantity options 2013-06-12 15:07:39 +00:00
zzz
02923138d0 boom bye bye bad bwoy 2013-06-12 13:45:27 +00:00
zzz
87d142bace comment out main 2013-06-12 13:44:54 +00:00
zzz
933ad52398 * Console: Add missing jetty jars to classpath (ticket #952)
(tested with classpath from 0.7.4 wrapper.config)
 * JettyStart: ditto
 * Remove references to now-unused jars in build.xml files
2013-06-12 13:42:38 +00:00
9d52ef5fbe Explicit check for empty values 2013-06-11 13:21:49 +00:00
34748d23be Make TUnnelCreatorConfig._expiration volatile 2013-06-11 12:25:00 +00:00
15dae0fd92 *REALLY* add the Turkish language 2013-06-10 22:46:56 +00:00
ccf6cf5e20 TR & FR translation updates from Transifex 2013-06-10 22:22:24 +00:00
zzz
36d4b20bdc * NetDB:
- Let class N routers become floodfill
   - Scale max connections for non-O floodfills
2013-06-10 14:45:45 +00:00
zzz
a70810ffae log tweak 2013-06-10 14:20:33 +00:00
zzz
526df43233 * Transports: Reduce idle timeouts to mitigate conn limit issues 2013-06-10 14:06:43 +00:00
zzz
660be7d579 Installer: Don't install Windows service by default
Causes confusion and multiple instances when users start their own copy too.
2013-06-10 14:04:58 +00:00
zzz
876109d3a5 Fix bug in unused off/len version of siphash 2013-06-10 14:02:39 +00:00
zzz
39493e0f24 final and null check 2013-06-10 14:01:52 +00:00
zzz
62413331da Fix bug in last checkin in unused code
(thx zab)
2013-06-10 14:01:06 +00:00
zzz
68d25afcba * NetDB: Prep for leasesets with different expire times
- Add new I2CP RequestVariableLeaseSetMessage
   - Send RVLSM if client supports it; handle on client side;
     disabled by default for the moment.
   - Add LeaseSet.getLatestLeaseDate()
   - Check latest, not earliest, date too far in future in KNDF.validate()
   - Check latest date too far in past in KNDF.validate()
   - Only check gateway and tunnel ID for equality in OCMOSJ lease caching to reduce churn
   - Split up KNDF.validate(RI) for efficiency, don't need to check
     signature, netid, etc. before lookups, only on store
   - Remove enforeNetID config
   - Fix major bug causing newer leasesets to be treated as older, and not stored or published
   - Increase max adjustment time of earliest lease
   - TransientDataStore cleanups
   - RouterInfo and LeaseSet equals() speedups
2013-06-09 14:42:51 +00:00
zzz
182fe900b8 * BlockfileNamingService:
- Fix bug that kept reverse index from being updated
   - Bump DB version to 3 to trigger repopulation of the reverse index
   - Make metaindex final
   - Add freelist check to the main() test
2013-06-07 17:26:20 +00:00
zzz
0fb4f6ab6a javadocs 2013-06-07 02:03:36 +00:00
zzz
ebc5e72908 remove commented out setter not supported in jetty 7 2013-06-07 02:00:17 +00:00
081b692736 debian: refresh patch 2013-06-06 17:14:44 +00:00
zzz
e1c68d22a3 - Correct errors in the specification of the BuildResponseRecord.
The first 32 bytes are not random; they are the hash of the following 496 bytes.
- Don't waste entropy on bytes we are going to overwrite in the BRR
2013-06-06 15:24:01 +00:00
zzz
b7dc8f425e * DatabaseLookupMessage: Change format for encrypted reply request
to allow multiple bundled reply tags
2013-06-05 16:44:59 +00:00
zzz
4a65676738 throw ISE if LS changed after being signed 2013-06-05 16:39:50 +00:00
zzz
000ca7c7b7 finals, javadoc fixes 2013-06-05 16:36:23 +00:00
zzz
9386270b57 Save I2CP client version for future reference 2013-06-05 16:33:38 +00:00
zzz
f0886c5f6e drop unused netdb classes 2013-06-05 16:29:49 +00:00
zzz
239cd2b744 debug setting 2013-06-05 16:28:54 +00:00
zzz
db9827779e minor improvement 2013-06-05 16:28:10 +00:00
zzz
905eed6643 cleanups 2013-06-05 16:27:29 +00:00
5711d96744 propagate from branch 'i2p.i2p' (head a89e68077114f79902a76649affe78e8ab709787)
to branch 'i2p.i2p.729' (head 11fde36281469d5ac8757bca1d7f93f679e0cb74)
2013-06-02 12:41:02 +00:00
zzz
fc2734c484 compile fix 2013-06-01 17:10:32 +00:00
zzz
75261a0ce4 * EepGet: Used cached byte array in uncompressor 2013-06-01 17:00:33 +00:00
zzz
7fc2cd9cde javadoc 2013-06-01 16:59:06 +00:00
zzz
e72a763019 volatile 2013-06-01 16:58:21 +00:00
zzz
ff20174572 * i2psnark:
- Add idle detector, reduce tunnel count when idle (prep for torrent updates)
   - Cancel CoordinatorAcceptor cleaner when halted
   - Make PeerCoordinatorSet an Iterable
   - Reduce max protocol errors to 1
   - Disable unused PeerMonitorTask
2013-06-01 16:57:50 +00:00
zzz
7d08183334 doc fixes 2013-05-31 23:30:12 +00:00
zzz
66f7505baa * configclients.jsp: Allow more hops and tunnels when routerconsole.advanced=true 2013-05-31 23:28:41 +00:00
zzz
e54465b226 * i2psnark: Fix details page on Windows 2013-05-31 23:19:43 +00:00
zzz
78c17ba353 propagate from branch 'i2p.i2p.zzz.test2' (head 4af6fe141f9ba20b1b13fc5f3417146bc96aa035)
to branch 'i2p.i2p' (head 6edfb2af359351aeb5cf198b9ec4524b2b4a45e6)
2013-05-31 22:18:00 +00:00
zzz
bfac9e398d default the wizard to 3 hops also 2013-05-31 22:16:15 +00:00
zzz
eef5661008 * NetDB:
- Fix debug netDb.alwaysQuery setting so it works again, and always
    sends to that router first (move from FNDF to IterativeSearchJob)
  - Don't reuse DLM reply key/tag
  - FloodfillPeerSelector: Note unused kbucket param in javadocs
  - Debug logging for encrypted DSRM/DSM
2013-05-31 16:51:58 +00:00
zzz
4b9a7323ad propagate from branch 'i2p.i2p' (head 04337e47a38298a4035f48b830f6a2532767bd50)
to branch 'i2p.i2p.zzz.test2' (head 052c3194bd75846075a6b64a1f96cdca6eae33b4)
2013-05-30 19:11:02 +00:00
429ccf21b6 merge of '11286a0edca5afcb38a106793f52422247ae66aa'
and 'ac917c8e012d4f9917afce11433faaf1e6f12c10'
2013-05-30 12:15:47 +00:00
4805a77d40 -2 2013-05-30 12:06:31 +00:00
3a707a143d update wrapper to 3.5.19
- 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-05-30 12:04:42 +00:00
b4264063f4 merge of '57c27fdf450960a6379681666a721f09aadcfbf8'
and 'f99ead1ae78724f35d845623468e9b561d36bf3b'
2013-05-30 05:07:26 +00:00
535c782b7c Allow normal themes to be used with IE >= 10 2013-05-30 01:39:07 +00:00
zzz
3833ad534f restore exotrack 2013-05-29 19:48:45 +00:00
zzz
3d42946ff5 * Console: Remove I2PDigestAuthenticator workaround, as Jetty 7.6.11 has the fix
* Jetty 7.6.11
 * Tomcat 6.0.37
2013-05-29 16:30:00 +00:00
zzz
a1afa1c1b0 * i2ptunnel: Default to 3 hops (ticket #936) 2013-05-29 16:28:28 +00:00
8fb65292cf merge of '3adba0cec6f0291ae90747ab22535290e64e6606'
and 'fd10b04ca3a6cf66e669bfad32d3011ed9f7e33c'
2013-05-29 12:49:29 +00:00
29ce84ff33 disapproval of revision '2fccba5dbe1b538679f15727fd95295842ed8839' 2013-05-29 12:48:11 +00:00
ca569038e8 parameterize 2013-05-28 10:50:51 +00:00
4092eba606 checkcerts: look for both *.cert and *.crt 2013-05-28 10:46:41 +00:00
63e71d8a3d nbi: Add override for x86 Solaris
The jbigi binaries for Pentium II and Pentium III are identical on x86 Solaris.
2013-05-28 10:46:04 +00:00
278caf72e0 propagate from branch 'i2p.i2p' (head 138d50ea0e969564bef41201439c6a99e2a45fbb)
to branch 'i2p.i2p.729' (head 74c7169e5d428b5aeaf33a401b27c33d3d37907e)
2013-05-28 08:24:22 +00:00
zzz
ff5abfb4b7 0.9.6 2013-05-27 18:17:53 +00:00
4d6b7556c3 propagate from branch 'i2p.i2p' (head dddff6de3cdc4595886d57b5eceb63747b68c7d7)
to branch 'i2p.i2p.729' (head b0eb76504d798a791853a6d269795018c853eff9)
2013-05-27 10:34:53 +00:00
zzz
e5e7dbbb58 * TunnelPeerSelector: Cleanups 2013-05-26 20:38:31 +00:00
zzz
e394d3d4c5 * DatabaseLookupmessage:
- Add support for requesting an encrypted reply
* NetDB:
  - Add support for encrypted DatabaseSearchReplyMessage and DatabaseStoreMessage
    in response to a DatabaseLookupMessage
* PRNG: Cleanups using Collections.singletonMap()
* Router utils: New RemovableSingletonSet
* TransientSessionKeyManager:
  - Support variable expiration for inbound tag sets
  - Several efficiency improvements
* VersionComparator: Add static method, use most places
2013-05-26 17:25:02 +00:00
zzz
370d9dfea1 -24 2013-05-25 12:12:46 +00:00
2a00272efe debian: read /etc/default/i2p in /usr/bin/i2prouter
This will allow overrides to be set without editing /usr/bin/i2prouter.

i2prouter may be replaced during upgrades. /etc/default/i2p will only be
changed by debconf (e.g. "dpkg-reconfigure i2p").
2013-05-24 21:30:46 +00:00
5c4c02161c propagate from branch 'i2p.i2p' (head fd0e22a44acf6b018c394cdd42d75e2d1bdb4986)
to branch 'i2p.i2p.729' (head b5c7b5601c0b0e810ca6d93c1d249fe4e330a352)
2013-05-24 12:20:50 +00:00
1bd4937a4b geoip.txt update
Based on Maxmind GeoLite Country database from 2013-05-08
2013-05-24 09:13:46 +00:00
0ac2abd5eb debian: bump changelog version to 0.9.6 2013-05-24 09:10:00 +00:00
efe5098f24 Disabling HH's server for this version because it's down and I haven't got in contact with him. 2013-05-23 20:03:09 +00:00
ba859fc9ad propagate from branch 'i2p.i2p' (head e91e8d2eb4c76d5be04e48de9b678cb39b3d0694)
to branch 'i2p.i2p.729' (head c1bf6bf9381192395513aca841d6db507384a9a8)
2013-05-23 09:14:48 +00:00
c73163f525 merge of '56506455244b72ac03b5a5cb832496e367f454b2'
and '6aeeb6555b2fb4e69f167487ca20b143939c809c'
2013-05-22 19:51:04 +00:00
bf317f61c5 Updating the certificate for reseed.info 2013-05-22 19:50:02 +00:00
b1b13c41f0 merge of '9f901bf6cca59e5a24595ef80a2fbb586e259281'
and 'e31714127884dc817acde4cf97cb9c7d8cebc92b'
2013-05-21 19:04:55 +00:00
47c3a56aca Ticket 928 - prevent a CKE during write 2013-05-21 19:03:58 +00:00
8acf5f3079 propagate from branch 'i2p.i2p' (head 879c55c825160c979491a99169a173145cf1d7ad)
to branch 'i2p.i2p.729' (head a0ba4c4c989ba71043b9671a56891688be41b50d)
2013-05-21 13:45:26 +00:00
zzz
2f39574123 log tweaks 2013-05-21 13:39:43 +00:00
8b1ab4b8d2 create ./build when "ant jbigi" is run by itself 2013-05-20 20:31:18 +00:00
addffcffcb propagate from branch 'i2p.i2p' (head 27ab673e76ed77c38d22c06c807695f792473fb0)
to branch 'i2p.i2p.729' (head d03f39c7afc2214ef8c2f81486d4abc64049e825)
2013-05-17 16:10:34 +00:00
2e0a1b9a0e German translation updates from tx, updated en po files for pushing to tx 2013-05-15 22:04:43 +00:00
zzz
4fae18a719 * UPnP: Detect devices without port forwarding capability (ticket #930) 2013-05-15 14:21:15 +00:00
zzz
d9beaa7591 * NetDB: Increase floodfill count for good 2013-05-15 14:19:01 +00:00
zzz
2ba5ad558b * i2psnark:
- Adjust target piece size calculation
   - Tweak to make it easier for new peers to connect
2013-05-15 14:18:24 +00:00
de6bb12b95 debian: refresh patches 2013-05-15 13:39:24 +00:00
aa2715cced i2prouter: abort immediately if I2P_CONFIG_DIR cannot be created 2013-05-15 13:38:34 +00:00
b096834a54 installer/resources/i2prouter: various bugfixes
- Explicitly specify shell when RUN_AS_USER is set. This allows I2P to start
  under limited accounts that do not have a defined shell.
- When installing as a service, point out that I2P_CONFIG_DIR may need to be
  set. I2P_CONFIG_DIR defaults to $HOME/.i2p for the user that installed I2P
  and when running as a service this may not be desired.
  (e.g., RUN_AS_USER=i2p & I2P_CONFIG_DIR=/root/.i2p)

(The RUN_AS_USER shell problem was spotted at https://github.com/mattias-ohlsson/i2p/blob/master/i2p.spec)
2013-05-15 13:04:46 +00:00
c1da7f778b improvements to jbigi scripts
support for Solaris (tested with Solaris 11 x86)

mbuild-all.sh:
- output correctly formatted file names (tested in Solaris x86, FreeBSD (x86 and x64) and Linux (x86 & x64))
- switch from echo -e to the more portable printf
- more error checking, comments

debian/patches: refreshed based on changes to core/c/*
libjcpuid-x86_64-solaris.so: built in solaris 11 x86 with
                             java 1.7.0_07 and gcc 4.5.2, stripped
2013-05-12 00:08:52 +00:00
3210dd8d3e propagate from branch 'i2p.i2p' (head ea73fc80c4f4d89238aaa52a9189378e40db0b32)
to branch 'i2p.i2p.729' (head 148b359103beb356be4dd6833d4e6325703917d3)
2013-05-11 20:54:22 +00:00
zzz
dca5e9889a finals 2013-05-07 13:49:31 +00:00
zzz
67beebf859 * HandleDatabaseLookupMessageJob: Improve efficiency by only looking up
Hash in the netDb once, then casting to correct type.
   Log cleanups.
2013-05-07 13:37:18 +00:00
zzz
16c8a19be8 * Streaming: Throw chained IOE from streams to get correct location 2013-05-07 13:09:03 +00:00
zzz
0c03b6ba82 i2psnark: More details page fixups;
List directories first
2013-05-06 15:11:02 +00:00
zzz
cd6376e368 remove DOS line endings in jsps 2013-05-06 13:14:44 +00:00
zzz
c26eba9693 * Console: Fix Jetty thread pool policy and thread name 2013-05-06 12:29:18 +00:00
zzz
b7fca3af42 * Transports: Clean up internal/external port confusion (ticket #873)
- Bind SSU to configured internal, not external, port at startup
   - Use only internal ports for UPnP (getRequestedPort() fixups)
   - Don't have NTCP follow frequent SSU port changes
   - Don't use external SSU port for internal NTCP port
   - Display internal SSU port on /confignet
2013-05-06 11:24:02 +00:00
7527a02c60 build.xml: refactor "noExe check" to remove duplication 2013-05-04 19:00:39 +00:00
5e734088e3 reduce severity of CancelledKeyExceptions
trac ticket 928
2013-05-03 13:47:10 +00:00
6265bdf026 merge of '00acf6715c7e3d5519672b335bb833f2f88f5ca1'
and '4790dff566ce61cb8a5bfefa0c423df44a784fa5'
2013-05-02 10:19:17 +00:00
0d78ddf872 HTML fixes in readme_ar.html 2013-05-01 22:23:42 +00:00
zzz
10efecaa9c * IRC Server tunnel: Reject bad protocols immediately 2013-05-01 20:52:50 +00:00
689b045a9b html validation fixes
xmllint didn't find these problems (but tidy did).
2013-05-01 19:52:21 +00:00
7692905ba5 fix viewmtn url
(*sigh*)
2013-05-01 18:07:20 +00:00
0ef3bb1deb debian: s/UNRELEASED/unstable/ due to updated packages being built 2013-05-01 17:51:17 +00:00
4c279a192a Switch viewmtn links from zzz's to mine 2013-05-01 17:48:14 +00:00
zzz
af7eaf1f05 * BuildRequestor: Slow down build loop if we have no exploratory tunnels
(ticket #926)
2013-05-01 17:26:07 +00:00
zzz
c198e216fd susidns css tweak 2013-05-01 17:24:09 +00:00
zzz
2325bffbcb enhance main() for debugging 2013-05-01 17:23:50 +00:00
3d3e05d43d debian: don't ship jasper-compiler.jar anymore
I didn't realize that non-existent jars specified in a classpath is not an
error.
2013-05-01 13:37:15 +00:00
c62ae69fe5 debian: bump standards version, don't package 'dummy jars'
note: jasper-compiler is kept due to it being referenced at http://www.i2p2.i2p/plugin_spec
2013-04-30 23:26:42 +00:00
686aa870ea Updates to readme_ar and a CSS tweak from hamada (ticket #489) 2013-04-30 12:35:45 +00:00
zzz
ecac69134d param fix 2013-04-30 01:21:23 +00:00
zzz
8a99be1db3 move page nav 2013-04-29 22:40:49 +00:00
zzz
26f0c98ef8 * Transports:
- Initial prep for multiple addresses per style
   - Simplify NTCP send pool
2013-04-29 18:09:21 +00:00
5375e425ac minor cleanup 2013-04-29 17:55:27 +00:00
650b920e11 I2PTunnel: break out of frame when using the "test server bypassing i2p" link 2013-04-29 17:09:25 +00:00
7a43bd87c2 remove unused param (javadoc fix) 2013-04-29 17:07:08 +00:00
ebb2f1396b Meeh's patch for trac ticket 729 2013-04-29 16:54:36 +00:00
zzz
3a4ac1fc4e one more param fix; javadoc fix 2013-04-29 11:50:23 +00:00
zzz
188ff3392d * i2psnark: Support HTTP request ranges so in-browser and other http-aware media players work better.
Single range only; no multipart
2013-04-28 16:46:52 +00:00
zzz
0cf7e91475 baseline class from Jetty 7.6.10 2013-04-28 16:44:30 +00:00
zzz
609bbac8d5 * i2psnark:
- Only show lower section on first page
   - Hide peer count if not connected
   - Dir page CSS tweaks
2013-04-28 16:43:40 +00:00
zzz
f4431b8d1e more parameter fixes 2013-04-27 22:34:59 +00:00
zzz
45bf2e0715 more classes pkg private 2013-04-27 22:34:39 +00:00
zzz
d7040a23e4 page count fix and cleanups 2013-04-27 16:08:35 +00:00
zzz
6f8fe0ecac add epub mime type 2013-04-27 14:51:07 +00:00
zzz
7181e3eb87 * i2psnark: Ensure current stats and correct event delivered in announce 2013-04-27 14:34:00 +00:00
zzz
011e91140c * i2psnark: Improve page nav 2013-04-27 13:14:43 +00:00
zzz
0f1224de98 * installer: Fix DOS line endings on misc. files (ticket #872)
* SusiDNS:
   - Trim and sort config form data
   - Fix DOS line endings on config files in Linux (ticket #872)
2013-04-26 20:32:58 +00:00
zzz
2e356172d4 document ignored RouterAddress expiration (ticket #832) 2013-04-26 17:12:37 +00:00
zzz
c6bf9a7cf6 deprecate isJobActive() ticket 670 2013-04-26 16:45:52 +00:00
zzz
0816cfe273 * Plugins: Track pending plugin clients better, don't hold references,
start delayed clients from SimpleTimer2 instead of Job queue (ticket #670)
2013-04-26 16:41:09 +00:00
zzz
1cea18346b * Console: Show log location on /logs even if not opened yet (ticket #905) 2013-04-26 13:36:38 +00:00
zzz
0d4bc500ee * HTTP proxy: Verify nonce count in digest auth 2013-04-26 13:02:56 +00:00
zzz
ff313e0301 * i2psnark: Use smaller piece size for small torrents 2013-04-26 13:01:16 +00:00
85001d2622 process debian/po/es.po with update-po 2013-04-25 15:10:40 +00:00
654b240e9d translation updates
* Portuguese, Russian, Spanish, and Swedish translation updates from Transifex
* ant poupdate run for EN for submission to tx
2013-04-25 15:06:27 +00:00
85f3f5615f Allow the "AUTHENTICATE" command in IRC tunnels (ticket #904) 2013-04-25 05:27:55 +00:00
zzz
813a1981d9 * Console, TunnelControllerGroup: Don't register shutdown hook if ClientAppManager is present
* JettyStart: Fixes for use by plugins
 * RouterAppManager: Add shutdown hook
2013-04-24 15:45:15 +00:00
57fd46d3a1 Updated i2p.c default classpath with new Jetty jars, fixed separator 2013-04-24 03:53:12 +00:00
ffbbfdfc0d merge of 'a58d3f77fd66a83579a9978f954077bc0cd3dfed'
and 'c61f304e5ee2d59c51c4e700ab47e61d479257d2'
2013-04-24 03:48:35 +00:00
31bc67a1cd Added launch.properties for i2pExe based on i2pstandalone.xml and doBuildEXE target 2013-04-24 00:30:39 +00:00
ec4f2d2100 merge of '3cff53ae6e9e995199ab4c7c4ce5fa78ec417768'
and 'e824a448e5e49d646a33e7be13f648f66b1b6a47'
2013-04-24 00:01:01 +00:00
5b40914552 Removed some unnecessary code from i2pExe 2013-04-23 21:19:28 +00:00
e8025f09bd merge of '3c164e606c1ed364a6caf2b5b77abbdf819a2bc7'
and 'ebe0842bec96b1e0ed3b8e0c18d4ea05ba7cb981'
2013-04-23 19:27:52 +00:00
zzz
aa547a1610 * i2ptunnel: Block b32.i2p supercookies 2013-04-23 18:23:38 +00:00
zzz
22025b0c3a * Console: Fix Jetty digest auth bug causing repeated password requests
I2P fixes for out-of-order nonce counts.
   Based on DigestAuthenticator in Jetty 7.6.10.
   Includes the nonce count verification code from Tomcat 7.0.35.
   ref: http://jira.codehaus.org/browse/JETTY-1468 which was closed not-a-bug.
   ref: https://bugs.eclipse.org/bugs/show_bug.cgi?id=336443 in which the
   Jetty implementation was introduced.
2013-04-23 18:22:48 +00:00
zzz
4358d11191 Baseline checkin of DigestAuthenticator from Jetty 7.6.10 before mods 2013-04-23 18:19:49 +00:00
5fd63c12a8 remove an ifdef that is not relevant to I2P 2013-04-23 18:05:43 +00:00
37ff4090b4 merge of '97f6b32a68c76e9cbe8832d250144facb6aa729e'
and 'd9b5e2fc62256d9dc0d320fe593d56f0252b7f48'
2013-04-22 20:38:52 +00:00
9550de6760 disapproval of revision '4747eea80e136e04c9a239f0b6ecd9ef134c4d5a' 2013-04-22 20:37:42 +00:00
f5838ffefb add new jetty7 jars to the i2p.exe classpath 2013-04-21 20:26:41 +00:00
zzz
2a374c9b22 bump to -12 after prop 2013-04-21 16:07:08 +00:00
zzz
59ba47eca5 propagate from branch 'i2p.i2p.zzz.winfix095' (head 7d31b90b87adb2c0cfb837e5b66cc4c223766331)
to branch 'i2p.i2p' (head b004014ccfbca6241a090d5b47f1228702f4dfcc)
2013-04-21 15:57:22 +00:00
zzz
60d0b2976b * AppManager:Add HTML debug output 2013-04-21 15:41:34 +00:00
zzz
a44e75201f * Streaming: Pcap window size fixes 2013-04-21 15:40:08 +00:00
zzz
eb3de929bf Pluck of 48ac112fe938c8e960413ad60f64d313a1e5c9ac and e415e24aca895c5a1f88380b1a3946e3b49749a9
* Add new *.i2p2.de certificate
* Added backup's ressed server. (Thanks backup!)
* Temporary removing h2ik's server since he's been AWOL since 06-03-2013 and he's reseed server is down.


applied changes from 185bc62d33224812060d2f68266a029935fb710d
             through 48ac112fe938c8e960413ad60f64d313a1e5c9ac

applied changes from 1194eb12084302380b4315b20e5ae0c574ce1be3
             through e415e24aca895c5a1f88380b1a3946e3b49749a9
2013-04-21 13:47:16 +00:00
d0fa9f8f1e And back to HTTP 403 for Bad URI (we are refusing to fulfill the request) 2013-04-21 13:36:59 +00:00
a3886b0080 Use HTTP 404 for Bad URI (c/f jetty, lighttpd) 2013-04-21 13:30:22 +00:00
b872764624 Use HTTP 400 for Bad URI 2013-04-21 13:27:28 +00:00
075b1fd6f6 Ticket #891 - return "Invalid Request URI" for URIs with illegal characters 2013-04-21 03:20:43 +00:00
zzz
2430e180f3 Add EXTRA version "win1" in prep for Windows-only point release.
We don't want to bump BUILD as it could cause confusion,
and would cause all installs to attempt update via torrent.
2013-04-20 19:07:11 +00:00
zzz
0c22af9578 Convert install.xml to use new utility.jar Main.main()
(ticket #912)
2013-04-20 19:03:38 +00:00
zzz
4976e52389 Pluck of 40d650b134e48bdb0bb636227381c22217365c47
* WorkingDir: Correctly strip DOS line endings while migrating,
              to fix eepsite location on 0.9.5 Windows installs (ticket #919)

applied changes from cc74155815c98674b74cd7d9abb59704005d6b85
             through 40d650b134e48bdb0bb636227381c22217365c47
2013-04-20 18:53:01 +00:00
zzz
88afb23a8c Backport of b6b65cd637f41758bfd38692772ffade3c8cbbbc
Installer: run fixperms.bat all Windows versions except XP/2003.
Wasn't being run on Windows 8.
2013-04-20 18:46:27 +00:00
zzz
a7a0ca87c9 Branch from 0.9.5 release.
Implement new Main wrapper class for utility.jar, to
work around izpack ticket #162 http://jira.codehaus.org/browse/IZPACK-162
which prevents us from specifying a main class as it fails on
Windows installations when a full path including a drive letter is specified
(ticket #912)
2013-04-20 18:42:55 +00:00
7371718afc Installer: run fixperms.bat all Windows versions except XP/2003. 2013-04-19 13:41:56 +00:00
zzz
1e5ffe636f * Updates:
- Notify manager about all available update methods at once, so the priority
     system works and it doesn't only update via HTTP
   - Start router update download at startup if available
   - Only check plugins when core version increases, not decreases, so we
     don't update plugins when downgrading
   - Limit length of URL shown on summary bar
2013-04-19 11:49:22 +00:00
zzz
ca1e8d09cc debug log 2013-04-19 11:47:05 +00:00
zzz
ddc5e2c23f * WorkingDir: Correctly strip DOS line endings while migrating,
to fix eepsite location on 0.9.5 Windows installs (ticket #919)
2013-04-19 11:44:57 +00:00
zzz
3086fd3ce0 * LogManager: Add support for saving properties added in recent releases 2013-04-19 11:42:32 +00:00
zzz
5ea2832ae0 * AppManager: Register jetty, console, and SAM with manager 2013-04-19 11:41:35 +00:00
zzz
5cb449efed * i2psnark: Disable spellcheck in more form fields 2013-04-19 11:40:36 +00:00
46f8344d30 Add new *.i2p2.de certificate 2013-04-18 15:51:17 +00:00
zzz
b370fe6838 * SusiMail: Fix loading of Jetty classes 2013-04-18 15:25:33 +00:00
zzz
d6b28a4eb1 * i2ptunnel: Set target=_top in all external links to break out of console iframe 2013-04-18 15:24:46 +00:00
zzz
72ead2bbcc * i2psnark: Fix params after P-R-G 2013-04-18 15:24:01 +00:00
zzz
648701afdd * Eepsite: Fix jetty.xml configuration of ThreadPool 2013-04-17 21:06:52 +00:00
zzz
389f540f44 less dots 2013-04-17 21:04:21 +00:00
ceda25fb36 added browser http proxy setup to initial news 2013-04-17 18:21:55 +00:00
zzz
c4e2019657 * SusiDNS: Set target=_top in all external links to break out of console iframe 2013-04-17 17:06:34 +00:00
zzz
b64b2629b9 * i2ptunnel: Fix default form action (ticket #882) 2013-04-17 17:04:34 +00:00
zzz
9443a96f0c * Systray: Better detection of 64-bit Windows (tickets #756, #912)
- Don't even instantiate systray unless on 32-bit Windows
2013-04-17 14:49:25 +00:00
zzz
6af73d087b * Console: Better handling of missing font for graphing (ticket #915)
- Remove unused imports
2013-04-17 14:45:24 +00:00
zzz
c61f2af8b3 * SAM: Implement ClientApp interface (ticket #347) 2013-04-16 21:07:00 +00:00
zzz
a3aee79e9c * ClientAppManager: Add method to look up clients by class and args
* Console: Implement stopping of clients using the ClientApp interface
            (ticket #347)
2013-04-16 14:59:18 +00:00
7d0f626fd5 remove mime types already set by jetty 2013-04-15 21:41:53 +00:00
zzz
e34a98620c merge of '186e5e48c613c85b8e11c61ec920a40837bfae8e'
and '3449c389b42e40b9c9a07848a868bb745c5c4540'
2013-04-15 20:59:28 +00:00
zzz
6c32a05378 2nd instance bootstraps DHT from 1st instance 2013-04-15 20:56:10 +00:00
ec4c830c09 i2psnark: update mime types 2013-04-15 20:28:22 +00:00
zzz
9e5d809650 trim form values 2013-04-15 20:23:39 +00:00
zzz
1746a81234 update servlet base after changing dir 2013-04-15 18:54:47 +00:00
zzz
efe7a7536d * i2psnark:
- Add data directory configuration to GUI (ticket #768)
   - Add page size configuration to GUI
2013-04-15 18:39:59 +00:00
zzz
11dd7f6b8c * Console: Move from deprecated Jetty SSL methods to SslContextFactory 2013-04-15 15:53:29 +00:00
zzz
e29bb5b88b * i2psnark:
- Mime type fixes
   - Remove web classes from jar
2013-04-15 12:12:35 +00:00
zzz
57b794f72a * Jetty logging: Fix logging using I2PLogger class;
log ignored messages at debug level
2013-04-14 14:02:43 +00:00
zzz
8bfe3f632e * i2psnark:
- Set unique tunnel nickname for additional instances
   - Increase page size to 50
   - Restore 1-arg SnarkManager constructor for compatibility
   - Add note about DHT file w/ multiple instances, to be fixed
   - Log tweak
2013-04-14 14:00:47 +00:00
zzz
21e47e61f0 * Console: Add /graph support for bw.combined, consolidate
rendering code (ticket #890)
2013-04-13 12:13:55 +00:00
zzz
49cc6b5100 * i2psnark:
- Limit number of torrents displayed; add previous/next page buttons
   - Only register one instance with UpdateManager
   - New icons from famfam/silk, same license
2013-04-13 12:12:22 +00:00
10a42c8b0d debian: add new jetty7 jars to package 2013-04-13 00:23:24 +00:00
zzz
f59ea790ca Javadoc fixups for Jetty 7 2013-04-12 13:53:54 +00:00
zzz
28f1170d95 history for prop, -1 2013-04-10 17:39:27 +00:00
zzz
8eb7cf7bae propagate from branch 'i2p.i2p.zzz.jetty7' (head 12e512b792594fe6a291ad3ab303fca30228391b)
to branch 'i2p.i2p' (head f3775dd82af85ba335258bd9f0fc06131a1daaa9)
2013-04-10 17:24:11 +00:00
zzz
1be0695a21 remove extra semicolon 2013-04-10 17:23:43 +00:00
zzz
65480456cd - I2NP: Ignore unused 7 bits of the Database Lookup Message,
so we can use them later
2013-04-10 17:22:51 +00:00
zzz
5962577b53 - I2NP: Ignore unused 7 bits of the Database Lookup Message,
so we can use them later
2013-04-10 17:06:32 +00:00
zzz
1222776da3 tweak proxy error page 2013-04-10 17:04:07 +00:00
zzz
13633a0532 remove debug id 2013-04-10 17:03:15 +00:00
zzz
1eda9e9053 set ethertype to IPv4 2013-04-10 17:01:54 +00:00
zzz
2557a0bd84 increase threads 2013-04-10 17:00:54 +00:00
e1c533e9de Fixed path to start.ico 2013-04-08 22:44:58 +00:00
zzz
bb8183d0ee - Backup up more Jetty 6 config files before migration
- Try to avoid zip file closed exceptions
  - Fix jetty.xml, switch from deprecated WebAppDeployer to WebAppProvider
2013-04-08 15:29:02 +00:00
zzz
9478a84af7 - Switch from Jetty 7.6.8 to 7.6.10; check in jars
- Re-enable web downloads for easy jetty updating
  - Add dependency checking in apps/jetty build
  - Other build.xml tweaks
2013-04-07 15:01:02 +00:00
zzz
56eba28a50 propagate from branch 'i2p.i2p' (head d30ab8d5835ca55d63913342f0d28169c88e5d77)
to branch 'i2p.i2p.zzz.jetty7' (head fdd1d82c4bb26ed934170c34dd803c342a183a91)
2013-04-07 13:33:13 +00:00
zzz
f8d323bc7b propagate from branch 'i2p.i2p' (head 5737078c5993e2fcf73520cc610a71125b12520b)
to branch 'i2p.i2p.zzz.jetty7' (head a93a47d79b1db119ec8c62b46a4a4e226043bd17)
2013-04-07 13:20:34 +00:00
8857fe5550 Set defaults based on installer/i2pstandalone.xml and build.xml/doBuildEXE 2013-04-04 22:25:05 +00:00
45a38a5425 Only use original argc/v if there are arguments, otherwise use launch.properties or defaults 2013-04-04 22:15:21 +00:00
7f471910ed Marked Windows-specific code in preparation for a cross-platform binary 2013-04-04 21:51:57 +00:00
f6190dd82d Get a simple I2P.exe working 2013-04-03 01:55:02 +00:00
51f072cc72 Migrated limewireExe to i2pExe 2013-04-03 01:52:14 +00:00
b65898e0dd Ticket #741 - Added limewireExe source 2013-04-03 01:39:33 +00:00
7b753c9d30 merge of '48ac112fe938c8e960413ad60f64d313a1e5c9ac'
and 'c4b1087c95c82bb9dde50c078a0c2c0e86c562bc'
2013-04-02 22:46:25 +00:00
dev
dc8d70102c merge of '185bc62d33224812060d2f68266a029935fb710d'
and '381b15133084a1b3e1c37f66a62a768fedefd3d4'
2013-04-02 22:12:57 +00:00
dev
2cbb157f2d add lists.i2p2.i2p 2013-04-02 22:10:08 +00:00
2c47c21038 * Added backup's ressed server. (Thanks backup!)
* Temporary removing h2ik's server since he's been AWOL since 06-03-2013 and he's reseed server is down.
2013-04-01 13:18:47 +00:00
5904d5764c Debian: update changelog 2013-03-31 12:51:20 +00:00
d5443a34ea Debian: explicitly set permissions in postinst on /etc/i2p/wrapper.config (fixes #906) 2013-03-31 12:47:53 +00:00
af79b74c8c checkcerts.sh: cross platform support on *NIX
- function to convert dates to Julian to perform date calculation if GNU date is
  not present.
2013-03-30 21:52:01 +00:00
bfc327833c checkcerts.sh: add some support for non-Linux systems
Date computations as performed in this script require the use of GNU date,
which is only available by default on Linux systems. With this check-in we
explicitly check for the existence of GNU date before continuing with the date
calculations.

Previous versions of this script relied on 'certtool' to print the expiration
dates but certtool isn't available by default on non-Linux systems either. The
previous check-in added support for using OpenSSL, retaining the old behavior
on non-Linux systems.

(Also a re-arrangement of the date warning logic)
2013-03-30 14:24:59 +00:00
427abb081c remove debug text 2013-03-30 02:26:37 +00:00
6992090cda various updates to checkcerts script
- add support for 'openssl'
- parse expiration date, failing if expired or if expires within 30 days
- warn at 60
2013-03-30 02:22:23 +00:00
zzz
9b0c481525 0.9.5 2013-03-08 13:03:50 +00:00
zzz
77cfe0be01 graphs.jsp: Fix saving settings (ticket #857) 2013-03-03 20:32:02 +00:00
041da814d2 merge of '4482eec8563d6ed220c2042b18fc09164aaa4404'
and 'ce2de3b5c7bc1fcd077ff9d6327eaf24758d2a13'
2013-03-03 18:42:46 +00:00
7b7f3ea025 update geoip based on the Maxmind GeoLite Country database from 2013-02-19 2013-03-03 17:22:09 +00:00
53d5c0854f removing email address per request 2013-03-03 17:15:06 +00:00
b2f1e78d62 Temporary removing ju1c3d's reseed server until it's up and working fine on the new system. 2013-03-03 17:08:26 +00:00
9ba17d2e90 French, German, Norwegian, Polish, and Portuguese translation updates from tx 2013-02-22 13:20:41 +00:00
cc18f62fb5 Add new syndie hostnames 2013-02-13 20:50:05 +00:00
8950cc48a6 Flag of Curaçao, courtesy of David Benbennick, released into the public domain 2013-02-13 20:47:29 +00:00
zzz
51edaed610 NetDB: Randomize delay before floodfill store verify 2013-02-12 14:58:52 +00:00
zzz
3a2accdebb * Update: Bump torrent update to 3% of routers 2013-02-10 16:38:09 +00:00
zzz
6cef4f90e1 * Logs: Again, fix setting log filename (ticket #805) 2013-02-10 16:37:06 +00:00
zzz
f5e416d6bf Wrapper 3.5.17 compiled on Raspberry Pi (ticket #826)
GPLv2
binaries stripped

gcc (Debian 4.6.3-12+rpi1) 4.6.3

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-1+rpi1)
OpenJDK Zero VM (build 20.0-b12, mixed mode)

Processor	: ARMv6-compatible processor rev 7 (v6l)
BogoMIPS	: 697.95
Features	: swp half thumb fastmult vfp edsp java tls 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xb76
CPU revision	: 7

Hardware	: BCM2708
Revision	: 0002
2013-02-10 15:02:04 +00:00
zzz
5eba38a24e * NetDB:
- Encrypt DatabaseLookup messages out exploratory tunnels
     when we already have the RI of the ff
   - Don't use multiple routers from the same /16 in lookups or stores
2013-02-09 19:29:08 +00:00
zzz
7f5d6ca1c7 javadocs 2013-02-09 19:28:12 +00:00
e4318e95a5 German, Polish, Portuguese, Spanish, and Swedish translation updates from Transifex 2013-02-06 02:39:44 +00:00
eaa86664bd Fixed SOCKS mapping terminology, bumped history 2013-02-04 11:29:30 +00:00
5a1053e4fb Allow any domain name to be mapped to an IP
This enables .onion domain names to be accessed by clients that are being
routed through the SOCKS tunnel by e.g. proxychains (assuming that the SOCKS
tunnel has been configured with a SOCKS outproxy that exits into Tor). If the
.onion is not mapped to an IP address, the client would attempt a DNS lookup
which would of course fail to find the .onion.

Clearnet domain names can also be mapped to IPs, but this is irrelevant as DNS
lookups work through SOCKS (via the configured outproxy).
2013-02-04 11:21:26 +00:00
0052ebf334 Set SOCKS5 addressType to AddressType.DOMAINNAME on a successful mapping 2013-02-04 11:13:23 +00:00
d9f7b24cc7 use short name for diftracker 2013-01-31 18:18:48 +00:00
67ca0a4d20 Norwegian translations:
- enable Bokmål in router
- add to tx config
- add Bokmål translations from transifex
2013-01-31 17:51:01 +00:00
fea91a35f6 fix Norwegian translation, add to tx config 2013-01-31 16:42:57 +00:00
3214bc4f81 merge of '4e5a2d2f78b9a7603ece4e4b54720e83e062cbf4'
and '8bbaf8414a2475919844450aad53b325ee0f7e84'
2013-01-31 15:40:15 +00:00
zzz
a0befe59c3 * EepGet:
- Fix URL when not proxied to conform to RFC 2616
   - Add port to Host header to conform to RFC 2616
2013-01-31 12:54:23 +00:00
5f614db59b Adding a new reseed host. http(s)://netdb2.i2p2.no
Using certificate from cacert.org

Thanks to ju1c3d, ju1c3d@mail.i2p
2013-01-30 15:34:28 +00:00
cc4b03604d Adding Norwegian Bokmål translation to i2ptunnel. 2013-01-29 18:14:34 +00:00
zzz
573692dbdf * Console: Catch IllegalStateException storing nonces (ticket #852) 2013-01-29 13:48:00 +00:00
zzz
78dcfd830c * Translations:
- Use JVM language name if available
  - Correct Estonian language code from ee to et
2013-01-29 13:44:36 +00:00
zzz
95d0dc0419 fix BuildHandler NPE from previous checkin 2013-01-28 12:50:04 +00:00
zzz
9247dc898c * BuildHandler:
- Add early throttler based on previous hop
   - Limit concurrent next-hop lookups
2013-01-27 16:24:29 +00:00
zzz
bd900d8d55 increase ff count 2013-01-27 16:21:09 +00:00
zzz
a9eb48c4c6 javadoc 2013-01-27 16:20:26 +00:00
zzz
8afe7c261f * RandomSource: Seed from SecureRandom too 2013-01-27 16:18:56 +00:00
zzz
543870ff02 change injection errors to warns 2013-01-27 16:17:29 +00:00
92707efe8a history bump 2013-01-24 00:18:11 +00:00
42040eb6c8 Added IP -> I2P URL mapping support to SOCKS client tunnels
To use, add custom options to the SOCKS client tunnel like:

ipmapping.127.12.12.12=stats.i2p

Then save and restart the tunnel.
2013-01-24 00:14:03 +00:00
zzz
18e369bcf4 - Use servlet path everywhere, so the war can be renamed
- Use servlet path as base for config file and data directory names,
    so we may have multiple instances running together
  - Don't override service(), use doGet() and doPost() instead
2013-01-23 22:44:52 +00:00
zzz
4ba8f02f59 * Eliminate Jetty dependencies in i2psnark for good.
Required due to webapp classloader changes in Jetty 7,
  we can no longer access or extend Jetty classes.
  - Extend javax HttpServlet instead of Jetty's DefaultServlet
  - Implement BasicServlet to replace functions of DefaultServlet
  - Add MimeTypes implementation to add to servlet's defaults
  - Add local mime.properties file, remove checks in I2PSnarkServlet for those
    we were missing
  - Eliminate all use of Jetty utility classes including MimeType, Resource,
    Buffer, Cache, URIUtil, ...

TODO:
  - Use servlet path everywhere, so the war can be renamed
  - Don't override service()
2013-01-23 20:26:50 +00:00
a7fc8bdf53 Added a link to the summary bar for mobile users on /home 2013-01-21 08:38:00 +00:00
3710346764 history 2013-01-21 06:23:19 +00:00
bb0d2ef17c Added User Agent string for Opera Mobile
On tablets the UA is "Opera Tablet" so tablets will use the desktop console.
2013-01-21 06:01:42 +00:00
d5a870226c Added option to /configui to force the mobile console to be used 2013-01-21 05:59:53 +00:00
34aa3ac207 Updated history.txt 2013-01-19 03:51:42 +00:00
7d38041d23 Tweak so Android tablets use the normal routerconsole 2013-01-19 03:46:38 +00:00
e643d0a086 Fixed up mobile view of routerconsole with a mobile.css in each theme 2013-01-19 03:42:54 +00:00
dcd655fa4b * Translations
- Hungrarian, Italian, Portuguese, Russian, and Swedish translation updates
    from Transifex
  - Refresh of **/messages_en.po
2013-01-17 13:14:08 +00:00
zzz
f57f49c3c5 propagate from branch 'i2p.i2p' (head f33e0980fd48ba4acda12d2079f2a4834a710ae4)
to branch 'i2p.i2p.zzz.jetty7' (head bd1a64f7262ad5bbea3529675f1f055b9ad257a8)
2013-01-13 12:38:05 +00:00
zzz
4f146772e7 * I2CP: Failsafe check for delivery job requeueing forever (ticket #819) 2013-01-12 18:18:17 +00:00
zzz
083dffe8ed try again to prevent IllegalStateException on Java 5 2013-01-12 18:17:31 +00:00
zzz
c43a73e756 log and javadoc tweaks 2013-01-12 18:16:38 +00:00
zzz
0c94680a45 * NetDB: Split up files into subdirectories 2013-01-12 18:14:51 +00:00
zzz
832c0ff683 * SAM: Force i2cp.messageReliability=None (ticket #819) 2013-01-12 18:13:59 +00:00
zzz
95b4fe7378 * jobs.jsp: Add table of pending jobs 2013-01-12 18:13:19 +00:00
zzz
ed12bcefdb * EepGet:
- Fix format of last-modified header to use strictest RFC 822
  - Stop immediately if socket connection to proxy fails
  - Don't forget lastModified/etag headers after redirect
  - Note SocketTimeout API breakage for Syndie
2013-01-12 18:12:35 +00:00
41af00a7d6 don't run gettext if 'require.gettext' is set to false 2013-01-10 16:51:06 +00:00
e34cd0ba3f merge of '27711f734eca9313f7e0742dc1a6df964b744b86'
and '4d27e2149e5bb50280599426f3884dfcc04f920a'
2013-01-10 15:09:20 +00:00
18664d39f3 add bumpBuild target 2013-01-10 14:43:15 +00:00
zab
680c31b843 Fix/update/refactor InboundTest 2013-01-07 19:03:30 +00:00
zab
ba5005c467 Fix OutboundGatewayTest
Refactor as much as possible into GatewayTestBase
2013-01-07 18:38:13 +00:00
zab
7a8fde6637 Refactor common code between Inbound and Outbound Gateway tests in a base class
OutboundGatewayTest still fails, investigating...
2013-01-06 23:02:10 +00:00
zab
973e0e7448 Fix/update InboundGatewayTest 2013-01-06 21:42:15 +00:00
101702552f re-enable DataHelperTest since the jenkins test was a success 2013-01-06 02:41:42 +00:00
8aa7433a80 merge of '2246f1b81c19ddc2c058e68870f1445b9cca1598'
and '956cf5bff87f174141628efbad07e028e30fc4c9'
2013-01-06 02:24:09 +00:00
e7d48f1d3c - s/classpath/javac.classpath/ I'm fairly sure that this must have been added
in error.
- add jenkins.cobertura.report target. The jenkins plugin couldn't find the
  sources, so I'm hoping this helps it out.
- add debug lines cobertura needs
2013-01-06 02:22:10 +00:00
zab
7e7a68a61d fix BandwidthLimiterTest 2013-01-05 23:21:04 +00:00
zab
c558f5af85 Update FragmentTest to expect an IAE.
Update {Batched}FragmentTest to JUnit 4
	Use a single instance of I2PAppContext
2013-01-05 23:08:00 +00:00
zab
a33457ff7f Rename BuildMessageTest so it doesn't match the JUnit wildcard.
Add note that the test (most likely) needs to be re-written fom scratch.
2013-01-05 21:52:33 +00:00
16be8deb00 regex tidying
(fixed version of revision 5135b9e8fb88986fdc130971ebe75c3ab0665dcc)
2013-01-05 20:12:35 +00:00
dfcf1c1575 disapproval of revision '5135b9e8fb88986fdc130971ebe75c3ab0665dcc' 2013-01-05 16:22:28 +00:00
d1dc7cd269 tidy up version # regexes 2013-01-05 16:18:41 +00:00
88c2b3da58 merge of '3c30547c23e641e3cc7a7927d956997c0187aa5c'
and 'd0f6b1e4566b9690b60fa0fb686aadc3ad629a31'
2013-01-05 00:31:14 +00:00
0bfd747c95 Exclude from router cobertura anything that isn't net.i2p.* 2013-01-05 00:30:37 +00:00
zab
d150403395 Rename a non-junit test so it doesn't fall under the junit wildcard 2013-01-04 23:44:26 +00:00
zab
1939aaca93 Fix test and make it actually test something 2013-01-04 20:57:18 +00:00
zab
d0cb714f69 add installer/resources to the classpath for eclipse and junit task
do not use hardcoded filesystem path in junit test 
	(test still fails for different reason)
2013-01-04 20:17:35 +00:00
zab
54a35df9e9 merge of '3cd63a1366e2ca171fb8c348927047e0c0b7393d'
and 'a461c087d600d3fa0b5da2085d1dd97aff721d44'
2013-01-04 19:31:35 +00:00
zab
b1a29c9514 enable more output for easier debugging of tests 2013-01-04 19:28:37 +00:00
af21093012 javadoc fixes 2013-01-04 19:20:08 +00:00
zab
cea1b08a98 Update javadoc to specify non-null payload for datagrams 2013-01-04 18:46:00 +00:00
zab
c7f1329c04 get rid of two tests that don't make sense 2013-01-04 18:38:32 +00:00
a02f9313ff fix javadoc-test target 2013-01-04 02:47:10 +00:00
5a7d975ed6 speed up datahelper test (thanks zab) 2013-01-04 01:17:29 +00:00
455618dc26 merge of '9a6aaa59a51ac9c26f4a1a1a1db90feb17819a22'
and 'b5f4c5514ac1fbd9f7b61180c7874ddcac422c11'
2013-01-04 00:36:02 +00:00
bddfc5b526 Turn BuildMessageTest into a JUnit TestCase 2013-01-04 00:33:03 +00:00
zzz
bcbf7e6270 - Speed up crypto tests, reduce memory usage, use common context 2013-01-04 00:31:28 +00:00
83886cdcfb merge of '9cd70f6c6a5d8100782f92785a0082b09248e6b0'
and 'e6b29f8caf5730bada39b1296ff3eb3b5f363f0e'
2013-01-04 00:20:03 +00:00
zab
dbfb4cbbbb Remove test that does nothing anyway 2013-01-04 00:19:08 +00:00
fe477f0a0b merge of '96801f1975a618da3caa8943bc186ad78449ee94'
and 'fa2d2cb834d3792b816984bc44da70ad903e40e8'
2013-01-04 00:10:56 +00:00
dd24ab6f70 Create a new RouterContext for net.i2p.router.tunnel tests (can't cast I2PAppContext) 2013-01-04 00:07:15 +00:00
zab
47592377f2 Make test expect an UOE 2013-01-03 23:58:18 +00:00
zzz
e3ecc42e88 - Fix delivery instructions test 2013-01-03 23:13:47 +00:00
999b8d3c68 merge of '7b3e55d16589c2194327677322fca98e2ce056ad'
and '85eec7bc28af462eca4a83562771af846cb2b91c'
2013-01-03 22:58:46 +00:00
8e5c26270e cross platform unit test hostname faking not relying
on external tools

The original method failed on Archlinux. This should work everywhere.
2013-01-03 22:58:21 +00:00
zab
e67aa430cd merge of '616d36fc49bb03f28c56540cdd475e2f7e9e3663'
and '7a64fceed49d038439e050a81f45b1e6abb2ad19'
2013-01-03 22:55:56 +00:00
zab
8e57a2e386 Fix most of the test cases, reduce the runtime of the test
using LogManager.flush()
2013-01-03 22:55:40 +00:00
zzz
d28184ce72 - Test data strucure equals() for everything except I2CP 2013-01-03 22:05:10 +00:00
94827d6d55 merge of '4e4692d229faefe5a1a891b9e7e89302117d2970'
and '90cf0bde41018fcb22d53d168c8d6f56294d8660'
2013-01-03 20:12:47 +00:00
6c676869a0 change an ant 1.8ism to one supported in 1.7 2013-01-03 20:12:18 +00:00
zab
2c8f2ae404 Change the Rate.equals(..) method to work for Rates w/o a parent RateStat
Change the RateStat.equals(..) method to work with deserialized RateStats
	Update and fix the JUnit tests for both
2013-01-03 20:08:54 +00:00
3eb00c526d remove extranous reference (that I added) to junit; fix a bit more of the
router tests
2013-01-03 19:36:39 +00:00
zzz
83e25ef26c merge of '78c1ef42cf8e75cb54df7c34644855f54428565c'
and 'd37cf6a7b286442b886dbfd6f74ac948eee5b3fc'
2013-01-03 16:11:29 +00:00
zzz
8f4f7a677f - Fix junit path typo
- Fix several router unit test compile errors.
  They all compile now.
- Move SubmitMessageHistoryJob to i2p.scripts, it is not a unit test
2013-01-03 16:10:49 +00:00
b54c5f8545 renable slow tests
these tests are only slow with cobertura enabled
2013-01-03 14:15:56 +00:00
zzz
17ac0e4b5f - Fix last three I2CP message junit test failures caused by the removal of equals().
- Fix RouterAddress test failure caused by removal of expiration
2013-01-03 12:50:28 +00:00
zzz
4730690978 - Fix most of the I2CP message junit test failures caused by the removal of equals().
Still a few left where the test is overridden.
- Fix DestLookupMessage test failure caused by missing data.
2013-01-03 12:13:48 +00:00
9d77cd7761 allow setting hamcrest and junit locations with properties
Defaults to the ant library path (the previously hardcoded path) if not set.
2013-01-03 11:53:08 +00:00
5b81a1a6d5 catch unset classpath prop 2013-01-03 10:43:31 +00:00
f788ef97de remove cobertura.ser when ant clean is called 2013-01-03 02:43:51 +00:00
zzz
e4ec046363 - Add separate top-level junit.test and scalatest.test targets, so
you can run whichever you have the libs for
 - Add router to test target (if we don't run it, it won't get fixed)
2013-01-02 23:46:14 +00:00
cdc3682baa Fixes to JUnit tests under net.i2p.router.transport 2013-01-02 22:05:12 +00:00
dae66d7f73 Updated JUnit tests in net.i2p.router.tunnel - almost all bugs fixed 2013-01-02 21:29:54 +00:00
d6d1b51970 Set up build.xml test harness to run the JUnit4 tests as well
You will need junit4.jar, hamcrest-core.jar and hamcrest-library.jar in your
Ant library path (probably /usr/share/ant/lib)
2013-01-02 21:06:59 +00:00
zzz
6f301f01dc * Logs: Fix setting log filename (ticket #805) 2013-01-02 14:12:02 +00:00
zzz
71607fff2d javadoc 2013-01-02 14:02:02 +00:00
zzz
6ed602309f - Local mods and wrapper for SipHashInline
- Convert SessionTag.hashCode() to SipHash to prevent collision attacks
     in the SessionKeyManager; cache for speed
2013-01-02 14:01:29 +00:00
zzz
20cc48cd87 SipHash inline implementation and junit test, unmodified.
As pulled from https://github.com/nahi/siphash-java-inline
Last commit was 5be5c84851
2012-11-06

Copyright 2012  Hiroshi Nakamura <nahi@ruby-lang.org>
Apache 2 license

25%-35% faster than reference implementation in my tests.
2013-01-02 13:54:49 +00:00
zzz
f2331b0603 * New getASCII() for use in findbugs cleanups for 7-bit strings
This code was supplied by zab
2013-01-02 13:31:41 +00:00
zzz
8c2ddec400 add shortcut in equals() for speed 2013-01-02 13:27:24 +00:00
zzz
c8e12b9ac9 * Transport: Fix early NPE (ticket #824) 2013-01-02 13:23:23 +00:00
zzz
452d1d01b8 * SAM: Synchronize dissector 2013-01-02 13:21:45 +00:00
zzz
e375ffe8f1 * I2CP:
- Fix leak if nonce = 0 but reliability != none
   - More work on failure codes (ticket #788)
   - Fix race with _finished indication in OCMOSJ
2013-01-02 13:19:40 +00:00
zzz
2ea9fc5d61 I2CP: Remove static logs; Fix thread ID counter 2013-01-02 13:17:02 +00:00
zzz
912e29f8af - Remove unused equals() methods for I2CP message classes,
most did not have hashCode() implementations.
     These are never used as keys in a Set or Map or checked for equality.
     Fixes findbugs issues (ticket #379)
2013-01-02 13:13:35 +00:00
zzz
72054a7d30 reorder synch and loop 2013-01-02 13:08:34 +00:00
ab2c5ef9bb postinstall: delete both OSX scripts if we're not on OSX 2013-01-01 18:26:08 +00:00
ab0b4936ec refresh patch 2013-01-01 18:22:18 +00:00
2dd1aaab63 Update wrapper to v3.6.17 (ticket #826) 2013-01-01 10:39:08 +00:00
c05cd07ff7 Fixing two potential NPEs found by findbugs 2013-01-01 00:02:18 +00:00
adfc22499c Remove outdated javadoc reference & explicitly specify locale 2012-12-31 21:45:49 +00:00
44498ca8c7 installer: extra checks & add to findbugs target 2012-12-31 18:00:42 +00:00
a40566eefb improve installer javadocs; add minimalist package.html 2012-12-30 00:36:14 +00:00
zzz
77f0dd653a - Fix handling of duplicate participating tunnel IDs
- Reduce chance of generating duplicate IDs for our tunnels
   (ticket #812)
 - Stat cleanup
 - Comment out effectively unused countProactiveDrops()
2012-12-29 13:40:55 +00:00
zzz
8ed70084db catch iterator exception on java 5 2012-12-29 13:31:31 +00:00
zzz
2f4e3862e3 cleanups 2012-12-29 13:23:57 +00:00
zzz
667393e8cf * Javadocs: Fix javax links; add installer utils 2012-12-29 13:19:09 +00:00
zzz
c6dd7b4cc5 * i2psnark: Redirect after post
Button spacing on config form
2012-12-29 13:17:27 +00:00
db0501f31b explicitly specify encoding 2012-12-29 00:10:38 +00:00
3be5002f15 ant debian-tarball target: set .sh to mode 755 2012-12-28 21:17:56 +00:00
4389f277d6 * windows installer fixes / improvements
- move deprecated installer-only classes (Exec, Delete, and Copy) from
    i2p.jar into installer/
  - replace installer/resources/fixpaths.cmd with an improved method in java
  - combine the installer-only utility classes into a single jar and call the
    classes from within izpack
2012-12-28 20:59:17 +00:00
cf10cb1c09 Fixed out-of-date references to wrapper.jar and jbigi.jar so that the justBOB target works 2012-12-27 11:59:48 +00:00
zzz
38214cf5be * I2CP:
- Prep for delivery of detailed failure codes to the client (ticket #788)
   - Store session ID as an int instead of a long
   - Clean up some duplicate createRateStat calls (ticket #787 comment 2)
   - Other optimizations, cleanups, final
2012-12-26 14:29:49 +00:00
zzz
f4740d2639 * Stats: Clean up some duplicate createRateStat calls (ticket #787 comment 2) 2012-12-26 14:22:30 +00:00
zzz
48309c0f6d * NetDB: Split routerInfo files into subdirectories, disabled for now,
enable with router.networkDatabase.flat=false
2012-12-26 14:19:52 +00:00
zzz
cf1f42ebf8 * Tunnels: Catch rare BuildExecutor IAE only in Java 7 (ticket #811) 2012-12-26 14:16:49 +00:00
zzz
7c8bb0ba69 comment out main 2012-12-26 14:15:19 +00:00
zzz
14eedaa029 * i2psnark: Create torrent form tweaks 2012-12-26 14:14:43 +00:00
73e25aad76 * Add EOL modifications
- set eol for certain files in installer targets (since editing *.config and *.xml in windows is practically impossible without an externally installed editor such as vim or notepad++ and of course we want people to be able to read the licenses if they desire...etc.)
  - try to prevent user error by ensuring that the proxy/*.ht files have eol set to crlf in the prepConsoleDocs target
2012-12-25 00:13:32 +00:00
f3f4529d84 use ant features instead of Unix commands where possible in the installer2app target. Also make izpack2app a settable property 2012-12-24 22:09:10 +00:00
5dbe6294fb debian-binary: don't assume that noAutoDebchange will be set by people that know that debian/changelog needs to be set 2012-12-24 19:55:16 +00:00
91c9bfed3a add additional arm types to the 'noExe' condition & add reference the cybergarage javadocs revision in history.txt 2012-12-24 19:46:40 +00:00
420ccad91b javadoc fixes for the upstream cybergarage UPnP library. Upstream ticket #3598391 has been filed for this issue. 2012-12-24 19:44:25 +00:00
1d0f8b4c6d Add missing shebang lines to bundle-messages scripts 2012-12-23 17:35:07 +00:00
3396626a0c * new ant targets
- trimMtnRev: create a new property with the revision trimmed to  8 characters.
  - getExtendedVersion: create a new property that includes the full version with the shortened MTN revision tacked on
  - debchange:  automatically update debian/changelog with the I2P version. Called by the "debian" target unless the property noAutoDebchange is set.
  - debian-tarball: export i2p.i2p branch to a new directory, remove the binaries like jbigi and launch4j, and create a tarball.
* move packages created by "ant debian" to ${basedir}
* add debian/changelog to .mtn-ignore since it is now automatically updated (by default).
* add *.deb to .mtn-ignore
2012-12-23 17:30:56 +00:00
8c13d32036 debian: add repack script and update watch file to use repack.sh 2012-12-23 17:20:15 +00:00
zzz
5d523723ed merge of '2e3c8b51430edfa3ce0e82bc4b49ea7c21c0606b'
and 'c643595f81605fc5534465da3f1655e4c23345a1'
2012-12-22 19:59:06 +00:00
zzz
6d2fa690dc quoting fixups 2012-12-22 19:30:36 +00:00
zzz
470b8c59e7 minor console/update cleanups 2012-12-22 18:37:26 +00:00
zzz
81975e919b propagate from branch 'i2p.i2p.zzz.test2' (head f33dbe1499b84cf6192b1a7bd494eaf081a047c0)
to branch 'i2p.i2p' (head 4e5bd2836592b95e1eff01d8e83f2690da386ef8)
2012-12-22 18:34:51 +00:00
zzz
436d8f0785 - Add support for announce-list (BEP 12) to TrackerClient (ticket #778)
- Refactor dup tracker detection
2012-12-22 18:05:42 +00:00
fa235d97af enable i2prouter translations in the debian package & refresh patch 2012-12-22 17:51:15 +00:00
42f8c71d4e update .mtn-ignore 2012-12-22 17:50:46 +00:00
9a241af241 enable translations for 'i2prouter' 2012-12-22 15:10:57 +00:00
69d22b84f9 i2prouter: integrate modifications from upstream (Tanuki) 2012-12-22 14:57:28 +00:00
zzz
7ea1bffea2 rename Tracker class for clarity 2012-12-22 14:13:16 +00:00
c1f4155cd8 French language update from transifex + updated EN po files that were uploaded to transifex 2012-12-21 23:50:08 +00:00
85fda3ed7f minor regex tweak 2012-12-21 21:17:33 +00:00
8998bdec17 remove another reliance on external UNIX-only tools (and fixing formatting of my earlier commit) 2012-12-21 21:13:31 +00:00
c9b6a3f01c Instead of deleting the empty directory placeholders, let's just not copy them to pkg-temp to begin with. 2012-12-21 20:53:51 +00:00
05c5f66012 fix my getBuildNumber regex 2012-12-21 20:46:02 +00:00
7fd59c4f10 add more excludes to 'sloccount.report' and make the report location configurable 2012-12-21 20:45:05 +00:00
6fe127286f add armv6 and armv7 to the "do not build EXE" list 2012-12-20 07:25:28 +00:00
406bcbef9d remove dependencies on external tools for getReleaseNumber and getBuildNumber
getReleaseNumber and getBuildNumber were *NIX only targets that relied on the external tools grep, cut, awk, and tr. These targets have been rewritten to use ant features.
2012-12-20 07:23:01 +00:00
9eb25f60c3 add sloccount report target 2012-12-20 07:16:39 +00:00
b7c10d2adb remove a few more files with "ant clean" 2012-12-20 07:13:26 +00:00
816149efd3 debian: refresh patches 2012-12-19 21:31:02 +00:00
aa6eefcc76 debian: add commented entries required for PPA builds & update "debianhowto" target
If someone runs "ant debian" to make installable packages, they do not need to
have their own wrapper or commons-logging  jars. The PPA builds, however, do
require them. During the last release I made the mistake of overwriting my "PPA
debian/control" file with the one from MTN that did not include these
dependencies.

Also updating "debianhowto" to reflect the fact that we no longer use
Debian's/Ubuntu's Jetty pkgs since Jetty6 appears to be leaving their repos in
the near future.
2012-12-19 21:25:04 +00:00
9ef9e48da9 remove executable bit 2012-12-19 21:09:17 +00:00
166e36aaef move taskdefs to targets
The directory installer/lib/ will be removed if a 'stripped' source tarball is
required. Without the changes in this commit, removing this directory will
require hackery to be performed on the I2P source in order for any of the ant
targets to work.
2012-12-19 21:08:57 +00:00
zzz
667b548d3b * Update: Hide the update buttons when router.updateDisabled=true, as is the case
for Debian packages. Broken in 0.9.4. (Ticket #817)
           Remove unused shouldInstall() method.
2012-12-19 14:58:37 +00:00
5dfef69688 Add dummy placeholder files to empty eepsite directories
git and a few other vcses don't store empty directories....but now these directories
are no longer empty.
2012-12-18 20:50:29 +00:00
zzz
c3ae3f2895 build fix 2012-12-17 15:29:26 +00:00
zzz
8b41956091 0.9.4 2012-12-17 14:52:02 +00:00
264e27ab3f Correct url for forum.i2p 2012-12-16 03:23:16 +00:00
zzz
74f6abc97a bump 2012-12-15 14:54:32 +00:00
zzz
8edbfc5198 replace call to Arrays.copyOf(), not in Java 5 2012-12-15 14:41:42 +00:00
8513d1f22b merge of '482fcb3afd2e52160588dbf9e253ff594e0d5ce3'
and 'a63132b861cf363158a5ac2e1897b4636321d536'
2012-12-15 00:37:09 +00:00
cb75e3dc7e Documented required and optional test-related properties in build.properties 2012-12-14 22:33:37 +00:00
a8926dae57 ship all of the *BSD jcpuid files in the installer 2012-12-14 22:20:20 +00:00
c5502737f2 Debian: changelog and minor initscript updates 2012-12-14 16:14:46 +00:00
206cea8b56 update geoip.txt
Update geoip.txt based on Maxmind GeoLite Country database from 2012-12-04
2012-12-14 16:00:09 +00:00
003a8b07e1 German and Swedish translation updates from Transifex 2012-12-14 15:58:59 +00:00
zab
c5d69eb231 jenkins test passed! 2012-12-14 08:34:27 +00:00
zab
78864ab380 test to see if the jenkins server by skydrome detects broken compilation 2012-12-14 08:29:08 +00:00
zzz
ec22a6ec6b copy armv6 wrapper in preppkg-linux target 2012-12-13 12:33:53 +00:00
b435857e15 don't try to copy armv7 wrapper in preppkg-linux target 2012-12-12 20:34:37 +00:00
zzz
8198419156 build fixup 2012-12-12 15:43:42 +00:00
zzz
60718dbf72 Drop custom-built armv7 wrapper.
Tanuki-built arm wrapper works on armv5 and armv7 but not on Raspberry Pi armv6.
Wrapper we built for Raspberry Pi does not work on Trimslice armv7.
2012-12-11 19:27:56 +00:00
zzz
4e558320a9 - i2psnark: Add announce list support (BEP 12) (ticket #778)
Preliminary. Still todo: TrackerClient
2012-12-10 22:48:44 +00:00
zab
1fa00a5738 Restore javadocs 2012-12-10 18:05:52 +00:00
zzz
9f6ebd8e10 longer tunnel options for servers; fix spacing issue 2012-12-10 17:39:02 +00:00
zzz
c4a0fcbf43 propagate from branch 'i2p.i2p' (head 99b582d7fcc9d377341809a5fe580b439b37fea6)
to branch 'i2p.i2p.zzz.test2' (head f620dc8ce09657b3bfe0d87b5ee09c1bc33c31d1)
2012-12-10 17:23:29 +00:00
zzz
8104cb40cd Apache Tomcat 6.0.36 2012-12-10 17:23:07 +00:00
zab
d2b2600e5e VersionComparator w/o object churn, ticket #789
tests
2012-12-10 10:07:34 +00:00
zab
d062db3c17 Object churn improvements, ticket #787 2012-12-10 09:46:05 +00:00
zab
32a8bb7a3e more VersionComparator tests 2012-12-09 16:59:51 +00:00
zab
d8417cbf71 more tests for VersionComparator 2012-12-09 13:28:06 +00:00
zzz
863a05b33d * susimail: Button CSS spacing tweak 2012-12-08 12:12:29 +00:00
3fc3abe7a5 Moved susimail.properties out of the build path, and set build.xml to copy it in 2012-12-08 02:02:04 +00:00
zzz
96fcaf9385 javadoc 2012-12-07 14:21:30 +00:00
zzz
0b14981163 fix forum urls 2012-12-07 14:20:43 +00:00
zzz
87a56a6fac * RouterClock: Reduce log level (ticket #790) 2012-12-07 14:20:02 +00:00
0fa938e096 merge of '60726592fdfe50d6d8051846e0034b4b40a6761e'
and 'ad92f5811a7ff6ceab5ab09572d716f00f9100ea'
2012-12-06 00:17:13 +00:00
b7e3a60fbc Ticket #802
Added https://euve5653.vserver.de/netDb/ to reseed host list.
Certificate using www.cacert.org, so no need to add a new crt file.
2012-12-05 20:57:33 +00:00
653ccaae49 typo fix + updated UK translation 2012-12-05 14:38:56 +00:00
zzz
ca00b34314 * I2CP: Fix external I2CP apps, including i2ping, caused by 0 nonce value,
broken in 0.9.2 (tickets #799, #801). Allow nonces == 0.
   Javadocs and cleanups.
2012-12-05 00:03:27 +00:00
zzz
0c5811801f * SSU: Fix rare NPE (ticket #798) 2012-12-05 00:01:49 +00:00
zzz
d9727c901c * Reseed: Don't go on to the next host if we have enough http://zzz.i2p/topics/1287 2012-12-05 00:00:55 +00:00
zzz
63b8e7101f * GarlicMessage: Fix notes and log in GarlicMessageHandler and HandleGarlicMessageJob,
they are used for netdb messages received by floodfills http://zzz.i2p/topics/1282
2012-12-05 00:00:06 +00:00
4f5da775d4 Chinese, French, Italian, Polish, and Ukrainian translation updates from
Transifex.
2012-11-28 23:27:16 +00:00
3464ad6e5e remove extraneous space 2012-11-28 19:39:31 +00:00
d28480dd92 bumping build to -12 2012-11-28 10:34:19 +00:00
4902b4ecba merge of '32a936bfa4c9048f8d96461990da03f7f35cb676'
and '9c7cae316969219b1f2d74c20dbb4a12a94857a9'
2012-11-28 10:28:30 +00:00
zab
0e0a38460e Revert to using ArrayList in RouterInfo 2012-11-28 08:19:34 +00:00
4266a10ffb Added more tests to VersionComparatorSpec to further cover the implementation 2012-11-26 00:29:02 +00:00
31fc55eca7 Added tests for VersionComparator 2012-11-25 02:44:01 +00:00
4d389f75a2 Changed summary bar ordering <input type="image">s to <button>s
Fixes a bug which caused the ordering to be non-functional.
2012-11-25 02:39:49 +00:00
zzz
abe29e044f Remove org.mortbay.http.Version.paranoid property not recognized by Jetty 6. 2012-11-24 20:01:07 +00:00
zzz
8d2eff76f2 fix jetty system properties 2012-11-24 19:56:58 +00:00
zzz
c5a6ed3179 final 2012-11-24 17:30:20 +00:00
zzz
99058ee135 * Codel: Make stats non-required (ticket #786) 2012-11-24 16:41:55 +00:00
zzz
b2e335fbba * Profiles: Small optimization in coalesceOnly() (ticket #765)
javadoc, detab
2012-11-24 16:41:12 +00:00
zzz
1d3bbfd250 * Addressbook: Disable unused wakeup via http 2012-11-24 13:56:45 +00:00
zzz
916e328e10 javadoc, volatile 2012-11-24 13:55:47 +00:00
zzz
fe02145fed typo 2012-11-24 13:53:12 +00:00
ad41b25be5 merge of '138eae0135999a3f8e20b08183500a2318287cd4'
and '314f5c9d4fc6b5dd82d6ee09a207686f52e66a2c'
2012-11-23 20:12:11 +00:00
d2b1103e26 Removed a hard-coded jsp link I missed 2012-11-23 20:10:52 +00:00
0b05cd761c i2prouter: fix block location (thanks k0e) 2012-11-23 18:08:04 +00:00
28ba7880e4 merge of '15d44385349738e5c84f8efcdb797d98b4fbaed0'
and '586f7a71f1e187cb041d873c013fbe91d0184b08'
2012-11-23 18:07:07 +00:00
4680fd118b Added remaining .project and .classpath files
The project files for jetty are in the apps/jetty folder. Dependencies will be
resolved once the project has been built normally once via e.g. "ant updater".
2012-11-23 12:31:02 +00:00
9dcfe98437 Added .project and .classpath Eclipse files to most sections of the source
To import a branch of trunk into Eclipse, create a new workspace based in the
root directory of the checked-out branch, and then select "File -> Import..."
then "General -> Existing Projects into Workspace", then for "Select root
directory" choose the root directory of the branch (and of the workspace).
Select all projects that appear, so that dependencies are satisfied.

Currently left out are i2psnark, routerconsole and susimail, because they all
depend on jars in apps/jetty/jettylib, which seems to be auto-generated. Need
to check whether the existence of that folder (from having Eclipse files in it)
will prevent the jars being populated or not.
2012-11-23 12:20:26 +00:00
zab
55c264916b kill a string allocation hotspot 2012-11-23 07:52:03 +00:00
zab
0ec77f5514 Use the cached iterator list to remove Iterator allocation hotspots 2012-11-23 07:22:58 +00:00
zab
f238d0514f test removal 2012-11-23 07:13:21 +00:00
zab
d8613d2285 more appropriate junit test 2012-11-23 07:06:01 +00:00
zzz
009b0bfdde more empty jars not to pack 2012-11-23 01:30:48 +00:00
zzz
924963eba0 fix class cast exception 2012-11-22 23:14:08 +00:00
zzz
de175b80fe updates 2012-11-22 22:54:11 +00:00
zab
1e83028702 An ArrayList that reuses a single iterator 2012-11-22 21:50:48 +00:00
zzz
9fc7258537 - Update non-default xml files
- Update DTD
2012-11-22 21:42:15 +00:00
zzz
50df4b53db - Clean up WebAppconfiguration
- Fix eepsite xml files
- First cut at updating migration code (untested)
2012-11-22 21:17:50 +00:00
zab
e974d3bc55 propagate from branch 'i2p.i2p.zab.782' (head 64415601890b9c494a8f06379f9feefbc855e07c)
to branch 'i2p.i2p' (head 0e92cf3a3844e7b738ca9c2486112867fc663b6f)
2012-11-22 20:53:03 +00:00
zab
7c96044d18 javadoc 2012-11-22 20:47:54 +00:00
zzz
d5d70f1b40 Wrapper 3.5.16 compiled on Raspberry Pi:
GPLv2
binaries stripped

gcc (Debian 4.6.3-12+rpi1) 4.6.3

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-1+rpi1)
OpenJDK Zero VM (build 20.0-b12, mixed mode)

Processor	: ARMv6-compatible processor rev 7 (v6l)
BogoMIPS	: 697.95
Features	: swp half thumb fastmult vfp edsp java tls 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xb76
CPU revision	: 7

Hardware	: BCM2708
Revision	: 0002
2012-11-22 00:36:45 +00:00
zzz
02ad4d5200 fix NPE 2012-11-21 22:53:22 +00:00
zzz
56ae54c2ff Jetty 7 license info copied from jetty-distribution-7.6.8.v20121106 2012-11-21 22:20:05 +00:00
zzz
a70e040e33 susimail compile fixes for Jetty 7.
Untested.
2012-11-21 21:21:38 +00:00
zzz
c0d82fe83f i2psnark compile fixes for Jetty 7.
Untested.
2012-11-21 21:09:31 +00:00
34e0b36401 updates to 'i2prouter' based on changes to Tanuki's example script 2012-11-21 21:03:55 +00:00
2fbe0e8bb1 update wrapper to v3.5.16
- Windows: Self-compiled with VS2010 in Windows 7. The icon has been
  changed from Tanuki's default to Itoopie.
- FreeBSD: Self-compiled in FreeBSD 7.4 to eliminate the dependency on the
  compat6x port and stripped.
- Linux PPC32: Self-compiled in Debian Squeeze and stripped
- Linux x86, Linux x64, Linux ARMv5, MacOSX & Solaris: Binares are from the
  "community edition" deltapack offered by Tanuki. The Linux binaries have
  been stripped.
2012-11-21 21:01:45 +00:00
zzz
f1dd77982a RouterConsole compile fixes for Jetty 7.
Convert LocaleWebAppHandler from extending WebAppContext to
extending HandlerWrapper, since handle() is now final in WebAppContext.
Untested.
2012-11-21 20:49:18 +00:00
zzz
be8697cb9a jetty 7 first cut 2012-11-21 18:05:50 +00:00
zab
33ee8a38ca Ticket #765 - optimize locking during profile reorg 2012-11-21 15:45:38 +00:00
zzz
5f4562467e * Transport: Fix bug that inadvertently reduced default max
SSU connections in 0.9.2, cutting network capacity in half and
   harming tunnel build success rates
2012-11-20 01:17:02 +00:00
56ef4cda82 Addi an exception for core2 & corei to NBI on 32-bit kFreeBSD, NetBSD, and OpenBSD
These binaries are identical on 32-bit kFreeBSD, NetBSD, and OpenBSD systems.
If a corei CPU is found on these systems we'll use the core2 jbigi binary.

194868,ad47c3d909d0fb85242566f3c7b4be5b,libjbigi-kfreebsd-core2.so
194868,ad47c3d909d0fb85242566f3c7b4be5b,libjbigi-kfreebsd-corei.so
202848,57aa013ca310f3aae990f5ee78c100bd,libjbigi-netbsd-core2.so
202848,57aa013ca310f3aae990f5ee78c100bd,libjbigi-netbsd-corei.so
207657,01483211b6e077057302e256f185f7e7,libjbigi-openbsd-core2.so
207657,01483211b6e077057302e256f185f7e7,libjbigi-openbsd-corei.so

The I2P project does not currently ship these binaries, but they can be found
in unofficial jbigi packages.
2012-11-19 23:47:55 +00:00
5975b69b42 Add jcpuid binaries for OpenBSD, NetBSD, and kFreeBSD.
Support for these has already been added to CPUID.java.
2012-11-19 22:44:58 +00:00
d0a3c7256a Improved support for GNU/kFreeBSD
- add kFreeBSD to NBI and CPUID
- add kFreeBSD to jcpuid/jbigi build scripts
- refresh debian patches to compensate for kFreeBSD changes
- i2prouter: Detect kFreeBSD and normalize its name
- clean up osid (switching to "elif") and adding support for detecting kFreeBSD
- update postinstall.sh; I2P cannot be installed using gij so postinstall.sh
  will not be run. If/when openjdk finally comes to kFreeBSD, we'll be ready for it.
2012-11-19 22:41:54 +00:00
zzz
d94c14967c move HashDistance to router/util 2012-11-19 16:22:09 +00:00
zzz
f15828fa95 * NetDB: Add negative lookup cache 2012-11-19 16:10:02 +00:00
zzz
f64eacefe3 * BuildHandler: Disable CoDel, wasn't helping 2012-11-19 16:06:59 +00:00
zzz
c8f2effca8 * Profiles: Split up files into subdirectories 2012-11-19 16:04:33 +00:00
74f4859e13 explicitly prefer openjdk-*-headless over default-jre-headless.
On Debian Squeeze the default-jre-* packages point to gij/gcj which is suboptimal.
Openjdk cannot be forced since not all platforms--such as kFreeBSD--have it as
an available option.
2012-11-18 18:52:13 +00:00
zab
8c987fc0d2 Add javadocs to getters
Make setters package-private
	Small noop tweak to the computeAverages
2012-11-18 15:01:43 +00:00
zab
efc202d2ee more use of the new methods 2012-11-17 19:22:23 +00:00
zab
3cbca7c0ac more use of the computeAverages method 2012-11-17 18:51:28 +00:00
zab
82e4244473 more refactoring 2012-11-17 18:36:55 +00:00
zab
836620c375 javadoc 2012-11-17 18:03:10 +00:00
zzz
addfff8626 * Tunnels: Set default priorities for tunnels (ticket #719)
Exploratory: +30
   IRC: +15
   HTTP Proxy: +10
   I2PSnark: -10
2012-11-17 17:32:24 +00:00
zzz
3836742e7d stat cleanup 2012-11-17 17:24:44 +00:00
zzz
74fd171131 * i2psnark: Clear PEX peers set after use, cause of bad peer counts 2012-11-17 17:11:39 +00:00
zzz
d511bf2cd8 * error500.jsp: Add servlet version 2012-11-17 17:10:31 +00:00
zzz
0cbbedd250 javadoc fix 2012-11-17 17:09:37 +00:00
zab
4824cae36c Properly synchronize the Rate class
Add a new class to store results from rate calculations
	Add a new method to compute average, last and current measurements
	Use the new method in RouterThrottleImpl
2012-11-17 00:04:08 +00:00
b67359aca6 Match *FreeBSD* instead of just FreeBSD*.
(spotted at http://pastethis.i2p/show/2280/ and jcpuid already matches
*FreeBSD* so this fixes a minor consistency issue. Thanks to the anonymous
paster.)
2012-11-16 21:24:03 +00:00
zzz
99179edae2 add reseed to event log 2012-11-16 15:33:38 +00:00
zzz
ae6dad6e48 * NetDB:
- Implement automatic reseeding (ticket #521)
   - Increase minimum routers from 15 to 50
2012-11-16 14:47:55 +00:00
zzz
6902a8392f * i2psnark: Fix rare IOOBE (ticket #777) 2012-11-16 14:45:05 +00:00
zzz
4991c5a1ad * Tunnels: Fix outbound tunnel message priority (ticket #719)
(copy/paste error)
2012-11-16 14:43:46 +00:00
zab
a3e3001d49 * Sync fixes to Frequency
* Removal of warnings related to generics in StatManager
2012-11-14 21:53:54 +00:00
zzz
4fdf1c2411 * stats.jsp: Link to graph page, not single image 2012-11-13 20:40:15 +00:00
zzz
ea00c0af50 * SSU: Fix bug that would drop 512 byte messages
The bug has been there forever but never happened before
   0.9.3 because the buffers were all 32KB and the largest
   fragment was about 1500 bytes. In 0.9.3, there are multiple
   buffer sizes, the smallest is 512 bytes, and a packet
   of exactly 512 bytes would be silently dropped.
   Thanks zab for finding it.
2012-11-13 20:39:29 +00:00
zzz
e6dbd7ddda * SOCKS: Reduce log level of connect errors 2012-11-13 20:36:42 +00:00
zzz
9741d127a9 * NTCP:
- Fix NPE with more syncing (hopefully) (ticket #770)
   - Use ByteCache for 16KB buffers
2012-11-13 20:35:47 +00:00
zzz
8efc7e9369 * HTTP Proxy: Store referrer of new addresses in address book 2012-11-13 20:33:37 +00:00
zzz
da009f8d22 * Bandwidth Limiter: Fix stats broken in -1 2012-11-13 20:32:39 +00:00
zzz
f8133b7abf log tweak 2012-11-13 20:30:56 +00:00
2362862f31 eepget: If java binary is not found, try to determine where java.exe is located.
In my testing:
32 bit Windows (and, of course, 32 bit JRE) = Java added to the PATH
64 bit Windows and 64 bit JRE = Java added to the PATH
64 bit Windows and 32 bit JRE = Java *not* added to the PATH.

So...with this check-in:

- If the environment variable JAVA is set in the script, we'll use that
  manually specified Java. We will not look in the registry, but we'll check to
  make sure that the binary exists.
- If Java is found in the system path, we'll use it instead. We will not look in the
  registry.
- If the variable is not set manually and Java is not in the system path we'll
  look in the registry to find the java binary.

I've tested this in Windows XP, Vista, and 7 but it should work in any supported version
of Windows.
2012-11-09 23:53:02 +00:00
f287ed48ed merge of '6f719ac61e6f1afbd935f3fdab862c2e5cc7f5d8'
and 'fd3c457f0a834ba87fead3cbdf22e31253cd4e7c'
2012-11-07 19:29:34 +00:00
b8a9caeb4c Cleanup in reseed list, also removed HH's ssl host, since it expires 21-11-2012 22:34:10 GMT+1. And
I've failed to get in contact with him for a renewal of his certificate. Errors might appear in logs 
on installs after that date, just remove https://euve5653.vserver.de from /configreseed in console 
and you wont get errors.
2012-11-06 22:00:00 +00:00
dccd8445e6 More changes to finish first test in UpdateBehaviors 2012-11-06 11:23:57 +00:00
c5fb009c83 merge of 'd09201283ea0356bf5b1d3aedc4795a202414930'
and 'e2f50f8cb50f8593ca882e94cb661c54b87d2468'
2012-11-05 21:40:35 +00:00
4d8973b0a5 Assorted fixes to router Junit tests for changes in the source 2012-11-05 21:31:40 +00:00
f57d91ac16 Added missing DateAndFlagsTest - no errors in core junit tests now 2012-11-05 21:00:20 +00:00
ccc5923ab3 Drop unused DummyPooledRandomSource, moved to i2p.scripts 2012-11-05 20:43:47 +00:00
31debe6bbf CryptixRijndael_Algorithm._BLOCK_SIZE is private, so specify value directly 2012-11-05 19:53:00 +00:00
40d1507237 Fixed imports on core JUnit tests to use Hamcrest matchers provided with Junit4 2012-11-05 19:50:32 +00:00
zzz
ea2be02a29 * RequestLeaseSetJob: Only disconnect client after multiple dropped
lease set requests; reduce timeout, other cleanups
2012-11-05 17:23:32 +00:00
zzz
c21a6a54f8 * PeerManager: Don't reorganize as often if it takes too long (ticket #765) 2012-11-05 17:20:47 +00:00
zzz
70a2e330ef * i2psnark:
- More DHT limits
   - Announce to backup trackers if DHT is empty
   - Use PEX and DHT info in torrent peer count
   - Don't use temp files for announces
   - TrackerClient refactoring
   - cleanups
2012-11-05 17:20:07 +00:00
zzz
d5c70676b0 * Console:
- Fix NPE after restart (ticket #763)
   - Move more nonces out of system properties
2012-11-05 17:17:31 +00:00
zzz
202c92a42d * Unsigned Update: Fix notification on failure 2012-11-05 17:16:02 +00:00
3cb4d35cee propagate from branch 'i2p.i2p.zzz.update' (head 1ca3b931ebecd4ec80e7e135b634d085934c092b)
to branch 'i2p.i2p' (head c917793878189c29441f69133e029cfdfe3c0895)
2012-11-05 10:38:54 +00:00
3d35984cf5 Started filling out UpdaterBehaviors 2012-11-05 10:37:18 +00:00
2217d1ab95 Moved *streaming and i2ptunnel tests to match convention 2012-11-04 11:23:12 +00:00
75ddc12390 de, pt, and se updates from Transifex. Updated en po files to push to tx. 2012-11-02 19:54:49 +00:00
zzz
d48fab9d98 * I2CP:
- Better fix for logging dropped messages (ticket #758)
   - Implement fast receive to reduce per-message handshakes
   - Make messageReliability=none the default
2012-11-02 16:37:23 +00:00
zzz
d30aeb3902 * KeyManager: Eliminate races, buffer I/O, eliminate periodic syncing 2012-11-02 16:01:44 +00:00
zzz
d479c4ae7d * configstats: Fix group sorting, translate groups 2012-11-02 16:00:41 +00:00
zzz
9c220e08f8 * i2ptunnel:
- Better privkey backup file name
   - Revert increment of privkey tunnel name
   - Move deleted privkeys to backup dir
   - Fix jsp build dependencies
   - Fix layout issue on Chrome (ticket #757)
2012-11-02 15:59:51 +00:00
zzz
eee38a626d * i2psnark:
- Split buckets correctly
   - More exploration fixes
2012-11-02 15:58:26 +00:00
zzz
f29a45a2c2 * PriBlockingQueue: Enforce max size 2012-10-31 16:15:32 +00:00
zzz
a5b68d4fb0 * I2CP: Reduce log level when outbound queue is full (ticket #758) 2012-10-31 16:09:28 +00:00
zzz
8a7d119962 * FIFOBandwidthRefiller: Reduce refill interval to smooth output 2012-10-31 16:07:11 +00:00
zzz
84a0793a10 * Streaming: New disableRejectLogging option (default false), enable for snark 2012-10-31 15:56:02 +00:00
zzz
2f4eeda397 * i2ptunnel: Fix NPE in zzzot plugin 2012-10-31 15:53:57 +00:00
zzz
96ed7abdc5 javadoc, final, private, volatile 2012-10-31 15:52:12 +00:00
6a91918e6f Stubbed out Specs for net.i2p.router.update.* in routerconsole
*Behaviors.scala should really go in net.i2p.update.* in core, but ScalaTest
doesn't seem to be picking up the cross-dependency properly and just ignores
any Spec which includes them; they will move once the build.xml is fixed.
2012-10-31 00:22:15 +00:00
2c3edc0503 merge of '2b4768d9966695ad845dad4e28ef426d781e718f'
and '8489000cfeee5a6aa5a250b48bda4f6e2fb16b03'
2012-10-30 19:41:47 +00:00
f6bac8a08e redirect output to /dev/null (in case /proc/1/comm doesn't exist) 2012-10-30 19:41:35 +00:00
zzz
4ce11a174a * SSU:
- Adjust RTT/RTO calculations
   - Better bandwidth tracking
   - Cleanup of OutboundMessageState
   - Stat tweaks
 * Transports: Increase min peer port to 1024
2012-10-30 18:16:37 +00:00
zzz
d92f5e6508 merge of 'b2b4c1ba1f799d81d6d164698cb28aa9b837d390'
and 'c2b60a59c73835b51357a706da377862d8bd5ebc'
2012-10-30 15:06:38 +00:00
zzz
513821123e remove space in javascript urls 2012-10-30 13:18:54 +00:00
f56c804e86 cleanups as requested 2012-10-30 11:03:11 +00:00
fb50f7adb4 Adding two new reseed hosts. Thanks to h2ik and SWAT
* reseed.info - SWAT
* i2p.feared.eu - h2ik
2012-10-30 02:27:16 +00:00
a99bf60cea Added Mockito to ScalaTest classpath, and removed unneeded entry
Put mockito-all.jar (or a link to the actual version) in the same directory
as the ScalaTest lib files (passed in the command line as scalatest.libs).
2012-10-29 22:30:53 +00:00
zzz
40d981df25 * OutNetMessage: Properly clean up when dropped by codel (but unused for now
since codel is disabled for ONM)
 * Tunnels: Implement per-client outbound tunnel message priority (ticket #719)
 * ClientTunnelSettings cleanup
2012-10-29 22:21:50 +00:00
zzz
f5165cfae5 log tweak 2012-10-29 22:17:38 +00:00
zzz
055bae0450 * StatisticsManager: Publish stats less often 2012-10-29 22:16:29 +00:00
zzz
74e5ea6e20 * Installer: Drop news.xml and old certs 2012-10-29 22:12:30 +00:00
zzz
32f3ca0568 * logs.jsp:
- Don't display dup message if last
   - Spacing tweaks
2012-10-29 22:10:42 +00:00
zzz
fd3423fe09 * i2ptunnel:
- Create backup privkey files (ticket #752)
   - Fix NPE in Android startup
2012-10-29 22:09:55 +00:00
zzz
05d299816b * i2psnark:
- Add kbucket debugging
   - Eliminate redundant explore keys
   - Add more limits to DHT tracker
   - Delay expiration at startup
   - Only enable updates for dev builds and 1% of release builds
 * Update Manager: Warn on dup registration
2012-10-29 22:08:38 +00:00
zzz
2b80d450fa drop old fortuna build script 2012-10-29 22:06:03 +00:00
9a31115eff Classpath change in router build.xml to get routerconsole test harness to work 2012-10-29 12:14:04 +00:00
zzz
4baf3b6913 Fixups after props from:
i2p.i2p.zzz.pcap
	i2p.i2p.zzz.test
	i2p.i2p.zzz.test2
	i2p.i2p.zzz.update
Javadoc fixes
Checklist tweak
-1
2012-10-28 13:08:02 +00:00
zzz
5e48331eae propagate from branch 'i2p.i2p.zzz.update' (head 267311f29e501fcc8b3d674a93e78b5520ac985e)
to branch 'i2p.i2p' (head edeca2ab47e734c2314ff394609292d8bd3d5293)
2012-10-28 12:48:35 +00:00
zzz
5766db2c09 propagate from branch 'i2p.i2p.zzz.pcap' (head fff5fc864e5905ed77f8d60f7d0892ed5c2447b4)
to branch 'i2p.i2p' (head cc74e6e08096cc7fdb8563b2eae82df2a000ab01)
2012-10-28 12:26:52 +00:00
zzz
c4f6f48eeb propagate from branch 'i2p.i2p.zzz.test2' (head a002e8957b5bf3a44149203d6842ef4b35107aa7)
to branch 'i2p.i2p' (head 0f6e2b3b8643fe7797e8727329345c1ed4cf741b)
2012-10-28 12:24:07 +00:00
zzz
943e2d7fe7 propagate from branch 'i2p.i2p.zzz.test' (head 48448fc896d1e0859f481e98d0e80e764cc40736)
to branch 'i2p.i2p' (head aedb9b8335d6de72dd633e79716fff6ffec263a1)
2012-10-28 12:17:38 +00:00
zzz
c4fa8fabb2 - Continue work to use priorities in FIFOBandwidthLimiter
- Log tweaks
2012-10-28 12:10:24 +00:00
zzz
6868047ee4 * i2ptunnel:
- Refactor TCG to use ClientApp interface
  - Remove 'reload config' button
  - Synchronization fixes
  - Don't instantiate early, to allow router to hold
    a reference. TCG.getInstance() may now
    return null when in RouterContext.
  - Jsps display message when TCG not initialized
2012-10-27 18:51:50 +00:00
zzz
80e7ee46fb enable pw when adding one 2012-10-27 18:45:16 +00:00
zzz
61ee957add pcap:
- Buffer output
 - Separate methods for inbound and outbound, so we
   don't need to use PacketLocal for inbound
 - Cleanups after prop
 - Finals etc.
2012-10-27 18:03:54 +00:00
6e66d377f6 changelog/patch updates 2012-10-27 18:00:10 +00:00
zzz
99e759a5be propagate from branch 'i2p.i2p' (head 6e6de141ddbaddfcecf8a66ad8cf65f247f41f94)
to branch 'i2p.i2p.zzz.pcap' (head ae8977bcc33f75ee36505e739e9e4a194f5d9074)
2012-10-27 16:12:57 +00:00
zzz
eafca84717 0.9.3 2012-10-27 13:03:14 +00:00
zzz
0e2fd0c6f5 tweak 2012-10-27 12:47:07 +00:00
zzz
0ccf65fcf8 banlist 2012-10-26 16:24:31 +00:00
zzz
af06fded73 - Add password enabled property
- Bypass nonce checking if passwords enabled
  - Add message about cookies if nonce fails
  - Minor susidns cleanup
2012-10-26 13:08:23 +00:00
zzz
0bfe8ff41d * BuildHandler: Fix "too slow" rejections due to internal clock skew 2012-10-25 18:58:12 +00:00
804f0294bb Bumped router to -21 for previous commit 2012-10-25 02:51:18 +00:00
7a4430856d Tweaked default value of lastLine in susimail to make a no-response error clearer to users 2012-10-25 02:49:13 +00:00
6bd40e253a Bumped router to -20 for previous commit 2012-10-24 19:55:35 +00:00
c2d178efc3 Fixed a very stupid bug >_< 2012-10-24 19:51:54 +00:00
zzz
97da508df5 * I2PSnark:
- Fix (again) partial piece avoidance for seeds
   - Fix several partial piece (temp file) leaks,
     some uncovered by previous rarest-first fixes, some in end game
   - Don't lose all DHT peers if we stop quickly (backport from update branch)
   - Explore a kbucket if it's less than 3/4 full (backport from update branch)
2012-10-24 17:38:20 +00:00
211128f128 i2ptunnel: Truncate long client destinations (ticket #581) 2012-10-24 02:30:19 +00:00
zzz
2f69d16828 - Thread magnet start if not connected
- Don't lose all DHT peers if we stop quickly
- Explore a kbucket if it's less than 3/4 full
- Change release torrent file names
2012-10-23 19:34:35 +00:00
zzz
bb2363f68a - Fix DummyHandler
- Notes on news.xml enhancements
- Fix handling existing torrent
- Add dn to magnet link generation
- Fix progress info
2012-10-23 14:09:14 +00:00
fc461931bd Adding a new reseed host. 2012-10-23 14:08:12 +00:00
zzz
724f4f9b37 - Several plugin install fixes
- Remove unused UpdateTypes
- Only try applicable updaters when updating
- Javadoc fixes
2012-10-23 02:34:24 +00:00
zzz
6f790d99c9 exit 1 on failure 2012-10-22 22:56:40 +00:00
zzz
efb986ffd9 - Handle case where we already have torrent
- New Storage.main() for use in the release process
- Make torrent files in release process
- Stop tunnel after fatal if no snarks are running
2012-10-22 22:55:36 +00:00
zzz
bd9ad9982b - Fix spacing in summary bar
- Add start() in UpdateTask so things happen in the right order
- Add toString() in UpdateTask for better debugging
- Fix getID() for plugin UpdateTasks
2012-10-22 20:25:01 +00:00
e5a8a6aba4 merge of '7ca37d4f5e443834de23ebd2cf306b6fe3aeca87'
and 'f9d82ac84936c56dc92691842757e8cc354511e2'
2012-10-22 20:24:53 +00:00
da835fbd6b h2ik don't have static ip anymore. 2012-10-22 19:52:21 +00:00
zzz
1538e6ec4e - Fix VersionComparator (thx zab)
- Add debug output
2012-10-22 17:13:23 +00:00
zzz
95e0c37222 - Add fail timers
- Add progress indication
- Listener cleanup
2012-10-22 14:51:41 +00:00
zzz
95870df45b * Watchdog: Don't dump threads too often (ticket #519) 2012-10-21 17:21:49 +00:00
zzz
8b2889e317 - Only fail after all URLs are tried
- Move registration from servlet to manager and delay
- Fix plugin updates
- More logging
2012-10-21 17:14:54 +00:00
zzz
0fc452b683 - Improved parsing of news file
- Add magnet links to news file
2012-10-21 14:59:52 +00:00
zzz
6e19854e4c - NPE fix on signed udpates
- More work on snark updater
- Clean up imports
2012-10-21 13:34:23 +00:00
zzz
6331cb2374 stub of a torrent updater 2012-10-21 03:13:31 +00:00
zzz
983537b0fd refactor CompleteListener out of Snark.java 2012-10-21 02:34:46 +00:00
zzz
58fd2dddf8 refactor magnet parsing out of servlet 2012-10-21 02:08:34 +00:00
zzz
49b2fbd2b0 tweak 2012-10-20 22:52:11 +00:00
zzz
68814e31e7 * Console:
- Store form handler nonces in the servlet session instead of system properties,
    to prevent cross-session interference
2012-10-20 21:28:17 +00:00
zzz
429739837b * Console:
- Consolidate all the jsp formhandler boilerplate in the new
    formhandler.jsi, in preparation for further improvements
2012-10-20 20:52:45 +00:00
zzz
fef1440865 * Transport:
- Add a simple network monitor
  - Add new reachability state for network disconnected
  - Prevent any tunnel building when disconnected (ticket #519)
  - Don't unleash watchdog when disconnected
2012-10-20 17:28:00 +00:00
zzz
afd29715fa * Addresses:
- Add methods for connectivity detection
  - Remove Hamachi restriction
2012-10-20 15:30:12 +00:00
zzz
e329742c8d * Transport: Back out CoDel for SSU PeerState and NTCP 2012-10-20 11:37:31 +00:00
zzz
5695d0e94a build fix 2012-10-20 03:38:54 +00:00
zzz
5a964dacbb * UDP: Fix peer test NPE (ticket # 748) 2012-10-19 22:03:41 +00:00
zzz
fea3bb63c1 - Save available unsigned version across restarts
- Fix status display after downloaded
- Don't display update buttons unless HTTP proxy is up
- Pass the manager down thru the constructors
2012-10-19 20:26:08 +00:00
580c940d42 More pt trans updates from tx 2012-10-19 07:49:36 +00:00
7ea8cd4a09 Geoip update 2012-10-18 22:37:50 +00:00
zzz
4f936f958d add the other getProperty(); more tweaks 2012-10-18 21:07:36 +00:00
a6ca962fcb Portuguese and Spanish updates from Transifex 2012-10-18 15:19:13 +00:00
zzz
0b4401e64b - Lots of fixes for notifying when updates and checks are complete
- Fixes for NewsHelper stored timestamps
- Add getProperty(String, long) to context for sanity
- New methods and types
- Logging improvements
- Add failsafe TaskCleaner
2012-10-18 14:28:14 +00:00
zzz
2b50c5aaf4 comment out test code 2012-10-18 14:26:30 +00:00
zzz
da4ea77c2a more fixes 2012-10-18 02:20:39 +00:00
zzz
af4786ce0e fixes 2012-10-18 01:29:14 +00:00
zzz
f9b8f0528d - Straighten out some confusion on versions, RFC 822 dates,
etc. on news and unsigned updates. Stored versions are always
  Long.toString(modtime). Only convert to RFC 822 for eepget or display.
2012-10-17 23:45:44 +00:00
zzz
b9d717b9f9 - Split up Updater and Checker interfaces
- Update router after check
2012-10-17 22:24:15 +00:00
zzz
cbc9165afd - Add a jetty starter that can be stopped later
- Include jetty-i2p.jar in the updaters
2012-10-17 17:37:45 +00:00
zzz
a9e18620b9 - Convert HTTP and CONNECT proxies to MD5 authentication
- Allow multiple users
  - Migrate passwords on first save
2012-10-16 19:17:06 +00:00
zzz
613dd77d2c only display tracker error if no peers 2012-10-15 21:30:46 +00:00
zzz
9b6d5daeef more work on proxy digest auth 2012-10-15 21:04:49 +00:00
b816ecc7e3 Italian and Swedish updates from Transifex 2012-10-15 18:05:38 +00:00
zzz
d01aae7860 HTTP Proxy:
- Move error page methods to base
 - Preliminary code for digest auth
2012-10-15 15:37:13 +00:00
zzz
50cb427377 split out md5Sum for use in i2ptunnel 2012-10-15 13:57:09 +00:00
zzz
977cdee046 - Move MD5 functions to core util where i2ptunnel can use them 2012-10-15 12:28:45 +00:00
zzz
4db4010abf propagate from branch 'i2p.i2p' (head 2da3b585b42d058e25909bc303d72277ae2463b5)
to branch 'i2p.i2p.zzz.update' (head ebbad994215dc2822e9a1776399864ed77a0e5a0)
2012-10-14 22:42:00 +00:00
zzz
ba37839adf fixes while rechecking storage 2012-10-14 20:05:04 +00:00
zzz
c9196fda03 compile fixes after prop 2012-10-14 20:03:56 +00:00
zzz
b03b4745db propagate from branch 'i2p.i2p' (head 2da3b585b42d058e25909bc303d72277ae2463b5)
to branch 'i2p.i2p.zzz.test' (head 2785f3832a7d1b8adb2f106d049949beb9b88838)
2012-10-14 19:50:51 +00:00
zzz
8df2a2d00a * i2psnark: Fix request tracking bug preventing piece requests 2012-10-14 16:38:36 +00:00
zzz
184220f4c5 minor optimization 2012-10-14 13:54:38 +00:00
zzz
5d6d27907d * Console: Use non-nio connector for Java 5 and JamVM/gij
(tickets #715 and #743)
 * SystemVersion: Centralize more methods here
2012-10-14 13:54:08 +00:00
zzz
5e5dc35a1e moved i2cp password to PasswordManager 2012-10-13 22:42:26 +00:00
zzz
24b7b6fabd - Don't migrate any plaintext passwords to obfuscated, it's too messy 2012-10-13 21:42:52 +00:00
zzz
c5ab6b9993 * Passwords:
- Add remove method
    - Add console password form to configui.jsp
    - Consolidate multiple setSettings()/getJettyString() in FormHandler
    - Some form message tweaks
2012-10-13 21:20:16 +00:00
zzz
05740f7903 - Fix MD5 passwords after testing
- Remove unused password fallback in FormHandler
2012-10-13 15:41:57 +00:00
zzz
fc7f995bd2 propagate from branch 'i2p.i2p' (head 2ab4ae45aa60b379e85fca378522966c090a1a27)
to branch 'i2p.i2p.zzz.test' (head 220477e37d4df782b9a8bb30d12669d146dc6226)
2012-10-13 14:23:29 +00:00
zzz
d99a39e5d5 convert to ClientApp interface. Untested. 2012-10-13 13:54:30 +00:00
zzz
0b897fdc98 * RouterConsoleRunner:
- Prep for ClientApp interface by storing context in a field,
      shuffle around what's static and what's not
      (ticket #347)
    - Remove ports from port mapper on shutdown, other changes to
      track actual ports better
      (ticket #731)
    - Hook in password manager using MD5, untested.
      (ticket #731)
2012-10-13 13:06:22 +00:00
zzz
a475a912e6 * New password manager for storing passwords in router.config
in consitent ways, including salting and hashing if possible.
    Not hooked in to console yet, lightly tested.
    (ticket #731)
2012-10-13 12:56:43 +00:00
zzz
8f17b73091 changes due to LoadClientAppsJob changes for ClientApp interface 2012-10-13 12:51:24 +00:00
cb56b76ef9 i2prouter: check /proc/1/comm for systemd (thanks k0e) 2012-10-13 12:45:25 +00:00
zzz
d198ae9ef1 * New interface for clients started via clients.config, and a new
manager to track the lifecycle and start/stop clients on demand.
    Not hooked in to console yet, untested.
    (ticket #347)
2012-10-13 12:45:08 +00:00
eff238e85c i2prouter: In Slackware, check for existence of /etc/rc.d/rc.i2p when installing as a daemon 2012-10-12 17:26:03 +00:00
a436e60fb8 Italian translation updates / updated EN po files 2012-10-12 00:52:09 +00:00
2c570f8d4e remove internel I2P link
Let's not direct people to see how to configure their browser at
http://www.i2p2.i2p/htproxyports when you need to have your proxy configured to go there!
2012-10-11 22:48:06 +00:00
6f23bdd331 remove another link to forum.i2p2.de 2012-10-11 22:43:51 +00:00
b797f9e26d remove link to forum.i2p2.de 2012-10-11 22:42:03 +00:00
2b13973eca debian: refresh patches 2012-10-10 23:32:27 +00:00
9331b229fe addressing a few concerns from #681 2012-10-10 23:32:04 +00:00
ccd0795a4e turn off executable bit 2012-10-10 23:31:07 +00:00
1f98493dbd i2prouter: add initscript support to Slackware 2012-10-10 22:44:42 +00:00
f20d906b67 i2prouter: Add systemd support for Arch Linux and SuSE Linux. 2012-10-10 21:33:05 +00:00
zzz
65757dee1c * ShellCommand: Fix launching all browsers at startup (ticket #453) 2012-10-10 19:12:30 +00:00
zzz
b259a3ac3d * stats.jsp: Sort groups by translated name 2012-10-10 19:11:18 +00:00
zzz
ca1f816ad9 remove colombo 2012-10-10 15:06:51 +00:00
zzz
6f509967bf Making FIFOBandwithLimiter.Request unidirectional, static,
remove logging, other cleanups (ticket #719)
2012-10-09 14:15:04 +00:00
zzz
56574c41be propagate from branch 'i2p.i2p' (head cbca70618d2083a5fcdead2390e9d30060080e74)
to branch 'i2p.i2p.zzz.test' (head 1affab2e83613f326d269370de6e5aed40ecae52)
2012-10-09 13:36:32 +00:00
zzz
3cdfc2d33a Split up NTCPConnection's single _bwRequests Set into inbound and outbound,
in prep for making FIFOBandwithLimiter.Request unidirectional
and support priorities (ticket #719)
2012-10-09 13:36:14 +00:00
zzz
1b154551a2 EventLog: add more events 2012-10-09 10:35:47 +00:00
zzz
c419016a12 * SSU:
- Add peer test throttling
   - Peer test packet count fixes
   - Adjust peer test timeouts and add backoff
   - Reject relays and peer tests from same /16
   - More peer test cleanup and log tweaks
 * Transports:
   - Enforce minimum peer port
   - Warn on low router ports
2012-10-09 10:20:45 +00:00
zzz
f10478ceef comment out test 2012-10-09 10:16:05 +00:00
zzz
d477773054 * NetDB: Increase floodfills again 2012-10-09 10:15:44 +00:00
zzz
8ed280ebf4 * RouterInfo: Exit 1 on error in main() 2012-10-09 10:14:56 +00:00
zzz
762e96b8a6 2 more for cache 2012-10-09 10:13:59 +00:00
zzz
23c77fbe4b * Console, i2ptunnel: Warn on low ports 2012-10-09 10:13:10 +00:00
zzz
e99dd72cb6 * SSU:
- Fix relay request handling bug from -10
   - Fix peer test reply handling bug from -10
   - Fix NPE from -6
2012-10-08 09:32:04 +00:00
zzz
b095b7e769 * i2ptunnel:
- Set default read timeout in standard server
   - Reduce header timeout, enforce total header timeout
     in IRC and HTTP servers (ticket #723)
 * Streaming: Don't ignore option or force connect timeout to 5 minutes
 * Streaming javadocs
 * SocketTimeout cleanup
2012-10-07 20:57:35 +00:00
zzz
6b97e1bfaf * Logs:
- Flush buffers in logs.jsp
   - Add dup message to buffers, was in file only
2012-10-07 20:50:26 +00:00
zzz
3ceb83d40e * I2PAppContext: Improved synching in constructor 2012-10-07 20:48:25 +00:00
zzz
d80340f0ae * UPnP: Workaround NPE (ticket #728)
root cause TBD
2012-10-07 20:47:22 +00:00
zzz
3acc2fb160 - Much improved peer test defenses
- Minor improvements to relay defenses
2012-10-06 22:47:17 +00:00
zzz
034db1a282 Validate port/IP in received peer tests 2012-10-06 14:58:42 +00:00
zzz
b07b9bf0b9 * SSU:
- Throttle outbound destroys on shutdown
   - Limit outbound introduction offers
2012-10-06 13:44:57 +00:00
zzz
97460e7d99 * configlogging.jsp: Fix IAE
* error500.jsp: Fix whitespace
2012-10-06 13:42:48 +00:00
zzz
ddc750469c * i2psnark:
- Add allocating and checking indications
   - Add bandwidth message at startup
   - More checks at torrent creation
2012-10-06 13:41:50 +00:00
zzz
0448537509 make inbound and exploratory settings final 2012-10-05 13:38:27 +00:00
zzz
583463ab42 * configservice.jsp: Add GC button 2012-10-05 13:09:34 +00:00
zzz
b20e298f6e * SSU:
- More synchronization fixes
   - Reduce chance of dup acks in a single message
   - Reduce max unsent acks to 50
   - Use last ack time in ping decision too
   - Reduce ack delay
2012-10-05 13:08:05 +00:00
zzz
090d59fcb7 * DataHelper: Sanity checks in storeProps(), use
storeProps() for router config again
2012-10-05 13:00:52 +00:00
zzz
1d174d6797 * TunnelPoolManager: Fix early NPE (ticket #724) 2012-10-05 12:59:30 +00:00
zzz
15a47b5612 import 2012-10-03 19:17:55 +00:00
zzz
4d1ea6e4cd * SSU:
- Increase max outbound establishments based on bandwidth
   - Synchronization fix for Java 5
   - Use multiple buffer sizes in OutboundMessageState to
     reduce memory usage
   - Adjust skew calculation, synchronize too
   - Ping loop improvements
2012-10-03 19:05:56 +00:00
zzz
13ef00cb2e add hasWrapper() 2012-10-03 17:41:33 +00:00
zzz
d2c1641569 * NTCP: Reduce conLock contention 2012-10-03 17:40:59 +00:00
zzz
a1873e74e5 cleanup 2012-10-03 17:40:31 +00:00
8be86fe80c debian: rework oom patch 2012-10-02 19:26:04 +00:00
zzz
4dc90ef5da * SSU:
- Fix memory leak in _peersByRemoteHost map caused by not
     removing peers that change IP or port
   - Send keepalives if firewalled
   - Handle peers that change ports on an established session
   - Synchronize adds and drops
   - Don't use peers with high RTTs in clock skew calculation
   - Reduce initial RTT/RTO
2012-10-02 18:36:06 +00:00
zzz
e130264254 * NTCP: Only set keepalive if firewalled 2012-10-02 12:41:31 +00:00
zzz
93039a6813 * OOMListener: Dump threads on OOM 2012-10-02 12:40:00 +00:00
zzz
07b3c8a7b4 * PRNG, LogWriter: Use I2PThread to catch OOM 2012-10-02 12:38:05 +00:00
zzz
83fe635438 * i2ptunnel: Fix log message 2012-10-02 12:37:16 +00:00
zzz
3ee96fb663 * i2psnark: Fix delete download message 2012-10-02 12:36:34 +00:00
zzz
6684ba1b1d * I2CP: Delay after sending disconnect message to
help it get through
2012-10-02 12:35:45 +00:00
zzz
466778875d * SimpleByteCache: Fix ABQ/LBQ selection 2012-10-02 12:34:29 +00:00
zzz
a71e8fae00 * i2psnark:
- Fix bugs in rarest-first tracking
   - Fix requesting of partial piece when there are multiple seeds
   - Synch fix in BitField
2012-09-28 19:25:31 +00:00
zzz
f58bf3028a javadoc 2012-09-28 19:08:00 +00:00
zzz
595556c39f * SessionKeyManager: Store original tagset size for debugging 2012-09-28 19:06:39 +00:00
zzz
eeaa4fbbb4 * peers.jsp: Remove SSU "Dev" column 2012-09-28 18:48:58 +00:00
zzz
49b11e1f84 * Streaming: Don't send RST on globally-blackisted conns 2012-09-28 18:48:16 +00:00
zzz
e3133d88d7 javadoc 2012-09-28 18:42:17 +00:00
zzz
1a50b6243d volatile 2012-09-28 18:41:19 +00:00
zzz
076558d4f5 * i2ptunnel: Fix wrong server IP in log message 2012-09-28 18:40:49 +00:00
zzz
fb5d0cd760 Boolean.valueOf(x).booleanValue() -> Boolean.parseBoolean(x) 2012-09-28 17:50:41 +00:00
zzz
7c8ba61f03 fix date 2012-09-26 20:03:10 +00:00
zzz
20e463e41b * Streaming:
- Implement changing connection limits on a running session
   - Implement global blacklist
2012-09-26 20:02:36 +00:00
zzz
5d3984e353 * Addresses: Reject numeric IPs of the form n, n.n, and n.n.n
* Console, i2ptunnel: More validation of address and port in forms
2012-09-26 20:00:59 +00:00
zzz
941aea80bb javadoc 2012-09-26 19:58:19 +00:00
zzz
0533aa7f6f * RFC822Date: Synchronization fix 2012-09-26 19:58:08 +00:00
zzz
568e2d5063 tweak to port field CSS 2012-09-26 19:57:37 +00:00
zzz
86c7aa8b8a * i2psnark: Enable DHT by default 2012-09-26 19:57:01 +00:00
zzz
f61e7a193f * ConvertToHash:
- Add support for b64hash.i2p (output in jetty logs)
   - Cleanup and use cache
2012-09-26 19:56:33 +00:00
567dae8ced merge of '6ccace0742effd1eaadcc151f428825fa3215e12'
and 'dc06981e777b7e1c191937d6d8190b26a8f6bbc7'
2012-09-25 22:26:47 +00:00
02f483a873 Modified susimail footer so <hr> is hidden as well 2012-09-25 21:57:22 +00:00
zzz
7051e1c5f6 * UPnP: Cleanup & final 2012-09-25 19:30:49 +00:00
zzz
87295b4bfd * URLLauncher: Add xdg-open (ticket #617); minor refactor 2012-09-25 19:25:01 +00:00
zzz
23ca6b4fac * SimpleByteCache: Concurrent fix 2012-09-25 19:24:11 +00:00
zzz
9e3559625c * OutboundEstablishState: Cleanup (ticket #671) 2012-09-25 19:22:36 +00:00
zzz
351d582c8f * Jetty: Add non-NIO selector option (ticket #715) 2012-09-25 19:21:28 +00:00
zzz
5b1ea6187f * EventLog: Fix IAE on portable 2012-09-25 19:20:15 +00:00
zzz
211782fae4 * Context: Make files final 2012-09-25 19:19:27 +00:00
zzz
20279d1597 propagate from branch 'i2p.i2p' (head 52d5a19210a344e0de43f6fe4d898d34f6c41829)
to branch 'i2p.i2p.zzz.update' (head d88c6abf9b4988ba892e435594cd74917ab9ab7f)
2012-09-25 15:04:49 +00:00
44466aa769 Modified susidns footer so <hr> is hidden as well 2012-09-24 22:17:05 +00:00
d27d014eb0 Show susi footer on susimail and susidns when displayed standalone
Footer hidden when embedded because of margin issues, and out-of-place-ness.
Have confirmed that susi's opinion when the themes were initially updated was
"do what you want", so no legal problem.
2012-09-22 23:47:57 +00:00
zzz
e884ca54ef -1 2012-09-21 17:54:46 +00:00
zzz
336420cf50 propagate from branch 'i2p.i2p.zzz.test' (head 5dadb7923797a3e6d9ead4d4b17ab7e0e0201b2b)
to branch 'i2p.i2p' (head 703251aaf19111efe6fac5a4ae49f00a1aac1e9e)
2012-09-21 17:50:59 +00:00
zzz
f16e83f21b 0.9.2 2012-09-21 14:24:53 +00:00
zzz
0eedc3aa19 intern strings 2012-09-19 20:47:50 +00:00
zzz
f232775161 CoDel for build handler 2012-09-19 19:00:06 +00:00
zzz
bd57463d42 fix NTCP backlogged indication 2012-09-18 12:37:30 +00:00
zzz
2c4910e9e7 * ByteCache, ByteArray:
- Cleanups and javadocs
    - Prevent release of a wrong-sized array
2012-09-17 21:57:16 +00:00
zzz
2b14d32bea use ByteCache for chunks in/out 2012-09-17 21:32:05 +00:00
ee66747def Fix after review and install on fresh osx (lession learned: test clean installs) 2012-09-17 20:33:03 +00:00
zzz
259c28f8c1 startup/shutdown synchronization in several places 2012-09-16 15:47:36 +00:00
zzz
b6a5360390 log/stat tweaks 2012-09-16 15:46:36 +00:00
zzz
0b7b947786 increase flush interval 2012-09-16 15:43:36 +00:00
zzz
147e257cee comment out main() 2012-09-16 15:43:06 +00:00
zzz
ccb8483766 * Build: Fix unpack problem on Java 5: http://forum.i2p/viewtopic.php?t=7334 2012-09-15 13:12:00 +00:00
zzz
68ccb3a944 cleanup 2012-09-14 13:53:36 +00:00
zzz
b317eca5e3 * SSU: Fix shutdown NPE (ticket #709) 2012-09-14 13:50:06 +00:00
zzz
5ffacccdd7 update geoip license 2012-09-14 13:49:32 +00:00
zzz
a41936af94 typo 2012-09-14 13:49:09 +00:00
0991adc291 GeoIPdb update based on Maxmind GeoLite Country database from 2012-09-05 2012-09-13 16:15:09 +00:00
zzz
b9aceb895d * SSU:
- Increase initial and max RTO
    - Don't count ack-only packets in bandwidth allocation
    - Unused method cleanup
2012-09-12 21:55:15 +00:00
zzz
8633ef9513 * Streaming: Don't send a RST to an hour/day limited peer,
or blacklisted, or non-whitelisted, to not waste outbound bandwidth
2012-09-12 21:52:12 +00:00
7820cef60a Czech language translation updates from transifex
(and updated en po files)
2012-09-12 12:04:43 +00:00
zzz
4666454482 improve dup log message 2012-09-11 19:50:59 +00:00
zzz
db42d9ec37 * FortunaRandomSource:
- Fix bug that wasted entropy in nextInt()
    - Improved synchronization
2012-09-11 19:40:20 +00:00
zzz
d7b48a2256 change what we call imminent so we dont display ms 2012-09-10 22:40:21 +00:00
zzz
50ec279917 use partial match for dups; add config for dups 2012-09-10 22:38:18 +00:00
zzz
e8a8f3c210 * TunnelGateway: Implement pushback from a backlogged transport
queue to the pre-fragmentation queue
2012-09-10 21:30:54 +00:00
zzz
e0fc642fc3 reduce _jobLock contention 2012-09-10 17:27:18 +00:00
zzz
835ed6d9bb boost priority of shutdown thread 2012-09-10 17:25:00 +00:00
zzz
3781928693 logging cleanups 2012-09-10 17:22:51 +00:00
cb39006f6c minor corrections after review
The newly added OSX bits by meeh (thanks!) do not require Izpack to perform
substitutions, so I'm removing those files from the <parseable> tags.
2012-09-10 10:51:17 +00:00
52447096f2 Added a fix for a startup issue in newer versions of launchd. Setting Disabled
in configfile will only work on older launchd version. Ref manpage:
  (-w Overrides the Disabled key and sets it to false. In previous ver-
      sions, this option would modify the configuration file. Now the
      state of the Disabled key is stored elsewhere on-disk.)
2012-09-10 03:14:09 +00:00
zzz
2f98d05e7c * Clock: Synchronization, log large shifts to event log 2012-09-09 15:45:29 +00:00
zzz
74e753934c * SystemVersion: New util, to consolidate duplicate code,
and determine Java version on Android
2012-09-09 15:40:14 +00:00
zzz
9bc54f27cf * ClientManager:
- Concurrent client map for faster lookup
    - Add by-hash client map for faster lookup by hash
    - More cleanups
2012-09-08 21:56:05 +00:00
zzz
d9e6c06b22 * I2CP: Buffer output streams
* ClientConnectionRunner: More cleanups and edge cases
2012-09-08 20:45:11 +00:00
zzz
e02d82981a - Run HandleJob inline for speed
- Remove payload from message map if availability announce fails
- Cleanups
2012-09-08 15:10:27 +00:00
zzz
98da06cd83 limit queue size, make nonblocking 2012-09-08 14:25:04 +00:00
zzz
0d62266008 * ClientConnectionRunner: Run MessageReceivedJob inline for speed 2012-09-08 14:04:01 +00:00
zzz
1ae0c2e312 add -test 2012-09-08 13:15:58 +00:00
zzz
61629080b2 propagate from branch 'i2p.i2p' (head 86f3e7e668b7ec9f2ddf75be7586719944bbc37f)
to branch 'i2p.i2p.zzz.test' (head da9536c250bc4c0b7523ed748574de1cc97f3028)
2012-09-08 12:57:09 +00:00
zzz
4cf104720c * PumpedTunnelGateway:
- Move OBGW queue to CoDelPriority
    - Move IBGW queue to CoDel
    - Reduce max pumped per cycle for IBGW
2012-09-08 12:47:17 +00:00
zzz
2c866e205b * NTCP: Move NTCPConnection outbound queue to CoDelPriority
* SSU:
    - Separate PeerState outbound message list into a queue for unsent messages
      and a list for sent messages awaiting ack
    - Implement PeerState outbound queue as CoDelPriority
    - Implement backlogged indication like in NTCP
2012-09-08 12:40:27 +00:00
zzz
ca91ad3188 * SSU: Move MessageReceiver queue to CoDel 2012-09-08 12:34:34 +00:00
zzz
33de6beab3 * SSU: Move UDPSender and UDPReceiver queues to CoDel 2012-09-08 12:29:55 +00:00
zzz
871f046755 adjust target and interval, and backlogged indication 2012-09-08 12:23:43 +00:00
zzz
aef021dcd1 * I2CP: Limit router/client queue sizes and queue wait times 2012-09-07 22:49:24 +00:00
zzz
489f43529c booleanValue() -> parseBoolean() 2012-09-07 20:13:49 +00:00
zzz
78203aac9a * i2psnark:
- Implement blacklist for unreachable DHT peers
    - Reduce threshold for unreachable
    - Log tweaks
2012-09-07 20:10:01 +00:00
zzz
3c95f0b66b * LogWriter: Duplicate log message removal 2012-09-07 18:53:24 +00:00
zzz
3347788712 add isBacklogged() 2012-09-06 19:53:01 +00:00
zzz
0c5b4c05c6 minor cleanups 2012-09-06 19:25:31 +00:00
5056706742 Added command scripts for osx to install i2p as a daemon in launchd.
.command extension make it possible to double click on it like bat files
in windows. Daemon is runned as the user who executes the command file.
2012-09-05 21:36:24 +00:00
zzz
b8949eafe2 Non-codel version of priority blocking queue, so we can
implement priority queues without necessarily committing to codel.
2012-09-05 15:50:11 +00:00
zzz
9286d6a7b8 * IP Lookup:
- Add caching in RouterAddress with secondary caching
      in Addresses; use caches to speed up transport bids,
      blocklist checks, geoip lookups, and profile organizer checks
      (ticket #707)
    - Limit IP cache size in TransportImpl
    - Clear caches at shutdown
  * RouterAddress: Remove unused expiration field to save space
2012-09-04 20:33:04 +00:00
zzz
9fd2f1e6a7 SSU: Fix some issues with queueing outbound establishments 2012-09-04 13:51:55 +00:00
zzz
b98474880d OutNetMessage: Speedup after profiling (ticket #707 - thx dg, kytv, zab) 2012-09-04 13:50:24 +00:00
zzz
5347d296dc log tweak 2012-09-04 13:46:52 +00:00
zzz
666a387d1b log fix 2012-09-04 13:46:31 +00:00
zzz
bb66e16b69 I2PTunnelServer: Clean shutdown after session exception 2012-09-04 13:46:10 +00:00
zzz
2cddf1405f log tweaks 2012-09-04 00:27:04 +00:00
zzz
8575437626 * LHMCache: New util, replacing several private versions 2012-09-03 15:33:12 +00:00
zzz
c965a3dca0 add drainAllTo() 2012-09-02 14:41:21 +00:00
zzz
c48aca8d5c ByteCache: Move all 16/32 byte users to SimpleByteCache;
increase SimpleByteCache default size.
2012-09-02 12:31:08 +00:00
zzz
4360284355 stat and log tweaks 2012-09-02 00:45:58 +00:00
zzz
f44eeaf7dd TunnelGateway: Refactor TunnelGateway.Pending to its own file PendingGatewayMesasge 2012-09-01 21:39:14 +00:00
zzz
a0418bec59 OutNetMessage:
- Centralize priority definitions
  - Raise netdb store and reply priority
GarlicMessage:
  - Add notes about GarlicMessageHandler and HandleGarlicMessageJob
    being unused in practice
2012-09-01 20:47:22 +00:00
zzz
5eff26e40e add minimum priority check 2012-09-01 20:17:37 +00:00
zzz
4e78517651 TunnelGateway:
- Limit queue sizes
  - Add stat for overflow
  - Remove some stats
  - Change pumper to LinkedHashSet for efficiency
    (like NTCP Reader/Writer)
  - Limit messages pumped per cycle to increase
    round-robin fairness
  - Comment out some unused code
  - Javadoc
2012-09-01 17:20:52 +00:00
zzz
10d9eb70c8 CoDel:
- Add logging of drops
  - Set drop stat to delay of dropped item
  - Add no-drop priority
2012-09-01 16:30:12 +00:00
0ba3aad666 Disable i2jump.i2p from the tunnel wizard since it's been disabled elsewhere 2012-09-01 15:02:38 +00:00
zzz
8bfbe855a1 one last SimpleTimer 2012-09-01 13:40:38 +00:00
zzz
3fbf60ee21 Codel:
- Override poll() and drainTo()
  - Tweak stats
  - Add PriorityBlockingQueue version
2012-09-01 13:21:25 +00:00
zzz
6bfd916fef SimpleTimer (ticket #653):
- Move all remaining uses to SimpleTimer2
    - Deprecate
2012-09-01 13:14:15 +00:00
zzz
a5e4b15349 add irc.killyourtv.i2p 2012-08-31 14:47:14 +00:00
zzz
94f370e76c propagate from branch 'i2p.i2p' (head 871765966dc474b763ff0d5c017bed7535981c1e)
to branch 'i2p.i2p.zzz.test' (head 096242c22aa550274cb383a6a0c984cef07ae08c)
2012-08-31 14:41:18 +00:00
zzz
7cc353ab04 javadoc 2012-08-31 14:36:53 +00:00
zzz
506626d6b1 i2psnark: Remove * from magnet and download names 2012-08-31 13:58:37 +00:00
zzz
26898f38ad Startup: Don't complain about clients.config missing on Android 2012-08-31 13:57:24 +00:00
zzz
4fdff1bf13 Router: Lengthen shutdown spinner life 2012-08-31 13:56:24 +00:00
7d4a6e74d2 Report no bugs in Android BitSet 2012-08-31 03:53:19 +00:00
b33a01cf26 use index instead of upper and lower, it's the same thing, but makes more sense. 2012-08-31 02:37:15 +00:00
zzz
0689b03603 - Prevent crashes at update caused by event log starting timestamper thread 2012-08-30 15:29:35 +00:00
zzz
ee8cd29da9 New AQM blocking queue using CoDel reference implementation - untested. 2012-08-30 14:20:37 +00:00
zzz
c4a3159b33 Replace ident log with new, general-purpose event log.
Use for stops, starts, and updates, and others.
Mark all restarts on graphs using the event log.
2012-08-30 14:06:06 +00:00
a4511ca2ab typo fix 2012-08-29 19:17:40 +00:00
zzz
17b4ab6151 message cleanup 2012-08-29 14:16:19 +00:00
zzz
d2a7af2884 refactor trimmers to their own files 2012-08-29 14:05:02 +00:00
zzz
d05f1ca2c8 RandomIterator: Workaround for Android bug (ticket #703)
Include test case
2012-08-29 13:59:44 +00:00
zzz
832d66bfb9 NTCP: Reduce lock contention (ticket #697) 2012-08-29 13:47:05 +00:00
zzz
c8a46dac5d i2psnark:
- Add new flood-resistant KBucket trim policy
   - Limit received MsgID size
2012-08-29 13:45:29 +00:00
zzz
7005376061 - Fix NPE on destroy() if init() failed 2012-08-29 13:29:13 +00:00
zzz
ab213f45e2 cleanups 2012-08-29 13:28:03 +00:00
zzz
fa504ae8a3 - Fix cases where we weren't using the session for b32 lookup 2012-08-27 21:36:39 +00:00
zzz
d305eb6a9c * SSU:
- Limit UDPSender queue size
   - Increase UDPSender max packet lifetime
   - Clear UDPSender queue before sending destroys to all
   - Increase PeerState queue size so large streaming windows
     don't get dropped right away, especially at slow start
   - Various improvements on iterating over pending outbound
     messages in PeerState
2012-08-27 20:39:00 +00:00
zzz
f8bc6f8612 * Streaming: Limit amount of slow-start exponential growth 2012-08-27 20:36:24 +00:00
zzz
9099937119 * Reseed: Remove forum.i2p2.de 2012-08-27 20:35:02 +00:00
zzz
b827468e2f * i2psnark: Notify threads awaiting DHT replies at shutdown 2012-08-27 20:34:19 +00:00
zzz
587795552e Wrapper files for armv7.
Compiled on trimslice:
    gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) 
    java version "1.6.0_18"
    OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0ubuntu1~11.04.1)
    OpenJDK Zero VM (build 14.0-b16, mixed mode)
    Wrapper 3.5.15 GPLv2
    All binaries stripped.
2012-08-27 17:43:04 +00:00
0a1ff9b6bd Update Java Service Wrapper to v3.5.15.
- Windows: Self-compiled with VS2010 in Windows 7. The icon has been
   changed from Tanuki's default to Itoopie.
 - FreeBSD: Self-compiled in FreeBSD 7.4 to eliminate the dependency on the
   compat6x port.
 - Linux ARMv5 & PPC32: Self-compiled in Debian Squeeze
 - Linux x86, Linux x64, MacOSX & Solaris: Binares are from the "community
   edition" deltapack offered by Tanuki. The x86 and x64 binaries for Linux
   have been stripped.
2012-08-27 13:49:18 +00:00
zzz
b01cf32321 * SendMessageOptions: Increase tag fields to 4 bits and use
table lookup for more flexibility
 * Streaming: Use packet type and current window size to adjust
              number of tags sent and tag threshold, to improve
              efficiency and reliability
2012-08-26 13:02:11 +00:00
zzz
9ba6c293ed * DataHelper: Trim trailing whitespace when loading properties 2012-08-26 12:54:49 +00:00
zzz
99681e1d1e * NetDB: Increase floodfills, decrease flood redundancy 2012-08-26 12:47:31 +00:00
96775acf5a Dutch and German translation updates from TX 2012-08-25 19:43:25 +00:00
ba992067ad typo fixes (ticket #701), thanks vz 2012-08-25 19:05:45 +00:00
zzz
2552d99308 * Other object churn cleanups (ticket #699) 2012-08-25 14:48:39 +00:00
zzz
e99e25b3b9 minor cleanup 2012-08-25 14:45:31 +00:00
zzz
70820d7be6 * SDSCache: Reduce min and increase max size
* SimpleByteCache: Change from LBQ to ABQ to reduce object churn
2012-08-25 14:44:52 +00:00
zzz
38fda46d44 javadoc 2012-08-25 14:42:04 +00:00
zzz
9d383d6aef * i2psnark:
- Use extended I2CP options for datagrams
   - Fix timeout for sent datagrams
   - Reduce token timeout
   - Check token age before use
   - Limit incoming token size
2012-08-24 22:13:08 +00:00
zzz
ba0408a741 * I2CP:
- Add methods for sending a message with extended options
   - Fix cases where the efficient sendNoEffort() wasn't being used
 * OCMOSJ:
   - Implement per-message overrides for tag threshold,
     tags to send, and bundle leaseset
   - Fix bug adjusting timeouts
   - Warn on client expiration time bugs
2012-08-24 22:11:02 +00:00
zzz
07c21c3bfd - Add link for local torrent file on details page
- Show totals line even if only one torrent
2012-08-24 22:07:00 +00:00
zzz
5ffefd2a19 * Crypto: Rename bouncycastle HMAC libs so they don't conflict
with older Android versions which bundle them
2012-08-23 19:11:55 +00:00
zzz
e3e15850bb * SSU:
- Don't relay or introduce to/from privileged ports
   - Various spoof detections
2012-08-23 19:10:36 +00:00
zzz
54b367b153 * NTCP: Reduce lock contention 2012-08-23 19:08:45 +00:00
zzz
b61127270e * SSU:
- Fail establishment immediately on SessionCreated
     validation fail
   - Defer outbound DH generation until required
   - Validate address/port in RelayIntro messages
   - Throttle hole punches
   - More cleanups
2012-08-22 17:43:09 +00:00
zzz
1d41c2fd19 SSU: Workaround for Android ICS bug 2012-08-22 17:41:43 +00:00
zzz
7c7e131dc0 * SimpleTimer2: Synchronization improvements (ticket #653) 2012-08-22 17:40:47 +00:00
zzz
85fbbf8980 * NetDB: Add hash collision detection 2012-08-22 17:40:25 +00:00
zzz
612fab1b2a * SSU:
- Use external, not internal port to sign SessionCreated message.
     Together with previous fix to allow external port change, this
     should fix session establish fails when NAT changes our port
   - Track outbound establishments by both Hash and IP/port,
     to improve lookups of establishments in progress
   - Fix expiration of outbound establishments
   - Validate address/port in RelayResponse messages
   - Change RemoteHostID to store Hash instead of byte[] for the peer hash
   - Log tweaks
2012-08-21 19:53:08 +00:00
zzz
fbd8c69eea * NetDB: Decrease stat publish probability 2012-08-21 19:49:43 +00:00
zzz
8fcac04aad javadoc 2012-08-21 19:48:18 +00:00
zzz
7d902cca1e log tweak 2012-08-21 19:48:04 +00:00
ddc1d7c6bc disapproval of revision 'acc7942148f44d32fc600d2f5784d1a43496eada' 2012-08-20 21:26:12 +00:00
5bb90c6185 * Fixed the FIXME in createInstance where the method failed to ensures that there will be only one naming service instance. 2012-08-20 18:28:20 +00:00
zzz
9452547204 * SSU: Allow port change if firewalled
* UPnP:
   - Prep for UPnP returning different external port
   - Better logging of errors
2012-08-20 12:22:00 +00:00
zzz
34c09583b4 do not use 8887 default in UI 2012-08-20 12:14:43 +00:00
zzz
38b0927d01 * I2CP: MessageStatus cleanup 2012-08-20 12:13:26 +00:00
zzz
715bde5ecf * Streaming: Increase max connection timeout 2012-08-20 12:12:48 +00:00
zzz
6c2eb317fe * I2PTunnelRunner: Remove unnecessary lock (ticket #690) 2012-08-20 12:10:10 +00:00
zzz
05516f3260 * i2psnark: Add minimum tracker and DHT announce intervals 2012-08-20 12:09:20 +00:00
264df83943 fix hang during uninstallation (#656) 2012-08-18 13:06:07 +00:00
zzz
3a546612d9 * SSU:
- Use remote MTU when published (ticket #687)
   - Queue outbound msgs during inbound establish
   - IntroManager cleanups
   - More synchronization
   - More log tweaks
2012-08-17 14:15:01 +00:00
zzz
3cac01ff27 * i2psnark:
- Adjust DHT timeouts
   - Add max peers per-torrent in tracker
   - Remove duplicate clean task for nodes
   - Fix another DHT warning message
2012-08-17 14:09:49 +00:00
e01521618f BOB: just some cleanup 2012-08-17 05:39:02 +00:00
zzz
ee63f3b86d minor NTCP cleanup 2012-08-16 19:02:38 +00:00
zzz
a900511d5e * Utils: Drop unused BufferedRandomSource, PooledRandomSource,
EepGetScheduler, EepPost and HTTPSendData, moved to i2p.scripts
2012-08-16 18:25:49 +00:00
zzz
3fe092d788 tab cleanup 2012-08-16 18:24:59 +00:00
zzz
e2fe5004e7 javadoc fixes 2012-08-15 14:39:52 +00:00
zzz
442af031eb propagate from branch 'i2p.i2p.zzz.upnp' (head fbd68f812db1e891f96e212b3a5938beec0233b5)
to branch 'i2p.i2p' (head a8d4956565f7c58736c2a3001f2b08ecff59ab57)
2012-08-15 14:29:30 +00:00
zzz
e22882bd02 - More fixups from merge
- Remove local address from thread names for thread dump anonymity
2012-08-15 14:24:40 +00:00
zzz
523d39b3bb * i2psnark:
- Fix bug preventing completion announcement, broken in 0.9.1
   - Fix setting short retry time after initial announce failure
   - Fix DHT announce and getPeers
   - Fix DHT warning message
   - log tweaks
2012-08-15 12:44:46 +00:00
zzz
65efefb094 propagate from branch 'i2p.i2p' (head 51b3351f42e7ff6e2f2bd8512e4b4402e08631f4)
to branch 'i2p.i2p.zzz.upnp' (head d28cfe73c2741ea264f73a7317f8a9919e108170)
2012-08-14 13:50:15 +00:00
zzz
44edf70842 * SSU EstablishmentManager: Fix bug with OB establishment via introducers
- log tweaks
2012-08-13 23:06:07 +00:00
zzz
16a46b3211 * SSU EstablishmentManager:
- Remove use of outbound timers in EstablishmentManager; drive all events in Establisher thread
   - Don't change nonces when retransmitting intro packets
   - More synchronization in EstablishmentManager
   - Increase establishment timeouts and implement timeouts for individual phases (ticket #669)
   - Fix bug where InboundEstablishState.createdPacketSent() wasn't being called,
     so SessionCreated packets weren't retransmitted
   - Increase retransmission timeout for SessionCreated and implement backoff
   - Send destroy if establishment times out in the middle
   - Fix code that pulls outbound states off a deferred queue
   - Improve UDPPacket.toString() for debugging
   - More logging of packets dropped in EstablishmentManager
   - Change establish states to enums
2012-08-13 15:12:33 +00:00
zzz
e9cc85141c comparator cleanups 2012-08-13 15:08:06 +00:00
zzz
cfcafd2ba3 * SSU:
- Reject some packet types if they came in via fallback introKey
   - Increase retransmission timeout for SessionRequest, SessionConfirm,
     and RelayRequest; implement backoff
   - Move UDPFlooder to test
   - More volatiles, finals, cleanups, stat removals, log tweaks
2012-08-12 11:24:15 +00:00
zzz
e67dd15308 * PeerManager: Fix NPE on Android (ticket #687) 2012-08-12 11:19:49 +00:00
zzz
a76f840ff8 remove finalize 2012-08-12 11:18:24 +00:00
zzz
269a36c549 * Jetty: Don't use direct byte buffers that may be leaking (ticket #679) 2012-08-12 11:11:45 +00:00
36bf248385 Removed unnecessary <p></p> around <img> on /graph 2012-08-12 00:35:09 +00:00
046135f8e3 merge of '8027b8544962ebd34af3edfe73bbc8195f8c1e90'
and '871249c3be5c8d8ce83a539ba8c5409876ef3a44'
2012-08-11 14:47:43 +00:00
97e469da7b command safari does not exist. using command "open" instead. 2012-08-11 14:34:20 +00:00
zzz
01beb015dc merge of '52c0538bb3404f46ac4fde538794a547852d5d44'
and 'e40ee84836983c85a8985c0a76e9e5a7635002cd'
2012-08-11 13:55:55 +00:00
zzz
50d5692884 snark build fix sorry 2012-08-11 13:51:52 +00:00
0ea6513e9c Changed my reseed url to contain a subpath, /netDb/. also updated the certificate (forgot to copy out of conf folder when i changed webserver and deleted config). 2012-08-11 13:43:48 +00:00
zzz
e2b683556b merge of '15095538e7b5c72468863e969541571ade1796f9'
and '39af5d31a13c5d5b71107e2caa0c234b84827c03'
2012-08-11 12:26:32 +00:00
zzz
14587ebb59 dash six 2012-08-11 12:16:43 +00:00
zzz
be3cf44608 get rid of one more UnsupportedOperationException 2012-08-11 11:41:29 +00:00
zzz
1538cd84a9 * DataHelper: toString(byte[]) cleanup and javadoc 2012-08-11 11:40:41 +00:00
f5b808b997 OSX: Fixed a bug in OS_VER variable.
the old version (grep -o '[0-9]*\.[0-9]*\.[0-9]*') won't detect versions as 10.8, or 10.7
added cut -d: -f2 | sed -e 's/[^0-9]*//' , matching both 10.8, 10.7.4, etc.
2012-08-11 11:40:05 +00:00
zzz
f92d8aed3d make context list concurrent 2012-08-11 11:34:32 +00:00
zzz
f6c769187e fix 2012-08-11 11:33:43 +00:00
zzz
c70e3727be * SSU MTU (ticket #682):
- Use local MTU detection
   - i2np.udp.mtu now sets max MTU, not initial MTU
   - Put local MTU in netDb 
   - Fix receive MTU calculations
   - Track remote MTU based on actual received packet size
   - Display local MTU on peers page
2012-08-11 11:27:28 +00:00
zzz
a6a0228ef8 * i2psnark: Fix DHT nodes not being saved at shutdown
Log infohashes in hex
             Don't write out nodes if we don't have any
2012-08-11 11:23:27 +00:00
d2a5595df2 Added new reseed host, and a self signed certificate for that host. 2012-08-11 01:14:58 +00:00
e9c07a123a German and Greek translation updates from Transifex 2012-08-11 00:25:43 +00:00
1e8e2a197b A fix for ticket #684 2012-08-10 23:55:14 +00:00
zzz
39d9d3f5b6 * SAM: Don't use direct byte buffers for streams (ticket #679)
DatagramServer one stays as it is a singleton.
2012-08-09 15:12:17 +00:00
zzz
8bada7f882 merge of '01c1a5c0e70a460534e66dd487aa8676d666168d'
and '441b352d1cef1c64ee96f55692be67cfc4b4abf1'
2012-08-09 15:03:01 +00:00
a940062255 add ')' missing from str4d's checkins 2012-08-09 11:35:41 +00:00
93efd31a5b merge of '62c3f266fd9443e9d7b3f71be8f4b36b4952f96b'
and 'd71795fa9a3d5fa0349f46eef4062670755b2cff'
2012-08-09 02:37:19 +00:00
2e9fdc6d9f Updated history.txt 2012-08-09 02:36:39 +00:00
zzz
b9f5f230a2 stub out local MTU detection (ticket 682) 2012-08-08 23:36:11 +00:00
zzz
0a751a303f post-0.9 cleanup 2012-08-08 17:09:28 +00:00
zzz
b2da629034 * Datagrams: Remove static logs 2012-08-08 17:07:28 +00:00
zzz
37a542c009 NTCP stat cleanup 2012-08-08 17:06:33 +00:00
zzz
0451ee7f08 * SSU: More cleanups; don't send a packet that exceeds the MTU 2012-08-08 17:05:42 +00:00
zzz
d8dd76c6e0 * SAM: Volatiles and finals 2012-08-08 17:01:59 +00:00
zzz
9cee0ee504 * i2psnark:
- Remove static SnarkManager instance
   - Allow DHT-only torrents
   - DHT debugging
2012-08-08 17:00:33 +00:00
b464ef0ac3 propagate from branch 'i2p.i2p.unittests' (head 58a62605ce8542f7e5d5daf0c2e171ed0c7e1a74)
to branch 'i2p.i2p.zzz.update' (head 269547972f0e02fe545296823602995465bb0691)
2012-08-08 00:15:55 +00:00
7f09206a47 Fixed jarScalaTest targets to actually package all classes 2012-08-08 00:07:17 +00:00
65573eafac Use ScalaTest jars in routerconsole tests 2012-08-07 23:12:37 +00:00
58a545d30c Snark: explicitly check if universal theme is "classic", and use "light" if so 2012-08-07 23:08:37 +00:00
dfb0b7801d Updates to classic console theme from dr|z3d 2012-08-07 23:03:34 +00:00
aab2c0601d propagate from branch 'i2p.i2p.unittests' (head fb681c6fa25bcf9f7287a661b3ce626fd5a280bb)
to branch 'i2p.i2p.zzz.update' (head f3c8cb8ad1d68cc6a66d544f1e287eead786c5ce)
2012-08-07 12:42:48 +00:00
a21175d903 propagate from branch 'i2p.i2p' (head b1fe8f8037e6dd8a1f6be6e30151ad0ca92e6689)
to branch 'i2p.i2p.str4d.fux' (head 723929af49930ca764fe4befb3621a036a3f99b8)
2012-08-07 12:28:30 +00:00
9c7f4cc604 merge of '6014a9321bb2362ffc628a351c1db19922384f76'
and 'd68b6ad6b4308d8dbe27d1faac089cb15358bfa2'
2012-08-07 12:24:33 +00:00
3017e4f51a Fixed .mtn-ignore to ignore build dirs properly 2012-08-07 12:18:16 +00:00
5355e5bbfd Added targets to build i2p.jar and router.jar with ScalaTest classes included 2012-08-07 11:58:11 +00:00
5ed1ec681f Updates to classic console theme from dr|z3d 2012-08-07 11:42:22 +00:00
0a4031cd7b Updates to midnight console theme from dr|z3d 2012-08-07 06:03:35 +00:00
31ea4a7093 Changed universal theming prop key (so not mistaken as a theme name by routerconsole) 2012-08-07 04:29:50 +00:00
0ca2d33ee1 New midnight theme for susidns from dr|z3d 2012-08-07 04:24:41 +00:00
48bcd3a8c2 Updates to console and snark themes from dr|z3d 2012-08-07 04:22:40 +00:00
zzz
1ab8200c7f * Clone System properties before iterating to avoid
ConcurrentModificationException (ticket #680)
2012-08-06 14:45:37 +00:00
zzz
91e61dbd5c fix flag links so language selection returns to the same page 2012-08-06 14:13:15 +00:00
zzz
fb4ef57148 propagate from branch 'i2p.i2p.zzz.dhtsnark' (head d4f16babae7cb0156609b211f5bb0310b03aaf57)
to branch 'i2p.i2p' (head 7bcd2f192b0f571374cc9882eca407095eb97c17)
2012-08-06 14:05:09 +00:00
zzz
ced0129e03 * libjbigi.so for ARMv6
GMP 4.3.2
    Compiled on Raspberry Pi with gcc version: gcc (Debian 4.6.3-8+rpi1) 4.6.3
    java version "1.6.0_24"
    OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-2+rpi1)
    OpenJDK Zero VM (build 20.0-b12, mixed mode)
    Stripped.
    Had a report that the ARMv5 jbigi worked on the RPi but it didn't for me.
    See NativeBigInteger for more info.
    /proc/cpuinfo:

Processor	: ARMv6-compatible processor rev 7 (v6l)
BogoMIPS	: 697.95
Features	: swp half thumb fastmult vfp edsp java tls 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xb76
CPU revision	: 7

Hardware	: BCM2708
Revision	: 0002
2012-08-06 14:04:32 +00:00
740b6501cd Updated history.txt 2012-08-06 12:38:00 +00:00
07e18c07ac Added ScalaTest support to routerconsole build.xml
To run (once tests exist) execute something like

ant -Dclasspath=/usr/share/java/mockito-core.jar
    -Dscalatest.libs=./lib
    -Dwith.cobertura=/usr/share/java/cobertura.jar
    fulltest
2012-08-05 22:20:19 +00:00
zzz
67f16b0de4 javadocs 2012-08-05 16:55:39 +00:00
zzz
fd3d92d3b2 merge of '1045fe48c576267959eae499a22776d9f9acafc3'
and 'bed1572eff55282ffcb5a2b92d02813eb04c0548'
2012-08-05 15:16:45 +00:00
zzz
5ba5d537b5 * UDP:
- Limit PacketHandler threads to 1 (ticket #660)
   - Limit queue sizes between UDPReceiver and PacketHandler,
     and between PacketHandler and MessageReceiver, to prevent OOMs
     and/or excessive queue delays
   - Increase UDPPacket cache size based on max mem
   - Remove more stats
2012-08-05 14:24:14 +00:00
zzz
4efa87d6bf * i2ptunnel, I2CP, EepGet: Buffer socket input streams (ticket #666)
* I2PSessionImpl: One more volatile (ticket #659)
2012-08-05 13:33:28 +00:00
442897ba5b merge of '48ea7675889a36bfb253833a66c22275abcee355'
and '925b1411e60b0e76e2421becd84d6c63832b69bb'
2012-08-05 07:40:05 +00:00
2b79da5c35 Debian: update patch to compensate for last commit
At the same time I'm making more Debian-specific changes, such as
 - not checking for Gentoo (this is obviously never going to be true :P)
 - not mentioning IzPack replacing variables (also not applicable)
 - inform about dpkg-reconfigure i2p in the event someone tries to remove or
   install an initscript with "i2prouter install|remove|uninstall"
 - remove the manual wrapper instructions
2012-08-04 17:44:09 +00:00
cc3a8e5d62 have izpack expand %USER_HOME in i2prouter
This will solve the issue of I2P_CONFIG_DIR being set incorrectly if another
user runs i2prouter once, such as when installing the initscript.
2012-08-04 17:32:11 +00:00
zzz
280a708afe - Change secure Node ID requirements again
- Protect against null DHT races
- Add message about restarting tunnel when DHT config changes
- Add DHT size to table totals
2012-08-04 17:11:11 +00:00
f5a348a863 propagate from branch 'i2p.i2p.str4d.test' (head 190d9be59620f8c6f80e0cb2fc4d9fa839edbb4f)
to branch 'i2p.i2p' (head c884db74f90a9d1c33deca6e2fd2e29f6c1ac8fa)
2012-08-03 21:30:29 +00:00
85a4e9cb5c Clarified purpose of the default IRC tunnel (it's not a "proxy") 2012-08-03 21:26:09 +00:00
zzz
4715dbdbd0 fixup after prop 2012-08-03 20:40:31 +00:00
zzz
afad77af19 propagate from branch 'i2p.i2p' (head d2198c4bc21a9d06194cdb2dce24945ebc9d1542)
to branch 'i2p.i2p.zzz.dhtsnark' (head 59fc0206608a5d1323a0acfbcb151d862fe95f95)
2012-08-03 20:29:31 +00:00
zzz
94d51bd56f log tweaks 2012-08-03 19:58:38 +00:00
zzz
72ed1bc1ac fixups after prop 2012-08-03 18:56:53 +00:00
zzz
4a1b83961d propagate from branch 'i2p.i2p' (head d2198c4bc21a9d06194cdb2dce24945ebc9d1542)
to branch 'i2p.i2p.zzz.update' (head 88ac67dc4e166b7e9dec0d3224e58bec4894440d)
2012-08-03 18:30:39 +00:00
zzz
b4a50ed03a replace SimpleScheduler.getInstance() calls 2012-08-03 17:13:17 +00:00
zzz
00f9fea98c replace SimpleTimer2.getInstance() calls 2012-08-03 16:23:31 +00:00
zzz
501651125f * UDP:
- Catch some cases where UDPPackets were not returned to the cache (ticket #675)
   - Fix inverted logging logic (ticket #663)
   - Remove check in UDPPacket.getLifetime() (ticket #664)
   - RemoteHostID cleanup, cache hashcode
   - Remove udp.fetchRemoteSlow stat
   - Remove some time stamping in UDPPacket
   - Other cleanups - see http://zzz.i2p/topics/1198
2012-08-03 14:25:32 +00:00
zzz
18e8d35910 * LogManager: Add logger.logBufferSize and logger.dropOnOverflow options (ticket #662) 2012-08-03 13:42:40 +00:00
zzz
9e4d231285 final 2012-08-03 11:23:09 +00:00
zzz
2972e79f9e * OutNetMessage: Fix NPE when log level = INFO (ticket #676) 2012-08-03 11:22:48 +00:00
zzz
4d32eaa036 * JobQueue: Synch fix (ticket #670) 2012-08-03 11:21:28 +00:00
zzz
e4f141b94c * build.xml: Add buildI2PTunnelJar target for Android 2012-08-03 11:20:28 +00:00
zzz
ccf36abd30 * i2psnark: Finish migration to I2P logging to reduce object churn (ticket #673) 2012-08-03 11:19:52 +00:00
d147db3382 Only call SaveConfig once in ConfigUIHandler 2012-08-03 03:49:46 +00:00
9d29dc6b68 Fixed bugs introduced while reverting 2012-08-01 05:54:07 +00:00
6562b33bbc Removed readConfigFile and writeConfigFile from I2PAppContext (unnecessary now) 2012-08-01 03:05:18 +00:00
f58f297cdb Reverted susimail to storing theme itself, but checking routerconsole for universal theming 2012-08-01 03:00:23 +00:00
376b991b63 Reverted i2psnark to storing theme itself, but checking routerconsole for universal theming 2012-08-01 02:44:18 +00:00
120d31244e Reverted i2ptunnel to reading theme from routerconsole 2012-08-01 02:26:26 +00:00
679549cbf2 Reverted susidns to storing theme itself, but checking routerconsole for universal theming 2012-08-01 02:04:00 +00:00
a623d924fa Reverted routerconsole to storing theme itself, also store universal theming boolean 2012-08-01 01:50:59 +00:00
95fb141ad9 0.9.1 debian changelog 2012-08-01 00:34:17 +00:00
fad6f54794 propagate from branch 'i2p.i2p.unittests' (head 0c5ea65761d9127f160bccb3d1d157f8947ca050)
to branch 'i2p.i2p' (head e36d5669f32ad1a0f66ab84f7f9ff8fa2937680b)
2012-07-31 21:49:31 +00:00
e1525d98cd Fixed paths to JUnit tests in javadoc targets 2012-07-31 21:26:46 +00:00
3d69d2bf63 If the theme set for susidns doesn't exist, use the default instead 2012-07-31 12:56:23 +00:00
cb2dd03e77 Refactored writeConfigFile to use DataHelper.storeProps, tidied up logging 2012-07-31 12:52:31 +00:00
3253f82900 Added ScalaTest support to router build.xml 2012-07-31 00:06:28 +00:00
zzz
33a00efd82 * RoutingKeyGenerator: Cleanups (ticket #672) 2012-07-30 22:39:47 +00:00
zzz
8bcbf24713 propagate from branch 'i2p.i2p.zzz.test' (head 5474e1a513fc8144a3d855e9c85d8b235f7f9816)
to branch 'i2p.i2p' (head 5932d3923108572b22a8a7a600f0f9e62ecac347)
2012-07-30 22:29:02 +00:00
52ba727664 line ending fixes
These CSS files improperly contain a mixture of Windows *and* UNIX line
endings. Some lines had ^M after them but most didn't.
2012-07-30 17:01:12 +00:00
a1cfacd8da merge of '3347c631d86a2ccf634321b74e24b9a58e490a15'
and '95d885a94cdde7ad40bbef11ec76f86d1ea7b798'
2012-07-30 16:51:05 +00:00
5b6e7ba91d Added some skeleton Spec tests for various I2P data types in net.i2p.data 2012-07-30 14:50:51 +00:00
zzz
77a19a0b17 0.9.1 2012-07-30 13:28:56 +00:00
zzz
7ecb90640c fixes after review 2012-07-30 13:15:58 +00:00
691ce6fec7 The first ScalaTest specification: a Hash must be 32 bytes long 2012-07-30 12:36:00 +00:00
618f214a4f Added ScalaTest support to core build.xml
The old JUnit tests are still present, but "ant test" and "ant fulltest" default
to the (pending) ScalaTest ones. To run the ScalaTest tests with Cobertura, execute
the following:

ant -Dscalatest.libs=./lib -Dwith.cobertura=/usr/share/java/cobertura.jar fulltest

The scalatest.libs property must point to a directory containing scala-compiler.jar,
scala-library.jar and scalatest.jar.
2012-07-30 12:26:35 +00:00
48df91f796 Moved existing JUnit tests to junittest/ in preparation for ScalaTest 2012-07-30 04:04:07 +00:00
d27d0bd2e4 A couple more specific excludes for JUnit tests 2012-07-30 04:03:02 +00:00
39d954d56a merge of '00209f1054786667de66adbd6038fccf8825260f'
and '180794b6e2aad94450e102b4ac346f8172811ba1'
2012-07-28 22:22:07 +00:00
78b1922dd7 "11th hour" de & es translation updates from TX 2012-07-28 21:18:56 +00:00
639253e9bb Fixed a bug in a console_big.css override in light and dark themes 2012-07-28 13:45:12 +00:00
f8fe2a295f Fixed icon column width being too large in snark filemanager 2012-07-28 13:38:40 +00:00
9d2831f520 Updated history and bumped build number 2012-07-28 12:47:42 +00:00
c2438a7508 Fixed an i2ptunnel button regression in the dark console theme 2012-07-28 12:33:36 +00:00
zzz
4298958952 comment out tests 2012-07-27 15:49:46 +00:00
zzz
54a80d6bdc javadoc 2012-07-27 15:31:20 +00:00
zzz
aba655a9c7 move default properties from build.xml to build.properties 2012-07-27 15:30:11 +00:00
b6eef94383 Tweaked console themes so console error pages look alright in iframe
This fixes the issue where, when an iframed app was not running, the summary
bar would be displayed inside the iframe as well as outside it.
2012-07-27 12:41:45 +00:00
7526db9e6c minor update to reflect the other systems that we support 2012-07-26 21:11:42 +00:00
c853337d41 merge of '3b6726af78088f84c156c7d5cb40aa0b73946465'
and '5b76774cf78d7a3537006860fc78c00c191c9cb0'
2012-07-26 20:50:39 +00:00
00dd72e284 July 2012 GeoIP db update 2012-07-26 20:32:04 +00:00
05850371a6 Finnish, French, German, Spanish and Swedish translation updates from TX 2012-07-26 20:31:01 +00:00
c285cb84bd BOB Fix static references to Log 2012-07-26 20:30:42 +00:00
a4a0e1def3 Replaced a few more /home icons 2012-07-25 23:38:25 +00:00
fea7a42ece Reset spin flag in BOB 2012-07-24 18:38:36 +00:00
72f74b7f6e Disabled the iframe fallback for the summary bar
HTML compliance wins out over summary bar refresh for users with JS disabled,
for now - get user feedback after release.
2012-07-24 13:15:11 +00:00
a92456e144 Updated history.txt 2012-07-24 12:47:21 +00:00
7f7a82802d Added CC attribution for Creative Commons Cat 2012-07-24 12:07:09 +00:00
93097ab630 Moved RestartStatus back above LocalDestinations in default /home summary bar 2012-07-24 12:05:34 +00:00
d3d22a8f4b Added license for new /home icons 2012-07-24 05:32:40 +00:00
7a1b082216 Updated /home icon for git.repo.i2p 2012-07-24 05:18:20 +00:00
0e907c5ad0 Replaced 16x16 /home icons with 32x32 ones 2012-07-24 05:17:13 +00:00
59b8dc4f41 Update to dark console.css - more space efficient on /home, "0px" -> "0" 2012-07-24 03:23:51 +00:00
299109433c merge of '03b8e025ba8c54efe24644ee68500ae2ff0ea2de'
and 'b45f7b28764f452bbd5f58ebd598f465565cab5c'
2012-07-23 23:30:39 +00:00
zzz
9823d761d9 dont create router.ping file on Android to reduce flash wear 2012-07-23 23:21:20 +00:00
db6b8d3b6b debian: minor improvements to the build script
- Tighten setting of Debian version in I2P
- Ensure the clean target will remove .so and .o files
2012-07-23 23:20:23 +00:00
c61a18545e Debian: Use our Jetty/Tomcat libs instead of the ones from Debian/Ubuntu (for now at least).
Tomcat6 & Jetty6 are going to be dropped from the next release of Debian stable
(Wheezy) in favor of Tomcat7 and Jetty8.
2012-07-23 23:13:28 +00:00
zzz
c1181f855a remove unused dirs 2012-07-23 23:11:50 +00:00
zzz
e2aa2affd7 * LookaheadInputStream: Fix bug causing gunzip fails, esp. on Android
* SSLEepGet: Fix on Android (ticket #668)
2012-07-23 23:10:26 +00:00
7f18d25d0d Re-add alt="" to some icons in snark to prevent double text in text browsers 2012-07-23 21:49:30 +00:00
314817242b If the theme set for susimail doesn't exist, use the default instead 2012-07-23 11:01:39 +00:00
945a0f30aa If the theme set for snark doesn't exist, use the default instead 2012-07-23 10:39:11 +00:00
a7c8a7201a When fetching a theme, if theme config key is not found, write out the default
This is required in order to get the theme config keys of the various apps into
themes.config; this way, the routerconsole requires no knowledge of what apps
support universal theming, and can just blanket apply themes to all known keys.
2012-07-22 13:13:43 +00:00
6be94658a7 Use router console theme setting from themes.config in i2ptunnel 2012-07-22 11:33:20 +00:00
490dcc5020 Bugfix: update SnarkManager._theme each time getTheme() is called
FIXME: ensure that _theme is only read from the config file once per page load.
2012-07-22 06:59:43 +00:00
8e6bade42b Added checkbox to console to set theme universally across all apps 2012-07-22 06:53:43 +00:00
c145e4267c Fixes to light/console_ar.css 2012-07-22 00:18:07 +00:00
a4064190dd merge of '5aab7ebb6f496024fff1cc4b87e39475a7277db0'
and 'b2e508dbe3e9c7c67bb38d3f573481ae3fb8c9b3'
2012-07-21 20:59:01 +00:00
f97213630c Reverted susimail and snark links in /home and summarybar to point directly at app
The iframing pages remain accessible in the console, so this may be reverted in future,
or made configurable. The /webmail link buried in the text of the several readme.html
files has been left.
2012-07-21 20:57:46 +00:00
6a21e22bf1 Moved dark snark theme out of bundled themes dir due to an image issue
dr|z3d is happy for the problem image to be replaced and the theme reinstated
when universal theming support is added (likely 0.9.2)
2012-07-21 20:43:33 +00:00
zzz
77f8729257 new cowpuncher cert 2012-07-21 19:26:29 +00:00
zzz
39d4e1be72 SSU: Remove excessive exception creation (ticket #665) 2012-07-21 13:04:50 +00:00
zzz
ebe55aba61 remove dark as requested 2012-07-21 13:03:27 +00:00
3c4f1b7814 Store susimail theme setting in themes.config 2012-07-21 12:33:42 +00:00
ce024ff006 Store susidns theme setting in themes.config 2012-07-21 11:39:13 +00:00
e603b120c3 Store snark theme setting in themes.config 2012-07-21 11:06:24 +00:00
b17af505c2 Replaced a hard-coded string that was missed in previous commit 2012-07-21 10:22:12 +00:00
5d5a3b80e5 Store router console theme setting in themes.config 2012-07-21 10:11:32 +00:00
c8a73b63fd Added methods to read and write properties in arbitrary config files 2012-07-21 10:07:04 +00:00
ce7a46bbed Open Previewed http dests with target="_parent" in i2ptunnel
Before iframing i2ptunnel, clicking the Preview button would open the site in the parent
window. This change will cause the sites to open in the parent window from
within the iframed page.
2012-07-20 19:20:18 +00:00
eee67f09e1 en PO files updated and pushed to tx 2012-07-20 17:59:39 +00:00
ab7246565c Reverted alt tags in status column of snark 2012-07-20 04:16:53 +00:00
096d067d6c Updated history and bumped build version 2012-07-20 01:18:24 +00:00
9d2709be19 Update to light theme to increase top margin of iframes 2012-07-20 01:13:01 +00:00
3cce978e26 New light snark theme from dr|z3d (integrates well with light console theme) 2012-07-20 00:59:13 +00:00
8f30a74c7d Split up status and show/hide peers headings into separate columns 2012-07-20 00:57:53 +00:00
a86a2ba04a Moved text from headings in snark filemanager into tooltips (in line with main page)
Directory column could do with a different icon.
2012-07-20 00:36:43 +00:00
f4ffb30153 Added iframed fixes to default.css in classic, light and midnight console themes 2012-07-19 23:05:25 +00:00
ecdaa6f2b3 Removed text headings and status text from main snark page to reduce visual clutter
The header icons are self-explanatory (but tooltip also has header text); the
status text is available from the tooltip.
2012-07-19 21:39:17 +00:00
2b8b406f9d Added title and alt tags to Status and Torrent columns in snark main view 2012-07-19 13:06:45 +00:00
212a794c65 Give div.app fixed height for classic and midnight console themes
This stops app icons getting "stuck" on the right-hand side of /home
2012-07-19 00:41:52 +00:00
0e2dede168 Replaced itoopie with a dedicated icon for eepsite links on /home with no favicon 2012-07-19 00:08:29 +00:00
c1f3fa6004 Updates to dark susi themes and new light newsbullet from dr|z3d 2012-07-18 23:44:55 +00:00
e2be19039f Added missing git.repo.i2p and id3nt.i2p entries to hosts.txt 2012-07-18 12:33:30 +00:00
zzz
846f6f2190 * Home page: Add colombo-bt.i2p, remove keys.i2p
Icon created and contributed by colombo-bt.i2p
2012-07-18 12:00:42 +00:00
zzz
37716f34de * i2psnark: Clear rate stats when restarting torrent 2012-07-18 11:52:20 +00:00
f01ccf9797 Update to dark susimail theme from dr|z3d 2012-07-18 03:56:35 +00:00
074baa63f5 Fixed /home tooltip to not break page 2012-07-18 02:50:13 +00:00
763eb08dad Added git.repo.i2p and id3nt.i2p to /home eepsite list 2012-07-17 21:27:22 +00:00
1d40a88166 Fix snark Ajax JS (wrong level of escaping of quotes) 2012-07-17 20:55:36 +00:00
5766b36b33 Give the summary bar sections string names (some already translated) 2012-07-17 20:36:57 +00:00
4cea0b6099 US spelling 2012-07-17 19:44:44 +00:00
43fd5caf30 Fixed snark initAjax method so it runs (I'm SURE it did before...) 2012-07-17 19:32:22 +00:00
5c1a1b13f4 Update to dark susimail theme from dr|z3d 2012-07-17 12:22:52 +00:00
109e1a75bf Improved alignment of news headings in classic and midnight themes 2012-07-17 11:40:44 +00:00
99f8384129 merge of '9fdbbb81553e767812b7a8634edd867cb1ca8438'
and 'cc04809f72ea9e8f0e0427484d65f613838f65d7'
2012-07-17 10:56:51 +00:00
f3cb399605 Update to dark susidns theme from dr|z3d 2012-07-17 10:56:20 +00:00
c94ce79e68 Added links inside <iframe> tags on iframed pages to corresponding apps 2012-07-17 01:20:08 +00:00
744930a090 Consolidated Ajax calls for summary.jsi into a single summaryajax.jsi 2012-07-17 00:47:08 +00:00
be7aa991d7 Consolidated the common iframing JS into /js/iframed.js 2012-07-16 23:39:44 +00:00
c815bc2996 Removed spurious UTF8 chars from dark/console_ar.css 2012-07-16 21:36:48 +00:00
924520955e merge of '369340479baf15d01ba95519145edddba22634ca'
and '3b7088110cf55db67e72b7e9bfbf8cd832daac06'
2012-07-16 21:34:41 +00:00
0bff0a4998 Removed backup favicon.ico from css.jsi (all current themes have favicons) 2012-07-16 21:32:47 +00:00
691c003e95 merge of '762f90d57bd57a4e0b122dff85484774b0105d93'
and 'd02235b886c4e596e3c980dcb0b8df9d3547d103'
2012-07-16 21:29:04 +00:00
a28dab9bdc Bumped build number to -22 2012-07-16 21:04:11 +00:00
c33c0259a7 Only set extraversion in Unix since Windows doesn't have awk available
I need to investigate a cross-platform method.
2012-07-16 17:47:48 +00:00
77d40f8d31 propagate from branch 'i2p.i2p.str4d.fux' (head 48cafeb29fb3408078a8b93c0bab0fc9d766a8bc)
to branch 'i2p.i2p' (head 47f04ff21e8edd00134a0fd68219f86fd3caba36)
2012-07-16 16:17:19 +00:00
619b766c85 Removed CSS hiding susimail Cancel button (it might be hiding other buttons) 2012-07-16 16:13:03 +00:00
693ffed9be Updated history.txt 2012-07-16 16:11:03 +00:00
c175d5470f Updates to dark console theme from dr|z3d 2012-07-16 14:50:56 +00:00
42e6d06559 Whitespace fixes to dark susimail theme 2012-07-16 14:04:58 +00:00
25da127d02 Whitespace fixes for light susimail theme 2012-07-16 13:58:22 +00:00
00b88675ea Whitespace fixes in light susidns theme 2012-07-16 13:56:31 +00:00
c552db59e4 Whitespace fixes in dark susidns theme 2012-07-16 13:53:54 +00:00
763116fb24 Updates to dark susidns theme from dr|z3d 2012-07-16 13:50:21 +00:00
f3531f1c2c Updates to dark console theme from dr|z3d 2012-07-16 13:47:03 +00:00
a2a67d82ab Some updates to ieshim.css in classic theme to fix some IE console regressions 2012-07-16 13:44:58 +00:00
zzz
69cdcc8226 * XORComparator: Reduce object churn (Ticket #658) 2012-07-15 15:04:58 +00:00
5e11e51f6a Added "theme" to list of susidns config options 2012-07-15 13:13:57 +00:00
a419347eba Added preliminary dark susimail and susidns themes
Add "theme=dark" to susidns config page, or "susimail.theme=dark" to
susimail.config file, to enable the dark themes.
2012-07-15 11:03:51 +00:00
ab42e47385 Added iframing pages for susimail and susidns 2012-07-14 21:56:38 +00:00
50cfd52c23 Moved susidns CSS into themes dir (required moving loadConfig into BaseBean.java) 2012-07-14 06:27:23 +00:00
e0ff0c63c8 Moved susimail CSS into themes dir 2012-07-14 03:46:23 +00:00
a123def967 Inter-browser fixes for dark snark theme from dr|z3d 2012-07-14 01:38:14 +00:00
8360a2f4e7 Console theme hacks from dr|z3d to target specific Opera oddity 2012-07-14 01:29:04 +00:00
f13a1b2aed Tweak to snark dark theme from dr|z3d 2012-07-14 00:54:05 +00:00
cec5838649 Added newsbullets from dr|z3d to the other themes 2012-07-14 00:48:28 +00:00
2c0de05e9d Updates to dark console and snark themes from dr|z3d 2012-07-14 00:18:16 +00:00
f782afef8d Add scrollbar width to iframe height, so vertical scrollbar doesn't appear
FIXME: add horizontal scrollbar detection so only adding the extra height
when it is actually needed.
2012-07-14 00:13:33 +00:00
a45688867d Add README.Debian to the package
Previously, README.Debian use to be installed to /u/s/d/i2p. A while ago I
split I2P into smaller packages and symlinked /usr/share/doc/libjbigi-jni and
/usr/share/doc/i2p to /usr/share/doc/i2p-router. I didn't noticed that
README.Debian wasn't being included after the split, so now I'm explicitly
adding it.
2012-07-13 00:41:44 +00:00
6104cfa56a el & nl after poupdate
I nearly always run ant poupdate before checking in language files; I neglected
to do it for the last check-in.
2012-07-13 00:35:25 +00:00
6869ed937b Translation updates from tx
- Add Greek language
- Update Dutch translation
- Adjust flag rows
2012-07-13 00:28:06 +00:00
945cc55b54 move check for binary down since osx binaries are no longer 'fat' 2012-07-12 22:43:12 +00:00
7e7cabfdc2 Added getElementsByClassName shim for IE 2012-07-12 21:47:09 +00:00
cbd61e2fce Tweak to get rid of iframe scrollbars in dark snark theme 2012-07-12 14:21:37 +00:00
ffdac3ce2c Added some non-breaking spaces to error.jsp where JSP was eating the spaces 2012-07-12 13:40:54 +00:00
eaa64cb02f Removed superfluous "Updating:" from update status (section has a heading now) 2012-07-12 13:39:32 +00:00
b36a418dff More changes to dark snark theme from dr|z3d - close to RTM 2012-07-12 13:37:51 +00:00
46ca3ab51d Used JS changes to fix iframed i2ptunnel scrollbar issue in CSS
Also added comments to the JS to point out that the issue is that
offsetHeight doesn't include the very top or bottom margins.
2012-07-12 13:34:19 +00:00
0deaab7c1a Improvements to resizing JS in iframed app container pages 2012-07-12 13:07:48 +00:00
c6d45b22b6 Added links to iframed pages to open them in new tabs (as per old console) 2012-07-12 10:32:00 +00:00
69bcc9d012 Dark snark theme updates from dr|z3d 2012-07-11 21:47:50 +00:00
182409ce3a Corrected titles of iframed pages 2012-07-11 21:44:02 +00:00
c45dc0c838 Moved add and delete buttons into sidebar config table, and removed unnecessary ones 2012-07-11 21:20:35 +00:00
7d175678ab CSS for the sidebar config table from dr|z3d 2012-07-11 12:06:59 +00:00
dd86515d2e Tweaks to dark snark theme from dr|z3d 2012-07-11 12:02:58 +00:00
b1a4b8bfed Rearanged columns of summary bar config table 2012-07-10 23:35:54 +00:00
ac9bdab78e Added class to summary bar config table 2012-07-10 22:48:59 +00:00
177b6e2d48 Link both icon and text for tracker and magnet entries in snark torrent info 2012-07-10 22:48:07 +00:00
b48014f8e6 Use favicon from theme in I2PTunnel if it exists 2012-07-10 21:29:49 +00:00
f1881352c8 Further tweaks to ubergine and vanilla themes by dr|z3d for new layouts 2012-07-10 21:10:58 +00:00
d6572fd027 Give update status section a heading to draw attention to it, display total size 2012-07-10 21:07:36 +00:00
7e5edc2f6e Changes to snark themes from dr|z3d to work with new layouts
(and a tweak to dark console theme)
2012-07-10 19:30:42 +00:00
709c75c517 Reordered torrent info section in snark filemanager - reduced to 4 info lines 2012-07-10 19:03:48 +00:00
ebc4d53fa9 Corrected output of message to notice instead of error on summary bar config page 2012-07-10 12:05:07 +00:00
dbd95c5c64 Added extra column to keep ordering buttons in line 2012-07-10 11:57:40 +00:00
42565f19fc Use image buttons for ordering summary bar sections (images courtesy of dr|z3d) 2012-07-10 11:42:20 +00:00
8d9909acfb To improve themability, make torrent info table in snark filemanager a single column 2012-07-09 21:17:02 +00:00
9c7f9a935b Only add new summary bar sections to the bottom 2012-07-09 20:35:58 +00:00
c9fc3f11a6 Replaced text fields for ordering summary bar with movement buttons (CSS styling needed) 2012-07-09 07:59:41 +00:00
75046d11fb Separated disabling of iframe refresh from the refresh time 2012-07-09 00:39:52 +00:00
bb39d9ddcf Integrated summary bar preset buttons into main edit form as restore buttons 2012-07-08 22:11:05 +00:00
fb629404c6 Split torrent info and dir info on snark filemanager into two separate tables 2012-07-08 21:35:49 +00:00
78691ba344 Updates to dark console theme from dr|z3d 2012-07-08 12:07:54 +00:00
f41fde8471 Updates to dark snark theme from dr|z3d 2012-07-08 12:05:17 +00:00
319d217dc1 Slight simplification of class injection for iframed app pages 2012-07-05 13:04:45 +00:00
ec80501977 Remaining size in snark filemanager reads GB instead of Gbyte etc (consistency) 2012-07-05 13:01:00 +00:00
4a0319389b A few more newlines to improve HTML readability 2012-07-05 12:22:56 +00:00
ebcc304642 Fixed a few colspans that were missed when adding icon/thumbnail td 2012-07-05 11:49:36 +00:00
c695a51883 Tidy up layout of rendered HTML for one row of snark filemanager 2012-07-05 11:47:41 +00:00
3cc447c5f2 Put icon/thumbnail for snark filemanager in separate td 2012-07-05 11:36:10 +00:00
52742ceeca Moved "View or change bandwidth" link inline to tidy up vertical alignment 2012-07-05 02:55:28 +00:00
08d86019e4 Uncommented input.default CSS (to hide extra Add button) in dark snark theme 2012-07-05 02:50:01 +00:00
582a62d75b Added classes to and removed hard-coded layouts from snark config page (stubbed in CSS) 2012-07-05 02:48:45 +00:00
8ebadf5236 propagate from branch 'i2p.i2p' (head 5b24a07e8a843d03ea45e664c59b93937c5efc42)
to branch 'i2p.i2p.str4d.fux' (head 0bfff6086d6f72df836909ae379a95ebbe4b6933)
2012-07-05 00:48:41 +00:00
814f5ca194 Arabic-specific console theming for dark from dr|z3d 2012-07-05 00:36:32 +00:00
3da63182cd Updates to dark snark theme from dr|z3d 2012-07-05 00:35:09 +00:00
029a903d79 Expanded resizeFrame() to prepare for more intelligent iframe-sizing 2012-07-04 12:49:54 +00:00
zzz
e2588a5379 move DecayingBloomFilter, DecayingHashSet, and xlattice filters from core to router 2012-07-02 19:22:33 +00:00
zzz
0d8bcd5dad * i2psnark:
- Don't send a keepalive to a peer we are going to disconnect
   - Disconnect peer when idle a long time
   - PeerCheckerTask cleanup
   - Static ref cleanup
   - Don't show a downloaded torrent file as "seeding"
   - Better torrent file download icon (from Silk, same license as the others)
2012-07-01 16:16:08 +00:00
zzz
63f22a54e1 fix unsafe initialization of super constructor calling override 2012-06-29 17:21:57 +00:00
zzz
ab18550711 * Update: Increase eepget timeouts to reduce retries 2012-06-29 16:25:22 +00:00
zzz
4092f61898 * Streaming:
- Allow at least 3 packets and up to half the window to be active resends
     instead of just 1, to reduce stall time after a packet drop
   - Increase fast retransmit threshold back to 3 to reduce retransmissions
   - Don't fast retransmit if we recently retransmitted it already
   - Allow double the window as long as gaps are less than the window
   - Don't set the MSS in a resent packet (saves 2 bytes)
   - Remove redundant calls to updateAcks()
   - Update activity timer when resending a packet
   - Reset unackedPacketsReceived counter at all places where acks are sent
     so it isn't wrong
   - Fix some places where the activeResends count could become wrong
   - Prevent storm of CLOSE packets
   - Never resend the whole packet in ackImmediately(), just send an ack
   - Cancel flusher timer in MessageOutputStream when closed
   - Move some createRateStats to ConnectionManager to reduce repeated calls
   - Cleanups, javadocs, logging, volatile, finals
2012-06-29 14:53:53 +00:00
zzz
ebb6609a2b fix SimpleTimer logging 2012-06-29 14:05:39 +00:00
820345f84d Changes to dark theme from dr|z3d to improve look of tunnel wizard 2012-06-29 13:49:37 +00:00
zzz
5a1d52d82c * HTTP Proxy: Change the error code for unknown host from 404 to 500. 2012-06-29 13:30:24 +00:00
9adb97d300 Tweak to dark console theme .iframed .panel margins 2012-06-28 03:36:31 +00:00
eae4d704a1 Copied body.iframed CSS from dark i2ptunnel.css to dark snark.css 2012-06-27 03:26:22 +00:00
84cc6711b4 Dark theme for i2psnark from dr|z3d - for better integration with router console 2012-06-27 03:19:30 +00:00
5be02b1592 Fixed JS for iframed apps so the CSS class is injected on page change 2012-06-27 02:16:21 +00:00
255894e241 Embed /i2psnark/ in an iframe like /i2ptunnel/ 2012-06-27 02:00:30 +00:00
zzz
6c8c87b2dd javadocs 2012-06-25 19:29:51 +00:00
zzz
dba3fee477 - Concurrent PeerCoordinatorSet
- final infoHash in Snark
2012-06-25 18:20:18 +00:00
zzz
50fba8fc8d propagate from branch 'i2p.i2p' (head db152f1a9e08e80c7bd3b87735b51800e8f4c46f)
to branch 'i2p.i2p.zzz.dhtsnark' (head 9b08b2f47961167d0fee52b6481895c494d410d6)
2012-06-24 19:53:20 +00:00
zzz
5eab417134 propagate from branch 'i2p.i2p' (head db152f1a9e08e80c7bd3b87735b51800e8f4c46f)
to branch 'i2p.i2p.zzz.test' (head 5fd7a423338073ff81f5118cde74317b567846a6)
2012-06-24 19:53:08 +00:00
zzz
ff0bfb9f12 * i2psnark: Don't create a new PeerCoordinator after restart, as the
TrackerClient holds on to the old one and that causes it
             to not get peers. Possibly fixes ticket #563.
2012-06-24 19:26:23 +00:00
zzz
1671e3b126 Fix bad size estimate when tags are included in the AES block,
resulting in trailing zeros after the random padding in the unencrypted AES data block.
The number of zeros equaled the number of tags included (typ. 6 or 40).
As the data size is rounded up to the next multiple of 16,
this increased the size of the data by 0, 16, 32, or 48 bytes when tags were included.
Bug introduced 2004-10-30.
2012-06-24 19:23:05 +00:00
zzz
fe53501990 * GarlicMessage:
- Put data clove last to speed acks and leaseset store on far end
  - Change release target
  - Javadocs and cleanups
2012-06-24 14:41:50 +00:00
zzz
e497859587 * ElGamal/AES/SessionTag:
- Increase TX expire from 10 to 12 min, while keeping RX expire at 15 min.
    3 minutes should be plenty of clock skew + delay.
  - Move tags-to-send and low-threshold values to be per-SKM
  - New session config options crypto.tagsToSend and crypto.lowTagThreshold
  - Prep for per-packet override of tags and thresholds
  - Cleanups and Javadocs
* I2PTunnel: Add some defaults for the new session config options
* OCMOSJ:
  - Don't bundle LeaseSet just because we're requesting an ACK
  - Changed session config option shouldBundleReplyInfo to default to true
    and be used to disable bundling altogether when set to false.
    Was previously an undocumented option to force bundling with a certain probability.
  - Don't send tags unless we've already generated a reply token (race)
  - Cleanups and Javadocs
2012-06-24 13:17:52 +00:00
zzz
97b05b1dbf * I2PTunnel: Fix NPE on shared client creation, thx kytv
* Transport: Add Ethiopia to hidden mode list
 * Log and javadoc tweaks
2012-06-24 11:38:37 +00:00
588799a2ff Update to dark theme from dr|z3d 2012-06-24 01:15:06 +00:00
zzz
d5a1e0b1c6 - Add kad lib, from i2p.zzz.kademlia branch (without the history),
which is a rewrite of the netdb kad
- Drop now-unused SHA1Comparator
- Efficiency tweak to NodeInfoComparator
2012-06-22 17:39:41 +00:00
zzz
5883b7344e propagate from branch 'i2p.i2p' (head 80aed456e1c6e4b17906153c9ee6dc9bc45e0eec)
to branch 'i2p.i2p.zzz.dhtsnark' (head dbf88ff4c1429f26656ad34fe0b9ba94305d726a)
2012-06-22 15:13:04 +00:00
zzz
8522779df1 - Switch to real kad with lib from i2p.zzz.kademlia (not checked in yet)
- Bootstrap only once in explore thread
- Add exploring to explore thread
- Don't store default DHT setting in config file, so we can switch default to true later
- Add new enforce-protocol streaming config, sorry locks out < 0.7.1 peers
- Log tweaks
2012-06-22 15:12:43 +00:00
7976ba1dff Only display summary bar "Show news" link on /home (/console already has one) 2012-06-22 01:32:07 +00:00
e88ca3048c Removed unnecessary extra sentences from summary bar tooltips 2012-06-22 00:08:43 +00:00
8412bafc5c Use JS injection to allow iframe-specific I2PTunnel styling 2012-06-21 23:47:49 +00:00
zzz
2a8adcb89a * IRC Client: Don't flush output unless out of input, so the
streaming messages don't get split up unnecessarily
2012-06-21 21:16:54 +00:00
zzz
829e3f47ff Store context in the PeerSelector so we don't have to pass it around 2012-06-21 20:52:39 +00:00
zzz
4e4634496a * TunnelPool: Fix bug where a tunnel was marked as reused when it wasn't 2012-06-21 20:26:29 +00:00
zzz
d148efd458 * TunnelPoolManager: Use one ClientPeerSelector for all pools 2012-06-21 20:08:02 +00:00
zzz
f7656b0401 * TunnelInfo: Change msg counter from long to int 2012-06-21 19:59:29 +00:00
zzz
6635448bda * I2CP: Make separate message ID counters per-destination, use atomic,
increase max (could have caused "local loopback" problems)
2012-06-21 19:52:00 +00:00
zzz
baa89c5bbf * OCMOSJ, ElG, Streaming: log tweaks 2012-06-21 19:10:14 +00:00
ab1144865f propagate from branch 'i2p.i2p' (head 204c786941e233e9ed0e447499049f5c21103f40)
to branch 'i2p.i2p.str4d.fux' (head 5bc2b4f4713087086e44eca6678d880651fa717a)
2012-06-21 04:05:48 +00:00
4348ff2689 Added custom bullet to newsheadings li 2012-06-21 01:54:28 +00:00
33c4b321db Fix up alignment of news headings in other themes 2012-06-20 12:56:00 +00:00
zzz
39d9a25e19 log tweak 2012-06-20 12:22:43 +00:00
zzz
b5dad73f6f * I2PSession:
- Greatly simplify the VerifyUsage timers
   - Constructor cleanup
2012-06-20 12:18:57 +00:00
99eb49e347 Added favicons to resident themes (dr|z3d's dark favicon for dark and midnight themes) 2012-06-20 02:55:44 +00:00
11f111790e Use a theme-specific favicon.ico if it exists 2012-06-20 02:48:24 +00:00
zzz
f8e470c7f4 propagate from branch 'i2p.i2p' (head a38c8874bc61e9bf11c4d43666ad72cd5eecbf8a)
to branch 'i2p.i2p.zzz.dhtsnark' (head 028e93195ce28c8b6fbe573e6c660d5c329df42a)
2012-06-20 01:19:25 +00:00
zzz
d8a2e39006 from last checkin - fix enforce proto default, fix http client delayed start 2012-06-20 01:19:05 +00:00
zzz
c6d1c552f8 propagate from branch 'i2p.i2p' (head 9ca94e960929c6af5dea1085105278d2f33217f2)
to branch 'i2p.i2p.zzz.dhtsnark' (head 1f23a71b0fa5169c220f3f21dd705e1fcfbb1b5d)
2012-06-19 23:31:53 +00:00
zzz
e383477b01 * Socks: Pass remote port through
* I2PTunnel: More javadoc warnings on default options
2012-06-19 21:48:31 +00:00
zzz
129b16d93d * Streaming:
- Listen only on local port if set
   - Listen only for streaming protocol if configured (new option)
   - Javadocs re: ports
2012-06-19 20:26:46 +00:00
zzz
48f29ff1b8 - Hide buttons while stopping all 2012-06-19 20:24:30 +00:00
zzz
e62b76d2cc Big refactor of the router console update subsystem, in preparation for
implementing out-of-console updaters like i2psnark.

- Add new update interfaces in net.i2p.update
- All update implementations moved to routerconsole update/
- Implement an UpdateManager that registers with the RouterContext
- UpdateManager handles multiple types of things to update
  (router, plugins, news, ...) and methods of updating (HTTP, ...)
- UpdateManager maintains list of installed, downloaded, and available versions of everything
- Define Updaters that can check for a new version and/or download an item
- Individual Updaters register with the UpdateManager obtained from
  I2PAppContext, identifying the type of update item and
  update method they can handle.
- Updaters need only core libs, no router.jar or routerconsole access required.
- All checks and updates are initiated via the UpdateManager.
- All status on checks and updates in-progress or completed are
  obtained from the UpdateManager. No more use of System properties
  to broadcast update state.
- All update and checker tasks are intantiated on demand and threaded;
  no more static references left over.
- Split out the Runners and Checkers from the Handlers and make the inheritance more sane.
- No more permanent NewsFetcher thread; run on the SimpleScheduler queue
  and thread a checker task only to fetch the news.
- No more static NewsFetcher instance in routerconsole.
  All helper methods that are still required are moved to NewsHelper.

The UpdateManager implements the policy for when to check and download.
All requests go through the UpdateManager.

For each update type, there's several parts:
    - The xxxUpdateHandler implements the Updater
    - The xxxUpdateChecker implements the UpdateTask for checking
    - The xxxUpdateRunner implements the UpdateTask for downloading

New and moved classes:

web/				update/
----				-------
new				ConsoleUpdateManager.java

new				PluginUpdateChecker.java from PluginUpdateChecker
PluginUpdateChecker 		-> PluginUpdateHandler.java
PluginUpdateHandler.java	-> PluginUpdateRunner

new				UnsignedUpdateHandler.java
UnsignedUpdateHandler		->  UnsignedUpdateRunner.java
new				UnsignedUpdateChecker from NewsFetcher

UpdateHandler.java remains
new				UpdateHandler.java
new				UpdateRunner.java from UpdateHandler

move				NewsHandler from NewsFetcher
new				NewsFetcher
new				NewsTimerTask

new				DummyHandler


Initial checkin. Unfinished, untested, unpolished.
2012-06-18 22:09:45 +00:00
zzz
d368937bce dash sixteen 2012-06-18 21:40:05 +00:00
zzz
4b3ccabb44 - Thread task to open tunnel and improve UI feedback while open is pending 2012-06-18 21:07:34 +00:00
zzz
4dcfe3e434 * i2psnark:
- Improve torrent shutdown handling to maximize chance of
     announces getting to tracker
   - Clean up delete-torrent messages
   - Remove redundant shutdown hook
   - Avoid NPE in PEX message handling
   - Log tweaks
2012-06-18 18:06:47 +00:00
zzz
273d7399a0 jump table tweak 2012-06-15 01:30:58 +00:00
zzz
5ce0479268 tweaks 2012-06-15 01:29:29 +00:00
zzz
de3ce6cdb7 handle jump servers with ports 2012-06-14 22:08:40 +00:00
zzz
3e192cc57e remove text about restart 2012-06-14 22:07:28 +00:00
zzz
6c5902837c * NetDB: Only publish stats every so often, to improve
anonymity while preserving the ability to monitor
          the network (effective next release)
2012-06-14 19:48:12 +00:00
zzz
e522ffad4e * I2PTunnel:
- More client options cleanups
   - Options changes now propagate to running
     socket managers and sessions, and through to the router
 * SocketManager:
   - Simplify factory, use 4-arg constructor,
     make fields final, deprecate 0-arg constructor
   - Improve how options are updated
   - Javadocs
2012-06-14 19:44:47 +00:00
zzz
64221fb3fb * I2PSocketEepGet: Use specified port
* I2PTunnel:
   - Don't strip port from an I2P URL
2012-06-14 19:42:07 +00:00
zzz
c73044b6b4 * Streaming:
- Channel cleanups and comments
   - New I2PSocketAddress
2012-06-13 19:08:49 +00:00
zzz
ad1b356879 * i2psnark: Possible fix for piece-after-choke 2012-06-13 19:04:11 +00:00
zzz
07caf2e316 * I2PSocketEepGet: Set port to 80
* I2PTunnel:
   - Pass port through HTTP client proxy
   - HTTP server proxy sets host header to
     the value of "spoofedhost.xx" option for port xx
   - Set client options more efficiently
2012-06-13 19:02:09 +00:00
zzz
c2137a2a80 - Add explore thread
- More checks for stopping
- Add xor of port to secure NID
2012-06-12 21:38:25 +00:00
zzz
44da37f009 - Timeout if can't find b32
- Refactor ReplyWaiter
2012-06-12 19:22:31 +00:00
zzz
d0b967388a rework DHTNodes to hide the CHM implementation, in prep for real Kad 2012-06-12 18:30:58 +00:00
zzz
41096c7f23 - Add heardAbout() and call for receive peers
- Move last-seen tracking from NodeInfo to NID, add fail tracking
- Make NodeInfo fields final
- Remove nodes on consecutive failures
- Only persist nodes heard from recently
- Implement NID verification for security
2012-06-12 18:09:42 +00:00
4f6fb6993d Pass requestURI through to xhr1.jsp so forms work and correct summary bar is chosen 2012-06-12 00:12:51 +00:00
fa3e3e0764 Enforcing minimum refresh rate better, and reducing it to 3 seconds
This does mean that the iframe don't-refresh state (= refresh rate of 0 seconds)
doesn't hold if the page is changed (in fact, the refresh rate becomes the
minimum) - so maybe better to have a different config var for that?
2012-06-11 23:33:33 +00:00
zzz
fe2b97c941 propagate from branch 'i2p.i2p' (head 27fc588723d201c76ea9c18a6c715b11efcb5b0e)
to branch 'i2p.i2p.zzz.dhtsnark' (head cae6d265415ba9ed4242b3fc888ffcf2a1c1b2f2)
2012-06-11 20:29:19 +00:00
zzz
6e52ae307c * Router: Don't let shutdown tasks hang the shutdown 2012-06-11 20:09:31 +00:00
zzz
6e077ee621 * i2psnark:
- Reduce TrackerClient threads
   - Reduce delay between peer adds for faster startup
   - Thread the announces and reduce timeout when stopping
2012-06-11 19:38:33 +00:00
zzz
30e2f73d5f * i2psnark:
- Display torrent file downloads in torrent area
   - Sort magnets and downloads first
   - Fix sorting problem when torrent dir is a symlink
   - Reduce max file idle time
   - arrow_down icon copied from console css
2012-06-11 12:04:40 +00:00
zzz
7469e9c63d * NativeBigInteger: Workaround for Raspberry Pi to load the correct lib 2012-06-11 11:48:34 +00:00
296ddbe930 Removed some unnecessary <hr>s 2012-06-11 05:32:53 +00:00
e20f2d0bf6 Summary bar for /home defaults to reduced preset, everywhere else to full preset 2012-06-11 05:29:27 +00:00
cc61f4eb61 Some changes to enable per-page sidebar configuration from the config file 2012-06-09 13:48:26 +00:00
0a61b8052c propagate from branch 'i2p.i2p' (head 44d553e8644f01d5e5af3c3145210bdb0a923d3c)
to branch 'i2p.i2p.str4d.fux' (head 51022349e906bd393602b558861bcaaac4d56c89)
2012-06-09 06:11:40 +00:00
cbcbfea6e8 Shorten /i2ptunnelmanager to /i2ptunnelmgr (/i2ptunnel is surplanted by /i2ptunnel/) 2012-06-09 06:08:44 +00:00
57abfe7653 Set position: absolute for div.routersummaryouter so /home app icons don't clear past it 2012-06-09 04:33:29 +00:00
zzz
e0313814b8 disable private config for default trackers 2012-06-08 16:39:10 +00:00
zzz
59df524a91 * i2psnark:
- Move private tracker config from create box to torrent config
   - Refactor private and open tracker configuration
   - Add private indication on details page
2012-06-08 16:11:55 +00:00
zzz
b304393bc3 * netdb.jsp: Don't show our info on summary page since there's a tab for it now 2012-06-08 16:10:26 +00:00
f6304ccd4d Commented out "All times are UTC" blurb because all graphs are labeled UTC 2012-06-08 12:58:50 +00:00
9d241cc0d4 Added tooltips to the various sections of the summary bar 2012-06-07 14:14:13 +00:00
a46ca210f5 Added some spaces to notification messages on /configsidebar 2012-06-07 11:11:37 +00:00
328857f97f Tweaks to config nav bar in dark theme from dr|z3d 2012-06-07 10:39:14 +00:00
b00fbfa23d Centre box for order of new section, and add default value 2012-06-07 10:26:44 +00:00
3a75f8d7d1 Modifying section addition to show an option list
Also adding form handler class that I forgot to commit earlier.
2012-06-07 04:42:52 +00:00
84344b6789 Added a config page for summary bar 2012-06-07 02:51:22 +00:00
b75d28fd0d Added /i2ptunnelmanager which wraps /i2ptunnel/ in an IFrame
/i2ptunnelmanager redirects to /i2ptunnel/ if the browser doesn't support IFrames.
2012-06-05 15:19:40 +00:00
a8424e59b0 propagate from branch 'i2p.i2p' (head ab5f37b28e499d49e108e8e6869164d107c7049e)
to branch 'i2p.i2p.str4d.fux' (head fb4425cd3e38762f211f73d91c7a173972e7145c)
2012-06-05 13:38:02 +00:00
420bf851b5 Added Ajax script to every routerconsole page that includes summary.jsi 2012-06-05 13:37:10 +00:00
83c8233812 Insert routerconsole.summaryRefresh config value into Ajax script
This way, both Ajax and IFrame get their refresh time from config (though
IFrame one can still be modified live).
2012-06-05 13:00:40 +00:00
52a3860717 Rearrange summary bar code to consolidate Ajax and IFrame, and /home and /console
Now, Ajax will be used first, and will fall back to IFrame if JS is disabled,
and a separate page if on a text or mobile browser.
Also, /home and /console (and everywhere) now all have the same summary bar
content, which currently defaults to the original full listing.
2012-06-05 12:44:17 +00:00
531c6c0f4c Implementation of customisable summary bar via routerconsole.summaryBar property
The initial attempt using mapping of strings to methods is shorter and neater,
but also doesn't work so is commented out.
2012-06-05 07:36:24 +00:00
5699b4515b Preparations for making the summary bar customisable 2012-06-05 02:12:30 +00:00
zzz
6a1b90f8f8 hash caching 2012-06-05 01:03:39 +00:00
ceedc9c645 Moved rendering of news headings into SummaryBarRenderer
An instance of NewsHelper needs to be passed in to get output.
2012-06-04 23:46:03 +00:00
zzz
3f40487c99 - Add persistent local DHT storage
- Shutdown now closes tunnel
- Delay after sending stop announces at shutdown
- Stub out using Hash cache
- Implement stop for all cleaners
- Log tweaks
2012-06-04 22:34:56 +00:00
zzz
a6f7761544 propagate from branch 'i2p.i2p' (head ab5f37b28e499d49e108e8e6869164d107c7049e)
to branch 'i2p.i2p.zzz.dhtsnark' (head afa1bbfb0882c9c1946ec32b87300e127c9928b2)
2012-06-04 14:26:10 +00:00
zzz
e1c9cd6cdc * i2psnark: Take tracker out of opentracker list when removed 2012-06-04 14:25:53 +00:00
zzz
d5cb443925 - Switch back from storing NID to full NodeInfo for outgoing tokens so they don't get expired early
- Announce only to the single closest DHT peer
- Increase random port range
- Decrease max local tracker and DHT size
2012-06-04 14:15:38 +00:00
9333cd56f9 Moved calls to external renderers into separate methods to match the rest 2012-06-04 13:28:52 +00:00
910001e3a1 Split HTML rendering of summary bar into separate methods
This solidifies the summary bar design pattern of modular sections separated by
<hr>s which in future could be reordered or hidden without affecting the theme.
2012-06-04 13:10:12 +00:00
zzz
121491a3be - B32 lookup if required for non-announce queries only
- Token timeout tweaks
- Most classes package private
2012-06-03 16:05:38 +00:00
zzz
152b2152cb - Fix node ID / node info confusion
- Fix updating node ID when receiving pong
- Fix getting DHT enable setting from config file
- Fix handling of get_peers replies
- Fix sending and receiving announces without signing
- Fix incoming/outgoing token handling
- Set cleanup timer for all queries
- More debug logging
2012-06-03 15:25:51 +00:00
0abbe45a6d correct flag country (I copied the line and changed all but the flag) 2012-06-03 15:02:27 +00:00
403d6a322a Italian language updates from tx & debconf updates
-10
2012-06-03 14:34:39 +00:00
4ec20ef796 typo fix (*facepalm*) 2012-06-03 14:09:41 +00:00
3b7eaa107e s/$ENGLISHNAME/$NATIVENAME/g 2012-06-03 13:52:27 +00:00
8375e9129d enable Hungarian in another spot 2012-06-03 13:46:33 +00:00
53fbece6b5 Hungarian language translation by AdminLMH from TX
Thanks!
2012-06-03 13:46:07 +00:00
69d909d3eb Added <hr>s to separate the various logs on /logs 2012-06-03 00:22:03 +00:00
zzz
4346c90aa2 lower log level 2012-06-02 21:45:00 +00:00
zzz
f8c185d09f prep for merging 2012-06-02 21:44:23 +00:00
zzz
558bb2f4f3 select proto on UDP send 2012-06-02 18:56:10 +00:00
zzz
7b07eb89a3 - Uncomment DHT
- Change DHT from option bit to extension message
- Add DHT start/stop code
- Add UI for DHT enabling
- Add raw datagram protocol type and use for response port
2012-06-02 18:52:46 +00:00
zzz
bec33cad87 propagate from branch 'i2p.i2p' (head f005cd64cce03cf3a301359f94380bc20eaa7c61)
to branch 'i2p.i2p.zzz.dhtsnark' (head 0562e4f429dcebf3f623d0975bd3a63d7645c0b7)
2012-06-02 15:16:14 +00:00
zzz
eb6217add9 add failsafe check for job queue sort order 2012-06-02 13:49:38 +00:00
zzz
7d94f9fb19 improve opentracker configuration 2012-06-02 13:49:14 +00:00
zzz
324e9c960d fix partially-complete torrent not announcing 2012-06-01 14:12:32 +00:00
zzz
96575e61f2 * Console: Tab the netdb and profile pages 2012-06-01 13:30:38 +00:00
zzz
8d57cba762 * NetDB: Reduce flood redundancy from 8x to 6x 2012-06-01 13:27:53 +00:00
zzz
e1823ece68 whitespace fix 2012-06-01 13:27:01 +00:00
b23414eab1 Reordered /home summarybar, added <hr> after update download button 2012-06-01 01:21:57 +00:00
zzz
38a4f05000 * i2psnark:
- Close connection immediately if bad protocol,
     this makes blacklist work better too
   - Stop adding peers when we hit the limit
   - Lower limit for outbound connections so we give
     new peers a better chance in large swarms
2012-05-31 15:20:50 +00:00
zzz
041c87a2c9 * i2psnark:
- Add per-hour conn limit
   - Blacklist peer after two bad handshakes
   - Reduce connect timeout
2012-05-31 12:19:27 +00:00
ef06fc758c Show news headings in the /home sidebar when the main news div is hidden
Note: this now refreshes along with the rest of the sidebar, so the news.xml
file is read once every 15s - it may be better to cache the headings somewhere,
though it's debatable whether reading the cache file is better than reading the
news.xml file...
2012-05-31 09:30:30 +00:00
9f1c95c829 rework patch to deal with my earlier changes to jcpuid's build.sh 2012-05-30 20:42:06 +00:00
zzz
f14ff31a20 * Timestamper:
- Move from core to router, leave stub in core
     so it doesn't break compatibility. This removes a
     thread in app context and prevents any app context from
     running NTP; external clients must use the time
     received from the router.
   - Increase query interval
2012-05-30 20:03:30 +00:00
zzz
ddc329e8f1 Handle URI encoding, UTF-8, and multiple trackers in magnet links 2012-05-30 19:45:45 +00:00
zzz
8453c34bfc Improve rarest-first behavior by not favoring a partial piece
held by multiple peers when requesting from a seed
2012-05-30 15:21:37 +00:00
zzz
c6fcdf967c increase per-minute conn limit from 6 to 8 2012-05-30 14:10:03 +00:00
zzz
1427c502c0 Reduce log level to warn for normal EofException when generating graphs 2012-05-30 14:09:16 +00:00
zzz
4e84370128 Increase max upstream form field to 4 digits (9999) ticket #645 2012-05-30 14:06:45 +00:00
zzz
5314d886be merge of '539c9ff2992eb584e2c311924370437f167f0b99'
and 'b355f1862601a6a192c42f1f50743f2a4f0b4c22'
2012-05-28 22:20:19 +00:00
zzz
829af21c49 javadoc fix 2012-05-28 18:04:11 +00:00
c9406b8f96 document changes for Arch 2012-05-28 17:01:31 +00:00
af398632f3 Add initscript support to i2prouter for ArchLinux
With this commit, ArchLinux users can run "i2prouter install" to install an
initscript to /etc/rc.d.
2012-05-28 16:59:47 +00:00
e574b5e61a minor updates to jbigi/jcpuid scripts
- use my find-java-home stub script when building jcupid
- move find-java-home to core/c
- add support for ArchLinux to find-java-home
2012-05-28 16:56:08 +00:00
d946fda859 Replace reseed host i2pbote.net with euve5653.vserver.de (http://trac.i2p2.i2p/ticket/445) 2012-05-26 07:25:44 +00:00
df3771e791 merge of '60890b0ffbf109b297bd6dd66a28d8179322331a'
and '7e63908db8b78229f8f0c963050b062ce0f6dd96'
2012-05-25 21:09:25 +00:00
zzz
df00725077 compile fixup after merge 2012-05-25 20:30:06 +00:00
zzz
26846d592c merge of '10bd7656ab9a474e3bb2d405d50261f147690ce4'
and 'c3f96ef85962a5e9a3896e117036cc83b37fe3a8'
2012-05-25 20:11:28 +00:00
zzz
21466e017f explicit merge of 'dd3f93f7ec59e6a7f967945a75c5d4d7b53539ed'
and 'e99d32aef6da4112890ebe09c3f7d8fcb8b647e5'
2012-05-25 19:55:02 +00:00
zzz
b033db969c Revert all changes to the org/cybergarage library
in the 2009-08-11 whitespace cleanup at ef1c23821d433903124f7612cbc46ac096fc985b
to make merging with the newer library easier.
2012-05-25 19:52:39 +00:00
zzz
d18e4d430c explicit merge of '59eae97dbb470d8c4a1e4dba3a9763e134bb0c53'
and 'aeec86a504a5fd67dff12d6775411a9c865d42ad'


Merge to aeec86a504a5fd67dff12d6775411a9c865d42ad
which is just before the 2009-08-11 whitespace cleanup at ef1c23821d433903124f7612cbc46ac096fc985b
2012-05-25 19:36:22 +00:00
zzz
14ac5ac03e Cyberlink for Java v2.1 (2011-09-16) from SVN,
with extra parsers in xml/parsers removed.
Diverging from original v1.7 checkin in prep for merging.
2012-05-25 17:47:18 +00:00
464279ca1c German, Spanish, and Swedish translations from Transifex 2012-05-25 12:40:12 +00:00
6014de9cd5 Italian translation updates from Transifex (thanks colombo-bt!) 2012-05-25 11:05:22 +00:00
e7c3e07626 A few more CSS changes to finish tweaking /home.jsp for the other themes 2012-05-25 05:27:46 +00:00
c4057bb5a0 A few trivial CSS changes to get /home.jsp looking better with the other themes 2012-05-25 01:27:48 +00:00
34f0420753 Changes to dark theme
- improve /home.jsp
- general theme tweaks and fixes
2012-05-25 00:58:29 +00:00
10bd1343c3 Changes to structure of /home.jsp to bring it back in line with /console.jsp 2012-05-25 00:43:29 +00:00
zzz
4979f8dace - Custom tracker map AIOOBE fix, thx kytv 2012-05-23 22:40:03 +00:00
zzz
b2846de94f propagate from branch 'i2p.i2p' (head 8066e0ff00b526c6971e77de44ff2d322f25069a)
to branch 'i2p.i2p.zzz.dhtsnark' (head f857dd921a7c806c85eb80419f4f9fdd3b6428a2)
2012-05-23 16:56:13 +00:00
zzz
501f2f85d5 * jobs.jsp: Add more queue diagnostics 2012-05-23 16:37:43 +00:00
zzz
580bb5a6fe * i2psnark:
- Fixes when complete except for skipped files
     (ticket #447) status in UI, don't connect outbound,
     disconnect seeds when done
   - More classes pkg private
2012-05-23 16:36:37 +00:00
zzz
e27df771aa - Fix deadlock when changing file priorities 2012-05-22 19:26:37 +00:00
zzz
0f321f1597 - Refactor tracker map 2012-05-22 18:19:52 +00:00
zzz
10872f751e - Prevent torrent shutdown when changing file priority to skip 2012-05-22 18:18:30 +00:00
zzz
20567ae75e * RoutingKeyModifier: Update after large clock shift 2012-05-22 18:16:51 +00:00
zzz
f06d99480d javadoc fixes 2012-05-21 12:53:56 +00:00
zzz
c2e39687e6 * RoutingKeyModifier: Several changes to ensure the routing key
is correctly changed just after midnight.
2012-05-20 18:20:48 +00:00
zzz
6972d9d02b change stat name, log tweak 2012-05-20 18:18:58 +00:00
zzz
d8b3d2c508 * i2psnark:
- Create sparse files at torrent creation and delay
     "ballooning" until first write (ticket #641)
   - Redo clear messages button
   - Concurrent message queue
2012-05-20 18:15:36 +00:00
zzz
1da1dce981 * Profiles: reduce same-country bonus 2012-05-20 18:13:11 +00:00
zzz
c4f9485e13 * Console: Add full file path to thread dump message 2012-05-20 18:12:41 +00:00
zzz
9cff4d5a42 final 2012-05-20 18:12:20 +00:00
zzz
6ca4b519bf * i2psnark:
- Store received chunks in temp files
   - Don't allocate from heap for unneeded chunks
   - Remove peer count restriction for torrents with large pieces
   - Use priorities and rarest calculations to sort partials
   - Preserve p parameter in clear messages link
2012-05-19 13:27:02 +00:00
zzz
3685bf04d0 add X-Frame-Options to console headers 2012-05-13 13:05:17 +00:00
zzz
fc5e30e6ae better throttle log msgs 2012-05-09 21:07:33 +00:00
zzz
047c668ee1 dont include wrapper .txt files in installer 2012-05-09 21:06:59 +00:00
zzz
e55a1f608a comment out unused text summaries 2012-05-09 21:05:34 +00:00
cbbf82a4ae Stricter match by matching 'Version:' 2012-05-09 02:18:20 +00:00
81d9e2f164 update changelog 2012-05-06 10:36:22 +00:00
8397296286 Add 'graceful' / comment out stanza not needed on Ubuntu 2012-05-06 10:35:59 +00:00
06d0412558 Spanish & German translation updates from transifex
(These were sent to transifex too late to make it into 0.9)
2012-05-05 20:30:08 +00:00
ffde067c5e s/Reunion/Réunion/ 2012-05-05 16:00:37 +00:00
zzz
c4a05ec49e add missing wrapper.jar to installer-nowindows 2012-05-02 13:14:44 +00:00
zzz
ed92411df2 installer target fixes 2012-05-01 23:41:04 +00:00
zzz
7a690b245f rename windows installer; 0.9 2012-05-01 21:06:17 +00:00
7af65f4346 Update russian translation 2012-04-29 17:31:24 +00:00
c89e127d8a Added missing test classes to net.i2p.data.i2cp 2012-04-27 03:00:45 +00:00
104bfa8784 Exclude TestSuite classes from testing 2012-04-27 02:45:00 +00:00
3013b56d16 Fixed server tunnel wizard bug - pass a value for privKeyFile 2012-04-26 23:01:12 +00:00
188316132e refer to translation updates 2012-04-26 18:37:18 +00:00
53c7f7d602 use our jstl.jar instead of glassfish 2012-04-26 18:19:48 +00:00
3ccc102412 German, Spanish, and Swedish translation updates from Transifex 2012-04-26 18:19:07 +00:00
e99749097a Moved tests for net.i2p.data.i2cp into the correct subdirectory 2012-04-26 12:08:14 +00:00
zzz
9d1995125a xml fix 2012-04-21 14:43:51 +00:00
b18f654e37 look for ^# so there aren't surprises later (thanks for pointing it out, darrob!) 2012-04-20 20:14:59 +00:00
a70d9394da pushed to tx after fixing the bundle-messages script 2012-04-20 19:11:58 +00:00
6eff7be49a Avoid catching comments in countries.txt 2012-04-20 18:09:40 +00:00
zzz
01efcd3156 merge of '4f47546a7fcac5e20d0d9ac04bcae904bb155cc9'
and '71ed1d74f02291ae56a495e97fae65970bfbdd30'
2012-04-20 13:55:39 +00:00
zzz
112b88a7f9 * Fix i2psnark dir when started from Windows no-wrapper (ticket #627) 2012-04-20 13:44:41 +00:00
c61b73c281 use <os family="unix"> instead of just <os = 'unix'> 2012-04-20 13:26:23 +00:00
zzz
79a7c14fdf remove search box 2012-04-20 13:25:29 +00:00
e4513d18b9 manpage updates 2012-04-19 23:25:32 +00:00
7870ededcb Updated en locale files pushed to tx 2012-04-19 23:24:20 +00:00
195a4e971d merge of '06de0d416fefcfbd6ce12716ce5fed4eefe8a711'
and 'e78c33c88a31edac9e53dd6cdf973886ecabd996'
2012-04-18 18:48:26 +00:00
aa02358b1b disapproval of revision '78927d1f7087f93dca9a96ac375d05d01596fb74' 2012-04-18 18:48:20 +00:00
18fe05b9ef merge of '06b8a711c60dbb6a9d628c4c5ffd8b205176271a'
and 'c1edfeadb75181e65ad8d4c0005b861f3563dd5b'
2012-04-18 18:47:53 +00:00
5b5b3b203c s/unix|mac/unix/ 2012-04-18 18:47:43 +00:00
49cee5bf58 disable the 'convenience links' in /etc/i2p. 2012-04-18 01:45:08 +00:00
ac1b51c9ac Fix installer-windows build target
Izpack tries to parse the 'unix-only' files in Windows. If we don't copy them,
the installation will fail in Windows. Therefore, moving the files that were in
the preppkg-unix target to the preppkg-base target. They're so small I don't
see how this will be a problem.
2012-04-18 01:44:17 +00:00
746b91f257 Since it was suggested, I'm adding my eepsite 2012-04-18 01:41:38 +00:00
77d970fd5a debian: initscript: reorder, change some exit statuses 2012-04-17 12:33:30 +00:00
678c87d0f4 bump version to -27 (debian package fix and people can get the new wrapper & geoip) 2012-04-17 11:49:45 +00:00
f352a38836 revert back to linking to glassfish-javaee.jar (fixes susidns and i2pbote in Debian) 2012-04-15 22:19:44 +00:00
d402f0c93d history update 2012-04-14 17:46:17 +00:00
7093a57a03 update GeoIP using Maxmind's April 2012 db 2012-04-14 17:44:30 +00:00
6a9432d62e Update the Tanuki Java wrapper to v3.5.14
All are from the "delta-pack" with the following exceptions:

* binaries for FreeBSD have been compiled in FreeBSD 7.4 to eliminate the
  dependency on FBSD v6 compatibility libs. They've also been stripped.
* Tanuki doesn't offer win64 binaries. Since the x64 binaries had to be
  compiled anyway, I've added an itoopie icon to the binary and both x86 and
  x64 binaries are compiled by me.
* Linux PPC binaries have been compiled by me since upstream mistakenly ships a
  64bit PPC binary as a 32bit binary.
* Linux ARMv5 have been compiled by me.
* The Linux x64 and x86 binaries have been stripped.
2012-04-14 17:38:08 +00:00
7440e64eb6 dropping FAT osx wrapper before adding new 'non-FAT' one 2012-04-14 17:25:49 +00:00
zzz
97436e8357 Wrapper files for armv7.
Compiled on trimslice:
    gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) 
    java version "1.6.0_18"
    OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0ubuntu1~11.04.1)
    OpenJDK Zero VM (build 14.0-b16, mixed mode)
    Wrapper 3.5.14 GPLv2
    All binaries stripped.
2012-04-14 14:16:36 +00:00
f9ff90eb72 update comments 2012-04-12 21:05:19 +00:00
6acece85a2 German, Spanish, and Swedish translation updates from Transifex 2012-04-12 20:25:52 +00:00
zzz
2d24f01831 - Non-default theme cleanups
- Theme and translate home page logo
2012-04-12 17:54:44 +00:00
zzz
f2b228561f strip DOS line endings to make diffing to other themese easier 2012-04-12 15:29:26 +00:00
zzz
ce9cae4ff8 fix whitespace issues 2012-04-12 15:21:21 +00:00
zzz
c3a387d646 Try again to fix console on Windows w/o IPv6 by starting connectors individually 2012-04-12 14:54:50 +00:00
zzz
b24085bbe5 prevent very early NPE 2012-04-12 14:48:18 +00:00
41419738c5 add keys.i2p 2012-04-09 15:27:07 +00:00
dd65f174ef Debian: Explicitly create the home directory in the postinst
Older versions of adduser create it automatically. The version in Debian unstable apparently does not...
2012-04-08 20:35:30 +00:00
d888d4834d Debian: update symlinks 2012-04-03 21:17:14 +00:00
ce8cd91d72 propagate from branch 'i2p.i2p' (head 3002b47d5d20180f84fb6a4f161823bc751989be)
to branch 'i2p.i2p.unittests' (head 97dc8de19916c3d0c7ec42790800c1e23f9ce9e8)
2012-03-30 05:10:53 +00:00
0cefaba925 More excess whitespace removed 2012-03-30 04:40:56 +00:00
zzz
565807126c * RouterInfo: Fix fatal NPE in last checkin 2012-03-28 19:17:39 +00:00
zzz
bed548d5af 24 2012-03-27 20:34:40 +00:00
zzz
fbd230f21e * RouterInfo: Add method to validate sig during read-in for speed 2012-03-27 20:25:26 +00:00
zzz
dc402acd4a * FloodfillVerify:
- Fix verifies stuck on one peer by blamimg the verify peer on failure
    - Follow DSRM in response to RI verifies, to help integration
    - Increase floodfill verify timeout
2012-03-27 20:10:30 +00:00
zzz
e3dab56e79 Delay router down message until two consecutive fails 2012-03-27 20:08:11 +00:00
zzz
d3578e2a2e graphs CSS tweak 2012-03-27 20:07:30 +00:00
zzz
7a6e7baf18 generics and final 2012-03-27 20:07:12 +00:00
97f23286d3 allow SHOUTcast/icecast to work over the http proxy + cleanups 2012-03-27 17:41:02 +00:00
zzz
11ff89fef2 - Try again to fix console on Windows w/o IPv6 (ticket # 621) 2012-03-26 14:07:38 +00:00
zzz
764a7f2e13 remove unused private items (eclipse) 2012-03-26 00:52:06 +00:00
zzz
1db58dee89 remove unused local variables (eclipse) 2012-03-25 22:16:03 +00:00
zzz
f13956d380 remove unused imports (eclipse) 2012-03-25 21:45:18 +00:00
zzz
522ae4eb41 fix fallthrough 2012-03-25 20:52:57 +00:00
zzz
3e889d2747 remove unnecessary casts (eclipse) 2012-03-25 20:42:41 +00:00
zzz
ed13424913 - Move oldconsole rendering from Router to OldConsoleHelper 2012-03-24 23:04:05 +00:00
zzz
bdfca07626 - Fix dup torrent msg with magnets (tickets #433 and #504)
- Fix state when storage dies during transition out of magnet mode
    - Fix NPE in magnet mode
    - Error logging improvements
    - Support add-torrent with infohash alone
    - CSS tweaks
2012-03-24 12:58:13 +00:00
ba3bc9e2ed Uncommented two Datagram tests that currently throw NullPointerExceptions 2012-03-24 11:18:37 +00:00
f164951848 Actually test something in DatagramTest.testBadagram, remove excess whitespace 2012-03-24 08:04:49 +00:00
bfaf72a547 Added a couple of tests for net.i2p.client.naming 2012-03-24 05:09:31 +00:00
zzz
008c79e743 comment out unused GarlicConfig methods 2012-03-23 17:02:32 +00:00
zzz
0d565818d4 final 2012-03-23 17:01:34 +00:00
zzz
c1a7f90860 test cleanup 2012-03-23 17:01:24 +00:00
zzz
c2e36453b8 undeprecate for syndie 2012-03-23 17:00:51 +00:00
zzz
675e8a91a4 * RetransmissionTimer: Instantiate per-destination 2012-03-22 20:40:35 +00:00
zzz
cae94320b5 remove FlushTimer 2012-03-22 19:55:40 +00:00
zzz
bafef846d9 * SimpleScheduler, SimpleTimer, SimpleTimer2: Replace static instances
with I2PAppContext-rooted references
2012-03-22 19:53:05 +00:00
zzz
db42a46c71 home page CSS 2012-03-22 19:49:48 +00:00
zzz
adcd1e8d9a * Reseeder: Get rid of static instance, root in netDB,
don't use system properties for status
2012-03-22 19:47:44 +00:00
zzz
ca57b71266 * Router: When removing a config setting, remove from context also 2012-03-22 19:40:17 +00:00
zzz
e3da181cea * NetDB:
- Don't reread RI if netdb date is recent
    - Prevent LS/RI overwrites
    - Disallow hash mismatches in RI files
    - Reseed won't fetch our own RI
    - Reseed won't overwrite recent RIs
2012-03-20 18:38:28 +00:00
zzz
3da6ccfbbe make runRouter() public 2012-03-20 14:52:22 +00:00
zzz
444ba47463 * i2psnark: Message area tweaks and clear link 2012-03-20 14:09:17 +00:00
377aa9bca1 In core build.xml, tell junit to look for the hamcrest libraries
hamcrest-core.jar, hamcrest-library.jar and hamcrest-integration.jar should be
present in $ANT_HOME/lib/ (real or symlinked).
2012-03-20 00:29:14 +00:00
4ffbfce51e Plugins: Order and reverse order plugin names for start/stop all cases. 2012-03-19 12:37:39 +00:00
d1ed30e79c Plugins: less confusing message, fix CNFE by catch and ignore on delete. 2012-03-19 01:46:47 +00:00
zzz
8ca5591933 fix check aliases override 2012-03-18 14:05:14 +00:00
zzz
7d9db79619 fix build 2012-03-18 00:07:46 +00:00
zzz
508533b83e -17 2012-03-17 22:07:51 +00:00
zzz
0a521b7456 * BuildHandler: Implement restart and shutdown to stop the thread 2012-03-17 21:58:41 +00:00
zzz
0c348ec17e * FileUtil: Better logging of weird unpack200 errors 2012-03-17 21:56:20 +00:00
zzz
df8bab6b72 * Streaming: Scheduler cleanup 2012-03-17 21:55:05 +00:00
zzz
f6fb4b4be3 news header 2012-03-17 21:53:14 +00:00
zzz
0f74ccd446 add servlet version 2012-03-17 21:52:48 +00:00
zzz
02bde80725 * Jetty: Don't extract wars 2012-03-17 21:52:17 +00:00
zzz
e2a39a3eb5 * I2PTunnel: Make CLI-only methods private, and static where possible 2012-03-17 21:49:11 +00:00
zzz
3a2fe5e860 * OCMOSJ: Refactor cache to its own class, make non-static 2012-03-16 12:20:29 +00:00
zzz
fb8244ee1a javadoc 2012-03-16 12:18:04 +00:00
zzz
045627a583 throw ISE on attempt to change peer value 2012-03-16 12:17:07 +00:00
zzz
e7898b5b8f * FragmentHandler: Zero-copy read of unfragmented messages
for speed and to reduce object churn
  * FragmentedMessage cleanup
2012-03-16 12:16:05 +00:00
zzz
080f435708 * TransportManager: Fix fatal exception on soft restart caused by DHSKB refactoring 2012-03-16 12:13:20 +00:00
zzz
f2a3d597dd * Jetty: Add I2P mime types to default eepsite config 2012-03-16 12:11:31 +00:00
zzz
74743357d0 * TrustedUpdate: Preserve default key names even when keys are set
in advanced config
2012-03-16 12:09:49 +00:00
zzz
1de88909e9 * Home page: Tag tooltip; CSS tweaks; news tweak 2012-03-16 12:08:43 +00:00
zzz
f7dc55f087 * HTTP Proxy: Jump and addresshelper page tweaks 2012-03-16 12:07:13 +00:00
67da35ab35 Commented out test for net.i2p.data.Lease.getNumSuccess() / getNumFailure 2012-03-16 05:08:31 +00:00
136d77a8aa Fix YKGenerator test - methods no longer static 2012-03-16 04:51:55 +00:00
bf0b59b3b3 Remove DHSessionKeyBuilderTest from CryptoTestSuite 2012-03-16 03:18:53 +00:00
f19bc6a4b0 Moved DHSessionKeyBuilderTest to net.i2p.router.transport.crypto 2012-03-16 03:08:10 +00:00
79ab065500 propagate from branch 'i2p.i2p' (head e1c79060790ae24b2a96aff2857477d6528ae7c6)
to branch 'i2p.i2p.unittests' (head 357abd51672dd9950cbac6dd30ded117fe5695e0)
2012-03-16 02:30:42 +00:00
9d07bc241c Replace hostname included by junit in reports with "i2ptester"
The fake hostname can be overridden by setting the host.fakename property.
2012-03-16 01:41:23 +00:00
d9ba62aa2c Update paths, add new files 2012-03-15 14:51:34 +00:00
1f407bc34f Plugins 2012-03-15 00:39:11 +00:00
zzz
1aa6367517 orb->org 2012-03-14 12:45:27 +00:00
zzz
2436d86000 * DHSessionKeyBuilder:
- Move from core to router/transport
    - Make non-static, instantiate in TransportManager
    - Generate keypair in constructor and make final
      to move more processing to the precalc thread
      and eliminate races
    - Synchronize getSessionKey() to eliminate races
    - Comment out unused methods
  * UDPTransport:
    - Make key builder final in InboundEstablishState to
      eliminate rare NPE (ticket #406)
    - Remove unused static instance
2012-03-14 12:09:02 +00:00
zzz
17f9280b3f * Jetty:
- Set default cache-control for webapps and eepsite
    - Disable dir listing for console webapps
  * WebAppStarter: Remove static log
2012-03-14 12:04:20 +00:00
zzz
326b9998fd make YKGenerator non-static; control from ElGamalEngine 2012-03-14 11:59:24 +00:00
zzz
3b64ce7408 remove static logs 2012-03-14 11:57:06 +00:00
zzz
7c88180b83 remove static logs 2012-03-14 11:55:13 +00:00
7d0741bd7e Add plugin site 2012-03-13 21:48:02 +00:00
65612a1c86 merge of '7bb8bf1ecf9084d263f4d9a764330dd19faf6102'
and 'bd10ddbf34b82a92bfbca38cefbba707a709c251'
2012-03-13 21:38:56 +00:00
a408a43d96 Add plugin site host key 2012-03-13 21:38:25 +00:00
bc0a38b405 Fix grammar error, thanx user 2012-03-13 19:54:07 +00:00
913994f312 Add sponge.i2p :-D bump version. 2012-03-13 11:11:41 +00:00
0fabbc9039 Plugins: bugfix and defer update. 2012-03-13 09:49:15 +00:00
92c3d33ce5 Plugins: Handle 'file://' URLs for installation and updates. 2012-03-13 05:49:02 +00:00
zzz
d29da5597f merge of '4db3befef542b29ac21bba7ed51b609b6e9223ea'
and 'fe5447c647ccadee0d67aa5db36f5ed785520a1b'
2012-03-12 15:02:49 +00:00
zzz
2415091a2f * Console:
- Better IPv6 test, hopefully will work on Windows
    - Hide home page flags once language is selected
    - Home page shrinkage and other CSS tweaks
2012-03-12 14:30:38 +00:00
05537ba1b2 Slackware package script updates 2012-03-11 23:54:02 +00:00
zzz
703f28e87d * Build:
- Include old commons logging classes in commons-logging.jar
    - Preserve manifests in Jetty/Tomcat jars
  * Jetty Logger: Promote warns to erros when a Throwable is the second arg
2012-03-11 18:30:43 +00:00
f91f83faef fix broken comment in jetty.xml 2012-03-11 16:46:45 +00:00
d598396bb2 Add 'unsignedbuild' id 2012-03-11 13:02:51 +00:00
zzz
fdb1f9dd39 IPv4 check 2012-03-10 22:07:15 +00:00
zzz
9e3b49d67f -10 2012-03-10 21:59:26 +00:00
zzz
f6bda355b9 * Build: Add new jetty jars to router.jar classpath so it works
on very old installs with individual jars specified in the
    wrapper.config classpath
2012-03-10 21:55:45 +00:00
zzz
a34b674f7d more comment updates 2012-03-10 21:54:55 +00:00
zzz
307826c4d3 move the update-all button 2012-03-10 21:54:38 +00:00
zzz
9faba9fd30 * Console: Test if IPv6 addresses will work before instantiating
connectors, so Jetty will still start without them
2012-03-10 21:53:29 +00:00
zzz
87c04bf00b * configloggging: Fix clearing log overrides 2012-03-10 21:51:50 +00:00
zzz
7bd83f83ed * Jetty Logger: Put a note in wrapper log saying where the logs went 2012-03-10 21:51:20 +00:00
zzz
528ef4dd1a * HTTP Proxy: Fix generation of jump links (ticket #616),
broken by refactoring in -1
2012-03-10 21:50:45 +00:00
zzz
5ab17da73d * Simplify default eepsite base and CGI contexts to use a Context
instead of a ContextHolder, ServletHandler, and ServletHolder.
    This also fixes / which returned a zero-length file,
    broken in the last checkin.
2012-03-09 20:00:18 +00:00
0c55af2622 new i2p-projekt.de reseed SSL certificate. Sorry. 2012-03-09 16:52:55 +00:00
zzz
e331800898 * Update default eepsite base context to use DefaultServlet
instead of ResourceHandler, to provide resume, directory
    indexes, caching, etc.
2012-03-09 16:03:27 +00:00
e4257f28c9 Add note about 32bit libs 2012-03-09 02:00:07 +00:00
zzz
97f402be0b * SessionKeyManager:
- Don't use unacked tagsets after consecutive ack failures
      and revert to full ElGamal if necessary (ticket #574)
    - Synchronize creation of new sessions to prevent dups
    - Don't remove an unacked session until it's really out of tags
    - Failsafe removal of old unacked tagsets
    - Cleanups, final, comments, log tweaks, debug.jsp tweaks, synchronization tweaks
2012-03-08 17:48:19 +00:00
zzz
1e978ea435 javadoc 2012-03-08 17:46:56 +00:00
zzz
629c7862ca log tweak 2012-03-08 17:46:15 +00:00
zzz
7006ffb75d remove calls re-setting defaults 2012-03-08 17:45:29 +00:00
zzz
b42993b495 * GarlicConfig: Remove unused reply block methods 2012-03-08 17:44:41 +00:00
a9935cb609 Spanish and German translation updates from TX.
Updated EN po files to push to TX.
2012-03-07 01:39:39 +00:00
05be39d286 minor updates 2012-03-06 19:25:19 +00:00
0c77f7a82d update comments to reflect that we're now using jetty6 2012-03-06 19:25:03 +00:00
18f113d8e7 add pkg200 target, fix dist200 target 2012-03-06 19:23:28 +00:00
zzz
175e464c17 merge of '6719c390f50bba07ed4913fa1578249050506422'
and 'd766ba05d9b2db6d6f7c0ea14b5ad0252c274c2d'
2012-03-06 14:16:04 +00:00
zzz
0cea3e03ae * Webapp class loader: Fix dup classes in classpath
caused by last checkin (symptom: i2psnark in wrong directory)
2012-03-06 14:04:04 +00:00
zzz
de2b204646 * viewstat.jsp: Properly close the ImageOutputStream to fix
NPEs in the finalizer, probably was the root cause of
    what we blamed on Jetty
2012-03-06 14:02:12 +00:00
zzz
e1c3979af7 * Jetty logger: Fix stack trace logging 2012-03-06 14:01:13 +00:00
zzz
46438b7412 * i2psnark: Fix NPE on magnet link addition 2012-03-06 13:59:32 +00:00
6a103a1492 minor changes to some targets/descriptions 2012-03-05 23:58:56 +00:00
a24937b7fd improve display of dark, classic, and midnight on the new homepage and center the search box under the news 2012-03-05 23:57:51 +00:00
zzz
d7c1e9724b merge of 'c09b40fe67ffc403c484ac4b14d896de48d37d9c'
and 'c269d35a60d164027bb1d1fbb6d30c06ffd2292d'
2012-03-05 15:24:21 +00:00
224405d737 Allow EXEs to be built on AMD64
Enabling this should be safe since we will ship separate installers for
Win/non-Win. Those that don't want to build the EXEs can set noEXE in build.properties,
Even better might be to run one of
* ant installer-freebsd
* ant installer-linux
* ant installer-nowindows
* ant installer-osx
2012-03-05 15:07:04 +00:00
zzz
6c2d4ded1c add time interval to graph legends 2012-03-05 15:00:52 +00:00
zzz
ee22244b53 merge of '166d63ea25334cf53075e0d418ececcb1d8bc6ca'
and 'e42352d45c2c9304562eed404c9c2dd8120becc5'
2012-03-05 15:00:02 +00:00
5376858175 Add WithJavadoc targets that also include Jetty 2012-03-05 13:39:54 +00:00
910f60031a html fix 2012-03-05 01:46:41 +00:00
zzz
3240dacfe8 remove dup utility jar building, build win and non-win installers for release 2012-03-05 00:52:21 +00:00
zzz
76c0f56be8 * Plugins: Fix setting webapp classpath on Jetty 6 2012-03-05 00:41:36 +00:00
zzz
d85ae48f4e specify action so that the user will go to the top of the page to see the result even if an anchor was specified 2012-03-05 00:40:41 +00:00
zzz
e99b2064e7 log tweaks 2012-03-05 00:37:48 +00:00
zzz
57f4ede102 increase floodfills to 250 2012-03-05 00:37:20 +00:00
zzz
0c55de7fcc * viewstat.jsp: Send Connection: Close to work around Jetty bug
http://jira.codehaus.org/browse/JETTY-1346
2012-03-05 00:36:54 +00:00
af1a49e5f4 s|update\.killyourtv\.i2p/javadoc|i2p-javadocs.i2p| for homepage
..and add to hosts.txt
2012-03-04 23:20:26 +00:00
28e3ab9132 Minor tweaks so that debs can be built again
Work is needed so that I2P is built using jetty packages from
Debian/Ubuntu.
2012-03-04 18:40:01 +00:00
zzz
60f35bdd5d history for prop, -4 2012-03-04 17:01:17 +00:00
zzz
44db814ded remove old jetty 5 classes in case you forgot to distclean after updating 2012-03-04 14:28:50 +00:00
zzz
349a01265f backwhacks 2012-03-04 04:30:16 +00:00
zzz
a0a9c23bcd fixups after prop 2012-03-04 02:48:47 +00:00
zzz
2b81cee653 propagate from branch 'i2p.i2p.zzz.jetty6' (head b2ad0d72311d5ec26270cfcbbc79d128b268869b)
to branch 'i2p.i2p' (head b05b73d4740740f306a665e4b354d412eab2f328)
2012-03-04 00:34:00 +00:00
zzz
140ffc5c5e - /confighome validation fixes
- AJAX fixes
  - Translate 'router is down' message
2012-03-03 22:55:24 +00:00
zzz
8cd9fb80ba history for prop, -2 2012-03-03 20:25:49 +00:00
zzz
21ce36db9c merge of '20d8216d0354a2fa3dbd14fa595ebe0ee080a9d8'
and 'b97f3cabaa528502fd5728f44345cc09348b74a6'
2012-03-03 20:20:30 +00:00
zzz
f010b27b14 Home page:
- Convert ajax to use shared script
  - CSS tweaks
  - Add missing icons
    Silk icons: See licenses/LICENSE-SilkIcons.txt
2012-03-03 20:17:02 +00:00
zzz
b0a682f606 propagate from branch 'i2p.i2p.zzz.homepage' (head 27c8ea684056ce34ea81acdfd18571776ca63641)
to branch 'i2p.i2p' (head 83f37b19742045fa42ed71a0abd8e90d080c2c05)
2012-03-03 19:05:15 +00:00
zzz
e2acc9fdd2 * i2psnark:
- CSS tweaks
    - Ajax fixes
    - Move js to console in prep for merging w/ homepage
2012-03-03 18:58:31 +00:00
zzz
0e8d3d1862 remove bw stats from netdb effective next release 2012-03-03 18:21:00 +00:00
zzz
a0f714097a css tweak 2012-03-03 18:20:06 +00:00
zzz
15e182809d html fix 2012-03-03 18:19:50 +00:00
7673d2ba04 Susimail: HTML fixes 2012-03-03 18:10:45 +00:00
7a765757dd Proxy pages: HTML validation fixes for the proxy pages 2012-03-03 16:31:05 +00:00
2db086ee32 Add Updater200WithJetty target 2012-03-03 13:46:54 +00:00
366d79ddad Adding missing HTML tags 2012-03-03 01:00:31 +00:00
2bff0d6bcc HTML validation fixes 2012-03-02 22:32:45 +00:00
1aa24a38a4 Various HTML fixes 2012-03-02 18:46:34 +00:00
zzz
f62c3047b5 history for prop, -1 2012-03-02 01:34:21 +00:00
zzz
0cdff150f5 propagate from branch 'i2p.i2p.zzz.test' (head 44ecb300f6f5655b9b8699049d2fba046822deed)
to branch 'i2p.i2p' (head 5120d6c371d7cba9f201b48a142b0e0ead028cdd)
2012-03-02 00:18:54 +00:00
zzz
75eda7e1b1 log tweak 2012-03-01 23:52:56 +00:00
zzz
f22ac28e4d search param encoding 2012-03-01 23:46:06 +00:00
zzz
33964fac45 Fixes for:
IPv6 addresses
    Reject all hostnames w/o dots except IPv6
    http://i2p/b64dest
Log tweaks
Add nicer ahelper-notfound error page
2012-03-01 23:38:22 +00:00
5e5e4f6f2c HTML fix 2012-03-01 19:16:44 +00:00
4a74bd0fe7 HTML fixes 2012-03-01 19:02:32 +00:00
zzz
e7bcff5e71 - Refactoring to use Jave URI parser to better handle
escapes, IPv6 addresses, ports
    - Rewrite i2paddresshelper scanning/removal

intermediate checkin, bug fixes to follow
2012-03-01 18:39:07 +00:00
zzz
cadedeb06c * Build: Add built-by to jars; check for corrupt jars on debug page 2012-03-01 16:04:17 +00:00
zzz
5af6c97bee log tweaks, final 2012-03-01 14:21:54 +00:00
zzz
cf41068fef SDK message 2012-03-01 13:41:24 +00:00
81bd0fcbf4 propagate from branch 'i2p.i2p.str4d.i2ptunnel' (head 237102a8f647caf98bf0491af5de6f636e254722)
to branch 'i2p.i2p' (head 3d9f6d9555224cc3277ca10fd9409c83422758eb)
2012-03-01 05:07:47 +00:00
b6f7321497 Fix the UTF8 POSTing issue 2012-03-01 05:03:29 +00:00
zzz
538427c269 - Synchronize StoreJob.sendNext() to avoid dups
- StoreState finals
2012-02-29 18:49:49 +00:00
zzz
f61183d2d8 * DataStructures:
- Remove static logs
    - Sort addresses in RouterInfo at initialization only;
      change from Set to List to save space
    - Remove unused counters in Lease to save space
    - Increase max leases to 16
2012-02-29 18:09:16 +00:00
zzz
48551f0617 NetDB: Reenable RI store verifies. Was disabled in 0.7.9;
checkin comments claim it was reenabled in 0.7.10
but it didn't actually happen, probably due to bad merge.
2012-02-29 17:50:54 +00:00
zzz
6f682c1e71 change console link 2012-02-29 15:30:28 +00:00
zzz
f747febd0a home page updates 2012-02-29 15:29:29 +00:00
zzz
1f9ab5d880 propagate from branch 'i2p.i2p' (head 3d9f6d9555224cc3277ca10fd9409c83422758eb)
to branch 'i2p.i2p.zzz.homepage' (head 0657f1e52c859e06b78e55fe04656567bfba3bf0)
2012-02-29 15:27:37 +00:00
zzz
f43b0be5b8 Check in the 840 KB of jars we need from Jetty 6.1.26
(Apache 2.0 license) instead of downloading a 25 MB zip
2012-02-29 15:12:25 +00:00
zzz
bb46535e71 propagate from branch 'i2p.i2p' (head 3d9f6d9555224cc3277ca10fd9409c83422758eb)
to branch 'i2p.i2p.zzz.jetty6' (head 0212d710e5a4eb30249201015f045d43f44650cb)
2012-02-29 14:37:02 +00:00
zzz
2bc70b53c1 debug log 2012-02-29 13:45:02 +00:00
786a261a70 Fixed usage of assertEquals - should be assertEquals(expected, got) 2012-02-29 05:34:13 +00:00
a226d25dc6 Test getters etc. in RateStat 2012-02-29 05:01:21 +00:00
zzz
ede1b1954c remove static logs 2012-02-28 15:58:02 +00:00
zzz
17f7264863 remove unused counters and methods 2012-02-28 15:26:31 +00:00
zzz
d6d8c0d119 remove static logs 2012-02-28 14:50:39 +00:00
zzz
4f6ed70044 remove static logs 2012-02-28 14:35:32 +00:00
zzz
cf5d7d2f08 remove dtg from updater 2012-02-28 13:28:25 +00:00
zzz
d0dca206f7 release script tweaks 2012-02-28 13:20:34 +00:00
382dd3405a merge of '19c723e9710a494c2745c7a6e9476faf11f19fe1'
and '9f02425e8331315552436375df61b3dd03e6ef56'
2012-02-27 23:16:51 +00:00
a655a7848b debian: changelog update, policy update 2012-02-27 22:53:10 +00:00
9ac0a91f17 html fix (selected=true isn't valid) 2012-02-27 21:31:17 +00:00
49d7dace3b s/mbuild/build/
mbuild_jbigi.sh was into build_jbigi.sh
2012-02-27 21:25:40 +00:00
zzz
bda3fbbe63 add icon to installer exe 2012-02-27 21:15:56 +00:00
e2e578a66d merge of '228c3961aed59e47a5cbc291817fc7c41ffeb54e'
and '55bddb9107328a5d5a3fd697e0599dda7d3ff2e3'
2012-02-27 19:06:21 +00:00
zzz
ef1447a816 0.8.13 2012-02-27 15:25:23 +00:00
d436c846ac Temporarily exclude slow core tests for dev purposes 2012-02-27 03:29:13 +00:00
24268c5130 Exclude classes from code coverage report that aren't in net.i2p.*
The classes are specifically excluded rather than only including net.i2p.*
so that only classes we know we want to exclude get excluded.
2012-02-27 03:26:58 +00:00
zzz
6ebd1f121a installer build fixups 2012-02-26 23:05:21 +00:00
zzz
394943c36f debug output of LS encryption key to correlate with SKM debug page 2012-02-26 21:15:31 +00:00
zzz
6ee9b79e45 generics, final 2012-02-26 21:13:06 +00:00
zzz
da482c373e new single graph page 2012-02-26 17:34:22 +00:00
22900a0d91 Fixed RouterAddressTest.testToString to actually test the returned String 2012-02-26 09:30:27 +00:00
e7922c4ded Added some tests of setOptions to RouterAddressTest 2012-02-26 04:57:31 +00:00
f19ef3e486 Fix test that would always pass 2012-02-26 03:01:48 +00:00
5b6a23b13a propagate from branch 'i2p.i2p.str4d.i2ptunnel' (head 382a93d72f9ae55f3e251a6f3cbf6e35df2e560d)
to branch 'i2p.i2p' (head 36eae7cbb8817fb68bb042e8207c6c955264f393)
2012-02-25 21:14:34 +00:00
ce1e055848 Removed WizardBean - it does nothing extra over EditBean 2012-02-25 19:37:54 +00:00
f72e16f571 Close line break tags properly 2012-02-25 19:28:22 +00:00
zzz
fc3343270a fix LS count 2012-02-25 18:40:27 +00:00
zzz
e1c9402d3f propagate from branch 'i2p.i2p' (head 36eae7cbb8817fb68bb042e8207c6c955264f393)
to branch 'i2p.i2p.zzz.test' (head 33f78a361bfef38b120fdf55d9e9535f3be96d6e)
2012-02-25 17:49:09 +00:00
4148aa54f3 Need to run clean and prepareTest before test in router build.xml 2012-02-25 01:48:31 +00:00
204440b06b Run full test reports with fulltest target, not just junit report 2012-02-25 01:46:46 +00:00
6a26c0b621 Edited router build.xml to match core build.xml (inc. clover, cobertura stuff) 2012-02-25 01:43:15 +00:00
c955adf7f6 Set up report targets properly in main build.xml 2012-02-25 01:29:08 +00:00
c68d53faf3 Removed fullclovertest target from main build.xml
Clover usage is triggered by setting with.clover instead.
2012-02-25 01:23:17 +00:00
ceda7c9ca0 Fix jbigi.jar path in test target of router build.xml 2012-02-25 01:21:31 +00:00
zzz
54f0cae2ff refactor proxy.i2p server to its own class 2012-02-24 17:58:54 +00:00
zzz
eeb9ee0852 snark conn limits 2012-02-23 19:31:25 +00:00
zzz
87da4b78ab add negative cache to BFNS 2012-02-23 19:06:21 +00:00
zzz
141ad67650 ajaxify the refresh 2012-02-23 17:41:06 +00:00
zzz
a288fc52e0 Move icon URL from _icons to .icons 2012-02-23 15:40:31 +00:00
zzz
7e8de0602b dont include i2prouter.mo files in updater or installer for now 2012-02-23 15:04:44 +00:00
45b0df7a1b propagate from branch 'i2p.i2p.str4d.i2ptunnel' (head eb8d45bf3d7e0adb2cb08558756a524b6be3c684)
to branch 'i2p.i2p' (head db81006fcc97016540591cb5cb555f7092e5de4b)
2012-02-23 06:44:16 +00:00
8a4bbe157e Translation updates for de, es, it, sv, and uk from Transifex 2012-02-22 20:41:57 +00:00
5d8a718018 fix html tags 2012-02-22 20:35:01 +00:00
zzz
667bd46643 hide stat log config unless already enabled 2012-02-22 15:41:04 +00:00
zzz
b29a9f43ce * ExploratoryPeerSelector: Use fast peers if hidden for
inbound tunnels to improve success
  * NetDB:
    - Don't publish our RI if it has no addresses
    - Publish our RI sooner after startup
      to facilitate our IB tunnel builds
2012-02-22 14:14:17 +00:00
zzz
51c73fa853 build.xml: Rename build.number property so it doesn't conflict
with ant buildnumber target in other projects
2012-02-21 15:47:14 +00:00
849c407712 Added clover targets to core build.xml as well, so either will work
Pass in the absolute location of clover.jar as the with.clover property
to activate the clover targets.
2012-02-21 04:05:27 +00:00
zzz
b8a1ab0138 - Don't delete privkey file for a non-persistent client tunnel
(ticket #599)
2012-02-20 23:19:53 +00:00
zzz
939329a96c i2ptunnel: Fix streamr session registration 2012-02-20 22:10:30 +00:00
zzz
409bc7fd94 even up flag rows 2012-02-20 22:09:13 +00:00
zzz
ad8ce95545 Streaming: Fix race NPE (thx echelon) 2012-02-20 19:34:13 +00:00
zzz
3131e65b66 fix redirection; change header 2012-02-20 14:32:48 +00:00
a314b2acc7 Added a missing quotation mark in a <div> 2012-02-20 08:36:03 +00:00
a2217b2b36 Fiddle with cobertura definitions a bit in core build.xml
To run with cobertura, execute the following in "core/java/":
ant -Dwith.cobertura=/usr/share/java/cobertura.jar cobertura.report
2012-02-20 03:44:23 +00:00
a15e4c6c28 Revert the last check-in and correct my earlier addition of Czech.
The Czech language is CZ but the Czech country is CZ.
2012-02-19 22:07:12 +00:00
e407c046d9 Add the correct flag for the Czech Republic
Public domain from the Wikimedia Foundation
2012-02-19 21:52:29 +00:00
zzz
13731e7b35 add b64 hash 2012-02-19 20:57:44 +00:00
zzz
3fbd8b8d14 - Fix custom tracker list
- Add tracker config form
- Remove custom tracker from create form
- More icons in buttons
2012-02-19 19:52:16 +00:00
zzz
3876f74f6c tooltip 2012-02-18 19:19:42 +00:00
zzz
b47aa34d6a add private option in UI 2012-02-18 18:50:57 +00:00
zzz
295242316b Disable PEX/metadata extensions and open trackers for private torrents
Handle announce URLs with parameters correctly
2012-02-18 17:58:54 +00:00
zzz
274e37b284 propagate from branch 'i2p.i2p' (head 0a3db5b65f8fdc3e91000c9dff9e679401b52f72)
to branch 'i2p.i2p.zzz.jetty6' (head da78bc5726f3715ec8083aa86bcaa6c05896b8d6)
2012-02-18 15:28:34 +00:00
zzz
1997be371c propagate from branch 'i2p.i2p' (head 0a3db5b65f8fdc3e91000c9dff9e679401b52f72)
to branch 'i2p.i2p.zzz.homepage' (head 73d71bde13883d204e50f497efe264d8643fb8fa)
2012-02-18 15:28:19 +00:00
zzz
c957577e72 propagate from branch 'i2p.i2p' (head 0a3db5b65f8fdc3e91000c9dff9e679401b52f72)
to branch 'i2p.i2p.zzz.test' (head 8648a7d67ffff19124cafdd14648c13dedccd2ba)
2012-02-18 15:23:24 +00:00
zzz
cf463100cd stub out private mode 2012-02-18 15:22:40 +00:00
c7d473a7eb Shuffle round mkdirs and deletes in router build.xml to match core build.xml
batchtest has a todir config option that makes manual copying unnecessary.
2012-02-18 02:13:46 +00:00
zzz
ab1ee37077 * netdb.jsp: Fix debug median calculation 2012-02-17 23:08:03 +00:00
zzz
85a61e6166 escape fixes 2012-02-17 23:05:51 +00:00
8e275e926f New Czech translation for Debconf from Transifex
Updated headers of German and Russian debconf translations.
2012-02-17 13:21:37 +00:00
051bc9c468 Add Czech language from Transifex 2012-02-17 12:24:43 +00:00
aaf425be9b Enable Czech language 2012-02-17 11:31:41 +00:00
01c5a05c86 Final English source PO update for 0.8.13 2012-02-17 11:26:51 +00:00
6a034b9613 merge of '8a72dbc075a7d66522d8947ad10d675f76540e4d'
and 'f12cc6a9028cdd515cfc68c809da1feb914a2d5e'
2012-02-17 11:24:08 +00:00
3e8b7a7f24 Added a table summarising the chosen options on last wizard page 2012-02-17 06:32:49 +00:00
af02a2f7f6 updated English source po files (and pushed to tx) 2012-02-17 02:47:52 +00:00
8df576b39d A few fixes to k0e's patch 2012-02-16 18:40:58 +00:00
0cdc69bcb3 propagate from branch 'i2p.i2p' (head 65be70e72b08757d3aa0bb0cdfc525f49c3b5443)
to branch 'i2p.i2p.str4d.i2ptunnel' (head e4d5122533595faf0e371cd917d4bae1244c3ada)
2012-02-16 11:34:59 +00:00
4e1239ab5e Patch from k0e to improve the description strings 2012-02-16 11:34:36 +00:00
d1a03f500f Moved mkdir above delete in core build.xml and removed mkdir from base build.xml
mkdir does nothing if the directory exists, whereas delete fails by default
if the directory doesn't exist. Also, mkdir creates parent dirs as needed.
2012-02-16 02:58:25 +00:00
8a32aad6c3 Shuffled build targets around to group together ones related to unit tests 2012-02-16 00:08:27 +00:00
a3597e45fa Bumped build number to -13 so tunnel wizard gets tested 2012-02-13 00:00:00 +00:00
7d0d7e0278 propagate from branch 'i2p.i2p' (head 5d3776cd03c44f2a7eeb6d844eda8799e35aee99)
to branch 'i2p.i2p.str4d.i2ptunnel' (head 4c2122ea2c66216b219c66b829ff5c05f8af0157)
2012-02-12 23:53:58 +00:00
8846691c47 Set the default wizard value for targetHost to 127.0.0.1 2012-02-12 05:10:58 +00:00
0f72dfea0f Added some descriptive text for page 7 2012-02-12 04:26:22 +00:00
77bb9f144f Added some descriptive text for page 6 2012-02-12 00:18:09 +00:00
ef9fe8d197 Added some descriptive text for page 4 2012-02-12 00:08:14 +00:00
56e00199aa Fix descriptive text on page 1 2012-02-11 23:55:53 +00:00
3a4447cd08 Added some descriptive text for page 2 2012-02-11 23:54:38 +00:00
c7b7f4744c Added some descriptive text for page 1 2012-02-11 22:25:16 +00:00
zzz
29c85254e7 WorkingDir: Fix detection of migrated directory 2012-02-10 21:54:43 +00:00
zzz
4cea4514a0 merge of 'bbec2c1856866ea026d683727faa703fcb1275fe'
and 'd1e9a819d9ee4ac855f6ced8fc36033c629f0ff8'
2012-02-10 21:52:38 +00:00
2f685d53a7 Redirect "which" output to /dev/null 2012-02-10 19:44:12 +00:00
zzz
b23f0ee5a9 escape semicolons 2012-02-09 14:44:35 +00:00
0932f77fac pidfile is now set via i2prouter, not wrapper.config 2012-02-08 15:21:43 +00:00
05860a5b5c Fiddled with wizard's button logic to make the workflow clearer 2012-02-07 01:47:52 +00:00
317aade5e0 patch refresh needed because of changes to wrapper.config 2012-02-04 20:45:43 +00:00
4ccb06f289 propagate from branch 'i2p.i2p' (head 0f4af64e64536c467b623286bce659dd2dfe9342)
to branch 'i2p.i2p.str4d.i2ptunnel' (head 04d0fee1e4638d20909ab34c3100f21933b9c15c)
2012-02-04 20:41:36 +00:00
zzz
45ba9e1bd4 fixup after prop 2012-02-04 15:45:03 +00:00
zzz
6107e38e56 propagate from branch 'i2p.i2p' (head 0f4af64e64536c467b623286bce659dd2dfe9342)
to branch 'i2p.i2p.zzz.jetty6' (head d525108d8e9ecb842a99bb81c1138c43b5e39653)
2012-02-04 15:42:23 +00:00
zzz
3af2577c11 propagate from branch 'i2p.i2p' (head 0f4af64e64536c467b623286bce659dd2dfe9342)
to branch 'i2p.i2p.zzz.homepage' (head dde6a3d7db54894a2ac30a2af6cbb04cbb92296a)
2012-02-04 15:40:22 +00:00
zzz
d93805eb96 * ProfileOrganizer: Add profileOrganizer.sameCountryBonus config 2012-02-04 14:46:24 +00:00
zzz
4bd869f5fa * WorkingDir: Reset dates of eepsite files while migrating
to avoid exposing install time (thx Z6)
2012-02-04 13:34:57 +00:00
zzz
2c8f426e30 non-x86 update of build instructions 2012-02-04 13:33:03 +00:00
zzz
37bb7ac8ca * Wrapper files:
- Move PID and status files to config dir in i2prouter
    - Don't set PID files in wrapper.config as Windows doesn't need them
      and the wrapper won't start if the dir doesn't exist
    - Move wrapper.log to config dir using override in i2prouter,
      Windows stays in system temp dir
    - Move wrapper.log to config dir for no wrapper
    - Move wrapper.log setup for no wrapper from RouterLaunch
      to WorkingDir
    - Redirect stderr too when no wrapper
    - Create config dir in i2prouter for Linux/Mac
2012-02-04 13:11:54 +00:00
zzz
c0e0994bb3 deprecate util classes used only by installer 2012-02-04 13:02:15 +00:00
8a33ee2078 Added link to tunnel wizard on main i2ptunnel page 2012-02-04 10:49:07 +00:00
81d9ed1766 propagate from branch 'i2p.i2p' (head 98f389d40c983a02e3b0803401896e2b1104b44d)
to branch 'i2p.i2p.str4d.i2ptunnel' (head 9f44bb9e4efa0f9ed76f4988bdd3ebef7ac6b3a7)
2012-02-03 17:12:31 +00:00
7461d8c1f1 Added "@since 0.8.13" tags to the only two methods in WizardBean 2012-02-03 17:10:44 +00:00
8cbf94f9eb Added placeholder blurbs for explaining the various wizard options 2012-02-03 17:07:10 +00:00
9141aa1d25 updated en source POs (from push to tx) 2012-02-02 22:49:25 +00:00
8ef9009e48 Ukrainian and Polish translation updates 2012-02-02 22:44:02 +00:00
973dbe6fb2 Don't display page 4 for server tunnels (tunnel destination) 2012-02-02 03:43:13 +00:00
7c70378396 Remember startOnLoad checked-ness 2012-02-02 03:19:23 +00:00
27e14e7f36 Remember reachableBy selection 2012-02-02 03:06:34 +00:00
30bdf871aa Fill in wizard fields with POSTed values if present
This means that you can go back and edit typed-in values during the wizard
2012-02-02 00:24:29 +00:00
5a0190ddcc CORRECTLY create client tunnels by default in the wizard 2012-02-01 23:34:15 +00:00
98e7a6d2b3 Change pagination to use POSTed variable instead of query parameter
All wizard pages now have the URL /i2ptunnel/wizard
2012-02-01 23:03:00 +00:00
3af2f29739 Create client tunnels by default in the wizard 2012-02-01 22:32:10 +00:00
f7207689d5 Added missing close brackets 2012-02-01 10:47:09 +00:00
1a01f59d53 Make Cancel button a link instead so it works correctly 2012-02-01 10:43:27 +00:00
7dd03fda8d Added a Previous page button
At present the ?page= in the URL isn't affected, which could possibly
confuse users - maybe move to having the page variable as a POST variable
so the url is just always /i2ptunnel/wizard
2012-02-01 03:48:39 +00:00
c62254da1e propagate from branch 'i2p.i2p' (head 4ff82dc25fcfc71f44d093b2c164b89fc34d07f3)
to branch 'i2p.i2p.str4d.i2ptunnel' (head 9922f642f87c3e2b8fca2703011fcfa7af3a447e)
2012-02-01 03:04:33 +00:00
621f132069 Change Finish action on wizard to "Save changes"
This means that the form is handled by the same handler as the edit
forms, hopefully reducing maintenance ^_^
2012-02-01 03:03:57 +00:00
467d21257a Added default values for other required variables on page 7 of wizard 2012-02-01 02:51:05 +00:00
zzz
482a63c996 unit test javadocs 2012-01-31 14:03:20 +00:00
zzz
252f9ccee2 * SusiDNS: Reduce listings to 50/page 2012-01-30 22:04:30 +00:00
zzz
0f356892ba * LogWriter: Don't rotate and open file until first message 2012-01-30 22:03:19 +00:00
zzz
fae3492dd2 * i2psnark: More illegal chars 2012-01-30 22:02:46 +00:00
f6babeecd2 Add quotes around path variables 2012-01-28 22:10:33 +00:00
d9f3e9e2e7 try to parse the pidfile location from wrapper.config 2012-01-28 22:08:39 +00:00
ed357b1a3e fix broken links 2012-01-28 22:07:32 +00:00
ee8901cf02 merge of '8ae45b0b8c2c4098bf33654401163d37f73a1bd4'
and 'e6dc64fe412c386b3f3ae59bcbc6b5a53cf1d554'
2012-01-28 14:24:03 +00:00
d10825d4a9 Remove I2PFox recommendation from the router console
It's outdated and the text was misleading. It is NOT a "custom-build" that is
"security hardened"--it's a Firefox profile. Having echelon's site
linked on the router console should be enough.
2012-01-27 19:26:55 +00:00
zzz
b54c9fd2c1 * confignet: Add UDP disable option 2012-01-27 18:55:41 +00:00
zzz
65504e8660 * Build: Repack release jars with pack200 -r, saves about 1% and
might save a little memory at runtime too
2012-01-27 18:53:52 +00:00
zzz
c902d4c219 remove SAM client classes from sam.jar 2012-01-27 13:33:41 +00:00
39953b6925 Fix condition for including targetHost 2012-01-27 04:10:01 +00:00
c81c4cb873 Fix autostart hidden input to not appear if checkbox not ticked 2012-01-27 04:06:04 +00:00
4be3f16805 Added missing label for targetPort 2012-01-27 03:12:57 +00:00
c9f1f69c16 Fix isClient to get passed through properly 2012-01-27 02:52:39 +00:00
zzz
b3f3a60ca6 comment out unescapeHTML() until we need it 2012-01-26 15:03:54 +00:00
zzz
fc18b44a56 * SusiDNS: Make UI 1-based 2012-01-26 13:24:01 +00:00
zzz
d3cb42d441 * Plugins: Fix updated count 2012-01-26 13:23:28 +00:00
zzz
4120fc6f0b * NetDB: Increase min ff to 200 2012-01-26 13:22:49 +00:00
zzz
adba42d114 * configclients: Fix form action default 2012-01-26 13:22:27 +00:00
9a5ea68682 Subclass WizardBean from EditBean to get access to the interfaceSet() method 2012-01-26 03:53:43 +00:00
6d0514b451 Get wizard to step through pages correctly 2012-01-26 03:53:05 +00:00
ac493d7bcb Show Next and Finish buttons the right way round 2012-01-26 03:35:25 +00:00
9e446f9ae8 Use request.getParameter() to fetch POSTed parameters 2012-01-26 03:18:50 +00:00
e1b53a63f4 Undo revision 126c1c30c0c02fd95719ffeae6d4709abb7bf18d 2012-01-25 23:05:23 +00:00
776a8c5a63 Undo revision 30dba6c75dcd43c7c67112558dad7b36504ba5a7 2012-01-25 22:53:14 +00:00
zzz
f7dee01609 fix form default on chrome 2012-01-25 16:40:55 +00:00
zzz
6e44710b94 - escape html for adds and queries
- change config separator char
- fix enter in add boxes
- fix alt and title tags
2012-01-25 16:22:04 +00:00
zzz
0d494c50af add firewall and reseed status on /home 2012-01-25 15:01:19 +00:00
zzz
00b8e14adf /confighome:
- config search engines
- add icons
- restore defaults button
2012-01-25 14:34:54 +00:00
zzz
61290dfbcf * Old console to /console, new redirect script at /index 2012-01-25 02:50:42 +00:00
zzz
fbca6ac1fd * New home page, including basic AJAX, home page config and search 2012-01-25 02:38:49 +00:00
zzz
abe83bc5bd * Addresses: Fix NPE if no interfaces found http://forum.i2p/viewtopic.php?t=6365 2012-01-25 02:31:26 +00:00
zzz
fb8deb327d * Addresses: Fix NPE if no interfaces found http://forum.i2p/viewtopic.php?t=6365 2012-01-25 02:28:20 +00:00
e43182b842 Added inputs for page 6 of wizard 2012-01-25 01:12:17 +00:00
12ee1a70b2 Added comments to clarify page boundaries, and removed extra </div> 2012-01-25 00:06:18 +00:00
c9a453309f propagate from branch 'i2p.i2p' (head ce3040d00c42e384f3fc62d018c9bdade01df033)
to branch 'i2p.i2p.str4d.i2ptunnel' (head 6259f71c23cbb08c8b1de472632d8efb1b016d29)
2012-01-24 04:36:21 +00:00
zzz
0a4d6c0bd8 * susimail: add icons to buttons
arrow_left, arrow_up, email.png from Silk icons: See licenses/LICENSE-SilkIcons.txt
2012-01-24 00:29:20 +00:00
zzz
a617dc3e2b two more buttons 2012-01-23 23:14:15 +00:00
zzz
63d2e19769 * susidns: add icons to buttons
magnifier.png from Silk icons: See licenses/LICENSE-SilkIcons.txt
2012-01-23 23:07:24 +00:00
zzz
97e5bc87ef i2ptunnel: fix white-on-white buttons on hover 2012-01-23 18:33:13 +00:00
zzz
0aa9e39ee3 * Plugins: Add completion message after all-update check 2012-01-23 17:53:59 +00:00
zzz
061f96ad89 Use ${ant.home}/lib/ant.jar instead of pulling ant.jar from Jetty 2012-01-23 16:44:08 +00:00
d4804c2b70 propagate from branch 'i2p.i2p' (head 156f8e6137be3c25aa70176fe0a78218b898a684)
to branch 'i2p.i2p.str4d.i2ptunnel' (head 126c1c30c0c02fd95719ffeae6d4709abb7bf18d)
2012-01-23 01:36:26 +00:00
745e2952ff Added getters for the hidden variables needed by wizard.jsp 2012-01-23 01:21:19 +00:00
9a5430beeb Added inputs for page 5 of wizard 2012-01-23 01:09:17 +00:00
1486d83ec5 Swap around nesting of page 3 to make it clearer 2012-01-22 22:03:26 +00:00
zzz
221499c1a8 propagate from branch 'i2p.i2p' (head 156f8e6137be3c25aa70176fe0a78218b898a684)
to branch 'i2p.i2p.zzz.jetty6' (head 960f416b20e26662b1b5b30468a85dbb25f09ffd)
2012-01-22 18:30:41 +00:00
zzz
c3bf470a80 -7 2012-01-22 18:30:25 +00:00
zzz
04544ac9e0 * Transports: Bind only to a single interface if specified
as the host address and it's available (ticket #591)
2012-01-22 16:43:45 +00:00
zzz
669bcbd191 move VMCommSystem to dummy directory 2012-01-22 16:16:24 +00:00
zzz
9252d6f9ca tweak 2012-01-22 16:15:18 +00:00
3793e2c4ec Added inputs for page 4 of wizard 2012-01-22 04:23:45 +00:00
a092054417 Formatting and comments in JSP code 2012-01-22 02:44:51 +00:00
e0b70375a6 Added inputs for page 3 of wizard 2012-01-22 02:37:39 +00:00
77c2173421 Added in a hidden input for "tunnel" set to "null"
The idea is to utilise the existing saveChanges function in IndexBean.java
that the edit page posts to. Consequently, the wizard will need to have all
the same inputs that need to be POSTed as the edit page does.
2012-01-22 00:21:13 +00:00
17e8cf777f Flesh out some more of wizard.jsp 2012-01-22 00:11:29 +00:00
eda2ac510a Make getType() a public method so can be accessed from wizard.jsp 2012-01-22 00:07:06 +00:00
zzz
256b05531e * Build: Fix Windows build, version checking for release 2012-01-21 15:28:24 +00:00
zzz
b003ee8748 move some summary bar code around 2012-01-21 15:27:58 +00:00
5d46e922ed propagate from branch 'i2p.i2p' (head 5d0ae36d90db71fcbaa3e7ffda7720ca2659e2ed)
to branch 'i2p.i2p.str4d.i2ptunnel' (head 790aee747df3e6eff3ef9742965a88fd3b03a75b)
2012-01-21 05:33:03 +00:00
c31cb0c057 Initial beginnings of a tunnel creation wizard as per ticket #502 2012-01-21 05:30:23 +00:00
b234ce3f51 Fix too short of delay for http. It is up to the browser to time out , not the proxy. 2012-01-20 02:43:38 +00:00
0e5fc8eb11 Revert the use of the unescape function in ConfigClientsHandler - unnecessary 2012-01-20 01:18:46 +00:00
7ee40e58c4 merge of '7e9829897ed454bcb4a8e64b029060f7e90cbbfa'
and 'b1a1e2e4c3f77f38c7c7f6ebe23d5225c4e42873'
2012-01-19 05:21:00 +00:00
zzz
ba01451038 propagate from branch 'i2p.i2p' (head 7e9829897ed454bcb4a8e64b029060f7e90cbbfa)
to branch 'i2p.i2p.zzz.jetty6' (head b9984717e63b03b3b5fcf3a9729d55411aa65e89)
2012-01-18 19:16:53 +00:00
zzz
5b285db165 -5 2012-01-18 18:38:20 +00:00
zzz
0da70caf7f * I2PTunnel: Register ports with the PortMapper
* Update: Find the proxy port in the PortMapper
2012-01-18 16:57:27 +00:00
zzz
a4a1ed4357 - When a peer is shitlisted, fail all our tunnels where
that peer is the adjacent hop. In particular this
      will remove outbound tunnels when we can't contact
      the first hop, and enable quicker recovery.
2012-01-18 02:01:59 +00:00
zzz
6e5d53dbde one more saveConfig change 2012-01-18 01:55:53 +00:00
zzz
95329803a9 - Use new synchronized change-and-save-config methods
to eliminate races with ReadConfigJob
2012-01-18 01:54:34 +00:00
e183966482 Simplify the HTML escape/unescape functions to use static arrays 2012-01-18 01:46:05 +00:00
9755338f73 Fix for #588 part 6: Don't convert nulls to empty strings 2012-01-17 22:45:06 +00:00
dafd722f20 Fix for #588 part 5: Undo escaping of description when just displaying it
This was interfering with the plugins section, where HTML is intentionally
passed into the description field. Now, only when the description field is
being plugged into the value property of an input tag will it be escaped.
2012-01-17 22:26:00 +00:00
38dba5d19a merge of 'a5d2fae48cf001c84ff5cea42466e1f3ed7d5f0a'
and 'c52409bf5d7b422c23a62eecfa50b98d7c74f8df'
2012-01-17 03:04:52 +00:00
bafdaebc42 merge of 'a3d362477b328c80ac2cd052f635d3ddd3b39c81'
and 'c21005b174cec3b4ae419318758f1a9c2071cf64'
2012-01-17 03:03:07 +00:00
fc292cd29d Fix for #588 part 4: Pull out escaping of & separately first 2012-01-17 02:59:21 +00:00
553201db21 Fix for #588 part 3: Escape & character FIRST so other escapes aren't broken 2012-01-17 02:17:05 +00:00
452096b976 Fix for #588 part 2: moved escape/unescape functions to net.i2p.data.DataHelper 2012-01-17 02:11:56 +00:00
1e8c968bd6 Fix for #588 - HTML escape and unescape descriptions on configclients page 2012-01-17 00:56:49 +00:00
dev
b1878d6026 Don't throttle tunnel creation if using a higher than default router.maxParticipatingTunnels setting. 2012-01-16 20:09:34 +00:00
zzz
47876d6131 prevent stale build version on logs.jsp 2012-01-16 14:36:34 +00:00
zzz
6198739f7a propagate from branch 'i2p.i2p' (head 899a1923586f3d7d622bd02e03c87717566617c4)
to branch 'i2p.i2p.zzz.jetty6' (head cb3e33be282b6002f6790609f4a3eef7f42069d3)
2012-01-16 14:10:32 +00:00
zzz
23de1e6db8 -4 2012-01-16 14:10:06 +00:00
zzz
1591ddca2f merge of '282f1c5000f3f53bbfb346b4ae93c13b5bb3db8b'
and 'e4e2cade8df8374791936c5ea060df6d4cd9a65e'
2012-01-16 14:07:17 +00:00
0a5e08382f Fix up use of <p> tags in a few routerconsole config pages, remove extra </div> 2012-01-16 02:39:14 +00:00
zzz
83480e456a * NetDB: Hopefully fix rare NPE (ticket #589) 2012-01-16 02:20:20 +00:00
zzz
da2cd92884 shorten the other timeout 2012-01-15 21:39:52 +00:00
zzz
0cee758dc3 - Only stop a plugin at shutdown if it was running 2012-01-15 21:30:15 +00:00
zzz
fc6f4ecc74 * Plugins:
- Auto-update plugins after a router update
    - Add update-all button
2012-01-15 21:15:08 +00:00
2253ad13cc Use bzip2 to compress debian packages
This mainly has an effect on the size of the javadocs package (i2p-doc shrinks
to half of its present size when using bzip2).  xz would give better
compression, of course, but xz support isn't isn't available in the version of
dpkg that ships with Lucid. All supported versions of Debian and Ubuntu support
bzip2 in .debs, so this will only have the impact of giving us smaller javadoc
packages.
2012-01-15 19:28:07 +00:00
zzz
9acabfb20f - Add synchronized change-and-save-config methods to avoid races 2012-01-15 17:30:31 +00:00
zzz
3d2d60469e * Plugins:
- Only stop a plugin before update if it was running
    - Don't start a plugin after update if it was disabled
    - Disable plugin if it fails version checks at startup
2012-01-15 16:59:33 +00:00
zzz
b5d77685b9 * Router: Save previous version in config so we know when we updated 2012-01-15 16:46:34 +00:00
zzz
557cb30feb echo tweak 2012-01-15 16:46:11 +00:00
zzz
59ba19b965 * Transport: Revert change from -2, put addresses back in RouterInfo
when hidden, broke inbound tunnel building
2012-01-15 16:38:39 +00:00
zzz
7213ff0c76 * Build: Put Implementation-Version in manifests 2012-01-15 16:36:17 +00:00
zzz
404578515b bundle jmx 2012-01-14 22:20:39 +00:00
9e068b3926 refresh patch due to wrapper.config changes 2012-01-14 21:29:00 +00:00
zzz
fd6fcda781 fixup after prop 2012-01-14 18:08:26 +00:00
zzz
23ca49ea8e propagate from branch 'i2p.i2p' (head b3d611a1fe034bc89963c54179d5bef3a3147950)
to branch 'i2p.i2p.zzz.jetty6' (head c83bf7bd62d0e07be0d965f062f01b01864be4d2)
2012-01-14 18:04:39 +00:00
zzz
7df881442a remove comment since we can now find the wrapper log 2012-01-14 18:01:10 +00:00
zzz
eb2830b8f3 * jars.jsp: New debug page 2012-01-14 17:49:47 +00:00
zzz
c54b3a08b8 save a few bytes 2012-01-14 17:47:39 +00:00
zzz
7874488a61 * logs.jsp: Use wrapper method to find wrapper log if available 2012-01-14 17:46:34 +00:00
zzz
07957409cb * Stats:
- Cleanups
    - Remove some locking
    - Change some longs to ints to save space
    - Remove static logs
2012-01-14 17:44:50 +00:00
zzz
fc07065413 * i2ptunnel: Partial fix for dest formatting (ticket #581) 2012-01-14 17:41:17 +00:00
50f270fd76 i2prouter: look for external gettext in the path 2012-01-14 02:28:10 +00:00
zzz
ba5be7449b translation infrastructure for i2prouter script 2012-01-13 22:26:35 +00:00
zzz
edf5ef588d remove dup docs from tomcat jars 2012-01-10 20:17:35 +00:00
zzz
405c24b0e3 Add JSP 2.1 trim white space directive to all jsps to save a few KB 2012-01-10 13:21:35 +00:00
zzz
1b85c22ffc escape quotes 2012-01-10 04:10:14 +00:00
zzz
8e20e7a5b5 propagate from branch 'i2p.i2p' (head 96b4e09e85e0947d0b9df188f4861664073f07a6)
to branch 'i2p.i2p.zzz.jetty6' (head 4024ef4f6e6c5e4ca6a7803614dc769ca654ac5f)
2012-01-10 04:06:23 +00:00
zzz
3024b3fd3b * Move from Servlet 2.4/JSP 2.0 to Servlet 2.5/JSP 2.1
- Replace Jasper 2.0 from Jetty 6 with Apache Tomcat 6.0.35 (CDDL 1.0 + GPLv2)
  - Replace JSTL 1.1.2 with JSTL 1.2 (CDDL 1.0 + GPLv2)
2012-01-10 04:03:30 +00:00
zzz
51f7f3a378 log all jetty warns as errors 2012-01-10 03:40:53 +00:00
zzz
4ad6d699e7 * Router:
- Auto-hidden mode for bad countries
    - Don't put addresses in our RouterInfo when hidden
2012-01-10 00:05:17 +00:00
zzz
c6e6a9d36e - Add indication on summary bar when in VM comm system 2012-01-10 00:02:20 +00:00
zzz
ad4d73ea0d - Fix class error on wrapper 3.1.1 2012-01-09 23:59:58 +00:00
zzz
352c6ba4ba * i2prouter: Don't attempt to translate strings from script 2012-01-09 23:58:24 +00:00
zzz
ce27d69e39 - Add info to error 500 page 2012-01-09 23:57:17 +00:00
5fd6698d05 Refresh patch due to wrapper.config additions 2012-01-08 23:26:39 +00:00
0f62383aec Reference /etc/i2p/wrapper.config when OOM when using Debian packages
When I2P terminates with an OOM error, users are advised to update
$I2P/wrapper.config. That path isn't accurate for the Debian packages.
2012-01-08 23:25:36 +00:00
b09071f20f update of jbigi scripts
- merge mbuild_jbigi.sh into build_jbigi.sh and drop mbuild_jbigi.sh
- make build.sh's tests optional
- try to determine the locations of JAVA_HOME and I2P
2012-01-08 23:23:00 +00:00
dev
f5b6d56489 Added support for AMD Bulldozer CPUs. Fixed issue with last commit. 2012-01-08 19:54:22 +00:00
dev
527c4b58c1 Added support for i7 Extreme Edition processors. 2012-01-08 19:45:01 +00:00
430ac8323f Really send HUP signal when called with the graceful parameter 2012-01-08 19:08:04 +00:00
8c70af56ad refreshed patch 2012-01-08 16:35:53 +00:00
zzz
7feaadbd7d fixup after prop 2012-01-08 15:01:35 +00:00
zzz
69bbb88407 propagate from branch 'i2p.i2p' (head b7ee04ecc7a594239e977b25a52ebdabadce558e)
to branch 'i2p.i2p.zzz.jetty6' (head 2cd4a4dae8b87b9ed2128d83aff1b39e3a818556)
2012-01-08 14:55:10 +00:00
zzz
59bd51a419 move ReadConfigJob 2012-01-08 14:08:14 +00:00
zzz
b34ae8f051 more fixups from RouterAddress changes 2012-01-08 14:04:19 +00:00
zzz
5a4f2069f0 propagate from branch 'i2p.i2p.zzz.test' (head 1959049922a17635226170bf3309e281d8e02e43)
to branch 'i2p.i2p' (head a06bf8c92a0e1195b6f98dbad3e8898339bc6053)
2012-01-08 13:16:07 +00:00
zzz
f6ca6a5e0d * Router shutdown:
- Fix failsafe shutdown hook broken in 0.8.8;
      HUP, INT, and TERM signals should now shut down cleanly.
    - Shutdown hook no longer prevents other hooks from running
    - Trap HUP, if router.gracefulHUP=true, and do graceful shutdown.
      Only under wrapper, non-Windows.
    - i2prouter stop now uses SIGTERM
    - Implement i2prouter graceful using SIGHUP (ticket #580)
    - Configure wrapper to ignore SIGUSR1 and SIGUSR2 as they will shut down
      or crash the JVM
2012-01-08 13:15:47 +00:00
56a67729e3 Fix compilation with gmp 5.0.1 2012-01-08 01:14:48 +00:00
0c81d519b7 Debian: Fix postinst script
On systems without an i2psvc group, the postinstall would fail. This change
will add the group if it doesn't exist. Also adding "||true" to the usermod
command in case the command returns a non-zero status.
2012-01-07 00:20:43 +00:00
5067499fa1 fix typo (s/exit/exist/) 2012-01-06 04:07:35 +00:00
c155c4b601 Return 1 if eepget transfer fails (fixes #576) 2012-01-06 03:07:25 +00:00
zzz
cc16834455 0.8.12 2012-01-06 00:40:20 +00:00
zzz
708e943c44 updates after review 2012-01-06 00:38:33 +00:00
zzz
43ec87e412 - i2ptunnel: Move bean classes from the jar to the war.
External usage was deprecated about a year ago.
  This will break old seedless plugins.
2012-01-04 15:22:01 +00:00
zzz
a14643f710 fix eepsite migration in packages 2012-01-04 15:20:35 +00:00
zzz
a2d6dd2c5b disable i2psnark retry link until it can be fixed (ticket #575) 2012-01-04 02:22:34 +00:00
7d6ab5ca41 Updated geoip.txt from 2011-12-08 Maxmind database 2012-01-04 01:07:06 +00:00
a9e03504de Updated debian changelog 2012-01-04 01:01:49 +00:00
3b59af11f6 Suggest itoopie 2012-01-04 01:01:27 +00:00
3a2286f874 Debian: EXTRA is now assigned dymanically
Before there was a patch to add the -deb1 to the RouterVersion.java file, but
it needed me to update the deb#. With my newly budding regex skills, I'm now manipulating
it using sed and determining the number according to the debian version number.
2012-01-04 00:57:54 +00:00
ab0e8d94a2 Update geoip country list
PN,Pitcairn Islands added; we already had the flag.
2012-01-03 00:07:42 +00:00
be7770e679 Add EXTRAVERSION to the build number, custom installers, javadocs
With this check-in I'm adding the EXTRAVERSION to our javadocs and the custom
installer targets (if EXTRAVERSION is set in RouterVersion.java). Also,
i2pinstall*jar and i2pinstall.bz2 will be removed when ant clean is run.
2012-01-02 19:07:09 +00:00
60c5f06689 Add Isle of Man flag
Flag courtesy of the Open Clip Art Library, released into the public domain
2012-01-02 16:30:13 +00:00
b391ed15ed Update wrapper to 3.5.13 2012-01-02 16:12:50 +00:00
zzz
88cf742895 fixup after prop 2012-01-02 14:42:19 +00:00
zzz
f0eb5663f7 propagate from branch 'i2p.i2p' (head d289b6cafae6b23ce699dca11dbb3e993c8f827f)
to branch 'i2p.i2p.zzz.test' (head e2c6210696c78c54650ff345f18ad62b4543a18b)
2012-01-02 14:39:17 +00:00
zzz
d8e297dde7 * Fix webapp PortMapper lookup for SSL-only console 2012-01-02 12:31:23 +00:00
zzz
f956539b4b Wrapper files for armv7.
Compiled on trimslice:
    gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) 
    java version "1.6.0_18"
    OpenJDK Runtime Environment (IcedTea6 1.8.10) (6b18-1.8.10-0ubuntu1~11.04.1)
    OpenJDK Zero VM (build 14.0-b16, mixed mode)
    Wrapper 3.5.13 GPLv2
    All binaries stripped.
2012-01-02 12:22:03 +00:00
0ad4789ff2 Add jetty-rewrite-handler.jar to the Debian packaging 2012-01-02 02:04:51 +00:00
dd9cae57a8 merge of '83079d347b764886d77d9d9de902011f09f5dcce'
and 'c76215859aa3b76a04c4a83a1ded20548a8773a6'
2012-01-02 00:59:33 +00:00
84e4558d7d Updated packaging scripts to work with Debian's (and Ubuntu's) Jetty packages. 2012-01-01 23:31:41 +00:00
2dcc75ad2a set /var/log/i2p to group i2psvc instead of adm 2012-01-01 18:26:38 +00:00
6409f07c9b debian initscript: move I2PTEMP to /tmp/i2p-daemon 2012-01-01 18:14:08 +00:00
zzz
33b25b5780 - Fix jetty.xml migrate quote handling
- Fix I2PRequestLog javadoc
- Rename jetty-threadpool.jar to jetty-java5-threadpool.jar to match ubuntu symlink
- Bundle jetty-rewrite-handler.jar (20KB) and .xml config to
  make it easier to do rewrites (unused by I2P)
2012-01-01 17:57:59 +00:00
b38f6606c1 0.8.12 will be released with v3.5.13 of the wrapper 2012-01-01 16:55:28 +00:00
0a239e1d4a Remove the mention of GMP 4.1
All of the present jbigi libs are linked against 4.3.x and 5.0.2.
2012-01-01 16:53:29 +00:00
30e298d98b Convert extraneous tabs to spaces 2012-01-01 16:52:21 +00:00
3729aa31fd Add Estonian to Transifex (and upload the router console translation to tx) 2012-01-01 02:18:00 +00:00
3f4d154414 Brief instructions on lipo. 2012-01-01 00:20:06 +00:00
4c76a93adb Add CPU type check for OSX
I removed Tanuki's broken CPU "bitness" check for OSX in
3db46be1ede7d858b6c319905cf310d99227eb29. With this commit I add one that
works. Note that at this point we don't use the "bitness" checking because we
ship a quad-fat wrapper for OSX. Unfortunately, one can only manipulate the osx
binaries with "lipo" which is only available in OSX. In the future we may want
to use the "bitness" logic.

In any case, the old check set the bits to 64 for Leopard and above, but just
because a Mac is running Leopard or Snow Leopard doesn't mean it's 64bit
capable. This addition of mine will actually check the flags using sysctl. I'm
not using uname because OSX < Lion starts in 32bit mode by default (but can
still run 64bit binaries).
2011-12-31 22:46:49 +00:00
ce0e0b2004 Fix typo (s/stip/strip/), thanks k0e 2011-12-31 20:38:29 +00:00
zzz
fa0b7d9acc merge of '3e30b7ad2af5190cd2d124656e272700c53b8219'
and '554846d3fd4ebcdbfaccb3a001098626e0b26ca0'
2011-12-31 16:27:38 +00:00
zzz
c82dbd82b1 * Fix log NPE when saveConfig() fails at startup, thx kytv (backport from jetty6 branch) 2011-12-31 14:49:47 +00:00
zzz
b5f97d0883 - Fix jetty.xml copy bug
- Fix NPE logging error when Router.saveConfig() fails early
- Log readConfig() and saveConfig() errors to wrapper log if
  router log not yet available
- Handle non-split configuration in MigrateJetty
- Better logging of migration errors
- Handle existing backup files during migration better
2011-12-31 14:38:37 +00:00
b3e162e706 s/libwrapper.dll/wrapper.dll/ 2011-12-31 14:16:24 +00:00
f6d821c932 linux-ppc specific wrapper notes 2011-12-31 14:14:35 +00:00
45fb0ad9f3 Small wrapper-building HOWTO for BSD 2011-12-31 14:14:08 +00:00
zzz
beb6d1f43f I2PLogger fix; better log init 2011-12-31 00:49:39 +00:00
zzz
c0662bc111 license update 2011-12-31 00:06:23 +00:00
zzz
327f38b535 fix JettyFixes target 2011-12-30 23:34:18 +00:00
zzz
87008f3fe3 make jetty version comparable 2011-12-30 22:12:30 +00:00
zzz
4d1736eaf6 jetty logging tweaks 2011-12-30 21:58:16 +00:00
zzz
03e86fcb24 make jetty use I2P logging 2011-12-30 19:44:57 +00:00
zzz
5346dc1a98 * Estonian router console translation
thx "ajutine" - public domain
2011-12-30 17:06:32 +00:00
zzz
be7623a462 - Start webapps after console for faster startup
- Add delay in systray port checker to ensure console is up
- Move I2PRequestLog to net.i2p.jetty package
2011-12-29 23:25:27 +00:00
zzz
f92edb44ba how to update the wrapper 2011-12-29 16:51:47 +00:00
2250ce642a Remove mention of mtn repository that hasn't been active for nearly a year 2011-12-27 23:04:12 +00:00
f4b52b7ccd Remove tino's freenet proxy as it has been shut down 2011-12-27 23:00:31 +00:00
59f80086db Translation updates (es & sv) from Transifex 2011-12-27 22:41:00 +00:00
8e7bd9280d Spanish and Swedish debconf translation updates from Transifex 2011-12-27 22:32:39 +00:00
daca27ea45 loosen exit statuses 2011-12-27 16:02:59 +00:00
7b49493924 Redo existing account handling 2011-12-26 18:43:28 +00:00
848f30955d initscript improvements
- move router.ping to /var/run/i2p
   - move temp files to /var/tmp/i2p
   - Since gaps are allowed in the numbering with newer wrapper versions, start
     *.adddional.# numbering at 10
   - redirect errors to stderr
2011-12-26 18:42:13 +00:00
07162b56c8 escape quotation marks in jsp files
The routerconsole's precompilejsp target failed when using the jetty packages
from Debian. These escaped jsp files also work with 'our' jetty6 (and jetty6).
2011-12-25 22:37:30 +00:00
d9e4c4d7f4 refresh patch 2011-12-25 00:42:59 +00:00
zzz
ec7ec564be - Fix Console concurrent ThreadPool
- Uncomment eepsite concurrent ThreadPool and fix arguments
- Reduce eepsite acceptors to 1
- Add jetty-ssl.xml example
- jetty.xml cleanup
2011-12-24 17:09:01 +00:00
zzz
0fb9096096 - Fix help.jsp mapping to language
- Fix nowebapp.jsp for non-started webapps
- Fix nowebapp.jsp for url /foo for non-started webapp foo
2011-12-24 05:26:56 +00:00
zzz
bb7a88ffc9 * Plugins:
- Enforce min and max Jetty versions at plugin installation
    - Enforce I2P, Java, and Jetty versions at plugin startup too
2011-12-24 00:48:30 +00:00
zzz
5a4becba68 updater200WithJetty target 2011-12-23 22:00:16 +00:00
zzz
8fa720539a RouterInfo, RouterAddress: Optimizations and integrity checks
- Remove synchronization
    - Do not allow contents to change after being set, throw IllegalStateException
    - Do not copy contents out in getters
    - Make options final
    - Add getOption() and getOptionsMap() methods
2011-12-23 21:41:58 +00:00
zzz
2083d8c6a6 basic jetty.xml migration tool 2011-12-23 21:27:38 +00:00
zzz
36cb07b0cc Router: No longer check for updates or start any threads in the Router constructor,
for ease in building multiple routers in the JVM,
        and also because starting threads in a constructor is bad practice.
        All threads now start in runRouter().
        Installation of updates now only happens via Router.main().
2011-12-23 17:01:52 +00:00
zzz
ebad5ad61c tweaks 2011-12-23 16:52:04 +00:00
zzz
8ea587accb fix up-to-date check 2011-12-23 15:41:05 +00:00
zzz
d976b59732 fix getWebApp() 2011-12-23 15:36:44 +00:00
zzz
41ea29209f eepsite:
- fix cgi-bin
  - enable WebAppDeplyer
  - add webdefault.xml
2011-12-23 15:17:34 +00:00
zzz
bbcd6243e7 * Logging: Eliminate LogWriter/LogManager deadlock (thx kytv) 2011-12-23 01:23:12 +00:00
zzz
95eabfaaf8 javadoc fix 2011-12-23 01:11:08 +00:00
zzz
fbbab0d819 mods to compile with Jetty 6 2011-12-23 01:01:40 +00:00
zzz
56901e5ff7 base files from Jetty 5.1.15 for reference 2011-12-23 01:00:45 +00:00
zzz
04cbcf2759 reapply I2P mods 2011-12-23 00:58:13 +00:00
zzz
99ad70e80a 6.1.26 base for reference 2011-12-23 00:57:46 +00:00
zzz
92b9d0a996 First cut at migrating to Jetty 6 and prep for using an external
Jetty 6 package.

- Add several jars from the Jetty 6 distribution
- Update jetty.xml
- Add context XML files
- Update WorkingDir to migrate the content XML files
- Update RouterConsoleRunner and LocaleWebAppHandler
- Remove all old Jetty 5.1.15 local mods;
  this will break Seedless using a custom Server() constructor
- Update I2PRequestLog to be a mod of NCSARequestLog from 6.1.26
- Put I2PRequestLog in its own jar
- Copy MultiPartRequest and other required classes from Jetty 5.1.15
  and add it to susimail, as the replacement MultiPartFilter in
  Jetty 6 is difficult to migrate to, and does not support content-type
- Update i2psnark for Jetty 6
- Disable i2psnark RunStandalone, unused and instantiated Jetty 5
- Fix up all webapp build.xml to reference new jars

Not yet working: Plugin/webapp run detection and stopping, eepsite CGI
Not well tested: Plugins, classpaths, webapps
2011-12-23 00:56:48 +00:00
0874b3e461 Add updater200WithJavadoc build target 2011-12-21 15:32:14 +00:00
ac8d65ad78 Debconf: clarify account existence warning
In the forums, someone thought the i2psvc account needed to be pre-existing;
therefore, I'll try to make it clearer.
2011-12-20 23:12:33 +00:00
bd14dc3112 i2prouter: set locale environment variables if LANG not set
Check for /etc/environment and /etc/default/locale and retrieve/set locale
variables from them--but only if LANG is unset. This should help in those
cases in which someone is starting I2P as a daemon using an initscript and I2P is
starting /before/ the environment is configured, leading to the wrong file
encoding being detected.
2011-12-19 18:14:21 +00:00
dev
cefe20f11d Switched itoopie to a brighter version. 2011-12-19 16:46:48 +00:00
zzz
78229227d2 * Router: Cleanup startup jobs and router.config reading; javadocs 2011-12-18 15:17:09 +00:00
zzz
61810b7215 tweaks 2011-12-18 13:28:57 +00:00
zzz
fb4d85ff8b * Blocklist: Buffer input to speed lookup
* PersistentDataStore: Buffer file writes and reads
2011-12-18 13:28:26 +00:00
zzz
937d2c54c8 * Addresses: Add utility toString() methods
* Transport: Log tweaks
2011-12-18 13:25:51 +00:00
5b37df5bc9 ...and now that my key is added, let's set it to trusted status 2011-12-18 01:14:10 +00:00
add3bcedf6 -23-rc
Mainly bumping the version because of the theme regression (that I introduced and fixed).
2011-12-18 00:58:25 +00:00
7284af9329 Add my signing key 2011-12-18 00:43:50 +00:00
959932b827 reference UK updates 2011-12-18 00:10:43 +00:00
f9b2100d75 Updated Ukrainian translation from Transifex 2011-12-18 00:09:52 +00:00
a2454e8e7d tiny regression fix
The css file originally had align:center, which is invalid. I assumed
text-align was meant but I was obviously wrong.
2011-12-17 23:07:44 +00:00
zzz
4322cb3ee5 merge of '0035c4f64c2b0f23c9e007363b634f360e2f10cb'
and '0c2d5fea1f036773ef51ce22d9d8c4e9203ee5f3'
2011-12-17 18:52:23 +00:00
a7311a5752 Minor css fixes (fixing validity not style) 2011-12-17 18:27:17 +00:00
zzz
b18e7c7839 add some line feeds 2011-12-17 14:30:14 +00:00
zzz
18b8ddc419 misc. log tweaks 2011-12-17 14:04:57 +00:00
zzz
48841481f0 * ProfileManager: Make some profile update methods non-blocking to reduce
stalls in the transports during profile reorg
    - Make isFailing() non-blocking since it's always false
2011-12-17 14:02:01 +00:00
zzz
bf45e31c62 * GeoIP: Reduce thread priority during lookup 2011-12-17 13:55:45 +00:00
zzz
1488cd0f48 * i2psnark:
- Replace file name characters not supported in default charset
    - Add torrent file name to local details page
2011-12-17 13:52:32 +00:00
5b05d86ec6 merge of '577418047ed3ead63f9f7dc4211cf4ac7e19d251'
and 'c5d321a2c838422c5e813359c2e86f9b98561cf9'
2011-12-16 12:24:37 +00:00
212981dfee Add hooks so the new PortMapper lets i2p plugins not fail when the router console is not on port 7657. Also raise an exception when requesting unregistered ports so as to encourage swift adding of the registration hooks when those ports are taken. 2011-12-15 23:36:32 +00:00
7864404a8c Swedish language translation updates from Transifex 2011-12-15 20:20:33 +00:00
zzz
51e4003089 merge of 'db5a04b2f4ebd4869d162a3bfa48221dec583b7e'
and 'e82c7db57396b2f2057f46c000a688200c4d12ea'
2011-12-14 03:59:19 +00:00
zzz
6da32a1ccb -21 2011-12-14 00:24:33 +00:00
zzz
eb32e2e23e merge of '581e8c75800b84404730c41f6eb904fbc4e43804'
and 'fda7a0fe63b4cda793b7c15d5d263c211b2a0903'
2011-12-14 00:20:17 +00:00
5673a6554b Update Oracle's javadoc URL 2011-12-14 00:09:15 +00:00
fe5c34ebae Minor Javadoc fixes
The author field showed the "may eat your children" line..
2011-12-13 23:57:14 +00:00
6ce5e8bd03 Don't require that full stats need to enabled in order to graph high capacity
peers. (closes #450)
2011-12-13 23:08:41 +00:00
zzz
27f05879b1 note that these will be moved to router.jar at some point 2011-12-13 21:38:24 +00:00
zzz
60297f56d7 * GeoIP: Buffer input to speed lookup by 10x 2011-12-13 21:19:32 +00:00
zzz
c92c664d3d used cached cert; generics 2011-12-13 20:38:02 +00:00
zzz
24c1473b1d disable debug double-check 2011-12-13 19:12:26 +00:00
zzz
9e88fdeec9 public 2011-12-13 18:59:24 +00:00
zzz
69e5760b37 javadoc clarifications 2011-12-13 18:56:44 +00:00
zzz
5a715f385a * ResettableGZIPInputStream: Better footer log errors 2011-12-13 15:57:51 +00:00
zzz
f9818a2b1d * DataHelper:
- Speed up heavily used long/byte[] converters
    - Add little endian versions of the converters
    - Cache common properties keys
  * RouterAddress: Cache transport names
2011-12-13 15:55:03 +00:00
zzz
900defcd42 * MessageHistory:
- Flush at shutdown
    - Fix file location, only delete if enabled
    - Cleanups, concurrent
2011-12-13 15:25:56 +00:00
zzz
15cbb6bb71 add charset, which is not necessarily the same as file.encoding 2011-12-13 15:24:20 +00:00
zzz
a0c6287d2c log tweak 2011-12-13 15:17:04 +00:00
zzz
14f61bbbb3 * TransportBid: Remove unused stuff 2011-12-13 15:16:07 +00:00
zzz
cd30545c08 * BuildHandler: Increase next hop timeout again 2011-12-13 15:14:54 +00:00
00c0171d31 English po updates (pushed to Transifex) 2011-12-12 11:23:02 +00:00
1e5afa8568 German and Spanish translation updates from Transifex 2011-12-12 11:17:17 +00:00
zzz
e117e3310c * ReusableGZIPInputStream: Fix 3 major bugs, all present since 2005:
- Payloads an exact multiple of 512 bytes failed to decompress
    - Data at the end of the stream could be lost
    - read() returned -1 when the data was 0xff
2011-12-11 22:59:37 +00:00
zzz
8448001a17 * I2NP:
- Deprecate unused stream methods and I2NPMessageReader since
      all transports provide encapsulation.
    - Don't throw IOE from byte array methods
    - Use cached null cert in GarlicClove
    - Add method to limit size of buffer to read
    - Don't check checksum at input, in most cases
    - Reuse checksum at output, for unomodified pass-through messages
      (but recalculating it now and logging on a mismatch for testing)
    - Fix DatabaseLookupMessage to internally store the don't include peers as
      a List, not a Set, so it doesn't get reordered and break the checksum
    - Log cleanup
  * NTCP:
    - Zero-copy and limit size when handing buffer to I2NP
    - Log hex dump message on I2NPMessageException, like in SSU
    - Don't close connection on I2NPMessageException
2011-12-11 21:04:43 +00:00
zzz
032b7d8230 merge of '0fc24e38cf763d87b57238415416a162be39e1ad'
and 'eb56602a5a6fb7a1d5b54be0a0618c0e861da10f'
2011-12-11 20:59:26 +00:00
6caa1c3e81 HTTP server tunnel, use log.WARN for 3 first minutes. (closes #460) 2011-12-11 17:22:28 +00:00
zzz
b47deadc97 log tweak 2011-12-11 13:54:03 +00:00
zzz
60e25b98b7 dont use stream method to avoid data copy 2011-12-11 13:40:06 +00:00
zzz
474909ae66 - Don't set the DatabaseLookupMessage dont-include collection until
it's complete, as DLM now makes a copy
- SearchState generics and cleanups
2011-12-11 13:37:42 +00:00
zzz
caada2bfa0 better logging of corrupted I2NP msgs 2011-12-11 13:36:50 +00:00
zzz
ec460794eb * PortMapper: New service for registering application ports in the context 2011-12-11 13:27:52 +00:00
929d471aa8 uname -s is sufficient
The OS' release version is discarded anyway....so we won't ask for it.
2011-12-11 12:52:32 +00:00
6c4dbc545d Redo functions to remove the dependency on bash 2011-12-11 12:50:24 +00:00
f8a3afd672 Enclose the tr parameters in quotes.
Without quotes will work in most shells but in some configurations it will fail.
2011-12-11 12:19:39 +00:00
5f81e923ca Change my earlier tests to something POSIX compliant
[ test $condition -a test $condition ] is only used in bash

(and I want to make this script work in any bourne compatible shell)
2011-12-11 11:56:59 +00:00
d9f5a8621d Enclose "tr" parameters in quotes 2011-12-11 11:50:41 +00:00
27d9616126 Remove the GNU-only -r parameter to sed
Revisiting this script now that I know a bit about regex.
2011-12-11 11:47:48 +00:00
50e3cdba05 Replace eepget's whitelist of allowed characters with the blacklist from i2psnark. (closes #562)
Thanks to zzz for pointing me in the right direction so I could fix my own bug. :)
2011-12-11 00:10:38 +00:00
6fa01a3b2d Better command to determine JAVABINARY
Switch to one awk command instead of using grep and cut.
2011-12-10 20:11:21 +00:00
fc7d8f72b0 merge of '20dbef275b439ce677bcad2e5044fbe2c3f2699b'
and '63fb5d00844b9465a8c7bfdece6a16946dd0085e'
2011-12-10 10:48:08 +00:00
03ff4dc0fd Add wrapper.java.maxmemory to debconf
The amount of RAM that I2P is limited to can be adjusted using debconf. The
value in /etc/i2p/wrapper.config is stored in the debconf db and is written to
/etc/default/i2p.
2011-12-10 02:17:37 +00:00
1d842f024a If dpkg -P i2p is run, remove /etc/default/i2p 2011-12-10 02:12:16 +00:00
zzz
1c4b0335a5 move error check to a better place 2011-12-09 23:01:19 +00:00
zzz
50606a6828 javadoc fix 2011-12-09 20:19:00 +00:00
zzz
25b0603fde * I2NP:
- Earlier detection and better logging of
      truncated TunnelGatewayMessage and DatabaseStoreMessage
    - Fix and enhance UnknownI2NPMessage implementation
    - Don't deserialize or verify the checksum of the
      embeddedI2NP message in the TunnelGatewayMessage
      at the IBGW, just use UnknownI2NPMessage and pass it along,
      except if zero hop; Still to do: similar thing at OBEP
    - Round expiration times when converting to/from seconds for SSU
    - Cleanups and javadoc
2011-12-09 17:36:49 +00:00
zzz
937ae8ad60 * UDP:
- Round expiration times when converting to seconds
    - Zero-copy of single-fragment messages in MessageReceiver
    - Optimizations, log tweaks, comments
2011-12-09 16:43:54 +00:00
zzz
6d4a9abd35 - Fix major bug from 2005 that corrupted outbound messages
that were an exact multiple of the fragment size.
2011-12-09 16:41:41 +00:00
zzz
533f7620ad bounds check 2011-12-09 13:19:18 +00:00
zzz
49d88f0060 * Console, i2psnark: More button CSS tweaks 2011-12-09 13:18:20 +00:00
zzz
1c4d1e9a62 * LeaseSet: Fix size calculations 2011-12-09 13:16:29 +00:00
zzz
51f20c2c33 * Base64: Add decodestring command in main() 2011-12-09 13:15:19 +00:00
zzz
258effcc84 * UDP PacketBuilder:
- Again allow transmitting all new acks if there is room;
      only limit resend acks
    - Sanity checks to limit to 255 acks
2011-12-07 00:51:31 +00:00
zzz
3bd641abd0 * UDP: Fix major MTU bug introduced in 0.8.9.
- Change large MTU from 1492 to 1484 and small from 608 to 620
      for encryption padding efficiency
    - Enforce sent MTU limit
    - Increase receive buffer size from 1536 to 1572 so that excessive-sized
      packets sent by 0.8.9-0.8.11 routers aren't dropped
    - Limit the max acks in a data packet
    - Limit the duplicate acks in successive data packets
    - Only include acks that will fit in the mtu in a data packet
    - Correctly remove acks from the pending set after they are sent,
      so they aren't sent repeatedly
    - Don't pad data packets unless necessary
    - Debug logging and javadocs
2011-12-06 21:50:33 +00:00
zzz
be1d95e991 form size increase to match future hq.postman.i2p limits 2011-12-06 21:49:55 +00:00
zzz
bd82a0c435 increase next hop send timeout; log tweaks 2011-12-06 21:49:23 +00:00
zzz
0f384c86fe * Router:
- More refactoring tasks to their own files
    - Adjust some thread priorities
2011-12-05 16:18:35 +00:00
zzz
5362e7cf15 comment out some stats 2011-12-05 16:17:29 +00:00
zzz
4c2c198c0a cleanup 2011-12-05 16:17:09 +00:00
zzz
51899e9ea0 CSS 2011-12-05 01:01:14 +00:00
zzz
3fc312a66b locking tweaks 2011-12-05 00:59:58 +00:00
zzz
e9d0d79809 * Tunnel RED:
- Complete rework of participating traffic RED.
      Implement an accurate bandwidth tracker in FIFOBandwidthRefiller.
    - Fix drop priority of VTBM at OBEP
    - Lower drop priority of VTBRM at IBGW
    - Raise threshold from 95% to 120%
    - Remove unused things in HopConfig
...needs more testing...
2011-12-04 19:01:52 +00:00
zzz
69cae1a052 cleanup 2011-12-04 18:53:24 +00:00
zzz
cc71e3a5ca useless null check removal 2011-12-04 18:52:31 +00:00
zzz
c5f98a04fa * Console:
- Less icons on configclients.jsp
    - Fix some browsers breaking line on negative numbers
    - Tab CSS tweaks
2011-12-04 18:52:17 +00:00
zzz
489a0ead14 * UDP: Fix i2np.udp.allowLocal operation (thx Quizzers) 2011-12-04 18:50:40 +00:00
zzz
88e7d60e3e * IRC Client: Lower log level for connect error to warn (thx echelon/sponge) 2011-12-04 18:49:50 +00:00
zzz
0d145fc77f * i2psnark: Fix directories not always deleted when torrent is deleted 2011-12-04 18:49:07 +00:00
zzz
b2e4ab4a30 merge of '400a5244d9222e3fa5b59c06d1d1e2aff96bc0ad'
and 'cd21f20ad4b02cde232d083cca6b68b8c3097edc'
2011-12-02 18:02:10 +00:00
zzz
c9cccd7581 * Console:
- Summary bar tweaks
    - Config nav CSS tabs
    - CSS cleanups from last checkin
2011-12-02 17:21:04 +00:00
58f562d1bd added irc.echelon.i2p to list of IRC servers 2011-12-02 17:15:07 +00:00
zzz
0a76a0db22 * Susimail:
- Login screen tweaks
    - Cleanups, generics, static
2011-12-02 17:05:08 +00:00
zzz
080cc962fb * Console:
- Split up config network page
    - CSS tweaks and cleanups
    - Change some form notices to errors
    - Spiff up the buttons

    new silk icons: See licenses/LICENSE-SilkIcons.txt
    new toopie icon: Shrunk from existing one
2011-11-30 23:23:41 +00:00
zzz
b3fcdb8e46 * Throttle: Update throttle status immediately on shutdown request;
clear starting-up message after 20 minutes
2011-11-30 23:17:40 +00:00
zzz
f6cff78528 * IRC Server: Fix IOOBE (ticket #559) 2011-11-30 23:16:29 +00:00
zzz
5fd20fc77c * i2psnark:
- Retry link on torrent download fail
    - Clear URL after clicking 'add torrent'
    - Message tweaks
    - CSS tweaks
2011-11-30 23:15:22 +00:00
zzz
9ae07688a5 move dummy implementations to their own directory 2011-11-29 19:32:20 +00:00
zzz
9a2a51518a -12 2011-11-29 15:33:37 +00:00
zzz
c0b9fe0340 * Router: Refactor periodic tasks to their own files 2011-11-29 15:25:40 +00:00
zzz
d3564dfcb5 * Random: Use new nextBytes(buf, off, len) for efficiency 2011-11-29 13:54:19 +00:00
zzz
8480788856 -11 2011-11-28 23:04:48 +00:00
zzz
6bcf40b41a merge of '31dc69e6816f5a08d4183272f46d23e9c397f9c6'
and 'da86088817442e065e854274adbd896a92ee148f'
2011-11-28 22:58:08 +00:00
zzz
6b811b36b9 replace more equalsIgnoreCase() calls 2011-11-28 22:55:10 +00:00
zzz
8619fd2c05 dont use equalsIgnoreCase() for booleans 2011-11-28 21:52:49 +00:00
zzz
d9dcb1e583 * Specify locale in all toLowerCase() and toUpperCase() calls to
avoid "Turkish four i problem"
2011-11-28 20:32:23 +00:00
zzz
bf461ee77e * Update: Files listed in deletelist.txt will be deleted 2011-11-28 18:00:36 +00:00
2537f48d08 Add (more) IRCop (and other safe) commands to the IRCfilter whitelist 2011-11-28 17:42:28 +00:00
zzz
1339209fa9 * Reseed:
- Restore i2pbote (ticket #516)
    - Remove r31453 (cert expiring, host soon to be shut down permanently)
2011-11-27 19:06:40 +00:00
zzz
8744c83ff6 optimize outbound whitelist 2011-11-27 19:05:38 +00:00
zzz
09731ffd3a NPE fix tweak 2011-11-26 23:22:01 +00:00
zzz
6d5678c14e pumper NPE fix 2011-11-26 22:57:23 +00:00
zzz
e4004e6f83 socket error log fix 2011-11-26 22:20:31 +00:00
zzz
17773a2de9 merge of '0df36c67913504a966d734f799d1bb39bf358396'
and '220f8941ffde39c665c1213cbc27037defb3527f'
2011-11-26 22:13:07 +00:00
97ead4cdd6 -7 (b/c of irc filtering changes) 2011-11-24 18:28:40 +00:00
18c850c085 commands that are commonly used by IRCops. Should be harmless. 2011-11-24 18:27:55 +00:00
6b49c03eb8 Add MOTD and ADMIN to the "do not filter" list 2011-11-24 10:42:18 +00:00
95dd34f009 Since they're harmless, add default unrealircd aliases to the "don't filter"
list.
2011-11-24 10:40:15 +00:00
zzz
f630d2dd27 * NTCP:
- More optimizations in recvEncrypted()
    - More efficient XOR
    - Reduce bandwidth stat update frequency
    - Check for repeated zero-length reads
2011-11-23 23:36:37 +00:00
zzz
f69f06b038 * Tunnel encryption: More efficient XOR 2011-11-23 22:25:36 +00:00
zzz
5a934050d4 * CryptixAESEngine: Fix bogus bounds checks 2011-11-23 22:12:47 +00:00
zzz
df8cd90b85 * RandomSource: Add new method getBytes(buf, offset, length) 2011-11-23 22:10:34 +00:00
85d7cfb9e0 Remove broken if statement
Tanuki's script has a broken check for 
OSX versions older than Leopard that sets
the CPU bitness to 32 for < 10.5. Since the
doesn't even work on Tiger (or older) (and
our binary is quad-FAT), this check is not 
neeeded.
2011-11-21 22:02:41 +00:00
f97779bed7 fix stupid typo by adding a missing ! (*facepalm*) 2011-11-21 21:36:49 +00:00
f4f5873692 minor HTML fixes, trailing space removal 2011-11-21 20:18:26 +00:00
zzz
f3e2dfacdf stat cleanups 2011-11-21 19:06:17 +00:00
zzz
9d0bafb8fa comment out debug code in initialization 2011-11-21 18:40:36 +00:00
zzz
1119612684 * NTCP Pumper:
- Ensure failsafe pumper code gets run on schedule
    - Don't copy the read buffers
    - Adjust minimum read buffers based on memory
    - New i2np.ntcp.useDirectBuffer option (default false)
    - Mark peer unreachable when read failure is during establishment
    - Change some Reader Lists to Sets to avoid linear search
    - Log tweaks, debugging, new loop stats
2011-11-21 18:22:13 +00:00
zzz
dc6c568e9f equals optimization 2011-11-21 15:29:11 +00:00
zzz
bef8fe0c8c spacing 2011-11-21 15:28:19 +00:00
zzz
3e97958100 * NTCP:
- First cut at improving EventPumper performance (ticket #551)
    - Establishment timeout cleanup/concurrent
    - Remove some logging and stats
    - Switch some Queues from LBQ to CLQ
    - Static ByteBuffer cache
2011-11-18 16:21:18 +00:00
zzz
cac1ad35bf reorder susidns xml changes 2011-11-18 16:20:39 +00:00
zzz
579af7e3ad build fix 2011-11-16 13:29:26 +00:00
zzz
e4ee5e3016 * NTCP: Reduce log level for race (ticket #392)
* NTCPConnection: Concurrent PrepBufs
  * OutNetMessage: Remove some fields and methods used only in NTCP debugging
2011-11-16 01:00:08 +00:00
zzz
caaa8dacad cleanup 2011-11-16 00:57:40 +00:00
zzz
ff499844a2 * Router: Move router.ping file from temp directory to config directory 2011-11-16 00:56:45 +00:00
zzz
97fe1baf6a * Console: Add Jetty version to logs page 2011-11-16 00:48:17 +00:00
zzz
7aff01ea84 * SusiDNS: Remove .jsp suffixes 2011-11-14 15:06:23 +00:00
zzz
7f467dbdc8 cleanups 2011-11-14 15:05:26 +00:00
zzz
0675c4caeb * Profiles: Only use same-country metric for countries with
lots of I2P users
2011-11-14 15:04:27 +00:00
zzz
66f25e845a * Console: Remove % chart at bottom of tunnels.jsp 2011-11-14 15:02:57 +00:00
zzz
fcbee9d9c5 * Installer: Fix Ukrainian translation (ticket #550) thx rndnick 2011-11-12 13:55:46 +00:00
zzz
624badfb5f * Console:
- Less magic and fix img sizes, for speed and less artifacts while rendering
    - CSS tweaks
2011-11-11 02:50:55 +00:00
4677b27e49 Minor and maybe pointless change: We use monotone to manage the i2p source. Any
other DVCSes that I2P may be managed in aren't official.
2011-11-10 12:25:30 +00:00
zzz
f9c3d58b47 -1 2011-11-09 23:31:25 +00:00
zzz
5b5c39bf45 merge of '95d0c51104a5fdcaa83228fbf9016b66b6227600'
and 'fb96ae6d12deead2b45984e33fcfeedb4641b3ac'
2011-11-09 23:27:45 +00:00
zzz
37e3e9e2cf * Console: Add ability to hide news 2011-11-09 18:38:39 +00:00
zzz
af42b9e9a8 * Router: Clean up config map methods and uses 2011-11-09 18:36:32 +00:00
zzz
3fbe8e70e6 * wrapper.config: Increase shutdown timeout 2011-11-09 18:33:06 +00:00
zzz
6a234759d5 * I2PTunnel IRC Client: Don't filter PASS (ticket #549) 2011-11-09 18:32:01 +00:00
zzz
85a8b587cd License corrections that should make things more compatible:
Jetty and commons logging are now Apache 2.0 (not 1.1)
    systray4j.jar is LGPL (not GPL)
    Note where a later GPL version is allowed
2011-11-09 18:30:48 +00:00
6849427b4f *Sigh* The WRAPPER_CONF variable exists and I don't know why I didn't use it
before with my 'gentoo hack'.
2011-11-09 18:30:21 +00:00
bb1b9d63df <br/> is XHTML not HTML 2011-11-09 16:47:04 +00:00
5efd19e4e0 Add doctype, <title>, <p> tags. 2011-11-08 21:26:39 +00:00
c0a63bcd76 fix stupid packaging error brought about by my tweaks for Gentoo. 2011-11-08 21:00:41 +00:00
6fc0e0fe22 ticket #490 2011-11-08 14:40:24 +00:00
ef3f184233 Minor cleanups to the css files (no actual theme changes)
* Remove spaces before :
  * Remove traling spaces
  * Remove lines consisting of spaces
  * Ensure spaces before {
  * Fix indentation in a couple of spots
2011-11-08 11:44:45 +00:00
zzz
20733d3bd2 to DOS line endings 2011-11-07 16:06:05 +00:00
zzz
530b481ffd 0.8.11 2011-11-07 14:48:31 +00:00
zzz
8ecf423dfc javadoc 2011-11-07 14:21:07 +00:00
67cc3ad5b0 -7rc
Updating geoip
Bumping version b/c of dream's changes to I2PServerSockets
2011-11-05 14:33:19 +00:00
e6dcd3a892 merge of '01e66d36ba6e97474a6a11980be54d55d4897219'
and '6bdb396ca63eea516f2f5ada93d4d8d94ad76b77'
2011-11-05 14:30:44 +00:00
e257cc8b05 updated & pushed to tx 2011-11-05 01:09:50 +00:00
26d3646630 Added an "accepting" channel for I2PServerSockets that is really low brow, but should work for now. Compiles, runs. 2011-11-04 22:56:09 +00:00
668df37d20 becoming an upgrade hosting host 2011-11-03 21:58:44 +00:00
9e6885d9b3 updated patch due to gentoo related changes to i2prouter and wrapper.config 2011-11-03 21:57:19 +00:00
zzz
2a57c24e9d spelling fix 2011-11-02 18:07:02 +00:00
zzz
e53290db18 proxy error page tweaks 2011-11-02 18:05:40 +00:00
zzz
96d5d75d56 * Reseed:
- Add new host i2p.mooo.com thx "bugme" (wii.torproject -at- gmail dot com)
    - Handle % escaping in file URLs
    - Do basic validation of router hash
    - Add some more sanity checks
2011-11-02 17:58:24 +00:00
32a4ccc575 Gentoo compatibility
Update i2prouter to be more compatible with Gentoo systems and add a commented out entry to wrapper.config
2011-11-02 00:05:51 +00:00
1c0554ab6e Ukrainian translation updates from Transifex 2011-11-01 00:17:01 +00:00
347c579da5 Ukrainian debconf translations from transifex 2011-11-01 00:16:35 +00:00
835db4341f enable more resources in Ukrainian from tx 2011-11-01 00:16:00 +00:00
zzz
bf0947ee82 * Tunnels:
- Restore and implement lengthOverride()
    - Adjust quantity override
2011-10-31 21:13:01 +00:00
zzz
a3a1110b41 * ProfileOrganizer:
- Fix rare NSEE thx sponge
2011-10-31 16:48:46 +00:00
zzz
fc074234af * ProfileOrganizer:
- Fix expiration of old profiles
    - Don't exceed high cap limit between reorgs
    - Reduce max reorg cycle time
    - Reduce new bonus values
2011-10-31 00:12:21 +00:00
zzz
1e8e067a80 micro-optimization 2011-10-31 00:09:47 +00:00
zzz
fd25ead0bd * NetDB: Reduce max RI publish interval 2011-10-31 00:09:10 +00:00
zzz
6892469e0e * SSU: Increase threshold for incremented cost 2011-10-31 00:08:34 +00:00
zzz
8f31713f6a * CapacityCalculator: Small adjustment for XOR distance to
break ties and encourage closeness
2011-10-29 14:05:39 +00:00
zzz
a9698dd89e -3 2011-10-29 13:23:30 +00:00
zzz
223de5606e * SSU: Limit max peers to use as introducers 2011-10-29 13:21:57 +00:00
zzz
e4b5b97268 negative duration cleanup 2011-10-29 13:21:00 +00:00
zzz
669b26a171 lower min profile expire time 2011-10-29 13:20:27 +00:00
zzz
e3723d7c9f build handler threads advanced config option 2011-10-29 13:19:59 +00:00
zzz
33d566be36 * Tunnels:
- Reduce exploratory tunnel quantity if build success rate
       is very low, but may disable this later
     - Try rebuilding same tunnel (some of the time)
2011-10-28 02:03:01 +00:00
zzz
e8fe115ffe * BuildHandler: Move inbound request handling to its own thread(s)
(ticket #542, see also http://zzz.i2p/topics/996)
2011-10-28 01:43:33 +00:00
zzz
d7a5e3ef53 * CapacityCalculator: Small boost for connected peers, new peers, and
same-country peers; deduct for recently-unreachable peers
2011-10-28 01:28:41 +00:00
zzz
042da4d921 max conns 2011-10-28 01:27:11 +00:00
zzz
05522addba javadoc 2011-10-28 01:26:11 +00:00
zzz
f4fa5d115a * SSU:
- Increase default max connections again
    - Reduce min idle time
    - Separate out introducer pinger from introducer selection
      so it can be run separately and more often
    - Only ping introducers if we need them
2011-10-28 01:25:44 +00:00
zzz
b7ba422983 * DecayingBloomFilter: Whups fix NPE from previous checkin if log=INFO 2011-10-28 01:23:28 +00:00
zzz
7f1c5b2e1a * NTCP: Reduce min idle time 2011-10-28 01:22:53 +00:00
zzz
157a78857d * Tunnels:
- Make most classes package private
    - Final, static, logs, cleanups
    - Consolideate createRateStat calls
    - Add getTotalLength()
    - Remove unused lengthOverride()
2011-10-25 21:39:32 +00:00
zzz
ef93532c96 dont require restart after changing router.publishPeerRankings 2011-10-25 21:36:52 +00:00
zzz
fe6fd13a6a unused and javadoc 2011-10-25 21:35:26 +00:00
zzz
05cd98f9b4 util cleanups 2011-10-25 21:34:32 +00:00
zzz
1a2bd800d9 checklist cleanup 2011-10-25 21:33:24 +00:00
zzz
661604dd4e * BloomSHA1, DecayingBloomFilter:
- Refactor for concurrent, at some small risk of false negatives
    - Optimizations to cache objects and reuse offsets
2011-10-25 21:33:12 +00:00
zzz
1fc6d0ad54 * UDP: Mark only first fragment as a duplicate 2011-10-25 21:31:23 +00:00
zzz
1a6e9257f3 cleanup 2011-10-25 21:31:03 +00:00
zzz
1cd0177f87 handle negative durations better 2011-10-25 21:29:49 +00:00
zzz
c90097eca7 0.8.10 2011-10-19 23:43:12 +00:00
a01c11ca1a checking in updated Debian changelog 2011-10-19 19:59:15 +00:00
a57b57f306 restore Serbia & Montenegro 2011-10-19 19:40:11 +00:00
10e412d494 updated before push to tx 2011-10-19 19:36:47 +00:00
6a798fb7b5 Italian update from tx (ty danimoth) 2011-10-19 19:32:59 +00:00
23ad969332 merge of '9c2afc5c3b2920c5284346d3b93a8075fc9d2f37'
and 'cba0dcc238e5631aff5850f49d9cb07ec70e8f65'
2011-10-19 19:22:04 +00:00
zzz
b475e31f70 * I2PTunnel: Fix timeout message on POST (ticket # ) 2011-10-19 19:09:44 +00:00
fda3ef2cfc Update russian translation 2011-10-19 19:03:26 +00:00
zzz
892ef4abe1 reduce RI expiration again 2011-10-19 02:33:45 +00:00
zzz
81093d1342 * StoreJob: Ensure nonzero token
* Tunnels: Connection limit mitigation:
    - Disable tunnel testing
    - Implement closest-to-the-key tunnel selection
    - Use closest-selection in NetDB lookups, stores, and verifies;
      OCMOSJ; and in BuildRequestor
2011-10-18 19:28:47 +00:00
zzz
abd823ab95 dash two 2011-10-17 17:48:43 +00:00
zzz
3bc284b522 hide tunnel lag if testing is disabled 2011-10-17 17:28:57 +00:00
zzz
5f7c971345 return unmodifiable collections 2011-10-17 17:28:37 +00:00
zzz
46a1506c51 log tweak 2011-10-17 17:26:31 +00:00
zzz
0202faf7f9 * SSU: Increase max concurrent outbound attempts;
fix udp.establishRejected stat
2011-10-17 17:25:10 +00:00
zzz
bff518a038 more efficient empty check 2011-10-17 17:23:40 +00:00
zzz
0b293c517f * NetDB: Fix rare NPE from netdb.jsp (ticket #539) 2011-10-17 17:22:23 +00:00
zzz
afd9c2b2c0 * Router: Change all shutdown CRITs to ERRORs; shutdown
the stat manager last to reduce chance of NPEs
    (similar to that in tickets #534,535)
2011-10-17 17:19:57 +00:00
zzz
331da7f4fe javadoc 2011-10-17 17:18:41 +00:00
25a257b6f1 Even though the country no longer exists, re-add Serbia and Montenegro to
countries.txt. zzz: thanks for reminding me that most users will have an old
geoip file.
2011-10-16 16:26:07 +00:00
zzz
82ac0db333 * BuildExecutor: Add tunnel.buildConfigTime stat
* FloodfillMonitorJob: Log tweak (ticket #533)
  * I2CP: Improve error message (ticket #533)
  * JobQueue:
    - Log error when queue is out of order
    - Log tweaks
  * FloodfillPeerSelector: Fix stat NPE (tickets #534,535)
  * RouterThrottle:
    - Fix stat NPE (tickets #534,535)
    - Increase max tunnels and max delay again
  * OutNetMessagePool: Log tweak (ticket #533)
  * Router:
    - Add OOM help (ticket #533)
    - Prevent parallel shutdowns after multiple OOMs (tickets #534,535)
2011-10-15 17:30:24 +00:00
zzz
3dbefa8d01 * SSU: Fix concurrency errors (ticket #536) 2011-10-15 17:21:31 +00:00
zzz
e8712a3a11 * EepGet:
- Add gunzip support (nonproxied only)
    - Clean up progress formatting
  * SSLEepGet:
    - Add gunzip support
    - Increase buffer size
2011-10-15 17:20:30 +00:00
zzz
104594ed59 log cleanup 2011-10-15 17:15:48 +00:00
zzz
a6ce41fac5 * Stats: Add API methods for zero duration, for efficiency 2011-10-15 17:11:40 +00:00
zzz
a97834d2b7 * configupdate.jsp:
- Fix setting to 'never' (ticket #523)
    - Fix always saying trusted keys changed
    - Parameterize tags
2011-10-15 17:09:04 +00:00
485a3ee11a updated translations (fi & sv) from Transifex 2011-10-13 00:35:37 +00:00
b835dbcf4c Add Swedish Debconf translation from Transifex 2011-10-13 00:29:41 +00:00
6a13d22556 Updated English po files to push to Transifex 2011-10-12 23:50:53 +00:00
a296dedebe Add new countries from Maxmind's geoipdb 2011-10-12 23:49:24 +00:00
161e7ca8b2 Add flag for Guernsey from the Open Clip Art Collection, released into the
public domain
2011-10-12 23:47:21 +00:00
zzz
d8080278b3 initial DHT code, needs work 2011-02-06 00:12:54 +00:00
zzz
9d91b90d3c propagate from branch 'i2p.i2p' (head d32b82100cf6076e8f3de30b6a0edfbb034caac7)
to branch 'i2p.i2p.zzz.pcap' (head 551957edb05526df88ff3a2b3c717faed4aac906)
2009-12-27 15:07:45 +00:00
zzz
9203663abf propagate from branch 'i2p.i2p' (head 3f19ceea830345f8c34cbccfef3c759d48cd2f7e)
to branch 'i2p.i2p.zzz.pcap' (head fe70e551db5af3ebac9564b4868a28a1ebab7227)
2009-11-23 13:39:27 +00:00
zzz
d078ed396f move init, add config 2009-11-06 19:16:23 +00:00
zzz
7c36c0c8e7 add TCP options block 2009-11-06 16:39:05 +00:00
zzz
404754bc90 streaming lib packet capture first cut 2009-11-06 12:47:21 +00:00
1763 changed files with 247046 additions and 188470 deletions

View File

@ -2,6 +2,7 @@
# Use mtn add --no-respect-ignore foo.jar to ignore this ignore list
_jsp\.java$
\.bz2$
\.tar$
\.class$
\.diff$
\.exe$
@ -15,12 +16,16 @@ _jsp\.java$
\.su2$
\.tar$
\.war$
.\deb$
\.zip$
^\.
^build/
^build
^pkg-temp/
~$
/build/
/build
/classes/
^debian/copyright
^debian/changelog
override.properties
sloccount.sc
^reports/

View File

@ -2,14 +2,20 @@
source_file = apps/i2ptunnel/locale/messages_en.po
source_lang = en
trans.ar = apps/i2ptunnel/locale/messages_ar.po
trans.cs = apps/i2ptunnel/locale/messages_cs.po
trans.da = apps/i2ptunnel/locale/messages_da.po
trans.de = apps/i2ptunnel/locale/messages_de.po
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.nb = apps/i2ptunnel/locale/messages_nb.po
trans.nl = apps/i2ptunnel/locale/messages_nl.po
trans.ru = apps/i2ptunnel/locale/messages_ru.po
trans.pl = apps/i2ptunnel/locale/messages_pl.po
trans.pt = apps/i2ptunnel/locale/messages_pt.po
trans.ru_RU = apps/i2ptunnel/locale/messages_ru.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
@ -17,16 +23,23 @@ trans.zh_CN = apps/i2ptunnel/locale/messages_zh.po
source_file = apps/routerconsole/locale/messages_en.po
source_lang = en
trans.ar = apps/routerconsole/locale/messages_ar.po
trans.cs = apps/routerconsole/locale/messages_cs.po
trans.da = apps/routerconsole/locale/messages_da.po
trans.de = apps/routerconsole/locale/messages_de.po
trans.el = apps/routerconsole/locale/messages_el.po
trans.es = apps/routerconsole/locale/messages_es.po
trans.et_EE = apps/routerconsole/locale/messages_et.po
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.nb = apps/routerconsole/locale/messages_nb.po
trans.nl = apps/routerconsole/locale/messages_nl.po
trans.pl = apps/routerconsole/locale/messages_pl.po
trans.ru = apps/routerconsole/locale/messages_ru.po
trans.pt = apps/routerconsole/locale/messages_pt.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
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
@ -35,14 +48,17 @@ trans.zh_CN = apps/routerconsole/locale/messages_zh.po
source_file = apps/i2psnark/locale/messages_en.po
source_lang = en
trans.ar = apps/i2psnark/locale/messages_ar.po
trans.cs = apps/i2psnark/locale/messages_cs.po
trans.de = apps/i2psnark/locale/messages_de.po
trans.es = apps/i2psnark/locale/messages_es.po
trans.fr = apps/i2psnark/locale/messages_fr.po
trans.hu = apps/i2psnark/locale/messages_hu.po
trans.it = apps/i2psnark/locale/messages_it.po
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.ru = apps/i2psnark/locale/messages_ru.po
trans.ru_RU = apps/i2psnark/locale/messages_ru.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
@ -51,14 +67,18 @@ trans.zh_CN = apps/i2psnark/locale/messages_zh.po
source_file = apps/susidns/locale/messages_en.po
source_lang = en
trans.ar = apps/susidns/locale/messages_ar.po
trans.cs = apps/susidns/locale/messages_cs.po
trans.da = apps/susidns/locale/messages_da.po
trans.de = apps/susidns/locale/messages_de.po
trans.el = apps/susidns/locale/messages_el.po
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.nl = apps/susidns/locale/messages_nl.po
trans.pl = apps/susidns/locale/messages_pl.po
trans.ru = apps/susidns/locale/messages_ru.po
trans.pt = apps/susidns/locale/messages_pt.po
trans.ru_RU = apps/susidns/locale/messages_ru.po
trans.sv_SE = apps/susidns/locale/messages_sv.po
trans.uk_UA = apps/susidns/locale/messages_uk.po
trans.vi = apps/susidns/locale/messages_vi.po
@ -68,41 +88,69 @@ trans.zh_CN = apps/susidns/locale/messages_zh.po
source_file = apps/desktopgui/locale/messages_en.po
source_lang = en
trans.ar = apps/desktopgui/locale/messages_ar.po
trans.cs = apps/desktopgui/locale/messages_cs.po
trans.da = apps/desktopgui/locale/messages_da.po
trans.de = apps/desktopgui/locale/messages_de.po
trans.el = apps/desktopgui/locale/messages_el.po
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.nl = apps/desktopgui/locale/messages_nl.po
trans.pl = apps/desktopgui/locale/messages_pl.po
trans.ru = apps/desktopgui/locale/messages_ru.po
trans.ru_RU = apps/desktopgui/locale/messages_ru.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
trans.vi = apps/desktopgui/locale/messages_vi.po
trans.zh_CN = apps/desktopgui/locale/messages_zh.po
[I2P.susimail]
source_file = apps/susimail/locale/messages_en.po
source_lang = en
trans.cs = apps/susimail/locale/messages_cs.po
trans.de = apps/susimail/locale/messages_de.po
trans.es = apps/susimail/locale/messages_es.po
trans.fr = apps/susimail/locale/messages_fr.po
trans.hu = apps/susimail/locale/messages_hu.po
trans.it = apps/susimail/locale/messages_it.po
trans.nl = apps/susimail/locale/messages_nl.po
trans.ru = apps/susimail/locale/messages_ru.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.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
[I2P.debconf]
source_file = debian/po/templates.pot
source_lang = en
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.fr = debian/po/fr.po
trans.it = debian/po/it.po
trans.hu = debian/po/hu.po
trans.pl = debian/po/pl.po
trans.ru = debian/po/ru.po
trans.pt = debian/po/pt.po
trans.ru_RU = debian/po/ru.po
trans.sv_SE = debian/po/sv.po
trans.uk_UA = debian/po/uk.po
trans.tr_TR = debian/po/tr.po
trans.zh_CN = debian/po/zh.po
[I2P.i2prouter-script]
source_file = installer/resources/locale/po/messages_en.po
source_lang = en
trans.de = installer/resources/locale/po/messages_de.po
trans.fr = installer/resources/locale/po/messages_fr.po
trans.it = installer/resources/locale/po/messages_it.po
trans.sv_SE = installer/resources/locale/po/messages_sv.po
trans.ru_RU = installer/resources/locale/po/messages_ru.po
trans.tr_TR = installer/resources/locale/po/messages_tr.po
trans.zh_CN = installer/resources/locale/po/messages_zh.po
[main]
host = http://www.transifex.net

View File

@ -11,7 +11,7 @@ you may use:
lynx http://localhost:7657/
to configure the router.
If you're having trouble, swing by http://forum.i2p2.de/, check the
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
I2P will create and store files and configuration data in the user directory

View File

@ -4,25 +4,38 @@ 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
Apache Ant 1.7.0 or higher
Optional, For multilanguage support: The xgettext, msgfmt, and msgmerge tools installed
The xgettext, msgfmt, and msgmerge tools installed
from the GNU gettext package http://www.gnu.org/software/gettext/
To build and install I2P from source, you must first build
and package up the appropriate installer by running:
ant pkg
ant pkg
On non-x86, use one of the following instead:
ant installer-linux
ant installer-freebsd
ant installer-osx
This will produce a few key files:
* install.jar: the GUI and console installer
* i2pinstall.exe: the GUI and console installer wrapped for cross-platform execution
(only created with ant pkg)
* i2pupdate.zip: the update package
(only created with ant pkg)
From there, you can run the headless (console mode) installer:
java -jar i2pinstall.exe -console
or
java -jar i2pinstall.jar -console
Or run the GUI installer:
java -jar i2pinstall.exe
or
java -jar i2pinstall.jar
or on Windows, just double-click on i2pinstall.exe.
Or move the i2pupdate.zip file into an existing installation directory and restart.

View File

@ -2,7 +2,7 @@ This product includes both public domain code and licensed code as described bel
For all code, unless otherwise stated in the appropriate license, the following applies:
NO WARRANTY
NO WARRANTY
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@ -72,6 +72,9 @@ Public domain except as listed below:
Copyright (c) 2006, Matthew Estes
See licenses/LICENSE-BlockFile.txt
SipHashInline:
Copyright 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
See licenses/LICENSE-Apache2.0.txt
Router (router.jar):
Public domain except as listed below:
@ -79,11 +82,13 @@ Public domain except as listed below:
From freenet
See licenses/LICENSE-GPLv2.txt
UPnP subsystem 1.7:
Copyright (C) 2003-2006 Satoshi Konno
UPnP subsystem (CyberLink) 2.1:
Copyright (C) 2003-2010 Satoshi Konno
See licenses/LICENSE-UPnP.txt
GeoIP data free to use, courtesy http://www.maxmind.com/
GeoIP: GeoLite databases are licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
http://creativecommons.org/licenses/by-sa/3.0/
This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/
Installer:
@ -92,34 +97,34 @@ Installer:
See licenses/LICENSE-Launch4j.txt (in binary packages)
See installer/lib/launch4j/LICENSE.txt (in source packages)
The following projects are used by Launch4j...
MinGW binutils (http://www.mingw.org/)
MinGW binutils (http://www.mingw.org/)
Commons BeanUtils (http://jakarta.apache.org/commons/beanutils/)
Commons BeanUtils (http://jakarta.apache.org/commons/beanutils/)
Commons Logging (http://jakarta.apache.org/commons/logging/)
See licenses/LICENSE-Apache1.1.txt
Commons Logging (http://jakarta.apache.org/commons/logging/)
See licenses/LICENSE-Apache2.0.txt
See licenses/NOTICE-Commons-Logging.txt
XStream (http://xstream.codehaus.org/)
XStream (http://xstream.codehaus.org/)
Copyright (c) 2003-2004, Joe Walnes
See licenses/LICENSE-XStream.txt
JGoodies Forms (http://www.jgoodies.com/freeware/forms/)
JGoodies Forms (http://www.jgoodies.com/freeware/forms/)
Copyright (c) 2002-2004 JGoodies Karsten Lentzsch. All rights reserved.
See licenses/LICENSE-JGoodies-Forms.txt
JGoodies Looks (http://www.jgoodies.com/freeware/looks/)
JGoodies Looks (http://www.jgoodies.com/freeware/looks/)
Copyright (c) 2003 JGoodies Karsten Lentzsch. All rights reserved.
See licenses/LICENSE-JGoodies-Looks.txt
Foxtrot (http://foxtrot.sourceforge.net/)
Foxtrot (http://foxtrot.sourceforge.net/)
Copyright (c) 2002, Simone Bordet & Marco Cravero. All rights reserved.
See licenses/LICENSE-Foxtrot.txt
Nuvola Icon Theme (http://www.icon-king.com)
Nuvola Icon Theme (http://www.icon-king.com)
See licenses/LICENSE-LGPLv2.1.txt
Forms were created using Abeille Forms Designer (https://abeille.dev.java.net/)
Forms were created using Abeille Forms Designer (https://abeille.dev.java.net/)
Izpack 4.3.0:
Copyright (c) 2001-2008 Julien Ponge
@ -127,7 +132,7 @@ Installer:
Java Service Wrapper Community Edition 32-bit 3.5.9:
Java Service Wrapper Community Edition 32-bit 3.5.19:
Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
See licenses/LICENSE-Wrapper.txt
@ -135,10 +140,6 @@ Java Service Wrapper Community Edition 32-bit 3.5.9:
Jbigi Libraries (jbigi.jar):
JNI code public domain.
GMP 4.1.3 / 4.1.4:
Copyright 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
See licenses/LICENSE-LGPLv2.1.txt
GMP 4.3.2 / 5.0.2:
Copyright 1991, 1996, 1999, 2000, 2007 Free Software Foundation, Inc.
See licenses/LICENSE-LGPLv3.txt
@ -156,18 +157,19 @@ Applications:
I2PSnark:
Copyright (C) 2003 Mark J. Wielaard
GPLv2 (or any later version)
See licenses/LICENSE-GPLv2.txt
Silk icons: See licenses/LICENSE-SilkIcons.txt
I2PTunnel:
(c) 2003 - 2004 mihi
GPLv2 with exception.
GPLv2 (or any later version) with exception.
See licenses/LICENSE-I2PTunnel.txt
See licenses/LICENSE-GPLv2.txt
I2PTunnel SOCKS Proxy:
Copyright (c) 2004 by human
GPLv2 with exception.
GPLv2 (or any later version) with exception.
See licenses/LICENSE-I2PTunnel.txt
See licenses/LICENSE-GPLv2.txt
@ -175,10 +177,11 @@ Applications:
By welterde.
See licenses/LICENSE-GPLv2.txt
Jetty 5.1.15:
Copyright 2000-2004 Mort Bay Consulting Pty. Ltd.
See licenses/LICENSE-Apache1.1.txt
Jetty 7.6.11.v20130520:
See licenses/ABOUT-Jetty.html
See licenses/NOTICE-Jetty.html
See licenses/LICENSE-Apache2.0.txt
See licenses/LICENSE-ECLIPSE-1.0.html
See licenses/NOTICE-Commons-Logging.txt
JRobin 1.5.9.1:
@ -197,8 +200,11 @@ Applications:
Flag icons:
- Jersey and EU flag icons: public domain, courtesy Xrmap flag
collection http://www.arvernes.com/wiki/index.php/Xrmap
- Guernsey and Isle of Man flags from the Open Clip Art Library, released into the public domain
- Curaçao, courtesy of David Benbennick, released into the public domain
- All other flag icons: public domain, courtesy mjames@gmail.com http://www.famfamfam.com/
Silk icons: See licenses/LICENSE-SilkIcons.txt
FatCow icons: See licenses/LICENSE-FatCowIcons.txt
GeoIP Data:
Copyright (c) 2008 MaxMind, Inc. All Rights Reserved.
@ -208,6 +214,10 @@ Applications:
"Man with hat over face" & related images licensed under a Creative Commons 2.0 license.
Original photos by Florian Kuhlmann. http://www.flickr.com/photos/floriankuhlmann/3117758155
I2PSnark light theme:
"Creative Commons Cat" licensed under a Creative Commons Attribution 3.0 Unported License.
Original photo by Boaz Arad. http://www.luxphile.com/2011/01/creative-commons-cat.html
SAM:
Public domain.
@ -216,19 +226,27 @@ Applications:
SusiDNS:
Copyright (C) 2005 <susi23@mail.i2p>
GPLv2 (or any later version)
See licenses/LICENSE-GPLv2.txt
Uses Apache Jakarta Standard Tag Library 1.1.2:
See licenses/LICENSE-Apache2.0.txt
Uses Glassfish Standard Tag Library (JSTL) 1.2:
Common Development and Distribution License (CDDL) version 1.0 + GNU General Public License (GPL) version 2
See https://glassfish.dev.java.net/public/CDDL+GPL.html
See licenses/LICENSE-GPLv2.txt
SusiMail:
Copyright (C) 2004-2005 <susi23@mail.i2p>
GPLv2 (or any later version)
See licenses/LICENSE-GPLv2.txt
Systray:
Public domain.
Bundles systray4j code:
See licenses/LICENSE-GPLv2.txt
Bundles systray4j-2.4.1:
See licenses/LICENSE-LGPLv2.1.txt
Tomcat 6.0.37:
Copyright 1999-2013 The Apache Software Foundation
See licenses/LICENSE-Apache2.0.txt
See licenses/NOTICE-Tomcat.txt
Other Applications and Libraries

View File

@ -2,11 +2,18 @@ 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
Apache Ant 1.7.0 or higher
Optional, For multilanguage support: The xgettext, msgfmt, and msgmerge tools installed
The xgettext, msgfmt, and msgmerge tools installed
from the GNU gettext package http://www.gnu.org/software/gettext/
To build:
ant pkg
On x86 systems do:
ant pkg
On non-x86, use one of the following instead:
ant installer-linux
ant installer-freebsd
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.
@ -25,7 +32,7 @@ FAQ:
Need help?
IRC irc.freenode.net #i2p
http://forum.i2p2.de/
http://forum.i2p/
Licenses:
See LICENSE.txt

View File

@ -26,9 +26,9 @@ for i in *.config ; {
( cd $INST_DIR/eepsite
if [ -f jetty.xml ] ; then
rm jetty.xml.new
echo "Please check ${INST_DIR}/eepsite, as there are new files."
else
mv jetty.xml.new jetty.xml
find $PKG/$INSTALL_DIR/i2p -name "*.xml.new" -exec sh -c 'mv "$0" "${0/.new}"' {} \;
fi
)

View File

@ -18,6 +18,7 @@
#
BUILD=1sponge
# INSTALL_DIR is referenced from /, don't prefix it with a '/'
INSTALL_DIR=opt
NAME=i2p
ARCH=noarch
@ -104,7 +105,10 @@ 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
sed "s|%SYSTEM_java_io_tmpdir|/$INSTALL_DIR/i2p|g" a > i2prouter
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
chmod 744 ./i2prouter
chmod 744 ./osid
@ -116,7 +120,7 @@ rm -Rf ./lib/*.dll ./*.bat ./*.exe ./installer ./icons ./a postinstall.sh
mv $PKG/$INSTALL_DIR/i2p/*.config $PKG/install
mv $PKG/$INSTALL_DIR/i2p/blocklist.txt $PKG/$INSTALL_DIR/i2p/blocklist.txt.new
mv $PKG/$INSTALL_DIR/i2p/eepsite/jetty.xml $PKG/$INSTALL_DIR/i2p/eepsite/jetty.xml.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
@ -124,7 +128,7 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
#
# requiredbuilder fucks up REALLY bad, and thinks java is perl?!
# 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

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB.Demos.echo.echoclient;
@ -55,7 +47,7 @@ public class Main {
// exit on anything not legal
break;
}
c = (char)(b & 0x7f); // We only really give a fuck about ASCII
c = (char)(b & 0x7f); // We only care about ASCII
S = new String(S + c);
}
return S;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB.Demos.echo.echoserver;
@ -52,7 +44,7 @@ public class Main {
if(b < 20) {
break;
}
c = (char)(b & 0x7f); // We only really give a fuck about ASCII
c = (char)(b & 0x7f); // We only care about ASCII
S = new String(S + c);
}
return S;

View File

@ -83,7 +83,7 @@
<pathelement path="${javac.classpath}" />
</path>
</copy>
<copy todir="${dist.dir}/lib" file="../../installer/lib/jbigi/jbigi.jar" />
<copy todir="${dist.dir}/lib" file="../../build/jbigi.jar" />
<!-- Extract the classes inside the jar files -->
<unjar dest="${dist.dir}/classes" >

View File

@ -30,11 +30,11 @@ excludes=**/*.html,**/*.txt
file.reference.build-javadoc=../../i2p.i2p/build/javadoc
file.reference.i2p.jar=../../core/java/build/i2p.jar
file.reference.i2ptunnel.jar=../i2ptunnel/java/build/i2ptunnel.jar
file.reference.jbigi.jar=../../installer/lib/jbigi/jbigi.jar
file.reference.jbigi.jar=../../build/jbigi.jar
file.reference.mstreaming.jar=../ministreaming/java/build/mstreaming.jar
file.reference.router.jar=../../router/java/build/router.jar
file.reference.streaming.jar=../streaming/java/build/streaming.jar
file.reference.wrapper.jar=../../installer/lib/wrapper/linux/wrapper.jar
file.reference.wrapper.jar=../../installer/lib/wrapper/all/wrapper.jar
includes=**
jar.compress=true
javac.classpath=\

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -38,7 +30,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.I2PAppContext;
import net.i2p.client.I2PClient;
import net.i2p.client.streaming.RetransmissionTimer;
import net.i2p.util.Log;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer2;
@ -116,7 +107,6 @@ import net.i2p.util.SimpleTimer2;
*/
public class BOB {
private final static Log _log = new Log(BOB.class);
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";
@ -138,7 +128,7 @@ public class BOB {
*/
public static void info(String arg) {
System.out.println("INFO:" + arg);
_log.info(arg);
(new Log(BOB.class)).info(arg);
}
/**
@ -148,7 +138,7 @@ public class BOB {
*/
public static void warn(String arg) {
System.out.println("WARNING:" + arg);
_log.warn(arg);
(new Log(BOB.class)).warn(arg);
}
/**
@ -158,7 +148,7 @@ public class BOB {
*/
public static void error(String arg) {
System.out.println("ERROR: " + arg);
_log.error(arg);
(new Log(BOB.class)).error(arg);
}
/**
@ -182,12 +172,11 @@ public class BOB {
// 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.
RetransmissionTimer Y = RetransmissionTimer.getInstance();
SimpleScheduler Y1 = SimpleScheduler.getInstance();
SimpleTimer2 Y2 = SimpleTimer2.getInstance();
i = Y.hashCode();
i = Y1.hashCode();
i = Y2.hashCode();
Log _log = new Log(BOB.class);
try {
{
File cfg = new File(configLocation);
@ -263,6 +252,7 @@ public class BOB {
i = 0;
boolean g = false;
spin.set(true);
try {
info("BOB is now running.");
listener = new ServerSocket(Integer.parseInt(props.getProperty(PROP_BOB_PORT)), 10, InetAddress.getByName(props.getProperty(PROP_BOB_HOST)));

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -29,6 +21,7 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.Socket;
import java.util.Locale;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.concurrent.atomic.AtomicBoolean;
@ -53,7 +46,7 @@ public class DoCMDS implements Runnable {
// FIX ME
// I need a better way to do versioning, but this will do for now.
public static final String BMAJ = "00", BMIN = "00", BREV = "0F", BEXT = "";
public static final String BMAJ = "00", BMIN = "00", BREV = "10", BEXT = "";
public static final String BOBversion = BMAJ + "." + BMIN + "." + BREV + BEXT;
private Socket server;
private Properties props;
@ -395,11 +388,11 @@ public class DoCMDS implements Runnable {
* Does the base64 information look OK
*
* @param data
* @return
* @return OK
*/
private boolean is64ok(String data) {
try {
Destination x = new Destination(data);
new Destination(data);
return true;
} catch (Exception e) {
return false;
@ -434,7 +427,7 @@ public class DoCMDS implements Runnable {
if (token.countTokens() != 0) {
Command = token.nextToken();
Command =
Command.toLowerCase();
Command.toLowerCase(Locale.US);
if (token.countTokens() != 0) {
Arg = token.nextToken();
} else {

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -41,7 +33,6 @@ public class I2Plistener implements Runnable {
private NamedDB info, database;
private Log _log;
// private int tgwatch;
public I2PSocketManager socketManager;
public I2PServerSocket serverSocket;
private AtomicBoolean lives;
@ -95,7 +86,7 @@ public class I2Plistener implements Runnable {
}
} catch (I2PException e) {
// bad shit
// bad stuff
System.out.println("Exception " + e);
}
} finally {
@ -103,7 +94,7 @@ public class I2Plistener implements Runnable {
serverSocket.close();
} catch (I2PException ex) {
}
// System.out.println("I2Plistener: Close");
// System.out.println("I2Plistener: Close");
}
}
}

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -108,16 +100,6 @@ public class MUXlisten implements Runnable {
this.listener = new ServerSocket(port, backlog, host);
}
socketManager = I2PSocketManagerFactory.createManager(prikey, Q);
// I2PException, IOException, RuntimeException
// To bad we can't just catch and enumerate....
// } catch (I2PException e) {
// Something went bad.
// this.database.getWriteLock();
// this.info.getWriteLock();
// this.info.add("STARTING", new Boolean(false));
// this.info.releaseWriteLock();
// this.database.releaseWriteLock();
// throw new I2PException(e);
} catch (IOException e) {
// Something went bad.
this.database.getWriteLock();
@ -194,7 +176,6 @@ public class MUXlisten implements Runnable {
lock.set(false);
return;
}
// socketManager.addDisconnectListener(new DisconnectListener());
lives.set(true);
lock.set(false);
quit:
@ -313,14 +294,14 @@ public class MUXlisten implements Runnable {
// Hopefully nuke stuff here...
{
String boner = tg.getName();
String groupName = tg.getName();
try {
_log.warn("destroySocketManager " + boner);
_log.warn("destroySocketManager " + groupName);
socketManager.destroySocketManager();
_log.warn("destroySocketManager Successful" + boner);
_log.warn("destroySocketManager Successful" + groupName);
} catch (Exception e) {
// nop
_log.warn("destroySocketManager Failed" + boner);
_log.warn("destroySocketManager Failed" + groupName);
_log.warn(e.toString());
}
}
@ -344,26 +325,25 @@ public class MUXlisten implements Runnable {
// Wait around till all threads are collected.
if (tg != null) {
String boner = tg.getName();
// System.out.println("BOB: MUXlisten: Starting thread collection for: " + boner);
_log.warn("BOB: MUXlisten: Starting thread collection for: " + boner);
// tg.interrupt(); // give my stuff a small smack again.
String groupName = tg.getName();
// System.out.println("BOB: MUXlisten: Starting thread collection for: " + groupName);
_log.warn("BOB: MUXlisten: Starting thread collection for: " + groupName);
if (tg.activeCount() + tg.activeGroupCount() != 0) {
// visit(tg, 0, boner);
// visit(tg, 0, groupName);
int foo = tg.activeCount() + tg.activeGroupCount();
// hopefully no longer needed!
// int bar = lives;
// System.out.println("BOB: MUXlisten: Waiting on threads for " + boner);
// System.out.println("\nBOB: MUXlisten: ThreadGroup dump BEGIN " + boner);
// visit(tg, 0, boner);
// System.out.println("BOB: MUXlisten: ThreadGroup dump END " + boner + "\n");
// System.out.println("BOB: MUXlisten: Waiting on threads for " + groupName);
// System.out.println("\nBOB: MUXlisten: ThreadGroup dump BEGIN " + groupName);
// visit(tg, 0, groupName);
// System.out.println("BOB: MUXlisten: ThreadGroup dump END " + groupName + "\n");
// Happily spin forever :-(
while (foo != 0) {
foo = tg.activeCount() + tg.activeGroupCount();
// if (lives != bar && lives != 0) {
// System.out.println("\nBOB: MUXlisten: ThreadGroup dump BEGIN " + boner);
// visit(tg, 0, boner);
// System.out.println("BOB: MUXlisten: ThreadGroup dump END " + boner + "\n");
// System.out.println("\nBOB: MUXlisten: ThreadGroup dump BEGIN " + groupName);
// visit(tg, 0, groupName);
// System.out.println("BOB: MUXlisten: ThreadGroup dump END " + groupName + "\n");
// }
// bar = lives;
try {
@ -373,8 +353,8 @@ public class MUXlisten implements Runnable {
}
}
}
// System.out.println("BOB: MUXlisten: Threads went away. Success: " + boner);
_log.warn("BOB: MUXlisten: Threads went away. Success: " + boner);
// System.out.println("BOB: MUXlisten: Threads went away. Success: " + groupName);
_log.warn("BOB: MUXlisten: Threads went away. Success: " + groupName);
tg.destroy();
// Zap reference to the ThreadGroup so the JVM can GC it.
tg = null;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,11 +11,10 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
import net.i2p.client.streaming.RetransmissionTimer;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer2;
@ -40,7 +31,6 @@ public class Main {
*/
public static void main(String[] args) {
// THINK THINK THINK THINK THINK THINK
RetransmissionTimer Y = RetransmissionTimer.getInstance();
SimpleScheduler Y1 = SimpleScheduler.getInstance();
SimpleTimer2 Y2 = SimpleTimer2.getInstance();
@ -48,6 +38,5 @@ public class Main {
Y2.stop();
Y1.stop();
Y.stop();
}
}

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -95,14 +87,9 @@ public class TCPio implements Runnable {
if (b > 0) {
Aout.write(a, 0, b);
} else if (b == 0) {
// Will this die? We'll see.
while(Ain.available() == 0) {
Thread.sleep(20);
}
// Thread.yield(); // this should act like a mini sleep.
// if (Ain.available() == 0) {
// Thread.sleep(10);
// }
} else {
/* according to the specs:
*

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -27,8 +19,6 @@ import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketTimeoutException;
// import net.i2p.client.I2PSession;
// import net.i2p.client.I2PSessionException;
import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.I2PSocketManager;

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -30,6 +22,7 @@ import java.io.OutputStream;
import java.net.ConnectException;
import java.net.NoRouteToHostException;
import java.net.Socket;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicBoolean;
import net.i2p.I2PException;
import net.i2p.client.streaming.I2PSocket;
@ -93,7 +86,7 @@ public class TCPtoI2P implements Runnable {
// exit on anything not legal
break;
}
c = (char) (b & 0x7f); // We only really give a fuck about ASCII
c = (char) (b & 0x7f); // We only care about ASCII
S = new String(S + c);
}
return S;
@ -107,20 +100,18 @@ public class TCPtoI2P implements Runnable {
* @throws java.io.IOException
*/
private void Emsg(String e, OutputStream out) throws IOException {
// Debugging System.out.println("ERROR TCPtoI2P: " + e);
// Debugging System.out.println("ERROR TCPtoI2P: " + e);
out.write("ERROR ".concat(e).getBytes());
out.write(13);
out.write(10);
out.flush();
}
// private void rlock() throws Exception {
private void rlock() {
database.getReadLock();
info.getReadLock();
}
// private void runlock() throws Exception {
private void runlock() {
info.releaseReadLock();
database.releaseReadLock();
@ -144,7 +135,7 @@ public class TCPtoI2P implements Runnable {
in = sock.getInputStream();
out = sock.getOutputStream();
line = lnRead(in);
input = line.toLowerCase();
input = line.toLowerCase(Locale.US);
Destination dest = null;
if (input.endsWith(".i2p")) {
//dest = I2PTunnel.destFromName(input);

View File

@ -1,17 +1,9 @@
/**
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* WTFPL
* Version 2, December 2004
*
* Copyright (C) sponge
* Planet Earth
* Everyone is permitted to copy and distribute verbatim or modified
* copies of this license document, and changing it is allowed as long
* as the name is changed.
*
* DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
* TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
*
* 0. You just DO WHAT THE FUCK YOU WANT TO.
*
* See...
*
@ -19,7 +11,7 @@
* and
* http://en.wikipedia.org/wiki/WTFPL
*
* ...for any additional details and liscense questions.
* ...for any additional details and license questions.
*/
package net.i2p.BOB;
@ -111,7 +103,7 @@ public class UDPIOthread implements I2PSessionListener, Runnable {
* @param size
*/
public void messageAvailable(I2PSession session, int msgId, long size) {
// _log.debug("Message available: id = " + msgId + " size = " + size);
// _log.debug("Message available: id = " + msgId + " size = " + size);
try {
byte msg[] = session.receiveMessage(msgId);
out.write(msg);

View File

@ -55,6 +55,8 @@
<property name="workspace.changes" value="" />
<manifest>
<attribute name="Main-Class" value="addressbook.Daemon"/>
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes}" />
@ -73,6 +75,8 @@
<property name="workspace.changes.tr" value="" />
<war basedir="${dist}/tmp" webxml="web.xml" destfile="${dist}/${war}">
<manifest>
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />

View File

@ -27,6 +27,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.NoSuchElementException;
@ -71,7 +72,7 @@ class ConfigIterator implements Iterator<Map.Entry<String, String>> {
inputLine = ConfigParser.stripComments(inputLine);
String[] splitLine = inputLine.split("=");
if (splitLine.length == 2) {
next = new ConfigEntry(splitLine[0].trim().toLowerCase(), splitLine[1].trim());
next = new ConfigEntry(splitLine[0].trim().toLowerCase(Locale.US), splitLine[1].trim());
return true;
}
inputLine = input.readLine();

View File

@ -32,10 +32,12 @@ import java.io.StringReader;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import net.i2p.util.SecureFile;
import net.i2p.util.SecureFileOutputStream;
import net.i2p.util.SystemVersion;
/**
* Utility class providing methods to parse and write files in config file
@ -48,7 +50,7 @@ import net.i2p.util.SecureFileOutputStream;
*/
class ConfigParser {
private static final boolean isWindows = System.getProperty("os.name").startsWith("Win");
private static final boolean isWindows = SystemVersion.isWindows();
/**
* Strip the comments from a String. Lines that begin with '#' and ';' are
@ -92,7 +94,7 @@ class ConfigParser {
inputLine = ConfigParser.stripComments(inputLine);
String[] splitLine = inputLine.split("=");
if (splitLine.length == 2) {
result.put(splitLine[0].trim().toLowerCase(), splitLine[1].trim());
result.put(splitLine[0].trim().toLowerCase(Locale.US), splitLine[1].trim());
}
inputLine = input.readLine();
}

View File

@ -47,7 +47,7 @@ import net.i2p.util.SecureDirectory;
public class Daemon {
public static final String VERSION = "2.0.4";
private static final Daemon _instance = new Daemon();
private boolean _running;
private volatile boolean _running;
private static final boolean DEBUG = false;
/**
@ -230,7 +230,7 @@ public class Daemon {
*/
public static void update(Map<String, String> settings, String home) {
File published = null;
boolean should_publish = Boolean.valueOf(settings.get("should_publish")).booleanValue();
boolean should_publish = Boolean.parseBoolean(settings.get("should_publish"));
if (should_publish)
published = new File(home, settings
.get("published_addressbook"));
@ -261,7 +261,7 @@ public class Daemon {
// If false, add hosts via naming service; if true, write hosts.txt file directly
// Default false
if (Boolean.valueOf(settings.get("update_direct")).booleanValue()) {
if (Boolean.parseBoolean(settings.get("update_direct"))) {
// Direct hosts.txt access
File routerFile = new File(home, settings.get("router_addressbook"));
AddressBook master;

View File

@ -42,8 +42,8 @@ import javax.servlet.http.HttpServletResponse;
*/
public class Servlet extends HttpServlet {
private DaemonThread thread;
private String nonce;
private static final String PROP_NONCE = "addressbook.nonce";
//private String nonce;
//private static final String PROP_NONCE = "addressbook.nonce";
/**
* Hack to allow susidns to kick the daemon when the subscription list changes.
@ -54,15 +54,15 @@ public class Servlet extends HttpServlet {
*/
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
//System.err.println("Got request nonce = " + request.getParameter("nonce"));
if (this.thread != null && request.getParameter("wakeup") != null &&
this.nonce != null && this.nonce.equals(request.getParameter("nonce"))) {
//System.err.println("Sending interrupt");
this.thread.interrupt();
// no output
} else {
//if (this.thread != null && request.getParameter("wakeup") != null &&
// this.nonce != null && this.nonce.equals(request.getParameter("nonce"))) {
// //System.err.println("Sending interrupt");
// this.thread.interrupt();
// // no output
//} else {
PrintWriter out = response.getWriter();
out.write("I2P addressbook OK");
}
//}
}
/* (non-Javadoc)
@ -75,16 +75,16 @@ public class Servlet extends HttpServlet {
} catch (ServletException exp) {
System.err.println("Addressbook init exception: " + exp);
}
this.nonce = "" + Math.abs((new Random()).nextLong());
//this.nonce = "" + Math.abs((new Random()).nextLong());
// put the nonce where susidns can get it
System.setProperty(PROP_NONCE, this.nonce);
//System.setProperty(PROP_NONCE, this.nonce);
String[] args = new String[1];
args[0] = config.getInitParameter("home");
this.thread = new DaemonThread(args);
this.thread.setDaemon(true);
this.thread.setName("Addressbook");
this.thread.start();
System.out.println("INFO: Starting Addressbook " + Daemon.VERSION);
//System.out.println("INFO: Starting Addressbook " + Daemon.VERSION);
//System.out.println("INFO: config root under " + args[0]);
}

View File

@ -26,7 +26,6 @@ import java.util.Iterator;
import java.util.List;
import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper; // debug
/**
* An iterator over the subscriptions in a SubscriptionList. Note that this iterator

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<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 kind="output" path="build"/>
</classpath>

17
apps/desktopgui/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>desktopgui</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

@ -8,12 +8,15 @@
<property name="resources" value="resources"/>
<property name="javadoc" value="javadoc"/>
<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}"/>
<mkdir dir="${build}/${resources}"/>
<mkdir dir="${build}"/>
<mkdir dir="${build}/${resources}"/>
<mkdir dir="${build}/${javadoc}"/>
<mkdir dir="${dist}"/>
</target>
@ -39,7 +42,7 @@
</copy>
</target>
<target name="bundle" >
<target name="bundle" unless="no.bundle">
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
<arg value="./bundle-messages.sh" />
</exec>

View File

@ -1,3 +1,4 @@
#!/bin/sh
#
# Update messages_xx.po and messages_xx.class files,
# from both java and jsp sources.

View File

@ -0,0 +1,55 @@
# 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: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"PO-Revision-Date: 2012-02-12 19:44+0000\n"
"Last-Translator: Waseihou Watashi <waseihou@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.net/projects/p/I2P/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\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 "Spustit I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P startuje!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Startuji"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Spouštím I2P Browser"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Nastavuji 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 "Zastavit I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Nastavení ikony na liště (tray icon)"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Zapnout ikonu na liště?"

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:
# <lixtetrax@grhack.net>, 2012.
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: 2012-07-02 11:28+0000\n"
"Last-Translator: lixtetrax <lixtetrax@grhack.net>\n"
"Language-Team: Greek (http://www.transifex.com/projects/p/I2P/language/el/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: el\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Έναρξη Ι2Ρ"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "Το Ι2Ρ ξεκίνησε!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Έναρξη"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Έναρξη φυλλομετρητή Ι2Ρ"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Παραμετροποίηση desktopgui"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Επανεκκίνηση Ι2Ρ"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Τερματισμός Ι2Ρ"
#: 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

@ -2,21 +2,25 @@
# 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
# foo <foo@bar>, 2009.
#
#
# Translators:
# blabla <blabla@trash-mail.com>, 2011
# ducki2p <ducki2p@gmail.com>, 2011
# foo <foo@bar>, 2009
# Boxoa590, 2013
msgid ""
msgstr ""
"Project-Id-Version: I2P desktopgui\n"
"Report-Msgid-Bugs-To: \n"
"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-03-30 21:58+0100\n"
"Last-Translator: magma <magma@mail.i2p>\n"
"Language-Team: duck <duck@mail.i2p>\n"
"Language: \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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
@ -24,7 +28,7 @@ msgstr "Démarrer I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P démarre!"
msgstr "I2P démarre !"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
@ -32,7 +36,7 @@ msgstr "Démarrage"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Lancer le navigateur"
msgstr "Lancer le navigateur I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
@ -52,5 +56,4 @@ msgstr "Configuration de l'icône de notification"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Activer l'icône de notification"
msgstr "Activer l'icône de notification ?"

View File

@ -0,0 +1,55 @@
# 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: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"PO-Revision-Date: 2012-06-01 16:28+0000\n"
"Last-Translator: AdminLMH <lehetmashogy@i2pmail.org>\n"
"Language-Team: Hungarian (http://www.transifex.net/projects/p/I2P/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "I2P indítása"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P indul!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "indítás"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "I2P Böngésző Indítása"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Asztali Grafikus Felület Beállítása"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "I2P Újraindítása"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "I2P Leállítása"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Tálcaikon beállítása"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Tálcaikon engedélyezve legyen?"

View File

@ -3,15 +3,17 @@
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# Translators:
# <bovas85@gmail.com>, 2012.
# <jokjok@hotmail.it>, 2011.
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-09 17:09+0000\n"
"Last-Translator: mkkid <jokjok@hotmail.it>\n"
"Language-Team: Italian (http://www.transifex.net/projects/p/I2P/team/it/)\n"
"PO-Revision-Date: 2012-06-01 12:21+0000\n"
"Last-Translator: Leelium <bovas85@gmail.com>\n"
"Language-Team: Italian (http://www.transifex.net/projects/p/I2P/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -48,10 +50,8 @@ msgstr "Ferma I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Configurazione dell'icona nell'Area di notifica"
msgstr "Configurazione dell'icona nell'area di notifica"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Vuoi che l'icona nell'Area di notifica venga abilitata?"
msgstr "Vuoi che l'icona nelll'rea di notifica venga abilitata?"

View File

@ -2,21 +2,24 @@
# 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
# foo <foo@bar>, 2009.
#
#
# Translators:
# ducki2p <ducki2p@gmail.com>, 2011
# foo <foo@bar>, 2009
# Roman Azarenko <x12ozmouse@ya.ru>, 2013
msgid ""
msgstr ""
"Project-Id-Version: I2P desktopgui\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-19 17:26+0000\n"
"PO-Revision-Date: 2011-02-23 10:23+0500\n"
"Last-Translator: Hidden Z <hiddenz@mail.i2p>\n"
"Language-Team: duck <duck@mail.i2p>\n"
"Language: \n"
"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: 2013-07-07 11:44+0000\n"
"Last-Translator: Roman Azarenko <x12ozmouse@ya.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"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Language: ru_RU\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"
@ -32,7 +35,7 @@ msgstr "Запускается"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Запустить I2P браузер"
msgstr "Запустить браузер I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
@ -48,9 +51,8 @@ msgstr "Остановить I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Настройка иконки в трее"
msgstr "Конфигурация значка в области уведомлений"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Отображать ли иконку в трее?"
msgstr "Отображать ли значок в области уведомлений?"

View File

@ -3,7 +3,8 @@
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# 123hund123 <M8R-ra4r1r@mailinator.com>, 2011
# Translators:
# 123hund123 <M8R-ra4r1r@mailinator.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
@ -11,7 +12,7 @@ msgstr ""
"POT-Creation-Date: 2011-03-03 18:29+0000\n"
"PO-Revision-Date: 2011-03-22 15:49+0000\n"
"Last-Translator: 123hund123 <M8R-ra4r1r@mailinator.com>\n"
"Language-Team: Swedish (Sweden) (http://www.transifex.net/projects/p/I2P/team/sv_SE/)\n"
"Language-Team: Swedish (Sweden) (http://www.transifex.net/projects/p/I2P/language/sv_SE/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -53,5 +54,3 @@ msgstr "Ikonpanelskonfiguration"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Ska ikonpanelen vara aktiverad?"

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:
# Kaya Zeren <kayazeren@gmail.com>, 2013
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: 2013-04-26 06:07+0000\n"
"Last-Translator: Kaya Zeren <kayazeren@gmail.com>\n"
"Language-Team: Turkish (Turkey) (http://www.transifex.com/projects/p/I2P/language/tr_TR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: tr_TR\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "I2P başlasın"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P başlatılıyor!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Başlatılıyor"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "I2P Tarayıcısınıın"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Masaüstü Arayüzünü Ayarlayın"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "I2P Yeniden Başlasın"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "I2P Durdurulsun"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Sistem tepsisi simgesi ayarı"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Sistem tepsisi simgesi kullanılsın"

View File

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="fortuna">
<property name="cvs.base.dir" value="java/gnu-crypto" />
<property name="cvs.etc.dir" value="${cvs.base.dir}/etc" />
<property name="cvs.lib.dir" value="${cvs.base.dir}/lib" />
<property name="cvs.object.dir" value="${cvs.base.dir}/classes" />
<property name="cvs.base.crypto.object.dir" value="${cvs.object.dir}/gnu/crypto" />
<property name="cvs.cipher.object.dir" value="${cvs.base.crypto.object.dir}/cipher" />
<property name="cvs.hash.object.dir" value="${cvs.base.crypto.object.dir}/hash" />
<property name="cvs.prng.object.dir" value="${cvs.base.crypto.object.dir}/prng" />
<patternset id="fortuna.files">
<include name="${cvs.base.crypto.object.dir}/Registry.class"/>
<include name="${cvs.prng.object.dir}/Fortuna*.class"/>
<include name="${cvs.prng.object.dir}/BasePRNG.class"/>
<include name="${cvs.prng.object.dir}/RandomEventListener.class"/>
<include name="${cvs.prng.object.dir}/IRandom.class"/>
<include name="${cvs.cipher.object.dir}/CipherFactory.class"/>
<include name="${cvs.cipher.object.dir}/IBlockCipher.class"/>
<include name="${cvs.hash.object.dir}/HashFactory.class"/>
<include name="${cvs.hash.object.dir}/IMessageDigest.class"/>
</patternset>
<target name="all" depends="build,jar"
description="Create and test the custom Fortuna library" />
<target name="build" depends="-init,checkout"
description="Build the source and tests">
<ant dir="${cvs.base.dir}" target="jar" />
</target>
<target name="builddep" />
<target name="checkout" depends="-init" unless="cvs.source.available"
description="Check out GNU Crypto sources from CVS HEAD">
<cvs cvsRoot=":ext:anoncvs@savannah.gnu.org:/cvsroot/gnu-crypto"
cvsRsh="ssh"
dest="java"
package="gnu-crypto" />
</target>
<target name="clean"
description="Remove generated tests and object files">
<ant dir="${cvs.base.dir}" target="clean" />
</target>
<target name="cleandep" />
<target name="compile" />
<target name="distclean" depends="clean"
description="Remove all generated files">
<delete dir="build" />
<delete dir="jartemp" />
<!--
Annoyingly the GNU Crypto distclean task called here doesn't clean
*all* derived files from java/gnu-crypto/lib like it should.....
-->
<ant dir="${cvs.base.dir}" target="distclean" />
<!--
.....and so we mop up the rest ourselves.
-->
<delete dir="${cvs.lib.dir}" />
</target>
<target name="-init">
<available property="cvs.source.available" file="${cvs.base.dir}" />
</target>
<target name="jar" depends="build"
description="Create the custom Fortuna jar library">
<delete dir="build" />
<delete dir="jartemp" />
<mkdir dir="build" />
<mkdir dir="jartemp/${cvs.object.dir}" />
<copy todir="jartemp">
<fileset dir=".">
<patternset refid="fortuna.files" />
</fileset>
</copy>
<jar basedir="jartemp/${cvs.object.dir}" jarfile="build/fortuna.jar">
<manifest>
<section name="fortuna">
<attribute name="Implementation-Title" value="I2P Custom GNU Crypto Fortuna Library" />
<attribute name="Implementation-Version" value="CVS HEAD" />
<attribute name="Implementation-Vendor" value="Free Software Foundation" />
<attribute name="Implementation-Vendor-Id" value="FSF" />
<attribute name="Implementation-URL" value="http://www.gnu.org/software/gnu-crypto" />
</section>
</manifest>
</jar>
<delete dir="jartemp" />
</target>
<target name="test" depends="jar"
description="Perform crypto tests on custom Fortuna jar library" />
<!--
Add this when Fortuna tests are added to GNU Crypto, else write some
-->
<target name="update" depends="checkout"
description="Update GNU Crypto sources to latest CVS HEAD">
<cvs command="update -d" cvsRsh="ssh" dest="java/gnu-crypto" />
</target>
</project>

11
apps/i2psnark/.classpath Normal file
View File

@ -0,0 +1,11 @@
<?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 kind="output" path="java/build/obj"/>
</classpath>

17
apps/i2psnark/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>i2psnark</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

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

View File

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 587 B

View File

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

View File

Before

Width:  |  Height:  |  Size: 882 B

After

Width:  |  Height:  |  Size: 882 B

View File

Before

Width:  |  Height:  |  Size: 889 B

After

Width:  |  Height:  |  Size: 889 B

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 653 B

View File

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

View File

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 578 B

View File

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 591 B

View File

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 385 B

View File

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 853 B

View File

Before

Width:  |  Height:  |  Size: 635 B

After

Width:  |  Height:  |  Size: 635 B

View File

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 294 B

View File

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 591 B

View File

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 589 B

View File

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 591 B

View File

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

View File

@ -19,10 +19,15 @@
<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>
<condition property="no.bundle">
<isfalse value="${require.gettext}" />
</condition>
<property name="javac.compilerargs" value="" />
<property name="require.gettext" value="true" />
@ -34,7 +39,7 @@
debug="true" deprecation="on" source="1.5" target="1.5"
destdir="./build/obj"
includeAntRuntime="false"
classpath="../../../core/java/build/i2p.jar:../../jetty/jettylib/org.mortbay.jetty.jar:../../jetty/jettylib/javax.servlet.jar:../../ministreaming/java/build/mstreaming.jar" >
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" >
<compilerarg line="${javac.compilerargs}" />
</javac>
</target>
@ -56,10 +61,12 @@
<target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class">
<jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/web/* **/messages_*.class">
<manifest>
<attribute name="Main-Class" value="org.klomp.snark.Snark" />
<attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
@ -69,7 +76,7 @@
<target name="jarUpToDate">
<uptodate property="jar.uptodate" targetfile="build/i2psnark.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class" />
<srcfiles dir= "build/obj" includes="**/*.class" excludes="**/web/* **/messages_*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
@ -77,7 +84,7 @@
<isset property="jar.uptodate" />
</not>
<not>
<isset property="wjar.uptodate" />
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
@ -94,10 +101,18 @@
<target name="war" depends="jar, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<war destfile="../i2psnark.war" webxml="../web.xml" basedir="../" includes="_icons/*" >
<copy todir="build/icons/.icons" >
<fileset dir="../icons/" />
</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/*.class" />
<classes dir="./build/obj" includes="**/web/*" />
<fileset dir="build/icons/" />
<manifest>
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
@ -107,11 +122,11 @@
<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 ../icons/* ../web.xml" />
</uptodate>
</target>
<target name="bundle" depends="compile">
<target name="bundle" depends="compile" unless="no.bundle">
<!-- 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}" >
@ -160,7 +175,6 @@
<copy file="../../jetty/jettylib/commons-logging.jar" tofile="./dist/lib/commons-logging.jar" />
<copy file="../../jetty/jettylib/javax.servlet.jar" tofile="./dist/lib/javax.servlet.jar" />
<copy file="../../jetty/jettylib/org.mortbay.jetty.jar" tofile="./dist/lib/org.mortbay.jetty.jar" />
<copy file="../../jetty/jettylib/jasper-compiler.jar" tofile="./dist/lib/jasper-compiler.jar" />
<copy file="../../jetty/jettylib/jasper-runtime.jar" tofile="./dist/lib/jasper-runtime.jar" />
<copy file="../../ministreaming/java/build/mstreaming.jar" tofile="./dist/lib/mstreaming.jar" />
<copy file="../../streaming/java/build/streaming.jar" tofile="./dist/lib/streaming.jar" />

View File

@ -1,3 +1,4 @@
#!/bin/sh
#
# Update messages_xx.po and messages_xx.class files,
# from both java and jsp sources.

View File

@ -0,0 +1,76 @@
package net.i2p.kademlia;
/*
* free (adj.): unencumbered; not under the control of others
* Written by jrandom in 2003 and released into the public domain
* with no warranty of any kind, either expressed or implied.
* It probably won't make your computer catch on fire, or eat
* your children, but it might. Use at your own risk.
*
*/
import java.util.Set;
import net.i2p.data.SimpleDataStructure;
/**
* Group, without inherent ordering, a set of keys a certain distance away from
* a local key, using XOR as the distance metric
*
* Refactored from net.i2p.router.networkdb.kademlia
* @since 0.9.2
*/
public interface KBucket<T extends SimpleDataStructure> {
/**
* Lowest order high bit for difference keys.
* The lower-bounds distance of this bucket is 2**begin.
* If begin == 0, this is the closest bucket.
*/
public int getRangeBegin();
/**
* Highest high bit for the difference keys.
* The upper-bounds distance of this bucket is (2**(end+1)) - 1.
* If begin == end, the bucket cannot be split further.
* If end == (numbits - 1), this is the furthest bucket.
*/
public int getRangeEnd();
/**
* Number of keys already contained in this kbucket
*/
public int getKeyCount();
/**
* Add the peer to the bucket
*
* @return true if added
*/
public boolean add(T key);
/**
* Remove the key from the bucket
* @return true if the key existed in the bucket before removing it, else false
*/
public boolean remove(T key);
/**
* Update the last-changed timestamp to now.
*/
public void setLastChanged();
/**
* The last-changed timestamp
*/
public long getLastChanged();
/**
* Retrieve all routing table entries stored in the bucket
* @return set of Hash structures
*/
public Set<T> getEntries();
public void getEntries(SelectionCollector<T> collector);
public void clear();
}

View File

@ -0,0 +1,150 @@
package net.i2p.kademlia;
/*
* free (adj.): unencumbered; not under the control of others
* Written by jrandom in 2003 and released into the public domain
* with no warranty of any kind, either expressed or implied.
* It probably won't make your computer catch on fire, or eat
* your children, but it might. Use at your own risk.
*
*/
import java.util.Collections;
import java.util.Set;
import net.i2p.I2PAppContext;
import net.i2p.data.SimpleDataStructure;
import net.i2p.util.ConcurrentHashSet;
/**
* A concurrent implementation using ConcurrentHashSet.
* The max size (K) may be temporarily exceeded due to concurrency,
* a pending split, or the behavior of the supplied trimmer,
* as explained below.
* The creator is responsible for splits.
*
* This class has no knowledge of the DHT base used for XORing,
* and thus there are no validity checks in add/remove.
*
* The begin and end values are immutable.
* All entries in this bucket will have at least one bit different
* from us in the range [begin, end] inclusive.
* Splits must be implemented by creating two new buckets
* and discarding this one.
*
* The keys are kept in a Set and are NOT sorted by last-seen.
* Per-key last-seen-time, failures, etc. must be tracked elsewhere.
*
* If this bucket is full (i.e. begin == end && size == max)
* then add() will call KBucketTrimmer.trim() do
* (possibly) remove older entries, and indicate whether
* to add the new entry. If the trimmer returns true without
* removing entries, this KBucket will exceed the max size.
*
* Refactored from net.i2p.router.networkdb.kademlia
* @since 0.9.2
*/
class KBucketImpl<T extends SimpleDataStructure> implements KBucket<T> {
/**
* set of Hash objects for the peers in the kbucket
*/
private final Set<T> _entries;
/** include if any bits equal or higher to this bit (in big endian order) */
private final int _begin;
/** include if no bits higher than this bit (inclusive) are set */
private final int _end;
private final int _max;
private final KBucketTrimmer _trimmer;
/** when did we last shake things up */
private long _lastChanged;
private final I2PAppContext _context;
/**
* All entries in this bucket will have at least one bit different
* from us in the range [begin, end] inclusive.
*/
public KBucketImpl(I2PAppContext context, int begin, int end, int max, KBucketTrimmer trimmer) {
if (begin > end)
throw new IllegalArgumentException(begin + " > " + end);
_context = context;
_entries = new ConcurrentHashSet(max + 4);
_begin = begin;
_end = end;
_max = max;
_trimmer = trimmer;
}
public int getRangeBegin() { return _begin; }
public int getRangeEnd() { return _end; }
public int getKeyCount() {
return _entries.size();
}
/**
* @return an unmodifiable view; not a copy
*/
public Set<T> getEntries() {
return Collections.unmodifiableSet(_entries);
}
public void getEntries(SelectionCollector<T> collector) {
for (T h : _entries) {
collector.add(h);
}
}
public void clear() {
_entries.clear();
}
/**
* Sets last-changed if rv is true OR if the peer is already present.
* Calls the trimmer if begin == end and we are full.
* If begin != end then add it and caller must do bucket splitting.
* @return true if added
*/
public boolean add(T peer) {
if (_begin != _end || _entries.size() < _max ||
_entries.contains(peer) || _trimmer.trim(this, peer)) {
// do this even if already contains, to call setLastChanged()
boolean rv = _entries.add(peer);
setLastChanged();
return rv;
}
return false;
}
/**
* @return if removed. Does NOT set lastChanged.
*/
public boolean remove(T peer) {
boolean rv = _entries.remove(peer);
//if (rv)
// setLastChanged();
return rv;
}
/**
* Update the last-changed timestamp to now.
*/
public void setLastChanged() {
_lastChanged = _context.clock().now();
}
/**
* The last-changed timestamp, which actually indicates last-added or last-seen.
*/
public long getLastChanged() {
return _lastChanged;
}
@Override
public String toString() {
StringBuilder buf = new StringBuilder(1024);
buf.append(_entries.size());
buf.append(" entries in (").append(_begin).append(',').append(_end);
buf.append(") : ").append(_entries.toString());
return buf.toString();
}
}

View File

@ -0,0 +1,780 @@
package net.i2p.kademlia;
/*
* free (adj.): unencumbered; not under the control of others
* Written by jrandom in 2003 and released into the public domain
* with no warranty of any kind, either expressed or implied.
* It probably won't make your computer catch on fire, or eat
* your children, but it might. Use at your own risk.
*
*/
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;
import net.i2p.data.SimpleDataStructure;
import net.i2p.util.LHMCache;
import net.i2p.util.Log;
/**
* In-memory storage of buckets sorted by the XOR metric from the base (us)
* passed in via the constructor.
* This starts with one bucket covering the whole key space, and
* may eventually be split to a max of the number of bits in the data type
* (160 for SHA1Hash or 256 for Hash),
* times 2**(B-1) for Kademlia value B.
*
* Refactored from net.i2p.router.networkdb.kademlia
* @since 0.9.2
*/
public class KBucketSet<T extends SimpleDataStructure> {
private final Log _log;
private final I2PAppContext _context;
private final T _us;
/**
* The bucket list is locked by _bucketsLock, however the individual
* buckets are not locked. Users may see buckets that have more than
* the maximum k entries, or may have adds and removes silently fail
* when they appear to succeed.
*
* Closest values are in bucket 0, furthest are in the last bucket.
*/
private final List<KBucket> _buckets;
private final Range<T> _rangeCalc;
private final KBucketTrimmer _trimmer;
/**
* Locked for reading only when traversing all the buckets.
* Locked for writing only when splitting a bucket.
* Adds/removes/gets from individual buckets are not locked.
*/
private final ReentrantReadWriteLock _bucketsLock = new ReentrantReadWriteLock(false);
private final int KEYSIZE_BITS;
private final int NUM_BUCKETS;
private final int BUCKET_SIZE;
private final int B_VALUE;
private final int B_FACTOR;
/**
* Use the default trim strategy, which removes a random entry.
* @param us the local identity (typically a SHA1Hash or Hash)
* The class must have a zero-argument constructor.
* @param max the Kademlia value "k", the max per bucket, k >= 4
* @param b the Kademlia value "b", split buckets an extra 2**(b-1) times,
* b > 0, use 1 for bittorrent, Kademlia paper recommends 5
*/
public KBucketSet(I2PAppContext context, T us, int max, int b) {
this(context, us, max, b, new RandomTrimmer(context, max));
}
/**
* Use the supplied trim strategy.
*/
public KBucketSet(I2PAppContext context, T us, int max, int b, KBucketTrimmer trimmer) {
_us = us;
_context = context;
_log = context.logManager().getLog(KBucketSet.class);
_trimmer = trimmer;
if (max <= 4 || b <= 0 || b > 8)
throw new IllegalArgumentException();
KEYSIZE_BITS = us.length() * 8;
B_VALUE = b;
B_FACTOR = 1 << (b - 1);
NUM_BUCKETS = KEYSIZE_BITS * B_FACTOR;
BUCKET_SIZE = max;
_buckets = createBuckets();
_rangeCalc = new Range(us, B_VALUE);
// this verifies the zero-argument constructor
makeKey(new byte[us.length()]);
}
private void getReadLock() {
_bucketsLock.readLock().lock();
}
/**
* Get the lock if we can. Non-blocking.
* @return true if the lock was acquired
*/
private boolean tryReadLock() {
return _bucketsLock.readLock().tryLock();
}
private void releaseReadLock() {
_bucketsLock.readLock().unlock();
}
/** @return true if the lock was acquired */
private boolean getWriteLock() {
try {
boolean rv = _bucketsLock.writeLock().tryLock(3000, TimeUnit.MILLISECONDS);
if ((!rv) && _log.shouldLog(Log.WARN))
_log.warn("no lock, size is: " + _bucketsLock.getQueueLength(), new Exception("rats"));
return rv;
} catch (InterruptedException ie) {}
return false;
}
private void releaseWriteLock() {
_bucketsLock.writeLock().unlock();
}
/**
* @return true if the peer is new to the bucket it goes in, or false if it was
* already in it. Always returns false on an attempt to add ourselves.
*
*/
public boolean add(T peer) {
KBucket bucket;
getReadLock();
try {
bucket = getBucket(peer);
} finally { releaseReadLock(); }
if (bucket != null) {
if (bucket.add(peer)) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Peer " + peer + " added to bucket " + bucket);
if (shouldSplit(bucket)) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Splitting bucket " + bucket);
split(bucket.getRangeBegin());
//testAudit(this, _log);
}
return true;
} else {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Peer " + peer + " NOT added to bucket " + bucket);
return false;
}
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("Failed to add, probably us: " + peer);
return false;
}
}
/**
* No lock required.
* FIXME will split the closest buckets too far if B > 1 and K < 2**B
* Won't ever really happen and if it does it still works.
*/
private boolean shouldSplit(KBucket b) {
return
b.getRangeBegin() != b.getRangeEnd() &&
b.getKeyCount() > BUCKET_SIZE;
}
/**
* Grabs the write lock.
* Caller must NOT have the read lock.
* The bucket should be splittable (range start != range end).
* @param r the range start of the bucket to be split
*/
private void split(int r) {
if (!getWriteLock())
return;
try {
locked_split(r);
} finally { releaseWriteLock(); }
}
/**
* Creates two or more new buckets. The old bucket is replaced and discarded.
*
* Caller must hold write lock
* The bucket should be splittable (range start != range end).
* @param r the range start of the bucket to be split
*/
private void locked_split(int r) {
int b = pickBucket(r);
while (shouldSplit(_buckets.get(b))) {
KBucket<T> b0 = _buckets.get(b);
// Each bucket gets half the keyspace.
// When B_VALUE = 1, or the bucket is larger than B_FACTOR, then
// e.g. 0-159 => 0-158, 159-159
// When B_VALUE > 1, and the bucket is smaller than B_FACTOR, then
// e.g. 1020-1023 => 1020-1021, 1022-1023
int s1, e1, s2, e2;
s1 = b0.getRangeBegin();
e2 = b0.getRangeEnd();
if (B_VALUE == 1 ||
((s1 & (B_FACTOR - 1)) == 0 &&
((e2 + 1) & (B_FACTOR - 1)) == 0 &&
e2 > s1 + B_FACTOR)) {
// The bucket is a "whole" kbucket with a range > B_FACTOR,
// so it should be split into two "whole" kbuckets each with
// a range >= B_FACTOR.
// Log split
s2 = e2 + 1 - B_FACTOR;
} else {
// The bucket is the smallest "whole" kbucket with a range == B_FACTOR,
// or B_VALUE > 1 and the bucket has already been split.
// Start or continue splitting down to a depth B_VALUE.
// Linear split
s2 = s1 + ((1 + e2 - s1) / 2);
}
e1 = s2 - 1;
if (_log.shouldLog(Log.INFO))
_log.info("Splitting (" + s1 + ',' + e2 + ") -> (" + s1 + ',' + e1 + ") (" + s2 + ',' + e2 + ')');
KBucket<T> b1 = createBucket(s1, e1);
KBucket<T> b2 = createBucket(s2, e2);
for (T key : b0.getEntries()) {
if (getRange(key) < s2)
b1.add(key);
else
b2.add(key);
}
_buckets.set(b, b1);
_buckets.add(b + 1, b2);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Split bucket at idx " + b +
":\n" + b0 +
"\ninto: " + b1 +
"\nand: " + b2);
//if (_log.shouldLog(Log.DEBUG))
// _log.debug("State is now: " + toString());
if (b2.getKeyCount() > BUCKET_SIZE) {
// should be rare... too hard to call _trimmer from here
// (and definitely not from inside the write lock)
if (_log.shouldLog(Log.INFO))
_log.info("All went into 2nd bucket after split");
}
// loop if all the entries went in the first bucket
}
}
/**
* The current number of entries.
*/
public int size() {
int rv = 0;
getReadLock();
try {
for (KBucket b : _buckets) {
rv += b.getKeyCount();
}
} finally { releaseReadLock(); }
return rv;
}
public boolean remove(T entry) {
KBucket kbucket;
getReadLock();
try {
kbucket = getBucket(entry);
} finally { releaseReadLock(); }
boolean removed = kbucket.remove(entry);
return removed;
}
/** @since 0.8.8 */
public void clear() {
getReadLock();
try {
for (KBucket b : _buckets) {
b.clear();
}
} finally { releaseReadLock(); }
_rangeCalc.clear();
}
/**
* @return a copy in a new set
*/
public Set<T> getAll() {
Set<T> all = new HashSet(256);
getReadLock();
try {
for (KBucket b : _buckets) {
all.addAll(b.getEntries());
}
} finally { releaseReadLock(); }
return all;
}
/**
* @return a copy in a new set
*/
public Set<T> getAll(Set<T> toIgnore) {
Set<T> all = getAll();
all.removeAll(toIgnore);
return all;
}
public void getAll(SelectionCollector<T> collector) {
getReadLock();
try {
for (KBucket b : _buckets) {
b.getEntries(collector);
}
} finally { releaseReadLock(); }
}
/**
* The keys closest to us.
* Returned list will never contain us.
* @return non-null, closest first
*/
public List<T> getClosest(int max) {
return getClosest(max, Collections.EMPTY_SET);
}
/**
* The keys closest to us.
* Returned list will never contain us.
* @return non-null, closest first
*/
public List<T> getClosest(int max, Collection<T> toIgnore) {
List<T> rv = new ArrayList(max);
int count = 0;
getReadLock();
try {
// start at first (closest) bucket
for (int i = 0; i < _buckets.size() && count < max; i++) {
Set<T> entries = _buckets.get(i).getEntries();
// add the whole bucket except for ignores,
// extras will be trimmed after sorting
for (T e : entries) {
if (!toIgnore.contains(e)) {
rv.add(e);
count++;
}
}
}
} finally { releaseReadLock(); }
Comparator comp = new XORComparator(_us);
Collections.sort(rv, comp);
int sz = rv.size();
for (int i = sz - 1; i >= max; i--) {
rv.remove(i);
}
return rv;
}
/**
* The keys closest to the key.
* Returned list will never contain us.
* @return non-null, closest first
*/
public List<T> getClosest(T key, int max) {
return getClosest(key, max, Collections.EMPTY_SET);
}
/**
* The keys closest to the key.
* Returned list will never contain us.
* @return non-null, closest first
*/
public List<T> getClosest(T key, int max, Collection<T> toIgnore) {
if (key.equals(_us))
return getClosest(max, toIgnore);
List<T> rv = new ArrayList(max);
int count = 0;
getReadLock();
try {
int start = pickBucket(key);
// start at closest bucket, then to the smaller (closer to us) buckets
for (int i = start; i >= 0 && count < max; i--) {
Set<T> entries = _buckets.get(i).getEntries();
for (T e : entries) {
if (!toIgnore.contains(e)) {
rv.add(e);
count++;
}
}
}
// then the farther from us buckets if necessary
for (int i = start + 1; i < _buckets.size() && count < max; i++) {
Set<T> entries = _buckets.get(i).getEntries();
for (T e : entries) {
if (!toIgnore.contains(e)) {
rv.add(e);
count++;
}
}
}
} finally { releaseReadLock(); }
Comparator comp = new XORComparator(key);
Collections.sort(rv, comp);
int sz = rv.size();
for (int i = sz - 1; i >= max; i--) {
rv.remove(i);
}
return rv;
}
/**
* The bucket number (NOT the range number) that the xor of the key goes in
* Caller must hold read lock
* @return 0 to max-1 or -1 for us
*/
private int pickBucket(T key) {
int range = getRange(key);
if (range < 0)
return -1;
int rv = pickBucket(range);
if (rv >= 0) {
return rv;
}
_log.error("Key does not fit in any bucket?! WTF!\nKey : ["
+ DataHelper.toHexString(key.getData()) + "]"
+ "\nUs : " + _us
+ "\nDelta: ["
+ DataHelper.toHexString(DataHelper.xor(_us.getData(), key.getData()))
+ "]", new Exception("WTF"));
_log.error(toString());
throw new IllegalStateException("pickBucket returned " + rv);
//return -1;
}
/**
* Returned list is a copy of the bucket list, closest first,
* with the actual buckets (not a copy).
*
* Primarily for testing. You shouldn't ever need to get all the buckets.
* Use getClosest() or getAll() instead to get the keys.
*
* @return non-null
*/
List<KBucket<T>> getBuckets() {
getReadLock();
try {
return new ArrayList(_buckets);
} finally { releaseReadLock(); }
}
/**
* The bucket that the xor of the key goes in
* Caller must hold read lock
* @return null if key is us
*/
private KBucket getBucket(T key) {
int bucket = pickBucket(key);
if (bucket < 0)
return null;
return _buckets.get(bucket);
}
/**
* The bucket number that contains this range number
* Caller must hold read lock or write lock
* @return 0 to max-1 or -1 for us
*/
private int pickBucket(int range) {
// If B is small, a linear search from back to front
// is most efficient since most of the keys are at the end...
// If B is larger, there's a lot of sub-buckets
// of equal size to be checked so a binary search is better
if (B_VALUE <= 3) {
for (int i = _buckets.size() - 1; i >= 0; i--) {
KBucket b = _buckets.get(i);
if (range >= b.getRangeBegin() && range <= b.getRangeEnd())
return i;
}
return -1;
} else {
KBucket dummy = new DummyBucket(range);
return Collections.binarySearch(_buckets, dummy, new BucketComparator());
}
}
private List<KBucket> createBuckets() {
// just an initial size
List<KBucket> buckets = new ArrayList(4 * B_FACTOR);
buckets.add(createBucket(0, NUM_BUCKETS -1));
return buckets;
}
private KBucket createBucket(int start, int end) {
if (end - start >= B_FACTOR &&
(((end + 1) & B_FACTOR - 1) != 0 ||
(start & B_FACTOR - 1) != 0))
throw new IllegalArgumentException("Sub-bkt crosses K-bkt boundary: " + start + '-' + end);
KBucket bucket = new KBucketImpl(_context, start, end, BUCKET_SIZE, _trimmer);
return bucket;
}
/**
* The number of bits minus 1 (range number) for the xor of the key.
* Package private for testing only. Others shouldn't need this.
* @return 0 to max-1 or -1 for us
*/
int getRange(T key) {
return _rangeCalc.getRange(key);
}
/**
* For every bucket that hasn't been updated in this long,
* or isn't close to full,
* generate a random key that would be a member of that bucket.
* The returned keys may be searched for to "refresh" the buckets.
* @return non-null, closest first
*/
public List<T> getExploreKeys(long age) {
List<T> rv = new ArrayList(_buckets.size());
long old = _context.clock().now() - age;
getReadLock();
try {
for (KBucket b : _buckets) {
int curSize = b.getKeyCount();
// Always explore the closest bucket
if ((b.getRangeBegin() == 0) ||
(b.getLastChanged() < old || curSize < BUCKET_SIZE * 3 / 4))
rv.add(generateRandomKey(b));
}
} finally { releaseReadLock(); }
return rv;
}
/**
* Generate a random key to go within this bucket
* Package private for testing only. Others shouldn't need this.
*/
T generateRandomKey(KBucket bucket) {
int begin = bucket.getRangeBegin();
int end = bucket.getRangeEnd();
// number of fixed bits, out of B_VALUE - 1 bits
int fixed = 0;
int bsz = 1 + end - begin;
// compute fixed = B_VALUE - log2(bsz)
// e.g for B=4, B_FACTOR=8, sz 4-> fixed 1, sz 2->fixed 2, sz 1 -> fixed 3
while (bsz < B_FACTOR) {
fixed++;
bsz <<= 1;
}
int fixedBits = 0;
if (fixed > 0) {
// 0x01, 03, 07, 0f, ...
int mask = (1 << fixed) - 1;
// fixed bits masked from begin
fixedBits = (begin >> (B_VALUE - (fixed + 1))) & mask;
}
int obegin = begin;
int oend = end;
begin >>= (B_VALUE - 1);
end >>= (B_VALUE - 1);
// we need randomness for [0, begin) bits
BigInteger variance;
// 00000000rrrr
if (begin > 0)
variance = new BigInteger(begin - fixed, _context.random());
else
variance = BigInteger.ZERO;
// we need nonzero randomness for [begin, end] bits
int numNonZero = 1 + end - begin;
if (numNonZero == 1) {
// 00001000rrrr
variance = variance.setBit(begin);
// fixed bits as the 'main' bucket is split
// 00001fffrrrr
if (fixed > 0)
variance = variance.or(BigInteger.valueOf(fixedBits).shiftLeft(begin - fixed));
} else {
// dont span main bucket boundaries with depth > 1
if (fixed > 0)
throw new IllegalStateException("WTF " + bucket);
BigInteger nonz;
if (numNonZero <= 62) {
// add one to ensure nonzero
long nz = 1 + _context.random().nextLong((1l << numNonZero) - 1);
nonz = BigInteger.valueOf(nz);
} else {
// loop to ensure nonzero
do {
nonz = new BigInteger(numNonZero, _context.random());
} while (nonz.equals(BigInteger.ZERO));
}
// shift left and or-in the nonzero randomness
if (begin > 0)
nonz = nonz.shiftLeft(begin);
// 0000nnnnrrrr
variance = variance.or(nonz);
}
if (_log.shouldLog(Log.DEBUG))
_log.debug("SB(" + obegin + ',' + oend + ") KB(" + begin + ',' + end + ") fixed=" + fixed + " fixedBits=" + fixedBits + " numNonZ=" + numNonZero);
byte data[] = variance.toByteArray();
T key = makeKey(data);
byte[] hash = DataHelper.xor(key.getData(), _us.getData());
T rv = makeKey(hash);
// DEBUG
//int range = getRange(rv);
//if (range < obegin || range > oend) {
// throw new IllegalStateException("Generate random key failed range=" + range + " for " + rv + " meant for bucket " + bucket);
//}
return rv;
}
/**
* Make a new SimpleDataStrucure from the data
* @param data size <= SDS length, else throws IAE
* Can be 1 bigger if top byte is zero
*/
private T makeKey(byte[] data) {
int len = _us.length();
int dlen = data.length;
if (dlen > len + 1 ||
(dlen == len + 1 && data[0] != 0))
throw new IllegalArgumentException("bad length " + dlen + " > " + len);
T rv;
try {
rv = (T) _us.getClass().newInstance();
} catch (Exception e) {
_log.error("fail", e);
throw new RuntimeException(e);
}
if (dlen == len) {
rv.setData(data);
} else {
byte[] ndata = new byte[len];
if (dlen == len + 1) {
// one bigger
System.arraycopy(data, 1, ndata, 0, len);
} else {
// smaller
System.arraycopy(data, 0, ndata, len - dlen, dlen);
}
rv.setData(ndata);
}
return rv;
}
private static class Range<T extends SimpleDataStructure> {
private final int _bValue;
private final BigInteger _bigUs;
private final Map<T, Integer> _distanceCache;
public Range(T us, int bValue) {
_bValue = bValue;
_bigUs = new BigInteger(1, us.getData());
_distanceCache = new LHMCache(256);
}
/** @return 0 to max-1 or -1 for us */
public int getRange(T key) {
Integer rv;
synchronized (_distanceCache) {
rv = _distanceCache.get(key);
if (rv == null) {
// easy way when _bValue == 1
//rv = Integer.valueOf(_bigUs.xor(new BigInteger(1, key.getData())).bitLength() - 1);
BigInteger xor = _bigUs.xor(new BigInteger(1, key.getData()));
int range = xor.bitLength() - 1;
if (_bValue > 1) {
int toShift = range + 1 - _bValue;
int highbit = range;
range <<= _bValue - 1;
if (toShift >= 0) {
int extra = xor.clearBit(highbit).shiftRight(toShift).intValue();
range += extra;
//Log log = I2PAppContext.getGlobalContext().logManager().getLog(KBucketSet.class);
//if (log.shouldLog(Log.DEBUG))
// log.debug("highbit " + highbit + " toshift " + toShift + " extra " + extra + " new " + range);
}
}
rv = Integer.valueOf(range);
_distanceCache.put(key, rv);
}
}
return rv.intValue();
}
public void clear() {
synchronized (_distanceCache) {
_distanceCache.clear();
}
}
}
/**
* For Collections.binarySearch.
* getRangeBegin == getRangeEnd.
*/
private static class DummyBucket<T extends SimpleDataStructure> implements KBucket<T> {
private final int r;
public DummyBucket(int range) {
r = range;
}
public int getRangeBegin() { return r; }
public int getRangeEnd() { return r; }
public int getKeyCount() {
return 0;
}
public Set<T> getEntries() {
throw new UnsupportedOperationException();
}
public void getEntries(SelectionCollector<T> collector) {
throw new UnsupportedOperationException();
}
public void clear() {}
public boolean add(T peer) {
throw new UnsupportedOperationException();
}
public boolean remove(T peer) {
return false;
}
public void setLastChanged() {}
public long getLastChanged() {
return 0;
}
}
/**
* For Collections.binarySearch.
* Returns equal for any overlap.
*/
private static class BucketComparator implements Comparator<KBucket> {
public int compare(KBucket l, KBucket r) {
if (l.getRangeEnd() < r.getRangeBegin())
return -1;
if (l.getRangeBegin() > r.getRangeEnd())
return 1;
return 0;
}
}
@Override
public String toString() {
StringBuilder buf = new StringBuilder(1024);
buf.append("Bucket set rooted on: ").append(_us.toString())
.append(" K=").append(BUCKET_SIZE)
.append(" B=").append(B_VALUE)
.append(" with ").append(size())
.append(" keys in ").append(_buckets.size()).append(" buckets:\n");
getReadLock();
try {
int len = _buckets.size();
for (int i = 0; i < len; i++) {
KBucket b = _buckets.get(i);
buf.append("* Bucket ").append(i).append("/").append(len).append(": ");
buf.append(b.toString()).append("\n");
}
} finally { releaseReadLock(); }
return buf.toString();
}
}

View File

@ -0,0 +1,20 @@
package net.i2p.kademlia;
import net.i2p.data.SimpleDataStructure;
/**
* Called when a kbucket can no longer be split and is too big
* @since 0.9.2
*/
public interface KBucketTrimmer<K extends SimpleDataStructure> {
/**
* Called from add() just before adding the entry.
* You may call getEntries() and/or remove() from here.
* Do NOT call add().
* To always discard a newer entry, always return false.
*
* @param kbucket the kbucket that is now too big
* @return true to actually add the entry.
*/
public boolean trim(KBucket<K> kbucket, K toAdd);
}

View File

@ -0,0 +1,21 @@
package net.i2p.kademlia;
import net.i2p.I2PAppContext;
import net.i2p.data.SimpleDataStructure;
/**
* Removes a random element, but only if the bucket hasn't changed in 5 minutes.
* @since 0.9.2
*/
public class RandomIfOldTrimmer<T extends SimpleDataStructure> extends RandomTrimmer<T> {
public RandomIfOldTrimmer(I2PAppContext ctx, int max) {
super(ctx, max);
}
public boolean trim(KBucket<T> kbucket, T toAdd) {
if (kbucket.getLastChanged() > _ctx.clock().now() - 5*60*1000)
return false;
return super.trim(kbucket, toAdd);
}
}

View File

@ -0,0 +1,31 @@
package net.i2p.kademlia;
import java.util.ArrayList;
import java.util.List;
import net.i2p.I2PAppContext;
import net.i2p.data.SimpleDataStructure;
/**
* Removes a random element. Not resistant to flooding.
* @since 0.9.2
*/
public class RandomTrimmer<T extends SimpleDataStructure> implements KBucketTrimmer<T> {
protected final I2PAppContext _ctx;
private final int _max;
public RandomTrimmer(I2PAppContext ctx, int max) {
_ctx = ctx;
_max = max;
}
public boolean trim(KBucket<T> kbucket, T toAdd) {
List<T> e = new ArrayList(kbucket.getEntries());
int sz = e.size();
// concurrency
if (sz < _max)
return true;
T toRemove = e.get(_ctx.random().nextInt(sz));
return kbucket.remove(toRemove);
}
}

View File

@ -0,0 +1,13 @@
package net.i2p.kademlia;
import net.i2p.data.SimpleDataStructure;
/**
* Removes nothing and always rejects the add. Flood resistant..
* @since 0.9.2
*/
public class RejectTrimmer<T extends SimpleDataStructure> implements KBucketTrimmer<T> {
public boolean trim(KBucket<T> kbucket, T toAdd) {
return false;
}
}

View File

@ -0,0 +1,11 @@
package net.i2p.kademlia;
import net.i2p.data.SimpleDataStructure;
/**
* Visit kbuckets, gathering matches
* @since 0.9.2
*/
public interface SelectionCollector<T extends SimpleDataStructure> {
public void add(T entry);
}

View File

@ -0,0 +1,39 @@
package net.i2p.kademlia;
import java.util.Comparator;
import net.i2p.data.SimpleDataStructure;
/**
* Help sort Hashes in relation to a base key using the XOR metric
*
* @since 0.9.2
*/
class XORComparator<T extends SimpleDataStructure> implements Comparator<T> {
private final byte[] _base;
/**
* @param target key to compare distances with
*/
public XORComparator(T target) {
_base = target.getData();
}
public int compare(T lhs, T rhs) {
// same as the following but byte-by-byte for efficiency
//byte lhsDelta[] = DataHelper.xor(lhs.getData(), _base);
//byte rhsDelta[] = DataHelper.xor(rhs.getData(), _base);
//return DataHelper.compareTo(lhsDelta, rhsDelta);
byte lhsb[] = lhs.getData();
byte rhsb[] = rhs.getData();
for (int i = 0; i < _base.length; i++) {
int ld = (lhsb[i] ^ _base[i]) & 0xff;
int rd = (rhsb[i] ^ _base[i]) & 0xff;
if (ld < rd)
return -1;
if (ld > rd)
return 1;
}
return 0;
}
}

View File

@ -0,0 +1,6 @@
<html><body><p>
This is a major rewrite of KBucket, KBucketSet, and KBucketImpl from net.i2p.router.networkdb.kademlia.
The classes are now generic to support SHA1. SHA256, or other key lengths.
The long-term goal is to prove out this new implementation in i2psnark,
then move it to core, then convert the network database to use it.
</p></body></html>

View File

@ -37,7 +37,9 @@ class BWLimits {
return rv;
}
/****
public static void main(String args[]) {
System.out.println(Arrays.toString(getBWLimits("127.0.0.1", 7654)));
}
****/
}

View File

@ -39,7 +39,6 @@ public class BitField
this.size = size;
int arraysize = ((size-1)/8)+1;
bitfield = new byte[arraysize];
this.count = 0;
}
/**
@ -60,7 +59,6 @@ public class BitField
// cleared or clear them explicitly ourselves.
System.arraycopy(bitfield, 0, this.bitfield, 0, arraysize);
this.count = 0;
for (int i = 0; i < size; i++)
if (get(i))
this.count++;
@ -99,9 +97,11 @@ public class BitField
throw new IndexOutOfBoundsException(Integer.toString(bit));
int index = bit/8;
int mask = 128 >> (bit % 8);
if ((bitfield[index] & mask) == 0) {
count++;
bitfield[index] |= mask;
synchronized(this) {
if ((bitfield[index] & mask) == 0) {
count++;
bitfield[index] |= mask;
}
}
}

View File

@ -0,0 +1,60 @@
/* CompleteListener - Callback for Snark events
Copyright (C) 2003 Mark J. Wielaard
This file is part of Snark.
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, 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.
*/
package org.klomp.snark;
/**
* Callback for Snark events.
* @since 0.9.4 moved from Snark.java
*/
public interface CompleteListener {
public void torrentComplete(Snark snark);
public void updateStatus(Snark snark);
/**
* We transitioned from magnet mode, we have now initialized our
* metainfo and storage. The listener should now call getMetaInfo()
* and save the data to disk.
*
* @return the new name for the torrent or null on error
* @since 0.8.4
*/
public String gotMetaInfo(Snark snark);
/**
* @since 0.9
*/
public void fatal(Snark snark, String error);
/**
* @since 0.9.2
*/
public void addMessage(Snark snark, String message);
/**
* @since 0.9.4
*/
public void gotPiece(Snark snark);
// not really listeners but the easiest way to get back to an optional SnarkManager
public long getSavedTorrentTime(Snark snark);
public BitField getSavedTorrentBitField(Snark snark);
}

View File

@ -29,24 +29,39 @@ import net.i2p.I2PAppContext;
import net.i2p.I2PException;
import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.data.Hash;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import net.i2p.util.ObjectCounter;
import net.i2p.util.SimpleTimer2;
/**
* Accepts connections on a TCP port and routes them to sub-acceptors.
* Accepts connections on a I2PServerSocket and routes them to PeerAcceptors.
*/
public class ConnectionAcceptor implements Runnable
class ConnectionAcceptor implements Runnable
{
private final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(ConnectionAcceptor.class);
private I2PServerSocket serverSocket;
private PeerAcceptor peeracceptor;
private Thread thread;
private I2PSnarkUtil _util;
private final I2PSnarkUtil _util;
private final ObjectCounter<Hash> _badCounter = new ObjectCounter();
private final SimpleTimer2.TimedEvent _cleaner;
private boolean stop;
private volatile boolean stop;
private boolean socketChanged;
public ConnectionAcceptor(I2PSnarkUtil util) { _util = util; }
// protocol errors before blacklisting.
private static final int MAX_BAD = 1;
private static final long BAD_CLEAN_INTERVAL = 30*60*1000;
/**
* Multitorrent
*/
public ConnectionAcceptor(I2PSnarkUtil util) {
_util = util;
_cleaner = new Cleaner();
}
public synchronized void startAccepting(PeerCoordinatorSet set, I2PServerSocket socket) {
if (serverSocket != socket) {
@ -59,10 +74,14 @@ public class ConnectionAcceptor implements Runnable
thread = new I2PAppThread(this, "I2PSnark acceptor");
thread.setDaemon(true);
thread.start();
_cleaner.schedule(BAD_CLEAN_INTERVAL);
}
}
}
/**
* Unused (single torrent)
*/
public ConnectionAcceptor(I2PSnarkUtil util, I2PServerSocket serverSocket,
PeerAcceptor peeracceptor)
{
@ -70,11 +89,10 @@ public class ConnectionAcceptor implements Runnable
this.peeracceptor = peeracceptor;
_util = util;
socketChanged = false;
stop = false;
thread = new I2PAppThread(this, "I2PSnark acceptor");
thread.setDaemon(true);
thread.start();
_cleaner = new Cleaner();
}
public void halt()
@ -93,14 +111,20 @@ public class ConnectionAcceptor implements Runnable
Thread t = thread;
if (t != null)
t.interrupt();
_cleaner.cancel();
}
/**
* Effectively unused, would only be called if we changed
* I2CP host/port, which is hidden in the gui if in router context
*/
public void restart() {
serverSocket = _util.getServerSocket();
socketChanged = true;
Thread t = thread;
if (t != null)
t.interrupt();
_cleaner.schedule(BAD_CLEAN_INTERVAL);
}
public int getPort()
@ -138,7 +162,15 @@ public class ConnectionAcceptor implements Runnable
}
} else {
if (socket.getPeerDestination().equals(_util.getMyDestination())) {
_util.debug("Incoming connection from myself", Snark.ERROR);
_log.error("Incoming connection from myself");
try { socket.close(); } catch (IOException ioe) {}
continue;
}
int bad = _badCounter.count(socket.getPeerDestination().calculateHash());
if (bad >= MAX_BAD) {
if (_log.shouldLog(Log.WARN))
_log.warn("Rejecting connection from " + socket.getPeerDestination().calculateHash() +
" after " + bad + " failures, max is " + MAX_BAD);
try { socket.close(); } catch (IOException ioe) {}
continue;
}
@ -149,13 +181,13 @@ public class ConnectionAcceptor implements Runnable
catch (I2PException ioe)
{
if (!socketChanged) {
_util.debug("Error while accepting: " + ioe, Snark.ERROR);
_log.error("Error while accepting", ioe);
stop = true;
}
}
catch (IOException ioe)
{
_util.debug("Error while accepting: " + ioe, Snark.ERROR);
_log.error("Error while accepting", ioe);
stop = true;
}
// catch oom?
@ -171,10 +203,12 @@ public class ConnectionAcceptor implements Runnable
}
private class Handler implements Runnable {
private I2PSocket _socket;
private final I2PSocket _socket;
public Handler(I2PSocket socket) {
_socket = socket;
}
public void run() {
try {
InputStream in = _socket.getInputStream();
@ -182,13 +216,33 @@ public class ConnectionAcceptor implements Runnable
// this is for the readahead in PeerAcceptor.connection()
in = new BufferedInputStream(in);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Handling socket from " + _socket.getPeerDestination().calculateHash().toBase64());
_log.debug("Handling socket from " + _socket.getPeerDestination().calculateHash());
peeracceptor.connection(_socket, in, out);
} catch (PeerAcceptor.ProtocolException ihe) {
_badCounter.increment(_socket.getPeerDestination().calculateHash());
if (_log.shouldLog(Log.INFO))
_log.info("Protocol error from " + _socket.getPeerDestination().calculateHash(), ihe);
try { _socket.close(); } catch (IOException ignored) { }
} catch (IOException ioe) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Error handling connection from " + _socket.getPeerDestination().calculateHash().toBase64(), ioe);
_log.debug("Error handling connection from " + _socket.getPeerDestination().calculateHash(), ioe);
try { _socket.close(); } catch (IOException ignored) { }
}
}
}
/** @since 0.9.1 */
private class Cleaner extends SimpleTimer2.TimedEvent {
public Cleaner() {
super(_util.getContext().simpleTimer2());
}
public void timeReached() {
if (stop)
return;
_badCounter.clear();
schedule(BAD_CLEAN_INTERVAL);
}
}
}

View File

@ -24,7 +24,7 @@ package org.klomp.snark;
/**
* Callback used when some peer changes state.
*/
public interface CoordinatorListener
interface CoordinatorListener
{
/**
* Called when the PeerCoordinator notices a change in the state of a peer.
@ -37,7 +37,20 @@ public interface CoordinatorListener
*/
void gotMetaInfo(PeerCoordinator coordinator, MetaInfo metainfo);
/**
* Is this number of uploaders over the per-torrent limit?
*/
public boolean overUploadLimit(int uploaders);
/**
* Are we currently over the upstream bandwidth limit?
*/
public boolean overUpBWLimit();
/**
* Is the total (in Bps) over the upstream bandwidth limit?
*/
public boolean overUpBWLimit(long total);
public void addMessage(String message);
}

View File

@ -1,5 +1,7 @@
package org.klomp.snark;
import net.i2p.data.ByteArray;
/**
* Callback used to fetch data
* @since 0.8.2
@ -10,5 +12,5 @@ interface DataLoader
* This is the callback that PeerConnectionOut calls to get the data from disk
* @return bytes or null for errors
*/
public byte[] loadData(int piece, int begin, int length);
public ByteArray loadData(int piece, int begin, int length);
}

View File

@ -1,7 +1,6 @@
package org.klomp.snark;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
@ -15,7 +14,6 @@ import net.i2p.util.Log;
import org.klomp.snark.bencode.BDecoder;
import org.klomp.snark.bencode.BEncoder;
import org.klomp.snark.bencode.BEValue;
import org.klomp.snark.bencode.InvalidBEncodingException;
/**
* REF: BEP 10 Extension Protocol
@ -24,14 +22,15 @@ import org.klomp.snark.bencode.InvalidBEncodingException;
*/
abstract class ExtensionHandler {
private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(ExtensionHandler.class);
public static final int ID_HANDSHAKE = 0;
public static final int ID_METADATA = 1;
public static final String TYPE_METADATA = "ut_metadata";
public static final int ID_PEX = 2;
/** not ut_pex since the compact format is different */
public static final String TYPE_PEX = "i2p_pex";
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 */
private static final int MAX_METADATA_SIZE = Storage.MAX_PIECES * 20 * 5 / 4;
private static final int PARALLEL_REQUESTS = 3;
@ -39,15 +38,23 @@ abstract class ExtensionHandler {
/**
* @param metasize -1 if unknown
* @param pexAndMetadata advertise these capabilities
* @param dht advertise DHT capability
* @return bencoded outgoing handshake message
*/
public static byte[] getHandshake(int metasize) {
public static byte[] getHandshake(int metasize, boolean pexAndMetadata, boolean dht) {
Map<String, Object> handshake = new HashMap();
Map<String, Integer> m = new HashMap();
m.put(TYPE_METADATA, Integer.valueOf(ID_METADATA));
m.put(TYPE_PEX, Integer.valueOf(ID_PEX));
if (metasize >= 0)
handshake.put("metadata_size", Integer.valueOf(metasize));
if (pexAndMetadata) {
m.put(TYPE_METADATA, Integer.valueOf(ID_METADATA));
m.put(TYPE_PEX, Integer.valueOf(ID_PEX));
if (metasize >= 0)
handshake.put("metadata_size", Integer.valueOf(metasize));
}
if (dht) {
m.put(TYPE_DHT, Integer.valueOf(ID_DHT));
}
// 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("v", "I2PSnark");
@ -56,21 +63,24 @@ abstract class ExtensionHandler {
}
public static void handleMessage(Peer peer, PeerListener listener, int id, byte[] bs) {
if (_log.shouldLog(Log.INFO))
_log.info("Got extension msg " + id + " length " + bs.length + " from " + peer);
Log log = I2PAppContext.getGlobalContext().logManager().getLog(ExtensionHandler.class);
if (log.shouldLog(Log.INFO))
log.info("Got extension msg " + id + " length " + bs.length + " from " + peer);
if (id == ID_HANDSHAKE)
handleHandshake(peer, listener, bs);
handleHandshake(peer, listener, bs, log);
else if (id == ID_METADATA)
handleMetadata(peer, listener, bs);
handleMetadata(peer, listener, bs, log);
else if (id == ID_PEX)
handlePEX(peer, listener, bs);
else if (_log.shouldLog(Log.INFO))
_log.info("Unknown extension msg " + id + " from " + peer);
handlePEX(peer, listener, bs, log);
else if (id == ID_DHT)
handleDHT(peer, listener, bs, log);
else if (log.shouldLog(Log.INFO))
log.info("Unknown extension msg " + id + " from " + peer);
}
private static void handleHandshake(Peer peer, PeerListener listener, byte[] bs) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Got handshake msg from " + peer);
private static void handleHandshake(Peer peer, PeerListener listener, byte[] bs, Log log) {
if (log.shouldLog(Log.DEBUG))
log.debug("Got handshake msg from " + peer);
try {
// this throws NPE on missing keys
InputStream is = new ByteArrayInputStream(bs);
@ -81,20 +91,26 @@ abstract class ExtensionHandler {
Map<String, BEValue> msgmap = map.get("m").getMap();
if (msgmap.get(TYPE_PEX) != null) {
if (_log.shouldLog(Log.WARN))
_log.debug("Peer supports PEX extension: " + peer);
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();
if (msgmap.get(TYPE_METADATA) == null) {
if (_log.shouldLog(Log.WARN))
_log.debug("Peer does not support metadata extension: " + peer);
if (log.shouldLog(Log.DEBUG))
log.debug("Peer does not support metadata extension: " + peer);
// 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);
log.debug("Dropping peer, we need metadata! " + peer);
peer.disconnect();
}
}
@ -103,20 +119,20 @@ abstract class ExtensionHandler {
BEValue msize = map.get("metadata_size");
if (msize == null) {
if (_log.shouldLog(Log.WARN))
_log.debug("Peer does not have the metainfo size yet: " + peer);
if (log.shouldLog(Log.DEBUG))
log.debug("Peer does not have the metainfo size yet: " + peer);
// 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);
log.debug("Dropping peer, we need metadata! " + peer);
peer.disconnect();
}
}
return;
}
int metaSize = msize.getInt();
if (_log.shouldLog(Log.WARN))
_log.debug("Got the metainfo size: " + metaSize);
if (log.shouldLog(Log.DEBUG))
log.debug("Got the metainfo size: " + metaSize);
int remaining;
synchronized(state) {
@ -125,21 +141,21 @@ abstract class ExtensionHandler {
if (state.isInitialized()) {
if (state.getSize() != metaSize) {
if (_log.shouldLog(Log.WARN))
_log.debug("Wrong metainfo size " + metaSize + " from: " + peer);
if (log.shouldLog(Log.DEBUG))
log.debug("Wrong metainfo size " + metaSize + " from: " + peer);
peer.disconnect();
return;
}
} else {
// initialize it
if (metaSize > MAX_METADATA_SIZE) {
if (_log.shouldLog(Log.WARN))
_log.debug("Huge metainfo size " + metaSize + " from: " + peer);
if (log.shouldLog(Log.DEBUG))
log.debug("Huge metainfo size " + metaSize + " from: " + peer);
peer.disconnect(false);
return;
}
if (_log.shouldLog(Log.INFO))
_log.info("Initialized state, metadata size = " + metaSize + " from " + peer);
if (log.shouldLog(Log.INFO))
log.info("Initialized state, metadata size = " + metaSize + " from " + peer);
state.initialize(metaSize);
}
remaining = state.chunksRemaining();
@ -152,13 +168,13 @@ abstract class ExtensionHandler {
synchronized(state) {
chk = state.getNextRequest();
}
if (_log.shouldLog(Log.INFO))
_log.info("Request chunk " + chk + " from " + peer);
if (log.shouldLog(Log.INFO))
log.info("Request chunk " + chk + " from " + peer);
sendRequest(peer, chk);
}
} catch (Exception e) {
if (_log.shouldLog(Log.WARN))
_log.warn("Handshake exception from " + peer, e);
if (log.shouldLog(Log.WARN))
log.warn("Handshake exception from " + peer, e);
}
}
@ -166,15 +182,13 @@ abstract class ExtensionHandler {
private static final int TYPE_DATA = 1;
private static final int TYPE_REJECT = 2;
private static final int CHUNK_SIZE = 16*1024;
/**
* REF: BEP 9
* @since 0.8.4
*/
private static void handleMetadata(Peer peer, PeerListener listener, byte[] bs) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Got metadata msg from " + peer);
private static void handleMetadata(Peer peer, PeerListener listener, byte[] bs, Log log) {
if (log.shouldLog(Log.DEBUG))
log.debug("Got metadata msg from " + peer);
try {
InputStream is = new ByteArrayInputStream(bs);
BDecoder dec = new BDecoder(is);
@ -185,8 +199,8 @@ abstract class ExtensionHandler {
MagnetState state = peer.getMagnetState();
if (type == TYPE_REQUEST) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Got request for " + piece + " from: " + peer);
if (log.shouldLog(Log.DEBUG))
log.debug("Got request for " + piece + " from: " + peer);
byte[] pc;
synchronized(state) {
pc = state.getChunk(piece);
@ -197,8 +211,8 @@ abstract class ExtensionHandler {
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);
if (log.shouldLog(Log.DEBUG))
log.debug("Got data for " + piece + " length " + size + " from: " + peer);
boolean done;
int chk = -1;
synchronized(state) {
@ -207,14 +221,14 @@ abstract class ExtensionHandler {
int len = is.available();
if (len != size) {
// probably fatal
if (_log.shouldLog(Log.WARN))
_log.warn("total_size " + size + " but avail data " + len);
if (log.shouldLog(Log.WARN))
log.warn("total_size " + size + " but avail data " + len);
}
peer.downloaded(len);
listener.downloaded(peer, len);
done = state.saveChunk(piece, bs, bs.length - len, len);
if (_log.shouldLog(Log.INFO))
_log.info("Got chunk " + piece + " from " + peer);
if (log.shouldLog(Log.INFO))
log.info("Got chunk " + piece + " from " + peer);
if (!done)
chk = state.getNextRequest();
}
@ -223,26 +237,26 @@ abstract class ExtensionHandler {
// Done!
// PeerState will call the listener (peer coord), who will
// check to see if the MagnetState has it
if (_log.shouldLog(Log.WARN))
_log.warn("Got last chunk from " + peer);
if (log.shouldLog(Log.WARN))
log.warn("Got last chunk from " + peer);
} else {
// get the next chunk
if (_log.shouldLog(Log.INFO))
_log.info("Request chunk " + chk + " from " + peer);
if (log.shouldLog(Log.INFO))
log.info("Request chunk " + chk + " from " + peer);
sendRequest(peer, chk);
}
} else if (type == TYPE_REJECT) {
if (_log.shouldLog(Log.WARN))
_log.warn("Got reject msg from " + peer);
if (log.shouldLog(Log.WARN))
log.warn("Got reject msg from " + peer);
peer.disconnect(false);
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("Got unknown metadata msg from " + peer);
if (log.shouldLog(Log.WARN))
log.warn("Got unknown metadata msg from " + peer);
peer.disconnect(false);
}
} catch (Exception e) {
if (_log.shouldLog(Log.WARN))
_log.info("Metadata ext. msg. exception from " + peer, e);
if (log.shouldLog(Log.INFO))
log.info("Metadata ext. msg. exception from " + peer, e);
// fatal ?
peer.disconnect(false);
}
@ -252,9 +266,11 @@ abstract class ExtensionHandler {
sendMessage(peer, TYPE_REQUEST, piece);
}
/****
private static void sendReject(Peer peer, int piece) {
sendMessage(peer, TYPE_REJECT, piece);
}
****/
/** REQUEST and REJECT are the same except for message type */
private static void sendMessage(Peer peer, int type, int piece) {
@ -267,8 +283,8 @@ abstract class ExtensionHandler {
peer.sendExtension(hisMsgCode, payload);
} catch (Exception e) {
// NPE, no metadata capability
if (_log.shouldLog(Log.WARN))
_log.info("Metadata send req msg exception to " + peer, e);
//if (log.shouldLog(Log.INFO))
// log.info("Metadata send req msg exception to " + peer, e);
}
}
@ -286,8 +302,8 @@ abstract class ExtensionHandler {
peer.sendExtension(hisMsgCode, payload);
} catch (Exception e) {
// NPE, no metadata caps
if (_log.shouldLog(Log.WARN))
_log.info("Metadata send piece msg exception to " + peer, e);
//if (log.shouldLog(Log.INFO))
// log.info("Metadata send piece msg exception to " + peer, e);
}
}
@ -301,15 +317,18 @@ abstract class ExtensionHandler {
* added.f and dropped unsupported
* @since 0.8.4
*/
private static void handlePEX(Peer peer, PeerListener listener, byte[] bs) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Got PEX msg from " + peer);
private static void handlePEX(Peer peer, PeerListener listener, byte[] bs, Log log) {
if (log.shouldLog(Log.DEBUG))
log.debug("Got PEX msg from " + peer);
try {
InputStream is = new ByteArrayInputStream(bs);
BDecoder dec = new BDecoder(is);
BEValue bev = dec.bdecodeMap();
Map<String, BEValue> map = bev.getMap();
byte[] ids = map.get("added").getBytes();
bev = map.get("added");
if (bev == null)
return;
byte[] ids = bev.getBytes();
if (ids.length < HASH_LENGTH)
return;
int len = Math.min(ids.length, (I2PSnarkUtil.MAX_CONNECTIONS - 1) * HASH_LENGTH);
@ -319,14 +338,36 @@ abstract class ExtensionHandler {
System.arraycopy(ids, off, hash, 0, HASH_LENGTH);
if (DataHelper.eq(hash, peer.getPeerID().getDestHash()))
continue;
PeerID pID = new PeerID(hash);
PeerID pID = new PeerID(hash, listener.getUtil());
peers.add(pID);
}
// could include ourselves, listener must remove
listener.gotPeers(peer, peers);
} catch (Exception e) {
if (_log.shouldLog(Log.WARN))
_log.info("PEX msg exception from " + peer, e);
if (log.shouldLog(Log.INFO))
log.info("PEX msg exception from " + peer, e);
//peer.disconnect(false);
}
}
/**
* Receive the DHT port numbers
* @since DHT
*/
private static void handleDHT(Peer peer, PeerListener listener, byte[] bs, Log log) {
if (log.shouldLog(Log.DEBUG))
log.debug("Got DHT msg from " + peer);
try {
InputStream is = new ByteArrayInputStream(bs);
BDecoder dec = new BDecoder(is);
BEValue bev = dec.bdecodeMap();
Map<String, BEValue> map = bev.getMap();
int qport = map.get("port").getInt();
int rport = map.get("rport").getInt();
listener.gotPort(peer, qport, rport);
} catch (Exception e) {
if (log.shouldLog(Log.INFO))
log.info("DHT msg exception from " + peer, e);
//peer.disconnect(false);
}
}
@ -353,9 +394,27 @@ abstract class ExtensionHandler {
peer.sendExtension(hisMsgCode, payload);
} catch (Exception e) {
// NPE, no PEX caps
if (_log.shouldLog(Log.WARN))
_log.info("PEX msg exception to " + peer, e);
//if (log.shouldLog(Log.INFO))
// log.info("PEX msg exception to " + peer, e);
}
}
/**
* Send the DHT port numbers
* @since DHT
*/
public static void sendDHT(Peer peer, int qport, int rport) {
Map<String, Object> map = new HashMap();
map.put("port", Integer.valueOf(qport));
map.put("rport", Integer.valueOf(rport));
byte[] payload = BEncoder.bencode(map);
try {
int hisMsgCode = peer.getHandshakeMap().get("m").getMap().get(TYPE_DHT).getInt();
peer.sendExtension(hisMsgCode, payload);
} catch (Exception e) {
// NPE, no DHT caps
//if (log.shouldLog(Log.INFO))
// log.info("DHT msg exception to " + peer, e);
}
}
}

View File

@ -1,8 +1,10 @@
package org.klomp.snark;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@ -20,6 +22,7 @@ import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketEepGet;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.client.streaming.I2PSocketManagerFactory;
import net.i2p.client.streaming.I2PSocketOptions;
import net.i2p.data.Base32;
import net.i2p.data.DataFormatException;
import net.i2p.data.Destination;
@ -35,7 +38,7 @@ import net.i2p.util.SimpleTimer;
import net.i2p.util.Translate;
import org.klomp.snark.dht.DHT;
//import org.klomp.snark.dht.KRPC;
import org.klomp.snark.dht.KRPC;
/**
* I2P specific helpers for I2PSnark
@ -46,6 +49,7 @@ import org.klomp.snark.dht.DHT;
public class I2PSnarkUtil {
private final I2PAppContext _context;
private final Log _log;
private final String _baseName;
private boolean _shouldProxy;
private String _proxyHost;
@ -53,44 +57,59 @@ public class I2PSnarkUtil {
private String _i2cpHost;
private int _i2cpPort;
private final Map<String, String> _opts;
private I2PSocketManager _manager;
private volatile I2PSocketManager _manager;
private boolean _configured;
private final Set<Hash> _shitlist;
private volatile boolean _connecting;
private final Set<Hash> _banlist;
private int _maxUploaders;
private int _maxUpBW;
private int _maxConnections;
private final File _tmpDir;
private int _startupDelay;
private boolean _shouldUseOT;
private boolean _shouldUseDHT;
private boolean _areFilesPublic;
private String _openTrackerString;
private List<String> _openTrackers;
private DHT _dht;
private static final int EEPGET_CONNECT_TIMEOUT = 45*1000;
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";
//private static final boolean ENABLE_DHT = true;
public static final boolean DEFAULT_USE_DHT = true;
public I2PSnarkUtil(I2PAppContext ctx) {
this(ctx, "i2psnark");
}
/**
* @param baseName generally "i2psnark"
* @since Jetty 7
*/
public I2PSnarkUtil(I2PAppContext ctx, String baseName) {
_context = ctx;
_log = _context.logManager().getLog(Snark.class);
_baseName = baseName;
_opts = new HashMap();
//setProxy("127.0.0.1", 4444);
setI2CPConfig("127.0.0.1", 7654, null);
_shitlist = new ConcurrentHashSet();
_configured = false;
_banlist = new ConcurrentHashSet();
_maxUploaders = Snark.MAX_TOTAL_UPLOADERS;
_maxUpBW = 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);
_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(), "i2psnark");
_tmpDir = new SecureDirectory(ctx.getTempDir(), baseName);
FileUtil.rmdir(_tmpDir, false);
_tmpDir.mkdirs();
}
@ -115,6 +134,9 @@ public class I2PSnarkUtil {
}
******/
/** @since 0.9.1 */
public I2PAppContext getContext() { return _context; }
public boolean configured() { return _configured; }
public void setI2CPConfig(String i2cpHost, int i2cpPort, Map opts) {
@ -136,7 +158,7 @@ public class I2PSnarkUtil {
}
/**
* This updates the session options and tells the router
* This updates ALL the session options (not just the bw) and tells the router
* @param limit KBps
*/
public void setMaxUpBW(int limit) {
@ -184,11 +206,15 @@ public class I2PSnarkUtil {
/** @since 0.8.9 */
public void setFilesPublic(boolean yes) { _areFilesPublic = yes; }
/** @since 0.9.1 */
public File getTempDir() { return _tmpDir; }
/**
* Connect to the router, if we aren't already
*/
synchronized public boolean connect() {
if (_manager == null) {
_connecting = true;
// try to find why reconnecting after stop
if (_log.shouldLog(Log.DEBUG))
_log.debug("Connecting to I2P", new Exception("I did it"));
@ -200,13 +226,17 @@ public class I2PSnarkUtil {
}
}
if (opts.getProperty("inbound.nickname") == null)
opts.setProperty("inbound.nickname", "I2PSnark");
opts.setProperty("inbound.nickname", _baseName.replace("i2psnark", "I2PSnark"));
if (opts.getProperty("outbound.nickname") == null)
opts.setProperty("outbound.nickname", "I2PSnark");
opts.setProperty("outbound.nickname", _baseName.replace("i2psnark", "I2PSnark"));
if (opts.getProperty("outbound.priority") == null)
opts.setProperty("outbound.priority", "-10");
// Dont do this for now, it is set in I2PSocketEepGet for announces,
// we don't need fast handshake for peer connections.
//if (opts.getProperty("i2p.streaming.connectDelay") == null)
// opts.setProperty("i2p.streaming.connectDelay", "500");
if (opts.getProperty(I2PSocketOptions.PROP_CONNECT_TIMEOUT) == null)
opts.setProperty(I2PSocketOptions.PROP_CONNECT_TIMEOUT, "75000");
if (opts.getProperty("i2p.streaming.inactivityTimeout") == null)
opts.setProperty("i2p.streaming.inactivityTimeout", "240000");
if (opts.getProperty("i2p.streaming.inactivityAction") == null)
@ -219,11 +249,21 @@ public class I2PSnarkUtil {
// opts.setProperty("i2p.streaming.writeTimeout", "90000");
//if (opts.getProperty("i2p.streaming.readTimeout") == null)
// opts.setProperty("i2p.streaming.readTimeout", "120000");
if (opts.getProperty("i2p.streaming.maxConnsPerMinute") == null)
opts.setProperty("i2p.streaming.maxConnsPerMinute", "2");
if (opts.getProperty("i2p.streaming.maxTotalConnsPerMinute") == null)
opts.setProperty("i2p.streaming.maxTotalConnsPerMinute", "8");
if (opts.getProperty("i2p.streaming.maxConnsPerHour") == null)
opts.setProperty("i2p.streaming.maxConnsPerHour", "20");
if (opts.getProperty("i2p.streaming.enforceProtocol") == null)
opts.setProperty("i2p.streaming.enforceProtocol", "true");
if (opts.getProperty("i2p.streaming.disableRejectLogging") == null)
opts.setProperty("i2p.streaming.disableRejectLogging", "true");
_manager = I2PSocketManagerFactory.createManager(_i2cpHost, _i2cpPort, opts);
_connecting = false;
}
// FIXME this only instantiates krpc once, left stuck with old manager
//if (ENABLE_DHT && _manager != null && _dht == null)
// _dht = new KRPC(_context, _manager.getSession());
if (_shouldUseDHT && _manager != null && _dht == null)
_dht = new KRPC(_context, _baseName, _manager.getSession());
return (_manager != null);
}
@ -235,15 +275,35 @@ public class I2PSnarkUtil {
public boolean connected() { return _manager != null; }
/** @since 0.9.1 */
public boolean isConnecting() { return _manager == null && _connecting; }
/**
* For FetchAndAdd
* @return null if not connected
* @since 0.9.1
*/
public I2PSocketManager getSocketManager() {
return _manager;
}
/**
* Destroy the destination itself
*/
public void disconnect() {
public synchronized void disconnect() {
if (_dht != null) {
_dht.stop();
_dht = null;
}
I2PSocketManager mgr = _manager;
// FIXME this can cause race NPEs elsewhere
_manager = null;
_shitlist.clear();
mgr.destroySocketManager();
_banlist.clear();
if (mgr != null) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Disconnecting from I2P", new Exception("I did it"));
mgr.destroySocketManager();
}
// this will delete a .torrent file d/l in progress so don't do that...
FileUtil.rmdir(_tmpDir, false);
// in case the user will d/l a .torrent file next...
@ -261,32 +321,45 @@ public class I2PSnarkUtil {
if (addr.equals(getMyDestination()))
throw new IOException("Attempt to connect to myself");
Hash dest = addr.calculateHash();
if (_shitlist.contains(dest))
throw new IOException("Not trying to contact " + dest.toBase64() + ", as they are shitlisted");
if (_banlist.contains(dest))
throw new IOException("Not trying to contact " + dest.toBase64() + ", as they are banlisted");
try {
I2PSocket rv = _manager.connect(addr);
if (rv != null)
_shitlist.remove(dest);
_banlist.remove(dest);
return rv;
} catch (I2PException ie) {
_shitlist.add(dest);
SimpleScheduler.getInstance().addEvent(new Unshitlist(dest), 10*60*1000);
_banlist.add(dest);
_context.simpleScheduler().addEvent(new Unbanlist(dest), 10*60*1000);
throw new IOException("Unable to reach the peer " + peer + ": " + ie.getMessage());
}
}
private class Unshitlist implements SimpleTimer.TimedEvent {
private class Unbanlist implements SimpleTimer.TimedEvent {
private Hash _dest;
public Unshitlist(Hash dest) { _dest = dest; }
public void timeReached() { _shitlist.remove(_dest); }
public Unbanlist(Hash dest) { _dest = dest; }
public void timeReached() { _banlist.remove(_dest); }
}
/**
* fetch the given URL, returning the file it is stored in, or null on error
* Fetch the given URL, returning the file it is stored in, or null on error.
* No retries.
*/
public File get(String url) { return get(url, true, 0); }
/**
* @param rewrite if true, convert http://KEY.i2p/foo/announce to http://i2p/KEY/foo/announce
*/
public File get(String url, boolean rewrite) { return get(url, rewrite, 0); }
/**
* @param retries if < 0, set timeout to a few seconds
*/
public File get(String url, int retries) { return get(url, true, retries); }
/**
* @param retries if < 0, set timeout to a few seconds
*/
public File get(String url, boolean rewrite, int retries) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Fetching [" + url + "] proxy=" + _proxyHost + ":" + _proxyPort + ": " + _shouldProxy);
@ -295,7 +368,7 @@ public class I2PSnarkUtil {
// we could use the system tmp dir but deleteOnExit() doesn't seem to work on all platforms...
out = SecureFile.createTempFile("i2psnark", null, _tmpDir);
} catch (IOException ioe) {
ioe.printStackTrace();
_log.error("temp file error", ioe);
if (out != null)
out.delete();
return null;
@ -307,12 +380,21 @@ public class I2PSnarkUtil {
//_log.debug("Rewritten url [" + fetchURL + "]");
//EepGet get = new EepGet(_context, _shouldProxy, _proxyHost, _proxyPort, retries, out.getAbsolutePath(), fetchURL);
// Use our tunnel for announces and .torrent fetches too! Make sure we're connected first...
if (!connected()) {
if (!connect())
int timeout;
if (retries < 0) {
if (!connected())
return null;
timeout = EEPGET_CONNECT_TIMEOUT_SHORT;
retries = 0;
} else {
timeout = EEPGET_CONNECT_TIMEOUT;
if (!connected()) {
if (!connect())
return null;
}
}
EepGet get = new I2PSocketEepGet(_context, _manager, retries, out.getAbsolutePath(), fetchURL);
if (get.fetch()) {
if (get.fetch(timeout)) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Fetch successful [" + url + "]: size=" + out.length());
return out;
@ -324,6 +406,46 @@ public class I2PSnarkUtil {
}
}
/**
* Fetch to memory
* @param retries if < 0, set timeout to a few seconds
* @param initialSize buffer size
* @param maxSize fails if greater
* @return null on error
* @since 0.9.4
*/
public byte[] get(String url, boolean rewrite, int retries, int initialSize, int maxSize) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Fetching [" + url + "] to memory");
String fetchURL = url;
if (rewrite)
fetchURL = rewriteAnnounce(url);
int timeout;
if (retries < 0) {
if (!connected())
return null;
timeout = EEPGET_CONNECT_TIMEOUT_SHORT;
retries = 0;
} else {
timeout = EEPGET_CONNECT_TIMEOUT;
if (!connected()) {
if (!connect())
return null;
}
}
ByteArrayOutputStream out = new ByteArrayOutputStream(initialSize);
EepGet get = new I2PSocketEepGet(_context, _manager, retries, -1, maxSize, null, out, fetchURL);
if (get.fetch(timeout)) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Fetch successful [" + url + "]: size=" + out.size());
return out.toByteArray();
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("Fetch failed [" + url + "]");
return null;
}
}
public I2PServerSocket getServerSocket() {
I2PSocketManager mgr = _manager;
if (mgr != null)
@ -386,7 +508,8 @@ public class I2PSnarkUtil {
if (sess != null) {
byte[] b = Base32.decode(ip.substring(0, BASE32_HASH_LENGTH));
if (b != null) {
Hash h = new Hash(b);
//Hash h = new Hash(b);
Hash h = Hash.create(b);
if (_log.shouldLog(Log.INFO))
_log.info("Using existing session for lookup of " + ip);
try {
@ -441,30 +564,26 @@ public class I2PSnarkUtil {
}
/** @param ot non-null */
public void setOpenTrackerString(String ot) {
_openTrackerString = ot;
public void setOpenTrackers(List<String> ot) {
_openTrackers = ot;
}
public String getOpenTrackerString() {
if (_openTrackerString == null)
return DEFAULT_OPENTRACKERS;
return _openTrackerString;
}
/** comma delimited list open trackers to use as backups */
/** sorted map of name to announceURL=baseURL */
/** List of open trackers to use as backups
* @return non-null, possibly unmodifiable, empty if disabled
*/
public List<String> getOpenTrackers() {
if (!shouldUseOpenTrackers())
return null;
List<String> rv = new ArrayList(1);
String trackers = getOpenTrackerString();
StringTokenizer tok = new StringTokenizer(trackers, ", ");
while (tok.hasMoreTokens())
rv.add(tok.nextToken());
if (rv.isEmpty())
return null;
return rv;
return Collections.EMPTY_LIST;
return _openTrackers;
}
/**
* List of open trackers to use as backups even if disabled
* @return non-null
* @since 0.9.4
*/
public List<String> getBackupTrackers() {
return _openTrackers;
}
public void setUseOpenTrackers(boolean yes) {
@ -474,6 +593,22 @@ public class I2PSnarkUtil {
public boolean shouldUseOpenTrackers() {
return _shouldUseOT;
}
/** @since DHT */
public synchronized void setUseDHT(boolean yes) {
_shouldUseDHT = yes;
if (yes && _manager != null && _dht == null) {
_dht = new KRPC(_context, _baseName, _manager.getSession());
} else if (!yes && _dht != null) {
_dht.stop();
_dht = null;
}
}
/** @since DHT */
public boolean shouldUseDHT() {
return _shouldUseDHT;
}
/**
* Like DataHelper.toHexString but ensures no loss of leading zero bytes
@ -490,40 +625,6 @@ public class I2PSnarkUtil {
return buf.toString();
}
/** hook between snark's logger and an i2p log */
void debug(String msg, int snarkDebugLevel) {
debug(msg, snarkDebugLevel, null);
}
void debug(String msg, int snarkDebugLevel, Throwable t) {
if (t instanceof OutOfMemoryError) {
try { Thread.sleep(100); } catch (InterruptedException ie) {}
try {
t.printStackTrace();
} catch (Throwable tt) {}
try {
System.out.println("OOM thread: " + Thread.currentThread().getName());
} catch (Throwable tt) {}
}
switch (snarkDebugLevel) {
case 0:
case 1:
_log.error(msg, t);
break;
case 2:
_log.warn(msg, t);
break;
case 3:
case 4:
_log.info(msg, t);
break;
case 5:
case 6:
default:
_log.debug(msg, t);
break;
}
}
private static final String BUNDLE_NAME = "org.klomp.snark.web.messages";
/** lang in routerconsole.lang property, else current locale */

View File

@ -0,0 +1,120 @@
/*
* Released into the public domain
* with no warranty of any kind, either expressed or implied.
*/
package org.klomp.snark;
import java.util.Map;
import java.util.Properties;
import net.i2p.client.I2PSession;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.util.Log;
import net.i2p.util.SimpleTimer2;
/**
* Periodically check for idle condition based on connected peers,
* and reduce/restore tunnel count as necessary.
* We can't use the I2CP idle detector because it's based on traffic,
* so DHT and announces would keep it non-idle.
*
* @since 0.9.7
*/
class IdleChecker extends SimpleTimer2.TimedEvent {
private final I2PSnarkUtil _util;
private final PeerCoordinatorSet _pcs;
private final Log _log;
private int _consec;
private boolean _isIdle;
private static final long CHECK_TIME = 63*1000;
private static final int MAX_CONSEC_IDLE = 4;
/**
* Caller must schedule
*/
public IdleChecker(I2PSnarkUtil util, PeerCoordinatorSet pcs) {
super(util.getContext().simpleTimer2());
_log = util.getContext().logManager().getLog(IdleChecker.class);
_util = util;
_pcs = pcs;
}
public void timeReached() {
if (_util.connected()) {
boolean hasPeers = false;
for (PeerCoordinator pc : _pcs) {
if (pc.getPeers() > 0) {
hasPeers = true;
break;
}
}
if (hasPeers) {
if (_isIdle)
restoreTunnels();
} else {
if (!_isIdle) {
if (_consec++ >= MAX_CONSEC_IDLE)
reduceTunnels();
}
}
} else {
_isIdle = false;
_consec = 0;
}
schedule(CHECK_TIME);
}
/**
* Reduce to 1 in / 1 out tunnel
*/
private void reduceTunnels() {
_isIdle = true;
if (_log.shouldLog(Log.INFO))
_log.info("Reducing tunnels on idle");
setTunnels("1", "1", "0", "0");
}
/**
* Restore tunnel count
*/
private void restoreTunnels() {
_isIdle = false;
if (_log.shouldLog(Log.INFO))
_log.info("Restoring tunnels on activity");
Map<String, String> opts = _util.getI2CPOptions();
String i = opts.get("inbound.quantity");
if (i == null)
i = "3";
String o = opts.get("outbound.quantity");
if (o == null)
o = "3";
String ib = opts.get("inbound.backupQuantity");
if (ib == null)
ib = "0";
String ob= opts.get("outbound.backupQuantity");
if (ob == null)
ob = "0";
setTunnels(i, o, ib, ob);
}
/**
* Set in / out / in backup / out backup tunnel counts
*/
private void setTunnels(String i, String o, String ib, String ob) {
_consec = 0;
I2PSocketManager mgr = _util.getSocketManager();
if (mgr != null) {
I2PSession sess = mgr.getSession();
if (sess != null) {
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);
}
}
}
}

View File

@ -5,10 +5,10 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;
import net.i2p.util.RandomSource;
import org.klomp.snark.bencode.BDecoder;
import org.klomp.snark.bencode.BEValue;
@ -27,7 +27,6 @@ import org.klomp.snark.bencode.BEValue;
*/
class MagnetState {
public static final int CHUNK_SIZE = 16*1024;
private static final Random random = I2PAppContext.getGlobalContext().random();
private final byte[] infohash;
private boolean complete;
@ -129,7 +128,7 @@ class MagnetState {
throw new IllegalArgumentException("not initialized");
if (complete)
throw new IllegalArgumentException("complete");
int rand = random.nextInt(totalChunks);
int rand = RandomSource.getInstance().nextInt(totalChunks);
for (int i = 0; i < totalChunks; i++) {
int chk = (i + rand) % totalChunks;
if (!(have.get(chk) || requested.get(chk))) {

View File

@ -0,0 +1,212 @@
package org.klomp.snark;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import net.i2p.data.Base32;
/**
*
* @since 0.9.4 moved from I2PSnarkServlet
*/
public class MagnetURI {
private final String _tracker;
private final String _name;
private final byte[] _ih;
/** BEP 9 */
public static final String MAGNET = "magnet:";
public static final String MAGNET_FULL = MAGNET + "?xt=urn:btih:";
/** http://sponge.i2p/files/maggotspec.txt */
public static final String MAGGOT = "maggot://";
/**
* @param url non-null
*/
public MagnetURI(I2PSnarkUtil util, String url) throws IllegalArgumentException {
String ihash;
String name;
String trackerURL = null;
if (url.startsWith(MAGNET)) {
// magnet:?xt=urn:btih:0691e40aae02e552cfcb57af1dca56214680c0c5&tr=http://tracker2.postman.i2p/announce.php
String xt = getParam("xt", url);
if (xt == null || !xt.startsWith("urn:btih:"))
throw new IllegalArgumentException();
ihash = xt.substring("urn:btih:".length());
trackerURL = getTrackerParam(url);
name = util.getString("Magnet") + ' ' + ihash;
String dn = getParam("dn", url);
if (dn != null)
name += " (" + Storage.filterName(dn) + ')';
} else if (url.startsWith(MAGGOT)) {
// maggot://0691e40aae02e552cfcb57af1dca56214680c0c5:0b557bbdf8718e95d352fbe994dec3a383e2ede7
ihash = url.substring(MAGGOT.length()).trim();
int col = ihash.indexOf(':');
if (col >= 0)
ihash = ihash.substring(0, col);
name = util.getString("Magnet") + ' ' + ihash;
} else {
throw new IllegalArgumentException();
}
byte[] ih = null;
if (ihash.length() == 32) {
ih = Base32.decode(ihash);
} else if (ihash.length() == 40) {
// Like DataHelper.fromHexString() but ensures no loss of leading zero bytes
ih = new byte[20];
try {
for (int i = 0; i < 20; i++) {
ih[i] = (byte) (Integer.parseInt(ihash.substring(i*2, (i*2) + 2), 16) & 0xff);
}
} catch (NumberFormatException nfe) {
ih = null;
}
}
if (ih == null || ih.length != 20)
throw new IllegalArgumentException();
_ih = ih;
_name = name;
_tracker = trackerURL;
}
/**
* @return 20 bytes or null
*/
public byte[] getInfoHash() {
return _ih;
}
/**
* @return pretty name or null
*/
public String getName() {
return _name;
}
/**
* @return tracker url or null
*/
public String getTrackerURL() {
return _tracker;
}
/**
* @return first decoded parameter or null
*/
private static String getParam(String key, String uri) {
int idx = uri.indexOf('?' + key + '=');
if (idx >= 0) {
idx += key.length() + 2;
} else {
idx = uri.indexOf('&' + key + '=');
if (idx >= 0)
idx += key.length() + 2;
}
if (idx < 0 || idx > uri.length())
return null;
String rv = uri.substring(idx);
idx = rv.indexOf('&');
if (idx >= 0)
rv = rv.substring(0, idx);
else
rv = rv.trim();
return decode(rv);
}
/**
* @return all decoded parameters or null
* @since 0.9.1
*/
private static List<String> getMultiParam(String key, String uri) {
int idx = uri.indexOf('?' + key + '=');
if (idx >= 0) {
idx += key.length() + 2;
} else {
idx = uri.indexOf('&' + key + '=');
if (idx >= 0)
idx += key.length() + 2;
}
if (idx < 0 || idx > uri.length())
return null;
List<String> rv = new ArrayList();
while (true) {
String p = uri.substring(idx);
uri = p;
idx = p.indexOf('&');
if (idx >= 0)
p = p.substring(0, idx);
else
p = p.trim();
rv.add(decode(p));
idx = uri.indexOf('&' + key + '=');
if (idx < 0)
break;
idx += key.length() + 2;
}
return rv;
}
/**
* @return first valid I2P tracker or null
* @since 0.9.1
*/
private static String getTrackerParam(String uri) {
List<String> trackers = getMultiParam("tr", uri);
if (trackers == null)
return null;
for (String t : trackers) {
try {
URI u = new URI(t);
String protocol = u.getScheme();
String host = u.getHost();
if (protocol == null || host == null ||
!protocol.toLowerCase(Locale.US).equals("http") ||
!host.toLowerCase(Locale.US).endsWith(".i2p"))
continue;
return t;
} catch(URISyntaxException use) {}
}
return null;
}
/**
* Decode %xx encoding, convert to UTF-8 if necessary
* Copied from i2ptunnel LocalHTTPServer
* @since 0.9.1
*/
private static String decode(String s) {
if (!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 != '%') {
buf.append(c);
} else {
try {
int val = Integer.parseInt(s.substring(++i, (++i) + 1), 16);
if ((val & 0x80) != 0)
utf8 = true;
buf.append((char) val);
} catch (IndexOutOfBoundsException ioobe) {
break;
} catch (NumberFormatException nfe) {
break;
}
}
}
if (utf8) {
try {
return new String(buf.toString().getBytes("ISO-8859-1"), "UTF-8");
} catch (UnsupportedEncodingException uee) {}
}
return buf.toString();
}
}

View File

@ -23,10 +23,13 @@ package org.klomp.snark;
import java.io.DataOutputStream;
import java.io.IOException;
import net.i2p.util.SimpleTimer;
import net.i2p.data.ByteArray;
import net.i2p.util.ByteCache;
// Used to queue outgoing connections
// sendMessage() should be used to translate them to wire format.
/**
* Used to queue outgoing connections
* sendMessage() should be used to translate them to wire format.
*/
class Message
{
final static byte KEEP_ALIVE = -1;
@ -71,6 +74,9 @@ class Message
// now unused
//SimpleTimer.TimedEvent expireEvent;
private static final int BUFSIZE = PeerState.PARTSIZE;
private static final ByteCache _cache = ByteCache.getInstance(16, BUFSIZE);
/** Utility method for sending a message through a DataStream. */
void sendMessage(DataOutputStream dos) throws IOException
{
@ -81,11 +87,15 @@ class Message
return;
}
ByteArray ba;
// Get deferred data
if (data == null && dataLoader != null) {
data = dataLoader.loadData(piece, begin, length);
if (data == null)
ba = dataLoader.loadData(piece, begin, length);
if (ba == null)
return; // hmm will get retried, but shouldn't happen
data = ba.getData();
} else {
ba = null;
}
// Calculate the total length in bytes
@ -141,6 +151,10 @@ class Message
// Send actual data
if (type == BITFIELD || type == PIECE || type == EXTENSION)
dos.write(data, off, len);
// Was pulled from cache in Storage.getPiece() via dataLoader
if (ba != null && ba.getData().length == BUFSIZE)
_cache.release(ba, false);
}
@Override

View File

@ -33,7 +33,6 @@ import java.util.Map;
import net.i2p.I2PAppContext;
import net.i2p.crypto.SHA1;
import net.i2p.data.Base64;
import net.i2p.data.DataHelper;
import net.i2p.util.Log;
@ -61,6 +60,11 @@ public class MetaInfo
private final int piece_length;
private final byte[] piece_hashes;
private final long length;
private final boolean privateTorrent;
private final List<List<String>> announce_list;
private final String comment;
private final String created_by;
private final long creation_date;
private Map<String, BEValue> infoMap;
/**
@ -69,9 +73,11 @@ public class MetaInfo
* @param announce may be null
* @param files null for single-file torrent
* @param lengths null for single-file torrent
* @param announce_list 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)
int piece_length, byte[] piece_hashes, long length, boolean privateTorrent,
List<List<String>> announce_list)
{
this.announce = announce;
this.name = name;
@ -82,6 +88,11 @@ public class MetaInfo
this.piece_length = piece_length;
this.piece_hashes = piece_hashes;
this.length = length;
this.privateTorrent = privateTorrent;
this.announce_list = announce_list;
this.comment = null;
this.created_by = null;
this.creation_date = 0;
// TODO if we add a parameter for other keys
//if (other != null) {
@ -140,6 +151,49 @@ public class MetaInfo
this.announce = val.getString();
}
// BEP 12
val = m.get("announce-list");
if (val == null) {
this.announce_list = null;
} else {
this.announce_list = new ArrayList();
List<BEValue> bl1 = val.getList();
for (BEValue bev : bl1) {
List<BEValue> bl2 = bev.getList();
List<String> sl2 = new ArrayList();
for (BEValue bev2 : bl2) {
sl2.add(bev2.getString());
}
this.announce_list.add(sl2);
}
}
// misc. optional top-level stuff
val = m.get("comment");
String st = null;
if (val != null) {
try {
st = val.getString();
} catch (InvalidBEncodingException ibee) {}
}
this.comment = st;
val = m.get("created by");
st = null;
if (val != null) {
try {
st = val.getString();
} catch (InvalidBEncodingException ibee) {}
}
this.created_by = st;
val = m.get("creation date");
long time = 0;
if (val != null) {
try {
time = val.getLong() * 1000;
} catch (InvalidBEncodingException ibee) {}
}
this.creation_date = time;
val = m.get("info");
if (val == null)
throw new InvalidBEncodingException("Missing info map");
@ -160,6 +214,10 @@ public class MetaInfo
else
name_utf8 = null;
// BEP 27
val = info.get("private");
privateTorrent = val != null && val.getString().equals("1");
val = info.get("piece length");
if (val == null)
throw new InvalidBEncodingException("Missing piece length number");
@ -212,7 +270,7 @@ public class MetaInfo
if (l < oldTotal)
throw new InvalidBEncodingException("Huge total length");
val = (BEValue)desc.get("path");
val = desc.get("path");
if (val == null)
throw new InvalidBEncodingException("Missing path list");
List<BEValue> path_list = val.getList();
@ -238,7 +296,7 @@ public class MetaInfo
m_files.add(Collections.unmodifiableList(file));
val = (BEValue)desc.get("path.utf-8");
val = desc.get("path.utf-8");
if (val != null) {
path_list = val.getList();
path_length = path_list.size();
@ -291,6 +349,15 @@ public class MetaInfo
return announce;
}
/**
* Returns a list of lists of urls.
*
* @since 0.9.5
*/
public List<List<String>> getAnnounceList() {
return announce_list;
}
/**
* Returns the original 20 byte SHA1 hash over the bencoded info map.
*/
@ -318,6 +385,14 @@ public class MetaInfo
return name;
}
/**
* Is it a private torrent?
* @since 0.9
*/
public boolean isPrivate() {
return privateTorrent;
}
/**
* Returns a list of lists of file name hierarchies or null if it is
* a single name. It has the same size as the list returned by
@ -338,6 +413,33 @@ public class MetaInfo
return lengths;
}
/**
* The comment string or null.
* Not available for locally-created torrents.
* @since 0.9.7
*/
public String getComment() {
return this.comment;
}
/**
* The created-by string or null.
* Not available for locally-created torrents.
* @since 0.9.7
*/
public String getCreatedBy() {
return this.created_by;
}
/**
* The creation date (ms) or zero.
* Not available for locally-created torrents.
* @since 0.9.7
*/
public long getCreationDate() {
return this.creation_date;
}
/**
* Returns the number of pieces.
*/
@ -409,6 +511,29 @@ public class MetaInfo
return false;
return true;
}
/**
* @return good
* @since 0.9.1
*/
boolean checkPiece(PartialPiece pp) {
MessageDigest sha1 = SHA1.getInstance();
int piece = pp.getPiece();
byte[] hash;
try {
hash = pp.getHash();
} catch (IOException ioe) {
// Could be caused by closing a peer connnection
// we don't want the exception to propagate through
// to Storage.putPiece()
_log.warn("Error checking", ioe);
return false;
}
for (int i = 0; i < 20; i++)
if (hash[i] != piece_hashes[20 * piece + i])
return false;
return true;
}
/**
* Returns the total length of the torrent in bytes.
@ -434,12 +559,18 @@ public class MetaInfo
/**
* Creates a copy of this MetaInfo that shares everything except the
* announce URL.
* Drops any announce-list.
* Preserves infohash and info map, including any non-standard fields.
* @param announce may be null
*/
public MetaInfo reannounce(String announce)
public MetaInfo reannounce(String announce) throws InvalidBEncodingException
{
return new MetaInfo(announce, name, name_utf8, files,
lengths, piece_length,
piece_hashes, length);
Map<String, BEValue> m = new HashMap();
if (announce != null)
m.put("announce", new BEValue(DataHelper.getUTF8(announce)));
Map info = createInfoMap();
m.put("info", new BEValue(info));
return new MetaInfo(m);
}
/**
@ -450,6 +581,8 @@ public class MetaInfo
Map m = new HashMap();
if (announce != null)
m.put("announce", announce);
if (announce_list != null)
m.put("announce-list", announce_list);
Map info = createInfoMap();
m.put("info", info);
// don't save this locally, we should only do this once
@ -470,11 +603,18 @@ public class MetaInfo
// or else we will lose any non-standard keys and corrupt the infohash.
if (infoMap != null)
return Collections.unmodifiableMap(infoMap);
// we should only get here if serving a magnet on a torrent we created
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);
if (name_utf8 != null)
info.put("name.utf-8", name_utf8);
// BEP 27
if (privateTorrent)
info.put("private", "1");
info.put("piece length", Integer.valueOf(piece_length));
info.put("pieces", piece_hashes);
if (files == null)

View File

@ -1,6 +1,24 @@
package org.klomp.snark;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.security.MessageDigest;
import net.i2p.I2PAppContext;
import net.i2p.crypto.SHA1;
import net.i2p.data.ByteArray;
import net.i2p.util.ByteCache;
import net.i2p.util.Log;
import net.i2p.util.SecureFile;
/**
* Store the received data either on the heap or in a temp file.
* The third option, to write chunks directly to the destination file,
* is unimplemented.
*
* This is the class passed from PeerCoordinator to PeerState so
* PeerState may start requests.
*
@ -8,45 +26,84 @@ package org.klomp.snark;
* a piece is not completely downloaded, for example
* when the Peer disconnects or chokes.
*
* New objects for the same piece are created during the end game -
* this object should not be shared among multiple peers.
*
* @since 0.8.2
*/
class PartialPiece implements Comparable {
private final int piece;
// we store the piece so we can use it in compareTo()
private final Piece piece;
// null if using temp file
private final byte[] bs;
private final int off;
private final long createdTime;
private int off;
//private final long createdTime;
private File tempfile;
private RandomAccessFile raf;
private final int pclen;
private final File tempDir;
private static final int BUFSIZE = PeerState.PARTSIZE;
private static final ByteCache _cache = ByteCache.getInstance(16, BUFSIZE);
// Any bigger than this, use temp file instead of heap
private static final int MAX_IN_MEM = 128 * 1024;
// May be reduced on OOM
private static int _max_in_mem = MAX_IN_MEM;
/**
* Used by PeerCoordinator.
* Creates a new PartialPiece, with no chunks yet downloaded.
* Allocates the data.
* Allocates the data storage area, either on the heap or in the
* temp directory, depending on size.
*
* @param piece Piece number requested.
* @param len must be equal to the piece length
*/
public PartialPiece (int piece, int len) throws OutOfMemoryError {
public PartialPiece (Piece piece, int len, File tempDir) {
this.piece = piece;
this.bs = new byte[len];
this.off = 0;
this.createdTime = 0;
this.pclen = len;
//this.createdTime = 0;
this.tempDir = tempDir;
// temps for finals
byte[] tbs = null;
try {
if (len <= MAX_IN_MEM) {
try {
tbs = new byte[len];
return;
} catch (OutOfMemoryError oom) {
if (_max_in_mem > PeerState.PARTSIZE)
_max_in_mem /= 2;
Log log = I2PAppContext.getGlobalContext().logManager().getLog(PartialPiece.class);
log.logAlways(Log.WARN, "OOM creating new partial piece");
// fall through to use temp file
}
}
// delay creating temp file until required in read()
} finally {
// finals
this.bs = tbs;
}
}
/**
* Used by PeerState.
* Creates a new PartialPiece, with chunks up to but not including
* firstOutstandingRequest already downloaded and stored in the Request byte array.
* Caller must synchronize
*
* Note that this cannot handle gaps; chunks after a missing chunk cannot be saved.
* That would be harder.
*
* @param firstOutstandingRequest the first request not fulfilled for the piece
* @since 0.9.1
*/
public PartialPiece (Request firstOutstandingRequest) {
this.piece = firstOutstandingRequest.piece;
this.bs = firstOutstandingRequest.bs;
this.off = firstOutstandingRequest.off;
this.createdTime = System.currentTimeMillis();
private void createTemp() throws IOException {
//tfile = SecureFile.createTempFile("piece", null, tempDir);
// debug
tempfile = SecureFile.createTempFile("piece_" + piece.getId() + '_', null, tempDir);
//I2PAppContext.getGlobalContext().logManager().getLog(PartialPiece.class).warn("Created " + tempfile);
// tfile.deleteOnExit() ???
raf = new RandomAccessFile(tempfile, "rw");
// Do not preallocate the file space.
// Not necessary to call setLength(), file is extended when written
//traf.setLength(len);
}
/**
@ -55,33 +112,200 @@ class PartialPiece implements Comparable {
*/
public Request getRequest() {
return new Request(this.piece, this.bs, this.off, Math.min(this.bs.length - this.off, PeerState.PARTSIZE));
return new Request(this, this.off, Math.min(this.pclen - this.off, PeerState.PARTSIZE));
}
/** piece number */
public int getPiece() {
return this.piece;
return this.piece.getId();
}
/** how many bytes are good */
/**
* @since 0.9.1
*/
public int getLength() {
return this.pclen;
}
/**
* How many bytes are good - only valid by setDownloaded()
*/
public int getDownloaded() {
return this.off;
}
/**
* Call this before returning a PartialPiece to the PeerCoordinator
* @since 0.9.1
*/
public void setDownloaded(int offset) {
this.off = offset;
}
/****
public long getCreated() {
return this.createdTime;
}
****/
/**
* Highest downloaded first
* Piece must be complete.
* The SHA1 hash of the completely read data.
* @since 0.9.1
*/
public byte[] getHash() throws IOException {
MessageDigest sha1 = SHA1.getInstance();
if (bs != null) {
sha1.update(bs);
} else {
int read = 0;
int buflen = Math.min(pclen, BUFSIZE);
ByteArray ba;
byte[] buf;
if (buflen == BUFSIZE) {
ba = _cache.acquire();
buf = ba.getData();
} else {
ba = null;
buf = new byte[buflen];
}
synchronized (this) {
if (raf == null)
throw new IOException();
raf.seek(0);
while (read < pclen) {
int rd = raf.read(buf, 0, Math.min(buf.length, pclen - read));
if (rd < 0)
break;
read += rd;
sha1.update(buf, 0, rd);
}
}
if (ba != null)
_cache.release(ba, false);
if (read < pclen)
throw new IOException();
}
return sha1.digest();
}
/**
* Blocking.
* @since 0.9.1
*/
public void read(DataInputStream din, int off, int len) throws IOException {
if (bs != null) {
din.readFully(bs, off, len);
} else {
// read in fully before synching on raf
ByteArray ba;
byte[] tmp;
if (len == BUFSIZE) {
ba = _cache.acquire();
tmp = ba.getData();
} else {
ba = null;
tmp = new byte[len];
}
din.readFully(tmp);
synchronized (this) {
if (raf == null)
createTemp();
raf.seek(off);
raf.write(tmp);
}
if (ba != null)
_cache.release(ba, false);
}
}
/**
* Piece must be complete.
* Caller must synchronize on out and seek to starting point.
* Caller must call release() when done with the whole piece.
*
* @param out stream to write to
* @param offset offset in the piece
* @param len length to write
* @since 0.9.1
*/
public void write(DataOutput out, int offset, int len) throws IOException {
if (bs != null) {
out.write(bs, offset, len);
} else {
int read = 0;
int buflen = Math.min(len, BUFSIZE);
ByteArray ba;
byte[] buf;
if (buflen == BUFSIZE) {
ba = _cache.acquire();
buf = ba.getData();
} else {
ba = null;
buf = new byte[buflen];
}
synchronized (this) {
if (raf == null)
throw new IOException();
raf.seek(offset);
while (read < len) {
int rd = Math.min(buf.length, len - read);
raf.readFully(buf, 0, rd);
read += rd;
out.write(buf, 0, rd);
}
}
if (ba != null)
_cache.release(ba, false);
}
}
/**
* Release all resources.
*
* @since 0.9.1
*/
public void release() {
if (bs == null) {
synchronized (this) {
if (raf != null)
locked_release();
}
//if (raf != null)
// I2PAppContext.getGlobalContext().logManager().getLog(PartialPiece.class).warn("Released " + tempfile);
}
}
/**
* Caller must synchronize
*
* @since 0.9.1
*/
private void locked_release() {
try {
raf.close();
} catch (IOException ioe) {
I2PAppContext.getGlobalContext().logManager().getLog(PartialPiece.class).warn("Error closing " + raf, ioe);
}
tempfile.delete();
}
/*
* Highest priority first,
* then rarest first,
* then highest downloaded first
*/
public int compareTo(Object o) throws ClassCastException {
return ((PartialPiece)o).off - this.off; // reverse
PartialPiece opp = (PartialPiece)o;
int d = this.piece.compareTo(opp.piece);
if (d != 0)
return d;
return opp.off - this.off; // reverse
}
@Override
public int hashCode() {
return piece * 7777;
return piece.getId() * 7777;
}
/**
@ -92,13 +316,13 @@ class PartialPiece implements Comparable {
public boolean equals(Object o) {
if (o instanceof PartialPiece) {
PartialPiece pp = (PartialPiece)o;
return pp.piece == this.piece;
return pp.piece.getId() == this.piece.getId();
}
return false;
}
@Override
public String toString() {
return "Partial(" + piece + ',' + off + ',' + bs.length + ')';
return "Partial(" + piece.getId() + ',' + off + ',' + pclen + ')';
}
}

View File

@ -80,7 +80,9 @@ public class Peer implements Comparable
static final long OPTION_FAST = 0x0000000000000004l;
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 long options;
@ -268,15 +270,18 @@ public class Peer implements Comparable
if (_log.shouldLog(Log.DEBUG))
_log.debug("Peer supports extensions, sending reply message");
int metasize = metainfo != null ? metainfo.getInfoBytes().length : -1;
out.sendExtension(0, ExtensionHandler.getHandshake(metasize));
boolean pexAndMetadata = metainfo == null || !metainfo.isPrivate();
boolean dht = util.getDHT() != null;
out.sendExtension(0, ExtensionHandler.getHandshake(metasize, pexAndMetadata, dht));
}
if ((options & OPTION_I2P_DHT) != 0 && util.getDHT() != null) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Peer supports DHT, sending PORT message");
int port = util.getDHT().getPort();
out.sendPort(port);
}
// Old DHT PORT message
//if ((options & OPTION_I2P_DHT) != 0 && util.getDHT() != null) {
// if (_log.shouldLog(Log.DEBUG))
// _log.debug("Peer supports DHT, sending PORT message");
// int port = util.getDHT().getPort();
// out.sendPort(port);
//}
// Send our bitmap
if (bitfield != null)
@ -354,7 +359,7 @@ public class Peer implements Comparable
String bittorrentProtocol = new String(bs, "UTF-8");
if (!"BitTorrent protocol".equals(bittorrentProtocol))
throw new IOException("Handshake failure, expected "
+ "'Bittorrent protocol', got '"
+ "'BitTorrent protocol', got '"
+ bittorrentProtocol + "'");
// Handshake read - options
@ -459,7 +464,7 @@ public class Peer implements Comparable
if (this.deregister) {
PeerListener p = s.listener;
if (p != null) {
List<PartialPiece> pcs = s.returnPartialPieces();
List<Request> pcs = s.returnPartialPieces();
if (!pcs.isEmpty())
p.savePartialPieces(this, pcs);
// now covered by savePartialPieces

View File

@ -40,12 +40,16 @@ import net.i2p.util.Log;
* protocol connection. The PeerAcceptor will then create a new peer
* if the PeerCoordinator wants more peers.
*/
public class PeerAcceptor
class PeerAcceptor
{
private final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(PeerAcceptor.class);
private final PeerCoordinator coordinator;
final PeerCoordinatorSet coordinators;
/** shorten timeout while reading handshake */
private static final long HASH_READ_TIMEOUT = 45*1000;
public PeerAcceptor(PeerCoordinator coordinator)
{
this.coordinator = coordinator;
@ -69,11 +73,20 @@ public class PeerAcceptor
// talk about, and we can just look for that in our list of active torrents.
byte peerInfoHash[] = null;
if (in instanceof BufferedInputStream) {
// multitorrent
in.mark(LOOKAHEAD_SIZE);
peerInfoHash = readHash(in);
long timeout = socket.getReadTimeout();
socket.setReadTimeout(HASH_READ_TIMEOUT);
try {
peerInfoHash = readHash(in);
} catch (IOException ioe) {
// unique exception so ConnectionAcceptor can blame the peer
throw new ProtocolException(ioe.toString());
}
socket.setReadTimeout(timeout);
in.reset();
} else {
// is this working right?
// Single torrent - is this working right?
try {
peerInfoHash = readHash(in);
if (_log.shouldLog(Log.INFO))
@ -104,9 +117,8 @@ public class PeerAcceptor
}
} else {
// multitorrent capable, so lets see what we can handle
for (Iterator iter = coordinators.iterator(); iter.hasNext(); ) {
PeerCoordinator cur = (PeerCoordinator)iter.next();
PeerCoordinator cur = coordinators.get(peerInfoHash);
if (cur != null) {
if (DataHelper.eq(cur.getInfoHash(), peerInfoHash)) {
if (cur.needPeers())
{
@ -130,22 +142,50 @@ public class PeerAcceptor
}
}
private static final String PROTO_STR = "BitTorrent protocol";
private static final int PROTO_STR_LEN = PROTO_STR.length();
private static final int PROTO_LEN = PROTO_STR_LEN + 1;
private static final int[] PROTO = new int[PROTO_LEN];
static {
PROTO[0] = PROTO_STR_LEN;
for (int i = 0; i < PROTO_STR_LEN; i++) {
PROTO[i+1] = PROTO_STR.charAt(i);
}
}
/** 48 */
private static final int LOOKAHEAD_SIZE = 1 + // chr(19)
"BitTorrent protocol".length() +
private static final int LOOKAHEAD_SIZE = PROTO_LEN +
8 + // blank, reserved
20; // infohash
/**
* Read ahead to the infohash, throwing an exception if there isn't enough data
* Read ahead to the infohash, throwing an exception if there isn't enough data.
* Also check the first 20 bytes for the correct protocol here and throw IOE if bad,
* so we don't hang waiting for 48 bytes if it's not a bittorrent client.
* The 20 bytes are checked again in Peer.handshake().
*/
private byte[] readHash(InputStream in) throws IOException {
byte buf[] = new byte[LOOKAHEAD_SIZE];
private static byte[] readHash(InputStream in) throws IOException {
for (int i = 0; i < PROTO_LEN; i++) {
int b = in.read();
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");
byte buf[] = new byte[20];
int read = DataHelper.read(in, buf);
if (read != buf.length)
throw new IOException("Unable to read the hash (read " + read + ")");
byte rv[] = new byte[20];
System.arraycopy(buf, buf.length-rv.length, rv, 0, rv.length);
return rv;
return buf;
}
/**
* A unique exception so we can tell the ConnectionAcceptor about non-BT connections
* @since 0.9.1
*/
public static class ProtocolException extends IOException {
public ProtocolException(String s) {
super(s);
}
}
}

View File

@ -21,11 +21,14 @@
package org.klomp.snark;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;
import net.i2p.util.Log;
import org.klomp.snark.dht.DHT;
/**
* TimerTask that checks for good/bad up/downloader. Works together
@ -37,16 +40,18 @@ class PeerCheckerTask implements Runnable
private final PeerCoordinator coordinator;
private final I2PSnarkUtil _util;
private final Log _log;
private final Random random;
private int _runCount;
PeerCheckerTask(I2PSnarkUtil util, PeerCoordinator coordinator)
{
_util = util;
_log = util.getContext().logManager().getLog(PeerCheckerTask.class);
random = util.getContext().random();
this.coordinator = coordinator;
}
private static final Random random = I2PAppContext.getGlobalContext().random();
public void run()
{
_runCount++;
@ -60,9 +65,7 @@ class PeerCheckerTask implements Runnable
long worstdownload = Long.MAX_VALUE;
Peer worstDownloader = null;
int peers = 0;
int uploaders = 0;
int downloaders = 0;
int removedCount = 0;
long uploaded = 0;
@ -73,6 +76,7 @@ class PeerCheckerTask implements Runnable
List<Peer> removed = new ArrayList();
int uploadLimit = coordinator.allowedUploaders();
boolean overBWLimit = coordinator.overUpBWLimit();
DHT dht = _util.getDHT();
for (Peer peer : peerList) {
// Remove dying peers
@ -85,12 +89,16 @@ class PeerCheckerTask implements Runnable
continue;
}
peers++;
if (peer.getInactiveTime() > PeerCoordinator.MAX_INACTIVE) {
if (_log.shouldLog(Log.WARN))
_log.warn("Disconnecting peer idle " +
DataHelper.formatDuration(peer.getInactiveTime()) + ": " + peer);
peer.disconnect();
continue;
}
if (!peer.isChoking())
uploaders++;
if (!peer.isChoked() && peer.isInteresting())
downloaders++;
long upload = peer.getUploaded();
uploaded += upload;
@ -99,14 +107,15 @@ class PeerCheckerTask implements Runnable
peer.setRateHistory(upload, download);
peer.resetCounters();
_util.debug(peer + ":", Snark.DEBUG);
_util.debug(" ul: " + upload*1024/KILOPERSECOND
if (_log.shouldLog(Log.DEBUG)) {
_log.debug(peer + ":"
+ " ul: " + upload*1024/KILOPERSECOND
+ " dl: " + download*1024/KILOPERSECOND
+ " i: " + peer.isInterested()
+ " I: " + peer.isInteresting()
+ " c: " + peer.isChoking()
+ " C: " + peer.isChoked(),
Snark.DEBUG);
+ " C: " + peer.isChoked());
}
// Choke a percentage of them rather than all so it isn't so drastic...
// unless this torrent is over the limit all by itself.
@ -127,8 +136,8 @@ class PeerCheckerTask implements Runnable
// Check if it still wants pieces from us.
if (!peer.isInterested())
{
_util.debug("Choke uninterested peer: " + peer,
Snark.INFO);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Choke uninterested peer: " + peer);
peer.setChoking(true);
uploaders--;
coordinator.uploaders--;
@ -138,8 +147,8 @@ class PeerCheckerTask implements Runnable
}
else if (overBWLimitChoke)
{
_util.debug("BW limit (" + upload + "/" + uploaded + "), choke peer: " + peer,
Snark.INFO);
if (_log.shouldLog(Log.DEBUG))
_log.debug("BW limit (" + upload + "/" + uploaded + "), choke peer: " + peer);
peer.setChoking(true);
uploaders--;
coordinator.uploaders--;
@ -151,7 +160,8 @@ class PeerCheckerTask implements Runnable
else if (peer.isInteresting() && peer.isChoked())
{
// If they are choking us make someone else a downloader
_util.debug("Choke choking peer: " + peer, Snark.DEBUG);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Choke choking peer: " + peer);
peer.setChoking(true);
uploaders--;
coordinator.uploaders--;
@ -163,7 +173,8 @@ class PeerCheckerTask implements Runnable
else if (!peer.isInteresting() && !coordinator.completed())
{
// If they aren't interesting make someone else a downloader
_util.debug("Choke uninteresting peer: " + peer, Snark.DEBUG);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Choke uninteresting peer: " + peer);
peer.setChoking(true);
uploaders--;
coordinator.uploaders--;
@ -177,8 +188,8 @@ class PeerCheckerTask implements Runnable
&& download == 0)
{
// We are downloading but didn't receive anything...
_util.debug("Choke downloader that doesn't deliver:"
+ peer, Snark.DEBUG);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Choke downloader that doesn't deliver: " + peer);
peer.setChoking(true);
uploaders--;
coordinator.uploaders--;
@ -205,10 +216,13 @@ class PeerCheckerTask implements Runnable
// send PEX
if ((_runCount % 17) == 0 && !peer.isCompleted())
coordinator.sendPeers(peer);
peer.keepAlive();
// cheap failsafe for seeds connected to seeds, stop pinging and hopefully
// the inactive checker (above) will eventually disconnect it
if (coordinator.getNeededLength() > 0 || !peer.isCompleted())
peer.keepAlive();
// announce them to local tracker (TrackerClient does this too)
if (_util.getDHT() != null && (_runCount % 5) == 0) {
_util.getDHT().announce(coordinator.getInfoHash(), peer.getPeerID().getDestHash());
if (dht != null && (_runCount % 5) == 0) {
dht.announce(coordinator.getInfoHash(), peer.getPeerID().getDestHash());
}
}
@ -222,8 +236,8 @@ class PeerCheckerTask implements Runnable
|| uploaders > uploadLimit)
&& worstDownloader != null)
{
_util.debug("Choke worst downloader: " + worstDownloader,
Snark.DEBUG);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Choke worst downloader: " + worstDownloader);
worstDownloader.setChoking(true);
coordinator.uploaders--;
@ -256,8 +270,8 @@ class PeerCheckerTask implements Runnable
}
// announce ourselves to local tracker (TrackerClient does this too)
if (_util.getDHT() != null && (_runCount % 16) == 0) {
_util.getDHT().announce(coordinator.getInfoHash());
if (dht != null && (_runCount % 16) == 0) {
dht.announce(coordinator.getInfoHash());
}
}
}

View File

@ -148,11 +148,9 @@ class PeerConnectionIn implements Runnable
begin = din.readInt();
len = i-9;
Request req = ps.getOutstandingRequest(piece, begin, len);
byte[] piece_bytes;
if (req != null)
{
piece_bytes = req.bs;
din.readFully(piece_bytes, begin, len);
req.read(din);
ps.pieceMessage(req);
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received data(" + piece + "," + begin + ") from " + peer);
@ -160,8 +158,9 @@ class PeerConnectionIn implements Runnable
else
{
// XXX - Consume but throw away afterwards.
piece_bytes = new byte[len];
din.readFully(piece_bytes);
int rcvd = din.skipBytes(len);
if (rcvd != len)
throw new IOException("EOF reading unwanted data");
if (_log.shouldLog(Log.DEBUG))
_log.debug("Received UNWANTED data(" + piece + "," + begin + ") from " + peer);
}

View File

@ -143,7 +143,7 @@ class PeerConnectionOut implements Runnable
}
}
if (m == null && !sendQueue.isEmpty()) {
m = (Message)sendQueue.remove(0);
m = sendQueue.remove(0);
//SimpleTimer.getInstance().removeEvent(m.expireEvent);
}
}
@ -395,7 +395,7 @@ class PeerConnectionOut implements Runnable
while (it.hasNext())
{
Message m = (Message)it.next();
if (m.type == Message.REQUEST && m.piece == req.piece &&
if (m.type == Message.REQUEST && m.piece == req.getPiece() &&
m.begin == req.off && m.length == req.len)
{
if (_log.shouldLog(Log.DEBUG))
@ -406,7 +406,7 @@ class PeerConnectionOut implements Runnable
}
Message m = new Message();
m.type = Message.REQUEST;
m.piece = req.piece;
m.piece = req.getPiece();
m.begin = req.off;
m.length = req.len;
addMessage(m);
@ -437,6 +437,7 @@ class PeerConnectionOut implements Runnable
*/
void sendPiece(int piece, int begin, int length, DataLoader loader)
{
/****
boolean sendNow = false;
// are there any cases where we should?
@ -447,6 +448,7 @@ class PeerConnectionOut implements Runnable
sendPiece(piece, begin, length, bytes);
return;
}
****/
// queue a fake message... set everything up,
// except save the PeerState instead of the bytes.
@ -492,7 +494,7 @@ class PeerConnectionOut implements Runnable
{
Message m = (Message)it.next();
if (m.type == Message.REQUEST
&& m.piece == req.piece
&& m.piece == req.getPiece()
&& m.begin == req.off
&& m.length == req.len)
it.remove();
@ -502,7 +504,7 @@ class PeerConnectionOut implements Runnable
// Always send, just to be sure it it is really canceled.
Message m = new Message();
m.type = Message.CANCEL;
m.piece = req.piece;
m.piece = req.getPiece();
m.begin = req.off;
m.length = req.len;
addMessage(m);

View File

@ -22,6 +22,7 @@ package org.klomp.snark;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
@ -34,6 +35,7 @@ import java.util.Set;
import java.util.concurrent.LinkedBlockingQueue;
import net.i2p.I2PAppContext;
import net.i2p.data.ByteArray;
import net.i2p.data.DataHelper;
import net.i2p.data.Destination;
import net.i2p.util.ConcurrentHashSet;
@ -48,7 +50,7 @@ import org.klomp.snark.dht.DHT;
/**
* Coordinates what peer does what.
*/
public class PeerCoordinator implements PeerListener
class PeerCoordinator implements PeerListener
{
private final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(PeerCoordinator.class);
@ -68,6 +70,7 @@ public class PeerCoordinator implements PeerListener
// package local for access by CheckDownLoadersTask
final static long CHECK_PERIOD = 40*1000; // 40 seconds
final static int MAX_UPLOADERS = 6;
public static final long MAX_INACTIVE = 8*60*1000;
/**
* Approximation of the number of current uploaders.
@ -116,15 +119,21 @@ public class PeerCoordinator implements PeerListener
*/
private final List<Piece> wantedPieces;
/** partial pieces - lock by synching on wantedPieces */
/** The total number of bytes in wantedPieces, or -1 if not yet known.
* Sync on wantedPieces.
* @since 0.9.1
*/
private long wantedBytes;
/** partial pieces - lock by synching on wantedPieces - TODO store Requests, not PartialPieces */
private final List<PartialPiece> partialPieces;
private boolean halted = false;
private volatile boolean halted;
private final MagnetState magnetState;
private final CoordinatorListener listener;
private final I2PSnarkUtil _util;
private static final Random _random = I2PAppContext.getGlobalContext().random();
private final Random _random;
/**
* @param metainfo null if in magnet mode
@ -134,6 +143,7 @@ public class PeerCoordinator implements PeerListener
CoordinatorListener listener, Snark torrent)
{
_util = util;
_random = util.getContext().random();
this.id = id;
this.infohash = infohash;
this.metainfo = metainfo;
@ -151,7 +161,7 @@ public class PeerCoordinator implements PeerListener
// Install a timer to check the uploaders.
// Randomize the first start time so multiple tasks are spread out,
// this will help the behavior with global limits
timer = new CheckEvent(new PeerCheckerTask(_util, this));
timer = new CheckEvent(_util.getContext(), new PeerCheckerTask(_util, this));
timer.schedule((CHECK_PERIOD / 2) + _random.nextInt((int) CHECK_PERIOD));
}
@ -161,8 +171,8 @@ public class PeerCoordinator implements PeerListener
*/
private static class CheckEvent extends SimpleTimer2.TimedEvent {
private final PeerCheckerTask _task;
public CheckEvent(PeerCheckerTask task) {
super(SimpleTimer2.getInstance());
public CheckEvent(I2PAppContext ctx, PeerCheckerTask task) {
super(ctx.simpleTimer2());
_task = task;
}
public void timeReached() {
@ -171,16 +181,22 @@ public class PeerCoordinator implements PeerListener
}
}
// only called externally from Storage after the double-check fails
/**
* Only called externally from Storage after the double-check fails.
* Sets wantedBytes too.
*/
public void setWantedPieces()
{
if (metainfo == null || storage == null)
if (metainfo == null || storage == null) {
wantedBytes = -1;
return;
}
// Make a list of pieces
synchronized(wantedPieces) {
wantedPieces.clear();
BitField bitfield = storage.getBitField();
int[] pri = storage.getPiecePriorities();
long count = 0;
for (int i = 0; i < metainfo.getPieces(); i++) {
// only add if we don't have and the priority is >= 0
if ((!bitfield.get(i)) &&
@ -189,15 +205,17 @@ public class PeerCoordinator implements PeerListener
if (pri != null)
p.setPriority(pri[i]);
wantedPieces.add(p);
count += metainfo.getPieceLength(i);
}
}
wantedBytes = count;
Collections.shuffle(wantedPieces, _random);
}
}
public Storage getStorage() { return storage; }
// for web page detailed stats
/** for web page detailed stats */
public List<Peer> peerList()
{
return new ArrayList(peers);
@ -233,7 +251,9 @@ public class PeerCoordinator implements PeerListener
}
/**
* Returns how many bytes are still needed to get the complete file.
* Bytes not yet in storage. Does NOT account for skipped files.
* Not exact (does not adjust for last piece size).
* Returns how many bytes are still needed to get the complete torrent.
* @return -1 if in magnet mode
*/
public long getLeft()
@ -244,6 +264,15 @@ public class PeerCoordinator implements PeerListener
return ((long) storage.needed()) * metainfo.getPieceLength(0);
}
/**
* Bytes still wanted. DOES account for skipped files.
* @return exact value. or -1 if no storage yet.
* @since 0.9.1
*/
public long getNeededLength() {
return wantedBytes;
}
/**
* Returns the total number of uploaded bytes of all peers.
*/
@ -330,14 +359,35 @@ public class PeerCoordinator implements PeerListener
return infohash;
}
/**
* Inbound.
* Not halted, peers < max.
* @since 0.9.1
*/
public boolean needPeers()
{
return !halted && peers.size() < getMaxConnections();
}
/**
* Outbound.
* Not halted, peers < max, and need pieces.
* @since 0.9.1
*/
public boolean needOutboundPeers() {
//return wantedBytes != 0 && needPeers();
// minus two to make it a little easier for new peers to get in on large swarms
return wantedBytes != 0 &&
!halted &&
peers.size() < getMaxConnections() - 2 &&
(storage == null || !storage.isChecking());
}
/**
* Reduce max if huge pieces to keep from ooming when leeching
* @return 512K: 16; 1M: 11; 2M: 6
* Formerly used to
* reduce max if huge pieces to keep from ooming when leeching
* but now we don't
* @return usually 16
*/
private int getMaxConnections() {
if (metainfo == null)
@ -347,13 +397,14 @@ public class PeerCoordinator implements PeerListener
return 4;
if (pieces <= 5)
return 6;
int size = metainfo.getPieceLength(0);
//int size = metainfo.getPieceLength(0);
int max = _util.getMaxConnections();
if (size <= 512*1024 || completed())
// Now that we use temp files, no memory concern
//if (size <= 512*1024 || completed())
return max;
if (size <= 1024*1024)
return (max + max + 2) / 3;
return (max + 2) / 3;
//if (size <= 1024*1024)
// return (max + max + 2) / 3;
//return (max + 2) / 3;
}
public boolean halted() { return halted; }
@ -380,10 +431,33 @@ public class PeerCoordinator implements PeerListener
}
// delete any saved orphan partial piece
synchronized (partialPieces) {
for (PartialPiece pp : partialPieces) {
pp.release();
}
partialPieces.clear();
}
}
/**
* @since 0.9.1
*/
public void restart() {
halted = false;
synchronized (uploaded_old) {
Arrays.fill(uploaded_old, 0);
}
synchronized (downloaded_old) {
Arrays.fill(downloaded_old, 0);
}
// failsafe
synchronized(wantedPieces) {
for (Piece pc : wantedPieces) {
pc.clear();
}
}
timer.schedule((CHECK_PERIOD / 2) + _random.nextInt((int) CHECK_PERIOD));
}
public void connected(Peer peer)
{
if (halted)
@ -396,7 +470,7 @@ public class PeerCoordinator implements PeerListener
synchronized(peers)
{
Peer old = peerIDInList(peer.getPeerID(), peers);
if ( (old != null) && (old.getInactiveTime() > 8*60*1000) ) {
if ( (old != null) && (old.getInactiveTime() > MAX_INACTIVE) ) {
// idle for 8 minutes, kill the old con (32KB/8min = 68B/sec minimum for one block)
if (_log.shouldLog(Log.WARN))
_log.warn("Remomving old peer: " + peer + ": " + old + ", inactive for " + old.getInactiveTime());
@ -444,8 +518,8 @@ public class PeerCoordinator implements PeerListener
peerCount = peers.size();
unchokePeer();
if (listener != null)
listener.peerChange(this, peer);
//if (listener != null)
// listener.peerChange(this, peer);
}
}
if (toDisconnect != null) {
@ -468,7 +542,10 @@ public class PeerCoordinator implements PeerListener
return null;
}
// returns true if actual attempt to add peer occurs
/**
* Add peer (inbound or outbound)
* @return true if actual attempt to add peer occurs
*/
public boolean addPeer(final Peer peer)
{
if (halted)
@ -487,7 +564,7 @@ public class PeerCoordinator implements PeerListener
need_more = (!peer.isConnected()) && peersize < getMaxConnections();
// Check if we already have this peer before we build the connection
Peer old = peerIDInList(peer.getPeerID(), peers);
need_more = need_more && ((old == null) || (old.getInactiveTime() > 8*60*1000));
need_more = need_more && ((old == null) || (old.getInactiveTime() > MAX_INACTIVE));
}
if (need_more)
@ -578,13 +655,18 @@ public class PeerCoordinator implements PeerListener
*/
public boolean gotHave(Peer peer, int piece)
{
if (listener != null)
listener.peerChange(this, peer);
//if (listener != null)
// listener.peerChange(this, peer);
synchronized(wantedPieces)
{
return wantedPieces.contains(new Piece(piece));
}
synchronized(wantedPieces) {
for (Piece pc : wantedPieces) {
if (pc.getId() == piece) {
pc.addPeer(peer);
return true;
}
}
return false;
}
}
/**
@ -593,23 +675,20 @@ public class PeerCoordinator implements PeerListener
*/
public boolean gotBitField(Peer peer, BitField bitfield)
{
if (listener != null)
listener.peerChange(this, peer);
//if (listener != null)
// listener.peerChange(this, peer);
synchronized(wantedPieces)
{
Iterator<Piece> it = wantedPieces.iterator();
while (it.hasNext())
{
Piece p = it.next();
boolean rv = false;
synchronized(wantedPieces) {
for (Piece p : wantedPieces) {
int i = p.getId();
if (bitfield.get(i)) {
p.addPeer(peer);
return true;
rv = true;
}
}
}
return false;
}
}
return rv;
}
/**
@ -630,22 +709,23 @@ public class PeerCoordinator implements PeerListener
* -1 if none of the given pieces are wanted.
*/
public int wantPiece(Peer peer, BitField havePieces) {
return wantPiece(peer, havePieces, true);
Piece pc = wantPiece(peer, havePieces, true);
return pc != null ? pc.getId() : -1;
}
/**
* Returns one of pieces in the given BitField that is still wanted or
* -1 if none of the given pieces are wanted.
* null if none of the given pieces are wanted.
*
* @param record if true, actually record in our data structures that we gave the
* request to this peer. If false, do not update the data structures.
* @since 0.8.2
*/
private int wantPiece(Peer peer, BitField havePieces, boolean record) {
private Piece wantPiece(Peer peer, BitField havePieces, boolean record) {
if (halted) {
if (_log.shouldLog(Log.WARN))
_log.warn("We don't want anything from the peer, as we are halted! peer=" + peer);
return -1;
return null;
}
Piece piece = null;
@ -664,7 +744,19 @@ public class PeerCoordinator implements PeerListener
break;
if (havePieces.get(p.getId()) && !p.isRequested())
{
piece = p;
// never ever choose one that's in partialPieces, or we
// will create a second one and leak
boolean hasPartial = false;
for (PartialPiece pp : partialPieces) {
if (pp.getPiece() == p.getId()) {
if (_log.shouldLog(Log.INFO))
_log.info("wantPiece() skipping partial for " + peer + ": piece = " + pp);
hasPartial = true;
break;
}
}
if (!hasPartial)
piece = p;
}
else if (p.isRequested())
{
@ -679,8 +771,12 @@ public class PeerCoordinator implements PeerListener
// AND if there are almost no wanted pieces left (real end game).
// If we do end game all the time, we generate lots of extra traffic
// when the seeder is super-slow and all the peers are "caught up"
if (wantedSize > END_GAME_THRESHOLD)
return -1; // nothing to request and not in end game
if (wantedSize > END_GAME_THRESHOLD) {
if (_log.shouldLog(Log.INFO))
_log.info("Nothing to request, " + requested.size() + " being requested and " +
wantedSize + " still wanted");
return null; // nothing to request and not in end game
}
// let's not all get on the same piece
// Even better would be to sort by number of requests
if (record)
@ -704,7 +800,7 @@ public class PeerCoordinator implements PeerListener
_log.warn("nothing to even rerequest from " + peer + ": requested = " + requested);
// _log.warn("nothing to even rerequest from " + peer + ": requested = " + requested
// + " wanted = " + wantedPieces + " peerHas = " + havePieces);
return -1; //If we still can't find a piece we want, so be it.
return null; //If we still can't find a piece we want, so be it.
} else {
// Should be a lot smarter here -
// share blocks rather than starting from 0 with each peer.
@ -716,10 +812,11 @@ public class PeerCoordinator implements PeerListener
}
if (record) {
if (_log.shouldLog(Log.INFO))
_log.info(peer + " is now requesting: piece " + piece + " priority " + piece.getPriority());
_log.info("Now requesting from " + peer + ": piece " + piece + " priority " + piece.getPriority() +
" peers " + piece.getPeerCount() + '/' + peers.size());
piece.setRequested(peer, true);
}
return piece.getId();
return piece;
} // synch
}
@ -736,6 +833,7 @@ public class PeerCoordinator implements PeerListener
_log.debug("Updated piece priorities called but no priorities to set?");
return;
}
List<Piece> toCancel = new ArrayList();
synchronized(wantedPieces) {
// Add incomplete and previously unwanted pieces to the list
// Temp to avoid O(n**2)
@ -749,6 +847,7 @@ public class PeerCoordinator implements PeerListener
if (!want.get(i)) {
Piece piece = new Piece(i);
wantedPieces.add(piece);
wantedBytes += metainfo.getPieceLength(i);
// As connections are already up, new Pieces will
// not have their PeerID list populated, so do that.
for (Peer p : peers) {
@ -770,23 +869,32 @@ public class PeerCoordinator implements PeerListener
p.setPriority(priority);
} else {
iter.remove();
// cancel all peers
for (Peer peer : peers) {
peer.cancel(p.getId());
}
toCancel.add(p);
wantedBytes -= metainfo.getPieceLength(p.getId());
}
}
if (_log.shouldLog(Log.DEBUG))
_log.debug("Updated piece priorities, now wanted: " + wantedPieces);
// if we added pieces, they will be in-order unless we shuffle
Collections.shuffle(wantedPieces, _random);
}
// update request queues, in case we added wanted pieces
// and we were previously uninterested
for (Peer peer : peers) {
peer.request();
// cancel outside of wantedPieces lock to avoid deadlocks
if (!toCancel.isEmpty()) {
// cancel all peers
for (Peer peer : peers) {
for (Piece p : toCancel) {
peer.cancel(p.getId());
}
}
}
// ditto, avoid deadlocks
// update request queues, in case we added wanted pieces
// and we were previously uninterested
for (Peer peer : peers) {
peer.request();
}
}
/**
@ -795,7 +903,7 @@ public class PeerCoordinator implements PeerListener
*
* @throws RuntimeException on IOE getting the data
*/
public byte[] gotRequest(Peer peer, int piece, int off, int len)
public ByteArray gotRequest(Peer peer, int piece, int off, int len)
{
if (halted)
return null;
@ -811,8 +919,10 @@ public class PeerCoordinator implements PeerListener
snark.stopTorrent();
String msg = "Error reading the storage (piece " + piece + ") for " + metainfo.getName() + ": " + ioe;
_log.error(msg, ioe);
SnarkManager.instance().addMessage(msg);
SnarkManager.instance().addMessage("Fatal storage error: Stopping torrent " + metainfo.getName());
if (listener != null) {
listener.addMessage(msg);
listener.addMessage("Fatal storage error: Stopping torrent " + metainfo.getName());
}
throw new RuntimeException(msg, ioe);
}
}
@ -824,8 +934,8 @@ public class PeerCoordinator implements PeerListener
{
uploaded += size;
if (listener != null)
listener.peerChange(this, peer);
//if (listener != null)
// listener.peerChange(this, peer);
}
/**
@ -835,8 +945,8 @@ public class PeerCoordinator implements PeerListener
{
downloaded += size;
if (listener != null)
listener.peerChange(this, peer);
//if (listener != null)
// listener.peerChange(this, peer);
}
/**
@ -846,14 +956,13 @@ public class PeerCoordinator implements PeerListener
*
* @throws RuntimeException on IOE saving the piece
*/
public boolean gotPiece(Peer peer, int piece, byte[] bs)
public boolean gotPiece(Peer peer, PartialPiece pp)
{
if (metainfo == null || storage == null)
if (metainfo == null || storage == null || storage.isChecking() || halted) {
pp.release();
return true;
if (halted) {
_log.info("Got while-halted piece " + piece + "/" + metainfo.getPieces() +" from " + peer + " for " + metainfo.getName());
return true; // We don't actually care anymore.
}
int piece = pp.getPiece();
synchronized(wantedPieces)
{
@ -866,13 +975,16 @@ public class PeerCoordinator implements PeerListener
// Assume we got a good piece, we don't really care anymore.
// Well, this could be caused by a change in priorities, so
// only return true if we already have it, otherwise might as well keep it.
if (storage.getBitField().get(piece))
if (storage.getBitField().get(piece)) {
pp.release();
return true;
}
}
try
{
if (storage.putPiece(piece, bs))
// this takes forever if complete, as it rechecks
if (storage.putPiece(pp))
{
if (_log.shouldLog(Log.INFO))
_log.info("Got valid piece " + piece + "/" + metainfo.getPieces() +" from " + peer + " for " + metainfo.getName());
@ -890,38 +1002,51 @@ public class PeerCoordinator implements PeerListener
snark.stopTorrent();
String msg = "Error writing storage (piece " + piece + ") for " + metainfo.getName() + ": " + ioe;
_log.error(msg, ioe);
SnarkManager.instance().addMessage(msg);
SnarkManager.instance().addMessage("Fatal storage error: Stopping torrent " + metainfo.getName());
if (listener != null) {
listener.addMessage(msg);
listener.addMessage("Fatal storage error: Stopping torrent " + metainfo.getName());
}
throw new RuntimeException(msg, ioe);
}
wantedPieces.remove(p);
wantedBytes -= metainfo.getPieceLength(p.getId());
}
// just in case
removePartialPiece(piece);
boolean done = wantedBytes <= 0;
// Announce to the world we have it!
// Disconnect from other seeders when we get the last piece
List<Peer> toDisconnect = new ArrayList();
Iterator<Peer> it = peers.iterator();
while (it.hasNext())
{
Peer p = it.next();
List<Peer> toDisconnect = done ? new ArrayList() : null;
for (Peer p : peers) {
if (p.isConnected())
{
if (completed() && p.isCompleted())
if (done && p.isCompleted())
toDisconnect.add(p);
else
p.have(piece);
}
}
it = toDisconnect.iterator();
while (it.hasNext())
{
Peer p = it.next();
}
if (done) {
for (Peer p : toDisconnect) {
p.disconnect(true);
}
}
// put msg on the console if partial, since Storage won't do it
if (!completed())
snark.storageCompleted(storage);
synchronized (partialPieces) {
for (PartialPiece ppp : partialPieces) {
ppp.release();
}
partialPieces.clear();
}
}
return true;
}
@ -931,8 +1056,8 @@ public class PeerCoordinator implements PeerListener
if (_log.shouldLog(Log.INFO))
_log.info("Got choke(" + choke + "): " + peer);
if (listener != null)
listener.peerChange(this, peer);
//if (listener != null)
// listener.peerChange(this, peer);
}
public void gotInterest(Peer peer, boolean interest)
@ -951,8 +1076,8 @@ public class PeerCoordinator implements PeerListener
}
}
if (listener != null)
listener.peerChange(this, peer);
//if (listener != null)
// listener.peerChange(this, peer);
}
public void disconnected(Peer peer)
@ -972,18 +1097,18 @@ public class PeerCoordinator implements PeerListener
peerCount = peers.size();
}
if (listener != null)
listener.peerChange(this, peer);
//if (listener != null)
// listener.peerChange(this, peer);
}
/** Called when a peer is removed, to prevent it from being used in
* rarest-first calculations.
*/
public void removePeerFromPieces(Peer peer) {
private void removePeerFromPieces(Peer peer) {
synchronized(wantedPieces) {
for(Iterator<Piece> iter = wantedPieces.iterator(); iter.hasNext(); ) {
Piece piece = iter.next();
for (Piece piece : wantedPieces) {
piece.removePeer(peer);
piece.setRequested(peer, false);
}
}
}
@ -998,17 +1123,24 @@ public class PeerCoordinator implements PeerListener
* Also mark the piece unrequested if this peer was the only one.
*
* @param peer partials, must include the zero-offset (empty) ones too
* No dup pieces, piece.setDownloaded() must be set
* @since 0.8.2
*/
public void savePartialPieces(Peer peer, List<PartialPiece> partials)
public void savePartialPieces(Peer peer, List<Request> partials)
{
if (halted)
return;
if (_log.shouldLog(Log.INFO))
_log.info("Partials received from " + peer + ": " + partials);
if (halted || completed()) {
for (Request req : partials) {
PartialPiece pp = req.getPartialPiece();
pp.release();
}
return;
}
synchronized(wantedPieces) {
for (PartialPiece pp : partials) {
if (pp.getDownloaded() > 0) {
for (Request req : partials) {
PartialPiece pp = req.getPartialPiece();
if (req.off > 0) {
// PartialPiece.equals() only compares piece number, which is what we want
int idx = partialPieces.indexOf(pp);
if (idx < 0) {
@ -1017,10 +1149,12 @@ public class PeerCoordinator implements PeerListener
_log.info("Saving orphaned partial piece (new) " + pp);
} else if (idx >= 0 && pp.getDownloaded() > partialPieces.get(idx).getDownloaded()) {
// replace what's there now
partialPieces.get(idx).release();
partialPieces.set(idx, pp);
if (_log.shouldLog(Log.INFO))
_log.info("Saving orphaned partial piece (bigger) " + pp);
} else {
pp.release();
if (_log.shouldLog(Log.INFO))
_log.info("Discarding partial piece (not bigger)" + pp);
}
@ -1029,10 +1163,14 @@ public class PeerCoordinator implements PeerListener
// sorts by remaining bytes, least first
Collections.sort(partialPieces);
PartialPiece gone = partialPieces.remove(max);
gone.release();
if (_log.shouldLog(Log.INFO))
_log.info("Discarding orphaned partial piece (list full)" + gone);
}
} // else drop the empty partial piece
} else {
// drop the empty partial piece
pp.release();
}
// synchs on wantedPieces...
markUnrequested(peer, pp.getPiece());
}
@ -1051,6 +1189,8 @@ public class PeerCoordinator implements PeerListener
public PartialPiece getPartialPiece(Peer peer, BitField havePieces) {
if (metainfo == null)
return null;
if (storage != null && storage.isChecking())
return null;
synchronized(wantedPieces) {
// sorts by remaining bytes, least first
Collections.sort(partialPieces);
@ -1058,10 +1198,31 @@ public class PeerCoordinator implements PeerListener
PartialPiece pp = iter.next();
int savedPiece = pp.getPiece();
if (havePieces.get(savedPiece)) {
iter.remove();
// this is just a double-check, it should be in there
boolean skipped = false;
for(Piece piece : wantedPieces) {
if (piece.getId() == savedPiece) {
if (peer.isCompleted() && piece.getPeerCount() > 1) {
// Try to preserve rarest-first
// by not requesting a partial piece that non-seeders also have
// from a seeder
boolean nonSeeds = false;
for (Peer pr : peers) {
PeerState state = pr.state;
if (state == null) continue;
BitField bf = state.bitfield;
if (bf == null) continue;
if (bf.get(savedPiece) && !pr.isCompleted()) {
nonSeeds = true;
break;
}
}
if (nonSeeds) {
skipped = true;
break;
}
}
iter.remove();
piece.setRequested(peer, true);
if (_log.shouldLog(Log.INFO)) {
_log.info("Restoring orphaned partial piece " + pp +
@ -1070,8 +1231,12 @@ public class PeerCoordinator implements PeerListener
return pp;
}
}
if (_log.shouldLog(Log.WARN))
_log.warn("Partial piece " + pp + " NOT in wantedPieces??");
if (_log.shouldLog(Log.WARN)) {
if (skipped)
_log.warn("Partial piece " + pp + " with multiple peers skipped for seeder");
else
_log.warn("Partial piece " + pp + " NOT in wantedPieces??");
}
}
}
if (_log.shouldLog(Log.WARN) && !partialPieces.isEmpty())
@ -1079,14 +1244,9 @@ public class PeerCoordinator implements PeerListener
}
// ...and this section turns this into the general move-requests-around code!
// Temporary? So PeerState never calls wantPiece() directly for now...
int piece = wantPiece(peer, havePieces);
if (piece >= 0) {
try {
return new PartialPiece(piece, metainfo.getPieceLength(piece));
} catch (OutOfMemoryError oom) {
if (_log.shouldLog(Log.WARN))
_log.warn("OOM creating new partial piece");
}
Piece piece = wantPiece(peer, havePieces, true);
if (piece != null) {
return new PartialPiece(piece, metainfo.getPieceLength(piece.getId()), _util.getTempDir());
}
if (_log.shouldLog(Log.DEBUG))
_log.debug("We have no partial piece to return");
@ -1121,7 +1281,7 @@ public class PeerCoordinator implements PeerListener
}
}
}
return wantPiece(peer, havePieces, false) >= 0;
return wantPiece(peer, havePieces, false) != null;
}
/**
@ -1135,6 +1295,7 @@ public class PeerCoordinator implements PeerListener
PartialPiece pp = iter.next();
if (pp.getPiece() == piece) {
iter.remove();
pp.release();
// there should be only one but keep going to be sure
}
}
@ -1176,6 +1337,7 @@ public class PeerCoordinator implements PeerListener
}
} else if (id == ExtensionHandler.ID_HANDSHAKE) {
sendPeers(peer);
sendDHT(peer);
}
}
@ -1186,6 +1348,8 @@ public class PeerCoordinator implements PeerListener
* @since 0.8.4
*/
void sendPeers(Peer peer) {
if (metainfo != null && metainfo.isPrivate())
return;
Map<String, BEValue> handshake = peer.getHandshakeMap();
if (handshake == null)
return;
@ -1202,6 +1366,26 @@ public class PeerCoordinator implements PeerListener
} catch (InvalidBEncodingException ibee) {}
}
/**
* Send a DHT message to the peer, if we both support DHT.
* @since DHT
*/
void sendDHT(Peer peer) {
DHT dht = _util.getDHT();
if (dht == null)
return;
Map<String, BEValue> handshake = peer.getHandshakeMap();
if (handshake == null)
return;
BEValue bev = handshake.get("m");
if (bev == null)
return;
try {
if (bev.getMap().get(ExtensionHandler.TYPE_DHT) != null)
ExtensionHandler.sendDHT(peer, dht.getPort(), dht.getRPort());
} catch (InvalidBEncodingException ibee) {}
}
/**
* Sets the storage after transition out of magnet mode
* Snark calls this after we call gotMetaInfo()
@ -1219,20 +1403,23 @@ public class PeerCoordinator implements PeerListener
/**
* PeerListener callback
* Tell the DHT to ping it, this will get back the node info
* @param rport must be port + 1
* @since 0.8.4
*/
public void gotPort(Peer peer, int port) {
public void gotPort(Peer peer, int port, int rport) {
DHT dht = _util.getDHT();
if (dht != null)
if (dht != null &&
port > 0 && port < 65535 && rport == port + 1)
dht.ping(peer.getDestination(), port);
}
/**
* Get peers from PEX -
* PeerListener callback
* @since 0.8.4
*/
public void gotPeers(Peer peer, List<PeerID> peers) {
if (completed() || !needPeers())
if (!needOutboundPeers())
return;
Destination myDest = _util.getMyDestination();
if (myDest == null)
@ -1252,6 +1439,7 @@ public class PeerCoordinator implements PeerListener
/**
* Called by TrackerClient
* @return the Set itself, modifiable, not a copy, caller should clear()
* @since 0.8.4
*/
Set<PeerID> getPEXPeers() {
@ -1294,5 +1482,13 @@ public class PeerCoordinator implements PeerListener
return listener.overUpBWLimit(total * 1000 / CHECK_PERIOD);
return false;
}
/**
* Convenience
* @since 0.9.2
*/
public I2PSnarkUtil getUtil() {
return _util;
}
}

View File

@ -1,9 +1,10 @@
package org.klomp.snark;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.i2p.crypto.SHA1Hash;
/**
* Hmm, any guesses as to what this is? Used by the multitorrent functionality
@ -11,27 +12,29 @@ import java.util.Set;
* Each PeerCoordinator is added to the set from within the Snark (and removed
* from it there too)
*/
public class PeerCoordinatorSet {
private final Set _coordinators;
class PeerCoordinatorSet implements Iterable<PeerCoordinator> {
private final Map<SHA1Hash, PeerCoordinator> _coordinators;
public PeerCoordinatorSet() {
_coordinators = new HashSet();
_coordinators = new ConcurrentHashMap();
}
public Iterator iterator() {
synchronized (_coordinators) {
return new ArrayList(_coordinators).iterator();
}
public Iterator<PeerCoordinator> iterator() {
return _coordinators.values().iterator();
}
public void add(PeerCoordinator coordinator) {
synchronized (_coordinators) {
_coordinators.add(coordinator);
}
_coordinators.put(new SHA1Hash(coordinator.getInfoHash()), coordinator);
}
public void remove(PeerCoordinator coordinator) {
synchronized (_coordinators) {
_coordinators.remove(coordinator);
}
_coordinators.remove(new SHA1Hash(coordinator.getInfoHash()));
}
/**
* @since 0.9.2
*/
public PeerCoordinator get(byte[] infoHash) {
return _coordinators.get(new SHA1Hash(infoHash));
}
}

View File

@ -43,7 +43,7 @@ import org.klomp.snark.bencode.InvalidBEncodingException;
* and the PeerID is not required.
* Equality is now determined solely by the dest hash.
*/
public class PeerID implements Comparable
class PeerID implements Comparable
{
private byte[] id;
private Destination address;
@ -52,6 +52,7 @@ public class PeerID implements Comparable
/** whether we have tried to get the dest from the hash - only do once */
private boolean triedDestLookup;
private final int hash;
private final I2PSnarkUtil util;
public PeerID(byte[] id, Destination address)
{
@ -60,6 +61,7 @@ public class PeerID implements Comparable
this.port = 6881;
this.destHash = address.calculateHash().getData();
hash = calculateHash();
util = null;
}
/**
@ -93,13 +95,15 @@ public class PeerID implements Comparable
port = 6881;
this.destHash = address.calculateHash().getData();
hash = calculateHash();
util = null;
}
/**
* Creates a PeerID from a destHash
* @param util for eventual destination lookup
* @since 0.8.1
*/
public PeerID(byte[] dest_hash) throws InvalidBEncodingException
public PeerID(byte[] dest_hash, I2PSnarkUtil util) throws InvalidBEncodingException
{
// id and address remain null
port = 6881;
@ -107,6 +111,7 @@ public class PeerID implements Comparable
throw new InvalidBEncodingException("bad hash length");
destHash = dest_hash;
hash = DataHelper.hashCode(dest_hash);
this.util = util;
}
public byte[] getID()
@ -131,7 +136,7 @@ public class PeerID implements Comparable
{
if (address == null && destHash != null && !triedDestLookup) {
String b32 = Base32.encode(destHash) + ".b32.i2p";
address = I2PAppContext.getGlobalContext().namingService().lookup(b32);
address = util.getDestination(b32);
triedDestLookup = true;
}
return address;

View File

@ -22,6 +22,8 @@ package org.klomp.snark;
import java.util.List;
import net.i2p.data.ByteArray;
/**
* Listener for Peer events.
*/
@ -95,12 +97,11 @@ interface PeerListener
* will be closed.
*
* @param peer the Peer that got the piece.
* @param piece the piece number received.
* @param bs the byte array containing the piece.
* @param piece the piece received.
*
* @return true when the bytes represent the piece, false otherwise.
*/
boolean gotPiece(Peer peer, int piece, byte[] bs);
boolean gotPiece(Peer peer, PartialPiece piece);
/**
* Called when the peer wants (part of) a piece from us. Only called
@ -115,7 +116,7 @@ interface PeerListener
* @return a byte array containing the piece or null when the piece
* is not available (which is a protocol error).
*/
byte[] gotRequest(Peer peer, int piece, int off, int len);
ByteArray gotRequest(Peer peer, int piece, int off, int len);
/**
* Called when a (partial) piece has been downloaded from the peer.
@ -167,7 +168,7 @@ interface PeerListener
* @param peer the peer
* @since 0.8.2
*/
void savePartialPieces(Peer peer, List<PartialPiece> pcs);
void savePartialPieces(Peer peer, List<Request> pcs);
/**
* Called when a peer has connected and there may be a partially
@ -191,13 +192,14 @@ interface PeerListener
void gotExtension(Peer peer, int id, byte[] bs);
/**
* Called when a port message is received.
* Called when a DHT port message is received.
*
* @param peer the Peer that got the message.
* @param port the port
* @param port the query port
* @param rport the response port
* @since 0.8.4
*/
void gotPort(Peer peer, int port);
void gotPort(Peer peer, int port, int rport);
/**
* Called when peers are received via PEX
@ -207,4 +209,10 @@ interface PeerListener
* @since 0.8.4
*/
void gotPeers(Peer peer, List<PeerID> pIDList);
/**
* Convenience
* @since 0.9.2
*/
public I2PSnarkUtil getUtil();
}

View File

@ -27,6 +27,8 @@ import net.i2p.data.DataHelper;
/**
* TimerTask that monitors the peers and total up/download speeds.
* Works together with the main Snark class to report periodical statistics.
*
* @deprecated unused, for command line client only, commented out in Snark.java
*/
class PeerMonitorTask implements Runnable
{
@ -45,6 +47,7 @@ class PeerMonitorTask implements Runnable
public void run()
{
/*****
// Get some statistics
int peers = 0;
int uploaders = 0;
@ -117,5 +120,6 @@ class PeerMonitorTask implements Runnable
lastDownloaded = downloaded;
lastUploaded = uploaded;
****/
}
}

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