Compare commits

...

1591 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
90a70eb245 dont create messages.mo file 2011-10-11 14:04:51 +00:00
zzz
0898b8ee66 fix TCP default 2011-10-11 13:03:46 +00:00
zzz
ab4de7b392 0.8.9 2011-10-10 19:57:56 +00:00
zzz
f39e201067 * Lower max netdb RI expiration again
* Increase default max tunnels
  * Cleanups after review
  * Exorcism (ticket #476)
2011-10-10 19:22:03 +00:00
c884cfe6f6 Debian: Add Polish debconf translation from Transifex 2011-10-08 15:48:01 +00:00
02219f7376 merge of '0cba2bb826dad461c044d43aa12e6e3ad69f6ce1'
and 'ae0b80d9420ce8dcb103095523b98072eada7fa0'
2011-10-08 15:20:33 +00:00
zzz
834054958c Black flags
created by me, public domain
2011-10-08 14:44:56 +00:00
66ba367530 Debian: Disabling build-dep on tor-geoipdb (since our geoipdb is more current) 2011-10-08 10:40:15 +00:00
7652c19699 Abort if bash is not being used 2011-10-07 21:13:39 +00:00
39b741fae1 Add partial Ukrainian debconf translation from Transifex 2011-10-07 19:17:13 +00:00
9493bedb0a update email address and package version in debconf PO files 2011-10-07 19:15:58 +00:00
1647da0abd transifex: enable Ukrainian translation for debconf 2011-10-07 19:13:38 +00:00
921591e61f merge of '126e1ac0cf5610a8cd45831d729d531b8c1d8845'
and 'f9376186d4f489e9726b6750637385b0450f8957'
2011-10-07 18:52:37 +00:00
dec5af96b4 Update russian translations 2011-10-07 17:40:27 +00:00
zzz
39ba081384 * Reseed:
- Restore ovh reseeds, thx mathiasdm
  * Tunnels:
    - For expl. tunnels, fall back to high cap sooner
    - Tweak build rejections for class N
2011-10-07 15:44:06 +00:00
c270e147c1 translation updates from Transifex
* Translation updates from Transifex:
    - I2PSnark: de, es, and pt
    - I2PTunnel: de and es
    - RouterConsole: de and es
    - SusiDNS: de and es
    - SusiMail: de and es
2011-10-07 14:14:36 +00:00
98bfadb763 Update geoip (-28rc)
GeoIP update based on Maxmind GeoLite Country database from 2011-10-07.
2011-10-07 13:26:43 +00:00
bae011da1d Re-adding MessageChannel to I2PSocketFull 2011-10-07 01:26:29 +00:00
6d621d5eb9 Checking in MessageChannel, nothing to see here moving on... 2011-10-07 01:26:10 +00:00
zzz
fa1c18ce2d * Add https reseed thx h2ik 2011-10-07 00:50:45 +00:00
f779993008 Add diftracker.i2p to I2PSnark and hosts.txt 2011-10-06 21:42:38 +00:00
zzz
73c195eb63 -26 2011-10-06 19:05:15 +00:00
zzz
7748147630 fix for final in super 2011-10-06 16:48:48 +00:00
zzz
e193d8964f increase default SSU conn limit 2011-10-06 16:44:33 +00:00
zzz
de71286f3c * Throttle: Increase max message delay 2011-10-06 16:08:14 +00:00
zzz
0f094da348 * RepublishLeaseSetJob:
- Out-of-order JobQueue 3nd try to fix
    - Lower timeouts
2011-10-06 16:07:51 +00:00
zzz
0c3f84c2da * Reseed:
- Update host lists
    - Switch back to https by default
2011-10-06 16:06:52 +00:00
zzz
2332ac2a69 * Transport: Add per-style send processing time stat 2011-10-06 16:06:25 +00:00
zzz
a670100ba3 * UDP: Catch address without key sooner 2011-10-05 22:03:33 +00:00
zzz
979825b07f build fix 2011-10-05 22:01:53 +00:00
648ea64b21 Add debconf to transifex 2011-10-03 21:56:16 +00:00
4fdb9084a6 update due to my changes to jbigi scripts 2011-10-03 01:03:45 +00:00
9fbc7aef25 Taking StandardSocket back since an I2PSocket cannot act like a SocketChannel. 2011-10-01 19:45:10 +00:00
3dd79269bc merge of '7d548bccfc01d30a554dbd176d113a9419be2665'
and 'ccb7faa39e604a125e398cc347f1d5d4da6ac230'
2011-10-01 17:29:48 +00:00
d3999991d0 merge of '4f86a13e5f3de7eb4aae8a1f0f3402e46f262ca2'
and 'ecd077c360b4af5597166def49e62d6a82e57937'
2011-10-01 17:28:57 +00:00
00b9864dbf merge of '1ffee552dec6b7d41faffb34cab1771773dc0bcd'
and '528475be65a5b99629fadd09c3d2f42bbc907914'
2011-10-01 17:22:29 +00:00
c76b098fbb move the info panel to the end of the installation
IMHO, having the information panel ("To start I2P, etc.") displayed at the end
of the installation process makes a lot more sense.

Hopefully others agree...
2011-10-01 17:22:10 +00:00
863fb08fa1 Added rudimentary channel support. 2011-10-01 17:21:53 +00:00
f1ae06ab40 merge of 'c5f06d8a1bcc7468b9b73ccc14f6e8be55b69c64'
and 'cf0a3831f7749e70c42ef5fb231319eebdec2206'
2011-09-30 17:43:28 +00:00
zzz
14c305a494 -24 2011-09-30 17:26:10 +00:00
zzz
4c9023f7cb merge of '2eddbf584c44e72288f74d0f19e716e2a49a847f'
and '45a8f320f0562000d9fb5cb009885b921ab79fdf'
2011-09-30 17:24:14 +00:00
4244b048f8 remove executable attribute 2011-09-30 17:20:09 +00:00
6a15d8c790 update notes about compiling the wrapper in x86_64 Windows 2011-09-30 16:52:12 +00:00
zzz
7afa63ce10 add wrapper version 2011-09-30 16:40:23 +00:00
zzz
66391da1f7 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.8) (6b18-1.8.8-0ubuntu1~11.04.1)
    OpenJDK Zero VM (build 14.0-b16, mixed mode)
    Wrapper 3.5.12 GPLv2
    All binaries stripped.
2011-09-30 16:08:49 +00:00
a8746e4780 updates to i2prouter based upon changes from 3.5.9 -> 3.5.12 in tanuki's
src/bin/sh.script.in
2011-09-30 16:02:02 +00:00
zzz
af81681beb shorten shitlist time 2011-09-30 16:01:21 +00:00
2926b1734c stripping wrapper binaries 2011-09-30 15:46:07 +00:00
5d43282188 Remove note about the misc/compat6x port; it is no longer required 2011-09-29 22:50:51 +00:00
b96ee4efa2 wrapper upgrade to 3.5.12 / 23-rc
Upgrading our wrapper to 3.5.12 to fix the upstream wrapper's umask bug. All
binaries are from the delta pack except for Win64, FreeBSD, Linux ARM, and OSX
(See history.txt for more info).
2011-09-29 22:35:18 +00:00
6b0fe83989 merge of '435003672b465687f7fa47e037c7f35fb18f84e2'
and 'a61539431697aa07248b384c791007439c38a167'
2011-09-29 21:34:43 +00:00
dev
1c5a9ed042 Added Swedish version of initialNews. 2011-09-29 15:33:39 +00:00
zzz
efaafea78e * Bandwidth refiller: Reinitialize at restart, avoid
issues from clock skews
2011-09-29 13:19:08 +00:00
zzz
273e940fa1 findbugs 2011-09-28 17:05:38 +00:00
zzz
7bac7aaaf3 save space 2011-09-28 17:05:26 +00:00
zzz
9f430bf117 final 2011-09-28 14:11:54 +00:00
zzz
c7f5178b9c alignment tweak 2011-09-28 14:11:16 +00:00
cb3a8b6eac remove accidental cruft leftover from testing 2011-09-27 21:41:08 +00:00
0406b52c9b Disabling exotrack.i2p; it doesn't look like it's coming back... 2011-09-27 20:22:16 +00:00
b62b668d1a Debian: rework j(cpuid|bigi) patches
Patch reworking needed due to my recent edits to the jcpuid/jbigi scripts
2011-09-27 17:53:25 +00:00
40d3aa9d4c Don't call uname -sr, instead call "uname -s". After all, we don't use the kernel
version...
2011-09-27 08:34:53 +00:00
b0ce258925 jcpuid build scripts:
* merge x64 improvements from mbuild.sh into build.sh
* drop mbuild.sh
* add logic to determine the location of JAVA_HOME if not defined.
* update core/c/mbuild to call jcpuid/build.sh
2011-09-27 08:25:32 +00:00
57b30df4eb enable Russian locale for susimail and upload to Transifex 2011-09-26 21:13:27 +00:00
78a8952f55 Russian translation for susimail 2011-09-26 18:21:41 +00:00
c1558b206f merge of '80e2cfeb00b445ea1b638c1c14373c69b98baa9a'
and 'ec02a6ada1c5c1248468085a7158cd0a00a47461'
2011-09-26 17:03:26 +00:00
f9b9877491 Fix "shebang" 2011-09-26 15:33:12 +00:00
zzz
bbd34be212 javadoc 2011-09-24 21:50:10 +00:00
zzz
cc7a8028d1 * HTTPClient: Fix error page not appearing, broken by
StreamForwarder change
2011-09-24 21:49:19 +00:00
zzz
ce5acb490a add some convenience methods 2011-09-24 21:47:51 +00:00
zzz
4822e47156 more mime types not to compress 2011-09-24 21:46:25 +00:00
zzz
a2c867c224 cleanups 2011-09-24 21:45:52 +00:00
zzz
fd1c8c45a8 cleanup 2011-09-24 21:44:51 +00:00
dev
05a92cd8e6 Changed compability flags for Intel Family-6 Model-11 to not be Pentium M compatible.
Beefed up CPUID.Main ot output more info.
Formatting.
2011-09-24 15:44:22 +00:00
1fe8dbb00e source po files pushed to transifex 2011-09-23 20:23:02 +00:00
24fdc4d75e Update Italian, Spanish, and Swedish translations from Transifex 2011-09-23 20:14:24 +00:00
17b19c9724 merge of '45749cb3c6faddac278c7503b3694d2b1dd252e2'
and '6cd04829204378535f6c3836c26dd1b697c2e2e6'
2011-09-22 00:44:51 +00:00
dev
6e236f753d remove a.netdb.i2p2.de 2011-09-21 22:51:16 +00:00
a45c3336a3 merge of '38aa5e61a00e452e95fd63b1a395757595e6ddc1'
and '7683fcc8ce03e5028e6c0b20ab2e4a2acf5c4707'
2011-09-21 18:26:41 +00:00
dev
57523f11c1 added https://netdb.i2p2.de/ as reseed host 2011-09-21 17:55:49 +00:00
597fc5504d rebase patch due to (my) recent changes in core/c/jbigi/mbuild_jbigi.sh 2011-09-21 13:37:44 +00:00
zzz
3df7ef0366 -20 2011-09-20 12:41:49 +00:00
zzz
6e5c9a3a8e merge of '4f9e4125cd99ad55d386c416b659389a6a85a901'
and 'e68b93db0d4031a11910fd17c01edee5d6cd4a96'
2011-09-20 12:40:18 +00:00
zzz
3d91fac2fd * JobQueue, RepublishLeaseSetJob: Out-of-order JobQueue 3rd try to fix 2011-09-20 12:26:18 +00:00
zzz
aec3976896 * I2PTunnel, NTCP: Catch unchecked exceptions from GNU NIO (ticket # 519) 2011-09-20 04:03:01 +00:00
zzz
8a78de2b8c limit max explore queue 2011-09-20 03:28:16 +00:00
zzz
a139d915bd clogged job queue fix 2nd try 2011-09-20 02:54:53 +00:00
450a5e14ab add more platforums for (open|net)bsd 2011-09-20 01:18:16 +00:00
zzz
e6d44a6199 * I2PTunnelHTTPServer: Don't compress small responses or images 2011-09-19 23:50:25 +00:00
zzz
6630c29071 - Close output stream in StreamForwarder to prevent lost data,
existing bug but made worse by larger pipe
2011-09-19 23:37:49 +00:00
8ee6503e54 allow x86_64 or amd64 for the X86_64 systems 2011-09-19 17:42:26 +00:00
zzz
f186076fb0 * i2ptunnel HTTPResponseOutputStream: Use reusable gunzipper
and a larger pipe for efficiency
2011-09-19 14:13:24 +00:00
zzz
49eeed6ac8 * Crypto: Comment out some main() 2011-09-19 13:48:24 +00:00
zzz
35e89b76ca javadoc 2011-09-19 13:47:27 +00:00
zzz
23e262b0b9 * i2psnark: File allocation cleanup to use less heap 2011-09-19 13:46:52 +00:00
zzz
47d2b80aa5 * ClientMessage: Remove unused MessageReceptionInfo
* RouterContext: Remove unused MessageStateMonitor
2011-09-19 13:44:33 +00:00
8aaf9a1c5e Add OPENBSD_PLATFORMS variable (that I missed in the previous commit) 2011-09-19 12:27:03 +00:00
6760d2a5f4 Add (Net|Open)BSD support, clean-ups 2011-09-19 12:23:43 +00:00
d71b71f2b1 Don't prompt to move the wrapper on NetBSD or OpenBSD. 2011-09-19 12:21:38 +00:00
04785e25b9 document installing as a service 2011-09-19 01:27:48 +00:00
2e1692cf09 Add OpenBSD to NBI and CPUID 2011-09-18 20:16:07 +00:00
e92c23c949 typo fix 2011-09-18 17:04:37 +00:00
f2fe5140e1 Add NetBSD support 2011-09-18 16:59:24 +00:00
2261039a76 NetBSD support 2011-09-18 16:56:10 +00:00
2461b9525c Add NetBSD support to NBI and CPUID 2011-09-18 16:25:13 +00:00
7f6c4faeb5 Add "uninstall" as an alternative option for "remove" 2011-09-18 15:37:31 +00:00
a48ed65b36 the arguments to install_i2p_service_winnt.bat aren't required and in some cases cause the installer to hang 2011-09-17 22:17:03 +00:00
03c24ef14e query the status of the service before doing anything 2011-09-17 22:15:45 +00:00
93d3710f51 Don't show "1 file(s) moved" when moving the temporary wrapper.conf in place. Redirect output to nul. 2011-09-17 22:12:40 +00:00
c7385e5e6a *headdesk* I forget to add the wrapper.pid variable. 2011-09-17 20:26:04 +00:00
b1d7df8a8c remove all *.cmd files (they'll never be used in *NIX) 2011-09-17 15:39:54 +00:00
ff601f9ccc change fix_logfile_path's name 2011-09-17 15:38:33 +00:00
2fc0160c40 fix paths to flags (thanks zzz & sorry zzz) 2011-09-17 15:23:05 +00:00
398d264319 rename script to a more appropriate name 2011-09-17 15:02:55 +00:00
7ce82617dc adjust comment 2011-09-17 15:01:13 +00:00
4e52b9c8d7 fix paths to pid files (setting them to explicitly point to %TEMP%) 2011-09-17 14:58:30 +00:00
zzz
dc04414e9a cleanups, logging, javadoc 2011-09-16 14:49:41 +00:00
zzz
a7f8560acf * JobQueue:
- Add warning to setStartAfter() as queue is no longer
      continuously sorted
    - Fix StartExplorerJob not calling requeue()
    - More pumper cleanups
2011-09-16 14:47:40 +00:00
zzz
217cb1f66d * Reseed:
- Add HTTP proxy authorization support
    - Stub out SSL proxy support
    - Disable i2pbote reseed
  * EepGet: Add some new command line options
2011-09-16 14:45:02 +00:00
zzz
1d17981325 * Console: Home page flag spacing 2011-09-16 14:36:02 +00:00
zzz
ba9754ac59 * Router: Fix router changing client-side tunnel options,
causing original tunnel quantity to not be restored
    (ticket #513)
2011-09-16 14:34:52 +00:00
zzz
9a45ba1873 toString() improvement for debugging 2011-09-16 14:34:29 +00:00
zzz
46481fb733 javadoc fix 2011-09-14 13:52:29 +00:00
zzz
87439e19ca * i2psnark:
- Add refresh time option
    - Add public file permissions option (ticket #501)
    - Fix configuration of tunnel parameters (ticket #524)
    - Allow changing I2CP parameters while tunnel is open
    - Remove duplicated options in I2CP options string
    - Don't open tunnel when saving config
2011-09-14 13:06:03 +00:00
zzz
bd06a44706 * Router: Set permissions on router.ping file 2011-09-14 12:59:53 +00:00
zzz
c54dd79b3a * IRC DCC: Fix conn limit options 2011-09-14 12:59:26 +00:00
zzz
e249b22312 * Console: Verify valid host/IP before saving on net config form 2011-09-14 12:58:46 +00:00
667b6b69b6 refreshing patch due to wrapper.config changes 2011-09-14 01:21:15 +00:00
2fa63f8b30 Explicitly setting the umask in wrapper.config 2011-09-14 01:15:10 +00:00
22cb45ac40 Add explicit "install as a service" support for Debian and its derivatives
The upstream script has support for Ubuntu but not Debian. This change allows
the same methods used for Ubuntu to be used for Debian. This *should* work for
any version of Linux that has Debian in its family tree.
2011-09-13 21:36:41 +00:00
8ddc34da45 Refresh patch
Refresh patch to reflect the changes to the i2prouter script
2011-09-13 10:36:15 +00:00
667e4345a0 Fix "bashisms" in tanuki's script 2011-09-13 01:18:58 +00:00
98c44f1bbd Abort by default if I2P is attempted to be started as root; allow setting
ALLOW_ROOT to override.
2011-09-13 01:16:12 +00:00
b0718f6b55 Also set a trap on signal 2 so that the failure message isn't displayed if I2P
is shutdown while running as a console application.
2011-09-13 00:55:37 +00:00
57afc4cd5d Advise to set RUN_AS_USER when installing as a daemon 2011-09-13 00:09:36 +00:00
3a8a8c4256 -17 (i2prouter script update) 2011-09-13 00:06:44 +00:00
3fe50e1d47 fail gracefully when trying to install as a daemon in Arch Linux 2011-09-12 23:03:52 +00:00
c8395df513 update of the i2prouter script based upon Tanuki's 3.5.9 script
With this check-in comes an update of our i2prouter script based upon the
script src/bin/sh.script.in from the 3.5.9 source tarball of the wrapper.

Some of the benefits of this newer version include:
- logic to determine which wrapper binary to use (32bit VS 64bit) and falling
  back to alternate "bitness." This would be most useful for portable packages.
- support for far more platforms and archs than the 3.1.1 based script (such as
  Solaris, risc, os/390, HP-UX, AIX, mips, ia64, etc.)
- support for installing I2P as a daemon in most UNIX-based environments with
  the command "i2prouter install".  The installed service can be removed with
  "i2prouter remove". With testing this option has been confirmed to work in
  OSX, Fedora, Slackware, Debian, Ubuntu, FreeBSD, and SuSE.  It does not work
  in Arch Linux (yet).
2011-09-12 22:53:57 +00:00
2307fed62c switch to tar'ing the osx installer
When zipping with infozip, executable permissions are left intact. When zip is
called with ant, these permissions are lost. When tarring using ant the
permissions seem to be lost too. Switching to calling tar directly ensures that
the executable permissions aren't lost.
2011-09-12 22:52:03 +00:00
fd2c83f052 Change eepget.bat to be parsed when os=windows
osfamily=windows apparently doesn't work in the parseable section (found when
creating a linux only installer).
2011-09-12 17:23:03 +00:00
zzz
0018ac040a run test scripts at release time 2011-09-12 14:51:30 +00:00
zzz
61831b11dc * i2psnark: Fix inaccuracy in the completed bytes display 2011-09-12 14:03:51 +00:00
zzz
540172117f cleanups and comments 2011-09-12 13:11:57 +00:00
zzz
16640722d6 * Build Executor:
- Limit max parallel builds on really slow machines (ticket #519)
    - Slow down build loop when network is apparently disconnected (ticket #519)
2011-09-12 13:10:43 +00:00
zzz
e0c8eb7640 * NetDB: Disable floodfill at shutdown time if enabled 2011-09-12 13:08:50 +00:00
435bc826d3 Add the path to $I2P to eepget.bat
Allow eepget.bat to be called from any location or copied to any location by
adding the full path to the i2p router.
2011-09-12 10:38:30 +00:00
d084d18cfa Update of Windows service installation/removal scripts
These scripts are based on InstallApp-NT.bat.in and UninstallApp-NT.bat.in from
WRAPPERSRC/src/bin of version 3.5.9 of the wrapper.

Tested in XP and Win7.
2011-09-10 15:54:30 +00:00
690f62b3ba Update i2prouter.bat
This is based on WRAPPERSRC/src/bin/StartApp-NT.bat.in from 3.5.9 of the
wrapper. The i2prouter.bat that we ship doesn't work; this one does. Tested in
XP and Win7.
2011-09-10 15:50:49 +00:00
zzz
3aa7f19530 * TunnelDispatcher: Fix bug in -13 preventing participating
tunnels from being expired and causing high CPU usage
2011-09-09 03:56:59 +00:00
zzz
0a83510690 * Blocklist: Include IP in shitlist reason 2011-09-08 14:20:19 +00:00
zzz
f3521228e9 * Blocklist: Include IP in shitlist reason 2011-09-08 14:10:08 +00:00
zzz
ab38e35bcd * NTCP: Hopefully fix race NPE, thx devzero 2011-09-08 14:08:38 +00:00
zzz
b64eff9bbb * Ministreaming: Drop old classes replaced by streaming
years ago.
2011-09-08 13:56:19 +00:00
zzz
4b989eb092 * JobQueue: Change queue from a HashSet to a TreeSet for more efficiency 2011-09-07 01:38:30 +00:00
zzz
8dc1c4fcf4 * Console: Limit max displayed participating tunnels 2011-09-07 01:36:52 +00:00
zzz
8233c4f9e4 cleanups 2011-09-07 01:35:42 +00:00
zzz
e71d2012ca * TunnelDispatcher: Change participant expire List to a Queue for
efficiency and to remove global lock. Also remove separate
    time List for space savings.
2011-09-07 01:34:54 +00:00
b062d3b3dd Adding Jersey and EU flags to the updater 2011-09-06 20:51:14 +00:00
4062782015 Add EU (it's in Maxmind's GeoIP data) 2011-09-06 20:50:35 +00:00
0cc490d286 Add license for Jersey and EU flags 2011-09-06 20:48:03 +00:00
72abe9da13 Add missing country flags
With 0.8.9 we'll be switching to Maxmind's geoip services and they include more
countries than our old source.
2011-09-06 18:20:15 +00:00
zzz
1e5fe1f60b merge of '4f61b159a4d39db3c8eddf2539e9012f5bb375a2'
and '57a19829917d3dc2ad19e95c7b3bafd3673c3903'
2011-09-06 15:32:23 +00:00
zzz
29ef11619a format 2011-09-06 15:29:49 +00:00
zzz
640782ae00 * Console: Move configservice.jsp rendering code from the router to the console 2011-09-06 15:02:28 +00:00
zzz
3882e49231 * JobQueue: Change queue from a List to a Set for efficiency 2011-09-06 13:27:07 +00:00
zzz
b64cb14456 cleanup 2011-09-06 13:24:44 +00:00
zzz
d3950bdcf1 comment out main 2011-09-06 13:24:21 +00:00
zzz
73901f6e2e log fixes 2011-09-06 13:23:39 +00:00
zzz
70d9415ba2 more constructors 2011-09-06 13:23:24 +00:00
zzz
d9b37ac6f0 * I2PTunnel: Save keys to privkey file when enabling
persistent key after tunnel creation (ticket #480)
2011-09-06 13:23:09 +00:00
dc2198d3f6 Debian: Add ability to dump threads to the initscript 2011-09-06 12:39:30 +00:00
zzz
fdc3af97aa * SDSCache: Use weak refs; increase size for pub keys 2011-09-06 12:13:33 +00:00
zzz
5030a86311 field cleanup 2011-09-06 12:12:43 +00:00
zzz
3d5beece87 * Crypto: Rework use of SHA256 for efficiency and
to avoid clogging the Hash cache with one-time hashes,
    and avoiding the global cache lock.
    This also greatly increases Hash cache hit rates.
    Also use SimpleByteCache for temporary byte buffers.
2011-09-06 12:11:55 +00:00
19905e99be removing extraneous trailing space 2011-09-06 01:31:03 +00:00
f79138b356 Fix typo 2011-09-05 03:18:31 +00:00
a40a2df971 merge of '979c520630f94a6647a547535d276e187b753bca'
and 'fb1eccf1532a765266448fe4a13c6f833539a37b'
2011-09-04 23:25:30 +00:00
ebf0128185 merge of '8fb2860840677716bb46ff433868654c31722d3c'
and 'd49c39f3e1dd314595a8608df8761f77520c6550'
2011-09-04 23:10:24 +00:00
zzz
7a135b9fa4 merge of '8fb2860840677716bb46ff433868654c31722d3c'
and '929973e4fe14793240e998315d396a19461655ee'
2011-09-04 23:03:51 +00:00
331fb2781b updated en locale, pushed to transifex 2011-09-04 23:00:45 +00:00
0c319aa184 Add susimail configs for Italian 2011-09-04 22:44:58 +00:00
zzz
2c502c5e27 shorten netdb expiration again 2011-09-04 22:16:04 +00:00
zzz
63958df99b * NetDB: Try again to fix ISJ deadlock, thx devzero 2011-09-04 20:26:47 +00:00
zzz
42fc22eec9 Remove one global lock in OutboundMessageRegistry.
This isn't the cause of the ISJ deadlocks though.
2011-09-04 19:36:08 +00:00
zzz
b39ba06d92 log tweak 2011-09-04 19:34:51 +00:00
baa92b4ed5 Change developer channel
The developers don't hang out in #i2p. They're in #i2p-dev.
2011-09-04 12:51:44 +00:00
070d3ee653 Removing the description of non-existent options (#431) 2011-09-03 19:45:31 +00:00
zzz
6364f142ff * UDP Inbound:
- Hopefully fix race NPE, thx dream
    - Catch some more fragment errors
    - Exception and log tweaks
    - Cleanups and javadocs
2011-09-03 17:44:23 +00:00
zzz
7b974e7e0b * i2psnark: Fix "eject" button in certain browsers (ticket #511)
(fixed on 12/29/10, accidentally reverted in 12/30/10 propagate)
2011-09-03 17:40:24 +00:00
454c7f14a0 Debian: get locale information by sourcing /etc/environment and
/etc/default/locale, if found. This prevents a problem with the encoding being
set to ANSI_X3.4-1968 when I2P is started at boot.
2011-09-02 23:55:32 +00:00
zzz
3d3352438b * NetDB: Hopefully fix ISJ deadlock, thx dream 2011-09-02 17:25:26 +00:00
zzz
b2263efaf0 cache user-agent processing 2011-09-02 17:24:14 +00:00
5f7983ca17 I2PSnark: Fix GUI html tag for adding a torrent, it was missing a space. 2011-09-02 05:02:42 +00:00
zzz
f4e64d9df7 -8 2011-09-02 01:45:05 +00:00
zzz
30702e9b23 sent relay tag cleanup 2011-09-01 23:59:55 +00:00
zzz
1bd71abf66 cache country codes 2011-09-01 23:59:20 +00:00
zzz
d7a4e0357a explore more aggressively if hidden or K 2011-09-01 13:50:17 +00:00
zzz
cdb6313c33 cleanup 2011-09-01 13:50:00 +00:00
zzz
b3711e31ad color by default 2011-09-01 13:25:18 +00:00
zzz
aff250ff13 javadoc 2011-09-01 13:24:47 +00:00
zzz
a69267dc87 UDP cleanups 2011-09-01 13:24:31 +00:00
c9687649a4 The Izpack utility "izpack2exe" doesn't work with 64bit jvms so it's
essentially useless. Perhaps later I'll add a target using launch4j.
2011-08-31 17:13:24 +00:00
9e6f993af5 De-fuglify the service path in Windows
The default service path in Windows is fugly and not very convenient. I2P uses
the correct path, but if you want to access snark or eepsite data, one must go to
%SYSTEMROOT%\config\systemprofile\AppData\Roaming\I2P\ (Vista/7) or
%SYSTEMROOT%\system32\config\systemprofile\Application Data\I2P (XP/2003). If
this wasn't bad enough, in some cases one must take ownership of this path and
grant permission to him- or herself to access the folder.

With this changeset, I'm setting the path to %ALLUSERSPROFILE%\Application
Data\I2P as well as adding a shortcut to the I2P folder in the Start menu.
2011-08-31 17:11:23 +00:00
zzz
b328b47bf4 * OCMOSJ: Remove some global cache locks, other cleanups 2011-08-31 12:52:22 +00:00
zzz
bd7e655788 cleanup 2011-08-31 12:49:33 +00:00
zzz
a928f5ef1f javadoc fixes 2011-08-31 12:48:47 +00:00
zzz
d73eb16aeb * I2CP: Cache b32 lookups client-side
* I2PTunnelHTTPClient: Use existing session for b32 lookups
                         rather than a new SimpleSession
  * Naming: Increase b32 lookup timeout to 15 sec.
2011-08-30 13:41:26 +00:00
zzz
a6728a33da cleanups 2011-08-29 17:53:01 +00:00
zzz
20855c9c44 * Tunnels:
- Increase timeouts on all deferred netdb lookups to 15s; add lookup stats
    - Cleanups, javadocs, log tweaks
2011-08-29 17:51:00 +00:00
zzz
92ffea2237 * NetDB:
- Replace the old parallel lookup method with a true
      Kademlia lookup that iteratively queries additional floodfill
      peers returned in DatabaseSearchReplyMessages. This is a more
      efficient and reliable lookup that will work much better
      when not all floodfill peers are known, and it removes a serious
      limitation to network growth.
    - Limit max number of DSRM entries to look up
    - Cleanups, javadocs, log tweaks
2011-08-29 17:48:08 +00:00
zzz
81240a5240 revert change causing ConcurrentModificationExceptions 2011-08-29 00:50:25 +00:00
zzz
f8df357134 -2 2011-08-28 19:05:06 +00:00
zzz
5b11418209 merge of '35b2e734af9d2aff8fae586fccef3cd66e57e23a'
and 'fb0d6216234531927837fe7b886eb1feab790ecb'
2011-08-28 19:03:01 +00:00
zzz
8b05b16c8a * Log: Fix level stuck at DEBUG when called from constructor 2011-08-28 18:47:13 +00:00
zzz
d4bf3403e1 log tweak 2011-08-28 17:32:58 +00:00
zzz
0c661b373e javadocs 2011-08-28 17:29:42 +00:00
zzz
c8a9d8ef35 cleanups and javadoc 2011-08-28 17:29:14 +00:00
zzz
e768b35848 fix log issue 2011-08-28 17:28:04 +00:00
zzz
5e507c0294 log tweaks 2011-08-28 17:26:34 +00:00
zzz
948de5462f * Stats: Restore pre-0.8.8 API to not create a new Rate if it does not
exist in RateStat.getRate()
2011-08-28 14:31:39 +00:00
035829f33d reworking because of additions to wrapper.config 2011-08-27 23:28:07 +00:00
115f3e1fb0 adding a few new options from the 3.5.9 config file 2011-08-27 23:24:29 +00:00
6a73dffdab Clicking the router console shortcut resulted in a minimized browser window
opening. This change causes the window to not be minimized.
2011-08-27 19:10:41 +00:00
zzz
100f6dac3d simple test script 2011-08-27 15:27:15 +00:00
c671148025 merge of '1f42bc4bfde6612fcb7769fb57d50a224f6bef7e'
and 'ed8df353e5da4216524aa5bc5df052dffe6608dd'
2011-08-27 13:46:52 +00:00
c243f21bff Added reseed.i2p-projekt.de as https:// link 2011-08-27 09:29:20 +00:00
4892764832 changelog update 2011-08-26 23:47:33 +00:00
b9dc7ec12e Set permissions to a SID not to the group Users, fixing a bug that is triggered
on localized versions of Windows.
----
Non-English versions of Windows do not have a Users group; instead they use a
localized group name. As a result, when installing I2P on a non-English Windows
box, the installer will show an error when trying to run the fixperms.bat
script.

Using the SID will work with any localized Windows. SID list @
http://support.microsoft.com/kb/243330/en-us
2011-08-26 23:25:12 +00:00
ab58875b13 The comment is no longer accurate (the file still has UNIX line endings) since
we're using findstr
2011-08-26 15:49:09 +00:00
zzz
c67404e74e remove firewalled and fast message 2011-08-26 13:50:58 +00:00
zzz
5f6efbf6d0 lower some log levels added in last release 2011-08-26 13:45:46 +00:00
f674b78edb Fix ticket #514 (debconf values are overwritten upon installation) 2011-08-25 21:33:06 +00:00
zzz
bb5f3a92b0 history for props, -1 2011-08-25 13:46:45 +00:00
zzz
546b668502 fix NPE after corruption ticket #515 2011-08-24 18:03:56 +00:00
zzz
f6d2ac7fb2 * Blockfile DB: Add reverse lookup table; bump DB rev to 2 2011-08-24 14:25:58 +00:00
zzz
f22865acb1 propagate from branch 'i2p.i2p.zzz.test4' (head a1d80c1c396eaa49c7b46a69397b36fe9717ff2e)
to branch 'i2p.i2p' (head 7d00d6f11ce1172c218ce44b0a8ac28e4addf03d)
2011-08-24 14:24:25 +00:00
zzz
f99f9e41e5 propagate from branch 'i2p.i2p.zzz.test' (head 0f2e109194f1fcc94e8a3f37cbf804446abddeff)
to branch 'i2p.i2p' (head 7bb99f9e0d436cf9923ed17465f15e73c78e7b13)
2011-08-24 14:23:29 +00:00
zzz
3849a96ed2 initial reverse/firewall support 2011-08-24 14:21:44 +00:00
zzz
69701ab506 increase large MTU to 1492 2011-08-24 14:15:09 +00:00
2654ada226 Switch from ant call target 2011-08-23 22:30:33 +00:00
e728532958 copy.jar, delete.jar, etc., aren't used by anything but Windows 2011-08-23 22:29:36 +00:00
2aee4376cb merge of '804bb87106b8e0129d06020ddf5f77ddc242d622'
and 'ebb90f58c9b8363abd9b1f7d8f61c81ca478d811'
2011-08-23 20:18:56 +00:00
zzz
010399d865 0.8.8 2011-08-23 16:07:44 +00:00
73aade4fb3 Proper handling of implied "/" paths 2011-08-23 04:28:05 +00:00
zzz
20c77e1529 fixes after review 2011-08-22 19:09:09 +00:00
zzz
5fd7997661 fix encoding issues 2011-08-21 16:32:15 +00:00
zzz
363a3e57ff cleanups and javadoc fixes 2011-08-21 16:31:46 +00:00
5283b8d127 0.8.8 debian changelog 2011-08-21 10:26:55 +00:00
13545fdd70 ant build now works again on winows 2011-08-21 06:25:32 +00:00
zzz
4c988f0767 spell the language right 2011-08-21 01:11:50 +00:00
dc3f540a64 changing the pastebin on the router console to one that may prove to be more
stable.
2011-08-20 21:13:29 +00:00
zzz
6d064270fc propagate from branch 'i2p.i2p' (head 793ca7c46f5d8b51c5880fc538dea7874e62f63b)
to branch 'i2p.i2p.zzz.test' (head d39f17fe601b6ae514111b07092de820668015d7)
2011-08-20 20:23:27 +00:00
zzz
d20ac3994d propagate from branch 'i2p.i2p' (head 793ca7c46f5d8b51c5880fc538dea7874e62f63b)
to branch 'i2p.i2p.zzz.test4' (head 2ccff1385a7d79f6be7079af73036510667578b7)
2011-08-20 20:23:20 +00:00
c90ac9ee6c I created this script for my own convenience. It isn't used by the Debian
packaging in any way.

Now that I know about ant getBuildNumber, I'll just use that.
2011-08-20 20:03:47 +00:00
67d608a1fb checkpo fixes 2011-08-20 19:54:42 +00:00
zzz
ed7fd9783e checkpo fixes 2011-08-20 19:34:50 +00:00
zzz
994aa72d71 - New Danish and Ukranian translations from transifex
- Update Italian, Chinese, Spanish, Polish, Swedish,
      and Vietnamese translations from transifex
    ** po files contain errors, to be fixed in next checkin
2011-08-20 18:43:34 +00:00
28ed69e575 Add new entries for It, uk, and da. 2011-08-20 17:55:49 +00:00
zzz
b874ff7e87 * Translations: update .tx/config, add Danish and Ukranian 2011-08-20 16:13:15 +00:00
9c0c73358d Add non-x86 target for Linux.
Move the arm and ppc archs for linux from the preppkg target to the non-x86
target.

Make the linux target depend on the x86 and non-x86 targets.
2011-08-20 00:31:12 +00:00
2159862d1a Removing mention of Atalk, which was removed in revision
d07ed83f441d4c357e009e25aa4b55aee518dea3
2011-08-20 00:10:32 +00:00
zzz
c5e74fefe5 * Soft restart:
- Allow NTP to reinitialize clock after the comm system
      in the first minute of uptime
    - Fix i2ptunnels not restarting
    - Increase minimum forward clock shift for soft restart
    - Reduce minimum backward clock shift for soft restart
    - Signal the I2CP client with a different message when restarting
    - I2CP client reconnects when receiving restart message
2011-08-19 15:34:30 +00:00
zzz
26c744ca45 cleanup 2011-08-19 15:30:57 +00:00
zzz
10f3337906 cleanups 2011-08-19 15:30:31 +00:00
zzz
de094433da cleanup 2011-08-19 15:29:37 +00:00
0dee248f8a debian/changelog clarification 2011-08-18 17:37:27 +00:00
674c202e88 Better: Instead of depending on ttf-dejavu, move to recommends and add a note about
TrueType fonts to the description.

Also mention that the jbigi package also includes jcpuid on x86 platforms.
2011-08-18 17:36:00 +00:00
c7b567891c -6 (will wait for 0.8.8 to upload this change to the PPAs) 2011-08-18 17:05:25 +00:00
2f5020e29c Add dependency on ttf-dejavu-(core|extra). Fonts are needed so graphs can be
built with a headless jre. This font will be installed if a non-headless jre is
installed, so this shouldn't be a controversial change.
2011-08-18 17:03:22 +00:00
3f979b159d Bugfix: Don't load the systray in a 64bit JVM in Windows (closes #506) 2011-08-17 21:20:21 +00:00
a9f943154c merge of 'bfd1fde175d4c3de1a107725991aa1b1d611d298'
and 'eb7a90b602d939a3257fb42ab3d826b54ea4da1b'
2011-08-17 19:34:49 +00:00
b3cfe65325 Update russian translation 2011-08-17 19:33:37 +00:00
77e1bf61ca merge of '04def94f04c224d4161392af3cc9147021594fbf'
and '3b0ab08a92774922d853db0303ca405df568a711'
2011-08-17 19:32:32 +00:00
746d440ce0 better NBI logic 2011-08-17 18:55:26 +00:00
zzz
aeccbc975f privkeyfile tweak 2011-08-17 17:46:50 +00:00
zzz
1bf651b88b final 2011-08-17 17:46:05 +00:00
b25a16f171 Now i2ptunnel will generate certificates instead of failing with a permission denied error for trying to write to /i2ptunnel17.privKeys.dat 2011-08-17 03:25:46 +00:00
zzz
421559c26e * Console: Delete corrupt rrd file (ticket #483) 2011-08-16 18:29:57 +00:00
zzz
336e50e94a debug log 2011-08-16 17:46:53 +00:00
zzz
f7c31950b3 UPnP: Fix bug causing failure when the PC has multiple interfaces 2011-08-16 16:20:51 +00:00
zzz
dc02f9cd88 logs page css tweak 2011-08-16 16:14:18 +00:00
095f018fbb Add pastethis.i2p to hosts file. Will add to the router console after the release of 0.8.8. 2011-08-16 12:47:56 +00:00
9c7533bb5d change build target to point to preppkg-unix 2011-08-16 12:45:00 +00:00
a29fd1e90c Add ant targets for custom installers (BSD only, Windows only, etc). 2011-08-16 12:43:37 +00:00
7343e0ff00 fix getBuildNumber target (sometimes the buildNumber would have a leading
space, such as " 19" instead of "19"), using "tr" to strip it.
2011-08-10 23:44:47 +00:00
915755b349 By request: Tighten package dependencies so that the -headless packages are
installed by default if a JRE isn't installed yet. Since the packages
previously depended on "default-jre|java5-runtime|java6-runtime", an
already-installed headless package would have satisfied the dependency.
2011-08-09 14:32:09 +00:00
255ccdcbc1 Allow some variables to be changed by end-users during build by use of a
properties file.
2011-08-07 00:45:14 +00:00
2973b4097d remove osid and postinstall.sh when the installation is complete 2011-08-06 22:38:37 +00:00
9abf7d6aef Don't try to build an EXE on arm systems. 2011-08-06 17:12:19 +00:00
2e6912ed43 Actually copy the script checked-in at bc78eca6ebdc1df6d5d46f197c8e78d320638c15 2011-08-06 12:59:20 +00:00
93d41be5ef As of -3 (debian revision 3) the javadocs are installed to
/usr/share/i2p/docs/javadoc and /usr/share/doc/i2p-doc/api is a symbolic link
to this location. To ensure the link can be created, we check to see if
/usr/share/doc/i2p-doc/api is a folder. If it is, it gets removed.
2011-08-06 01:16:02 +00:00
f428a372cc Correct the path to wrapper.logfile in Windows (see comments in the script for
much more info). Fixes #473
2011-08-06 01:08:18 +00:00
d3861b9917 Remove files from Windows that aren't used in Windows 2011-08-06 00:49:06 +00:00
2fc09679ab fix path to initialNews for target portable-pkg-win32 2011-08-01 18:32:40 +00:00
2679aefb4e Don't set the location of the service's I2P profile to %APPDATA%\I2P. 2011-08-01 09:38:55 +00:00
453b8a962d Debian packaging changelog updates 2011-08-01 01:01:16 +00:00
ecd629f97d Add armv5 (armel) jbigi for Linux 2011-07-31 17:51:07 +00:00
zzz
ee82a6196d * Netdb: Add a job to refresh all the old router infos at startup,
to speed integration
2011-07-31 13:32:44 +00:00
zzz
43afe7b1a8 cleanups 2011-07-31 13:32:07 +00:00
zzz
29ce3c7c8b * Crypto: Implement and then comment out an alternate
AES-256/CBC implementation using the JVM crypto libs,
            and tests, it isn't faster
2011-07-31 13:30:53 +00:00
zzz
1bf86aff0b javadoc 2011-07-31 13:29:22 +00:00
c502c21798 -18 (version bump for linux PPC and OSX jbigis) 2011-07-30 23:31:36 +00:00
3a70a5a627 Add target to build an "osx only" jbigi.jar 2011-07-30 23:29:43 +00:00
3eafe4c765 Add wrapper for Linux on PPC arch 2011-07-30 23:29:08 +00:00
9d3acf98ff Add Linux PPC support 2011-07-30 23:25:14 +00:00
18ee23960c Add jbigi support for Intel Macs
The jnilibs were compiled on Snow Leopard 10.6.8 with Xcode 3.2 (gcc 4.2.1)
2011-07-30 23:18:39 +00:00
3d64df57a1 Fix hang in Linux on armel and ppc architectures by removing unused (per zzz)
lock
2011-07-30 12:31:31 +00:00
zzz
71804173fc add Cryptix license 2011-07-29 21:01:15 +00:00
zzz
dcc1861399 * Netdb Search:
- Follow all DSRM's, not just the last one, by moving the code
      from the match job to the selector
    - Update peer profile after SingleSearchJob
    - Cleanups, javadocs, log tweaks, final
2011-07-29 20:43:52 +00:00
zzz
e7f449472c fast tier size increase 2011-07-29 20:42:47 +00:00
zzz
b37813257a * TunnelPoolManager: Reduce race window for restarting a tunnel pool 2011-07-28 18:26:21 +00:00
zzz
59e1fbd0d1 cleanups 2011-07-28 18:24:11 +00:00
zzz
0d212f6478 dont throw when setting to the same value 2011-07-28 18:23:27 +00:00
zzz
3a1cd51bc7 split up big lock to avoid deadlocks 2011-07-28 18:22:31 +00:00
18db940d59 Add armel wrapper
Compiled on Debian Squeeze within qemu.

GCC version:
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi
--host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8) 

$ uname -a
Linux debian-armel 2.6.32-5-versatile #1 Wed Jan 12 23:05:11 UTC 2011 armv5tejl GNU/Linux
2011-07-27 00:17:25 +00:00
543e0b0d65 Debian: Minor changes so the jbigi-jni package can be built on non-x86 systems. 2011-07-26 23:28:25 +00:00
zzz
38281ba61f * NativeBigInteger: Move libjbigi-linux-arm.so to libjbigi-linux-armv7.so,
do ARM version detection in NBI.
2011-07-26 23:09:33 +00:00
zzz
a98d521006 * Installer: The previous wrapper files only work on armv7 2011-07-26 21:59:59 +00:00
zzz
b0c2012327 dummy! 2011-07-26 13:38:38 +00:00
zzz
1061e86fad * NetDB:
- Explore even more aggressively at startup
    - Increase SingleSearchJob timeout
    - Increase time at startup for processing DSRM
    - Cleanups, final, javadoc, concurrent
2011-07-26 13:30:54 +00:00
zzz
164b0e5463 * Watchdog: Improve the way it calls for a thread dump 2011-07-26 13:27:40 +00:00
zzz
02bc228d6f log tweak 2011-07-26 13:27:15 +00:00
zzz
a61f113cd1 cleanup for OutNetMessage 2011-07-26 13:27:02 +00:00
zzz
afb6436109 cleanups 2011-07-26 13:26:13 +00:00
zzz
22dd5b8adc add note 2011-07-26 13:26:01 +00:00
fc353ee0bd I added a more sensible error response when a name/b32 won't look up. Also support for "alias" links, as dubiously useful as those may be. (Perhaps allowing absolute paths on eepsites without b32?)" Also it now replaces the aHelperKey with the b64 instead of stupidly leaving the lookup completely unused and pointless. 2011-07-25 23:35:14 +00:00
zzz
734444e183 * UDP:
- Implement destroy message sending
      (receiving was implemented in 0.8.1)
    - More cleanups at shutdown
    - Log tweaks
2011-07-24 18:57:51 +00:00
zzz
89d32e3bef * UDP:
- Revert change in UDPPacket that caused massive corruption
    - Reduce buffer sizes from 2048 to 1536
    - Discard too-large received packets sooner
    - More cleanups
    - Notes on MTU
2011-07-24 15:15:19 +00:00
zzz
ec061eb3e0 more final and cleanups 2011-07-24 12:38:50 +00:00
zzz
702da0a929 * UDP:
- Don't delay in OutboundMessageFragments at the end
      of the loop if we have more to send now, this should
      speed things up
    - More cleanups
2011-07-24 12:16:35 +00:00
zzz
49bba109ac * UDP:
- Complete rewrite of OutboundMessageFragments for
      concurrent and for efficiency to avoid O(n**2) behavior
    - Queue a new send immediately after a packet is acked
    - Cleanups, log tweaks, javadocs, final
2011-07-23 23:16:28 +00:00
zzz
ddec4f88fb propagate from branch 'i2p.i2p' (head 083b9b289063fdcac54734fe782626f5d2be03b1)
to branch 'i2p.i2p.zzz.test4' (head ac597f2218ef1bab8816e1a3d36be95fd7bd79d0)
2011-07-23 16:55:57 +00:00
zzz
3466dc1099 cleanups and comments 2011-07-23 16:55:44 +00:00
dev
bf8f1508cd Changed the equals method to rely on the protected ConcurrentHashMap.equals(). 2011-07-22 15:51:36 +00:00
dev
0235c5ef40 merge of '155618ea1e5d1088da55cc657cc6b6d95e44e862'
and '6060c1530835d871f99ceba7209ed4031c582573'
2011-07-22 15:18:43 +00:00
dev
661325af5a Removed the last Set.entrySet(), sorry zzz. 2011-07-22 14:19:01 +00:00
c716071e9c -14 adds x64 support to the OSX wrapper. With 0.8.7 the wrapper became fat
(i386 & ppc). With this check-in, the wrapper becomes quad-fat (i386, ppc,
x86_64, ppc64).

$ lipo -info libwrapper.jnilib wrapper
Architectures in the fat file: libwrapper.jnilib are: ppc i386 ppc64 x86_64 
Architectures in the fat file: wrapper are: ppc i386 ppc64 x86_64 

$ file libwrapper.jnilib wrapper
libwrapper.jnilib: Mach-O universal binary with 4 architectures
libwrapper.jnilib (for architecture ppc):	Mach-O bundle ppc
libwrapper.jnilib (for architecture i386):	Mach-O bundle i386
libwrapper.jnilib (for architecture ppc64):	Mach-O 64-bit bundle ppc64
libwrapper.jnilib (for architecture x86_64):	Mach-O 64-bit bundle x86_64
wrapper:           Mach-O universal binary with 4 architectures
wrapper (for architecture ppc):	Mach-O executable ppc
wrapper (for architecture i386):	Mach-O executable i386
wrapper (for architecture ppc64):	Mach-O 64-bit executable ppc64
wrapper (for architecture x86_64):	Mach-O 64-bit executable x86_64

Binaries fetched from the tanuki software site and fattened with lipo.
2011-07-22 00:27:28 +00:00
370be48226 Remove extraneous whitespace 2011-07-22 00:23:50 +00:00
zzz
395173613f * Console: Use capability method for counting integrated peers
* Netdb: Speed up collection of all the floodfill peers by using
           PeerManager.getPeersByCapability()
  * PeerManager: Capability cleanups
2011-07-21 15:34:23 +00:00
zzz
046175d866 merge of 'c0d12629a875b5dddde9fd729e05353d54a1bfc7'
and 'd07ed83f441d4c357e009e25aa4b55aee518dea3'
2011-07-21 15:32:44 +00:00
a731c890c2 merge of '6eb926f98c7348ee0979a7252be716e39205bb5e'
and '7a278a1855c16bd22e91f85da2b5167e4a3c3e7e'
2011-07-21 15:30:43 +00:00
zzz
66b19326d5 Dropping apps/atalk demo, which was an awful example as it was apparently written
before streaming existed, so it's trying to do chat and file transfer
with datagrams and no error detection / correction.
2011-07-21 14:53:42 +00:00
dev
23c30a99cb Changed all iterators using entrySet() to values().
Removed debug from main()
Recommented main out.
2011-07-21 13:06:59 +00:00
f4ce899810 merge of '67c0378bd8bbb541f96066910744b28a190bbf44'
and '6826e4301891ae52880ee2533838cc952c7a9118'
2011-07-20 21:17:02 +00:00
zzz
164f6603fd * i2psnark: Don't let connection problem crash the DirMonitor (ticket #495) 2011-07-20 14:47:30 +00:00
88b86333f4 merge of '72d7d8df8b0c2a79750e7f71fcc97cac4728d6b8'
and 'eb9435041f1c76de404d2b6ac10c1219730c9e16'
2011-07-20 14:16:22 +00:00
2669ae0995 add project info to .po 2011-07-20 13:40:43 +00:00
dev
7c4f088b3e Removed unneeded import. 2011-07-20 13:35:21 +00:00
dev
a67adba710 merge of '0274eda1c4130faa95a34ea1d5e468bad761308b'
and '72d7d8df8b0c2a79750e7f71fcc97cac4728d6b8'
2011-07-20 13:33:43 +00:00
dev
73f9b72d63 Sort output of RateStat.getPeriods(). 2011-07-20 13:33:38 +00:00
dev
6e98cf4fe0 merge of '4b9010e6402c729654f8a4766a63e65eeb88df2c'
and 'b768f0483dce793b4654191c2e649de04172087e'
2011-07-20 13:27:49 +00:00
dev
085ca76bcc Added support for adding/removing periods to already existing RateStats. 2011-07-20 13:27:44 +00:00
dev
150270b14f merge of '13af6dbeb49a0ab1855da31595ba3c141e54bc59'
and '6b869c4d924c79a0f7695feaa15a002a061bce06'
2011-07-20 13:23:42 +00:00
dev
9a6888d7f9 Removed double ;;. 2011-07-20 10:16:37 +00:00
6c182ba4bb tweak debian translations 2011-07-20 02:34:41 +00:00
42cffea077 partly update de translation 2011-07-20 01:21:36 +00:00
zzz
3834403c79 propagate from branch 'i2p.i2p' (head e014bb054baa0d8e844e9a97ad6f5b04ed7c0e56)
to branch 'i2p.i2p.zzz.test' (head 1e0af137b9c4c873fea72d661f2ee351a640734f)
2011-07-19 21:18:14 +00:00
zzz
d397eaaa08 - Cleanups, concurrent
- Basic b32 verification
2011-07-19 21:17:52 +00:00
zzz
56d8b72b07 * Tunnel TestJob:
- Don't continue testing after the pool is dead
    - Tweak test intervals
  * TunnelPool: Make more methods package private
2011-07-19 20:54:22 +00:00
zzz
c78719bfe4 cleanup 2011-07-19 20:54:06 +00:00
zzz
91f2206a4f - Set real local address on client side
- Put in some reasonable conn limits
2011-07-18 14:35:55 +00:00
zzz
6d6799b99e * Netdb:
- Add reseed hosts thx matt .at. drollette.com
    - Remove https://a.netdb.i2p2.de/, bad cert for months
    - Remove https://c.netdb.i2p2.de/, no data for months
2011-07-18 14:33:59 +00:00
zzz
3f8df84a4a * Streaming: Improve conn limit log message 2011-07-18 14:29:32 +00:00
zzz
127aebeadc merge of '5985a037ecd49475ed49c120a5ab9d898f058fe6'
and 'adba1e5ca6162b93d450aee8fd7e723bac51abf0'
2011-07-18 14:07:56 +00:00
dbaa659912 Now you can ?i2paddresshelper=<b32>.b32.i2p and the address helper will look up the b32 for you. (Can't/shouldn't add b32s to your addressbook). Tested and it works for me. 2011-07-17 23:54:42 +00:00
zzz
8034dc3ca7 concurrent, final 2011-07-17 19:15:16 +00:00
zzz
0a8abad72e remove code by extending instead of implementing 2011-07-17 18:57:22 +00:00
zzz
a8378d0411 * I2PTunnel: Rename privkey file when deleting tunnel to prevent inadvertent reuse 2011-07-17 16:38:02 +00:00
zzz
7fbb3b12d1 * FileUtil: Add a rename method and a new copy method 2011-07-17 16:33:40 +00:00
zzz
1ced604354 * UDP: Lower max port below 31000 since wrapper uses that 2011-07-17 16:31:21 +00:00
zzz
8a9882c906 generic 2011-07-16 20:44:40 +00:00
zzz
f87e3b52e3 more on resume/accept, untested 2011-07-16 20:22:00 +00:00
zzz
c826f7fb48 cleanups 2011-07-16 20:17:00 +00:00
zzz
59424a899f stub out resume/accept; allow xdcc 2011-07-16 12:46:05 +00:00
zzz
a4ec6a5369 propagate from branch 'i2p.i2p' (head 2072db743073a703da2f4be9707e7edd696c2925)
to branch 'i2p.i2p.zzz.test' (head cc952c7db4822bb6c49c8e6fb6df02a62c6cbe63)
2011-07-15 22:27:31 +00:00
zzz
7ba6f5a755 add gui option 2011-07-15 21:41:38 +00:00
zzz
7fa874f625 - Tracking, expiration, closing of DCC tunnels
- I2PTunnelRunner cleanups
2011-07-15 20:52:18 +00:00
zzz
55bfd6aa2d concurrentify 2011-07-15 20:47:49 +00:00
41021e1abb Fix Arabic CSS routerconsole 2011-07-15 14:04:25 +00:00
zzz
65656b333a eliminate max 2011-07-15 02:12:10 +00:00
zzz
0bf0715adc * Shutdown:
- Cancel our JVM shutdown hook when shutting down
    - Run a spinner task so shutdown always completes
    - exit() instead of halt() so other JVM shutdown hooks run
    - Prevent duplicate wrapper notifier hooks
    - Notify the wrapper twice, once for stopping and once for stopped
2011-07-15 01:13:35 +00:00
zzz
857f0a0448 javadoc links for wrapper 2011-07-15 01:07:35 +00:00
zzz
79ac955b33 * I2PTunnelIRCClient:
- Big refactoring into multiple class files
    - Allow AWAY and CAP messages
    - First cut at DCC support - not for SOCKS (yet)
2011-07-14 20:06:31 +00:00
zzz
252f1047e5 javadocs and final 2011-07-14 18:53:58 +00:00
zzz
9f433b2e6b * Streaming:
- Hook I2CP ports through to I2PSocket
    - Javadocs, init cleanups, final
2011-07-14 18:53:10 +00:00
zzz
dfbf01dad5 * Blocklist:
- Fix delayed lookup of reason from file
    - Tag strings for translation
    - Sort IPs on configpeer.jsp correctly
    - Cleanups
2011-07-13 14:21:42 +00:00
zzz
688634695d javadoc 2011-07-13 14:20:20 +00:00
zzz
3380ecfa28 * SummaryHelper: Fix NPE at startup (ticket #493) 2011-07-13 14:19:34 +00:00
48896568ce added link to translated picture in susidns messages_fr.po 2011-07-13 08:40:10 +00:00
4ad2cf91d7 added link to translated picture in susidns messages_fr.po 2011-07-13 08:31:56 +00:00
15f7981dd2 added link to translated picture in susidns messages_fr.po 2011-07-13 08:21:48 +00:00
30a0ddc3fb upd i2ptunnel & susidns messages_fr.po 2011-07-12 08:07:32 +00:00
526c42b246 merge of '04b92dda3c1b3fa598f3f58762e44e3646c98d80'
and '4b8d5fe248604e47e00c2e674ad30d9678389f80'
2011-07-12 06:43:39 +00:00
zzz
0ca035dc44 merge of '49bba51653177b041a98b902ac624c8feae61698'
and 'f2281f98637dc74181e14a40f3b346436e95be88'
2011-07-10 15:04:50 +00:00
zzz
3455d3f943 * Message Registry: Clear pending messages at restart / shutdown
* OCMOSJ: Clear caches at restart
  * UPnP:
    - Fix device rediscovery and port opening after restart
2011-07-10 15:04:42 +00:00
zzz
42acdc314a * Router Clock: First cut at recognizing and reacting to large system
clock shifts by partially restarting the router. Also improve
    restarts initiated from config.jsp
    Tickets #465, #468, #494
  * UPnP: Wait for a while to ensure port removal at shutdown or restart
2011-07-10 00:00:58 +00:00
zzz
4fd1800944 log tweaks 2011-07-09 23:09:55 +00:00
zzz
dccdb99632 prevent log error at shutdown 2011-07-09 17:26:09 +00:00
zzz
94af227b70 * DH, YK:
- Improve YK speed test
    - Shut down thread faster
    - Refiller keeps going until full
    - Cleanups
2011-07-09 17:11:38 +00:00
zzz
fdd0d6ceb1 remove static log refs 2011-07-09 14:57:41 +00:00
zzz
5402bd0dc2 javadoc 2011-07-09 14:55:34 +00:00
zzz
9d2816f4a7 - Use a different lock for the executor than for shared clients
so shutdown doesn't hang
- Javadocs
2011-07-09 14:30:33 +00:00
2eab528af0 merge of 'f2281f98637dc74181e14a40f3b346436e95be88'
and 'f452317ba7735d99e285e2c580491a100bea305b'
2011-07-09 07:53:12 +00:00
zzz
b41c58341f another NPE from ticket 493 2011-07-08 19:03:38 +00:00
zzz
90b8aa7811 concurrent 2011-07-08 18:31:50 +00:00
zzz
56650ebfb4 more misc. findbugs 2011-07-08 18:05:28 +00:00
zzz
44f4e551b7 more misc findbugs 2011-07-08 17:54:57 +00:00
zzz
9d4cc26890 misc. findbugs fixes 2011-07-08 17:40:43 +00:00
zzz
f173e88787 kill a debug log 2011-07-08 17:05:13 +00:00
zzz
ef40282081 * I2NP: Consolidate common code from TunnelBuildMessage and
TunnelBuildReplyMessage into a common base class
2011-07-08 17:03:19 +00:00
zzz
32d9204e4a * Sha256Standalone:
- Use system SHA-256 MessageDigest instead of Sha256Standalone in PRNG
    - Deprecate DataHelper functions using Sha256Standalone arguments;
      used only by Syndie
    - Note deprecation in javadocs
2011-07-08 13:51:50 +00:00
zzz
dd4906258d javadoc 2011-07-08 13:47:49 +00:00
c4b355124a upd 2011-07-08 13:47:44 +00:00
zzz
15165aa9af * NetDB: Fix NPE at startup (ticket #493) 2011-07-08 13:46:26 +00:00
zzz
c7fcef2096 drop file used only by dropped naming service 2011-07-08 13:44:45 +00:00
zzz
2b4f8ed55c * Blockfile:
- Log error on out-of-order spans
    - Log error on corrupt level and discard
    - Fix SkipSpan non-flush bug causing null levels
    - Add level fixer that repairs nulls and out-of-order levels
    - Fix bug on backwards span construction, not hit in practice
    - Lots of log level changes
2011-07-07 15:19:59 +00:00
681890780c Don't delete debian/copyright during "ant clean".
Instead of deleting debian/copyright with "ant clean", add it to .mtn-ignore.
With the current method, the copyright file doesn't end up in the debian source
package...
2011-07-06 22:27:46 +00:00
zzz
49b39008c5 -5 2011-07-06 12:06:20 +00:00
zzz
98b14158e6 fix error on HTTP Proxy shutdown 2011-07-05 12:47:19 +00:00
zzz
476caf3f59 catch exception on dup entry 2011-07-05 12:46:23 +00:00
zzz
4f3c15eb04 use HostsTxtNamingService if default fails to initialize 2011-07-04 22:07:13 +00:00
zzz
c839799023 increase min floodfills again 2011-07-04 19:16:54 +00:00
zzz
b7ff4fe87a * Netdb exploration:
- Remove floodfills from dont-include list in exploration
      DatabaseLookupMessage, as the dont-include-floodfills flag
      has been supported since release 0.7.9.
      This will make exploration work better, as there is room for
      non-floodfills in the don't-include list now.
    - Reduce min and max exploration intervals
    - Explore aggressively at startup and if known routers is low
    - Explore slowly if known routers is high
2011-07-04 18:48:31 +00:00
zzz
435683c5d1 * Tunnels: Use exploratory tunnels to help maintain a minimum number
of connected peers
2011-07-04 17:43:45 +00:00
zzz
1f3f17c8e6 * PeerManager: Load profiles in separate thread to avoid slowing
down the context initAll()
2011-07-04 16:13:28 +00:00
zzz
d4b28058a7 * EepGet: Add method to add extra headers to request 2011-07-04 14:26:35 +00:00
zzz
43044586d1 * AppContext: Add hasWrapper() method
* Shutdown:
    - Clear more resources in peer manager, netdb, stat manager,
      session key manager, naming service, tunnel dispatcher,
      OCMOSJ (result of testing with jvisualvm)
    - Don't call wrapper on shutdown (starting two threads) if we
      were started with runplain
2011-07-03 13:46:29 +00:00
zzz
6074a02cf5 * I2PThread: Remove logging, too many issues with extra contexts 2011-07-01 11:27:49 +00:00
zzz
57d196edd6 * Router, console, i2psnark: Change three errors to warns (tickets #479, #482, #487) 2011-07-01 11:05:06 +00:00
zzz
bf832a407e * EepGet:
- Fix error output bug
    - Output error data for 504 too
2011-07-01 11:04:09 +00:00
zzz
5ae41521a0 Set Blockfile as default naming service 2011-06-30 12:45:29 +00:00
zzz
d537379798 back to normal-sized updater 2011-06-30 12:43:22 +00:00
zzz
4f5e3401f7 change default news fetch to 36 hours 2011-06-30 12:42:45 +00:00
zzz
81beb63916 propagate from branch 'i2p.i2p.zzz.android' (head cbf2d39e1944b9d601558761d0eedcdebfd2f589)
to branch 'i2p.i2p' (head c2393e50afccfd5682a9086f0eec2a0700cda2c9)
2011-06-30 12:27:00 +00:00
zzz
3a2e9ad5d3 propagate from branch 'i2p.i2p.zzz.test4' (head 50c95d70238ff224e57acfca3d8797990ff3d01d)
to branch 'i2p.i2p' (head 1fa62c230eba5af7849024338fecf51bb2719c4e)
2011-06-30 12:22:12 +00:00
zzz
01b4b227ae small optimization 2011-06-30 12:21:43 +00:00
zzz
f854ac031d change old host name from mixed case to lower case 2011-06-29 21:48:02 +00:00
14e7a8eb12 Debian: If the i2p-doc (javadoc) package is installed, add a javadoc link on
the router console.
2011-06-28 23:19:15 +00:00
1339049886 build_jbigi.sh: make dynamic library build compatible with --as-needed GNU linker flag
See http://www.gentoo.org/proj/en/qa/asneeded.xml for details
2011-06-28 15:57:48 +00:00
zzz
73bd8c8515 * EepGet:
- Add method to get response code
    - Add method to write error data to the output
    - Increase buffer size to 8 KB
2011-06-28 00:03:39 +00:00
e2c7315759 merge of '4016f0b3372bfe07d914506d696a999c20d4c02c'
and '66ef156941e22ca82de6bf0b9ec70dd74c7a130b'
2011-06-27 21:21:32 +00:00
7a9b1297ca Debian: Add -deb1 to router's extra version field 2011-06-27 12:35:49 +00:00
7c255d6cb1 merge of 'a4b347fba401e0a80981d93f36f07b5146665bec'
and 'c25ab2c347bca5e3c4157389ecb6f68c35ce5a6f'
2011-06-27 11:02:58 +00:00
zzz
54aff53afe 0.8.7 2011-06-27 02:25:18 +00:00
zzz
2f10cca40f * Fixes after review:
- Fix Polish po file
    - Install as a service by default on Windows again
    - Change CPUID getters to package private
    - Split new jbigi install messages into two lines
    - Javadocs
2011-06-26 19:07:01 +00:00
ae428394a9 The debian/ directory for 0.8.7-1 (debian revision 1) 2011-06-26 19:04:54 +00:00
zzz
81dd267e29 throw IOE if uncompressed data too big, instead of silently truncating 2011-06-24 17:41:23 +00:00
4ec4013a44 merge of '8a8371472757453d5667080f0ba7a288ff139e5f'
and 'd48e528757ae7b1384eacca6ea802cebfd728841'
2011-06-24 10:55:37 +00:00
46c78ca4a4 debian debconf translation es and de 2011-06-24 10:51:38 +00:00
50bd1c05ac merge of '59d72ad41332fbcf2829c85f6b3e38aaca9ee528'
and 'eff7849dc937d5c853a2fbfb1811eab5f7300296'
2011-06-24 09:14:51 +00:00
36a6667645 update Castillian from transifex plus corrections 2011-06-24 09:11:51 +00:00
225f6a57bc update Castillian 2011-06-24 09:09:47 +00:00
zzz
1fdeba0745 max not min 2011-06-24 01:43:53 +00:00
zzz
f6f748217a allow outbound IRC INVITE 2011-06-23 22:47:52 +00:00
zzz
3f39cea89e propagate from branch 'i2p.i2p' (head 59d72ad41332fbcf2829c85f6b3e38aaca9ee528)
to branch 'i2p.i2p.zzz.android' (head f7e9a993c660229cca575d26a0ba06eea36cea8e)
2011-06-23 17:42:29 +00:00
zzz
bda6d7819c * BlockfileNamingService:
- Support readonly blockfiles
    - Open blockfile readonly if not in router context
    - Log warning if blockfile is locked
2011-06-23 14:35:48 +00:00
5a64a866da -30rc
Add an icon (in OSX parlance, a 'bundle') to the installation folder to start
I2P.  

While there might be a better way to handle this (admittedly, I don't know OSX
that well), it is my belief that this way is less 'hackish' than the various
OSX 'installers' that I've seen floating around.
2011-06-23 10:18:19 +00:00
67fd074f04 * Add note about the versioned lsb-base package dep being dropped.
* Remove the anchor option since we're not using it.
2011-06-23 01:23:06 +00:00
163e748f9c The XInfoPanel was shown twice on OSX because
<os family=unix> covered OSX as well. 

Instead, we'll show the panel for everything *EXCEPT*
Windows.
2011-06-23 01:17:46 +00:00
8f84481d48 Debian: Drop versioned dep on lsb-base so that the I2P package can be installed in
GnewSense.

This change will break nothing since we check for the existence of the lsb
function files in the initscript. With an older version of lsb-base (like the
one that came with Hardy (and GnewSense uses), the output from the initscript
will simply look a little different (but again, nothing will break). Virtually 
everything but GnewSense comes with the desired lsb-base package anyway...
2011-06-22 21:31:31 +00:00
zzz
229f0d1cfd public for android, who isnt starting via Servlet 2011-06-22 13:31:57 +00:00
c1c21e55b4 refresh patch to work with the recent changes to i2prouter 2011-06-21 23:43:04 +00:00
dfd36070eb Setting wrapper.ntservice.interactive=false so that a browser isn't opened at startup in Windows. 2011-06-21 23:42:34 +00:00
43ed1aa320 Make i2prouter fail more gracefully if the wrapper cannot be loaded
(either wrong architecture or i2psvc is just plain missing) and give
a more useful error message.
2011-06-21 22:45:21 +00:00
51282da51e Add russian translation for debconf 2011-06-21 15:00:35 +00:00
aaf50c6e7e routerconsole, susidns: update russian translation 2011-06-21 14:42:08 +00:00
40cd6fd88b merge of '53ab9aa78fdc17db47e5ce39aadcee9cee73cd29'
and 'ec72b34db00b2e5880f02e321a040b625907cc27'
2011-06-20 17:31:36 +00:00
14494e4aae i2psnark, i2ptunnel: update russian translation 2011-06-20 17:30:26 +00:00
d4e8517e9f Add Arabic translation of susimail 2011-06-20 16:29:45 +00:00
526e0cda24 Fixed RTL bug in console: Arabic is displayed with right aligned text using a custom console_ar.css 2011-06-20 16:27:58 +00:00
zzz
e468633408 trim content type 2011-06-20 15:21:03 +00:00
6d59a64eed Adjust the alignment of the langbox's flags 2011-06-19 08:45:29 +00:00
zzz
94e5aafa19 javadoc and more clearing at shutdown 2011-06-18 21:43:59 +00:00
zzz
0fa5fa40e1 * Shutdown:
- More job queue cleanups
    - RouterInfo readin job checks for quick shutdown
    - Note that we should improve profile read job
2011-06-18 19:58:50 +00:00
zzz
4caf48bd86 Fix broken executor initialization 2011-06-18 19:42:08 +00:00
zzz
66aec13ed6 final 2011-06-18 19:41:25 +00:00
zzz
67825a7668 * Shutdown:
- Add final shutdown hook
2011-06-18 17:01:15 +00:00
zzz
facbb8c950 * IRC Server: Send a message back if the tunnel is up but the server is down 2011-06-18 16:33:47 +00:00
zzz
95c88881d9 * Shutdown:
- Stop I2PThread from starting a new App context at shutdown
    - Stop LogWriter from starting a new App context at shutdown
    - Have router kill any leftover App context at startup
2011-06-17 19:51:17 +00:00
zzz
9ad8f35bca * Shutdown:
- Kill the global app context
    - Recognize multi-router case
    - Fix RandomIterator, YKGenerator, DHBuilder, NTCPConnection
      hanging on to old context -
      probably other offenders not yet found
    - Fix DHBuilder thread not stopping
2011-06-17 18:37:02 +00:00
zzz
4f722947e2 bump + rc 2011-06-17 18:26:15 +00:00
5420604ef8 Dropping 0004-configure-updates.patch as it's no longer necessary 2011-06-17 18:15:52 +00:00
47381686b5 Change text to "News updates" instead of "I2P updates" when install location is set to read-only 2011-06-17 18:13:49 +00:00
zzz
df793193aa take3 2011-06-17 03:19:57 +00:00
3bbe3ba707 typo fix 2011-06-17 00:16:54 +00:00
zzz
eeb03766b6 client executor kill take 2 2011-06-17 00:09:05 +00:00
zzz
f8ab2c144e execute the executors 2011-06-16 22:16:21 +00:00
zzz
32793ac12b i2ptunnel shutdown hook 2011-06-16 21:38:08 +00:00
zzz
83ee57adc7 * Shutdown:
- Implement and call shutdown for RouterWatchdog
    - Fix i2psnark DirMonitor not stopping
    - Fix UPnP-Disposer not stopping quickly
    - Implement and call YKGenerator and DHSessionKeyBuilder shutdown
2011-06-16 21:02:56 +00:00
zzz
4cff55daca old TimerTask cleanup 2011-06-16 20:57:13 +00:00
zzz
cb72bb0427 * Shutdown:
- Implement and call shutdown for BandwidthRefiller
    - Implement and register shutdown hook for Timestamper
    - Implement and register shutdown hook for Jetty console server
    - Fix UPnP-SSDPNotifySocket thread not stopping
    - Fix all but one UDP PacketHandler threads not stopping
2011-06-16 19:04:23 +00:00
d2d2b1e25d Prepare debian/ in preparation for 0.8.7 2011-06-16 17:19:10 +00:00
d56f9c7e6e Add another commented example to wrapper.config for those instances in which bindipv6only causes problems 2011-06-16 15:10:53 +00:00
zzz
518fdd8c03 AsyncFortunaRandomSource: Refactor refiller for concurrent and shutdown
Add shutdown hook for FortunaRandomSource
2011-06-16 12:42:25 +00:00
zzz
20ad7a44a7 clear profiles out of memory on shutdown 2011-06-15 15:20:00 +00:00
zzz
c655d23815 * Updates:
- Add the router version to the zip file comment in the updater
    - Add a class to extract the zip file comment
    - Require the sud version header to match the zip file comment
      to prevent spoofing of the version number, since the version
      number in the header is not covered by the sud signature.
2011-06-15 13:30:24 +00:00
ba3f467244 Windows Uninstall the service if I2P is installed, whether the service was enabled by the installer or not. 2011-06-14 22:04:57 +00:00
1a52363218 Attempt to remove the service before trying to install it.
My rationale for this:
1) in case someone is installing I2P on top of an already existing installation
   this will cause I2P to be shutdown
2) no hangs during the installation if i2p is already installed as a service
3) in case the NT service settings are changed in wrapper.config by us, this
   will force the service settings to be updated.
4) versions of I2P < 0.8.7 did not remove the service when uninstalling. If someone
   removed I2P in the past and reinstalls I2P--opting to run as a service--the
   installation process will hang.
2011-06-14 22:00:42 +00:00
336ecda7e6 GOTO lines refer to the non-existent EOF label. Adding the :eof to the end. 2011-06-14 21:45:20 +00:00
zzz
89191f4014 bump 2011-06-14 19:53:13 +00:00
zzz
399a05a5b5 * Router: Delete old libjbigi.so and libjcpuid.so at startup if jbigi.jar is newer.
This will force a reextraction by CPUID and NBI.
2011-06-14 19:37:30 +00:00
zzz
3c88c854bf more cleanup at shutdown 2011-06-14 19:27:46 +00:00
zzz
21b76f1ca1 concurrentify 2011-06-14 19:15:04 +00:00
zzz
d50cf13085 Register shutdown hooks for caches, in the first step of cleaning up
resources on shutdown, which is important in Android as the JVM
isn't going away. More to do.
2011-06-14 19:08:15 +00:00
zzz
620ec536c2 propagate from branch 'i2p.i2p' (head ea4e5cdef1ba51f6eb24828f05dd7ef66d5188ae)
to branch 'i2p.i2p.zzz.android' (head 03199a42adae7400f4627e7391fe3768493fd65f)
2011-06-14 18:48:26 +00:00
zzz
d4ca9ca36d shutdown hook logging 2011-06-14 18:48:09 +00:00
zzz
932f01df0d flag box tweak for two rows 2011-06-14 18:32:56 +00:00
zzz
19fd865e6f new targets for including jbigi in the updater 2011-06-14 18:31:47 +00:00
zzz
09fbc91d32 recognize ktorrent 2011-06-14 18:30:18 +00:00
zzz
38537de758 * NetDB: Increase floodfills and better adjustment based on available memory 2011-06-14 18:29:04 +00:00
zzz
bb8b428598 * jbigi / NBI / wrapper / installer:
jbigi and wrapper files for arm.
    Compiled on trimslice with gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) 
    Log postinstall errors to postinstall.log.
    java version "1.6.0_18"
    OpenJDK Runtime Environment (IcedTea6 1.8.7) (6b18-1.8.7-0ubuntu2.1)
    OpenJDK Zero VM (build 14.0-b16, mixed mode)
    GMP 4.3.2 (half the size of 5.0.2, and no speed difference) LGPLv3
    Wrapper 3.5.9 GPLv2
    All binaries stripped.

    As on the Android emulator, the stock BigInteger.modPow()
    has some serious bug on arm.
    Without the libjbigi checked in here, the JVM crashes almost immediately.
2011-06-14 18:11:43 +00:00
zzz
730965812b final 2011-06-14 18:08:40 +00:00
zzz
c0801297fb merge of 'e1f6b2db3a1f0f1cf4df67f63cf6becd41f534f4'
and 'edb2bfcff621cb4739bdf41520580e3f57bb1b2a'
2011-06-14 18:06:55 +00:00
959f7bf300 Arabic translation update of susidns 2011-06-14 13:43:29 +00:00
a07fb68e14 Windows: Don't install as a service by default.
With this checkin I'm trying to lessen the occurences of ticket #474:

If a user installs I2P on top of an already existing I2P installation with the service
enabled, the installer will hang. The Quit button cannot be clicked. Clicking
the X in the corner seems to roll back the installation.

Also #472: service is not removed when I2P is uninstalled
2011-06-14 12:08:04 +00:00
3c45f57b96 Add gettext to the build-deps for making debian packages 2011-06-13 19:52:07 +00:00
9e5651a9be Add translation notes 2011-06-13 15:14:20 +00:00
41fa06e871 merge of '9d48efc47a48fc445a045f37222713b42a698153'
and 'a9936ae0cadad0b2bb646c9af046b32f3c497188'
2011-06-13 15:13:14 +00:00
51722821e0 Make Finnish, Italian, Polish and Vietnamese translation configurable 2011-06-13 15:04:57 +00:00
a385f0bab2 Fix trailing newline 2011-06-13 15:02:27 +00:00
zzz
6623616c82 - Fail build if gettext fails. Change property at top of build.xml if
you don't have gettext and want the build to continue.
2011-06-13 14:31:41 +00:00
fcf61377ac * Really Clear the execute permissions on *.dll/*freebsd*so/*.jnilib like I meant
to do the first time that I noticed I added these files with those unneccesry
  attributes.
* Set the "manual merge" attribute on these files.
2011-06-13 10:14:23 +00:00
c8ac7bf8fd Remove "Working Directory" from the Uninstaller shortcut in Windows. With the
working directory set to $INSTALL_DIR, C:\Program Files\I2P is not removed in
XP.

...but even with the working directory removed, the the Uninstaller folder is left
within $INSTALL_DIR in Windows 7.
2011-06-12 23:14:02 +00:00
20d0221f5d We will install a copy of the 32 bit version of the wrapper libs when on x64
for use with a 32 bit JRE.

Rationale:
On an x64 system using a 32 bit jvm Without the 32 bit libwrapper, messages
like this will be shown in wrapper.log with the wrapper in MTN & I2P >= 0.8.7:

-----------------------
 Launching a JVM...
 WrapperManager: Initializing...
 WrapperManager: 
 WrapperManager: WARNING - Unable to load the Wrapper's native library 'libwrapper.so'.
 WrapperManager:           The file is located on the path at the following location but
 WrapperManager:           could not be loaded:
 WrapperManager:             $I2P/lib/libwrapper.so
 WrapperManager:           Please verify that the file is both readable and executable by the
 WrapperManager:           current user and that the file has not been corrupted in any way.
 WrapperManager:           One common cause of this problem is running a 32-bit version
 WrapperManager:           of the Wrapper with a 64-bit version of Java, or vica versa.
 WrapperManager:           This is a 32-bit JVM.
 WrapperManager:           Reported cause:
 WrapperManager:             $I2P/lib/libwrapper.so: $I2P/lib/libwrapper.so: 
                           wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
 WrapperManager:           System signals will not be handled correctly.
-----------------------

With libwrapper.so removed, one sees the following:

 WrapperManager: WARNING - Unable to load the Wrapper's native library because none of the
 WrapperManager:           following files:
 WrapperManager:             libwrapper-linux-x86-32.so
 WrapperManager:             libwrapper.so
 WrapperManager:           could be located on the following java.library.path:
 WrapperManager:             $I2P
 WrapperManager:             $I2P/lib
 WrapperManager:           Please see the documentation for the wrapper.java.library.path
 WrapperManager:           configuration property.
 WrapperManager:           System signals will not be handled correctly.
-----------------------

The 32 bit lib names, when installed on an x64 system, will match the alternate
names that the wrapper looks for.
2011-06-12 21:42:09 +00:00
ffffd2deb5 Add jcpuid binaries for Intel macs 2011-06-12 16:33:34 +00:00
796d104b83 add support for osx 2011-06-12 00:40:02 +00:00
654aa591c4 add isx86 check for x86_64 too 2011-06-12 00:19:45 +00:00
0a3bbb23e0 Preliminary jbigi support for osx. jcpuid will be coming later. 2011-06-12 00:12:58 +00:00
462d4fb8b2 Add support for OSX to jcpuid's mbuild.sh 2011-06-11 21:22:06 +00:00
eb17390b0a removing \n from the end of three lines to eliminate warnings during build 2011-06-11 17:31:55 +00:00
zzz
550bb1aaae fix the other gzip direction on android too 2011-06-11 17:05:24 +00:00
zzz
20f67ae8e9 Polish i2psnark translation from polacco@mail.i2p.
Fixed single quotes.
Email follows:

...


I attached file "snark-messages_pl.po.gz". I give you permission to use this file in I2PSnark distribution.
If you don't believe me that it is true polish translation, you can check it with some web translator.

Fist I used ordinary text editor to translate. Later I used Poedit <http://www.poedit.net/>.
And I don't know why it gives strange error messages when I save the file.

17:43:29: snark-messages_pl.po:172: a format specification for argument {0} doesn't exist in 'msgstr'
17:43:29: snark-messages_pl.po:177: a format specification for argument {0} doesn't exist in 'msgstr'
17:43:29: msgfmt: found 2 fatal errors

_______
greetz,
polacco
2011-06-11 13:17:09 +00:00
67f351bd50 Susidns in Polish 2011-06-11 12:04:58 +00:00
a87bd3ac50 update country names (some with the help of wikipedia) 2011-06-11 11:31:48 +00:00
e2627f175c Polish (partial) translations 2011-06-11 09:20:32 +00:00
66a2f88da3 Italian (partial) translations 2011-06-11 09:19:24 +00:00
3c9ac0e04d Chinese susimail translation 2011-06-11 09:17:20 +00:00
1bdf97d93f Finnish (partial) translations 2011-06-11 09:16:24 +00:00
08155939c3 Vietnamese (partial) translations 2011-06-11 09:13:28 +00:00
03a022c4fa Add transifex config for new chinese, finnish, italian, polish and vietnamese translations 2011-06-11 09:09:44 +00:00
13b9e42dc4 Update source strings 2011-06-11 08:41:05 +00:00
949d59487c Update with x64 windows info 2011-06-11 00:50:20 +00:00
zzz
3d695dac97 merge of '71a5174ccd130a08639b5c4a72382975747c7b43'
and '9591822ae7297e11b8efacb8456758babb1c6505'
2011-06-10 23:33:21 +00:00
zzz
4fedb3fb5a javadoc thx kytv 2011-06-10 23:30:49 +00:00
25876ffa28 fix formatting 2011-06-10 23:27:38 +00:00
zzz
dba92b0c42 actually use the 64 bit cpu detection 2011-06-10 23:24:54 +00:00
6317418028 New compile using x86_64-w64-mingw32-gcc 2011-06-10 23:05:06 +00:00
59b9694180 Re-add to make sure jbigi-windows-none_64.dll is 'good' 2011-06-10 22:31:26 +00:00
47632a3c4b Windows: Don't copy 32bit wrapper if installed via a 64bit jvm. 2011-06-10 22:28:33 +00:00
zzz
50578b34d0 * Profiles: Skip and delete a corrupt profile read from disk 2011-06-10 22:03:34 +00:00
zzz
c8afe4bcaf * Random: Add config setting prng.bufferSize to override the default 256 KB 2011-06-10 22:01:25 +00:00
zzz
3f5022cbea log tweak 2011-06-10 22:00:35 +00:00
zzz
f7751de1c3 propagate from branch 'i2p.cpuid' (head be49d2042be9311c16ec5cc4b5accd1366b93556)
to branch 'i2p.i2p' (head 0d92feaa69315781a8e98190c6d11b6b91355f8b)
2011-06-10 21:59:42 +00:00
194bd25e7b jbigi for 64bit Windows (jcpuid was checked in earlier).
Tested in Windows 7.
As has been customary, these were linked with gmp-5.0.2.

Built using 
"x86_64-w64-mingw32-gcc (GCC) 4.5.3" on Debian Sid with debug symbols stripped
using x86_64-w64-mingw32-strip.
2011-06-10 21:37:43 +00:00
8677a3e56c jcpuid for x64 Windows 2011-06-10 17:09:04 +00:00
4e99c459c2 all arch wrapper is handled by build.xml 2011-06-10 14:54:41 +00:00
2c0e6a33a4 merge of '14e8f430d97e8e6a9926d59299775ca98d590c8d'
and '2b3daf42c48bc7b83cfa015b1dba87538ee2f8db'
2011-06-10 14:53:59 +00:00
dev
cbaa62dd78 Added debug loggin of .war path. 2011-06-10 14:17:45 +00:00
162c5bca4b New: 64-bit wrapper for Windows.
The Tanuki Software website states "64-bit Windows versions of the Java Service Wrapper
are not currently being made available in the Community Edition." The Makefile
for x86_64 is missing from the upstream tarball as well. 

Well...included in this checkin is a diff against 
$WRAPPER-3.5.9-SRC/src/c/Makefile-windows-x86-32.nmake (see the README in
installer/libs/wrapper/win64.
2011-06-09 20:38:01 +00:00
3d9f68acc6 remove reference to postinstall.bat 2011-06-09 18:06:08 +00:00
7f96e279d7 Since postinstall.bat isn't used any longer:
- removing from /build.xml
- moving recent changes from installer/resources/postinstall.bat to installer/install.xml
- dropping installer/resources/postinstall.bat
2011-06-09 18:04:51 +00:00
zzz
0b4e430c70 * NativeBigI: Add support for atom, core2, corei, nano, pentiumm, geode
* JBigI:
      - Add new libjbigi-linux-xxx.so files built by sponge, now that we have
        CPUID.java support for them (thanks hottuna).
        See http://zzz.i2p/topics/306 for discussion and test results.

        64-bit processors (atom, core2, corei, nano):
        Built with GMP 5.0.2. License is LGPLv3.
        Built by sponge with GCC 4.4.4, downloaded from
        http://sponge.i2p/files/jbigi/gmp-5.0.2/
        For 64-bit processors, both performance testing and
        the GMP changelog http://gmplib.org/gmp5.0.html led us to use 5.0.2
        for both the 32- and 64-bit versions, even though the files are twice as big.
        5.0.x contains specific optimizations for atom and nano.
        All 64-bit libs have _64 appended.

        32-bit processors (pentiumm, geode):
        Built with GMP 4.3.2. License is LGPLv3.
        Built by sponge with GCC 4.4.4, downloaded from
        http://sponge.i2p/files/jbigi/gmp-4.3.2/
        The 4.3.2 files are half the size of those built with GMP 5.0.2, and there was
        little or no performance difference between the two versions for 32 bit processors.
2011-06-09 16:04:06 +00:00
dev
747d1f45a8 Added Geode support. 2011-06-09 15:11:31 +00:00
dev
6cf1591688 Large but simple refactor of CPUInfo interfaces and CPUInfoImpl classes.
Added interface and class for VIA cpus. 
Added support for VIA c5 cpus and some Via nano cpus (a few might be missing).
2011-06-09 15:00:30 +00:00
dev
562cabfbd6 Fixed bad merge, re-added CPU flags hex output. 2011-06-09 13:03:46 +00:00
dev
4033361f10 Added support for PentiumM where applicable. Added P4Compatability for a few processors. 2011-06-09 12:54:48 +00:00
dev
032faaeb73 run identifyCPU() on static for cleaner code. 2011-06-09 09:00:04 +00:00
dev
fd178f6ce5 Removed typos. 2011-06-09 08:45:44 +00:00
dev
28030dd470 Only run identifyCPU() once. 2011-06-09 08:41:51 +00:00
dev
11fb321674 Completed isXXXCompatible support for Bobcat/Atom/Core2/Corei
Added hasX64 for all CPUs.
2011-06-09 07:40:52 +00:00
zzz
3d18255eb1 * LogManager: Use DataHelper methods for loading and storing config 2011-06-08 20:16:48 +00:00
zzz
c5f04ee9c4 - Don't do 'mtn list changed' if not in a workspace or not needed 2011-06-08 20:15:53 +00:00
dev
366ed2b666 Formatting, tabs->spaces 2011-06-08 18:10:13 +00:00
dev
26899e488e Added more fine grained compatability for cpus in CPUID. Not implemented in NativeBigInteger yet. 2011-06-08 18:07:46 +00:00
d57925e848 bump version to -19 to reflect the upgraded wrapper and jcpuid/jbigi binaries for windows and freebsd 2011-06-08 14:07:42 +00:00
zzz
b03f75367d * Build: Add standard manifest to jbigi.jar
* Update wrapper license
2011-06-08 12:44:42 +00:00
dev
2cebe86524 Added support for AMD Bobcat APUs 2011-06-08 08:42:09 +00:00
dev
0a900088ca Formatting 2011-06-08 08:27:01 +00:00
dev
cdb1284e9e Added method for getting extended EBX CPUID flags. 2011-06-08 08:26:37 +00:00
dev
3a5347f88f Remove doCPUID caching, to due to having to much overhead compared to acutally just doing the doCPUID every time. 2011-06-08 08:25:09 +00:00
e18080c4dc clean the jbigi/jcpuid intemediate binaries (core/c/jbigi/{bin,lib} and core/c/jcpuid/lib) 2011-06-08 08:15:23 +00:00
dev
831848e938 Added caching for doCPUID 2011-06-08 08:11:28 +00:00
54ed70ae4a Diable launch-i2psnark (not used) 2011-06-08 08:10:09 +00:00
e3abc25c6b New jbigi/jcpuid compiles for Windows.
Compiled using mingw32 in Windows XP (gcc --version returns v4.5.2).

As was done with the Linux and FreeBSD builds, jbigi was linked with gmp-4.3.2
for the 32bit cpus and 5.0.2 for the 64bit CPUs.

Since there current isn't a free version of the wrapper for x64 Windows, there
aren't any x64 versions of these dlls.
2011-06-08 08:07:53 +00:00
dev
9f9e44bada Improved toString() and formatting. 2011-06-07 20:54:40 +00:00
dev
ff4b6504a1 Formatting 2011-06-07 20:13:00 +00:00
dev
55c6cdcae8 Formatting 2011-06-07 20:06:10 +00:00
00f2750937 Wrapper upgrade, part two. With this checkin I'm adding the new files that
I missed in revision 97672ae2bf487e93c095bb1d142c3df1a2f3d7d7

*Sigh*
2011-06-07 17:40:06 +00:00
dev
9c41bfeaa4 Added support for loading Atom,Core2 and Corei jbigi. 2011-06-07 17:04:15 +00:00
dev
3f43469104 Formatting 2011-06-07 16:35:51 +00:00
dev
89c3f894d7 Added support for most AMD cpus. 2011-06-07 16:27:26 +00:00
dev
33ec7babf9 Added support for a few more intel i3/i5/i7 2011-06-07 15:14:45 +00:00
f5026a9cbf merge of '97672ae2bf487e93c095bb1d142c3df1a2f3d7d7'
and 'a81e35f3ea0e85227f834ec3bd4c40c7c18291f8'
2011-06-07 14:53:50 +00:00
b2e8d3cedf Here is the long awaited upgrade of the wrapper.
The aging v3.1.x of the java wrapper is being replaced in this
checkin with the latest (current) stable release, 3.5.9.

There is now only one copy of wrapper.jar, located in wrapper/all.
The build.xml scripts have been changed to reflect this new path.

All binaries--with the exception of solaris (I don't have 
SPARC hardware)--have been stripped.

FreeBSD x64 is being included in this release.

I have only included the x86 macosx wrapper due to not having a
system to test the x64 code on. On the plus side, the wrapper is 
universal (a FAT powerpc & Intel Mac) binary. No more prompting
to install Rosetta!
2011-06-07 14:53:10 +00:00
dev
6121ccc46f Support additional platforms and processors. 2011-06-07 14:47:29 +00:00
zzz
37ce3305e0 Drop libjbigi-freebsd-viac32.so, dup of libjbigi-freebsd-pentium3.so, case already handled in NBigI. 2011-06-07 14:17:08 +00:00
zzz
f02e44bf91 * Drop andorid/ directory; further development will happen in
an android-only branch.
2011-06-07 14:14:19 +00:00
57fc896e59 Remove leftover debugging "echo" statement 2011-06-07 14:03:11 +00:00
46b4ec4819 Compiled with gcc (GCC) 4.2.1 20070719 [FreeBSD] linked against openjdk6
with PIC and stripped
2011-06-07 11:46:45 +00:00
83ccc0ff0a Change attr execute to false. Files were added with mode 755 in error. 2011-06-07 01:40:49 +00:00
6d70224da4 Add x64 for FreeBSD 2011-06-07 00:57:25 +00:00
7b04c7e210 FreeBSD: Updated jbigi/jcpuid compiles.
Just as was done with Sponge's compiles for Linux, the 32bit libs/cpus were linked with gmp 4.3.2.

The 64bit compiles were linked with gmp 5.0.2. The 32bit compiles for 64bit cpus were linked with 5.0.2 as well.

All .so files were compiled with the default gcc on FreeBSD-8.2-RELEASE
gcc (GCC) 4.2.1 20070719  [FreeBSD]
2011-06-07 00:48:37 +00:00
zzz
95189c8f53 Android:
- Move the classes around
  - Split into Activity and Service
  - Add status bar notification
  - More config changes
2011-06-06 13:47:47 +00:00
zzz
7e84451ac3 Android:
- Import the main_rules file and remove the copied rules
  - Set the version code and name in the apk badging
  - Build target is 8 to allow SD install, MIN-SDK is still 3
  - Fix NPE on new install
  - Remove some debug code from NBigI
2011-06-05 22:38:35 +00:00
15b9615a1c Debian: update path of installed javadocs 2011-06-05 20:02:48 +00:00
4dc9cfb457 Debian: re-work patch to compensate for recent runplain.sh & wrapper.config changes 2011-06-05 20:02:13 +00:00
1250617d6c Make runplain.sh even more shell agnostic 2011-06-05 19:54:21 +00:00
ca5f35aea9 merge of '7f219c63dd48ba4ae26ad87603df4cb41ada2c59'
and 'afa8f9152e731dd11cd6a3649d45caaeb65b1b82'
2011-06-05 15:03:05 +00:00
3dfa982b39 Missing swedish translation and fix of html tags by digitalmannen 2011-06-05 15:02:20 +00:00
zzz
b2a5a94ce0 -18 2011-06-05 14:01:12 +00:00
zzz
d834c8063c merge of '90dce8fafc543f94a2aefe704bf4b3e63b24eab9'
and '9d726cbaf7d1591c47b4dd7e6aed864d2c09e25d'
2011-06-05 13:58:14 +00:00
zzz
d28f4bd24b * JBigI:
- Replace old non-PIC 62-bit linux libs (GMP 4.1.4 built in 2005)
        with PIC libs built with GMP 5.0.2. License is LGPLv3.
        Built by sponge with GCC 4.4.4, downloaded from
        http://sponge.i2p/files/jbigi/gmp-5.0.2/
        For 64-bit processors, both performance testing and
        the GMP changelog led us to use 5.0.2 for both the 32- and 64-bit versions,
        even though the files are twice as big.
        See http://zzz.i2p/topics/306 for discussion and test results.
        libjbigi-linux-athlon64.so was a 64 bit file; by the new naming standard
        supported by NativeBigInteger, it is now a 32-bit file and the
        64-bit one is libjbigi-linux-athlon64_64.so.
        All new 64-bit libs will have _64 appended.
      - Update build docs
2011-06-05 13:52:43 +00:00
zzz
48f4c7286d - Remove libjbigi-windows-athlon64.dll which was a duplicate of libjbigi-windows-athlon.dll;
NBI now tries athlon as a fallback for all 64-bit processors.
2011-06-05 13:31:26 +00:00
zzz
d9f80e9de6 GMP is not in core lib 2011-06-05 12:50:04 +00:00
zzz
d1e42233a8 * DSAEngine: Add code for alternate implementation using Java libs;
disabled by default. Add test code to verify identical results
                 and compare speed.
2011-06-05 12:40:59 +00:00
6110957921 Fix html tags in swedish translation 2011-06-05 11:59:38 +00:00
zzz
d308d7da97 remove unnecessary zeroing code, javadoc 2011-06-05 11:19:32 +00:00
zzz
4d34078678 * Data: Remove duplicate signature verification code
in RouterInfo and LeaseSet
2011-06-05 11:18:35 +00:00
zzz
8d42ebc2f0 * Console: Tag stat descriptions at declaration rather than in Strings.java 2011-06-05 11:16:57 +00:00
zzz
87cad7eaee * JBigI: Replace old non-PIC 32-bit linux libs (GMP 4.1.3 built in 2004)
with PIC libs built with GMP 4.3.2. License is LGPLv3.
             Built by sponge with GCC 4.4.4, downloaded from
             http://sponge.i2p/files/jbigi/gmp-4.3.2/
             The 4.3.2 files are half the size of those built with GMP 5.0.2, and there was
             little or no performance difference between the two versions for 32 bit processors.
             See http://zzz.i2p/topics/306 for discussion and test results.
2011-06-05 11:06:56 +00:00
b1f1c28c5c Swedish translations (thanks 123hund123, hottuna and digitalmannen) 2011-06-05 10:15:05 +00:00
b612e925df merge of 'b87fbef6393383ccfe6d24286dbbf9ffc79fdd29'
and 'c0bbd3c3725889c45887d4cdce900908d8918df8'
2011-06-05 08:51:48 +00:00
af629d2442 minor change to i2psnark l10n es 'n pt 2011-06-05 08:48:58 +00:00
zzz
e232a641a3 android: fix gmp configure args 2011-06-05 02:09:12 +00:00
zzz
35495e4d5a Android:
- Add a version update script
  - Disable NTP
  - Disable external I2CP
2011-06-04 19:31:45 +00:00
zzz
5974160805 * Router:
- Add a lock for reading/writing the router.info file
      - Check our RouterInfo validity after reading and before saving,
        to catch fatal errors sooner
2011-06-04 12:05:48 +00:00
zzz
4e16ef35a2 * KeyGenerator: Restore old return type to not break ABI (thx kytv) 2011-06-04 12:04:18 +00:00
zzz
885d549e84 * NBigI: Recognize Android 2011-06-04 12:03:35 +00:00
zzz
173343e049 Android:
- More efficient build of i2p.jar and crypto.jar
  - More build fixes
  - Merge package configuration resource with configuration file on device if it exists
  - Add launcher icon, resized from installer/resources/eepsite.help/help/lib/itoopie.png
  - Start of a libjbigi build script
  - Increase min API to 3 so we can use JNI
2011-06-04 00:29:02 +00:00
zzz
c3bcb8d020 fix misspelled file causing build dependency problems 2011-06-03 13:20:50 +00:00
zzz
d7de8ae630 Android:
- Fix up build.xml to work with tools version 11
  - Get rid of dot at front of project name
  - README.txt updates
  - logger_config additions
2011-06-03 12:14:54 +00:00
d5f529819f merge of '6ad44c8ad61fa5a65207491cab744ddfa8f0f3ca'
and 'db7c4479731f94687d64bea76eafeb4c62e14f1a'
2011-06-03 01:31:31 +00:00
d2093444a6 update i2psnark pt 2011-06-02 21:34:50 +00:00
3f15c4324b update i2psnark one string in es and de 2011-06-02 20:32:49 +00:00
zzz
219d7fd8c3 fix ElGamalTest compile; fix jbigi.jar path to speed up the test 2011-06-02 20:29:15 +00:00
c5c6a9fa17 update routerconsole Deutsch 2011-06-02 20:23:36 +00:00
78779fe92f update Castillian 2011-06-02 19:36:53 +00:00
b37a64905b fix/merge 2011-06-02 19:07:38 +00:00
675ac79443 merge of '65af54c284a3e8def1740b26114d3ed42ccae172'
and 'd805aad2dab23264b9c386c8ffabea464fece871'
2011-06-02 19:02:29 +00:00
14ea9c2928 fix/merge 2011-06-02 19:02:12 +00:00
ec6084cd37 merge of '468d5271753b5b44fff6890ecd33d03b684d8e18'
and 'cd4b79fe5aae3f17a3def305c7a3494a8db5dc74'
2011-06-02 18:57:06 +00:00
b65cbb0f78 Remove txt file in BOB.jar as per zzz's request. 2011-06-02 18:53:45 +00:00
zzz
fe15db51d8 - Logging tweaks inspired by Android
- Disable reusing Deflater on Android
2011-06-02 18:29:06 +00:00
zzz
761ad38bcc * HMAC:
- Javadocs and cleanups
      - Use SimpleByteCache
      - Comments and speculation
2011-06-02 13:37:35 +00:00
zzz
2a5ed938bb update generateKeyPair() return type to make it easier 2011-06-02 13:34:26 +00:00
zzz
c5c4e3c7ce * ElGamalAESEngine: Fixups required after SessionKey enforcement
* SessionKey: Enforce data size and prevent reuse like the other SimpleDataStructures
2011-06-02 13:33:03 +00:00
zzz
94af6550fa HMAC256 is used by Syndie 2011-06-02 13:30:33 +00:00
zzz
c767644c8f typo 2011-06-02 13:29:27 +00:00
zzz
a3ee593d0b give up on a reseed host after 90% errors 2011-06-02 13:27:03 +00:00
zzz
733d6db56e one more illegal character 2011-06-02 13:25:23 +00:00
zzz
6d938a12f6 android build fixes 2011-06-02 13:24:47 +00:00
8a56531c90 Don't prefer IPv4 but add the option commented out to wrapper.config. Make the option configurable in runplain.sh 2011-06-01 14:42:18 +00:00
zzz
43332bb6d0 * Crypto:
- Use java.security.MessageDigest instead of bundled GNU SHA-256 code
        if available, which it should always be.
        5 to 20% faster on Oracle JVM; 40 to 60% on Harmony;
        5 to 15% on JamVM; 20x (!) on GIJ.
      - Use java.security.MessageDigest instead of bundled Bitzi SHA-1 code
        if available on non-Oracle JVMs, which it should always be.
        Not faster on Oracle JVM; 30 to 60% faster on Harmony;
        15 to 20% on JamVM; 10-15x (!) on GIJ.
2011-06-01 11:44:10 +00:00
5990dd5879 add description for debian-clean target 2011-06-01 10:24:07 +00:00
030a95cdd1 reference debianhowto 2011-06-01 09:54:32 +00:00
18d3536ffe ConfigClients stopClient stubbed out. 2011-06-01 03:59:12 +00:00
3b80f53b8e There is more than one way to peel a pineapple... 2011-06-01 02:49:14 +00:00
5912c60692 Remove the one little html file that ends up in BOB.jar. The file is NOT a javadoc file, it is a package file. Still, it is zapped. 2011-06-01 02:32:00 +00:00
f8dc8a298e Debian: refactor patch 2011-06-01 00:11:03 +00:00
a3dd538afb typo fix 2011-06-01 00:09:53 +00:00
a90b8aa03a Prefer IPv4 connections
In some distributions (such as Debian, for example) net.ipv6.bindv6only=1 is
set by default. In some configurations, networking in java applications will be
broken. Someone recently came into #i2p experiencing this very problem.

This change closes #464.
2011-06-01 00:04:23 +00:00
313ee79bae hide syndie from "all" target and disable syndie target 2011-05-31 23:32:27 +00:00
97f97448d5 Clean up debian options in build.xml 2011-05-31 23:29:06 +00:00
zzz
3677cadcca * jbigi: Add support for solaris 2011-05-31 20:21:51 +00:00
455b5529b4 jbigi: Add support for SunOS/Nexenta/Solaris to the build*.sh scripts 2011-05-31 19:37:29 +00:00
60204fef24 Debian: initscript: Don't spew warnings when chown'ing files that don't yet exist 2011-05-31 18:50:54 +00:00
45064ec37e libjcpuid for Solaris x86
Compiled using
gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2nexenta7) on Nexenta 3.0.1
2011-05-31 18:20:32 +00:00
zzz
4ecacc7607 * HTTP Proxy: Don't send redirect for POST (thx kytv) 2011-05-31 15:57:39 +00:00
43ba27126c Debian: Refactor jcpuid & jbigi patches to deal with SunOS support 2011-05-31 11:32:07 +00:00
527c9ba5dd Add support to jbigi/jcpuid for Solaris/SunOS 2011-05-31 11:30:10 +00:00
zzz
d4bf2523a6 * I2CP:
- Append I2CP Version information to the Get/Set Date Messages,
        so that both the router and client are aware of the other side's version,
        and future protocol changes will be easier to implement.
        Previously, router version information was not available to the client,
        so when router and client were in different JVMs,
        old clients would work with new routers
        but new clients would not work with old routers.
        After this change, we can design future changes so that new clients
        will work with old routers.
        This is an enhancement to the old protocol version byte sent by the client,
        which we have never changed and probably never will.
      - Prevent a client from setting the router's clock
      - Javadocs
2011-05-30 16:31:09 +00:00
zzz
acb4bac5e6 * netDb: Don't refetch expiring router infos if we have enough 2011-05-30 16:29:33 +00:00
zzz
cbef38ac11 * i2psnark: Restrict swarm size for small torrents 2011-05-30 16:25:24 +00:00
f9ffab62f4 Debian: Refactor jcpuid patch
Changes made to patch b/c of  kFreeBSD changes to build.sh I recently checked
in.
2011-05-29 15:12:46 +00:00
656292e1b1 Debian: Since jetty-i2psnark.xml has been disabled, there are no xml files dumped to pkg-temp. 2011-05-28 21:36:17 +00:00
ed8a065da9 Debian: Rework patch to work with the updated runplain.sh 2011-05-28 20:21:45 +00:00
9834a36787 merge of '5b0e335af7a9ce35cb7e40cd550b7e65af923218'
and 'd25f86bdd190afae59745e22e4fd0c2d8911a8ac'
2011-05-28 20:17:09 +00:00
33b9a5c2ce Make runplain shell agnostic
Braces were put around variable names so that router will run in kFreeBSD.
runplain.sh should now be shell agnostic (it runs in dash. it even runs in
*posh*, a ridiculously picky shell).
2011-05-28 20:14:36 +00:00
zzz
1eb58a84df * i2psnark: Fix bug preventing Robert from connecting to snark (thx sponge) 2011-05-28 20:11:52 +00:00
c9c35a3e5a jcpuid: minor edits so that compilation will work with Debian kFreeBSD 2011-05-28 17:26:24 +00:00
e0dd52a4dc build.xml: Don't copy jetty-i2psnark.xml to pkg-temp 2011-05-28 12:52:23 +00:00
zzz
393d813d05 Don't re-append the query string to the redirect URL,
which caused eepget to repeatedly retry the new redirect
of an i2paddresshelper query by the HTTP proxy.

This was clearly non-compliant (the Location: header requires
an absolute URI including any query string).

This was part of the original redirect handling added by
jrandom to eepget back when it was in syndie;
appending that changelog just in case this hackery was
required by Freenet USKs, which I doubt.

Also, reset the redirect counter when retrying.

==============

	Revision: 62a8cac8565958d111d0a47a443c964918d2e3ef
	Parent:   277fe109ea4416f7d8a6dba6e09cd4f605a8ce1a
	Author:   jrandom@i2p.net
	Date:     10/22/2006 15:06:30
	Branch:   i2p.syndie

	Changelog: 
	    ...
	    - add support for HTTP 301 redirects to EepGet (so freenet USKs work as
	      intended)
2011-05-27 21:41:49 +00:00
0000e4f28d Debian: Ship custom router.config to disable updates via the I2P router. Updates, to keep with Debian policy, must be done via the package manager. 2011-05-27 17:43:05 +00:00
zzz
e3a3a99317 add cpuid 2011-05-27 16:18:38 +00:00
zzz
6a9f73bd61 quick jbigi test script 2011-05-27 16:12:10 +00:00
zzz
2c3be29016 * JBigI:
- Refactor to handle 64 bit libs and a list of fallback libs
      - Logging tweaks
      - Only check for one file name in library path
2011-05-27 15:04:40 +00:00
zzz
8eb10872b8 * CPUID:
- Recognize amd64 as x86
      - Only check for one file name in library path
      - Log tweaks
2011-05-27 15:02:03 +00:00
zzz
d5fd682985 * Console: Fix router.updateThroughProxy being set to false after saving
change on /configupdate when install dir is read-only.
               (ticket #466)
2011-05-27 14:58:57 +00:00
zzz
8f861f7ba2 javadoc 2011-05-27 14:57:36 +00:00
efe53c831d Debian: Since browser launch is disabled within the I2P codebase for the i2psvc user, removing patch to disable it 2011-05-27 13:35:36 +00:00
0dba0a1d6f typo fix 2011-05-27 09:45:42 +00:00
89c01696cc Debian: Remove cruft that remained in debian/rules from the times in which cpuid couldn't be build for i386. 2011-05-27 09:35:17 +00:00
164f060a40 Debian: Creating a new fourth package by splitting the i2p package in two
This commit splits the i2p package into a second package, i2p-router.
   * The new 'i2p-router' package does not depend on the java-wrapper nor jbigi.
     Jbigi is recommended. This package can be installed on the ports or 
     distributions that the java-wrapper is not available for.
   * The new 'i2p' package depends on i2p-router, libjbigi-jni, and the java-wrapper. 
     This package will add the i2psvc system user and the initscript. Existing
     users of the i2p package will have the i2p-router package pulled in
     automatically and for them there will be no usability changes.

 Executive summary: No functionality changes will take place for either those
		    that installed the i2p package in the past or those that
		    install the newly split i2p package. For them, "The Song
                    Remains the Same."
2011-05-27 09:33:20 +00:00
e347ee5880 Debian: debian/README.Debian updates to reflect packaging changes 2011-05-26 21:56:42 +00:00
a4ea70b33b Debian: Move scripts/ to doc/i2p/examples 2011-05-26 21:40:31 +00:00
4433a3db06 Debian: Install runplain.sh as /usr/bin/i2prouter-nowrapper 2011-05-26 21:38:50 +00:00
e019d3b8d7 Debian: create symlinks in doc/licenses that point to existing licenses in /usr/share/common-licenses 2011-05-26 21:33:05 +00:00
1f497e171a Debian: Add certificates directory to $I2P 2011-05-26 19:12:32 +00:00
cd8c954513 Debian: Drop junit from Build-Depends-Indep 2011-05-26 18:53:22 +00:00
d08d5ffd64 Debian: add debian/copyright to ant clean target 2011-05-26 18:51:36 +00:00
8744eab46d Debian: drop dynamically created copyright file 2011-05-26 18:46:41 +00:00
5d7e936aed Remove legacy standalone i2psnark from package 2011-05-26 15:49:43 +00:00
e786da2605 Remove information from debian/README.Debian that is no longer applicable 2011-05-26 14:45:10 +00:00
b6fab829cc Debian packaging fixes 2011-05-25 23:09:58 +00:00
zzz
150cb30339 minor NBI tweaks and comments 2011-05-25 22:13:18 +00:00
zzz
724d8de9ae call the 64 bit cpuid, even if we dont use it yet 2011-05-25 21:35:21 +00:00
zzz
ddcd8cbb10 prep for new 32 bit cpus 2011-05-25 21:23:40 +00:00
zzz
f5f4f14b7e Drop libjbigi-linux-k63.so and libjbigi-freebsd-k63.so that were identical
to k62 versions; add mapping in NativeBigInteger.
2011-05-25 21:14:16 +00:00
zzz
6616ccd3b4 cleanup in prep for more changes 2011-05-25 21:05:20 +00:00
075f89f43c Update jetty version number--we use version 5.1.15. 2011-05-25 18:11:15 +00:00
9a836ed072 merge of '0ab9435836f60e748b89344771eea555219e6262'
and '13180c845a0d2cce619be3b9b139295f2ff49ece'
2011-05-25 17:09:29 +00:00
zzz
552608744d * CPUID: If the 64 bit extract worked but the load failed, try 32 bit 2011-05-25 16:54:25 +00:00
2accbdcf05 Operation close #354 part one of ??: Make the router console's help pages valid html. We *LOVE* valid HTML. 2011-05-25 16:52:52 +00:00
ab17bd3150 Built using gcc (Debian 4.4.5-8) 4.4.5 in Debian Squeeze within clean chroot jails.
-fPIC and stripped.
2011-05-25 16:00:11 +00:00
zzz
d201a29d03 * HTTP Proxy: Address helper refactoring, address book add form 2011-05-25 13:52:18 +00:00
zzz
c4bbcc4617 * CPUID: Load 64-bit libcpuid if available 2011-05-25 13:48:45 +00:00
zzz
82a0ac16f1 increase min floodfills again 2011-05-25 13:36:17 +00:00
zzz
27b48034c5 b32 cleanups 2011-05-25 13:34:32 +00:00
641e71c141 close tags in eepsite help files 2011-05-24 23:16:15 +00:00
4fd8da8041 Fix errors that tests/scripts/checkxml.sh found 2011-05-24 22:33:28 +00:00
zzz
68dccdfe2f try to fix RrdGraph GIF exception 2011-05-23 23:24:54 +00:00
zzz
592361b1a4 * Console:
- Disable zh translation in graphs on windows due to font issues
      - Fix NPE at startup
      - Graph tweaks
2011-05-23 19:22:33 +00:00
zzz
6e4df8830a - Force news refetch after URL change 2011-05-23 19:19:07 +00:00
zzz
7ab95d0144 javadoc 2011-05-23 19:16:33 +00:00
4ea5622842 mbuild.sh fixups : add new jcpuid/mbuild.sh, edit jbigi/mbuild-all.sh -- pedantic naming 2011-05-23 04:52:29 +00:00
zzz
606300a042 * GeoIP: Read countries.txt in UTF-8 2011-05-22 18:36:08 +00:00
zzz
96cf598691 javadoc 2011-05-22 18:34:41 +00:00
zzz
6b923c7251 Fix build error that omitted local jetty patches from org.mortbay.jetty.jar;
affected 0.8.4 and 0.8.6 installers. Include jar in the updater for the next release.
        Thx KYTV.
2011-05-22 18:33:51 +00:00
zzz
18e57d19db doc update 2011-05-22 14:31:56 +00:00
45f3020924 mbuild.sh document and fixes, mbuild-all.sh add cpu types 2011-05-21 18:26:10 +00:00
zzz
d8a3cb0d58 change build script to GMP 4.3.2 2011-05-21 17:09:30 +00:00
b5dc9b6f5a Update geoip database and country list 2011-05-21 01:07:03 +00:00
zzz
38a6e6b212 restore old cpuid assembly for x64 2011-05-20 16:26:40 +00:00
zzz
627519e69c disable debug 2011-05-20 16:25:46 +00:00
zzz
2f2e0e539a history for props, -1 2011-05-20 14:23:31 +00:00
zzz
e42b78e177 propagate from branch 'i2p.i2p.zzz.naming' (head 9626e0df682c8d5f706d2c814158ba451f3ebeb5)
to branch 'i2p.i2p' (head a3969e6c9c4fd5bfd69cd716ce0df191ad2af634)
2011-05-20 14:12:07 +00:00
zzz
4b19801cdb try to prevent out-of-order logging at shutdown 2011-05-20 14:09:36 +00:00
zzz
3d76354cbb fixup after prop 2011-05-20 13:55:13 +00:00
zzz
e2c98ac134 propagate from branch 'i2p.i2p.zzz.jrobin159' (head 08df645290d8e156d88930ddaf71b3f3d8af419d)
to branch 'i2p.i2p' (head 69c9e6bd0c6894c335f7d9892aa28ac7d6389907)
2011-05-20 13:52:35 +00:00
zzz
d4fe76afee hide graph link in summary bar when disabled 2011-05-20 13:47:09 +00:00
zzz
3352c45517 - Rewrite cpuid.c so it builds with PIC (source only, binary not updated yet) 2011-05-20 13:25:19 +00:00
zzz
0e719b8eb0 fixup after prop 2011-05-20 13:17:04 +00:00
zzz
ff520b74dc propagate from branch 'i2p.i2p.libgmp' (head 41a57954f7e78e57f8eb5e30e8ebde7fd75b15dc)
to branch 'i2p.i2p' (head d174e772ebd4f3e3eac5c9b5abd7f736c2527eb2)
2011-05-20 13:13:26 +00:00
zzz
48bf618ae5 final 2011-05-20 12:49:29 +00:00
zzz
d6c1202e4b summary bar tweak 2011-05-20 12:48:58 +00:00
zzz
20452c9387 * Certificate: Fix creation bug; improve router cert generation 2011-05-20 12:46:50 +00:00
zzz
64a753116b * i2ptunnel: Fix server-side stripping of X-Accept-encoding 2011-05-20 12:43:50 +00:00
5ce439ffc4 merge of '97f5690455a3a74e68056739ea7145c8059454c6'
and 'e01e159c9825a36e8e640bb3cf8d0f1200b1be2f'
2011-05-19 05:47:02 +00:00
00f2721640 upd 2011-05-19 05:44:13 +00:00
454a310bbe make translation more castillian 2011-05-18 21:40:11 +00:00
18952f5109 upd routerconsole messages_fr.po 2011-05-18 11:37:39 +00:00
zzz
7377086aae 0.8.6 2011-05-16 19:58:19 +00:00
zzz
9f7cc9d887 add update host 2011-05-13 21:04:58 +00:00
zzz
ffa9ea9cd2 Increase min floodfills; decrease min routerinfo expiration 2011-05-13 20:13:56 +00:00
zzz
f9654661bb * Use partitions of fast tier for various hops of client tunnels; minor cleanups 2011-05-11 14:40:55 +00:00
zzz
5ce06d02b4 the rest of -2 2011-05-06 12:35:19 +00:00
zzz
c356792d02 * Tunnels and profiles:
- Increase max fast and high-cap tier sizes
      - Slow profile eval cycle after sufficient uptime
      - Fix bug which started a new build after a successful build
      - Misc. cleanups
2011-05-06 01:10:28 +00:00
90642a8ab5 warning 2011-05-05 01:59:20 +00:00
dev
0ae798d840 added simple release checklist file 2011-05-04 22:09:09 +00:00
zzz
6199e7b74c oops fix path to newly tagged files 2011-05-03 13:15:13 +00:00
1e9ac05b63 merge of '83e7567c0dbdabe57c21a0bfdc9d70acbbc71463'
and 'f783d7f664254691074c1542a6d8937731e2b503'
2011-05-02 16:24:54 +00:00
ed338d9cfa minor tweak to es 2011-05-02 16:24:48 +00:00
a84e6f7854 typos 2011-05-02 11:23:01 +00:00
zzz
fe21748b2d -1 2011-04-28 18:46:09 +00:00
zzz
8b184f8c03 one more zero-length torrent check 2011-04-28 18:05:03 +00:00
zzz
5ed22d5c16 cleanups 2011-04-28 18:04:31 +00:00
zzz
525e0b4518 tag peers.jsp UPnP text 2011-04-28 18:03:18 +00:00
zzz
e8d94982e4 * Console: Try to prevent cascaded IllegalStateExceptions in .jsp code;
add logging for original error
2011-04-28 18:01:48 +00:00
zzz
38db0b0ff3 * UPnP: Strip trailing nulls from incoming XML to prevent
"content not allowed in trailing section" exceptions
      from stupid routers
2011-04-28 17:57:30 +00:00
e4a8b9621d site (plugin) 2011-04-25 06:29:20 +00:00
66ea1c060a merge of 'aee566a8e2250d2461203b83c7a3434b29f771f9'
and 'f6410ea071e6b154e0c14deea8ef6eaa35cb7faa'
2011-04-24 07:38:51 +00:00
50dabfec8c typo typo 2011-04-24 07:37:20 +00:00
a8722e033c tweaks es 2011-04-20 00:28:02 +00:00
1cec98d180 tweaks es 2011-04-20 00:24:37 +00:00
zzz
e62d9dfa48 more cleanups, clickable logo 2011-03-30 00:56:15 +00:00
zzz
6dd7431ccd message cleanup 2011-03-30 00:42:08 +00:00
zzz
7020bfd521 display cleanups 2011-03-30 00:19:28 +00:00
zzz
0fcf13ef73 * susidns:
- IDN toASCII improvements (old bean)
- Add 'other' filter
- Fix jsp 500s
2011-03-29 23:17:14 +00:00
zzz
9e37a5a4af * susidns:
- Enforce basic rules on host name additions
- Split up form
- IDN toASCII improvements
- Log message improvements
2011-03-29 22:46:59 +00:00
zzz
172541a368 implement delete on details page 2011-03-29 03:29:23 +00:00
zzz
9f475c03cb fix details for published book 2011-03-29 03:02:17 +00:00
zzz
fbfffa9987 - SusiDNS cleanups
- Logging cleanups
2011-03-29 02:16:42 +00:00
zzz
8ae398d786 - Isolate span read failures to that span
- Don't keep separate count of spans and levels, use BSL HashMap sizes
- Fix SkipList counts when read in
2011-03-28 20:33:57 +00:00
zzz
a818e84dcf - Cleanups, logging, checks and javadocs 2011-03-28 17:15:46 +00:00
zzz
33780ef359 - Fix FLB full check
- Cache FLB
- FLB logging, cleanups, checks
2011-03-28 14:27:19 +00:00
zzz
9fcb20a7bd - Free unused span continuation pages (big space savings)
- Less data copying during on-disk searches
2011-03-28 04:57:16 +00:00
zzz
991acd3917 fix level count init 2011-03-27 22:42:36 +00:00
zzz
f4905d2742 - Use new UTF8StringBytes
- Track number of SkipLevels in a SkipList
- More double-checks
- Caching cleanups
- Cleanups, logging, generics
2011-03-27 22:36:45 +00:00
zzz
b7b7283ff9 - Use new UTF8StringBytes
- Track number of SkipLevels in a SkipList
- More double-checks
- Cleanups, logging, generics
2011-03-27 22:19:50 +00:00
zzz
22d50dd150 require router.activePeers stat (ticket #450) 2011-03-27 19:19:41 +00:00
zzz
bc231b51b5 - Fix several bugs in removal of first or second span
- Fix bugs in flushes
- Add magic numbers for free pages and free list
- More bounds checking
- Lots of checks for double-kill / double-free
- Make some freelist errors non-fatal
- Cleanups, logging, javadocs, test code
2011-03-27 18:55:51 +00:00
zzz
a7fceb644f javadoc 2011-03-26 05:50:13 +00:00
zzz
312534b635 - Change disk format to add magic number to all pages
- Change blockfile magic number to reflect new format
- Cleanups and javadocs
2011-03-26 05:27:34 +00:00
zzz
8f9f102baf - Fix several bugs with BSkipLevels persistence
- Logging and debug code
- New serializers
- Cleanups and javadocs
2011-03-26 02:40:17 +00:00
zzz
078056f163 implement last-modified 2011-03-24 22:07:19 +00:00
zzz
1adb3d19c7 - Better serializer error handling and logging
- Automatic corruption repair in blockfile
- Automatic removal of bad entries in BFNS
- Use unsigned shorts to extend max lengths to 65535
- Check max length
- Throw IOE on negative ints
- Tweak fromProperties() exceptions
- Fix DataHelper encoding issues (ticket #436)
- CSS tweaks
2011-03-24 21:51:20 +00:00
zzz
7751661f3d basic IDN support 2011-03-24 05:30:33 +00:00
zzz
ca5484a984 - Add details page in susidns
- Add source in Daemon
- Honor list property in BFNS.lookup()
2011-03-24 03:00:47 +00:00
zzz
d6999a3327 * DataHelper:
- Undeprecate fromProperties() and toProperties()
      - Undeprecate BOOLEAN_FALSE and BOOLEAN_TRUE
      - Fix fromProperties() and toProperties() to correctly throw DataFormatExceptions
      - Add sort option
      - Efficiency improvements in writeProperties(), toProperties(), storeProps(), and toString()
2011-03-23 21:44:38 +00:00
zzz
c85931cbc5 log tweaks 2011-03-23 02:22:19 +00:00
zzz
7e0d0e2b01 - Implement getNames()
- Use getNames() for merging to hosts.txt naming services to avoid O(n**2)
- Fix naming service selection
- Don't merge from master book unless publishing
- Add naming service and direct config options
2011-03-22 22:10:15 +00:00
zzz
5dc9214296 - Iterate through eepgetted subscription file instead of loading the whole thing into memory 2011-03-22 18:20:44 +00:00
zzz
311bb7a4b6 propagate from branch 'i2p.i2p' (head 6467dc867b03e6be51ac21be14d7f8cbdadc2bd2)
to branch 'i2p.i2p.zzz.naming' (head ed37752523387104764b68a1deaaedb5e707e827)
2011-03-22 14:28:16 +00:00
zzz
c7a574fe01 final 2011-03-22 02:08:03 +00:00
zzz
1b2519cfb8 - Improved error handling
- Disable graphs on JVMs that crash
2011-03-22 01:59:52 +00:00
zzz
9c02aab4fb oops remove newline 2011-03-21 18:37:26 +00:00
zzz
40fd4ccd15 Stats:
- Refactor handling of required stats
    - Shorten description of required stats
    - Improve save messages on configstats.jsp
    - Change bw.sendBps and bw.receiveBps stats to bytes, not Kbytes
    - Expires directive for graphs
2011-03-21 18:14:58 +00:00
zzz
ddddc686fe propagate from branch 'i2p.i2p' (head 60c5cb17c0406b6e6e547489f9ea8ef3c290e262)
to branch 'i2p.i2p.zzz.jrobin159' (head 330a4f9652fe5f67e6e9998f5c0a87c7ef163764)
2011-03-21 14:29:03 +00:00
zzz
cf0d2197b8 - Persistent option on GUI
- Fix HTML errors
- Refresh improvements
- Fix Rate.equals() bug
- More cleanups
2011-03-18 15:49:58 +00:00
zzz
79358f4271 notes and tweaks 2011-03-18 00:47:14 +00:00
zzz
12f3634f96 more rows when persistent 2011-03-17 23:25:38 +00:00
zzz
033dee0216 - Persistent RRD
- Restart line in graphs
- Restore zh fonts in graphs
2011-03-17 21:13:52 +00:00
zzz
1324eaf056 cleanups and javadoc 2011-03-17 17:16:28 +00:00
zzz
2e5e3b9d40 better error messages, fix NPE, comment out template handling 2011-03-17 16:16:50 +00:00
zzz
ef26accde0 jrobin 1.5.9.1
sha1sum 7d76f5cdec625fd1ce21acc0e46d286fbd6d307f
Released 2008-09-05
Downloaded from http://sourceforge.net/projects/jrobin/files/jrobin/1.5.9/
License: LGPL 2.1

It appears that the only difference from 1.5.9 is it was compiled with Java 5
instead of Java 6. The 1.5.9 jars out there also contain the large font .ttf files,
which are not in 1.5.9.1.

The only announcement I could find about 1.5.9.1 is here:
http://opennms.530661.n2.nabble.com/Am-I-missing-something-td841945.html

The following directories are dropped from the jar during the build process:
org/jrobin/cmd/
org/jrobin/convertor/
org/jrobin/inspector/
2011-03-17 16:03:27 +00:00
zzz
8461beba1c 1st cut 2011-03-17 02:07:08 +00:00
zzz
b93e3dfb55 cleanups and permissions 2011-03-16 18:33:56 +00:00
zzz
5ef1dd87a5 javadoc fix 2011-03-16 18:14:51 +00:00
zzz
07860d018c add b32 links to susidns; add source property for additions via susidns 2011-03-16 17:28:10 +00:00
zzz
ce5ce12e3b * Naming services:
- Refactor caching
    - Logging, caching, shutdown cleanup and fixes
2011-03-16 16:11:54 +00:00
zzz
02c4bbfc58 fix filtering 2011-03-16 03:01:32 +00:00
zzz
bf613448d7 susidns/hoststxtNS compatibility fixes 2011-03-16 01:50:22 +00:00
zzz
5095e8a1d6 naming service shutdown stuff 2011-03-16 00:37:54 +00:00
zzz
0352ca3ef6 * Naming service, addressbook, susidns:
- Replace img hack for susidns requesting addressbook update
      with registration and request through the NamingService
2011-03-15 23:16:44 +00:00
zzz
12c5b9c21c * Naming services, addressbook, susidns:
- Fix search capability
    - Fix result count and view within results
    - Fix published address book
    - Fix ngettext
    - Cache size
    - Fix 0-9 filter
    - Addressbook updates via API, except for published
2011-03-15 21:52:48 +00:00
zzz
8b737b4adb static 2011-03-11 02:31:10 +00:00
zzz
f4e92572eb more generics 2011-03-11 02:18:15 +00:00
zzz
b048b016ad generics 2011-03-11 02:01:20 +00:00
zzz
41fc9cf4ca reverseLookup improvements 2011-03-11 01:11:18 +00:00
zzz
7edbd3ad0a * HostsTxtNamingService:
- Add getEntries() and size() support
2011-03-11 00:29:34 +00:00
zzz
de815e271c * Blockfile:
- More query options
    - More exception logging
    - Fix lookup infinite loop
    - Fix lookup NPE
  * SusiDNS:
    - Refactoring for new NamingService API
    - Initial conversion to new NamingService API
      (still needs work)
    - Fix lots of HTML warnings
    - Some Java 5 cleanup
2011-03-10 23:06:13 +00:00
zzz
ad24f1438f propagate from branch 'i2p.i2p' (head ca5b19055e887994435b0eb35978484f2489bb6e)
to branch 'i2p.i2p.zzz.naming' (head e71d7dc813c07bb2b6798ab74099efdfc1754f47)
2011-03-10 17:59:35 +00:00
zzz
a3fb49adcb add missing files; new API in blockfile NS 2011-02-27 14:49:04 +00:00
zzz
c269546c08 stub out new API, needs testing 2011-02-22 23:39:51 +00:00
zzz
258c260601 fix SkipIterator 2011-02-21 21:35:01 +00:00
zzz
ad3342aefb exception cleanup 2011-02-08 14:26:46 +00:00
zzz
54fdfd823b - Drop deprecated NamingServices
- Add caching and b32 support to DummyNamingService
    - BlockfileNamingService Cleanups
2011-02-08 03:29:18 +00:00
zzz
ba9c7015fe blockfile naming service 2011-02-08 00:46:47 +00:00
zzz
208db9a673 initial blockfile mods 2011-02-08 00:45:23 +00:00
zzz
7f10a67804 BlockFile as downloaded 2011-02-08 00:41:33 +00:00
zzz
08d24b059a remove nativeDoubleValue(), update jbigi README 2011-01-18 14:05:26 +00:00
zzz
1811989089 unbundle jbigi.jar, create at build time 2011-01-11 00:44:36 +00:00
1291 changed files with 264797 additions and 76856 deletions

View File

@ -22,3 +22,5 @@ _jsp\.java$
~$
/build/
/classes/
^debian/copyright
override.properties

View File

@ -2,65 +2,118 @@
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.it = apps/i2ptunnel/locale/messages_it.po
trans.nl = apps/i2ptunnel/locale/messages_nl.po
trans.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
[I2P.routerconsole]
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.et_EE = apps/routerconsole/locale/messages_ee.po
trans.es = apps/routerconsole/locale/messages_es.po
trans.fi = apps/routerconsole/locale/messages_fi.po
trans.fr = apps/routerconsole/locale/messages_fr.po
trans.it = apps/routerconsole/locale/messages_it.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.sv_SE = apps/routerconsole/locale/messages_sv.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
[I2P.i2psnark]
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.it = apps/i2psnark/locale/messages_it.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.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
[I2P.susidns]
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.es = apps/susidns/locale/messages_es.po
trans.fr = apps/susidns/locale/messages_fr.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.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
trans.zh_CN = apps/susidns/locale/messages_zh.po
[I2P.desktopgui]
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.es = apps/desktopgui/locale/messages_es.po
trans.fr = apps/desktopgui/locale/messages_fr.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.sv_SE = apps/desktopgui/locale/messages_sv.po
trans.uk_UA = apps/desktopgui/locale/messages_uk.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.it = apps/susimail/locale/messages_it.po
trans.nl = apps/susimail/locale/messages_nl.po
trans.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.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.es = debian/po/es.po
trans.pl = debian/po/pl.po
trans.ru = debian/po/ru.po
trans.sv_SE = debian/po/sv.po
trans.uk_UA = debian/po/uk.po
[main]
host = http://www.transifex.net

View File

@ -1,4 +1,4 @@
Headless I2P installation instructions
Headless (console mode) I2P installation instructions
1) java -jar i2pinstall.exe -console (you've already done this)
@ -6,9 +6,9 @@ This will run the installer in text mode, including running the postinstall.sh
script. After that, you may run 'sh i2prouter start'
which will start the router and attempt to launch a browser.
If you do not have an X server running, the browser launch will probably fail, and
If you do not have an X server running, the browser launch may fail, and
you may use:
lynx http://localhost:7657/index.jsp
lynx http://localhost:7657/
to configure the router.
If you're having trouble, swing by http://forum.i2p2.de/, check the
@ -24,22 +24,22 @@ edit the files i2prouter (Linux) and wrapper.config (Linux and Windows)
where there are comments labeled "PORTABLE". Do this before you
run I2P for the first time.
To run I2P explicitly:
To start I2P:
(*nix): sh i2prouter start
(win*): I2P.exe
(Platforms unsupported by the wrapper - PPC, ARM, etc): sh runplain.sh
(non-x86 platforms PPC, ARM, etc): sh runplain.sh
To stop the router (gracefully):
lynx http://localhost:7657/configservice.jsp ("Shutdown gracefully")
To stop I2P (gracefully):
lynx http://localhost:7657/summaryframe (click "Shutdown")
To stop the router (immediately):
To stop I2P immediately:
sh i2prouter stop
To uninstall I2P:
rm -rf $i2pInstallDir
rm -rf $I2PInstallDir ~/.i2p
Supported JVMs:
Windows: Latest available from http://java.sun.com/ (1.5+ supported)
Linux: Latest available from http://java.sun.com/ (1.5+ supported)
FreeBSD: Sun 1.5-compatible (NIO required)
various: http://www.kaffe.org/ Sun 1.5-compatible (NIO required)
Windows: Latest available from http://java.com/download (1.5+ supported)
Linux: Latest available from http://java.com/download (1.5+ supported)
FreeBSD: 1.5-compatible (NIO required)
Other operating systems and JVMs: See http://trac.i2p2.de/wiki/java

View File

@ -1,33 +1,68 @@
I2P source installation instructions
Prerequisites to build from source:
Java SDK (preferably Sun) 1.5.0 or higher (1.6 recommended)
The SDK must have Pack200 support (java.util.jar.Pack200)
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 update file into an existing installation directory and restart.
Or move the i2pupdate.zip file into an existing installation directory and restart.
To start I2P:
(*nix): sh i2prouter start
(win*): I2P.exe or i2prouter.bat
(non-x86 platforms PPC, ARM, etc): sh runplain.sh
To install I2P as a system service:
(*nix) sh i2prouter install
(win*) install_i2p_service_winnt.bat
To uninstall I2P as a system service:
(*nix) sh i2prouter remove
(win*) uninstall_i2p-service_winnt.bat
To stop I2P (gracefully):
lynx http://localhost:7657/summaryframe (click "Shutdown")
To stop I2P immediately:
sh i2prouter stop
To uninstall I2P:
rm -rf $I2PInstallDir ~/.i2p
Supported JVMs:
Windows: Latest available from http://java.sun.com/ (1.5+ supported)
Linux: Latest available from http://java.sun.com/ (1.5+ supported)
FreeBSD: Sun 1.5-compatible (NIO required)
various: http://www.kaffe.org/ Sun 1.5-compatible (NIO required)
Windows: Latest available from http://java.com/download (1.5+ supported)
Linux: Latest available from http://java.com/download (1.5+ supported)
FreeBSD: 1.5-compatible (NIO required)
Other operating systems and JVMs: See http://trac.i2p2.de/wiki/java

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
@ -29,7 +29,7 @@ POSSIBILITY OF SUCH DAMAGES.
LICENSES
--------
Core:
Core (i2p.jar):
Public domain except as listed below:
ElGamal and DSA code:
@ -41,8 +41,8 @@ Public domain except as listed below:
See licenses/LICENSE-SHA256.txt
AES code:
Under the Cryptix (MIT) license, written by the Cryptix team
(That's what our website says but all our AES code looks like it is public domain)
Copyright (c) 1995-2005 The Cryptix Foundation Limited.
See licenses/LICENSE-Cryptix.txt
Crypto filters:
From the xlattice app - http://xlattice.sourceforge.net/
@ -56,10 +56,6 @@ Public domain except as listed below:
Copyright (C) 2001, 2002, Free Software Foundation, Inc.
See licenses/LICENSE-LGPLv2.1.txt
GMP 4.1.3:
Copyright 1991, 1996, 1999, 2000 Free Software Foundation, Inc.
See licenses/LICENSE-LGPLv2.1.txt
HashCash code:
Copyright 2006 Gregory Rubin grrubin@gmail.com
See licenses/LICENSE-HashCash.txt
@ -72,8 +68,12 @@ Public domain except as listed below:
Contains some code Copyright 2006 Sun Microsystems, Inc.
See licenses/LICENSE-InstallCert.txt
BlockFile:
Copyright (c) 2006, Matthew Estes
See licenses/LICENSE-BlockFile.txt
Router:
Router (router.jar):
Public domain except as listed below:
UPnP.java:
From freenet
@ -83,7 +83,7 @@ Public domain except as listed below:
Copyright (C) 2003-2006 Satoshi Konno
See licenses/LICENSE-UPnP.txt
GeoIP data free to use, courtesy http://ip-to-country.webhosting.info/
GeoIP data free to use, courtesy http://www.maxmind.com/
Installer:
@ -92,34 +92,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,11 +127,18 @@ Installer:
Wrapper 3.1.1:
Copyright (c) 1999, 2004 Tanuki Software
Java Service Wrapper Community Edition 32-bit 3.5.13:
Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
See licenses/LICENSE-Wrapper.txt
Jbigi Libraries (jbigi.jar):
JNI code public domain.
GMP 4.3.2 / 5.0.2:
Copyright 1991, 1996, 1999, 2000, 2007 Free Software Foundation, Inc.
See licenses/LICENSE-LGPLv3.txt
Applications:
@ -141,22 +148,23 @@ Applications:
BOB:
Copyright (C) sponge
DWTFYWTPL
See licenses/COPYING-BOB.txt
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
@ -164,13 +172,13 @@ Applications:
By welterde.
See licenses/LICENSE-GPLv2.txt
Jetty 5.1.12:
Copyright 2000-2004 Mort Bay Consulting Pty. Ltd.
See licenses/LICENSE-Apache1.1.txt
Jetty 6.1.26:
Copyright 1995-2009 Mort Bay Consulting Pty Ltd
See licenses/LICENSE-Jetty.txt
See licenses/LICENSE-Apache2.0.txt
See licenses/NOTICE-Commons-Logging.txt
JRobin 1.4.0:
JRobin 1.5.9.1:
See licenses/LICENSE-LGPLv2.1.txt
Ministreaming Lib:
@ -183,13 +191,21 @@ Applications:
Router console:
Public domain.
Flag icons: public domain, courtesy mjames@gmail.com http://www.famfamfam.com/
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
- All other flag icons: public domain, courtesy mjames@gmail.com http://www.famfamfam.com/
Silk icons: See licenses/LICENSE-SilkIcons.txt
GeoIP Data:
Copyright (c) 2003 Direct Information Pvt. Ltd. All Rights Reserved.
Copyright (c) 2008 MaxMind, Inc. All Rights Reserved.
See licenses/LICENSE-GeoIP.txt
Router Console and I2PSnark themes:
"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
SAM:
Public domain.
@ -198,17 +214,27 @@ Applications:
SusiDNS:
Copyright (C) 2005 <susi23@mail.i2p>
GPLv2 (or any later version)
See licenses/LICENSE-GPLv2.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.35:
Copyright 1999-2011 The Apache Software Foundation
See licenses/LICENSE-Apache2.0.txt
See licenses/NOTICE-Tomcat.txt
Other Applications and Libraries
@ -220,8 +246,9 @@ distributions. See the source package for the additional license information.
Admin Manager:
Public domain
Atalk:
Public domain
BOB Demos:
Copyright (C) sponge
DWTFYWTPL
Desktopgui
Copyright (c) Mathias De Maré
@ -240,7 +267,3 @@ distributions. See the source package for the additional license information.
SAM Python Library:
Public domain.
I2PSnark/Console themes:
"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

View File

@ -1,17 +1,24 @@
Prerequisites to build from source:
Java SDK (preferably Sun) 1.5.0 or higher (1.6 recommended)
The SDK must have Pack200 support (java.util.jar.Pack200)
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
from the GNU gettext package http://www.gnu.org/software/gettext/
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.
Documentation:
http://www.i2p2.de/
http://www.i2p2.de/how
API: run 'ant javadoc' then start at build/javadoc/index.html
Latest release:

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

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.i2p.router"
android:versionCode="1"
android:versionName="1.0.0">
<uses-permission android:name="android.permission.INTERNET" />
<!-- 3 = 1.5, 2 = 1.1, 1 = 1.0; would probably work with 1 but don't have a 1.0 SDK to test against -->
<uses-sdk android:minSdkVersion="2" />
<application android:label="@string/app_name">
<activity android:name=".I2PAndroid"
android:label="@string/app_name"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -1,38 +0,0 @@
These instructions are for a recent Android SDK (1.6 or later)..
Should also still work with a 1.5 SDK.
The build file is not compatible with the 1.1 SDK any more.
#Download the SDK from http://developer.android.com/sdk/index.html
#Unzip the android SDK in ../../
#So then the android tools will be in ../../android-sdk-linux_86/tools/
#
# now go to the available packages tab, check the box and click refresh,
# and download an SDK Platform
# Since I2P is configured to run on 1.1 or higher
# (API 2) download that one. Otherwise you must change the
# target in default.properties from android-2 to andriod-x
# where x is the API version.
# create a file local.properties with the following line:
# sdk-location=/path/to/your/android-sdk-linux_86
#then build the android apk file:
ant debug
# Create the android 1.1 (API 2) virtual device
# (don't make a custom hardware profile)
# A AVD created with the 1.5 SDK will not work with the newer tools
../../android-sdk-linux_86/tools/android create avd --name i2p --target 2
#then run the emulator:
../../android-sdk-linux_86/tools/emulator -avd i2p &
#then wait a couple minutes until the emulator is up
#then install the I2P app
ant install
#then run the debugger
../../android-sdk-linux_86/tools/ddms &
#to rebuild and reinstall to emulator:
ant reinstall

View File

@ -1,356 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name=".I2PAndroid" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contain the path to the SDK. It should *NOT* be checked in in Version
Control Systems. -->
<property file="local.properties"/>
<!-- The build.properties file can be created by you and is never touched
by the 'android' tool. This is the place to change some of the default property values
used by the Ant rules.
Here are some properties you may want to change/update:
application-package
the name of your application package as defined in the manifest. Used by the
'uninstall' rule.
source-folder
the name of the source folder. Default is 'src'.
out-folder
the name of the output folder. Default is 'bin'.
Properties related to the SDK location or the project target should be updated
using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your application and
should be checked in in Version Control Systems.
-->
<property file="build.properties"/>
<!-- The default.properties file is created and updated by the 'android' tool, as well
as ADT.
This file is an integral part of the build system for your application and
should be checked in in Version Control Systems. -->
<property file="default.properties"/>
<!-- Custom Android task to deal with the project target, and import the proper rules.
This requires ant 1.6.0 or above. -->
<path id="android.antlibs">
<pathelement path="${sdk-location}/tools/lib/anttasks.jar" />
<pathelement path="${sdk-location}/tools/lib/sdklib.jar" />
<pathelement path="${sdk-location}/tools/lib/androidprefs.jar" />
<pathelement path="${sdk-location}/tools/lib/apkbuilder.jar" />
<pathelement path="${sdk-location}/tools/lib/jarutils.jar" />
</path>
<taskdef name="setup"
classname="com.android.ant.SetupTask"
classpathref="android.antlibs"/>
<!-- Execute the Android Setup task that will setup some properties specific to the target,
and import the rules files.
To customize the rules, copy/paste them below the task, and disable import by setting
the import attribute to false:
<setup import="false" />
This will ensure that the properties are setup correctly but that your customized
targets are used.
-->
<setup import="false" />
<!--
================================================================================
New I2P rules
================================================================================
-->
<target name="buildrouter" depends="dirs" >
<!-- build router and core -->
<ant dir=".." target="buildrouter" />
<!-- router -->
<copy file="../build/router.jar" todir="${external-libs-folder}" />
<!-- core -->
<mkdir dir="tmp" />
<unjar src="../build/i2p.jar" dest="tmp/" />
<delete file="tmp/net/i2p/util/LogWriter.class" />
<!-- org.bouncycastle.crypto already in android
but we need a little trickery because our HMac is incompatible...
and the libs aren't in the SDK to compile against??? -->
<jar destfile="${external-libs-folder}/crypto.jar" >
<fileset dir="tmp/" >
<include name="org/bouncycastle/crypto/Digest.class" />
<include name="org/bouncycastle/crypto/Mac.class" />
<include name="org/bouncycastle/crypto/digests/GeneralDigest.class" />
<include name="org/bouncycastle/crypto/digests/MD5Digest.class" />
</fileset>
</jar>
<delete>
<fileset dir="tmp/" >
<include name="org/bouncycastle/crypto/Digest.class" />
<include name="org/bouncycastle/crypto/Mac.class" />
<include name="org/bouncycastle/crypto/digests/GeneralDigest.class" />
<include name="org/bouncycastle/crypto/digests/MD5Digest.class" />
</fileset>
</delete>
<!--
<delete dir="tmp/org/bouncycastle/" />
<delete file="tmp/net/i2p/crypto/HMACGenerator.class" />
-->
<delete file="tmp/org/bouncycastle/" />
<!-- lots of unneeded stuff could be deleted here -->
<jar destfile="${external-libs-folder}/i2p.jar" basedir="tmp/" />
<!-- some resources -->
<mkdir dir="res/drawable/" />
<copy file="../installer/resources/themes/console/images/i2plogo.png" todir="res/drawable/" />
<copy file="../installer/resources/blocklist.txt" tofile="res/raw/blocklist_txt" />
</target>
<target name="hackcleanup">
<delete file="${external-libs-folder}/crypto.jar" />
</target>
<!-- fix for property name change sometime after SDK 1.5 -->
<property name="android-jar" value="${android.jar}" />
<property name="android-aidl" value="${android.aidl}" />
<!--
================================================================================
From here down copied from SDK platforms/android-1.1/templates/android_rules.xml
and then modified
================================================================================
-->
<!--
This rules file is meant to be imported by the custom Ant task:
com.android.ant.AndroidInitTask
The following properties are put in place by the importing task:
android-jar, android-aidl, aapt, aidl, and dx
Additionnaly, the task sets up the following classpath reference:
android.target.classpath
This is used by the compiler task as the boot classpath.
-->
<!-- Custom tasks -->
<taskdef name="aaptexec"
classname="com.android.ant.AaptExecLoopTask"
classpathref="android.antlibs"/>
<taskdef name="apkbuilder"
classname="com.android.ant.ApkBuilderTask"
classpathref="android.antlibs"/>
<!-- Properties -->
<property name="android-tools" value="${sdk-location}/tools" />
<!-- Input directories -->
<property name="source-folder" value="src" />
<property name="gen-folder" value="gen" />
<property name="resource-folder" value="res" />
<property name="asset-folder" value="assets" />
<property name="source-location" value="${basedir}/${source-folder}" />
<!-- folder for the 3rd party java libraries -->
<property name="external-libs-folder" value="libs" />
<!-- folder for the native libraries -->
<property name="native-libs-folder" value="libs" />
<!-- Output directories -->
<property name="gen-folder" value="gen" />
<property name="out-folder" value="bin" />
<property name="out-classes" value="${out-folder}/classes" />
<property name="out-classes-location" value="${basedir}/${out-classes}"/>
<!-- out folders for a parent project if this project is an instrumentation project -->
<property name="main-out-folder" value="../${out-folder}" />
<property name="main-out-classes" value="${main-out-folder}/classes"/>
<!-- Intermediate files -->
<property name="dex-file" value="classes.dex" />
<property name="intermediate-dex" value="${out-folder}/${dex-file}" />
<!-- dx does not properly support incorrect / or \ based on the platform
and Ant cannot convert them because the parameter is not a valid path.
Because of this we have to compute different paths depending on the platform. -->
<condition property="intermediate-dex-location"
value="${basedir}\${intermediate-dex}"
else="${basedir}/${intermediate-dex}" >
<os family="windows"/>
</condition>
<!-- The final package file to generate -->
<property name="out-debug-package" value="${out-folder}/${ant.project.name}-debug.apk"/>
<!-- Tools -->
<condition property="exe" value=".exe" else=""><os family="windows"/></condition>
<property name="adb" value="${android-tools}/adb${exe}"/>
<!-- rules -->
<!-- Create the output directories if they don't exist yet. -->
<target name="dirs">
<echo>Creating output directories if needed...</echo>
<mkdir dir="${resource-folder}" />
<mkdir dir="${external-libs-folder}" />
<mkdir dir="${gen-folder}" />
<mkdir dir="${out-folder}" />
<mkdir dir="${out-classes}" />
</target>
<!-- Generate the R.java file for this project's resources. -->
<target name="resource-src" depends="dirs">
<echo>Generating R.java / Manifest.java from the resources...</echo>
<exec executable="${aapt}" failonerror="true">
<arg value="package" />
<arg value="-m" />
<arg value="-J" />
<arg path="${gen-folder}" />
<arg value="-M" />
<arg path="AndroidManifest.xml" />
<arg value="-S" />
<arg path="${resource-folder}" />
<arg value="-I" />
<arg path="${android-jar}" />
</exec>
</target>
<!-- Generate java classes from .aidl files. -->
<target name="aidl" depends="dirs">
<echo>Compiling aidl files into Java classes...</echo>
<apply executable="${aidl}" failonerror="true">
<arg value="-p${android-aidl}" />
<arg value="-I${source-folder}" />
<arg value="-o${gen-folder}" />
<fileset dir="${source-folder}">
<include name="**/*.aidl"/>
</fileset>
</apply>
</target>
<!-- Compile this project's .java files into .class files. -->
<!-- I2P add buildrouter -->
<target name="compile" depends="buildrouter, resource-src, aidl">
<javac encoding="ascii" target="1.5" debug="true" extdirs=""
destdir="${out-classes}"
bootclasspathref="android.target.classpath">
<src path="${source-folder}" />
<src path="${gen-folder}" />
<classpath>
<fileset dir="${external-libs-folder}" includes="*.jar"/>
<pathelement path="${main-out-classes}"/>
</classpath>
</javac>
</target>
<!-- Convert this project's .class files into .dex files. -->
<!-- I2P add hackcleanup -->
<target name="dex" depends="compile, hackcleanup">
<echo>Converting compiled files and external libraries into ${out-folder}/${dex-file}...</echo>
<apply executable="${dx}" failonerror="true" parallel="true">
<!-- I2P this is a bad sign that we need this -->
<arg value="-JXmx256m" />
<arg value="--dex" />
<arg value="--output=${intermediate-dex-location}" />
<arg path="${out-classes-location}" />
<fileset dir="${external-libs-folder}" includes="*.jar"/>
</apply>
</target>
<!-- Put the project's resources into the output package file
This actually can create multiple resource package in case
Some custom apk with specific configuration have been
declared in default.properties.
-->
<target name="package-resources">
<echo>Packaging resources</echo>
<aaptexec executable="${aapt}"
command="package"
manifest="AndroidManifest.xml"
resources="${resource-folder}"
assets="${asset-folder}"
androidjar="${android-jar}"
outfolder="${out-folder}"
basename="${ant.project.name}" />
</target>
<!-- Package the application and sign it with a debug key.
This is the default target when building. It is used for debug. -->
<target name="debug" depends="dex, package-resources">
<apkbuilder
outfolder="${out-folder}"
basename="${ant.project.name}"
signed="true"
verbose="false">
<file path="${intermediate-dex}" />
<sourcefolder path="${source-folder}" />
<jarfolder path="${external-libs-folder}" />
<nativefolder path="${native-libs-folder}" />
</apkbuilder>
</target>
<!-- Package the application without signing it.
This allows for the application to be signed later with an official publishing key. -->
<target name="release" depends="dex, package-resources">
<apkbuilder
outfolder="${out-folder}"
basename="${ant.project.name}"
signed="false"
verbose="false">
<file path="${intermediate-dex}" />
<sourcefolder path="${source-folder}" />
<jarfolder path="${external-libs-folder}" />
<nativefolder path="${native-libs-folder}" />
</apkbuilder>
<echo>All generated packages need to be signed with jarsigner before they are published.</echo>
</target>
<!-- Install the package on the default emulator -->
<target name="install" depends="debug">
<echo>Installing ${out-debug-package} onto default emulator...</echo>
<exec executable="${adb}" failonerror="true">
<arg value="install" />
<arg path="${out-debug-package}" />
</exec>
</target>
<target name="reinstall" depends="debug">
<echo>Installing ${out-debug-package} onto default emulator...</echo>
<exec executable="${adb}" failonerror="true">
<arg value="install" />
<arg value="-r" />
<arg path="${out-debug-package}" />
</exec>
</target>
<!-- Uinstall the package from the default emulator -->
<target name="uninstall">
<echo>Uninstalling ${application-package} from the default emulator...</echo>
<exec executable="${adb}" failonerror="true">
<arg value="uninstall" />
<arg path="${application-package}" />
</exec>
</target>
<target name="help">
<!-- displays starts at col 13
|13 80| -->
<echo>Android Ant Build. Available targets:</echo>
<echo> help: Displays this help.</echo>
<echo> debug: Builds the application and sign it with a debug key.</echo>
<echo> release: Builds the application. The generated apk file must be</echo>
<echo> signed before it is published.</echo>
<echo> install: Installs the debug package onto a running emulator or</echo>
<echo> device. This can only be used if the application has </echo>
<echo> not yet been installed.</echo>
<echo> reinstall: Installs the debug package on a running emulator or</echo>
<echo> device that already has the application.</echo>
<echo> The signatures must match.</echo>
<echo> uninstall: uninstall the application from a running emulator or</echo>
<echo> device.</echo>
</target>
</project>

View File

@ -1,11 +0,0 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-2

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World, I2PAndroid"
/>
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/i2plogo"
/>
</LinearLayout>

View File

@ -1,3 +0,0 @@
logger.defaultLevel=INFO
logger.record.net.i2p.router.transport.FIFOBandwidthRefiller=ERROR
logger.record.net.i2p.stat.Rate=ERROR

View File

@ -1,22 +0,0 @@
# initial router.config
# temp directory
i2p.dir.temp=/data/data/net.i2p.router/files/tmp
i2p.dir.pid=/data/data/net.i2p.router/files/tmp
# save memory
prng.buffers=2
router.decayingBloomFilterM=20
stat.full=false
i2np.udp.maxConnections=30
# no I2CP
i2p.dummyClientFacade=true
# for now
#i2np.ntcp.enable=false
#
# UDP crashes the JVM, don't know why
#
i2np.udp.enable=false
# no COMM at all!!!
#i2p.vmCommSystem=true
# not on android
i2np.upnp.enable=false
routerconsole.geoip.enable=false

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">I2PAndroid</string>
</resources>

View File

@ -1,142 +0,0 @@
package net.i2p.router;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.os.Bundle;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.IOException;
import java.util.List;
import net.i2p.router.Router;
import net.i2p.router.RouterLaunch;
// import net.i2p.util.NativeBigInteger;
public class I2PAndroid extends Activity
{
static Context _context;
private static final String DIR = "/data/data/net.i2p.router/files";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
_context = this; // Activity extends Context
debugStuff();
initialize();
// 300ms per run
// 5x slower than java on my server and 50x slower than native on my server
// NativeBigInteger.main(null);
}
public void onRestart()
{
System.err.println("onRestart called");
super.onRestart();
}
public void onStart()
{
System.err.println("onStart called");
super.onStart();
RouterLaunch.main(null);
System.err.println("Router.main finished");
}
public void onResume()
{
System.err.println("onResume called");
super.onResume();
}
public void onPause()
{
System.err.println("onPause called");
super.onPause();
}
public void onStop()
{
System.err.println("onStop called");
super.onStop();
// from routerconsole ContextHelper
List contexts = RouterContext.listContexts();
if ( (contexts == null) || (contexts.isEmpty()) )
throw new IllegalStateException("No contexts. This is usually because the router is either starting up or shutting down.");
RouterContext ctx = (RouterContext)contexts.get(0);
// shutdown() doesn't return so use shutdownGracefully()
ctx.router().shutdownGracefully(Router.EXIT_HARD);
System.err.println("shutdown complete");
}
public void onDestroy()
{
System.err.println("onDestroy called");
super.onDestroy();
}
public static Context getContext() {
return _context;
}
private void debugStuff() {
System.err.println("java.io.tmpdir" + ": " + System.getProperty("java.io.tmpdir"));
System.err.println("java.vendor" + ": " + System.getProperty("java.vendor"));
System.err.println("java.version" + ": " + System.getProperty("java.version"));
System.err.println("os.arch" + ": " + System.getProperty("os.arch"));
System.err.println("os.name" + ": " + System.getProperty("os.name"));
System.err.println("os.version" + ": " + System.getProperty("os.version"));
System.err.println("user.dir" + ": " + System.getProperty("user.dir"));
System.err.println("user.home" + ": " + System.getProperty("user.home"));
System.err.println("user.name" + ": " + System.getProperty("user.name"));
}
private void initialize() {
// Until we can edit the router.config on the device,
// copy it from the resource every time.
// File f = new I2PFile("router.config");
// if (!f.exists()) {
copyResourceToFile(R.raw.router_config, "router.config");
copyResourceToFile(R.raw.logger_config, "logger.config");
copyResourceToFile(R.raw.blocklist_txt, "blocklist.txt");
// }
// Set up the locations so Router and WorkingDir can find them
System.setProperty("i2p.dir.base", DIR);
System.setProperty("i2p.dir.config", DIR);
System.setProperty("wrapper.logfile", DIR + "/wrapper.log");
}
private void copyResourceToFile(int resID, String f) {
InputStream in = null;
FileOutputStream out = null;
System.err.println("Creating file " + f + " from resource");
byte buf[] = new byte[4096];
try {
// Context methods
in = getResources().openRawResource(resID);
out = openFileOutput(f, 0);
int read = 0;
while ( (read = in.read(buf)) != -1)
out.write(buf, 0, read);
} catch (IOException ioe) {
} catch (Resources.NotFoundException nfe) {
} finally {
if (in != null) try { in.close(); } catch (IOException ioe) {}
if (out != null) try { out.close(); } catch (IOException ioe) {}
}
}
}

View File

@ -1,163 +0,0 @@
package net.i2p.util;
/*
* public domain
*
*/
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
/**
* bridge to android logging
*
* @author zzz
*/
class LogWriter implements Runnable {
private final static long CONFIG_READ_ITERVAL = 10 * 1000;
private long _lastReadConfig = 0;
private long _numBytesInCurrentFile = 0;
private OutputStream _currentOut; // = System.out
private int _rotationNum = -1;
private String _logFilenamePattern;
private File _currentFile;
private LogManager _manager;
private boolean _write;
private LogWriter() { // nop
}
public LogWriter(LogManager manager) {
_manager = manager;
}
public void stopWriting() {
_write = false;
}
public void run() {
_write = true;
try {
while (_write) {
flushRecords();
rereadConfig();
}
System.err.println("Done writing");
} catch (Exception e) {
System.err.println("Error writing the logs: " + e.getMessage());
e.printStackTrace();
}
}
public void flushRecords() { flushRecords(true); }
public void flushRecords(boolean shouldWait) {
try {
List records = _manager._removeAll();
if (records == null) return;
for (int i = 0; i < records.size(); i++) {
LogRecord rec = (LogRecord) records.get(i);
writeRecord(rec);
}
} catch (Throwable t) {
t.printStackTrace();
} finally {
if (shouldWait) {
try {
synchronized (this) {
this.wait(10*1000);
}
} catch (InterruptedException ie) { // nop
}
}
}
}
public String currentFile() {
return _currentFile != null ? _currentFile.getAbsolutePath() : "uninitialized";
}
private void rereadConfig() {
long now = Clock.getInstance().now();
if (now - _lastReadConfig > CONFIG_READ_ITERVAL) {
_manager.rereadConfig();
_lastReadConfig = now;
}
}
private void writeRecord(LogRecord rec) {
if (rec.getThrowable() == null)
log(rec.getPriority(), rec.getSource(), rec.getSourceName(), rec.getThreadName(), rec.getMessage());
else
log(rec.getPriority(), rec.getSource(), rec.getSourceName(), rec.getThreadName(), rec.getMessage(), rec.getThrowable());
}
public void log(int priority, Class src, String name, String threadName, String msg) {
if (src != null) {
String tag = src.getName();
int dot = tag.lastIndexOf(".");
if (dot >= 0)
tag = tag.substring(dot + 1);
android.util.Log.println(toAndroidLevel(priority),
tag,
'[' + threadName + "] " + msg);
} else if (name != null)
android.util.Log.println(toAndroidLevel(priority),
name,
'[' + threadName + "] " + msg);
else
android.util.Log.println(toAndroidLevel(priority),
threadName, msg);
}
public void log(int priority, Class src, String name, String threadName, String msg, Throwable t) {
if (src != null) {
String tag = src.getName();
int dot = tag.lastIndexOf(".");
if (dot >= 0)
tag = tag.substring(dot + 1);
android.util.Log.println(toAndroidLevel(priority),
tag,
'[' + threadName + "] " + msg +
' ' + t.toString() + ' ' + android.util.Log.getStackTraceString(t));
} else if (name != null)
android.util.Log.println(toAndroidLevel(priority),
name,
'[' + threadName + "] " + msg +
' ' + t.toString() + ' ' + android.util.Log.getStackTraceString(t));
else
android.util.Log.println(toAndroidLevel(priority),
threadName,
msg + ' ' + t.toString() + ' ' + android.util.Log.getStackTraceString(t));
}
private static int toAndroidLevel(int level) {
switch (level) {
case Log.DEBUG:
return android.util.Log.DEBUG;
case Log.INFO:
return android.util.Log.INFO;
case Log.WARN:
return android.util.Log.WARN;
case Log.ERROR:
case Log.CRIT:
default:
return android.util.Log.ERROR;
}
}
private static final String replace(String pattern, int num) {
char c[] = pattern.toCharArray();
StringBuffer buf = new StringBuffer();
for (int i = 0; i < c.length; i++) {
if ( (c[i] != '#') && (c[i] != '@') )
buf.append(c[i]);
else
buf.append(num);
}
return buf.toString();
}
}

View File

@ -71,6 +71,7 @@
nbproject/build-impl.xml file.
-->
<target depends="jar" description="Build BOB into a SINGLE JAR." name="onejar">
<!-- Make needed working dirs -->
<mkdir dir="${dist.dir}/lib" />

View File

@ -26,7 +26,7 @@ dist.dir=dist
dist.jar=${dist.dir}/BOB.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
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

View File

@ -38,7 +38,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;
@ -182,10 +181,8 @@ 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();
try {

View File

@ -29,6 +29,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;
@ -399,7 +400,7 @@ public class DoCMDS implements Runnable {
*/
private boolean is64ok(String data) {
try {
Destination x = new Destination(data);
new Destination(data);
return true;
} catch (Exception e) {
return false;
@ -434,7 +435,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

@ -23,7 +23,6 @@
*/
package net.i2p.BOB;
import net.i2p.client.streaming.RetransmissionTimer;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer2;
@ -40,7 +39,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 +46,5 @@ public class Main {
Y2.stop();
Y1.stop();
Y.stop();
}
}

View File

@ -30,6 +30,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;
@ -144,7 +145,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

@ -51,8 +51,12 @@
<!-- unused for now, as we oddly ship addressbook as a .war -->
<target name="jar" depends="compile, changes">
<jar basedir="${build}" destfile="${dist}/${jar}">
<!-- set if unset -->
<property name="workspace.changes" value="" />
<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}" />
@ -67,8 +71,12 @@
<copy todir="${dist}/tmp/WEB-INF/classes">
<fileset dir="${build}"/>
</copy>
<!-- set if unset -->
<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}" />
@ -81,9 +89,17 @@
<uptodate property="war.uptodate" targetfile="${dist}/${war}">
<srcfiles dir= "." includes="${build}/**/*.class, web.xml"/>
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="changes">
<target name="changes" depends="warUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />

View File

@ -23,12 +23,14 @@ package net.i2p.addressbook;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import net.i2p.I2PAppContext;
import net.i2p.util.EepGet;
import net.i2p.util.SecureFile;
/**
* An address book for storing human readable names mapped to base64 i2p
@ -40,11 +42,12 @@ import net.i2p.util.EepGet;
*/
class AddressBook {
private String location;
private Map addresses;
private final String location;
/** either addresses or subFile will be non-null, but not both */
private final Map<String, String> addresses;
private final File subFile;
private boolean modified;
private static final boolean DEBUG = false;
/**
* Construct an AddressBook from the contents of the Map addresses.
@ -53,8 +56,10 @@ class AddressBook {
* A Map containing human readable addresses as keys, mapped to
* base64 i2p destinations.
*/
public AddressBook(Map addresses) {
public AddressBook(Map<String, String> addresses) {
this.addresses = addresses;
this.subFile = null;
this.location = null;
}
/*
@ -82,6 +87,7 @@ class AddressBook {
}
*/
static final long MAX_SUB_SIZE = 3 * 1024 * 1024l; //about 5,000 hosts
/**
* Construct an AddressBook from the Subscription subscription. If the
* address book at subscription has not changed since the last time it was
@ -90,33 +96,46 @@ class AddressBook {
*
* Yes, the EepGet fetch() is done in this constructor.
*
* This stores the subscription in a temporary file and does not read the whole thing into memory.
* An AddressBook created with this constructor may not be modified or written using write().
* It may be a merge source (an parameter for another AddressBook's merge())
* but may not be a merge target (this.merge() will throw an exception).
*
* @param subscription
* A Subscription instance pointing at a remote address book.
* @param proxyHost hostname of proxy
* @param proxyPort port number of proxy
*/
public AddressBook(Subscription subscription, String proxyHost, int proxyPort) {
File tmp = new File(I2PAppContext.getGlobalContext().getTempDir(), "addressbook.tmp");
Map<String, String> a = null;
File subf = null;
try {
File tmp = SecureFile.createTempFile("addressbook", null, I2PAppContext.getGlobalContext().getTempDir());
EepGet get = new EepGet(I2PAppContext.getGlobalContext(), true,
proxyHost, proxyPort, 0, -1l, MAX_SUB_SIZE, tmp.getAbsolutePath(), null,
subscription.getLocation(), true, subscription.getEtag(), subscription.getLastModified(), null);
if (get.fetch()) {
subscription.setEtag(get.getETag());
subscription.setLastModified(get.getLastModified());
subscription.setLastFetched(I2PAppContext.getGlobalContext().clock().now());
subf = tmp;
} else {
a = Collections.EMPTY_MAP;
tmp.delete();
}
} catch (IOException ioe) {
a = Collections.EMPTY_MAP;
}
this.addresses = a;
this.subFile = subf;
this.location = subscription.getLocation();
EepGet get = new EepGet(I2PAppContext.getGlobalContext(), true,
proxyHost, proxyPort, 0, -1l, MAX_SUB_SIZE, tmp.getAbsolutePath(), null,
subscription.getLocation(), true, subscription.getEtag(), subscription.getLastModified(), null);
if (get.fetch()) {
subscription.setEtag(get.getETag());
subscription.setLastModified(get.getLastModified());
subscription.setLastFetched(I2PAppContext.getGlobalContext().clock().now());
}
try {
this.addresses = ConfigParser.parse(tmp);
} catch (IOException exp) {
this.addresses = new HashMap();
}
tmp.delete();
}
/**
* Construct an AddressBook from the contents of the file at file. If the
* file cannot be read, construct an empty AddressBook
* file cannot be read, construct an empty AddressBook.
* This reads the entire file into memory.
* The resulting map is modifiable and may be a merge target.
*
* @param file
* A File pointing at a file with lines in the format
@ -125,22 +144,38 @@ class AddressBook {
*/
public AddressBook(File file) {
this.location = file.toString();
Map<String, String> a;
try {
this.addresses = ConfigParser.parse(file);
a = ConfigParser.parse(file);
} catch (IOException exp) {
this.addresses = new HashMap();
a = new HashMap();
}
this.addresses = a;
this.subFile = null;
}
/**
* Return a Map containing the addresses in the AddressBook.
*
* @return A Map containing the addresses in the AddressBook, where the key
* is a human readable name, and the value is a base64 i2p
* destination.
* Return an iterator over the addresses in the AddressBook.
* @since 0.8.7
*/
public Map getAddresses() {
return this.addresses;
public Iterator<Map.Entry<String, String>> iterator() {
if (this.subFile != null)
return new ConfigIterator(this.subFile);
return this.addresses.entrySet().iterator();
}
/**
* Delete the temp file or clear the map.
* @since 0.8.7
*/
public void delete() {
if (this.subFile != null) {
this.subFile.delete();
} else if (this.addresses != null) {
try {
this.addresses.clear();
} catch (UnsupportedOperationException uoe) {}
}
}
/**
@ -148,29 +183,32 @@ class AddressBook {
*
* @return A String representing either an abstract path, or a url,
* depending on how the instance was constructed.
* Will be null if created with the Map constructor.
*/
public String getLocation() {
return this.location;
}
/**
* Return a string representation of the contents of the AddressBook.
* Return a string representation of the origin of the AddressBook.
*
* @return A String representing the contents of the AddressBook.
* @return A String representing the origin of the AddressBook.
*/
@Override
public String toString() {
return this.addresses.toString();
if (this.location != null)
return "Book from " + this.location;
return "Map containing " + this.addresses.size() + " entries";
}
private static final int MIN_DEST_LENGTH = 516;
private static final int MAX_DEST_LENGTH = MIN_DEST_LENGTH + 100; // longer than any known cert type for now
/**
* Do basic validation of the hostname and dest
* Do basic validation of the hostname
* hostname was already converted to lower case by ConfigParser.parse()
*/
private static boolean valid(String host, String dest) {
public static boolean isValidKey(String host) {
return
host.endsWith(".i2p") &&
host.length() > 4 &&
@ -194,8 +232,15 @@ class AddressBook {
(! host.equals("console.i2p")) &&
(! host.endsWith(".proxy.i2p")) &&
(! host.endsWith(".router.i2p")) &&
(! host.endsWith(".console.i2p")) &&
(! host.endsWith(".console.i2p"))
;
}
/**
* Do basic validation of the b64 dest, without bothering to instantiate it
*/
private static boolean isValidDest(String dest) {
return
// null cert ends with AAAA but other zero-length certs would be AA
((dest.length() == MIN_DEST_LENGTH && dest.endsWith("AA")) ||
(dest.length() > MIN_DEST_LENGTH && dest.length() <= MAX_DEST_LENGTH)) &&
@ -216,18 +261,21 @@ class AddressBook {
* @param overwrite True to overwrite
* @param log
* The log to write messages about new addresses or conflicts to.
*
* @throws IllegalStateException if this was created with the Subscription constructor.
*/
public void merge(AddressBook other, boolean overwrite, Log log) {
Iterator otherIter = other.addresses.keySet().iterator();
if (this.addresses == null)
throw new IllegalStateException();
for (Iterator<Map.Entry<String, String>> iter = other.iterator(); iter.hasNext(); ) {
Map.Entry<String, String> entry = iter.next();
String otherKey = entry.getKey();
String otherValue = entry.getValue();
while (otherIter.hasNext()) {
String otherKey = (String) otherIter.next();
String otherValue = (String) other.addresses.get(otherKey);
if (valid(otherKey, otherValue)) {
if (isValidKey(otherKey) && isValidDest(otherValue)) {
if (this.addresses.containsKey(otherKey) && !overwrite) {
if (!this.addresses.get(otherKey).equals(otherValue)
&& log != null) {
if (DEBUG && log != null &&
!this.addresses.get(otherKey).equals(otherValue)) {
log.append("Conflict for " + otherKey + " from "
+ other.location
+ ". Destination in remote address book is "
@ -252,8 +300,12 @@ class AddressBook {
*
* @param file
* The file to write the contents of this AddressBook too.
*
* @throws IllegalStateException if this was created with the Subscription constructor.
*/
public void write(File file) {
if (this.addresses == null)
throw new IllegalStateException();
if (this.modified) {
try {
ConfigParser.write(this.addresses, file);
@ -267,8 +319,17 @@ class AddressBook {
* Write this AddressBook out to the file it was read from. Requires that
* AddressBook was constructed from a file on the local filesystem. If the
* file cannot be writen to, this method will silently fail.
*
* @throws IllegalStateException if this was not created with the File constructor.
*/
public void write() {
if (this.location == null || this.location.startsWith("http://"))
throw new IllegalStateException();
this.write(new File(this.location));
}
@Override
protected void finalize() {
delete();
}
}

View File

@ -0,0 +1,145 @@
/*
* Copyright (c) 2004 Ragnarok
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.i2p.addressbook;
import java.io.BufferedReader;
import java.io.File;
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;
/**
* A class to iterate through a hosts.txt or config file without
* reading the whole thing into memory.
* Keys are always converted to lower case.
*
* Callers should iterate all the way through or call close()
* to ensure the underlying stream is closed.
*
* @since 0.8.7
*/
class ConfigIterator implements Iterator<Map.Entry<String, String>> {
private BufferedReader input;
private ConfigEntry next;
/**
* A dummy iterator in which hasNext() is always false.
*/
public ConfigIterator() {}
/**
* An iterator over the key/value pairs in the file.
*/
public ConfigIterator(File file) {
try {
FileInputStream fileStream = new FileInputStream(file);
input = new BufferedReader(new InputStreamReader(fileStream));
} catch (IOException ioe) {}
}
public boolean hasNext() {
if (input == null)
return false;
if (next != null)
return true;
try {
String inputLine = input.readLine();
while (inputLine != null) {
inputLine = ConfigParser.stripComments(inputLine);
String[] splitLine = inputLine.split("=");
if (splitLine.length == 2) {
next = new ConfigEntry(splitLine[0].trim().toLowerCase(Locale.US), splitLine[1].trim());
return true;
}
inputLine = input.readLine();
}
} catch (IOException ioe) {}
try { input.close(); } catch (IOException ioe) {}
input = null;
next = null;
return false;
}
public Map.Entry<String, String> next() {
if (!hasNext())
throw new NoSuchElementException();
Map.Entry<String, String> rv = next;
next = null;
return rv;
}
public void remove() {
throw new UnsupportedOperationException();
}
public void close() {
if (input != null) {
try { input.close(); } catch (IOException ioe) {}
}
}
@Override
protected void finalize() {
close();
}
/**
* The object returned by the iterator.
*/
private static class ConfigEntry implements Map.Entry<String, String> {
private final String key;
private final String value;
public ConfigEntry(String k, String v) {
key = k;
value = v;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
public String setValue(String v) {
throw new UnsupportedOperationException();
}
public int hashCode() {
return key.hashCode() ^ value.hashCode();
}
public boolean equals(Object o) {
if (!(o instanceof Map.Entry))
return false;
Map.Entry e = (Map.Entry) o;
return key.equals(e.getKey()) && value.equals(e.getValue());
}
}
}

View File

@ -30,9 +30,9 @@ import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.StringReader;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import net.i2p.util.SecureFile;
@ -85,15 +85,15 @@ class ConfigParser {
* if the BufferedReader cannot be read.
*
*/
public static Map parse(BufferedReader input) throws IOException {
Map result = new HashMap();
public static Map<String, String> parse(BufferedReader input) throws IOException {
Map<String, String> result = new HashMap();
String inputLine;
inputLine = input.readLine();
while (inputLine != null) {
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();
}
@ -111,11 +111,11 @@ class ConfigParser {
* @throws IOException
* if file cannot be read.
*/
public static Map parse(File file) throws IOException {
public static Map<String, String> parse(File file) throws IOException {
FileInputStream fileStream = new FileInputStream(file);
BufferedReader input = new BufferedReader(new InputStreamReader(
fileStream));
Map rv = ConfigParser.parse(input);
Map<String, String> rv = ConfigParser.parse(input);
try {
fileStream.close();
} catch (IOException ioe) {}
@ -132,7 +132,7 @@ class ConfigParser {
* @throws IOException
* if file cannot be read.
*/
public static Map parse(String string) throws IOException {
public static Map<String, String> parse(String string) throws IOException {
StringReader stringReader = new StringReader(string);
BufferedReader input = new BufferedReader(stringReader);
return ConfigParser.parse(input);
@ -149,14 +149,13 @@ class ConfigParser {
* @return A Map containing the key, value pairs from file, or if file
* cannot be read, map.
*/
public static Map parse(File file, Map map) {
Map result;
public static Map<String, String> parse(File file, Map<String, String> map) {
Map<String, String> result;
try {
result = ConfigParser.parse(file);
for (Iterator iter = map.keySet().iterator(); iter.hasNext(); ) {
String key = (String) iter.next();
if (!result.containsKey(key))
result.put(key, map.get(key));
for (Map.Entry<String, String> entry : map.entrySet()) {
if (!result.containsKey(entry.getKey()))
result.put(entry.getKey(), entry.getValue());
}
} catch (IOException exp) {
result = map;
@ -177,9 +176,9 @@ class ConfigParser {
* @throws IOException
* if input cannot be read.
*/
public static List parseSubscriptions(BufferedReader input)
public static List<String> parseSubscriptions(BufferedReader input)
throws IOException {
List result = new LinkedList();
List<String> result = new LinkedList();
String inputLine = input.readLine();
while (inputLine != null) {
inputLine = ConfigParser.stripComments(inputLine).trim();
@ -201,11 +200,11 @@ class ConfigParser {
* @throws IOException
* if file cannot be read.
*/
public static List parseSubscriptions(File file) throws IOException {
public static List<String> parseSubscriptions(File file) throws IOException {
FileInputStream fileStream = new FileInputStream(file);
BufferedReader input = new BufferedReader(new InputStreamReader(
fileStream));
List rv = ConfigParser.parseSubscriptions(input);
List<String> rv = ConfigParser.parseSubscriptions(input);
try {
fileStream.close();
} catch (IOException ioe) {}
@ -221,7 +220,7 @@ class ConfigParser {
* @throws IOException
* if string cannot be read.
*/
public static List parseSubscriptions(String string) throws IOException {
public static List<String> parseSubscriptions(String string) throws IOException {
StringReader stringReader = new StringReader(string);
BufferedReader input = new BufferedReader(stringReader);
return ConfigParser.parseSubscriptions(input);
@ -238,8 +237,8 @@ class ConfigParser {
* @return A List consisting of one element for each line in file, or if
* file cannot be read, list.
*/
public static List parseSubscriptions(File file, List list) {
List result;
public static List<String> parseSubscriptions(File file, List<String> list) {
List<String> result;
try {
result = ConfigParser.parseSubscriptions(file);
} catch (IOException exp) {
@ -263,12 +262,9 @@ class ConfigParser {
* @throws IOException
* if the BufferedWriter cannot be written to.
*/
public static void write(Map map, BufferedWriter output) throws IOException {
Iterator keyIter = map.keySet().iterator();
while (keyIter.hasNext()) {
String key = (String) keyIter.next();
output.write(key + "=" + (String) map.get(key));
public static void write(Map<String, String> map, BufferedWriter output) throws IOException {
for (Map.Entry<String, String> entry : map.entrySet()) {
output.write(entry.getKey() + '=' + entry.getValue());
output.newLine();
}
output.close();
@ -288,7 +284,7 @@ class ConfigParser {
* @throws IOException
* if file cannot be written to.
*/
public static void write(Map map, File file) throws IOException {
public static void write(Map<String, String> map, File file) throws IOException {
boolean success = false;
if (!isWindows) {
File tmp = SecureFile.createTempFile("temp-", ".tmp", file.getAbsoluteFile().getParentFile());
@ -318,12 +314,10 @@ class ConfigParser {
* @throws IOException
* if output cannot be written to.
*/
public static void writeSubscriptions(List list, BufferedWriter output)
public static void writeSubscriptions(List<String> list, BufferedWriter output)
throws IOException {
Iterator iter = list.iterator();
while (iter.hasNext()) {
output.write((String) iter.next());
for (String s : list) {
output.write(s);
output.newLine();
}
output.close();
@ -340,7 +334,7 @@ class ConfigParser {
* @throws IOException
* if output cannot be written to.
*/
public static void writeSubscriptions(List list, File file)
public static void writeSubscriptions(List<String> list, File file)
throws IOException {
ConfigParser.writeSubscriptions(list, new BufferedWriter(
new OutputStreamWriter(new SecureFileOutputStream(file), "UTF-8")));

View File

@ -22,13 +22,20 @@
package net.i2p.addressbook;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import net.i2p.I2PAppContext;
import net.i2p.client.naming.NamingService;
import net.i2p.client.naming.SingleFileNamingService;
import net.i2p.data.DataFormatException;
import net.i2p.data.Destination;
import net.i2p.util.SecureDirectory;
/**
@ -41,6 +48,7 @@ public class Daemon {
public static final String VERSION = "2.0.4";
private static final Daemon _instance = new Daemon();
private boolean _running;
private static final boolean DEBUG = false;
/**
* Update the router and published address books using remote data from the
@ -49,29 +57,166 @@ public class Daemon {
* @param master
* The master AddressBook. This address book is never
* overwritten, so it is safe for the user to write to.
* It is only merged to the published addressbook.
* May be null.
* @param router
* The router AddressBook. This is the address book read by
* client applications.
* @param published
* The published AddressBook. This address book is published on
* the user's eepsite so that others may subscribe to it.
* May be null.
* If non-null, overwrite with the new addressbook.
* @param subscriptions
* A SubscriptionList listing the remote address books to update
* from.
* @param log
* The log to write changes and conflicts to.
* May be null.
*/
public void update(AddressBook master, AddressBook router,
public static void update(AddressBook master, AddressBook router,
File published, SubscriptionList subscriptions, Log log) {
router.merge(master, true, null);
Iterator iter = subscriptions.iterator();
Iterator<AddressBook> iter = subscriptions.iterator();
while (iter.hasNext()) {
// yes, the EepGet fetch() is done in next()
router.merge((AddressBook) iter.next(), false, log);
router.merge(iter.next(), false, log);
}
router.write();
if (published != null)
if (published != null) {
if (master != null)
router.merge(master, true, null);
router.write(published);
}
subscriptions.write();
}
/**
* Update the router and published address books using remote data from the
* subscribed address books listed in subscriptions.
* Merging of the "master" addressbook is NOT supported.
*
* @param router
* The NamingService to update, generally the root NamingService from the context.
* @param published
* The published AddressBook. This address book is published on
* the user's eepsite so that others may subscribe to it.
* May be null.
* If non-null, overwrite with the new addressbook.
* @param subscriptions
* A SubscriptionList listing the remote address books to update
* from.
* @param log
* The log to write changes and conflicts to.
* May be null.
* @since 0.8.7
*/
public static void update(NamingService router, File published, SubscriptionList subscriptions, Log log) {
// If the NamingService is a database, we look up as we go.
// If it is a text file, we do things differently, to avoid O(n**2) behavior
// when scanning large subscription results (i.e. those that return the whole file, not just the new entries) -
// we load all the known hostnames into a Set one time.
// This also has the advantage of not flushing the NamingService's LRU cache.
String nsClass = router.getClass().getSimpleName();
boolean isTextFile = nsClass.equals("HostsTxtNamingService") || nsClass.equals("SingleFileNamingService");
Set<String> knownNames = null;
NamingService publishedNS = null;
Iterator<AddressBook> iter = subscriptions.iterator();
while (iter.hasNext()) {
// yes, the EepGet fetch() is done in next()
long start = System.currentTimeMillis();
AddressBook sub = iter.next();
long end = System.currentTimeMillis();
// SubscriptionIterator puts in a dummy AddressBook with no location if no fetch is done
if (DEBUG && log != null && sub.getLocation() != null)
log.append("Fetch of " + sub.getLocation() + " took " + (end - start));
start = end;
int old = 0, nnew = 0, invalid = 0, conflict = 0, total = 0;
for (Iterator<Map.Entry<String, String>> eIter = sub.iterator(); eIter.hasNext(); ) {
Map.Entry<String, String> entry = eIter.next();
String key = entry.getKey();
boolean isKnown;
Destination oldDest = null;
if (isTextFile) {
if (knownNames == null) {
// load the hostname set
Properties opts = new Properties();
opts.setProperty("file", "hosts.txt");
knownNames = router.getNames(opts);
}
isKnown = knownNames.contains(key);
} else {
oldDest = router.lookup(key);
isKnown = oldDest != null;
}
try {
if (!isKnown) {
if (AddressBook.isValidKey(key)) {
Destination dest = new Destination(entry.getValue());
Properties props = new Properties();
props.setProperty("s", sub.getLocation());
boolean success = router.put(key, dest, props);
if (log != null) {
if (success)
log.append("New address " + key +
" added to address book. From: " + sub.getLocation());
else
log.append("Save to naming service " + router + " failed for new key " + key);
}
// now update the published addressbook
if (published != null) {
if (publishedNS == null)
publishedNS = new SingleFileNamingService(I2PAppContext.getGlobalContext(), published.getAbsolutePath());
success = publishedNS.putIfAbsent(key, dest);
if (!success) {
try {
log.append("Save to published address book " + published.getCanonicalPath() + " failed for new key " + key);
} catch (IOException ioe) {}
}
}
if (isTextFile)
// keep track for later dup check
knownNames.add(key);
nnew++;
} else if (log != null) {
log.append("Bad hostname " + key + " from "
+ sub.getLocation());
invalid++;
}
} else if (false && DEBUG && log != null) {
// lookup the conflict if we haven't yet (O(n**2) for text file)
if (isTextFile)
oldDest = router.lookup(key);
if (oldDest != null && !oldDest.toBase64().equals(entry.getValue())) {
log.append("Conflict for " + key + " from "
+ sub.getLocation()
+ ". Destination in remote address book is "
+ entry.getValue());
conflict++;
} else {
old++;
}
} else {
old++;
}
} catch (DataFormatException dfe) {
if (log != null)
log.append("Invalid b64 for " + key + " From: " + sub.getLocation());
invalid++;
}
total++;
}
if (DEBUG && log != null && total > 0) {
log.append("Merge of " + sub.getLocation() + " into " + router +
" took " + (System.currentTimeMillis() - start) + " ms with " +
total + " total, " +
nnew + " new, " +
old + " old, " +
invalid + " invalid, " +
conflict + " conflicts");
}
sub.delete();
}
subscriptions.write();
}
@ -83,44 +228,80 @@ public class Daemon {
* @param home
* The directory containing addressbook's configuration files.
*/
public void update(Map settings, String home) {
File masterFile = new File(home, (String) settings
.get("master_addressbook"));
File routerFile = new File(home, (String) settings
.get("router_addressbook"));
public static void update(Map<String, String> settings, String home) {
File published = null;
if ("true".equals(settings.get("should_publish")))
published = new File(home, (String) settings
boolean should_publish = Boolean.valueOf(settings.get("should_publish")).booleanValue();
if (should_publish)
published = new File(home, settings
.get("published_addressbook"));
File subscriptionFile = new File(home, (String) settings
File subscriptionFile = new File(home, settings
.get("subscriptions"));
File logFile = new File(home, (String) settings.get("log"));
File etagsFile = new File(home, (String) settings.get("etags"));
File lastModifiedFile = new File(home, (String) settings
File logFile = new File(home, settings.get("log"));
File etagsFile = new File(home, settings.get("etags"));
File lastModifiedFile = new File(home, settings
.get("last_modified"));
File lastFetchedFile = new File(home, (String) settings
File lastFetchedFile = new File(home, settings
.get("last_fetched"));
long delay;
try {
delay = Long.parseLong((String) settings.get("update_delay"));
delay = Long.parseLong(settings.get("update_delay"));
} catch (NumberFormatException nfe) {
delay = 12;
}
delay *= 60 * 60 * 1000;
AddressBook master = new AddressBook(masterFile);
AddressBook router = new AddressBook(routerFile);
List defaultSubs = new LinkedList();
List<String> defaultSubs = new LinkedList();
// defaultSubs.add("http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/i2p/hosts.txt");
defaultSubs.add("http://www.i2p2.i2p/hosts.txt");
SubscriptionList subscriptions = new SubscriptionList(subscriptionFile,
etagsFile, lastModifiedFile, lastFetchedFile, delay, defaultSubs, (String) settings
.get("proxy_host"), Integer.parseInt((String) settings.get("proxy_port")));
etagsFile, lastModifiedFile, lastFetchedFile, delay, defaultSubs, settings
.get("proxy_host"), Integer.parseInt(settings.get("proxy_port")));
Log log = new Log(logFile);
update(master, router, published, subscriptions, log);
// If false, add hosts via naming service; if true, write hosts.txt file directly
// Default false
if (Boolean.valueOf(settings.get("update_direct")).booleanValue()) {
// Direct hosts.txt access
File routerFile = new File(home, settings.get("router_addressbook"));
AddressBook master;
if (should_publish) {
File masterFile = new File(home, settings.get("master_addressbook"));
master = new AddressBook(masterFile);
} else {
master = null;
}
AddressBook router = new AddressBook(routerFile);
update(master, router, published, subscriptions, log);
} else {
// Naming service - no merging of master to router and published is supported.
update(getNamingService(settings.get("naming_service")), published, subscriptions, log);
}
}
/** depth-first search */
private static NamingService searchNamingService(NamingService ns, String srch)
{
String name = ns.getName();
if (name.equals(srch) || name.endsWith('/' + srch) || name.endsWith('\\' + srch))
return ns;
List<NamingService> list = ns.getNamingServices();
if (list != null) {
for (NamingService nss : list) {
NamingService rv = searchNamingService(nss, srch);
if (rv != null)
return rv;
}
}
return null;
}
/** @return the configured NamingService, or the root NamingService */
private static NamingService getNamingService(String srch)
{
NamingService root = I2PAppContext.getGlobalContext().namingService();
NamingService rv = searchNamingService(root, srch);
return rv != null ? rv : root;
}
/**
@ -149,7 +330,7 @@ public class Daemon {
homeFile = new SecureDirectory(System.getProperty("user.dir"));
}
Map defaultSettings = new HashMap();
Map<String, String> defaultSettings = new HashMap();
defaultSettings.put("proxy_host", "127.0.0.1");
defaultSettings.put("proxy_port", "4444");
defaultSettings.put("master_addressbook", "../userhosts.txt");
@ -162,6 +343,8 @@ public class Daemon {
defaultSettings.put("last_modified", "last_modified");
defaultSettings.put("last_fetched", "last_fetched");
defaultSettings.put("update_delay", "12");
defaultSettings.put("update_direct", "false");
defaultSettings.put("naming_service", "hosts.txt");
if (!homeFile.exists()) {
boolean created = homeFile.mkdirs();
@ -173,7 +356,7 @@ public class Daemon {
File settingsFile = new File(homeFile, settingsLocation);
Map settings = ConfigParser.parse(settingsFile, defaultSettings);
Map<String, String> settings = ConfigParser.parse(settingsFile, defaultSettings);
// wait
try {
Thread.sleep(5*60*1000 + I2PAppContext.getGlobalContext().random().nextLong(5*60*1000));
@ -181,7 +364,7 @@ public class Daemon {
} catch (InterruptedException ie) {}
while (_running) {
long delay = Long.parseLong((String) settings.get("update_delay"));
long delay = Long.parseLong(settings.get("update_delay"));
if (delay < 1) {
delay = 1;
}

View File

@ -21,13 +21,18 @@
package net.i2p.addressbook;
import java.util.Properties;
import net.i2p.I2PAppContext;
import net.i2p.client.naming.NamingServiceUpdater;
/**
* A thread that waits five minutes, then runs the addressbook daemon.
*
* @author Ragnarok
*
*/
class DaemonThread extends Thread {
public class DaemonThread extends Thread implements NamingServiceUpdater {
private String[] args;
@ -49,11 +54,22 @@ class DaemonThread extends Thread {
// Thread.sleep(5 * 60 * 1000);
//} catch (InterruptedException exp) {
//}
I2PAppContext.getGlobalContext().namingService().registerUpdater(this);
Daemon.main(this.args);
I2PAppContext.getGlobalContext().namingService().unregisterUpdater(this);
}
public void halt() {
Daemon.stop();
interrupt();
}
/**
* The NamingServiceUpdater interface
* @param options ignored
* @since 0.8.7
*/
public void update(Properties options) {
interrupt();
}
}

View File

@ -84,7 +84,7 @@ public class Servlet extends HttpServlet {
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
@ -35,9 +34,9 @@ import net.i2p.data.DataHelper; // debug
*
* @author Ragnarok
*/
class SubscriptionIterator implements Iterator {
class SubscriptionIterator implements Iterator<AddressBook> {
private Iterator subIterator;
private Iterator<Subscription> subIterator;
private String proxyHost;
private int proxyPort;
private final long delay;
@ -51,7 +50,7 @@ class SubscriptionIterator implements Iterator {
* @param proxyHost proxy hostname
* @param proxyPort proxt port number
*/
public SubscriptionIterator(List subscriptions, long delay, String proxyHost, int proxyPort) {
public SubscriptionIterator(List<Subscription> subscriptions, long delay, String proxyHost, int proxyPort) {
this.subIterator = subscriptions.iterator();
this.delay = delay;
this.proxyHost = proxyHost;
@ -72,8 +71,8 @@ class SubscriptionIterator implements Iterator {
* see java.util.Iterator#next()
* @return an AddressBook (empty if the minimum delay has not been met)
*/
public Object next() {
Subscription sub = (Subscription) this.subIterator.next();
public AddressBook next() {
Subscription sub = this.subIterator.next();
if (sub.getLastFetched() + this.delay < I2PAppContext.getGlobalContext().clock().now()) {
//System.err.println("Fetching addressbook from " + sub.getLocation());
return new AddressBook(sub, this.proxyHost, this.proxyPort);

View File

@ -24,7 +24,6 @@ package net.i2p.addressbook;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@ -37,7 +36,7 @@ import java.util.Map;
*/
class SubscriptionList {
private List subscriptions;
private List<Subscription> subscriptions;
private File etagsFile;
@ -68,7 +67,7 @@ class SubscriptionList {
* @param proxyPort proxy port number
*/
public SubscriptionList(File locationsFile, File etagsFile,
File lastModifiedFile, File lastFetchedFile, long delay, List defaultSubs, String proxyHost,
File lastModifiedFile, File lastFetchedFile, long delay, List<String> defaultSubs, String proxyHost,
int proxyPort) {
this.subscriptions = new LinkedList();
this.etagsFile = etagsFile;
@ -77,11 +76,10 @@ class SubscriptionList {
this.delay = delay;
this.proxyHost = proxyHost;
this.proxyPort = proxyPort;
Map etags;
Map lastModified;
Map lastFetched;
String location;
List locations = ConfigParser.parseSubscriptions(locationsFile,
Map<String, String> etags;
Map<String, String> lastModified;
Map<String, String> lastFetched;
List<String> locations = ConfigParser.parseSubscriptions(locationsFile,
defaultSubs);
try {
etags = ConfigParser.parse(etagsFile);
@ -98,12 +96,10 @@ class SubscriptionList {
} catch (IOException exp) {
lastFetched = new HashMap();
}
Iterator iter = locations.iterator();
while (iter.hasNext()) {
location = (String) iter.next();
this.subscriptions.add(new Subscription(location, (String) etags.get(location),
(String) lastModified.get(location),
(String) lastFetched.get(location)));
for (String location : locations) {
this.subscriptions.add(new Subscription(location, etags.get(location),
lastModified.get(location),
lastFetched.get(location)));
}
}
@ -125,13 +121,10 @@ class SubscriptionList {
* won't be read back correctly; the '=' should be escaped.
*/
public void write() {
Iterator iter = this.subscriptions.iterator();
Subscription sub;
Map etags = new HashMap();
Map lastModified = new HashMap();
Map lastFetched = new HashMap();
while (iter.hasNext()) {
sub = (Subscription) iter.next();
Map<String, String> etags = new HashMap();
Map<String, String> lastModified = new HashMap();
Map<String, String> lastFetched = new HashMap();
for (Subscription sub : this.subscriptions) {
if (sub.getEtag() != null) {
etags.put(sub.getLocation(), sub.getEtag());
}

View File

@ -1,381 +0,0 @@
package net.i2p.client;
/*
* 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.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
import net.i2p.I2PAppContext;
import net.i2p.I2PException;
import net.i2p.data.DataFormatException;
import net.i2p.data.Destination;
import net.i2p.util.Clock;
import net.i2p.util.I2PThread;
import net.i2p.util.Log;
/**
* ATalk - anonymous talk, demonstrating a trivial I2P usage scenario.
* Run this class with no arguments for a manual.
*
* @author jrandom
*/
public class ATalk implements I2PSessionListener, Runnable {
/** logging hook - status messages are piped to this */
private final static Log _log = new Log(ATalk.class);
/** platform independent newline */
private final static String NL = System.getProperty("line.separator");
/** the current session */
private I2PSession _session;
/** who am i */
private Destination _myDestination;
/** who are you? */
private Destination _peerDestination;
/** location of my secret key file */
private String _myKeyFile;
/** location of their public key */
private String _theirDestinationFile;
/** where the application reads input from. currently set to standard input */
private BufferedReader _in;
/** where the application sends output to. currently set to standard output */
private BufferedWriter _out;
/** string that messages must begin with to be treated as files */
private final static String FILE_COMMAND = ".file: ";
/** the, erm, manual */
private final static String MANUAL = "ATalk: Anonymous Talk, a demo program for the Invisible Internet Project SDK"
+ NL
+ "To generate a new destination:"
+ NL
+ "\tATalk [fileToSavePrivateKeyIn] [fileToSavePublicKeyIn]"
+ NL
+ "To talk to another destination:"
+ NL
+ "\tATalk [myPrivateKeyFile] [peerPublicKey] [shouldLogToScreen]"
+ NL
+ "shouldLogToScreen is 'true' or 'false', depending on whether you want log info on the screen"
+ NL
+ "When talking to another destination, messages are sent after you hit return"
+ NL
+ "To send a file, send a message saying:"
+ NL
+ "\t"
+ FILE_COMMAND
+ "[filenameToSend]"
+ NL
+ "The peer will then recieve the file and be notified of where it has been saved"
+ NL
+ "To end the talk session, enter a period on a line by itself and hit return"
+ NL;
public final static String PROP_CONFIG_LOCATION = "configFile";
private static final SimpleDateFormat _fmt = new SimpleDateFormat("hh:mm:ss.SSS");
/** Construct the talk engine, but don't connect yet */
public ATalk(String myKeyFile, String theirDestFile) {
_myKeyFile = myKeyFile;
_theirDestinationFile = theirDestFile;
}
/** Actually start up the connection to the I2P network.
* Successful connect does not mean the peer is online or reachable.
*
* @throws IOException if there is a problem reading in the keys from the files specified
* @throws DataFormatException if the key files are not in the valid format
* @throws I2PSessionException if there is a problem contacting the I2P router
*/
public void connect() throws IOException, I2PSessionException, DataFormatException {
I2PClient client = I2PClientFactory.createClient();
File myFile = new File(_myKeyFile);
Properties props = new Properties();
String configLocation = System.getProperty(PROP_CONFIG_LOCATION, "atalk.config");
try {
props.load(new FileInputStream(configLocation));
} catch (FileNotFoundException fnfe) {
_log.warn("Unable to load up the ATalk config file " + configLocation);
}
// Provide any router or client API configuration here.
if (!props.containsKey(I2PClient.PROP_TCP_HOST))
props.setProperty(I2PClient.PROP_TCP_HOST, "localhost");
if (!props.containsKey(I2PClient.PROP_TCP_PORT))
props.setProperty(I2PClient.PROP_TCP_PORT, "7654");
if (!props.containsKey(I2PClient.PROP_RELIABILITY))
props.setProperty(I2PClient.PROP_RELIABILITY, I2PClient.PROP_RELIABILITY_BEST_EFFORT);
_session = client.createSession(new FileInputStream(myFile), props);
_session.setSessionListener(this);
_session.connect();
File peerDestFile = new File(_theirDestinationFile);
_peerDestination = new Destination();
_peerDestination.readBytes(new FileInputStream(peerDestFile));
return;
}
/** Actual bulk processing of the application, reading in user input,
* sending messages, and displaying results. When this function exits, the
* application is complete.
*
*/
public void run() {
try {
connect();
_in = new BufferedReader(new InputStreamReader(System.in));
_out = new BufferedWriter(new OutputStreamWriter(System.out));
_out.write("Starting up anonymous talk session" + NL);
while (true) {
String line = _in.readLine();
if ((line == null) || (line.trim().length() <= 0)) continue;
if (".".equals(line)) {
boolean ok = _session.sendMessage(_peerDestination, ("Peer disconnected at " + now()).getBytes());
// ignore ok, we're closing
break;
}
if (line.startsWith(FILE_COMMAND) && (line.trim().length() > FILE_COMMAND.length())) {
try {
String file = line.substring(FILE_COMMAND.length());
boolean sent = sendFile(file);
if (!sent) {
_out.write("Failed sending the file: " + file + NL);
}
} catch (IOException ioe) {
_out.write("Error sending the file: " + ioe.getMessage() + NL);
_log.error("Error sending the file", ioe);
}
} else {
boolean ok = _session.sendMessage(_peerDestination, ("[" + now() + "] " + line).getBytes());
if (!ok) {
_out.write("Failed sending message. Peer disconnected?" + NL);
}
}
}
} catch (IOException ioe) {
_log.error("Error running", ioe);
} catch (I2PSessionException ise) {
_log.error("Error communicating", ise);
} catch (DataFormatException dfe) {
_log.error("Peer destination file is not valid", dfe);
} finally {
try {
_log.debug("Exiting anonymous talk session");
if (_out != null) _out.write("Exiting anonymous talk session");
} catch (IOException ioe) {
// ignored
}
if (_session != null) {
try {
_session.destroySession();
} catch (I2PSessionException ise) {
// ignored
}
}
try {
Thread.sleep(5000);
} catch (InterruptedException ie) { // nop!
}
}
}
private String now() {
Date now = new Date(Clock.getInstance().now());
return _fmt.format(now);
}
/** Send the given file to the current peer. This works by sending a message
* saying ".file: filename\nbodyOfFile", where filename is the name of the file
* (which the recipient will be shown), and the bodyOfFile is the set of raw
* bytes in the file.
*
* @throws IOException if the file could not be found or read
* @return false if the file could not be sent to the peer
*/
private boolean sendFile(String filename) throws IOException, I2PSessionException {
_log.debug("Sending file [" + filename + "]");
ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
baos.write((FILE_COMMAND + filename + "\n").getBytes());
FileInputStream fin = new FileInputStream(filename);
byte buf[] = new byte[4096];
try {
while (true) {
int len = fin.read(buf);
if (len == -1) break;
baos.write(buf, 0, len);
}
} catch (IOException ioe) {
_log.debug("Failed reading the file", ioe);
return false;
}
baos.close();
byte val[] = baos.toByteArray();
_log.debug("Sending " + filename + " with a full payload of " + val.length);
try {
boolean rv = _session.sendMessage(_peerDestination, val);
_log.debug("Sending " + filename + " complete: rv = " + rv);
return rv;
} catch (Throwable t) {
_log.error("Error sending file", t);
return false;
}
}
/** I2PSessionListener.messageAvailable requires this method to be called whenever
* I2P wants to tell the session that a message is available. ATalk always grabs
* the message immediately and either processes it as a "send file" command (passing
* it off to handleRecieveFile(..) or simply displays the
* message to the user.
*
*/
public void messageAvailable(I2PSession session, int msgId, long size) {
_log.debug("Message available: id = " + msgId + " size = " + size);
try {
byte msg[] = session.receiveMessage(msgId);
// inefficient way to just read the first line of text, but its easy
BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(msg)));
String line = reader.readLine();
if (line.startsWith(FILE_COMMAND)) {
handleRecieveFile(line, msg);
} else {
// not a file command, so just plop 'er out on the screen
_out.write(now() + " --> " + new String(msg));
_out.write(NL);
_out.flush();
}
} catch (I2PSessionException ise) {
_log.error("Error fetching available message", ise);
} catch (IOException ioe) {
_log.error("Error writing out the message", ioe);
}
}
/** React to a file being sent our way from the peer via {@link #sendFile sendFile}
* by saving the file to a temporary location and displaying where, what, and how large
* it is.
*
* @param firstline the first line of the message that, according to the sendFile
* implementation, contains the command and the filename that it was stored
* at on the peer's computer
* @param msg the entire message recieved, including the firstline
*/
private void handleRecieveFile(String firstline, byte msg[]) throws IOException {
_log.debug("handleRecieveFile called");
File f = File.createTempFile("recieve", ".dat", new File("."));
FileOutputStream fos = new FileOutputStream(f);
int lineLen = firstline.getBytes().length + "\n".getBytes().length;
int lenToCopy = msg.length - lineLen;
byte buf[] = new byte[lenToCopy];
System.arraycopy(msg, lineLen, buf, 0, lenToCopy);
fos.write(buf);
fos.close();
String name = firstline.substring(FILE_COMMAND.length());
_out.write("Recieved a file called [" + name + "] of size [" + lenToCopy + "] bytes, saved as ["
+ f.getAbsolutePath() + "]" + NL);
_out.flush();
}
/** driver */
public static void main(String args[]) {
I2PAppContext context = new I2PAppContext();
if (args.length == 2) {
String myKeyFile = args[0];
String myDestinationFile = args[1];
boolean success = generateKeys(myKeyFile, myDestinationFile);
if (success)
_log.debug("Keys generated (private key file: " + myKeyFile + " destination file: " + myDestinationFile
+ ")");
else
_log.debug("Keys generation failed");
try {
Thread.sleep(5000);
} catch (InterruptedException ie) { // nop
}
} else if (args.length == 3) {
_log.debug("Starting chat");
String myKeyfile = args[0];
String peerDestFile = args[1];
String shouldLog = args[2];
if (Boolean.TRUE.toString().equalsIgnoreCase(shouldLog))
context.logManager().setDisplayOnScreen(true);
else
context.logManager().setDisplayOnScreen(false);
String logFile = args[2];
Thread talkThread = new I2PThread(new ATalk(myKeyfile, peerDestFile));
talkThread.start();
} else {
System.out.println(MANUAL);
try {
Thread.sleep(5000);
} catch (InterruptedException ie) { // nop
}
System.exit(-1);
}
}
/** Generate a new Destination, saving that destination and the associated
* private keys in the privKeyFile, and also saving the destination without
* any private keys to destinationFile.
*
* @param privKeyFile private key file, including the destination and the various
* private keys, as defined by {@link I2PClient#createDestination I2PClient.createDestination}
* @param destinationFile file in which the Destination is serialized in
*/
private static boolean generateKeys(String privKeyFile, String destinationFile) {
try {
Destination d = I2PClientFactory.createClient().createDestination(new FileOutputStream(privKeyFile));
FileOutputStream fos = new FileOutputStream(destinationFile);
d.writeBytes(fos);
fos.flush();
fos.close();
return true;
} catch (IOException ioe) {
_log.error("Error generating keys", ioe);
} catch (I2PException ipe) {
_log.error("Error generating keys", ipe);
}
return false;
}
/** required by {@link I2PSessionListener I2PSessionListener} to notify of disconnect */
public void disconnected(I2PSession session) {
_log.debug("Disconnected");
}
/** required by {@link I2PSessionListener I2PSessionListener} to notify of error */
public void errorOccurred(I2PSession session, String message, Throwable error) {
_log.debug("Error occurred: " + message, error);
}
/** required by {@link I2PSessionListener I2PSessionListener} to notify of abuse */
public void reportAbuse(I2PSession session, int severity) {
_log.debug("Abuse reported of severity " + severity);
}
}

View File

@ -9,6 +9,7 @@
<property name="javadoc" value="javadoc"/>
<property name="javac.compilerargs" value=""/>
<property name="require.gettext" value="true" />
<target name="init">
<mkdir dir="${build}"/>
@ -29,8 +30,7 @@
<compilerarg line="${javac.compilerargs}" />
<classpath>
<pathelement location="../../core/java/build/i2p.jar" />
<!-- doesn't matter if we're not on win32, we just need the java classes, not the platform-dependent code -->
<pathelement location="../../installer/lib/wrapper/win32/wrapper.jar" />
<pathelement location="../../installer/lib/wrapper/all/wrapper.jar" />
<pathelement location="../../router/java/build/router.jar" />
</classpath>
</javac>
@ -39,17 +39,20 @@
</copy>
</target>
<target name="jar" depends="compile">
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
<target name="bundle" >
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
<arg value="./bundle-messages.sh" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" >
<arg value="./bundle-messages.sh" />
</exec>
<!-- multi-lang is optional -->
<exec executable="sh" osfamily="windows" failifexecutionfails="false" >
<arg value="./bundle-messages.sh" />
</exec>
</target>
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@ -61,6 +64,11 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<target name="jar" depends="compile, bundle, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<jar basedir="${build}" destfile="${dist}/${jar}">
<manifest>
<attribute name="Main-Class" value="net.i2p.desktopgui.Main"/>
@ -71,6 +79,20 @@
</jar>
</target>
<target name="jarUpToDate">
<uptodate property="jar.uptodate" targetfile="${dist}/${jar}" >
<srcfiles dir= "." includes="build/**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="javadoc">
<mkdir dir="${build}" />
<mkdir dir="${build}/${javadoc}" />
@ -88,15 +110,15 @@
</target>
<target name="poupdate">
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
<exec executable="sh" osfamily="windows" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>

View File

@ -13,6 +13,7 @@
CLASS=net.i2p.desktopgui.messages
TMPFILE=build/javafiles.txt
export TZ=UTC
RC=0
if [ "$1" = "-p" ]
then
@ -76,15 +77,17 @@ do
-o ${i}t
if [ $? -ne 0 ]
then
echo 'Warning - xgettext failed, not updating translations'
echo "ERROR - xgettext failed on ${i}, not updating translations"
rm -f ${i}t
RC=1
break
fi
msgmerge -U --backup=none $i ${i}t
if [ $? -ne 0 ]
then
echo 'Warning - msgmerge failed, not updating translations'
echo "ERROR - msgmerge failed on ${i}, not updating translations"
rm -f ${i}t
RC=1
break
fi
rm -f ${i}t
@ -101,11 +104,13 @@ do
msgfmt --java --statistics -r $CLASS -l $LG -d build $i
if [ $? -ne 0 ]
then
echo 'Warning - msgfmt failed, not updating translations'
echo "ERROR - msgfmt failed on ${i}, not updating translations"
# msgfmt leaves the class file there so the build would work the next time
find build -name messages_${LG}.class -exec rm -f {} \;
RC=1
break
fi
fi
done
rm -f $TMPFILE
# todo: return failure
exit 0
exit $RC

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,57 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# <kia___@hushmail.com>, 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-07-12 19:41+0000\n"
"Last-Translator: KIA <kia___@hushmail.com>\n"
"Language-Team: Danish (http://www.transifex.net/projects/p/I2P/team/da/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: da\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Start I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P starter nu!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Starter"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Start I2P Browseren"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Konfigurer desktopgui"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Genstart I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Stop I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Konfiguration af processbar ikonet"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Skal processbar ikonet være aktivt?"

View File

@ -0,0 +1,57 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# <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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Avvia I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "Avvio di I2P in corso!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Avvio"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Avvia il Browser I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Configura desktopgui"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Riavvia I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Ferma I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
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?"

View File

@ -0,0 +1,57 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# <b790979@klzlk.com>, 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-05-25 18:36+0000\n"
"Last-Translator: PolishAnon <b790979@klzlk.com>\n"
"Language-Team: Polish (http://www.transifex.net/projects/p/I2P/team/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: pl\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Uruchom I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "Uruchamianie I2P!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Uruchamianie"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Uruchom Przeglądarke I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Skonfiguruj intrefejs pulpitu (desktopgui)"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Zrestartuj I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Zatrzymaj I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Konfiguracja ikony zasobnika"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Czy ikona zasobnika powinna być aktywna?"

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:
# 123hund123 <M8R-ra4r1r@mailinator.com>, 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-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/language/sv_SE/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: sv_SE\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Starta I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P startas!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Startar"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Öppna I2P browser"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Konfigurera desktopgui"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Starta om I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Stoppar I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
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,57 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# <gribua@gmail.com>, 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-19 14:01+0000\n"
"Last-Translator: Pharmasolin <gribua@gmail.com>\n"
"Language-Team: Ukrainian (Ukraine) (http://www.transifex.net/projects/p/I2P/team/uk_UA/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: uk_UA\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Запустити I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P запускається!"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Запускається"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Запустити I2P Браузер"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Настроїти вигляд інтерфейсу"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Перезапустити I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Зупинити I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Настройка трей-іконки"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Чм повинна трей-іконка бути включена?"

View File

@ -0,0 +1,57 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the desktopgui package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# dich_tran <tran.nathan@gmail.com>, 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-04-12 06:13+0000\n"
"Last-Translator: dich_tran <tran.nathan@gmail.com>\n"
"Language-Team: Vietnamese (http://www.transifex.net/projects/p/I2P/team/vi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: vi\n"
"Plural-Forms: nplurals=1; plural=0\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
msgstr "Khởi động I2P"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "I2P is starting!"
msgstr "I2P đang bắt đầu"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:38
msgid "Starting"
msgstr "Bắt đầu"
#: src/net/i2p/desktopgui/InternalTrayManager.java:26
msgid "Launch I2P Browser"
msgstr "Kích hoạt trình duyệt I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "Cấu hình giao diện"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
msgstr "Khởi động lại I2P"
#: src/net/i2p/desktopgui/InternalTrayManager.java:85
msgid "Stop I2P"
msgstr "Ngưng I2P"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:44
msgid "Tray icon configuration"
msgstr "Cấu hình tray icon"
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:47
msgid "Should tray icon be enabled?"
msgstr "Cần dùng tray icon?"

View File

@ -1,14 +1,23 @@
# 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
#
# ducki2p <ducki2p@gmail.com>, 2011.
# walking <walking@i2pmail.org>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-02-16 17:10+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \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-24 09:18+0000\n"
"Last-Translator: walking <walking@i2pmail.org>\n"
"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/I2P/team/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0\n"
#: src/net/i2p/desktopgui/ExternalTrayManager.java:23
msgid "Start I2P"
@ -28,7 +37,7 @@ msgstr "正在启动I2P浏览器"
#: src/net/i2p/desktopgui/InternalTrayManager.java:50
msgid "Configure desktopgui"
msgstr "界面设置"
msgstr "设置desktopgui"
#: src/net/i2p/desktopgui/InternalTrayManager.java:67
msgid "Restart I2P"
@ -38,13 +47,12 @@ msgstr "重启 I2P"
msgid "Stop I2P"
msgstr "停止 I2P"
#. Translate interface
#: src/net/i2p/desktopgui/gui/DesktopguiConfigurationFrame.java:26
#: 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 "显示托盘图标"
msgstr "是否启用托盘图标"
#~ msgid "Browser not found"
#~ msgstr "Browser niet gevonden"
#~ msgid "The default browser for your system was not found."
#~ msgstr "De standaard webbrowser voor je systeem werd niet gevonden."

View File

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 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,14 @@
<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-util.jar" />
</classpath>
</depend>
</target>
<property name="javac.compilerargs" value="" />
<property name="require.gettext" value="true" />
<target name="compile" depends="depend">
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
@ -31,12 +35,12 @@
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-util.jar:../../ministreaming/java/build/mstreaming.jar" >
<compilerarg line="${javac.compilerargs}" />
</javac>
</target>
<target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@ -48,10 +52,17 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<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">
<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}" />
@ -63,6 +74,17 @@
<uptodate property="jar.uptodate" targetfile="build/i2psnark.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<not>
<isset property="wjar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<!-- Ideally we would include
@ -72,11 +94,19 @@
- So we must continue to duplicate everything in the war.
<classes dir="./build/obj" includes="**/I2PSnarkServlet*.class" />
-->
<target name="war" depends="jar, bundle, warUpToDate" unless="war.uptodate" >
<war destfile="../i2psnark.war" webxml="../web.xml" basedir="../" includes="_icons/*" >
<target name="war" depends="jar, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<copy todir="build/icons/.icons" >
<fileset dir="../icons/" />
</copy>
<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" />
<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}" />
@ -86,17 +116,17 @@
<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">
<!-- 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" >
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
<arg value="./bundle-messages.sh" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" >
<arg value="./bundle-messages.sh" />
</exec>
<!-- multi-lang is optional -->
@ -107,15 +137,15 @@
<target name="poupdate" depends="builddep, compile">
<!-- Update the messages_*.po files. -->
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
<exec executable="sh" osfamily="windows" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>

View File

@ -12,6 +12,7 @@
CLASS=org.klomp.snark.web.messages
TMPFILE=build/javafiles.txt
export TZ=UTC
RC=0
if [ "$1" = "-p" ]
then
@ -67,15 +68,17 @@ do
-o ${i}t
if [ $? -ne 0 ]
then
echo 'Warning - xgettext failed, not updating translations'
echo "ERROR - xgettext failed on ${i}, not updating translations"
rm -f ${i}t
RC=1
break
fi
msgmerge -U --backup=none $i ${i}t
if [ $? -ne 0 ]
then
echo 'Warning - msgmerge failed, not updating translations'
echo "ERROR - msgmerge failed on ${i}, not updating translations"
rm -f ${i}t
RC=1
break
fi
rm -f ${i}t
@ -92,11 +95,13 @@ do
msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i
if [ $? -ne 0 ]
then
echo 'Warning - msgfmt failed, not updating translations'
echo "ERROR - msgfmt failed on ${i}, not updating translations"
# msgfmt leaves the class file there so the build would work the next time
find build/obj -name messages_${LG}.class -exec rm -f {} \;
RC=1
break
fi
fi
done
rm -f $TMPFILE
# todo: return failure
exit 0
exit $RC

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,8 +22,6 @@ 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";
@ -39,15 +35,19 @@ abstract class ExtensionHandler {
/**
* @param metasize -1 if unknown
* @param pexAndMetadata advertise these capabilities
* @return bencoded outgoing handshake message
*/
public static byte[] getHandshake(int metasize) {
public static byte[] getHandshake(int metasize, boolean pexAndMetadata) {
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));
}
// 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 +56,22 @@ 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 (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 +82,20 @@ 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()
}
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 +104,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 +126,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 +153,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 +167,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 +184,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 +196,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 +206,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 +222,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 +251,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 +268,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 +287,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,9 +302,9 @@ 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);
@ -325,8 +326,8 @@ abstract class ExtensionHandler {
// 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);
}
}
@ -353,8 +354,8 @@ 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);
}
}

View File

@ -44,34 +44,34 @@ import org.klomp.snark.dht.DHT;
* (but not multiple SnarkManagers, it is still static)
*/
public class I2PSnarkUtil {
private I2PAppContext _context;
private Log _log;
private final I2PAppContext _context;
private final Log _log;
private boolean _shouldProxy;
private String _proxyHost;
private int _proxyPort;
private String _i2cpHost;
private int _i2cpPort;
private Map<String, String> _opts;
private final Map<String, String> _opts;
private I2PSocketManager _manager;
private boolean _configured;
private final Set<Hash> _shitlist;
private int _maxUploaders;
private int _maxUpBW;
private int _maxConnections;
private File _tmpDir;
private final File _tmpDir;
private int _startupDelay;
private boolean _shouldUseOT;
private boolean _areFilesPublic;
private String _openTrackerString;
private DHT _dht;
public static final int DEFAULT_STARTUP_DELAY = 3;
public static final String PROP_USE_OPENTRACKERS = "i2psnark.useOpentrackers";
public static final boolean DEFAULT_USE_OPENTRACKERS = true;
public static final String PROP_OPENTRACKERS = "i2psnark.opentrackers";
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
private static final String PROP_MAX_BW = "i2cp.outboundBytesPerSecond";
public static final String PROP_MAX_BW = "i2cp.outboundBytesPerSecond";
//private static final boolean ENABLE_DHT = true;
public I2PSnarkUtil(I2PAppContext ctx) {
@ -125,6 +125,8 @@ public class I2PSnarkUtil {
// can't remove any options this way...
if (opts != null)
_opts.putAll(opts);
// this updates the session options and tells the router
setMaxUpBW(_maxUpBW);
_configured = true;
}
@ -134,6 +136,7 @@ public class I2PSnarkUtil {
}
/**
* This updates the session options and tells the router
* @param limit KBps
*/
public void setMaxUpBW(int limit) {
@ -175,6 +178,12 @@ public class I2PSnarkUtil {
public int getMaxConnections() { return _maxConnections; }
public int getStartupDelay() { return _startupDelay; }
/** @since 0.8.9 */
public boolean getFilesPublic() { return _areFilesPublic; }
/** @since 0.8.9 */
public void setFilesPublic(boolean yes) { _areFilesPublic = yes; }
/**
* Connect to the router, if we aren't already
*/
@ -210,6 +219,10 @@ 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", "6");
_manager = I2PSocketManagerFactory.createManager(_i2cpHost, _i2cpPort, opts);
}
// FIXME this only instantiates krpc once, left stuck with old manager
@ -433,14 +446,13 @@ public class I2PSnarkUtil {
/** @param ot non-null */
public void setOpenTrackerString(String ot) {
_opts.put(PROP_OPENTRACKERS, ot);
_openTrackerString = ot;
}
public String getOpenTrackerString() {
String rv = (String) _opts.get(PROP_OPENTRACKERS);
if (rv == null)
if (_openTrackerString == null)
return DEFAULT_OPENTRACKERS;
return rv;
return _openTrackerString;
}
/** comma delimited list open trackers to use as backups */

View File

@ -23,8 +23,6 @@ package org.klomp.snark;
import java.io.DataOutputStream;
import java.io.IOException;
import net.i2p.util.SimpleTimer;
// Used to queue outgoing connections
// sendMessage() should be used to translate them to wire format.
class Message

View File

@ -24,7 +24,6 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@ -34,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;
@ -62,6 +60,7 @@ public class MetaInfo
private final int piece_length;
private final byte[] piece_hashes;
private final long length;
private final boolean privateTorrent;
private Map<String, BEValue> infoMap;
/**
@ -72,7 +71,7 @@ public class MetaInfo
* @param lengths null for single-file torrent
*/
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)
{
this.announce = announce;
this.name = name;
@ -83,6 +82,7 @@ public class MetaInfo
this.piece_length = piece_length;
this.piece_hashes = piece_hashes;
this.length = length;
this.privateTorrent = privateTorrent;
// TODO if we add a parameter for other keys
//if (other != null) {
@ -161,6 +161,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");
@ -213,7 +217,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();
@ -239,7 +243,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();
@ -319,6 +323,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
@ -401,7 +413,7 @@ public class MetaInfo
****/
private boolean fast_checkPiece(int piece, byte[] bs, int off, int length) {
SHA1 sha1 = new SHA1();
MessageDigest sha1 = SHA1.getInstance();
sha1.update(bs, off, length);
byte[] hash = sha1.digest();
@ -440,7 +452,7 @@ public class MetaInfo
{
return new MetaInfo(announce, name, name_utf8, files,
lengths, piece_length,
piece_hashes, length);
piece_hashes, length, privateTorrent);
}
/**
@ -476,6 +488,10 @@ public class MetaInfo
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)
@ -519,18 +535,11 @@ public class MetaInfo
}
byte[] infoBytes = BEncoder.bencode(info);
//_log.debug("info bencoded: [" + Base64.encode(infoBytes, true) + "]");
try
{
MessageDigest digest = MessageDigest.getInstance("SHA");
MessageDigest digest = SHA1.getInstance();
byte hash[] = digest.digest(infoBytes);
if (_log.shouldLog(Log.DEBUG))
_log.debug("info hash: " + I2PSnarkUtil.toHex(hash));
return hash;
}
catch(NoSuchAlgorithmException nsa)
{
throw new InternalError(nsa.toString());
}
}
/** @since 0.8.5 */

View File

@ -268,7 +268,8 @@ 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();
out.sendExtension(0, ExtensionHandler.getHandshake(metasize, pexAndMetadata));
}
if ((options & OPTION_I2P_DHT) != 0 && util.getDHT() != null) {

View File

@ -130,7 +130,8 @@ public class PeerAcceptor
}
}
private static final int LOOKAHEAD_SIZE = "19".length() +
/** 48 */
private static final int LOOKAHEAD_SIZE = 1 + // chr(19)
"BitTorrent protocol".length() +
8 + // blank, reserved
20; // infohash
@ -144,7 +145,7 @@ public class PeerAcceptor
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-1, rv, 0, rv.length);
System.arraycopy(buf, buf.length-rv.length, rv, 0, rv.length);
return rv;
}
}

View File

@ -21,10 +21,8 @@
package org.klomp.snark;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.TimerTask;
import net.i2p.I2PAppContext;
@ -32,7 +30,7 @@ import net.i2p.I2PAppContext;
* TimerTask that checks for good/bad up/downloader. Works together
* with the PeerCoordinator to select which Peers get (un)choked.
*/
class PeerCheckerTask extends TimerTask
class PeerCheckerTask implements Runnable
{
private static final long KILOPERSECOND = 1024*(PeerCoordinator.CHECK_PERIOD/1000);
@ -54,8 +52,6 @@ class PeerCheckerTask extends TimerTask
List<Peer> peerList = coordinator.peerList();
if (peerList.isEmpty() || coordinator.halted()) {
coordinator.setRateHistory(0, 0);
if (coordinator.halted())
cancel();
return;
}
@ -63,9 +59,7 @@ class PeerCheckerTask extends TimerTask
long worstdownload = Long.MAX_VALUE;
Peer worstDownloader = null;
int peers = 0;
int uploaders = 0;
int downloaders = 0;
int removedCount = 0;
long uploaded = 0;
@ -88,12 +82,8 @@ class PeerCheckerTask extends TimerTask
continue;
}
peers++;
if (!peer.isChoking())
uploaders++;
if (!peer.isChoked() && peer.isInteresting())
downloaders++;
long upload = peer.getUploaded();
uploaded += upload;

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);
}
}

View File

@ -342,6 +342,11 @@ public class PeerCoordinator implements PeerListener
private int getMaxConnections() {
if (metainfo == null)
return 6;
int pieces = metainfo.getPieces();
if (pieces <= 2)
return 4;
if (pieces <= 5)
return 6;
int size = metainfo.getPieceLength(0);
int max = _util.getMaxConnections();
if (size <= 512*1024 || completed())
@ -1181,6 +1186,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;

View File

@ -21,7 +21,6 @@
package org.klomp.snark;
import java.util.Iterator;
import java.util.TimerTask;
import net.i2p.data.DataHelper;
@ -29,7 +28,7 @@ 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.
*/
class PeerMonitorTask extends TimerTask
class PeerMonitorTask implements Runnable
{
final static long MONITOR_PERIOD = 10 * 1000; // Ten seconds.
private static final long KILOPERSECOND = 1024 * (MONITOR_PERIOD / 1000);

View File

@ -20,13 +20,10 @@
package org.klomp.snark;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.i2p.I2PAppContext;
@ -489,6 +486,13 @@ class PeerState implements DataLoader
/** @since 0.8.2 */
void extensionMessage(int id, byte[] bs)
{
if (metainfo != null && metainfo.isPrivate() &&
(id == ExtensionHandler.ID_METADATA || id == ExtensionHandler.ID_PEX)) {
// shouldn't get this since we didn't advertise it but they could send it anyway
if (_log.shouldLog(Log.WARN))
_log.warn("Private torrent, ignoring ext msg " + id);
return;
}
ExtensionHandler.handleMessage(peer, listener, id, bs);
// Peer coord will get metadata from MagnetState,
// verify, and then call gotMetaInfo()

View File

@ -20,20 +20,16 @@
package org.klomp.snark;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.Timer;
import java.util.TimerTask;
import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PServerSocket;
@ -75,10 +71,11 @@ public class Snark
//public static int debug = NOTICE;
// Whether or not to ask the user for commands while sharing
private static boolean command_interpreter = true;
//private static boolean command_interpreter = true;
private static final String newline = System.getProperty("line.separator");
/****
private static final String copyright =
"The Hunting of the Snark Project - Copyright (C) 2003 Mark J. Wielaard"
+ newline + newline
@ -94,10 +91,12 @@ public class Snark
"Press return for help. Type \"quit\" and return to stop.";
private static final String help =
"Commands: 'info', 'list', 'quit'.";
****/
// String indicating main activity
String activity = "Not started";
/****
private static class OOMListener implements I2PThread.OOMEventListener {
public void outOfMemory(OutOfMemoryError err) {
try {
@ -110,6 +109,7 @@ public class Snark
}
}
****/
/******** No, not maintaining a command-line client
@ -319,8 +319,6 @@ public class Snark
id = generateID();
debug("My peer id: " + PeerID.idencode(id), Snark.INFO);
int port;
IOException lastException = null;
/*
* Don't start a tunnel if the torrent isn't going to be started.
* If we are starting,
@ -603,10 +601,12 @@ public class Snark
_util.disconnect();
}
/****
private static Snark parseArguments(String[] args)
{
return parseArguments(args, null, null);
}
****/
// Accessors
@ -781,6 +781,26 @@ public class Snark
return -1;
}
/**
* @return exact value. or -1 if no storage yet.
* getNeeded() * pieceLength(0) isn't accurate if last piece
* is still needed.
* @since 0.8.9
*/
public long getRemainingLength() {
if (meta != null && storage != null) {
long needed = storage.needed();
long length0 = meta.getPieceLength(0);
long remaining = needed * length0;
// fixup if last piece is needed
int last = meta.getPieces() - 1;
if (last != 0 && !storage.getBitField().get(last))
remaining -= length0 - meta.getPieceLength(last);
return remaining;
}
return -1;
}
/**
* @return number of pieces still needed (magnet mode or not), or -1 if unknown
* @since 0.8.4
@ -893,7 +913,7 @@ public class Snark
}
else if (args[i].equals("--no-commands"))
{
command_interpreter = false;
//command_interpreter = false;
i++;
}
//else if (args[i].equals("--eepproxy"))
@ -1011,6 +1031,10 @@ public class Snark
//if (debug >= INFO && t != null)
// t.printStackTrace();
stopTorrent();
if (t != null)
s += ": " + t;
if (completeListener != null)
completeListener.fatal(this, s);
throw new RuntimeException(s, t);
}
@ -1038,10 +1062,12 @@ public class Snark
* @since 0.8.4
*/
public void gotMetaInfo(PeerCoordinator coordinator, MetaInfo metainfo) {
meta = metainfo;
try {
storage = new Storage(_util, meta, this);
// The following two may throw IOE...
storage = new Storage(_util, metainfo, this);
storage.check(rootDataDir);
// ... so don't set meta until here
meta = metainfo;
if (completeListener != null) {
String newName = completeListener.gotMetaInfo(this);
if (newName != null)
@ -1057,7 +1083,7 @@ public class Snark
}
}
private boolean allocating = false;
//private boolean allocating = false;
public void storageCreateFile(Storage storage, String name, long length)
{
//if (allocating)
@ -1065,7 +1091,7 @@ public class Snark
//System.out.print("Creating file '" + name
// + "' of length " + length + ": ");
allocating = true;
//allocating = true;
}
// How much storage space has been allocated
@ -1073,9 +1099,9 @@ public class Snark
public void storageAllocated(Storage storage, long length)
{
allocating = true;
//allocating = true;
//System.out.print(".");
allocated += length;
//allocated += length;
//if (allocated == meta.getTotalLength())
// System.out.println(); // We have all the disk space we need.
}
@ -1085,7 +1111,7 @@ public class Snark
private boolean prechecking = true;
public void storageChecked(Storage storage, int num, boolean checked)
{
allocating = false;
//allocating = false;
if (!allChecked && !checking)
{
// Use the MetaInfo from the storage since our own might not
@ -1149,6 +1175,11 @@ public class Snark
*/
public String gotMetaInfo(Snark snark);
/**
* @since 0.9
*/
public void fatal(Snark snark, String error);
// 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

@ -3,10 +3,13 @@ package org.klomp.snark;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@ -16,7 +19,6 @@ import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.Collection;
import java.util.concurrent.ConcurrentHashMap;
import net.i2p.I2PAppContext;
@ -34,8 +36,6 @@ import net.i2p.util.SecureFileOutputStream;
* Manage multiple snarks
*/
public class SnarkManager implements Snark.CompleteListener {
private static SnarkManager _instance = new SnarkManager();
public static SnarkManager instance() { return _instance; }
/**
* Map of (canonical) filename of the .torrent file to Snark instance.
@ -48,14 +48,15 @@ public class SnarkManager implements Snark.CompleteListener {
private final Object _addSnarkLock;
private /* FIXME final FIXME */ File _configFile;
private Properties _config;
private I2PAppContext _context;
private Log _log;
private final List _messages;
private I2PSnarkUtil _util;
private final I2PAppContext _context;
private final Log _log;
private final List<String> _messages;
private final I2PSnarkUtil _util;
private PeerCoordinatorSet _peerCoordinatorSet;
private ConnectionAcceptor _connectionAcceptor;
private Thread _monitor;
private boolean _running;
private volatile boolean _running;
private final Map<String, String> _trackerMap;
public static final String PROP_I2CP_HOST = "i2psnark.i2cpHost";
public static final String PROP_I2CP_PORT = "i2psnark.i2cpPort";
@ -71,17 +72,51 @@ public class SnarkManager implements Snark.CompleteListener {
public static final String PROP_META_MAGNET_PREFIX = "i2psnark.magnet.";
private static final String CONFIG_FILE = "i2psnark.config";
public static final String PROP_FILES_PUBLIC = "i2psnark.filesPublic";
public static final String PROP_AUTO_START = "i2snark.autoStart"; // oops
public static final String DEFAULT_AUTO_START = "false";
public static final String PROP_LINK_PREFIX = "i2psnark.linkPrefix";
public static final String DEFAULT_LINK_PREFIX = "file:///";
//public static final String PROP_LINK_PREFIX = "i2psnark.linkPrefix";
//public static final String DEFAULT_LINK_PREFIX = "file:///";
public static final String PROP_STARTUP_DELAY = "i2psnark.startupDelay";
public static final String PROP_REFRESH_DELAY = "i2psnark.refreshSeconds";
public static final String PROP_THEME = "i2psnark.theme";
public static final String DEFAULT_THEME = "ubergine";
private static final String PROP_USE_OPENTRACKERS = "i2psnark.useOpentrackers";
public static final String PROP_OPENTRACKERS = "i2psnark.opentrackers";
public static final int MIN_UP_BW = 2;
public static final int DEFAULT_MAX_UP_BW = 10;
public static final int DEFAULT_STARTUP_DELAY = 3;
public static final int DEFAULT_REFRESH_DELAY_SECS = 60;
/**
* "name", "announceURL=websiteURL" pairs
* '=' in announceURL must be escaped as &#44;
*/
private static final String DEFAULT_TRACKERS[] = {
// "Postman", "http://YRgrgTLGnbTq2aZOZDJQ~o6Uk5k6TK-OZtx0St9pb0G-5EGYURZioxqYG8AQt~LgyyI~NCj6aYWpPO-150RcEvsfgXLR~CxkkZcVpgt6pns8SRc3Bi-QSAkXpJtloapRGcQfzTtwllokbdC-aMGpeDOjYLd8b5V9Im8wdCHYy7LRFxhEtGb~RL55DA8aYOgEXcTpr6RPPywbV~Qf3q5UK55el6Kex-6VCxreUnPEe4hmTAbqZNR7Fm0hpCiHKGoToRcygafpFqDw5frLXToYiqs9d4liyVB-BcOb0ihORbo0nS3CLmAwZGvdAP8BZ7cIYE3Z9IU9D1G8JCMxWarfKX1pix~6pIA-sp1gKlL1HhYhPMxwyxvuSqx34o3BqU7vdTYwWiLpGM~zU1~j9rHL7x60pVuYaXcFQDR4-QVy26b6Pt6BlAZoFmHhPcAuWfu-SFhjyZYsqzmEmHeYdAwa~HojSbofg0TMUgESRXMw6YThK1KXWeeJVeztGTz25sL8AAAA.i2p/announce.php=http://tracker.postman.i2p/"
// , "eBook", "http://E71FRom6PZNEqTN2Lr8P-sr23b7HJVC32KoGnVQjaX6zJiXwhJy2HsXob36Qmj81TYFZdewFZa9mSJ533UZgGyQkXo2ahctg82JKYZfDe5uDxAn1E9YPjxZCWJaFJh0S~UwSs~9AZ7UcauSJIoNtpxrtbmRNVFLqnkEDdLZi26TeucfOmiFmIWnVblLniWv3tG1boE9Abd-6j3FmYVrRucYuepAILYt6katmVNOk6sXmno1Eynrp~~MBuFq0Ko6~jsc2E2CRVYXDhGHEMdt-j6JUz5D7S2RIVzDRqQyAZLKJ7OdQDmI31przzmne1vOqqqLC~1xUumZVIvF~yOeJUGNjJ1Vx0J8i2BQIusn1pQJ6UCB~ZtZZLQtEb8EPVCfpeRi2ri1M5CyOuxN0V5ekmPHrYIBNevuTCRC26NP7ZS5VDgx1~NaC3A-CzJAE6f1QXi0wMI9aywNG5KGzOPifcsih8eyGyytvgLtrZtV7ykzYpPCS-rDfITncpn5hliPUAAAA.i2p/pub/bt/announce.php=http://de-ebook-archiv.i2p/pub/bt/"
// , "Gaytorrents", "http://uxPWHbK1OIj9HxquaXuhMiIvi21iK0~ZiG9d8G0840ZXIg0r6CbiV71xlsqmdnU6wm0T2LySriM0doW2gUigo-5BNkUquHwOjLROiETnB3ZR0Ml4IGa6QBPn1aAq2d9~g1r1nVjLE~pcFnXB~cNNS7kIhX1d6nLgYVZf0C2cZopEow2iWVUggGGnAA9mHjE86zLEnTvAyhbAMTqDQJhEuLa0ZYSORqzJDMkQt90MV4YMjX1ICY6RfUSFmxEqu0yWTrkHsTtRw48l~dz9wpIgc0a0T9C~eeWvmBFTqlJPtQZwntpNeH~jF7nlYzB58olgV2HHFYpVYD87DYNzTnmNWxCJ5AfDorm6AIUCV2qaE7tZtI1h6fbmGpGlPyW~Kw5GXrRfJwNvr6ajwAVi~bPVnrBwDZezHkfW4slOO8FACPR28EQvaTu9nwhAbqESxV2hCTq6vQSGjuxHeOuzBOEvRWkLKOHWTC09t2DbJ94FSqETmZopTB1ukEmaxRWbKSIaAAAA.i2p/announce.php=http://gaytorrents.i2p/"
// , "NickyB", "http://9On6d3cZ27JjwYCtyJJbowe054d5tFnfMjv4PHsYs-EQn4Y4mk2zRixatvuAyXz2MmRfXG-NAUfhKr0KCxRNZbvHmlckYfT-WBzwwpiMAl0wDFY~Pl8cqXuhfikSG5WrqdPfDNNIBuuznS0dqaczf~OyVaoEOpvuP3qV6wKqbSSLpjOwwAaQPHjlRtNIW8-EtUZp-I0LT45HSoowp~6b7zYmpIyoATvIP~sT0g0MTrczWhbVTUZnEkZeLhOR0Duw1-IRXI2KHPbA24wLO9LdpKKUXed05RTz0QklW5ROgR6TYv7aXFufX8kC0-DaKvQ5JKG~h8lcoHvm1RCzNqVE-2aiZnO2xH08H-iCWoLNJE-Td2kT-Tsc~3QdQcnEUcL5BF-VT~QYRld2--9r0gfGl-yDrJZrlrihHGr5J7ImahelNn9PpkVp6eIyABRmJHf2iicrk3CtjeG1j9OgTSwaNmEpUpn4aN7Kx0zNLdH7z6uTgCGD9Kmh1MFYrsoNlTp4AAAA.i2p/bittorrent/announce.php=http://nickyb.i2p/bittorrent/"
// , "Orion", "http://gKik1lMlRmuroXVGTZ~7v4Vez3L3ZSpddrGZBrxVriosCQf7iHu6CIk8t15BKsj~P0JJpxrofeuxtm7SCUAJEr0AIYSYw8XOmp35UfcRPQWyb1LsxUkMT4WqxAT3s1ClIICWlBu5An~q-Mm0VFlrYLIPBWlUFnfPR7jZ9uP5ZMSzTKSMYUWao3ejiykr~mtEmyls6g-ZbgKZawa9II4zjOy-hdxHgP-eXMDseFsrym4Gpxvy~3Fv9TuiSqhpgm~UeTo5YBfxn6~TahKtE~~sdCiSydqmKBhxAQ7uT9lda7xt96SS09OYMsIWxLeQUWhns-C~FjJPp1D~IuTrUpAFcVEGVL-BRMmdWbfOJEcWPZ~CBCQSO~VkuN1ebvIOr9JBerFMZSxZtFl8JwcrjCIBxeKPBmfh~xYh16BJm1BBBmN1fp2DKmZ2jBNkAmnUbjQOqWvUcehrykWk5lZbE7bjJMDFH48v3SXwRuDBiHZmSbsTY6zhGY~GkMQHNGxPMMSIAAAA.i2p/bt/announce.php=http://orion.i2p/bt/"
// , "anonymity", "http://8EoJZIKrWgGuDrxA3nRJs1jsPfiGwmFWL91hBrf0HA7oKhEvAna4Ocx47VLUR9retVEYBAyWFK-eZTPcvhnz9XffBEiJQQ~kFSCqb1fV6IfPiV3HySqi9U5Caf6~hC46fRd~vYnxmaBLICT3N160cxBETqH3v2rdxdJpvYt8q4nMk9LUeVXq7zqCTFLLG5ig1uKgNzBGe58iNcsvTEYlnbYcE930ABmrzj8G1qQSgSwJ6wx3tUQNl1z~4wSOUMan~raZQD60lRK70GISjoX0-D0Po9WmPveN3ES3g72TIET3zc3WPdK2~lgmKGIs8GgNLES1cXTolvbPhdZK1gxddRMbJl6Y6IPFyQ9o4-6Rt3Lp-RMRWZ2TG7j2OMcNSiOmATUhKEFBDfv-~SODDyopGBmfeLw16F4NnYednvn4qP10dyMHcUASU6Zag4mfc2-WivrOqeWhD16fVAh8MoDpIIT~0r9XmwdaVFyLcjbXObabJczxCAW3fodQUnvuSkwzAAAA.i2p/anonymityTracker/announce.php=http://anonymityweb.i2p/anonymityTracker/"
// , "The freak's tracker", "http://mHKva9x24E5Ygfey2llR1KyQHv5f8hhMpDMwJDg1U-hABpJ2NrQJd6azirdfaR0OKt4jDlmP2o4Qx0H598~AteyD~RJU~xcWYdcOE0dmJ2e9Y8-HY51ie0B1yD9FtIV72ZI-V3TzFDcs6nkdX9b81DwrAwwFzx0EfNvK1GLVWl59Ow85muoRTBA1q8SsZImxdyZ-TApTVlMYIQbdI4iQRwU9OmmtefrCe~ZOf4UBS9-KvNIqUL0XeBSqm0OU1jq-D10Ykg6KfqvuPnBYT1BYHFDQJXW5DdPKwcaQE4MtAdSGmj1epDoaEBUa9btQlFsM2l9Cyn1hzxqNWXELmx8dRlomQLlV4b586dRzW~fLlOPIGC13ntPXogvYvHVyEyptXkv890jC7DZNHyxZd5cyrKC36r9huKvhQAmNABT2Y~pOGwVrb~RpPwT0tBuPZ3lHYhBFYmD8y~AOhhNHKMLzea1rfwTvovBMByDdFps54gMN1mX4MbCGT4w70vIopS9yAAAA.i2p/bytemonsoon/announce.php"
// , "mastertracker", "http://VzXD~stRKbL3MOmeTn1iaCQ0CFyTmuFHiKYyo0Rd~dFPZFCYH-22rT8JD7i-C2xzYFa4jT5U2aqHzHI-Jre4HL3Ri5hFtZrLk2ax3ji7Qfb6qPnuYkuiF2E2UDmKUOppI8d9Ye7tjdhQVCy0izn55tBaB-U7UWdcvSK2i85sauyw3G0Gfads1Rvy5-CAe2paqyYATcDmGjpUNLoxbfv9KH1KmwRTNH6k1v4PyWYYnhbT39WfKMbBjSxVQRdi19cyJrULSWhjxaQfJHeWx5Z8Ev4bSPByBeQBFl2~4vqy0S5RypINsRSa3MZdbiAAyn5tr5slWR6QdoqY3qBQgBJFZppy-3iWkFqqKgSxCPundF8gdDLC5ddizl~KYcYKl42y9SGFHIukH-TZs8~em0~iahzsqWVRks3zRG~tlBcX2U3M2~OJs~C33-NKhyfZT7-XFBREvb8Szmd~p66jDxrwOnKaku-G6DyoQipJqIz4VHmY9-y5T8RrUcJcM-5lVoMpAAAA.i2p/announce.php=http://tracker.mastertracker.i2p/"
// , "Galen", "http://5jpwQMI5FT303YwKa5Rd38PYSX04pbIKgTaKQsWbqoWjIfoancFdWCShXHLI5G5ofOb0Xu11vl2VEMyPsg1jUFYSVnu4-VfMe3y4TKTR6DTpetWrnmEK6m2UXh91J5DZJAKlgmO7UdsFlBkQfR2rY853-DfbJtQIFl91tbsmjcA5CGQi4VxMFyIkBzv-pCsuLQiZqOwWasTlnzey8GcDAPG1LDcvfflGV~6F5no9mnuisZPteZKlrv~~TDoXTj74QjByWc4EOYlwqK8sbU9aOvz~s31XzErbPTfwiawiaZ0RUI-IDrKgyvmj0neuFTWgjRGVTH8bz7cBZIc3viy6ioD-eMQOrXaQL0TCWZUelRwHRvgdPiQrxdYQs7ixkajeHzxi-Pq0EMm5Vbh3j3Q9kfUFW3JjFDA-MLB4g6XnjCbM5J1rC0oOBDCIEfhQkszru5cyLjHiZ5yeA0VThgu~c7xKHybv~OMXION7V8pBKOgET7ZgAkw1xgYe3Kkyq5syAAAA.i2p/tr/announce.php=http://galen.i2p/tr/"
"Postman", "http://tracker2.postman.i2p/announce.php=http://tracker2.postman.i2p/"
,"Welterde", "http://tracker.welterde.i2p/a=http://tracker.welterde.i2p/stats?mode=top5"
,"Diftracker", "http://n--XWjHjUPjnMNrSwXA2OYXpMIUL~u4FNXnrt2HtjK3y6j~4SOClyyeKzd0zRPlixxkCe2wfBIYye3bZsaqAD8bd0QMmowxbq91WpjsPfKMiphJbePKXtYAVARiy0cqyvh1d2LyDE-6wkvgaw45hknmS0U-Dg3YTJZbAQRU2SKXgIlAbWCv4R0kDFBLEVpReDiJef3rzAWHiW8yjmJuJilkYjMwlfRjw8xx1nl2s~yhlljk1pl13jGYb0nfawQnuOWeP-ASQWvAAyVgKvZRJE2O43S7iveu9piuv7plXWbt36ef7ndu2GNoNyPOBdpo9KUZ-NOXm4Kgh659YtEibL15dEPAOdxprY0sYUurVw8OIWqrpX7yn08nbi6qHVGqQwTpxH35vkL8qrCbm-ym7oQJQnNmSDrNTyWYRFSq5s5~7DAdFDzqRPW-pX~g0zEivWj5tzkhvG9rVFgFo0bpQX3X0PUAV9Xbyf8u~v8Zbr9K1pCPqBq9XEr4TqaLHw~bfAAAA.i2p/announce.php=http://diftracker.i2p/"
// , "CRSTRACK", "http://b4G9sCdtfvccMAXh~SaZrPqVQNyGQbhbYMbw6supq2XGzbjU4NcOmjFI0vxQ8w1L05twmkOvg5QERcX6Mi8NQrWnR0stLExu2LucUXg1aYjnggxIR8TIOGygZVIMV3STKH4UQXD--wz0BUrqaLxPhrm2Eh9Hwc8TdB6Na4ShQUq5Xm8D4elzNUVdpM~RtChEyJWuQvoGAHY3ppX-EJJLkiSr1t77neS4Lc-KofMVmgI9a2tSSpNAagBiNI6Ak9L1T0F9uxeDfEG9bBSQPNMOSUbAoEcNxtt7xOW~cNOAyMyGydwPMnrQ5kIYPY8Pd3XudEko970vE0D6gO19yoBMJpKx6Dh50DGgybLQ9CpRaynh2zPULTHxm8rneOGRcQo8D3mE7FQ92m54~SvfjXjD2TwAVGI~ae~n9HDxt8uxOecAAvjjJ3TD4XM63Q9TmB38RmGNzNLDBQMEmJFpqQU8YeuhnS54IVdUoVQFqui5SfDeLXlSkh4vYoMU66pvBfWbAAAA.i2p/tracker/announce.php=http://crstrack.i2p/tracker/"
// ,"Exotrack", "http://blbgywsjubw3d2zih2giokakhe3o2cko7jtte4risb3hohbcoyva.b32.i2p/announce.php=http://exotrack.i2p/"
};
/** comma delimited list of name=announceURL=baseURL for the trackers to be displayed */
public static final String PROP_TRACKERS = "i2psnark.trackers";
private static final SnarkManager _instance = new SnarkManager();
public static SnarkManager instance() { return _instance; }
private SnarkManager() {
_snarks = new ConcurrentHashMap();
_magnets = new ConcurrentHashSet();
@ -93,6 +128,7 @@ public class SnarkManager implements Snark.CompleteListener {
_configFile = new File(CONFIG_FILE);
if (!_configFile.isAbsolute())
_configFile = new File(_context.getConfigDir(), CONFIG_FILE);
_trackerMap = Collections.synchronizedMap(new TreeMap(new IgnoreCaseComparator()));
loadConfig(null);
}
@ -119,6 +155,7 @@ public class SnarkManager implements Snark.CompleteListener {
public I2PSnarkUtil util() { return _util; }
private static final int MAX_MESSAGES = 5;
public void addMessage(String message) {
synchronized (_messages) {
_messages.add(message);
@ -130,26 +167,70 @@ public class SnarkManager implements Snark.CompleteListener {
}
/** newest last */
public List getMessages() {
public List<String> getMessages() {
synchronized (_messages) {
return new ArrayList(_messages);
}
}
public boolean shouldAutoStart() {
return Boolean.valueOf(_config.getProperty(PROP_AUTO_START, DEFAULT_AUTO_START+"")).booleanValue();
/** @since 0.9 */
public void clearMessages() {
synchronized (_messages) {
_messages.clear();
}
}
/**
* @return default false
* @since 0.8.9
*/
public boolean areFilesPublic() {
return Boolean.valueOf(_config.getProperty(PROP_FILES_PUBLIC)).booleanValue();
}
public boolean shouldAutoStart() {
return Boolean.valueOf(_config.getProperty(PROP_AUTO_START, DEFAULT_AUTO_START)).booleanValue();
}
/****
public String linkPrefix() {
return _config.getProperty(PROP_LINK_PREFIX, DEFAULT_LINK_PREFIX + getDataDir().getAbsolutePath() + File.separatorChar);
}
private int getStartupDelayMinutes() {
return Integer.valueOf(_config.getProperty(PROP_STARTUP_DELAY)).intValue();
****/
/**
* @return -1 for never
* @since 0.8.9
*/
public int getRefreshDelaySeconds() {
try {
return Integer.parseInt(_config.getProperty(PROP_REFRESH_DELAY));
} catch (NumberFormatException nfe) {
return DEFAULT_REFRESH_DELAY_SECS;
}
}
private int getStartupDelayMinutes() {
try {
return Integer.parseInt(_config.getProperty(PROP_STARTUP_DELAY));
} catch (NumberFormatException nfe) {
return DEFAULT_STARTUP_DELAY;
}
}
public File getDataDir() {
String dir = _config.getProperty(PROP_DIR, "i2psnark");
File f = new SecureDirectory(dir);
if (!f.isAbsolute())
f = new SecureDirectory(_context.getAppDir(), dir);
File f;
if (areFilesPublic())
f = new File(dir);
else
f = new SecureDirectory(dir);
if (!f.isAbsolute()) {
if (areFilesPublic())
f = new File(_context.getAppDir(), dir);
else
f = new SecureDirectory(_context.getAppDir(), dir);
}
return f;
}
@ -187,8 +268,10 @@ public class SnarkManager implements Snark.CompleteListener {
_config.setProperty(PROP_DIR, "i2psnark");
if (!_config.containsKey(PROP_AUTO_START))
_config.setProperty(PROP_AUTO_START, DEFAULT_AUTO_START);
if (!_config.containsKey(PROP_REFRESH_DELAY))
_config.setProperty(PROP_REFRESH_DELAY, Integer.toString(DEFAULT_REFRESH_DELAY_SECS));
if (!_config.containsKey(PROP_STARTUP_DELAY))
_config.setProperty(PROP_STARTUP_DELAY, "" + DEFAULT_STARTUP_DELAY);
_config.setProperty(PROP_STARTUP_DELAY, Integer.toString(DEFAULT_STARTUP_DELAY));
if (!_config.containsKey(PROP_THEME))
_config.setProperty(PROP_THEME, DEFAULT_THEME);
updateConfig();
@ -258,13 +341,15 @@ public class SnarkManager implements Snark.CompleteListener {
_util.setMaxUploaders(getInt(PROP_UPLOADERS_TOTAL, Snark.MAX_TOTAL_UPLOADERS));
_util.setMaxUpBW(getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW));
_util.setStartupDelay(getInt(PROP_STARTUP_DELAY, DEFAULT_STARTUP_DELAY));
String ot = _config.getProperty(I2PSnarkUtil.PROP_OPENTRACKERS);
_util.setFilesPublic(areFilesPublic());
String ot = _config.getProperty(PROP_OPENTRACKERS);
if (ot != null)
_util.setOpenTrackerString(ot);
String useOT = _config.getProperty(I2PSnarkUtil.PROP_USE_OPENTRACKERS);
String useOT = _config.getProperty(PROP_USE_OPENTRACKERS);
boolean bOT = useOT == null || Boolean.valueOf(useOT).booleanValue();
_util.setUseOpenTrackers(bOT);
getDataDir().mkdirs();
initTrackerMap();
}
private int getInt(String prop, int defaultVal) {
@ -278,7 +363,8 @@ public class SnarkManager implements Snark.CompleteListener {
return defaultVal;
}
public void updateConfig(String dataDir, boolean autoStart, String startDelay, String seedPct, String eepHost,
public void updateConfig(String dataDir, boolean filesPublic, boolean autoStart, String refreshDelay,
String startDelay, String seedPct, String eepHost,
String eepPort, String i2cpHost, String i2cpPort, String i2cpOpts,
String upLimit, String upBW, boolean useOpenTrackers, String openTrackers, String theme) {
boolean changed = false;
@ -333,19 +419,34 @@ public class SnarkManager implements Snark.CompleteListener {
changed = true;
_config.setProperty(PROP_STARTUP_DELAY, "" + minutes);
addMessage(_("Startup delay changed to {0}", DataHelper.formatDuration2(minutes * 60 * 1000)));
}
}
}
// FIXME do this even if == null
if (i2cpHost != null) {
if (refreshDelay != null) {
try {
int secs = Integer.parseInt(refreshDelay);
if (secs != getRefreshDelaySeconds()) {
changed = true;
_config.setProperty(PROP_REFRESH_DELAY, refreshDelay);
if (secs >= 0)
addMessage(_("Refresh time changed to {0}", DataHelper.formatDuration2(secs * 1000)));
else
addMessage(_("Refresh disabled"));
}
} catch (NumberFormatException nfe) {}
}
// Start of I2CP stuff.
// i2cpHost will generally be null since it is hidden from the form if in router context.
int oldI2CPPort = _util.getI2CPPort();
String oldI2CPHost = _util.getI2CPHost();
int port = oldI2CPPort;
if (i2cpPort != null) {
try { port = Integer.parseInt(i2cpPort); } catch (NumberFormatException nfe) {}
}
String host = oldI2CPHost;
Map opts = new HashMap();
Map<String, String> opts = new HashMap();
if (i2cpOpts == null) i2cpOpts = "";
StringTokenizer tok = new StringTokenizer(i2cpOpts, " \t\n");
while (tok.hasMoreTokens()) {
@ -354,7 +455,7 @@ public class SnarkManager implements Snark.CompleteListener {
if (split > 0)
opts.put(pair.substring(0, split), pair.substring(split+1));
}
Map oldOpts = new HashMap();
Map<String, String> oldOpts = new HashMap();
String oldI2CPOpts = _config.getProperty(PROP_I2CP_OPTS);
if (oldI2CPOpts == null) oldI2CPOpts = "";
tok = new StringTokenizer(oldI2CPOpts, " \t\n");
@ -365,37 +466,39 @@ public class SnarkManager implements Snark.CompleteListener {
oldOpts.put(pair.substring(0, split), pair.substring(split+1));
}
if ( (i2cpHost.trim().length() > 0) && (port > 0) &&
((!host.equals(i2cpHost) ||
(port != _util.getI2CPPort()) ||
(!oldOpts.equals(opts)))) ) {
boolean reconnect = i2cpHost != null && i2cpHost.trim().length() > 0 && port > 0 &&
(port != _util.getI2CPPort() || !oldI2CPHost.equals(i2cpHost));
if (reconnect || !oldOpts.equals(opts)) {
boolean snarksActive = false;
Set names = listTorrentFiles();
for (Iterator iter = names.iterator(); iter.hasNext(); ) {
Snark snark = getTorrent((String)iter.next());
if ( (snark != null) && (!snark.isStopped()) ) {
snarksActive = true;
break;
if (reconnect) {
for (Snark snark : _snarks.values()) {
if (!snark.isStopped()) {
snarksActive = true;
break;
}
}
}
if (_log.shouldLog(Log.DEBUG))
_log.debug("i2cp host [" + i2cpHost + "] i2cp port " + port + " opts [" + opts
+ "] oldOpts [" + oldOpts + "]");
if (snarksActive) {
Properties p = new Properties();
p.putAll(opts);
_util.setI2CPConfig(i2cpHost, port, p);
_util.setMaxUpBW(getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW));
addMessage(_("I2CP and tunnel changes will take effect after stopping all torrents"));
if (_log.shouldLog(Log.DEBUG))
_log.debug("i2cp host [" + i2cpHost + "] i2cp port " + port + " opts [" + opts
+ "] oldOpts [" + oldOpts + "]");
} else if (!reconnect) {
// The usual case, the other two are if not in router context
_config.setProperty(PROP_I2CP_OPTS, i2cpOpts.trim());
addMessage(_("I2CP options changed to {0}", i2cpOpts));
_util.setI2CPConfig(oldI2CPHost, oldI2CPPort, opts);
} else {
if (_util.connected()) {
_util.disconnect();
addMessage(_("Disconnecting old I2CP destination"));
}
Properties p = new Properties();
p.putAll(opts);
addMessage(_("I2CP settings changed to {0}", i2cpHost + ":" + port + " (" + i2cpOpts.trim() + ")"));
_util.setI2CPConfig(i2cpHost, port, p);
addMessage(_("I2CP settings changed to {0}", i2cpHost + ':' + port + ' ' + i2cpOpts));
_util.setI2CPConfig(i2cpHost, port, opts);
_util.setMaxUpBW(getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW));
boolean ok = _util.connect();
if (!ok) {
@ -409,22 +512,29 @@ public class SnarkManager implements Snark.CompleteListener {
_config.setProperty(PROP_I2CP_HOST, i2cpHost.trim());
_config.setProperty(PROP_I2CP_PORT, "" + port);
_config.setProperty(PROP_I2CP_OPTS, i2cpOpts.trim());
changed = true;
// no PeerAcceptors/I2PServerSockets to deal with, since all snarks are inactive
for (Iterator iter = names.iterator(); iter.hasNext(); ) {
String name = (String)iter.next();
Snark snark = getTorrent(name);
if (snark != null && snark.restartAcceptor()) {
for (Snark snark : _snarks.values()) {
if (snark.restartAcceptor()) {
addMessage(_("I2CP listener restarted for \"{0}\"", snark.getBaseName()));
}
}
}
}
changed = true;
}
} // reconnect || changed options
if (areFilesPublic() != filesPublic) {
_config.setProperty(PROP_FILES_PUBLIC, Boolean.toString(filesPublic));
_util.setFilesPublic(filesPublic);
if (filesPublic)
addMessage(_("New files will be publicly readable"));
else
addMessage(_("New files will not be publicly readable"));
changed = true;
}
if (shouldAutoStart() != autoStart) {
_config.setProperty(PROP_AUTO_START, autoStart + "");
_config.setProperty(PROP_AUTO_START, Boolean.toString(autoStart));
if (autoStart)
addMessage(_("Enabled autostart"));
else
@ -432,7 +542,7 @@ public class SnarkManager implements Snark.CompleteListener {
changed = true;
}
if (_util.shouldUseOpenTrackers() != useOpenTrackers) {
_config.setProperty(I2PSnarkUtil.PROP_USE_OPENTRACKERS, useOpenTrackers + "");
_config.setProperty(PROP_USE_OPENTRACKERS, useOpenTrackers + "");
if (useOpenTrackers)
addMessage(_("Enabled open trackers - torrent restart required to take effect."));
else
@ -442,7 +552,7 @@ public class SnarkManager implements Snark.CompleteListener {
}
if (openTrackers != null) {
if (openTrackers.trim().length() > 0 && !openTrackers.trim().equals(_util.getOpenTrackerString())) {
_config.setProperty(I2PSnarkUtil.PROP_OPENTRACKERS, openTrackers.trim());
_config.setProperty(PROP_OPENTRACKERS, openTrackers.trim());
_util.setOpenTrackerString(openTrackers);
addMessage(_("Open Tracker list changed - torrent restart required to take effect."));
changed = true;
@ -489,7 +599,7 @@ public class SnarkManager implements Snark.CompleteListener {
* Grab the torrent given the (canonical) filename of the .torrent file
* @return Snark or null
*/
public Snark getTorrent(String filename) { synchronized (_snarks) { return (Snark)_snarks.get(filename); } }
public Snark getTorrent(String filename) { synchronized (_snarks) { return _snarks.get(filename); } }
/**
* Grab the torrent given the base name of the storage
@ -551,7 +661,7 @@ public class SnarkManager implements Snark.CompleteListener {
File dataDir = getDataDir();
Snark torrent = null;
synchronized (_snarks) {
torrent = (Snark)_snarks.get(filename);
torrent = _snarks.get(filename);
}
// don't hold the _snarks lock while verifying the torrent
if (torrent == null) {
@ -591,7 +701,9 @@ public class SnarkManager implements Snark.CompleteListener {
}
if (!TrackerClient.isValidAnnounce(info.getAnnounce())) {
if (_util.shouldUseOpenTrackers() && _util.getOpenTrackers() != null) {
if (info.isPrivate()) {
addMessage(_("ERROR - No I2P trackers in private torrent \"{0}\"", info.getName()));
} else if (_util.shouldUseOpenTrackers() && _util.getOpenTrackers() != null) {
//addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and DHT only.", info.getName()));
addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers only.", info.getName()));
//} else if (_util.getDHT() != null) {
@ -723,7 +835,7 @@ public class SnarkManager implements Snark.CompleteListener {
// so addTorrent won't recheck
saveTorrentStatus(metainfo, bitfield, null); // no file priorities
try {
locked_writeMetaInfo(metainfo, filename);
locked_writeMetaInfo(metainfo, filename, areFilesPublic());
// hold the lock for a long time
addTorrent(filename, dontAutoStart);
} catch (IOException ioe) {
@ -754,7 +866,8 @@ public class SnarkManager implements Snark.CompleteListener {
_log.error("Failed to write torrent file to " + filename);
return;
}
SecureFileOutputStream.setPerms(new File(filename));
if (!areFilesPublic())
SecureFileOutputStream.setPerms(new File(filename));
// hold the lock for a long time
addTorrent(filename);
}
@ -769,13 +882,16 @@ public class SnarkManager implements Snark.CompleteListener {
* Must be a filesystem-safe name.
* @since 0.8.4
*/
private static void locked_writeMetaInfo(MetaInfo metainfo, String filename) throws IOException {
private static void locked_writeMetaInfo(MetaInfo metainfo, String filename, boolean areFilesPublic) throws IOException {
File file = new File(filename);
if (file.exists())
throw new IOException("Cannot overwrite an existing .torrent file: " + file.getPath());
OutputStream out = null;
try {
out = new SecureFileOutputStream(filename);
if (areFilesPublic)
out = new FileOutputStream(filename);
else
out = new SecureFileOutputStream(filename);
out.write(metainfo.getTorrentData());
} catch (IOException ioe) {
// remove any partial
@ -783,7 +899,7 @@ public class SnarkManager implements Snark.CompleteListener {
throw ioe;
} finally {
try {
if (out == null)
if (out != null)
out.close();
} catch (IOException ioe) {}
}
@ -983,6 +1099,8 @@ public class SnarkManager implements Snark.CompleteListener {
} else if (info.getPieceLength(0) > Storage.MAX_PIECE_SIZE) {
return _("Pieces are too large in \"{0}\" ({1}B), deleting it.", info.getName(), DataHelper.formatSize2(info.getPieceLength(0))) + ' ' +
_("Limit is {0}B", DataHelper.formatSize2(Storage.MAX_PIECE_SIZE));
} else if (info.getTotalLength() <= 0) {
return _("Torrent \"{0}\" has no data, deleting it!", info.getName());
} else if (info.getTotalLength() > Storage.MAX_TOTAL_SIZE) {
System.out.println("torrent info: " + info.toString());
List lengths = info.getLengths();
@ -1013,9 +1131,9 @@ public class SnarkManager implements Snark.CompleteListener {
Snark torrent = null;
synchronized (_snarks) {
if (shouldRemove)
torrent = (Snark)_snarks.remove(filename);
torrent = _snarks.remove(filename);
else
torrent = (Snark)_snarks.get(filename);
torrent = _snarks.get(filename);
remaining = _snarks.size();
}
if (torrent != null) {
@ -1087,7 +1205,7 @@ public class SnarkManager implements Snark.CompleteListener {
// although the user will see the default until then
getBWLimit();
boolean doMagnets = true;
while (true) {
while (_running) {
File dir = getDataDir();
if (_log.shouldLog(Log.DEBUG))
_log.debug("Directory Monitor loop over " + dir.getAbsolutePath());
@ -1100,8 +1218,12 @@ public class SnarkManager implements Snark.CompleteListener {
_log.error("Error in the DirectoryMonitor", e);
}
if (doMagnets) {
addMagnets();
doMagnets = false;
try {
addMagnets();
doMagnets = false;
} catch (Exception e) {
_log.error("Error in the DirectoryMonitor", e);
}
}
try { Thread.sleep(60*1000); } catch (InterruptedException ie) {}
}
@ -1157,14 +1279,17 @@ public class SnarkManager implements Snark.CompleteListener {
return null;
}
saveTorrentStatus(meta, storage.getBitField(), null); // no file priorities
String name = (new File(getDataDir(), storage.getBaseName() + ".torrent")).getAbsolutePath();
// temp for addMessage() in case canonical throws
String name = storage.getBaseName();
try {
// _snarks must use canonical
name = (new File(getDataDir(), storage.getBaseName() + ".torrent")).getCanonicalPath();
// put the announce URL in the file
String announce = snark.getTrackerURL();
if (announce != null)
meta = meta.reannounce(announce);
synchronized (_snarks) {
locked_writeMetaInfo(meta, name);
locked_writeMetaInfo(meta, name, areFilesPublic());
// put it in the list under the new name
_snarks.remove(snark.getName());
_snarks.put(name, snark);
@ -1182,6 +1307,14 @@ public class SnarkManager implements Snark.CompleteListener {
return null;
}
/**
* A Snark.CompleteListener method.
* @since 0.9
*/
public void fatal(Snark snark, String error) {
addMessage(_("Error on torrent {0}", snark.getName()) + ": " + error);
}
// End Snark.CompleteListeners
/**
@ -1220,6 +1353,8 @@ public class SnarkManager implements Snark.CompleteListener {
}
Set<String> existingNames = listTorrentFiles();
if (_log.shouldLog(Log.DEBUG))
_log.debug("DirMon found: " + DataHelper.toString(foundNames) + " existing: " + DataHelper.toString(existingNames));
// lets find new ones first...
for (int i = 0; i < foundNames.size(); i++) {
if (existingNames.contains(foundNames.get(i))) {
@ -1272,56 +1407,59 @@ public class SnarkManager implements Snark.CompleteListener {
}
/**
* "name", "announceURL=websiteURL" pairs
* Sorted map of name to announceURL=baseURL
* Modifiable, not a copy
*/
private static final String DEFAULT_TRACKERS[] = {
// "Postman", "http://YRgrgTLGnbTq2aZOZDJQ~o6Uk5k6TK-OZtx0St9pb0G-5EGYURZioxqYG8AQt~LgyyI~NCj6aYWpPO-150RcEvsfgXLR~CxkkZcVpgt6pns8SRc3Bi-QSAkXpJtloapRGcQfzTtwllokbdC-aMGpeDOjYLd8b5V9Im8wdCHYy7LRFxhEtGb~RL55DA8aYOgEXcTpr6RPPywbV~Qf3q5UK55el6Kex-6VCxreUnPEe4hmTAbqZNR7Fm0hpCiHKGoToRcygafpFqDw5frLXToYiqs9d4liyVB-BcOb0ihORbo0nS3CLmAwZGvdAP8BZ7cIYE3Z9IU9D1G8JCMxWarfKX1pix~6pIA-sp1gKlL1HhYhPMxwyxvuSqx34o3BqU7vdTYwWiLpGM~zU1~j9rHL7x60pVuYaXcFQDR4-QVy26b6Pt6BlAZoFmHhPcAuWfu-SFhjyZYsqzmEmHeYdAwa~HojSbofg0TMUgESRXMw6YThK1KXWeeJVeztGTz25sL8AAAA.i2p/announce.php=http://tracker.postman.i2p/"
// , "eBook", "http://E71FRom6PZNEqTN2Lr8P-sr23b7HJVC32KoGnVQjaX6zJiXwhJy2HsXob36Qmj81TYFZdewFZa9mSJ533UZgGyQkXo2ahctg82JKYZfDe5uDxAn1E9YPjxZCWJaFJh0S~UwSs~9AZ7UcauSJIoNtpxrtbmRNVFLqnkEDdLZi26TeucfOmiFmIWnVblLniWv3tG1boE9Abd-6j3FmYVrRucYuepAILYt6katmVNOk6sXmno1Eynrp~~MBuFq0Ko6~jsc2E2CRVYXDhGHEMdt-j6JUz5D7S2RIVzDRqQyAZLKJ7OdQDmI31przzmne1vOqqqLC~1xUumZVIvF~yOeJUGNjJ1Vx0J8i2BQIusn1pQJ6UCB~ZtZZLQtEb8EPVCfpeRi2ri1M5CyOuxN0V5ekmPHrYIBNevuTCRC26NP7ZS5VDgx1~NaC3A-CzJAE6f1QXi0wMI9aywNG5KGzOPifcsih8eyGyytvgLtrZtV7ykzYpPCS-rDfITncpn5hliPUAAAA.i2p/pub/bt/announce.php=http://de-ebook-archiv.i2p/pub/bt/"
// , "Gaytorrents", "http://uxPWHbK1OIj9HxquaXuhMiIvi21iK0~ZiG9d8G0840ZXIg0r6CbiV71xlsqmdnU6wm0T2LySriM0doW2gUigo-5BNkUquHwOjLROiETnB3ZR0Ml4IGa6QBPn1aAq2d9~g1r1nVjLE~pcFnXB~cNNS7kIhX1d6nLgYVZf0C2cZopEow2iWVUggGGnAA9mHjE86zLEnTvAyhbAMTqDQJhEuLa0ZYSORqzJDMkQt90MV4YMjX1ICY6RfUSFmxEqu0yWTrkHsTtRw48l~dz9wpIgc0a0T9C~eeWvmBFTqlJPtQZwntpNeH~jF7nlYzB58olgV2HHFYpVYD87DYNzTnmNWxCJ5AfDorm6AIUCV2qaE7tZtI1h6fbmGpGlPyW~Kw5GXrRfJwNvr6ajwAVi~bPVnrBwDZezHkfW4slOO8FACPR28EQvaTu9nwhAbqESxV2hCTq6vQSGjuxHeOuzBOEvRWkLKOHWTC09t2DbJ94FSqETmZopTB1ukEmaxRWbKSIaAAAA.i2p/announce.php=http://gaytorrents.i2p/"
// , "NickyB", "http://9On6d3cZ27JjwYCtyJJbowe054d5tFnfMjv4PHsYs-EQn4Y4mk2zRixatvuAyXz2MmRfXG-NAUfhKr0KCxRNZbvHmlckYfT-WBzwwpiMAl0wDFY~Pl8cqXuhfikSG5WrqdPfDNNIBuuznS0dqaczf~OyVaoEOpvuP3qV6wKqbSSLpjOwwAaQPHjlRtNIW8-EtUZp-I0LT45HSoowp~6b7zYmpIyoATvIP~sT0g0MTrczWhbVTUZnEkZeLhOR0Duw1-IRXI2KHPbA24wLO9LdpKKUXed05RTz0QklW5ROgR6TYv7aXFufX8kC0-DaKvQ5JKG~h8lcoHvm1RCzNqVE-2aiZnO2xH08H-iCWoLNJE-Td2kT-Tsc~3QdQcnEUcL5BF-VT~QYRld2--9r0gfGl-yDrJZrlrihHGr5J7ImahelNn9PpkVp6eIyABRmJHf2iicrk3CtjeG1j9OgTSwaNmEpUpn4aN7Kx0zNLdH7z6uTgCGD9Kmh1MFYrsoNlTp4AAAA.i2p/bittorrent/announce.php=http://nickyb.i2p/bittorrent/"
// , "Orion", "http://gKik1lMlRmuroXVGTZ~7v4Vez3L3ZSpddrGZBrxVriosCQf7iHu6CIk8t15BKsj~P0JJpxrofeuxtm7SCUAJEr0AIYSYw8XOmp35UfcRPQWyb1LsxUkMT4WqxAT3s1ClIICWlBu5An~q-Mm0VFlrYLIPBWlUFnfPR7jZ9uP5ZMSzTKSMYUWao3ejiykr~mtEmyls6g-ZbgKZawa9II4zjOy-hdxHgP-eXMDseFsrym4Gpxvy~3Fv9TuiSqhpgm~UeTo5YBfxn6~TahKtE~~sdCiSydqmKBhxAQ7uT9lda7xt96SS09OYMsIWxLeQUWhns-C~FjJPp1D~IuTrUpAFcVEGVL-BRMmdWbfOJEcWPZ~CBCQSO~VkuN1ebvIOr9JBerFMZSxZtFl8JwcrjCIBxeKPBmfh~xYh16BJm1BBBmN1fp2DKmZ2jBNkAmnUbjQOqWvUcehrykWk5lZbE7bjJMDFH48v3SXwRuDBiHZmSbsTY6zhGY~GkMQHNGxPMMSIAAAA.i2p/bt/announce.php=http://orion.i2p/bt/"
// , "anonymity", "http://8EoJZIKrWgGuDrxA3nRJs1jsPfiGwmFWL91hBrf0HA7oKhEvAna4Ocx47VLUR9retVEYBAyWFK-eZTPcvhnz9XffBEiJQQ~kFSCqb1fV6IfPiV3HySqi9U5Caf6~hC46fRd~vYnxmaBLICT3N160cxBETqH3v2rdxdJpvYt8q4nMk9LUeVXq7zqCTFLLG5ig1uKgNzBGe58iNcsvTEYlnbYcE930ABmrzj8G1qQSgSwJ6wx3tUQNl1z~4wSOUMan~raZQD60lRK70GISjoX0-D0Po9WmPveN3ES3g72TIET3zc3WPdK2~lgmKGIs8GgNLES1cXTolvbPhdZK1gxddRMbJl6Y6IPFyQ9o4-6Rt3Lp-RMRWZ2TG7j2OMcNSiOmATUhKEFBDfv-~SODDyopGBmfeLw16F4NnYednvn4qP10dyMHcUASU6Zag4mfc2-WivrOqeWhD16fVAh8MoDpIIT~0r9XmwdaVFyLcjbXObabJczxCAW3fodQUnvuSkwzAAAA.i2p/anonymityTracker/announce.php=http://anonymityweb.i2p/anonymityTracker/"
// , "The freak's tracker", "http://mHKva9x24E5Ygfey2llR1KyQHv5f8hhMpDMwJDg1U-hABpJ2NrQJd6azirdfaR0OKt4jDlmP2o4Qx0H598~AteyD~RJU~xcWYdcOE0dmJ2e9Y8-HY51ie0B1yD9FtIV72ZI-V3TzFDcs6nkdX9b81DwrAwwFzx0EfNvK1GLVWl59Ow85muoRTBA1q8SsZImxdyZ-TApTVlMYIQbdI4iQRwU9OmmtefrCe~ZOf4UBS9-KvNIqUL0XeBSqm0OU1jq-D10Ykg6KfqvuPnBYT1BYHFDQJXW5DdPKwcaQE4MtAdSGmj1epDoaEBUa9btQlFsM2l9Cyn1hzxqNWXELmx8dRlomQLlV4b586dRzW~fLlOPIGC13ntPXogvYvHVyEyptXkv890jC7DZNHyxZd5cyrKC36r9huKvhQAmNABT2Y~pOGwVrb~RpPwT0tBuPZ3lHYhBFYmD8y~AOhhNHKMLzea1rfwTvovBMByDdFps54gMN1mX4MbCGT4w70vIopS9yAAAA.i2p/bytemonsoon/announce.php"
// , "mastertracker", "http://VzXD~stRKbL3MOmeTn1iaCQ0CFyTmuFHiKYyo0Rd~dFPZFCYH-22rT8JD7i-C2xzYFa4jT5U2aqHzHI-Jre4HL3Ri5hFtZrLk2ax3ji7Qfb6qPnuYkuiF2E2UDmKUOppI8d9Ye7tjdhQVCy0izn55tBaB-U7UWdcvSK2i85sauyw3G0Gfads1Rvy5-CAe2paqyYATcDmGjpUNLoxbfv9KH1KmwRTNH6k1v4PyWYYnhbT39WfKMbBjSxVQRdi19cyJrULSWhjxaQfJHeWx5Z8Ev4bSPByBeQBFl2~4vqy0S5RypINsRSa3MZdbiAAyn5tr5slWR6QdoqY3qBQgBJFZppy-3iWkFqqKgSxCPundF8gdDLC5ddizl~KYcYKl42y9SGFHIukH-TZs8~em0~iahzsqWVRks3zRG~tlBcX2U3M2~OJs~C33-NKhyfZT7-XFBREvb8Szmd~p66jDxrwOnKaku-G6DyoQipJqIz4VHmY9-y5T8RrUcJcM-5lVoMpAAAA.i2p/announce.php=http://tracker.mastertracker.i2p/"
// , "Galen", "http://5jpwQMI5FT303YwKa5Rd38PYSX04pbIKgTaKQsWbqoWjIfoancFdWCShXHLI5G5ofOb0Xu11vl2VEMyPsg1jUFYSVnu4-VfMe3y4TKTR6DTpetWrnmEK6m2UXh91J5DZJAKlgmO7UdsFlBkQfR2rY853-DfbJtQIFl91tbsmjcA5CGQi4VxMFyIkBzv-pCsuLQiZqOwWasTlnzey8GcDAPG1LDcvfflGV~6F5no9mnuisZPteZKlrv~~TDoXTj74QjByWc4EOYlwqK8sbU9aOvz~s31XzErbPTfwiawiaZ0RUI-IDrKgyvmj0neuFTWgjRGVTH8bz7cBZIc3viy6ioD-eMQOrXaQL0TCWZUelRwHRvgdPiQrxdYQs7ixkajeHzxi-Pq0EMm5Vbh3j3Q9kfUFW3JjFDA-MLB4g6XnjCbM5J1rC0oOBDCIEfhQkszru5cyLjHiZ5yeA0VThgu~c7xKHybv~OMXION7V8pBKOgET7ZgAkw1xgYe3Kkyq5syAAAA.i2p/tr/announce.php=http://galen.i2p/tr/"
"Postman", "http://tracker2.postman.i2p/announce.php=http://tracker2.postman.i2p/"
,"Welterde", "http://tracker.welterde.i2p/a=http://tracker.welterde.i2p/stats?mode=top5"
// , "CRSTRACK", "http://b4G9sCdtfvccMAXh~SaZrPqVQNyGQbhbYMbw6supq2XGzbjU4NcOmjFI0vxQ8w1L05twmkOvg5QERcX6Mi8NQrWnR0stLExu2LucUXg1aYjnggxIR8TIOGygZVIMV3STKH4UQXD--wz0BUrqaLxPhrm2Eh9Hwc8TdB6Na4ShQUq5Xm8D4elzNUVdpM~RtChEyJWuQvoGAHY3ppX-EJJLkiSr1t77neS4Lc-KofMVmgI9a2tSSpNAagBiNI6Ak9L1T0F9uxeDfEG9bBSQPNMOSUbAoEcNxtt7xOW~cNOAyMyGydwPMnrQ5kIYPY8Pd3XudEko970vE0D6gO19yoBMJpKx6Dh50DGgybLQ9CpRaynh2zPULTHxm8rneOGRcQo8D3mE7FQ92m54~SvfjXjD2TwAVGI~ae~n9HDxt8uxOecAAvjjJ3TD4XM63Q9TmB38RmGNzNLDBQMEmJFpqQU8YeuhnS54IVdUoVQFqui5SfDeLXlSkh4vYoMU66pvBfWbAAAA.i2p/tracker/announce.php=http://crstrack.i2p/tracker/"
,"Exotrack", "http://blbgywsjubw3d2zih2giokakhe3o2cko7jtte4risb3hohbcoyva.b32.i2p/announce.php=http://exotrack.i2p/"
};
/** comma delimited list of name=announceURL=baseURL for the trackers to be displayed */
public static final String PROP_TRACKERS = "i2psnark.trackers";
private static Map<String, String> trackerMap = null;
/** sorted map of name to announceURL=baseURL */
public Map<String, String> getTrackers() {
if (trackerMap != null) // only do this once, can't be updated while running
return trackerMap;
Map<String, String> rv = new TreeMap();
return _trackerMap;
}
/** @since 0.9 */
private void initTrackerMap() {
String trackers = _config.getProperty(PROP_TRACKERS);
if ( (trackers == null) || (trackers.trim().length() <= 0) )
trackers = _context.getProperty(PROP_TRACKERS);
_trackerMap.clear();
if ( (trackers == null) || (trackers.trim().length() <= 0) ) {
for (int i = 0; i < DEFAULT_TRACKERS.length; i += 2)
rv.put(DEFAULT_TRACKERS[i], DEFAULT_TRACKERS[i+1]);
_trackerMap.put(DEFAULT_TRACKERS[i], DEFAULT_TRACKERS[i+1]);
} else {
StringTokenizer tok = new StringTokenizer(trackers, ",");
while (tok.hasMoreTokens()) {
String pair = tok.nextToken();
int split = pair.indexOf('=');
if (split <= 0)
continue;
String name = pair.substring(0, split).trim();
String url = pair.substring(split+1).trim();
String[] toks = trackers.split(",");
for (int i = 0; i < toks.length; i += 2) {
String name = toks[i].trim().replace("&#44;", ",");
String url = toks[i+1].trim().replace("&#44;", ",");
if ( (name.length() > 0) && (url.length() > 0) )
rv.put(name, url);
_trackerMap.put(name, url);
}
}
trackerMap = rv;
return trackerMap;
}
/** @since 0.9 */
public void setDefaultTrackerMap() {
_trackerMap.clear();
for (int i = 0; i < DEFAULT_TRACKERS.length; i += 2) {
_trackerMap.put(DEFAULT_TRACKERS[i], DEFAULT_TRACKERS[i+1]);
}
if (_config.remove(PROP_TRACKERS) != null) {
saveConfig();
}
}
/** @since 0.9 */
public void saveTrackerMap() {
StringBuilder buf = new StringBuilder(2048);
boolean comma = false;
for (Map.Entry<String, String> e : _trackerMap.entrySet()) {
if (comma)
buf.append(',');
else
comma = true;
buf.append(e.getKey().replace(",", "&#44;")).append(',').append(e.getValue().replace(",", "&#44;"));
}
_config.setProperty(PROP_TRACKERS, buf.toString());
saveConfig();
}
private static class TorrentFilenameFilter implements FilenameFilter {
private static final TorrentFilenameFilter _filter = new TorrentFilenameFilter();
public static TorrentFilenameFilter instance() { return _filter; }
@ -1341,4 +1479,14 @@ public class SnarkManager implements Snark.CompleteListener {
}
}
}
/**
* ignore case, current locale
* @since 0.9
*/
private static class IgnoreCaseComparator implements Comparator<String> {
public int compare(String l, String r) {
return l.toLowerCase().compareTo(r.toLowerCase());
}
}
}

View File

@ -23,10 +23,15 @@ package org.klomp.snark;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.concurrent.ConcurrentHashMap;
import net.i2p.crypto.SHA1;
import net.i2p.util.SecureFile;
@ -47,7 +52,7 @@ public class Storage
private int[] priorities;
private final StorageListener listener;
private I2PSnarkUtil _util;
private final I2PSnarkUtil _util;
private /* FIXME final FIXME */ BitField bitfield; // BitField to represent the pieces
private int needed; // Number of pieces needed
@ -66,6 +71,8 @@ public class Storage
public static final int MAX_PIECES = 10*1024;
public static final long MAX_TOTAL_SIZE = MAX_PIECE_SIZE * (long) MAX_PIECES;
private static final Map<String, String> _filterNameCache = new ConcurrentHashMap();
/**
* Creates a new storage based on the supplied MetaInfo. This will
* try to create and/or check all needed files in the MetaInfo.
@ -94,7 +101,8 @@ public class Storage
* @param announce may be null
* @param listener may be null
*/
public Storage(I2PSnarkUtil util, File baseFile, String announce, StorageListener listener)
public Storage(I2PSnarkUtil util, File baseFile, String announce,
boolean privateTorrent, StorageListener listener)
throws IOException
{
_util = util;
@ -150,7 +158,7 @@ public class Storage
byte[] piece_hashes = fast_digestCreate();
metainfo = new MetaInfo(announce, baseFile.getName(), null, files,
lengthsList, piece_size, piece_hashes, total);
lengthsList, piece_size, piece_hashes, total, privateTorrent);
}
@ -165,7 +173,7 @@ public class Storage
*/
private byte[] fast_digestCreate() throws IOException {
// Calculate piece_hashes
SHA1 digest = new SHA1();
MessageDigest digest = SHA1.getInstance();
byte[] piece_hashes = new byte[20 * pieces];
@ -432,7 +440,12 @@ public class Storage
/** use a saved bitfield and timestamp from a config file */
public void check(String rootDir, long savedTime, BitField savedBitField) throws IOException
{
File base = new SecureFile(rootDir, filterName(metainfo.getName()));
File base;
boolean areFilesPublic = _util.getFilesPublic();
if (areFilesPublic)
base = new File(rootDir, filterName(metainfo.getName()));
else
base = new SecureFile(rootDir, filterName(metainfo.getName()));
boolean useSavedBitField = savedTime > 0 && savedBitField != null;
List<List<String>> files = metainfo.getFiles();
@ -478,7 +491,7 @@ public class Storage
for (int i = 0; i < size; i++)
{
List<String> path = files.get(i);
File f = createFileFromNames(base, path);
File f = createFileFromNames(base, path, areFilesPublic);
// dup file name check after filtering
for (int j = 0; j < i; j++) {
if (f.equals(RAFfile[j])) {
@ -494,7 +507,7 @@ public class Storage
else
lastPath = '_' + lastPath;
path.set(last, lastPath);
f = createFileFromNames(base, path);
f = createFileFromNames(base, path, areFilesPublic);
j = 0;
}
}
@ -556,25 +569,62 @@ public class Storage
private static final char[] ILLEGAL = new char[] {
'<', '>', ':', '"', '/', '\\', '|', '?', '*',
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
0x7f,
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
// unicode newlines
0x2028, 0x2029
};
/**
* Removes 'suspicious' characters from the given file name.
* http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx
* Then replace chars not supported in the charset.
*
* This is called frequently and it can be pretty slow so cache the result.
*
* TODO: If multiple files in the same torrent map to the same filter name,
* the whole torrent will blow up. Check at torrent creation?
*/
public static String filterName(String name)
{
if (name.equals(".") || name.equals(" "))
return "_";
String rv = name;
if (rv.startsWith("."))
rv = '_' + rv.substring(1);
if (rv.endsWith(".") || rv.endsWith(" "))
rv = rv.substring(0, rv.length() - 1) + '_';
for (int i = 0; i < ILLEGAL.length; i++) {
if (rv.indexOf(ILLEGAL[i]) >= 0)
rv = rv.replace(ILLEGAL[i], '_');
String rv = _filterNameCache.get(name);
if (rv != null)
return rv;
if (name.equals(".") || name.equals(" ")) {
rv = "_";
} else {
rv = name;
if (rv.startsWith("."))
rv = '_' + rv.substring(1);
if (rv.endsWith(".") || rv.endsWith(" "))
rv = rv.substring(0, rv.length() - 1) + '_';
for (int i = 0; i < ILLEGAL.length; i++) {
if (rv.indexOf(ILLEGAL[i]) >= 0)
rv = rv.replace(ILLEGAL[i], '_');
}
// Replace characters not supported in the charset
if (!Charset.defaultCharset().name().equals("UTF-8")) {
try {
CharsetEncoder enc = Charset.defaultCharset().newEncoder();
if (!enc.canEncode(rv)) {
String repl = rv;
for (int i = 0; i < rv.length(); i++) {
char c = rv.charAt(i);
if (!enc.canEncode(c))
repl = repl.replace(c, '_');
}
rv = repl;
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
_filterNameCache.put(name, rv);
return rv;
}
@ -583,7 +633,7 @@ public class Storage
* things going in the wrong place if there are duplicates
* in intermediate path elements after filtering.
*/
private static File createFileFromNames(File base, List<String> names) throws IOException
private static File createFileFromNames(File base, List<String> names, boolean areFilesPublic) throws IOException
{
File f = null;
Iterator<String> it = names.iterator();
@ -593,7 +643,10 @@ public class Storage
if (it.hasNext())
{
// Another dir in the hierarchy.
f = new File(base, name);
if (areFilesPublic)
f = new File(base, name);
else
f = new SecureFile(base, name);
if (!f.mkdir() && !f.isDirectory())
throw new IOException("Could not create directory " + f);
base = f;
@ -601,7 +654,10 @@ public class Storage
else
{
// The final element (file) in the hierarchy.
f = new SecureFile(base, name);
if (areFilesPublic)
f = new File(base, name);
else
f = new SecureFile(base, name);
if (!f.createNewFile() && !f.exists())
throw new IOException("Could not create file " + f);
}
@ -749,27 +805,19 @@ public class Storage
openRAF(nr, false); // RW
// XXX - Is this the best way to make sure we have enough space for
// the whole file?
long remaining = lengths[nr];
if (listener != null)
listener.storageCreateFile(this, names[nr], lengths[nr]);
final int ZEROBLOCKSIZE = piece_size;
byte[] zeros;
try {
zeros = new byte[ZEROBLOCKSIZE];
} catch (OutOfMemoryError oom) {
throw new IOException(oom.toString());
listener.storageCreateFile(this, names[nr], remaining);
final int ZEROBLOCKSIZE = (int) Math.min(remaining, 32*1024);
byte[] zeros = new byte[ZEROBLOCKSIZE];
while (remaining > 0) {
int size = (int) Math.min(remaining, ZEROBLOCKSIZE);
rafs[nr].write(zeros, 0, size);
remaining -= size;
}
int i;
for (i = 0; i < lengths[nr]/ZEROBLOCKSIZE; i++)
{
rafs[nr].write(zeros);
if (listener != null)
listener.storageAllocated(this, ZEROBLOCKSIZE);
}
int size = (int)(lengths[nr] - i*ZEROBLOCKSIZE);
rafs[nr].write(zeros, 0, size);
// caller will close rafs[nr]
if (listener != null)
listener.storageAllocated(this, size);
listener.storageAllocated(this, lengths[nr]);
}
@ -829,7 +877,7 @@ public class Storage
{
// First check if the piece is correct.
// Copy the array first to be paranoid.
byte[] bs = (byte[]) ba.clone();
byte[] bs = ba.clone();
int length = bs.length;
boolean correctHash = metainfo.checkPiece(piece, bs, 0, length);
if (listener != null)

View File

@ -30,6 +30,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Random;
import java.util.Set;
@ -38,8 +39,6 @@ import net.i2p.data.Hash;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import org.klomp.snark.dht.DHT;
/**
* Informs metainfo tracker of events and gets new peers for peer
* coordinator.
@ -155,7 +154,7 @@ public class TrackerClient extends I2PAppThread
primary = "";
}
List tlist = _util.getOpenTrackers();
if (tlist != null) {
if (tlist != null && (meta == null || !meta.isPrivate())) {
for (int i = 0; i < tlist.size(); i++) {
String url = (String)tlist.get(i);
if (!isValidAnnounce(url)) {
@ -199,8 +198,6 @@ public class TrackerClient extends I2PAppThread
long left = coordinator.getLeft();
boolean completed = (left == 0);
int sleptTime = 0;
try
{
if (!verifyConnected()) return;
@ -259,8 +256,6 @@ public class TrackerClient extends I2PAppThread
event = NO_EVENT;
// *** loop once for each tracker
// Only do a request when necessary.
sleptTime = 0;
int maxSeenPeers = 0;
for (Iterator iter = trackers.iterator(); iter.hasNext(); ) {
Tracker tr = (Tracker)iter.next();
@ -309,7 +304,6 @@ public class TrackerClient extends I2PAppThread
// only delay if we actually make an attempt to add peer
if(coordinator.addPeer(cur) && it.hasNext()) {
int delay = (DELAY_MUL * r.nextInt(10)) + DELAY_MIN;
sleptTime += delay;
try { Thread.sleep(delay); } catch (InterruptedException ie) {}
}
}
@ -325,7 +319,7 @@ public class TrackerClient extends I2PAppThread
// don't show secondary tracker problems to the user
if (tr.isPrimary)
snark.setTrackerProblems(tr.trackerProblems);
if (tr.trackerProblems.toLowerCase().startsWith(NOT_REGISTERED)) {
if (tr.trackerProblems.toLowerCase(Locale.US).startsWith(NOT_REGISTERED)) {
// Give a guy some time to register it if using opentrackers too
if (trackers.size() == 1) {
stop = true;
@ -347,7 +341,7 @@ public class TrackerClient extends I2PAppThread
} // *** end of trackers loop here
// Get peers from PEX
if (left > 0 && coordinator.needPeers() && !stop) {
if (left > 0 && coordinator.needPeers() && (meta == null || !meta.isPrivate()) && !stop) {
Set<PeerID> pids = coordinator.getPEXPeers();
if (!pids.isEmpty()) {
_util.debug("Got " + pids.size() + " from PEX", Snark.INFO);
@ -369,7 +363,7 @@ public class TrackerClient extends I2PAppThread
// Get peers from DHT
// FIXME this needs to be in its own thread
if (_util.getDHT() != null && !stop) {
if (_util.getDHT() != null && (meta == null || !meta.isPrivate()) && !stop) {
int numwant;
if (left == 0 || event.equals(STOPPED_EVENT) || !coordinator.needPeers())
numwant = 1;
@ -443,22 +437,33 @@ public class TrackerClient extends I2PAppThread
long downloaded, long left, String event)
throws IOException
{
// What do we send for left in magnet mode? Can we omit it?
long tleft = left >= 0 ? left : 1;
String s = tr.announce
+ "?info_hash=" + infoHash
+ "&peer_id=" + peerID
+ "&port=" + port
+ "&ip=" + _util.getOurIPString() + ".i2p"
+ "&uploaded=" + uploaded
+ "&downloaded=" + downloaded
+ "&left=" + tleft
+ "&compact=1" // NOTE: opentracker will return 400 for &compact alone
+ ((! event.equals(NO_EVENT)) ? ("&event=" + event) : "");
if (left == 0 || event.equals(STOPPED_EVENT) || !coordinator.needPeers())
s += "&numwant=0";
StringBuilder buf = new StringBuilder(512);
buf.append(tr.announce);
if (tr.announce.contains("?"))
buf.append('&');
else
s += "&numwant=" + _util.getMaxConnections();
buf.append('?');
buf.append("info_hash=").append(infoHash)
.append("&peer_id=").append(peerID)
.append("&port=").append(port)
.append("&ip=" ).append(_util.getOurIPString()).append(".i2p")
.append("&uploaded=").append(uploaded)
.append("&downloaded=").append(downloaded)
.append("&left=");
// What do we send for left in magnet mode? Can we omit it?
if (left >= 0)
buf.append(left);
else
buf.append('1');
buf.append("&compact=1"); // NOTE: opentracker will return 400 for &compact alone
if (! event.equals(NO_EVENT))
buf.append("&event=").append(event);
buf.append("&numwant=");
if (left == 0 || event.equals(STOPPED_EVENT) || !coordinator.needPeers())
buf.append('0');
else
buf.append(_util.getMaxConnections());
String s = buf.toString();
_util.debug("Sending TrackerClient request: " + s, Snark.INFO);
tr.lastRequestTime = System.currentTimeMillis();

View File

@ -2,7 +2,6 @@ package org.klomp.snark.web;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.Collator;
@ -14,15 +13,14 @@ import java.util.Comparator;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -30,10 +28,8 @@ import net.i2p.I2PAppContext;
import net.i2p.data.Base32;
import net.i2p.data.Base64;
import net.i2p.data.DataHelper;
import net.i2p.util.FileUtil;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import net.i2p.util.SecureFileOutputStream;
import org.klomp.snark.I2PSnarkUtil;
import org.klomp.snark.MetaInfo;
@ -43,17 +39,16 @@ import org.klomp.snark.SnarkManager;
import org.klomp.snark.Storage;
import org.klomp.snark.TrackerClient;
import org.mortbay.http.HttpResponse;
import org.mortbay.jetty.servlet.Default;
import org.mortbay.util.Resource;
import org.mortbay.util.URI;
import org.mortbay.jetty.servlet.DefaultServlet;
import org.mortbay.resource.Resource;
import org.mortbay.util.URIUtil;
/**
* We extend Default instead of HTTPServlet so we can handle
* i2psnark/ file requests with http:// instead of the flaky and
* often-blocked-by-the-browser file://
*/
public class I2PSnarkServlet extends Default {
public class I2PSnarkServlet extends DefaultServlet {
private I2PAppContext _context;
private Log _log;
private SnarkManager _manager;
@ -99,13 +94,17 @@ public class I2PSnarkServlet extends Default {
* and we can't get any resources (like icons) out of the .war
*/
@Override
protected Resource getResource(String pathInContext) throws IOException
public Resource getResource(String pathInContext)
{
if (pathInContext == null || pathInContext.equals("/") || pathInContext.equals("/index.jsp") ||
pathInContext.equals("/index.html") || pathInContext.startsWith("/_icons/"))
pathInContext.equals("/index.html") || pathInContext.startsWith("/.icons/"))
return super.getResource(pathInContext);
// files in the i2psnark/ directory
return _resourceBase.addPath(pathInContext);
try {
return _resourceBase.addPath(pathInContext);
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
}
/**
@ -113,10 +112,8 @@ public class I2PSnarkServlet extends Default {
* @since 0.8.3
*/
@Override
public void handleGet(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource, boolean endsWithSlash) throws ServletException, IOException {
if (resource.getName().startsWith("jar:file:"))
response.setHeader("Cache-Control", "max-age=86400"); // cache for a day
super.handleGet(request, response, pathInContext, resource, endsWithSlash);
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
super.doGet(request, response);
}
/**
@ -144,33 +141,46 @@ public class I2PSnarkServlet extends Default {
// since we are not overriding handle*(), do this here
String method = req.getMethod();
if (!(method.equals("GET") || method.equals("HEAD") || method.equals("POST"))) {
resp.sendError(HttpResponse.__405_Method_Not_Allowed);
resp.sendError(405);
return;
}
_themePath = "/themes/snark/" + _manager.getTheme() + '/';
_imgPath = _themePath + "images/";
// this is the part after /i2psnark
String path = req.getServletPath();
// AJAX for mainsection
if ("/.ajax/xhr1.html".equals(path)) {
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html; charset=UTF-8");
PrintWriter out = resp.getWriter();
//if (_log.shouldLog(Log.DEBUG))
// _manager.addMessage((_context.clock().now() / 1000) + " xhr1 p=" + req.getParameter("p"));
writeMessages(out, false);
writeTorrents(out, req);
return;
}
boolean isConfigure = "/configure".equals(path);
// index.jsp doesn't work, it is grabbed by the war handler before here
if (!(path == null || path.equals("/") || path.equals("/index.jsp") || path.equals("/index.html") || path.equals("/_post") || isConfigure)) {
if (path.endsWith("/")) {
// bypass the horrid Resource.getListHTML()
String pathInfo = req.getPathInfo();
String pathInContext = URI.addPaths(path, pathInfo);
String pathInContext = URIUtil.addPaths(path, pathInfo);
req.setCharacterEncoding("UTF-8");
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/html; charset=UTF-8");
Resource resource = getResource(pathInContext);
if (resource == null || (!resource.exists())) {
resp.sendError(HttpResponse.__404_Not_Found);
resp.sendError(404);
} else {
String base = URI.addPaths(req.getRequestURI(), "/");
String base = URIUtil.addPaths(req.getRequestURI(), "/");
String listing = getListHTML(resource, base, true, method.equals("POST") ? req.getParameterMap() : null);
if (listing != null)
resp.getWriter().write(listing);
else // shouldn't happen
resp.sendError(HttpResponse.__404_Not_Found);
resp.sendError(404);
}
} else {
super.service(req, resp);
@ -192,7 +202,8 @@ public class I2PSnarkServlet extends Default {
String peerParam = req.getParameter("p");
String peerString;
if (peerParam == null || !_manager.util().connected()) {
if (peerParam == null || (!_manager.util().connected()) ||
peerParam.replaceAll("[a-zA-Z0-9~=-]", "").length() > 0) { // XSS
peerString = "";
} else {
peerString = "?p=" + peerParam;
@ -208,10 +219,24 @@ public class I2PSnarkServlet extends Default {
out.write("</title>\n");
// we want it to go to the base URI so we don't refresh with some funky action= value
if (!isConfigure)
out.write("<meta http-equiv=\"refresh\" content=\"60;/i2psnark/" + peerString + "\">\n");
out.write(HEADER_A + _themePath + HEADER_B);
out.write("</head><body>");
int delay = 0;
if (!isConfigure) {
delay = _manager.getRefreshDelaySeconds();
if (delay > 0) {
//out.write("<meta http-equiv=\"refresh\" content=\"" + delay + ";/i2psnark/" + peerString + "\">\n");
out.write("<script src=\"/js/ajax.js\" type=\"text/javascript\"></script>\n" +
"<script type=\"text/javascript\">\n" +
"var failMessage = \"<b>" + _("Router is down") + "<\\/b>\";\n" +
"function requestAjax1() { ajax(\"/i2psnark/.ajax/xhr1.html" + peerString + "\", \"mainsection\", " + (delay*1000) + "); }\n" +
"function initAjax(delayMs) { setTimeout(requestAjax1, " + (delay*1000) +"); }\n" +
"</script>\n");
}
}
out.write(HEADER_A + _themePath + HEADER_B + "</head>\n");
if (isConfigure || delay <= 0)
out.write("<body>");
else
out.write("<body onload=\"initAjax()\">");
out.write("<center>");
if (isConfigure) {
out.write("<div class=\"snarknavbar\"><a href=\"/i2psnark/\" title=\"");
@ -243,34 +268,53 @@ public class I2PSnarkServlet extends Default {
}
}
out.write("</div>\n");
out.write("<div class=\"page\"><div class=\"mainsection\"><div class=\"snarkMessages\"><table><tr><td align=\"left\"><pre>");
List msgs = _manager.getMessages();
for (int i = msgs.size()-1; i >= 0; i--) {
String msg = (String)msgs.get(i);
out.write(msg + "\n");
}
out.write("</pre></td></tr></table></div>");
String newURL = req.getParameter("newURL");
if (newURL != null && newURL.trim().length() > 0 && req.getMethod().equals("GET"))
_manager.addMessage(_("Click \"Add torrent\" button to fetch torrent"));
out.write("<div class=\"page\"><div id=\"mainsection\" class=\"mainsection\">");
writeMessages(out, isConfigure);
if (isConfigure) {
// end of mainsection div
out.write("<div class=\"logshim\"></div></div>\n");
writeConfigForm(out, req);
writeTrackerForm(out, req);
} else {
writeTorrents(out, req);
out.write("</div>\n");
// end of mainsection div
out.write("</div><div id=\"lowersection\">\n");
writeAddForm(out, req);
writeSeedForm(out, req);
writeConfigLink(out);
// end of lowersection div
out.write("</div>\n");
}
out.write(FOOTER);
}
private void writeMessages(PrintWriter out, boolean isConfigure) throws IOException {
List<String> msgs = _manager.getMessages();
if (!msgs.isEmpty()) {
out.write("<div class=\"snarkMessages\"><ul>");
for (int i = msgs.size()-1; i >= 0; i--) {
String msg = msgs.get(i);
out.write("<li>" + msg + "</li>\n");
}
// lazy GET, lose p parameter
out.write("</ul><p><a href=\"/i2psnark/");
if (isConfigure)
out.write("configure");
out.write("?action=Clear&amp;nonce=" + _nonce + "\">" + _("clear messages") + "</a></p></div>");
}
}
private void writeTorrents(PrintWriter out, HttpServletRequest req) throws IOException {
/** dl, ul, down rate, up rate, peers, size */
final long stats[] = {0,0,0,0,0,0};
String peerParam = req.getParameter("p");
List snarks = getSortedSnarks(req);
String uri = req.getRequestURI();
boolean isForm = _manager.util().connected() || !snarks.isEmpty();
if (isForm) {
out.write("<form action=\"_post\" method=\"POST\">\n");
@ -384,6 +428,7 @@ public class I2PSnarkServlet extends Default {
out.write("&nbsp;");
}
out.write("</th></tr></thead>\n");
String uri = "/i2psnark/";
for (int i = 0; i < snarks.size(); i++) {
Snark snark = (Snark)snarks.get(i);
boolean showDebug = "2".equals(peerParam);
@ -450,7 +495,6 @@ public class I2PSnarkServlet extends Default {
// return;
//}
if ("Add".equals(action)) {
String newFile = req.getParameter("newFile");
String newURL = req.getParameter("newURL");
/******
// NOTE - newFile currently disabled in HTML form - see below
@ -488,11 +532,15 @@ public class I2PSnarkServlet extends Default {
*****/
if (newURL != null) {
if (newURL.startsWith("http://")) {
if (!_manager.util().connected())
_manager.addMessage(_("Opening the I2P tunnel"));
_manager.addMessage(_("Fetching {0}", urlify(newURL)));
I2PAppThread fetch = new I2PAppThread(new FetchAndAdd(_manager, newURL), "Fetch and add", true);
fetch.start();
} else if (newURL.startsWith(MAGNET) || newURL.startsWith(MAGGOT)) {
addMagnet(newURL);
} else if (newURL.length() == 40 && newURL.replaceAll("[a-fA-F0-9]", "").length() == 0) {
addMagnet(MAGNET_FULL + newURL);
} else {
_manager.addMessage(_("Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\"", MAGNET, MAGGOT));
}
@ -576,7 +624,7 @@ public class I2PSnarkServlet extends Default {
File f = new File(name);
f.delete();
_manager.addMessage(_("Torrent file deleted: {0}", f.getAbsolutePath()));
List files = meta.getFiles();
List<List<String>> files = meta.getFiles();
String dataFile = snark.getBaseName();
f = new File(_manager.getDataDir(), dataFile);
if (files == null) { // single file torrent
@ -586,23 +634,36 @@ public class I2PSnarkServlet extends Default {
_manager.addMessage(_("Data file could not be deleted: {0}", f.getAbsolutePath()));
break;
}
for (int i = 0; i < files.size(); i++) { // pass 1 delete files
// step 1 delete files
for (int i = 0; i < files.size(); i++) {
// multifile torrents have the getFiles() return lists of lists of filenames, but
// each of those lists just contain a single file afaict...
File df = Storage.getFileFromNames(f, (List) files.get(i));
File df = Storage.getFileFromNames(f, files.get(i));
if (df.delete())
_manager.addMessage(_("Data file deleted: {0}", df.getAbsolutePath()));
else
_manager.addMessage(_("Data file could not be deleted: {0}", df.getAbsolutePath()));
}
for (int i = files.size() - 1; i >= 0; i--) { // pass 2 delete dirs - not foolproof,
// we could sort and do a strict bottom-up
File df = Storage.getFileFromNames(f, (List) files.get(i));
df = df.getParentFile();
if (df == null || !df.exists())
continue;
if(df.delete())
// step 2 make Set of dirs with reverse sort
Set<File> dirs = new TreeSet(Collections.reverseOrder());
for (List<String> list : files) {
for (int i = 1; i < list.size(); i++) {
dirs.add(Storage.getFileFromNames(f, list.subList(0, i)));
}
}
// step 3 delete dirs bottom-up
for (File df : dirs) {
if (df.delete()) {
_manager.addMessage(_("Data dir deleted: {0}", df.getAbsolutePath()));
} else if (_log.shouldLog(Log.WARN)) {
_log.warn("Could not delete dir " + df);
}
}
// step 4 delete base
if (f.delete()) {
_manager.addMessage(_("Data dir deleted: {0}", f.getAbsolutePath()));
} else if (_log.shouldLog(Log.WARN)) {
_log.warn("Could not delete dir " + f);
}
break;
}
@ -611,6 +672,7 @@ public class I2PSnarkServlet extends Default {
}
} else if ("Save".equals(action)) {
String dataDir = req.getParameter("dataDir");
boolean filesPublic = req.getParameter("filesPublic") != null;
boolean autoStart = req.getParameter("autoStart") != null;
String seedPct = req.getParameter("seedPct");
String eepHost = req.getParameter("eepHost");
@ -620,19 +682,27 @@ public class I2PSnarkServlet extends Default {
String i2cpOpts = buildI2CPOpts(req);
String upLimit = req.getParameter("upLimit");
String upBW = req.getParameter("upBW");
String refreshDel = req.getParameter("refreshDelay");
String startupDel = req.getParameter("startupDelay");
boolean useOpenTrackers = req.getParameter("useOpenTrackers") != null;
String openTrackers = req.getParameter("openTrackers");
String theme = req.getParameter("theme");
_manager.updateConfig(dataDir, autoStart, startupDel, seedPct, eepHost, eepPort, i2cpHost, i2cpPort, i2cpOpts, upLimit, upBW, useOpenTrackers, openTrackers, theme);
_manager.updateConfig(dataDir, filesPublic, autoStart, refreshDel, startupDel,
seedPct, eepHost, eepPort, i2cpHost, i2cpPort, i2cpOpts,
upLimit, upBW, useOpenTrackers, openTrackers, theme);
} else if ("Save2".equals(action)) {
String taction = req.getParameter("taction");
if (taction != null)
processTrackerForm(taction, req);
} else if ("Create".equals(action)) {
String baseData = req.getParameter("baseFile");
if (baseData != null && baseData.trim().length() > 0) {
File baseFile = new File(_manager.getDataDir(), baseData);
String announceURL = req.getParameter("announceURL");
String announceURLOther = req.getParameter("announceURLOther");
if ( (announceURLOther != null) && (announceURLOther.trim().length() > "http://.i2p/announce".length()) )
announceURL = announceURLOther;
// make the user add a tracker on the config form now
//String announceURLOther = req.getParameter("announceURLOther");
//if ( (announceURLOther != null) && (announceURLOther.trim().length() > "http://.i2p/announce".length()) )
// announceURL = announceURLOther;
if (announceURL == null || announceURL.length() <= 0)
_manager.addMessage(_("Error creating torrent - you must select a tracker"));
@ -643,7 +713,7 @@ public class I2PSnarkServlet extends Default {
try {
// This may take a long time to check the storage, but since it already exists,
// it shouldn't be THAT bad, so keep it in this thread.
Storage s = new Storage(_manager.util(), baseFile, announceURL, null);
Storage s = new Storage(_manager.util(), baseFile, announceURL, req.getParameter("private") != null, null);
s.close(); // close the files... maybe need a way to pass this Storage to addTorrent rather than starting over
MetaInfo info = s.getMetaInfo();
File torrentFile = new File(_manager.getDataDir(), s.getBaseName() + ".torrent");
@ -684,6 +754,56 @@ public class I2PSnarkServlet extends Default {
if (snark.isStopped())
snark.startTorrent();
}
} else if ("Clear".equals(action)) {
_manager.clearMessages();
} else {
_manager.addMessage("Unknown POST action: \"" + action + '\"');
}
}
/** @since 0.9 */
private void processTrackerForm(String action, HttpServletRequest req) {
if (action.equals(_("Delete selected"))) {
boolean changed = false;
Map<String, String> trackers = _manager.getTrackers();
Enumeration e = req.getParameterNames();
while (e.hasMoreElements()) {
Object o = e.nextElement();
if (!(o instanceof String))
continue;
String k = (String) o;
if (!k.startsWith("delete_"))
continue;
k = k.substring(7);
if (trackers.remove(k) != null) {
_manager.addMessage(_("Removed") + ": " + k);
changed = true;
}
}
if (changed) {
_manager.saveTrackerMap();
}
} else if (action.equals(_("Add tracker"))) {
String name = req.getParameter("tname");
String hurl = req.getParameter("thurl");
String aurl = req.getParameter("taurl");
if (name != null && hurl != null && aurl != null) {
name = name.trim();
hurl = hurl.trim();
aurl = aurl.trim().replace("=", "&#61;");
if (name.length() > 0 && hurl.startsWith("http://") && aurl.startsWith("http://")) {
Map<String, String> trackers = _manager.getTrackers();
trackers.put(name, aurl + '=' + hurl);
_manager.saveTrackerMap();
} else {
_manager.addMessage(_("Enter valid tracker name and URLs"));
}
} else {
_manager.addMessage(_("Enter valid tracker name and URLs"));
}
} else if (action.equals(_("Restore defaults"))) {
_manager.setDefaultTrackerMap();
_manager.addMessage(_("Restored default trackers"));
} else {
_manager.addMessage("Unknown POST action: \"" + action + '\"');
}
@ -721,10 +841,10 @@ public class I2PSnarkServlet extends Default {
l = l.substring(skip.length());
if (r.startsWith(skip))
r = r.substring(skip.length());
String llc = l.toLowerCase();
String llc = l.toLowerCase(Locale.US);
if (llc.startsWith("the ") || llc.startsWith("the.") || llc.startsWith("the_"))
l = l.substring(4);
String rlc = r.toLowerCase();
String rlc = r.toLowerCase(Locale.US);
if (rlc.startsWith("the ") || rlc.startsWith("the.") || rlc.startsWith("the_"))
r = r.substring(4);
return collator.compare(l, r);
@ -765,8 +885,7 @@ public class I2PSnarkServlet extends Default {
}
}
long total = snark.getTotalLength();
// Early typecast, avoid possibly overflowing a temp integer
long remaining = (long) snark.getNeeded() * (long) snark.getPieceLength(0);
long remaining = snark.getRemainingLength();
if (remaining > total)
remaining = total;
long downBps = snark.getDownloadRate();
@ -876,13 +995,14 @@ public class I2PSnarkServlet extends Default {
out.write(trackerLink);
}
String encodedBaseName = urlEncode(snark.getBaseName());
// File type icon column
out.write("</td>\n<td class=\"" + rowClass + "\">");
if (isValid) {
// Link to local details page - note that trailing slash on a single-file torrent
// gets us to the details page instead of the file.
StringBuilder buf = new StringBuilder(128);
buf.append("<a href=\"").append(snark.getBaseName())
buf.append("<a href=\"").append(encodedBaseName)
.append("/\" title=\"").append(_("Torrent details"))
.append("\">");
out.write(buf.toString());
@ -905,7 +1025,7 @@ public class I2PSnarkServlet extends Default {
out.write("</td><td class=\"snarkTorrentName " + rowClass + "\">");
if (remaining == 0 || isMultiFile) {
StringBuilder buf = new StringBuilder(128);
buf.append("<a href=\"").append(snark.getBaseName());
buf.append("<a href=\"").append(encodedBaseName);
if (isMultiFile)
buf.append('/');
buf.append("\" title=\"");
@ -978,7 +1098,7 @@ public class I2PSnarkServlet extends Default {
if (noThinsp)
out.write("<a href=\"/i2psnark/?action=Remove_" + b64 + "&amp;nonce=" + _nonce + "\"><img title=\"");
else
out.write("<input type=\"image\" name=\"action\" value=\"Remove_" + b64 + "\" title=\"");
out.write("<input type=\"image\" name=\"action_Remove_" + b64 + "\" value=\"foo\" title=\"");
out.write(_("Remove the torrent from the active list, deleting the .torrent file"));
out.write("\" onclick=\"if (!confirm('");
// Can't figure out how to escape double quotes inside the onclick string.
@ -1038,6 +1158,8 @@ public class I2PSnarkServlet extends Default {
client = "Robert";
else if (ch.startsWith("LV")) // LVCS 1.0.2?; LVRS 1.0.4
client = "Transmission";
else if ("LUtU".equals(ch))
client = "KTorrent";
else
client = _("Unknown") + " (" + ch + ')';
out.write(client + "&nbsp;&nbsp;<tt>" + peer.toString().substring(5, 9)+ "</tt>");
@ -1049,7 +1171,7 @@ public class I2PSnarkServlet extends Default {
out.write("<td align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
float pct;
if (isValid) {
pct = (float) (100.0 * (float) peer.completed() / meta.getPieces());
pct = (float) (100.0 * peer.completed() / meta.getPieces());
if (pct == 100.0)
out.write(_("Seed"));
else {
@ -1166,8 +1288,9 @@ public class I2PSnarkServlet extends Default {
}
private void writeAddForm(PrintWriter out, HttpServletRequest req) throws IOException {
// display incoming parameter if a GET so links will work
String newURL = req.getParameter("newURL");
if ( (newURL == null) || (newURL.trim().length() <= 0) )
if (newURL == null || newURL.trim().length() <= 0 || req.getMethod().equals("POST"))
newURL = "";
else
newURL = DataHelper.stripHTML(newURL); // XSS
@ -1189,12 +1312,12 @@ public class I2PSnarkServlet extends Default {
out.write("</span><hr>\n<table border=\"0\"><tr><td>");
out.write(_("From URL"));
out.write(":<td><input type=\"text\" name=\"newURL\" size=\"85\" value=\"" + newURL + "\"");
out.write("title=\"");
out.write(_("Enter the torrent file download URL (I2P only), magnet link, or maggot link"));
out.write(" title=\"");
out.write(_("Enter the torrent file download URL (I2P only), magnet link, maggot link, or info hash"));
out.write("\"> \n");
// not supporting from file at the moment, since the file name passed isn't always absolute (so it may not resolve)
//out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>");
out.write("<input type=\"submit\" value=\"");
out.write("<input type=\"submit\" class=\"add\" value=\"");
out.write(_("Add torrent"));
out.write("\" name=\"foo\" ><br>\n");
out.write("<tr><td>&nbsp;<td><span class=\"snarkAddInfo\">");
@ -1212,7 +1335,7 @@ public class I2PSnarkServlet extends Default {
else
baseFile = DataHelper.stripHTML(baseFile); // XSS
out.write("<div class=\"newtorrentsection\"><div class=\"snarkNewTorrent\">\n");
out.write("<a name=\"add\"></a><div class=\"newtorrentsection\"><div class=\"snarkNewTorrent\">\n");
// *not* enctype="multipart/form-data", so that the input type=file sends the filename, not the file
out.write("<form action=\"_post\" method=\"POST\">\n");
out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n");
@ -1241,61 +1364,81 @@ public class I2PSnarkServlet extends Default {
//out.write(_("Open trackers and DHT only"));
out.write(_("Open trackers only"));
out.write("</option>\n");
Map trackers = _manager.getTrackers();
for (Iterator iter = trackers.entrySet().iterator(); iter.hasNext(); ) {
Map.Entry entry = (Map.Entry)iter.next();
String name = (String)entry.getKey();
String announceURL = (String)entry.getValue();
Map<String, String> trackers = _manager.getTrackers();
for (Map.Entry<String, String> entry : trackers.entrySet()) {
String name = entry.getKey();
String announceURL = entry.getValue();
int e = announceURL.indexOf('=');
if (e > 0)
announceURL = announceURL.substring(0, e);
announceURL = announceURL.substring(0, e).replace("&#61;", "=");
if (announceURL.equals(_lastAnnounceURL))
announceURL += "\" selected=\"selected";
out.write("\t<option value=\"" + announceURL + "\">" + name + "</option>\n");
}
out.write("</select>\n");
out.write(_("or"));
out.write("&nbsp;<input type=\"text\" name=\"announceURLOther\" size=\"57\" value=\"http://\" " +
"title=\"");
out.write(_("Specify custom tracker announce URL"));
out.write("\" > ");
out.write("<input type=\"submit\" value=\"");
// make the user add a tracker on the config form now
//out.write(_("or"));
//out.write("&nbsp;<input type=\"text\" name=\"announceURLOther\" size=\"57\" value=\"http://\" " +
// "title=\"");
//out.write(_("Specify custom tracker announce URL"));
//out.write("\" > " +
out.write(" <input type=\"submit\" class=\"create\" value=\"");
out.write(_("Create torrent"));
out.write("\" name=\"foo\" ></table>\n");
out.write("</form></div></div>");
out.write("\" name=\"foo\" >\n" +
"</td></tr><tr><td>");
out.write(_("Private?"));
out.write(" </td><td> <input type=\"checkbox\" class=\"optbox\" name=\"private\" value=\"true\" title=\"");
out.write(_("Use for private trackers"));
out.write("\"");
if (req.getParameter("private") != null)
out.write(" checked");
out.write("></td></tr>" +
"</table>\n" +
"</form></div></div>");
}
private static final int[] times = { 5, 15, 30, 60, 2*60, 5*60, 10*60, 30*60, -1 };
private void writeConfigForm(PrintWriter out, HttpServletRequest req) throws IOException {
String dataDir = _manager.getDataDir().getAbsolutePath();
boolean filesPublic = _manager.areFilesPublic();
boolean autoStart = _manager.shouldAutoStart();
boolean useOpenTrackers = _manager.util().shouldUseOpenTrackers();
String openTrackers = _manager.util().getOpenTrackerString();
//int seedPct = 0;
out.write("<form action=\"/i2psnark/configure\" method=\"POST\">\n");
out.write("<div class=\"configsectionpanel\"><div class=\"snarkConfig\">\n");
out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n");
out.write("<input type=\"hidden\" name=\"action\" value=\"Save\" >\n");
out.write("<span class=\"snarkConfigTitle\">");
out.write("<img alt=\"\" border=\"0\" src=\"" + _imgPath + "config.png\"> ");
out.write("<form action=\"/i2psnark/configure\" method=\"POST\">\n" +
"<div class=\"configsectionpanel\"><div class=\"snarkConfig\">\n" +
"<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n" +
"<input type=\"hidden\" name=\"action\" value=\"Save\" >\n" +
"<span class=\"snarkConfigTitle\">" +
"<img alt=\"\" border=\"0\" src=\"" + _imgPath + "config.png\"> ");
out.write(_("Configuration"));
out.write("</span><hr>\n");
out.write("<table border=\"0\"><tr><td>");
out.write("</span><hr>\n" +
"<table border=\"0\"><tr><td>");
out.write(_("Data directory"));
out.write(": <td><code>" + dataDir + "</code> <i>(");
out.write(_("Edit i2psnark.config and restart to change"));
out.write(")</i><br>\n");
out.write(")</i><br>\n" +
out.write("<tr><td>");
"<tr><td>");
out.write(_("Files readable by all"));
out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"filesPublic\" value=\"true\" "
+ (filesPublic ? "checked " : "")
+ "title=\"");
out.write(_("If checked, other users may access the downloaded files"));
out.write("\" >" +
"<tr><td>");
out.write(_("Auto start"));
out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"autoStart\" value=\"true\" "
+ (autoStart ? "checked " : "")
+ "title=\"");
out.write(_("If checked, automatically start torrents that are added"));
out.write("\" >");
out.write("\" >" +
out.write("<tr><td>");
"<tr><td>");
out.write(_("Theme"));
out.write(": <td><select name='theme'>");
String theme = _manager.getTheme();
@ -1306,9 +1449,28 @@ public class I2PSnarkServlet extends Default {
else
out.write("\n<OPTION value=\"" + themes[i] + "\">" + themes[i]);
}
out.write("</select>\n");
out.write("</select>\n" +
out.write("<tr><td>");
"<tr><td>");
out.write(_("Refresh time"));
out.write(": <td><select name=\"refreshDelay\">");
int delay = _manager.getRefreshDelaySeconds();
for (int i = 0; i < times.length; i++) {
out.write("<option value=\"");
out.write(Integer.toString(times[i]));
out.write("\"");
if (times[i] == delay)
out.write(" selected=\"selected\"");
out.write(">");
if (times[i] > 0)
out.write(DataHelper.formatDuration2(times[i] * 1000));
else
out.write(_("Never"));
out.write("</option>\n");
}
out.write("</select><br>" +
"<tr><td>");
out.write(_("Startup delay"));
out.write(": <td><input name=\"startupDelay\" size=\"3\" class=\"r\" value=\"" + _manager.util().getStartupDelay() + "\"> ");
out.write(_("minutes"));
@ -1321,15 +1483,15 @@ public class I2PSnarkServlet extends Default {
/*
out.write("Seed percentage: <select name=\"seedPct\" disabled=\"true\" >\n\t");
if (seedPct <= 0)
out.write("<option value=\"0\" selected=\"true\">Unlimited</option>\n\t");
out.write("<option value=\"0\" selected=\"selected\">Unlimited</option>\n\t");
else
out.write("<option value=\"0\">Unlimited</option>\n\t");
if (seedPct == 100)
out.write("<option value=\"100\" selected=\"true\">100%</option>\n\t");
out.write("<option value=\"100\" selected=\"selected\">100%</option>\n\t");
else
out.write("<option value=\"100\">100%</option>\n\t");
if (seedPct == 150)
out.write("<option value=\"150\" selected=\"true\">150%</option>\n\t");
out.write("<option value=\"150\" selected=\"selected\">150%</option>\n\t");
else
out.write("<option value=\"150\">150%</option>\n\t");
out.write("</select><br>\n");
@ -1339,26 +1501,26 @@ public class I2PSnarkServlet extends Default {
out.write(": <td><input type=\"text\" name=\"upLimit\" class=\"r\" value=\""
+ _manager.util().getMaxUploaders() + "\" size=\"3\" maxlength=\"3\" > ");
out.write(_("peers"));
out.write("<br>\n");
out.write("<br>\n" +
out.write("<tr><td>");
"<tr><td>");
out.write(_("Up bandwidth limit"));
out.write(": <td><input type=\"text\" name=\"upBW\" class=\"r\" value=\""
+ _manager.util().getMaxUpBW() + "\" size=\"3\" maxlength=\"3\" > KBps <i>(");
+ _manager.util().getMaxUpBW() + "\" size=\"3\" maxlength=\"3\" > KBps <i>");
out.write(_("Half available bandwidth recommended."));
out.write(" <a href=\"/config.jsp\" target=\"blank\">");
out.write("<br><a href=\"/config.jsp\" target=\"blank\">");
out.write(_("View or change router bandwidth"));
out.write("</a>)</i><br>\n");
out.write("</a></i><br>\n" +
out.write("<tr><td>");
"<tr><td>");
out.write(_("Use open trackers also"));
out.write(": <td><input type=\"checkbox\" class=\"optbox\" name=\"useOpenTrackers\" value=\"true\" "
+ (useOpenTrackers ? "checked " : "")
+ "title=\"");
out.write(_("If checked, announce torrents to open trackers as well as the tracker listed in the torrent file"));
out.write("\" > ");
out.write("\" > " +
out.write("<tr><td>");
"<tr><td>");
out.write(_("Open tracker announce URLs"));
out.write(": <td><input type=\"text\" name=\"openTrackers\" value=\""
+ openTrackers + "\" size=\"50\" ><br>\n");
@ -1387,36 +1549,89 @@ public class I2PSnarkServlet extends Default {
out.write("<tr><td>");
out.write(_("I2CP host"));
out.write(": <td><input type=\"text\" name=\"i2cpHost\" value=\""
+ _manager.util().getI2CPHost() + "\" size=\"15\" > ");
+ _manager.util().getI2CPHost() + "\" size=\"15\" > " +
out.write("<tr><td>");
"<tr><td>");
out.write(_("I2CP port"));
out.write(": <td><input type=\"text\" name=\"i2cpPort\" class=\"r\" value=\"" +
+ _manager.util().getI2CPPort() + "\" size=\"5\" maxlength=\"5\" > <br>\n");
}
options.remove(I2PSnarkUtil.PROP_MAX_BW);
// was accidentally in the I2CP options prior to 0.8.9 so it will be in old config files
options.remove(SnarkManager.PROP_OPENTRACKERS);
StringBuilder opts = new StringBuilder(64);
for (Iterator iter = options.entrySet().iterator(); iter.hasNext(); ) {
Map.Entry entry = (Map.Entry)iter.next();
String key = (String)entry.getKey();
String val = (String)entry.getValue();
for (Map.Entry<String, String> e : options.entrySet()) {
String key = e.getKey();
String val = e.getValue();
opts.append(key).append('=').append(val).append(' ');
}
out.write("<tr><td>");
out.write(_("I2CP options"));
out.write(": <td><textarea name=\"i2cpOpts\" cols=\"60\" rows=\"1\" wrap=\"off\" spellcheck=\"false\" >"
+ opts.toString() + "</textarea><br>\n");
+ opts.toString() + "</textarea><br>\n" +
out.write("<tr><td>&nbsp;<td><input type=\"submit\" value=\"");
"<tr><td>&nbsp;<td><input type=\"submit\" class=\"accept\" value=\"");
out.write(_("Save configuration"));
out.write("\" name=\"foo\" >\n");
out.write("</table></div></div></form>");
out.write("\" name=\"foo\" >\n" +
"</table></div></div></form>");
}
/** @since 0.9 */
private void writeTrackerForm(PrintWriter out, HttpServletRequest req) throws IOException {
StringBuilder buf = new StringBuilder(1024);
buf.append("<form action=\"/i2psnark/configure\" method=\"POST\">\n" +
"<div class=\"configsectionpanel\"><div class=\"snarkConfig\">\n" +
"<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" >\n" +
"<input type=\"hidden\" name=\"action\" value=\"Save2\" >\n" +
"<span class=\"snarkConfigTitle\">" +
"<img alt=\"\" border=\"0\" src=\"" + _imgPath + "config.png\"> ");
buf.append(_("Trackers"));
buf.append("</span><hr>\n" +
"<table><tr><th>")
//.append(_("Remove"))
.append("</th><th>")
.append(_("Name"))
.append("</th><th>")
.append(_("Website URL"))
.append("</th><th>")
.append(_("Announce URL"))
.append("</th></tr>\n");
Map<String, String> trackers = _manager.getTrackers();
for (Map.Entry<String, String> entry : trackers.entrySet()) {
String name = entry.getKey();
String announceURL = entry.getValue();
int e = announceURL.indexOf('=');
if (e <= 0)
continue;
String homeURL = announceURL.substring(e + 1);
announceURL = announceURL.substring(0, e).replace("&#61;", "=");
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
.append(name).append("\">" +
"</td><td align=\"left\">").append(name)
.append("</td><td align=\"left\">").append(urlify(homeURL, 35))
.append("</td><td align=\"left\">").append(urlify(announceURL, 35))
.append("</td></tr>\n");
}
buf.append("<tr><td align=\"center\"><b>")
.append(_("Add")).append(":</b></td>" +
"<td align=\"left\"><input type=\"text\" size=\"16\" name=\"tname\"></td>" +
"<td align=\"left\"><input type=\"text\" size=\"40\" name=\"thurl\"></td>" +
"<td align=\"left\"><input type=\"text\" size=\"40\" name=\"taurl\"></td></tr>\n" +
"<tr><td colspan=\"2\"></td><td colspan=\"2\" align=\"left\">\n" +
"<input type=\"submit\" name=\"taction\" class=\"default\" value=\"").append(_("Add tracker")).append("\">\n" +
"<input type=\"submit\" name=\"taction\" class=\"delete\" value=\"").append(_("Delete selected")).append("\">\n" +
// "<input type=\"reset\" class=\"cancel\" value=\"").append(_("Cancel")).append("\">\n" +
"<input type=\"submit\" name=\"taction\" class=\"reload\" value=\"").append(_("Restore defaults")).append("\">\n" +
"<input type=\"submit\" name=\"taction\" class=\"add\" value=\"").append(_("Add tracker")).append("\">\n" +
"</td></tr></table></div></div></form>\n");
out.write(buf.toString());
}
private void writeConfigLink(PrintWriter out) throws IOException {
out.write("<div class=\"configsection\"><span class=\"snarkConfig\">\n");
out.write("<span class=\"snarkConfigTitle\"><a href=\"configure\">");
out.write("<img alt=\"\" border=\"0\" src=\"" + _imgPath + "config.png\"> ");
out.write("<div class=\"configsection\"><span class=\"snarkConfig\">\n" +
"<span class=\"snarkConfigTitle\"><a href=\"configure\">" +
"<img alt=\"\" border=\"0\" src=\"" + _imgPath + "config.png\"> ");
out.write(_("Configuration"));
out.write("</a></span></span></div>\n");
}
@ -1514,7 +1729,7 @@ public class I2PSnarkServlet extends Default {
for (int i = min; i <= max; i++) {
buf.append("<option value=\"").append(i).append("\" ");
if (i == now)
buf.append("selected=\"true\" ");
buf.append("selected=\"selected\" ");
// constants to prevent tagging
buf.append(">").append(ngettext(DUMMY1 + name, DUMMY0 + name + 's', i));
buf.append("</option>\n");
@ -1562,12 +1777,27 @@ public class I2PSnarkServlet extends Default {
/** @since 0.7.14 */
private static String urlify(String s) {
return urlify(s, 100);
}
/** @since 0.9 */
private static String urlify(String s, int max) {
StringBuilder buf = new StringBuilder(256);
// browsers seem to work without doing this but let's be strict
String link = s.replace("&", "&amp;").replace(" ", "%20");
buf.append("<a href=\"").append(link).append("\">").append(link).append("</a>");
String link = urlEncode(s);
String display;
if (s.length() <= max)
display = link;
else
display = urlEncode(s.substring(0, max)) + "&hellip;";
buf.append("<a href=\"").append(link).append("\">").append(display).append("</a>");
return buf.toString();
}
/** @since 0.8.13 */
private static String urlEncode(String s) {
return s.replace(";", "%3B").replace("&", "&amp;").replace(" ", "%20");
}
private static final String DOCTYPE = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
private static final String HEADER_A = "<link href=\"";
@ -1621,7 +1851,7 @@ public class I2PSnarkServlet extends Default {
StringBuilder buf=new StringBuilder(4096);
buf.append(DOCTYPE + "<HTML><HEAD><TITLE>");
String title = URI.decodePath(base);
String title = URIUtil.decodePath(base);
if (title.startsWith("/i2psnark/"))
title = title.substring("/i2psnark/".length());
@ -1700,7 +1930,14 @@ public class I2PSnarkServlet extends Default {
// We don't have the hash of the torrent file
//buf.append("<br>").append(_("Maggot link")).append(": <a href=\"").append(MAGGOT).append(hex).append(':').append(hex).append("\">")
// .append(MAGGOT).append(hex).append(':').append(hex).append("</a>");
buf.append("<br>").append(_("Torrent file")).append(": ").append(snark.getName());
buf.append("</div></th></tr>");
} else {
// shouldn't happen
buf.append("<tr><th>Not found<br>resource=\"").append(r.toString())
.append("\"<br>base=\"").append(base)
.append("\"<br>torrent=\"").append(torrentName)
.append("\"</th></tr>");
}
if (ls == null) {
// We are only showing the torrent info section
@ -1723,7 +1960,7 @@ public class I2PSnarkServlet extends Default {
.append(_("Priority")).append("</th>");
buf.append("</tr></thead>\n");
buf.append("<tr><td colspan=\"" + (showPriority ? '4' : '3') + "\" class=\"ParentDir\"><A HREF=\"");
buf.append(URI.addPaths(base,"../"));
buf.append(URIUtil.addPaths(base,"../"));
buf.append("\"><img alt=\"\" border=\"0\" src=\"" + _imgPath + "up.png\"> ")
.append(_("Up to higher level directory")).append("</A></td></tr>\n");
@ -1733,7 +1970,7 @@ public class I2PSnarkServlet extends Default {
boolean showSaveButton = false;
for (int i=0 ; i< ls.length ; i++)
{
String encoded=URI.encodePath(ls[i]);
String encoded=URIUtil.encodePath(ls[i]);
// bugfix for I2P - Backport from Jetty 6 (zero file lengths and last-modified times)
// http://jira.codehaus.org/browse/JETTY-361?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel#issue-tabs
// See resource.diff attachment
@ -1789,15 +2026,15 @@ public class I2PSnarkServlet extends Default {
}
}
String path=URI.addPaths(base,encoded);
String path=URIUtil.addPaths(base,encoded);
if (item.isDirectory() && !path.endsWith("/"))
path=URI.addPaths(path,"/");
path=URIUtil.addPaths(path,"/");
String icon = toIcon(item);
if (complete) {
buf.append("<a href=\"").append(path).append("\">");
// thumbnail ?
String plc = item.toString().toLowerCase();
String plc = item.toString().toLowerCase(Locale.US);
if (plc.endsWith(".jpg") || plc.endsWith(".jpeg") || plc.endsWith(".png") ||
plc.endsWith(".gif") || plc.endsWith(".ico")) {
buf.append("<img alt=\"\" border=\"0\" class=\"thumb\" src=\"")
@ -1847,7 +2084,7 @@ public class I2PSnarkServlet extends Default {
buf.append("</TR>\n");
}
if (showSaveButton) {
buf.append("<thead><tr><th colspan=\"3\">&nbsp;</th><th align=\"center\"><input type=\"submit\" value=\"");
buf.append("<thead><tr><th colspan=\"3\">&nbsp;</th><th class=\"headerpriority\"><input type=\"submit\" value=\"");
buf.append(_("Save priorities"));
buf.append("\" name=\"foo\" ></th></tr></thead>\n");
}
@ -1877,7 +2114,7 @@ public class I2PSnarkServlet extends Default {
// instead of this mishmash. We can't get to HttpContext.setMimeMapping()
// from here? We could do it from a web.xml perhaps.
// Or could we put our own org/mortbay/http/mime.properties file in the war?
String plc = path.toLowerCase();
String plc = path.toLowerCase(Locale.US);
String mime = getServletContext().getMimeType(path);
if (mime == null)
mime = "";
@ -1919,12 +2156,12 @@ public class I2PSnarkServlet extends Default {
/** @since 0.7.14 */
private static String toImg(String icon) {
return "<img alt=\"\" height=\"16\" width=\"16\" src=\"/i2psnark/_icons/" + icon + ".png\">";
return "<img alt=\"\" height=\"16\" width=\"16\" src=\"/i2psnark/.icons/" + icon + ".png\">";
}
/** @since 0.8.2 */
private static String toImg(String icon, String altText) {
return "<img alt=\"" + altText + "\" height=\"16\" width=\"16\" src=\"/i2psnark/_icons/" + icon + ".png\">";
return "<img alt=\"" + altText + "\" height=\"16\" width=\"16\" src=\"/i2psnark/.icons/" + icon + ".png\">";
}
/** @since 0.8.1 */
@ -2000,7 +2237,21 @@ private static class FetchAndAdd implements Runnable {
try { if (in != null) in.close(); } catch (IOException ioe) {}
}
} else {
_manager.addMessage(_("Torrent was not retrieved from {0}", urlify(_url)));
// Generate a retry link, but sadly can't have a form inside a table
// So make this an ugly GET
StringBuilder buf = new StringBuilder(1024);
// FIXME don't lose peer setting
//String peerParam = req.getParameter("p");
//if (peerParam != null)
// buf.append("<input type=\"hidden\" name=\"p\" value=\"").append(peerParam).append("\" >\n");
buf.append(_("Torrent was not retrieved from {0}", urlify(_url)));
/**** FIXME ticket #575
String link = urlEncode(_url).replace(":", "%3A").replace("/", "%2F");
buf.append(" - [<a href=\"/i2psnark/?newURL=").append(link).append("#add\" >");
buf.append(_("Retry"));
buf.append("</a>]");
****/
_manager.addMessage(buf.toString());
}
} finally {
if (file != null) file.delete();

View File

@ -8,8 +8,6 @@ import net.i2p.util.FileUtil;
import org.mortbay.jetty.Server;
public class RunStandalone {
private Server _server;
static {
System.setProperty("org.mortbay.http.Version.paranoid", "true");
System.setProperty("org.mortbay.xml.XmlParser.NotValidating", "true");
@ -31,6 +29,8 @@ public class RunStandalone {
if (!workDirCreated)
System.err.println("ERROR: Unable to create Jetty temporary work directory");
throw new RuntimeException("unsupported");
/****
try {
_server = new Server("jetty-i2psnark.xml");
// just blow up NPE if we don't have a context
@ -39,13 +39,17 @@ public class RunStandalone {
} catch (Exception e) {
e.printStackTrace();
}
****/
}
public void stop() {
throw new RuntimeException("unsupported");
/****
try {
_server.stop();
} catch (InterruptedException ie) {
ie.printStackTrace();
}
****/
}
}

View File

@ -0,0 +1,988 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the i2psnark package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-02-17 11:41+0000\n"
"PO-Revision-Date: 2012-02-12 20:06+0000\n"
"Last-Translator: Waseihou Watashi <waseihou@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.net/projects/p/I2P/language/cs/)\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
#: ../java/src/org/klomp/snark/SnarkManager.java:355
#, java-format
msgid "Total uploaders limit changed to {0}"
msgstr "Celkový limit sdílečů změněn na {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:357
#, java-format
msgid "Minimum total uploaders limit is {0}"
msgstr "Nejmenší celkový limit sdílečů je {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:369
#, java-format
msgid "Up BW limit changed to {0}KBps"
msgstr "Horní BW limit změněn na {0}KBps"
#: ../java/src/org/klomp/snark/SnarkManager.java:371
#, java-format
msgid "Minimum up bandwidth limit is {0}KBps"
msgstr "Nejmenší horní limit přenosové rychlist je {0}KBps"
#: ../java/src/org/klomp/snark/SnarkManager.java:383
#, java-format
msgid "Startup delay changed to {0}"
msgstr "Prodleva při startu změněna na {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:394
#, java-format
msgid "Refresh time changed to {0}"
msgstr "Doba aktualizace stavu (refresh time) změněna na {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:396
msgid "Refresh disabled"
msgstr "Aktualizace stavu vypnuta"
#: ../java/src/org/klomp/snark/SnarkManager.java:451
msgid "I2CP and tunnel changes will take effect after stopping all torrents"
msgstr "Změny I2CP a tunelu se projeví až po zastavení všech torrentů"
#: ../java/src/org/klomp/snark/SnarkManager.java:455
#, java-format
msgid "I2CP options changed to {0}"
msgstr "Nastavení (options) I2CP změněno na {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:460
msgid "Disconnecting old I2CP destination"
msgstr "Odpojuji se od starého I2CP cíle"
#: ../java/src/org/klomp/snark/SnarkManager.java:462
#, java-format
msgid "I2CP settings changed to {0}"
msgstr "Nastavení (settings) I2CP změněno na {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:467
msgid ""
"Unable to connect with the new settings, reverting to the old I2CP settings"
msgstr "Nemůžu se připojit s novým nastavením I2CP, vracím se k předhozímu."
#: ../java/src/org/klomp/snark/SnarkManager.java:471
msgid "Unable to reconnect with the old settings!"
msgstr "Nemohu se opětovně připojit ani s předchozím nastavením!"
#: ../java/src/org/klomp/snark/SnarkManager.java:473
msgid "Reconnected on the new I2CP destination"
msgstr "Opětovně připojeno k novému I2CP cíli"
#: ../java/src/org/klomp/snark/SnarkManager.java:480
#, java-format
msgid "I2CP listener restarted for \"{0}\""
msgstr "I2CP listener restartován pro \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:492
msgid "New files will be publicly readable"
msgstr "Nové soubory budou veřejně přístupné"
#: ../java/src/org/klomp/snark/SnarkManager.java:494
msgid "New files will not be publicly readable"
msgstr "Nové soubory nebudou veřejně přístupné"
#: ../java/src/org/klomp/snark/SnarkManager.java:501
msgid "Enabled autostart"
msgstr "Automatické spuštění zapnuto"
#: ../java/src/org/klomp/snark/SnarkManager.java:503
msgid "Disabled autostart"
msgstr "Automatické spuštění vypnuto"
#: ../java/src/org/klomp/snark/SnarkManager.java:509
msgid "Enabled open trackers - torrent restart required to take effect."
msgstr "Zapnuto automatické spuštění"
#: ../java/src/org/klomp/snark/SnarkManager.java:511
msgid "Disabled open trackers - torrent restart required to take effect."
msgstr ""
"Otevřené trackery vypnuty - aby se změna projevila je nutné restartovat "
"všechny torrenty"
#: ../java/src/org/klomp/snark/SnarkManager.java:519
msgid "Open Tracker list changed - torrent restart required to take effect."
msgstr ""
"Seznam otevřených trackerů změněn - aby se změna projevila je nutné "
"restartovat všechny torrenty"
#: ../java/src/org/klomp/snark/SnarkManager.java:526
#, java-format
msgid "{0} theme loaded, return to main i2psnark page to view."
msgstr "Téma {0} bylo nahráno, přejděte prosím na hlavní stránku i2snark"
#: ../java/src/org/klomp/snark/SnarkManager.java:533
msgid "Configuration unchanged."
msgstr "Nastavení nebylo změněno."
#: ../java/src/org/klomp/snark/SnarkManager.java:543
#, java-format
msgid "Unable to save the config to {0}"
msgstr "Nemůžu uložit soubor s nastavením do souboru {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:608
msgid "Connecting to I2P"
msgstr "Připojuji se k I2P"
#: ../java/src/org/klomp/snark/SnarkManager.java:611
msgid "Error connecting to I2P - check your I2CP settings!"
msgstr ""
"Při připojování k I2P nastala chyba, zkontrolujte prosím nastavení I2CP!"
#: ../java/src/org/klomp/snark/SnarkManager.java:620
#, java-format
msgid "Error: Could not add the torrent {0}"
msgstr "Chyba: nepodařilo se přidat torrent {0}"
#. catch this here so we don't try do delete it below
#: ../java/src/org/klomp/snark/SnarkManager.java:642
#, java-format
msgid "Cannot open \"{0}\""
msgstr "Nejde otevřít \"{0}\""
#. TODO - if the existing one is a magnet, delete it and add the metainfo instead?
#: ../java/src/org/klomp/snark/SnarkManager.java:661
#: ../java/src/org/klomp/snark/SnarkManager.java:737
#: ../java/src/org/klomp/snark/SnarkManager.java:792
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2048
#, java-format
msgid "Torrent with this info hash is already running: {0}"
msgstr "Torrent s tímto infohašišem již běží: {0}"
#. addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and DHT only.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:668
#, java-format
msgid ""
"Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers "
"only."
msgstr ""
"Varování - v \"{0}\" nebyly nalezeny žádné I2P trackery, budou použity pouze "
"otevrené I2P trackery."
#. addMessage(_("Warning - No I2P trackers in \"{0}\", and DHT and open trackers are disabled, you should enable open trackers or DHT before starting the torrent.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:673
#, java-format
msgid ""
"Warning - No I2P Trackers found in \"{0}\". Make sure Open Tracker is "
"enabled before starting this torrent."
msgstr ""
"Varování - v \"{0}\" nebyly nalezeny žádné I2P trackery, před spuštěním "
"tohoto torrentu se ujistěte že otevřené trackery jsou povoleny."
#: ../java/src/org/klomp/snark/SnarkManager.java:694
#, java-format
msgid "Torrent in \"{0}\" is invalid"
msgstr "Torrent v \"{0}\" je chybný"
#: ../java/src/org/klomp/snark/SnarkManager.java:699
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2070
#, java-format
msgid "ERROR - Out of memory, cannot create torrent from {0}"
msgstr "CHYBA - nedostatek paměti, nemohu vytvořit torrent z {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:711
#, java-format
msgid "Torrent added and started: \"{0}\""
msgstr "Torrent přidán a spuštěn: \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:713
#, java-format
msgid "Torrent added: \"{0}\""
msgstr "Torrent přidán: \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:748
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:499
#, java-format
msgid "Fetching {0}"
msgstr "Získávám {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:751
#, java-format
msgid ""
"We have no saved peers and no other torrents are running. Fetch of {0} will "
"not succeed until you start another torrent."
msgstr ""
"Nejsou uloženi žádní sdíleči a žádné další torrenty neběží. Získání {0} "
"neuspěje dokud nespustíte nějaký další torrent."
#: ../java/src/org/klomp/snark/SnarkManager.java:755
#, java-format
msgid "Adding {0}"
msgstr "Přídávám {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:802
#: ../java/src/org/klomp/snark/SnarkManager.java:825
#: ../java/src/org/klomp/snark/SnarkManager.java:1260
#, java-format
msgid "Failed to copy torrent file to {0}"
msgstr "Chyba: nepodařilo se zkopírovat soubor torrentu do {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:1052
#, java-format
msgid "Too many files in \"{0}\" ({1}), deleting it!"
msgstr "V \"{0}\" ({1}) je příliš mnoho souborů, mažu je!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1054
#, java-format
msgid "Torrent file \"{0}\" cannot end in \".torrent\", deleting it!"
msgstr "Jméno souboru torrentu \"{0}\" nemůže končit na \".torrent\", mažu ho!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1056
#, java-format
msgid "No pieces in \"{0}\", deleting it!"
msgstr "\"{0}\" neobsahuje žádné části, mažu to!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1058
#, java-format
msgid "Too many pieces in \"{0}\", limit is {1}, deleting it!"
msgstr "Příliš mnoho částí v \"{0}\", maximum je {1}, mažu to!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1060
#, java-format
msgid "Pieces are too large in \"{0}\" ({1}B), deleting it."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1061
#, java-format
msgid "Limit is {0}B"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1063
#, java-format
msgid "Torrent \"{0}\" has no data, deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1071
#, java-format
msgid "Torrents larger than {0}B are not supported yet, deleting \"{1}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1087
#, java-format
msgid "Error: Could not remove the torrent {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1108
#: ../java/src/org/klomp/snark/SnarkManager.java:1126
#, java-format
msgid "Torrent stopped: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1147
#, java-format
msgid "Torrent removed: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1155
#, java-format
msgid "Adding torrents in {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1208
#, java-format
msgid "Download finished: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1256
#, java-format
msgid "Metainfo received for {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1257
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:534
#, java-format
msgid "Starting up torrent {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1313
msgid "Unable to connect to I2P!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1319
#, java-format
msgid "Unable to add {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:205
msgid "I2PSnark - Anonymous BitTorrent Client"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:221
msgid "Torrents"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:224
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:231
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1053
msgid "I2PSnark"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:228
msgid "Refresh page"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:233
msgid "Forum"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:251
msgid "Click \"Add torrent\" button to fetch torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:290
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1791
msgid "Status"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:296
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:298
msgid "Hide Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:303
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:305
msgid "Show Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:312
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1708
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1724
msgid "Torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:316
msgid "Estimated time remaining"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:319
msgid "ETA"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:323
msgid "Downloaded"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:326
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:340
msgid "RX"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:330
msgid "Uploaded"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:333
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:350
msgid "TX"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:338
msgid "Down Rate"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:343
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:352
msgid "Rate"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:348
msgid "Up Rate"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:372
msgid "Stop all torrents and the I2P tunnel"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:374
msgid "Stop All"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:383
msgid "Start all torrents and the I2P tunnel"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:385
msgid "Start All"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:404
msgid "No torrents loaded."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:409
msgid "Totals"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:411
#, java-format
msgid "1 torrent"
msgid_plural "{0} torrents"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:414
#, java-format
msgid "1 connected peer"
msgid_plural "{0} connected peers"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:498
msgid "Opening the I2P tunnel"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:505
#, java-format
msgid "Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:553
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:580
#, java-format
msgid "Magnet deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:561
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:586
#, java-format
msgid "Torrent file deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:592
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:603
#, java-format
msgid "Data file deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:594
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:605
#, java-format
msgid "Data file could not be deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:617
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:624
#, java-format
msgid "Data dir deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:663
msgid "Error creating torrent - you must select a tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:678
#, java-format
msgid "Torrent created for \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:680
#, java-format
msgid ""
"Many I2P trackers require you to register new torrents before seeding - "
"please do so before starting \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:682
#, java-format
msgid "Error creating a torrent for \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:685
#, java-format
msgid "Cannot create a torrent for the nonexistent data: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:688
msgid "Error creating torrent - you must enter a file or directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:691
msgid "Stopping all torrents and closing the I2P tunnel."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:702
msgid "I2P tunnel closed."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:705
msgid "Opening the I2P tunnel and starting all torrents."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:827
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:832
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:838
msgid "Tracker Error"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:830
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:834
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:846
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:850
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:858
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:862
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:867
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:871
#, java-format
msgid "1 peer"
msgid_plural "{0} peers"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:843
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:848
msgid "Seeding"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:852
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1730
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1842
msgid "Complete"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:855
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:860
msgid "OK"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:864
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:869
msgid "Stalled"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:873
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:876
msgid "No Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:878
msgid "Stopped"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:911
msgid "Torrent details"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:923
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1187
msgid "Info"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:938
msgid "View files"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:940
msgid "Open file"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:982
msgid "Stop the torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:984
msgid "Stop"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:994
msgid "Start the torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:996
msgid "Start"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1007
msgid "Remove the torrent from the active list, deleting the .torrent file"
msgstr ""
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1012
#, java-format
msgid ""
"Are you sure you want to delete the file \\''{0}.torrent\\'' (downloaded "
"data will not be deleted) ?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1015
msgid "Remove"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1026
msgid "Delete the .torrent file and the associated data file(s)"
msgstr ""
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1031
#, java-format
msgid ""
"Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded "
"data?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1034
msgid "Delete"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1069
msgid "Unknown"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1081
msgid "Seed"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1104
msgid "Uninteresting (The peer has no pieces we need)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1106
msgid "Choked (The peer is not allowing us to request pieces)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1126
msgid "Uninterested (We have no pieces the peer needs)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1128
msgid "Choking (We are not allowing the peer to request pieces)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1186
#, java-format
msgid "Details at {0} tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1216
msgid "Add Torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1218
msgid "From URL"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1221
msgid ""
"Enter the torrent file download URL (I2P only), magnet link, or maggot link"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1226
msgid "Add torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1229
#, java-format
msgid "You can also copy .torrent files to: {0}."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1231
msgid "Removing a .torrent will cause it to stop."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1254
msgid "Create Torrent"
msgstr ""
#. out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1257
msgid "Data to seed"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1261
msgid "File or directory to seed (must be within the specified path)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1263
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1749
msgid "Tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1265
msgid "Select a tracker"
msgstr ""
#. out.write(_("Open trackers and DHT only"));
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1270
msgid "Open trackers only"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1285
msgid "or"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1288
msgid "Specify custom tracker announce URL"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1291
msgid "Create torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1312
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1480
msgid "Configuration"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1316
msgid "Data directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1318
msgid "Edit i2psnark.config and restart to change"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1322
msgid "Files readable by all"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1326
msgid "If checked, other users may access the downloaded files"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1330
msgid "Auto start"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1334
msgid "If checked, automatically start torrents that are added"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1338
msgid "Theme"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1351
msgid "Refresh time"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1364
msgid "Never"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1370
msgid "Startup delay"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1372
msgid "minutes"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1396
msgid "Total uploader limit"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1399
msgid "peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1403
msgid "Up bandwidth limit"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1406
msgid "Half available bandwidth recommended."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1408
msgid "View or change router bandwidth"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1412
msgid "Use open trackers also"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1416
msgid ""
"If checked, announce torrents to open trackers as well as the tracker listed "
"in the torrent file"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1420
msgid "Open tracker announce URLs"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1432
msgid "Inbound Settings"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1438
msgid "Outbound Settings"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1446
msgid "I2CP host"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1451
msgid "I2CP port"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1466
msgid "I2CP options"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1471
msgid "Save configuration"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1496
#, java-format
msgid "Invalid magnet URL {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1530
#, java-format
msgid "Invalid info hash in magnet URL {0}"
msgstr ""
#. * dummies for translation
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1560
#, java-format
msgid "1 hop"
msgid_plural "{0} hops"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1561
#, java-format
msgid "1 tunnel"
msgid_plural "{0} tunnels"
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1728
msgid "Completion"
msgstr ""
#. else unknown
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1732
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1788
msgid "Size"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1737
msgid "Files"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1739
msgid "Pieces"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1740
msgid "Piece size"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1762
msgid "Magnet link"
msgstr ""
#. We don't have the hash of the torrent file
#. buf.append("<br>").append(_("Maggot link")).append(": <a href=\"").append(MAGGOT).append(hex).append(':').append(hex).append("\">")
#. .append(MAGGOT).append(hex).append(':').append(hex).append("</a>");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1768
msgid "Torrent file"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1786
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1825
msgid "Directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1795
msgid "Priority"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1800
msgid "Up to higher level directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1830
msgid "Torrent not found?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1839
msgid "File not found in torrent?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1852
msgid "complete"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1853
msgid "bytes remaining"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1878
msgid "Open"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1904
msgid "High"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1909
msgid "Normal"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1914
msgid "Skip"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1923
msgid "Save priorities"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2039
#, java-format
msgid "Torrent fetched from {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2060
#, java-format
msgid "Torrent already running: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2062
#, java-format
msgid "Torrent already in the queue: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2068
#, java-format
msgid "Torrent at {0} was not valid"
msgstr ""
#. FIXME don't lose peer setting
#. String peerParam = req.getParameter("p");
#. if (peerParam != null)
#. buf.append("<input type=\"hidden\" name=\"p\" value=\"").append(peerParam).append("\" >\n");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2082
#, java-format
msgid "Torrent was not retrieved from {0}"
msgstr ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: I2P i2psnark\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-03-25 12:48+0000\n"
"PO-Revision-Date: 2011-04-11 15:45+0100\n"
"POT-Creation-Date: 2011-07-08 13:20+0000\n"
"PO-Revision-Date: 2011-05-19 07:39+0100\n"
"Last-Translator: magma <magma@mail.i2p>\n"
"Language-Team: foo <foo@bar>\n"
"Language: \n"
@ -46,7 +46,9 @@ msgstr "Délai de démarrage modifié à {0} minutes"
#: ../java/src/org/klomp/snark/SnarkManager.java:386
msgid "I2CP and tunnel changes will take effect after stopping all torrents"
msgstr "Les modifications d'I2CP et des tunnels seront prise en compte après avoir arrêté tous les torrents"
msgstr ""
"Les modifications d'I2CP et des tunnels seront prise en compte après avoir "
"arrêté tous les torrents"
#: ../java/src/org/klomp/snark/SnarkManager.java:393
msgid "Disconnecting old I2CP destination"
@ -58,8 +60,11 @@ msgid "I2CP settings changed to {0}"
msgstr "Les paramètres I2CP ont été changés : {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:402
msgid "Unable to connect with the new settings, reverting to the old I2CP settings"
msgstr "Impossible de se connecter avec les nouveaux paramètres, retour à l'ancienne configuration I2CP"
msgid ""
"Unable to connect with the new settings, reverting to the old I2CP settings"
msgstr ""
"Impossible de se connecter avec les nouveaux paramètres, retour à l'ancienne "
"configuration I2CP"
#: ../java/src/org/klomp/snark/SnarkManager.java:406
msgid "Unable to reconnect with the old settings!"
@ -84,20 +89,27 @@ msgstr "Démarrage automatique désactivé"
#: ../java/src/org/klomp/snark/SnarkManager.java:437
msgid "Enabled open trackers - torrent restart required to take effect."
msgstr "Open trackers activés - redémarrage des torrents requis pour prise en compte."
msgstr ""
"Open trackers activés - redémarrage des torrents requis pour prise en compte."
#: ../java/src/org/klomp/snark/SnarkManager.java:439
msgid "Disabled open trackers - torrent restart required to take effect."
msgstr "Open trackers désactivés - redémarrage des torrents requis pour prise en compte."
msgstr ""
"Open trackers désactivés - redémarrage des torrents requis pour prise en "
"compte."
#: ../java/src/org/klomp/snark/SnarkManager.java:447
msgid "Open Tracker list changed - torrent restart required to take effect."
msgstr "Liste des Open trackers modifiée - redémarrage des torrents requis pour prise en compte"
msgstr ""
"Liste des Open trackers modifiée - redémarrage des torrents requis pour "
"prise en compte"
#: ../java/src/org/klomp/snark/SnarkManager.java:454
#, java-format
msgid "{0} theme loaded, return to main i2psnark page to view."
msgstr "Thème {0} chargé, revenez à la page d''accueil d''i2psnark pour voir comme il est beau !"
msgstr ""
"Thème {0} chargé, revenez à la page d''accueil d''i2psnark pour voir comme "
"il est beau !"
#: ../java/src/org/klomp/snark/SnarkManager.java:461
msgid "Configuration unchanged."
@ -131,7 +143,7 @@ msgstr "Impossible douvrir: \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:589
#: ../java/src/org/klomp/snark/SnarkManager.java:665
#: ../java/src/org/klomp/snark/SnarkManager.java:720
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1976
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1978
#, java-format
msgid "Torrent with this info hash is already running: {0}"
msgstr "Un torrent avec cette empreinte est déjà actif: {0}"
@ -139,14 +151,22 @@ msgstr "Un torrent avec cette empreinte est déjà actif: {0}"
#. addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and DHT only.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:596
#, java-format
msgid "Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers only."
msgstr "Attention - Les trackers non-i2p dans \"{0}\" sont ignorés, seuls les trackers ouverts I2P seront utilisés!"
msgid ""
"Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers "
"only."
msgstr ""
"Attention - Les trackers non-i2p dans \"{0}\" sont ignorés, seuls les "
"trackers ouverts I2P seront utilisés!"
#. addMessage(_("Warning - No I2P trackers in \"{0}\", and DHT and open trackers are disabled, you should enable open trackers or DHT before starting the torrent.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:601
#, java-format
msgid "Warning - No I2P Trackers found in \"{0}\". Make sure Open Tracker is enabled before starting this torrent."
msgstr "Attention - aucun tracker i2p dans \"{0}\". Vous devez activer les open trackers avant de démarrer le torrent!"
msgid ""
"Warning - No I2P Trackers found in \"{0}\". Make sure Open Tracker is "
"enabled before starting this torrent."
msgstr ""
"Attention - aucun tracker i2p dans \"{0}\". Vous devez activer les open "
"trackers avant de démarrer le torrent!"
#: ../java/src/org/klomp/snark/SnarkManager.java:622
#, java-format
@ -154,7 +174,7 @@ msgid "Torrent in \"{0}\" is invalid"
msgstr "Le torrent dans \"{0}\" est invalide"
#: ../java/src/org/klomp/snark/SnarkManager.java:627
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1998
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2000
#, java-format
msgid "ERROR - Out of memory, cannot create torrent from {0}"
msgstr "ERREUR - Mémoire insuffisante, impossible de créer le torrent de {0}"
@ -177,8 +197,12 @@ msgstr "Envoi {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:679
#, java-format
msgid "We have no saved peers and no other torrents are running. Fetch of {0} will not succeed until you start another torrent."
msgstr "Aucun pair sauvegardé et aucun autre torrent en cours. Le téléchargement de {0} ne commencera que lorsque vous démarrerez un autre torrent."
msgid ""
"We have no saved peers and no other torrents are running. Fetch of {0} will "
"not succeed until you start another torrent."
msgstr ""
"Aucun pair sauvegardé et aucun autre torrent en cours. Le téléchargement de "
"{0} ne commencera que lorsque vous démarrerez un autre torrent."
#: ../java/src/org/klomp/snark/SnarkManager.java:683
#, java-format
@ -187,7 +211,7 @@ msgstr "Ajout {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:730
#: ../java/src/org/klomp/snark/SnarkManager.java:753
#: ../java/src/org/klomp/snark/SnarkManager.java:1178
#: ../java/src/org/klomp/snark/SnarkManager.java:1180
#, java-format
msgid "Failed to copy torrent file to {0}"
msgstr "Impossible de copier le torrent vers {0}"
@ -200,7 +224,9 @@ msgstr "Trop de fichiers dans \"{0}\" ({1}), suppression! "
#: ../java/src/org/klomp/snark/SnarkManager.java:978
#, java-format
msgid "Torrent file \"{0}\" cannot end in \".torrent\", deleting it!"
msgstr "Le fichier torrent \"{0}\" ne peut pas se terminer par \".torrent\", suppression!"
msgstr ""
"Le fichier torrent \"{0}\" ne peut pas se terminer par \".torrent\", "
"suppression!"
#: ../java/src/org/klomp/snark/SnarkManager.java:980
#, java-format
@ -222,53 +248,60 @@ msgstr "Les tronçons sont trop larges dans \"{0}\" ({1}B), suppression."
msgid "Limit is {0}B"
msgstr "La limite est de \"{0}\"octets"
#: ../java/src/org/klomp/snark/SnarkManager.java:993
#: ../java/src/org/klomp/snark/SnarkManager.java:987
#, java-format
msgid "Torrent \"{0}\" has no data, deleting it!"
msgstr "Le fichier torrent \"{0}\" n'a pas de données, suppression!"
#: ../java/src/org/klomp/snark/SnarkManager.java:995
#, java-format
msgid "Torrents larger than {0}B are not supported yet, deleting \"{1}\""
msgstr "Les torrents dont la taille est supérieure à \"{0}\"octets ne sont pas encore supportés, suppression \"{1}\"."
msgstr ""
"Les torrents dont la taille est supérieure à \"{0}\"octets ne sont pas "
"encore supportés, suppression \"{1}\"."
#: ../java/src/org/klomp/snark/SnarkManager.java:1009
#: ../java/src/org/klomp/snark/SnarkManager.java:1011
#, java-format
msgid "Error: Could not remove the torrent {0}"
msgstr "Erreur: Impossible de supprimer le torrent \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:1030
#: ../java/src/org/klomp/snark/SnarkManager.java:1048
#: ../java/src/org/klomp/snark/SnarkManager.java:1032
#: ../java/src/org/klomp/snark/SnarkManager.java:1050
#, java-format
msgid "Torrent stopped: \"{0}\""
msgstr "Torrent arrêté:\"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:1069
#: ../java/src/org/klomp/snark/SnarkManager.java:1071
#, java-format
msgid "Torrent removed: \"{0}\""
msgstr "Torrent supprimé:\"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:1077
#: ../java/src/org/klomp/snark/SnarkManager.java:1079
#, java-format
msgid "Adding torrents in {0}"
msgstr "Ajout des torrents dans {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:1126
#: ../java/src/org/klomp/snark/SnarkManager.java:1128
#, java-format
msgid "Download finished: {0}"
msgstr "Téléchargement terminé:\"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:1174
#: ../java/src/org/klomp/snark/SnarkManager.java:1176
#, java-format
msgid "Metainfo received for {0}"
msgstr "Metainfo reçue pour {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:1175
#: ../java/src/org/klomp/snark/SnarkManager.java:1177
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:526
#, java-format
msgid "Starting up torrent {0}"
msgstr "Démarrage du torrent {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:1229
#: ../java/src/org/klomp/snark/SnarkManager.java:1231
msgid "Unable to connect to I2P!"
msgstr "Impossible de se connecter à I2P!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1235
#: ../java/src/org/klomp/snark/SnarkManager.java:1237
#, java-format
msgid "Unable to add {0}"
msgstr "Impossible dajouter {0}"
@ -296,7 +329,7 @@ msgid "Forum"
msgstr "Forum"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:284
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1719
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1721
msgid "Status"
msgstr "État"
@ -311,8 +344,8 @@ msgid "Show Peers"
msgstr "Afficher les pairs"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:306
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1643
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1659
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1645
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1661
msgid "Torrent"
msgstr "Torrent"
@ -402,7 +435,8 @@ msgstr[1] "{0} pairs connectés"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:497
#, java-format
msgid "Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\""
msgstr "URL incorrecte - elle doit débuter par \"http://\", \"{0}\", ou \"{1}\""
msgstr ""
"URL incorrecte - elle doit débuter par \"http://\", \"{0}\", ou \"{1}\""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:545
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:572
@ -435,7 +469,8 @@ msgstr "Répertoire des données effacé: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:638
msgid "Error creating torrent - you must select a tracker"
msgstr "Erreur lors de la création du torrent - vous devez sélectionner un tracker"
msgstr ""
"Erreur lors de la création du torrent - vous devez sélectionner un tracker"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:653
#, java-format
@ -444,8 +479,12 @@ msgstr "Torrent créé pour \"{0}\""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:655
#, java-format
msgid "Many I2P trackers require you to register new torrents before seeding - please do so before starting \"{0}\""
msgstr "De nombreux trackers I2P nécessitent denregistrer les nouveaux torrents avant de seeder - faites-le avant de démarrer \"{0}\"!"
msgid ""
"Many I2P trackers require you to register new torrents before seeding - "
"please do so before starting \"{0}\""
msgstr ""
"De nombreux trackers I2P nécessitent denregistrer les nouveaux torrents "
"avant de seeder - faites-le avant de démarrer \"{0}\"!"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:657
#, java-format
@ -459,7 +498,8 @@ msgstr "Impossible de créer un torrent pour des données inexistantes: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:663
msgid "Error creating torrent - you must enter a file or directory"
msgstr "Erreur de création du torrent - vous devez saisir un fichier ou un répertoire"
msgstr ""
"Erreur de création du torrent - vous devez saisir un fichier ou un répertoire"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:666
msgid "Stopping all torrents and closing the I2P tunnel."
@ -499,8 +539,8 @@ msgid "Seeding"
msgstr "Seed en cours"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:828
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1665
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1770
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1667
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1772
msgid "Complete"
msgstr "Complet"
@ -528,7 +568,7 @@ msgid "Torrent details"
msgstr "Détails du torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:898
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1160
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1162
msgid "Info"
msgstr "Info"
@ -565,8 +605,12 @@ msgstr "Enlever le torrent de la liste active, suprression du fichier .torrent"
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:987
#, java-format
msgid "Are you sure you want to delete the file \\''{0}.torrent\\'' (downloaded data will not be deleted) ?"
msgstr "Êtes-vous certain de vouloir supprimer le fichier \\''{0}.torrent\\'' (les données déjà téléchargées ne seront pas supprimées) ?"
msgid ""
"Are you sure you want to delete the file \\''{0}.torrent\\'' (downloaded "
"data will not be deleted) ?"
msgstr ""
"Êtes-vous certain de vouloir supprimer le fichier \\''{0}.torrent\\'' (les "
"données déjà téléchargées ne seront pas supprimées) ?"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:990
msgid "Remove"
@ -574,370 +618,402 @@ msgstr "Enlever"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1001
msgid "Delete the .torrent file and the associated data file(s)"
msgstr "Supprimer le fichier .torrent et le(s) fichier(s) de données associé(s)"
msgstr ""
"Supprimer le fichier .torrent et le(s) fichier(s) de données associé(s)"
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1006
#, java-format
msgid "Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded data?"
msgstr "Êtes-vous certain de vouloir supprimer le torrent \\''{0}\\'' ainsi que toutes les données téléchargées ?"
msgid ""
"Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded "
"data?"
msgstr ""
"Êtes-vous certain de vouloir supprimer le torrent \\''{0}\\'' ainsi que "
"toutes les données téléchargées ?"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1009
msgid "Delete"
msgstr "Supprimer"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1042
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1044
msgid "Unknown"
msgstr "Inconnu"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1054
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1056
msgid "Seed"
msgstr "Seed"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1077
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1079
msgid "Uninteresting (The peer has no pieces we need)"
msgstr "Aucun intérêt (le pair n'a aucun tronçon utile)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1079
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1081
msgid "Choked (The peer is not allowing us to request pieces)"
msgstr "bridé (le pair ne nous permet pas de demander des tronçons)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1099
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1101
msgid "Uninterested (We have no pieces the peer needs)"
msgstr "Pas intéressé (aucun tronçon utile au pair)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1101
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1103
msgid "Choking (We are not allowing the peer to request pieces)"
msgstr "bridage (nous ne permettons pas au pair de demander un tronçon)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1159
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1161
#, java-format
msgid "Details at {0} tracker"
msgstr "Détails au tracker {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1188
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1190
msgid "Add Torrent"
msgstr "Ajouter torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1190
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1192
msgid "From URL"
msgstr "Depuis l'URL"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1193
msgid "Enter the torrent file download URL (I2P only), magnet link, or maggot link"
msgstr "Entrez l'URL (I2P uniquement) de téléchargement du fichier torrent, du lien magnet ou maggot."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1195
msgid ""
"Enter the torrent file download URL (I2P only), magnet link, or maggot link"
msgstr ""
"Entrez l'URL (I2P uniquement) de téléchargement du fichier torrent, du lien "
"magnet ou maggot."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1198
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1200
msgid "Add torrent"
msgstr "Ajouter torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1201
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1203
#, java-format
msgid "You can also copy .torrent files to: {0}."
msgstr "Vous pouvez aussi copier les fichiers .torrent vers {0}."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1203
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1205
msgid "Removing a .torrent will cause it to stop."
msgstr "La suppression d'un fichier .torrent entraîne l'arrêt du torrent."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1226
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1228
msgid "Create Torrent"
msgstr "Créer torrent"
#. out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1229
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1231
msgid "Data to seed"
msgstr "Données à seeder"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1233
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1235
msgid "File or directory to seed (must be within the specified path)"
msgstr "Fichier ou répertoire à seeder (doit être dans le chemin spécifié)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1235
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1684
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1237
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1686
msgid "Tracker"
msgstr "Tracker"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1237
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1239
msgid "Select a tracker"
msgstr "Sélectionner un tracker"
#. out.write(_("Open trackers and DHT only"));
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1242
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1244
msgid "Open trackers only"
msgstr "Trackers ouverts seulement"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1257
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1259
msgid "or"
msgstr "ou"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1260
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1262
msgid "Specify custom tracker announce URL"
msgstr "Spécifier une URL d'annonce de tracker personnalisé"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1263
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1265
msgid "Create torrent"
msgstr "Créer torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1281
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1420
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1283
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1422
msgid "Configuration"
msgstr "Configuration"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1285
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1287
msgid "Data directory"
msgstr "Répertoire de données"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1287
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1289
msgid "Edit i2psnark.config and restart to change"
msgstr "Editez i2psnark.config et redémarrez pour prendre en compte les modifications"
msgstr ""
"Editez i2psnark.config et redémarrez pour prendre en compte les modifications"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1291
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1293
msgid "Auto start"
msgstr "Démarrage automatique"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1295
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1297
msgid "If checked, automatically start torrents that are added"
msgstr "Si coché, les torrents démarreront automatiquement lors de l'ajout"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1299
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1301
msgid "Theme"
msgstr "Thème"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1312
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1314
msgid "Startup delay"
msgstr "Délais de démarrage"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1314
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1316
msgid "minutes"
msgstr "minutes"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1338
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1340
msgid "Total uploader limit"
msgstr "Limite totale d'envoi"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1341
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1343
msgid "peers"
msgstr "pairs"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1345
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1347
msgid "Up bandwidth limit"
msgstr "Limite de bande passante en envoi"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1348
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1350
msgid "Half available bandwidth recommended."
msgstr "La moitié de la bande passante est recommandée."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1350
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1352
msgid "View or change router bandwidth"
msgstr "Consulter ou modifier la bande passante du routeur"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1354
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1356
msgid "Use open trackers also"
msgstr "Utiliser les open trackers aussi"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1358
msgid "If checked, announce torrents to open trackers as well as the tracker listed in the torrent file"
msgstr "Si coché, les torrents seront annoncés vers les open trackers ainsi que vers les trackers indiqués dans le fichier torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1360
msgid ""
"If checked, announce torrents to open trackers as well as the tracker listed "
"in the torrent file"
msgstr ""
"Si coché, les torrents seront annoncés vers les open trackers ainsi que vers "
"les trackers indiqués dans le fichier torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1362
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1364
msgid "Open tracker announce URLs"
msgstr "URLs d'annonce open tracker"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1374
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1376
msgid "Inbound Settings"
msgstr "Paramètres entrants"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1380
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1382
msgid "Outbound Settings"
msgstr "Paramètres sortants"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1388
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1390
msgid "I2CP host"
msgstr "Hôte I2CP"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1393
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1395
msgid "I2CP port"
msgstr "Port I2CP"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1406
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1408
msgid "I2CP options"
msgstr "Options I2CP"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1411
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1413
msgid "Save configuration"
msgstr "Sauvegarder la configuration"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1436
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1438
#, java-format
msgid "Invalid magnet URL {0}"
msgstr "URL magnet {0} incorrecte"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1470
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1472
#, java-format
msgid "Invalid info hash in magnet URL {0}"
msgstr "Info d'empreinte incorrecte dans l'URL magnet {0}"
#. * dummies for translation
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1500
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1502
#, java-format
msgid "1 hop"
msgid_plural "{0} hops"
msgstr[0] "{0} saut"
msgstr[1] "{0} sauts"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1501
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1503
#, java-format
msgid "1 tunnel"
msgid_plural "{0} tunnels"
msgstr[0] "{0} tunnel"
msgstr[1] "{0} tunnels"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1663
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1665
msgid "Completion"
msgstr "Finalisation"
#. else unknown
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1667
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1716
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1669
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1718
msgid "Size"
msgstr "Taille"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1672
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1674
msgid "Files"
msgstr "Fichiers"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1674
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1676
msgid "Pieces"
msgstr "Tronçons"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1675
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1677
msgid "Piece size"
msgstr "Taille des tronçons"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1697
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1699
msgid "Magnet link"
msgstr "Lien magnet"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1714
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1753
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1716
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1755
msgid "Directory"
msgstr "Répertoire"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1723
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1725
msgid "Priority"
msgstr "Priorité"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1728
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1730
msgid "Up to higher level directory"
msgstr "Vers le répertoire parent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1758
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1760
msgid "Torrent not found?"
msgstr "Torrent non trouvé?"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1767
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1769
msgid "File not found in torrent?"
msgstr "Fichier non trouvé dans le torrent?"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1780
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1782
msgid "complete"
msgstr "complet"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1781
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1783
msgid "bytes remaining"
msgstr "Octets restants"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1806
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1808
msgid "Open"
msgstr "Ouvrir le fichier"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1832
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1834
msgid "High"
msgstr "Haut"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1837
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1839
msgid "Normal"
msgstr "Normal"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1842
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1844
msgid "Skip"
msgstr "Ignorer"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1851
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1853
msgid "Save priorities"
msgstr "Sauvegarder les priorités"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1967
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1969
#, java-format
msgid "Torrent fetched from {0}"
msgstr "Torrent reçu de {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1988
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1990
#, java-format
msgid "Torrent already running: {0}"
msgstr "Torrent déjà actif: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1990
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1992
#, java-format
msgid "Torrent already in the queue: {0}"
msgstr "Torrent déjà dans la file d''attente: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1996
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1998
#, java-format
msgid "Torrent at {0} was not valid"
msgstr "Le torrent {0} est invalide"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2003
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2005
#, java-format
msgid "Torrent was not retrieved from {0}"
msgstr "Le torrent na pas été reçu de {0}"
#~ msgid "Torrent file must originate from an I2P-based tracker"
#~ msgstr "Le fichier torrent doit provenir d'un tracker I2P"
#~ msgid "size: {0}B"
#~ msgstr "Taille: {0}Octets"
#~ msgid "Estimated Download Time"
#~ msgstr "Temps estimé de téléchargement"
#~ msgid "Torrent file {0} does not exist"
#~ msgstr "Le fichier torrent {0} n'existe pas"
#~ msgid "Copying torrent to {0}"
#~ msgstr "Copie du torrent vers {0}"
#~ msgid "from {0}"
#~ msgstr "depuis {0}"
#~ msgid "Downloading"
#~ msgstr "Téléchargement en cours"
#~ msgid "FileSize"
#~ msgstr "Taille du fichier"
#~ msgid "Download Status"
#~ msgstr "État du téléchargement"
#~ msgid "Details"
#~ msgstr "Détails"
#~ msgid "Depuis l'URL"
#~ msgstr "Quell-URL"
#~ msgid "Directory to store torrents and data"
#~ msgstr "Répertoire de stockage des torrents et des données"
#~ msgid "Cannot change the I2CP settings while torrents are active"
#~ msgstr ""
#~ "On ne peut changer les paramètres I2CP pendant que des torrents sont "
#~ "actifs"
#~ msgid "Non-i2p tracker in \"{0}\", deleting it from our list of trackers!"
#~ msgstr ""
#~ "Tracker non-i2p dans \"{0}\", suppression de notre liste de trackers!"
#~ msgid "{0} torrents"
#~ msgstr "{0} Torrents"
#~ msgid "Uninteresting"
#~ msgstr "Pas intéressant"
#~ msgid "Choked"
#~ msgstr "Choked"
#~ msgid "Uninterested"
#~ msgstr "Pas interessé"
#~ msgid "Choking"
#~ msgstr "Choking"
#~ msgid "Custom tracker URL"
#~ msgstr "URL tracker spécifique"
#~ msgid "Configure"
#~ msgstr "Configurer"

View File

@ -0,0 +1,951 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the i2psnark package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-09-23 19:47+0000\n"
"PO-Revision-Date: 2011-06-11 09:17+0000\n"
"Last-Translator: duck <duck@mail.i2p>\n"
"Language-Team: Italian (http://www.transifex.net/projects/p/I2P/team/it/)\n"
"Language: it\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"
#: ../java/src/org/klomp/snark/SnarkManager.java:355
#, java-format
msgid "Total uploaders limit changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:357
#, java-format
msgid "Minimum total uploaders limit is {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:369
#, java-format
msgid "Up BW limit changed to {0}KBps"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:371
#, java-format
msgid "Minimum up bandwidth limit is {0}KBps"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:383
#, java-format
msgid "Startup delay changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:394
#, java-format
msgid "Refresh time changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:396
msgid "Refresh disabled"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:451
msgid "I2CP and tunnel changes will take effect after stopping all torrents"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:455
#, java-format
msgid "I2CP options changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:460
msgid "Disconnecting old I2CP destination"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:462
#, java-format
msgid "I2CP settings changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:467
msgid ""
"Unable to connect with the new settings, reverting to the old I2CP settings"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:471
msgid "Unable to reconnect with the old settings!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:473
msgid "Reconnected on the new I2CP destination"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:480
#, java-format
msgid "I2CP listener restarted for \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:492
msgid "New files will be publicly readable"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:494
msgid "New files will not be publicly readable"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:501
msgid "Enabled autostart"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:503
msgid "Disabled autostart"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:509
msgid "Enabled open trackers - torrent restart required to take effect."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:511
msgid "Disabled open trackers - torrent restart required to take effect."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:519
msgid "Open Tracker list changed - torrent restart required to take effect."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:526
#, java-format
msgid "{0} theme loaded, return to main i2psnark page to view."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:533
msgid "Configuration unchanged."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:543
#, java-format
msgid "Unable to save the config to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:608
msgid "Connecting to I2P"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:611
msgid "Error connecting to I2P - check your I2CP settings!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:620
#, java-format
msgid "Error: Could not add the torrent {0}"
msgstr ""
#. catch this here so we don't try do delete it below
#: ../java/src/org/klomp/snark/SnarkManager.java:642
#, java-format
msgid "Cannot open \"{0}\""
msgstr ""
#. TODO - if the existing one is a magnet, delete it and add the metainfo instead?
#: ../java/src/org/klomp/snark/SnarkManager.java:661
#: ../java/src/org/klomp/snark/SnarkManager.java:737
#: ../java/src/org/klomp/snark/SnarkManager.java:792
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2015
#, java-format
msgid "Torrent with this info hash is already running: {0}"
msgstr ""
#. addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and DHT only.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:668
#, java-format
msgid ""
"Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers "
"only."
msgstr ""
#. addMessage(_("Warning - No I2P trackers in \"{0}\", and DHT and open trackers are disabled, you should enable open trackers or DHT before starting the torrent.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:673
#, java-format
msgid ""
"Warning - No I2P Trackers found in \"{0}\". Make sure Open Tracker is "
"enabled before starting this torrent."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:694
#, java-format
msgid "Torrent in \"{0}\" is invalid"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:699
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2037
#, java-format
msgid "ERROR - Out of memory, cannot create torrent from {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:711
#, java-format
msgid "Torrent added and started: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:713
#, java-format
msgid "Torrent added: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:748
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:493
#, java-format
msgid "Fetching {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:751
#, java-format
msgid ""
"We have no saved peers and no other torrents are running. Fetch of {0} will "
"not succeed until you start another torrent."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:755
#, java-format
msgid "Adding {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:802
#: ../java/src/org/klomp/snark/SnarkManager.java:825
#: ../java/src/org/klomp/snark/SnarkManager.java:1260
#, java-format
msgid "Failed to copy torrent file to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1052
#, java-format
msgid "Too many files in \"{0}\" ({1}), deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1054
#, java-format
msgid "Torrent file \"{0}\" cannot end in \".torrent\", deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1056
#, java-format
msgid "No pieces in \"{0}\", deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1058
#, java-format
msgid "Too many pieces in \"{0}\", limit is {1}, deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1060
#, java-format
msgid "Pieces are too large in \"{0}\" ({1}B), deleting it."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1061
#, java-format
msgid "Limit is {0}B"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1063
#, java-format
msgid "Torrent \"{0}\" has no data, deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1071
#, java-format
msgid "Torrents larger than {0}B are not supported yet, deleting \"{1}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1087
#, java-format
msgid "Error: Could not remove the torrent {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1108
#: ../java/src/org/klomp/snark/SnarkManager.java:1126
#, java-format
msgid "Torrent stopped: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1147
#, java-format
msgid "Torrent removed: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1155
#, java-format
msgid "Adding torrents in {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1208
#, java-format
msgid "Download finished: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1256
#, java-format
msgid "Metainfo received for {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1257
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:528
#, java-format
msgid "Starting up torrent {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1313
msgid "Unable to connect to I2P!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1319
#, java-format
msgid "Unable to add {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:204
msgid "I2PSnark - Anonymous BitTorrent Client"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:220
msgid "Torrents"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:223
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:230
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1033
msgid "I2PSnark"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:227
msgid "Refresh page"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:232
msgid "Forum"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:286
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1758
msgid "Status"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:292
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:294
msgid "Hide Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:299
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:301
msgid "Show Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:308
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1682
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1698
msgid "Torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:312
msgid "Estimated time remaining"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:315
msgid "ETA"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:319
msgid "Downloaded"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:322
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:336
msgid "RX"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:326
msgid "Uploaded"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:329
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:346
msgid "TX"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:334
msgid "Down Rate"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:339
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:348
msgid "Rate"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:344
msgid "Up Rate"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:368
msgid "Stop all torrents and the I2P tunnel"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:370
msgid "Stop All"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:379
msgid "Start all torrents and the I2P tunnel"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:381
msgid "Start All"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:400
msgid "No torrents loaded."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:405
msgid "Totals"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:407
#, java-format
msgid "1 torrent"
msgid_plural "{0} torrents"
msgstr[0] ""
msgstr[1] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:410
#, java-format
msgid "1 connected peer"
msgid_plural "{0} connected peers"
msgstr[0] ""
msgstr[1] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:499
#, java-format
msgid "Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:547
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:574
#, java-format
msgid "Magnet deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:555
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:580
#, java-format
msgid "Torrent file deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:586
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:596
#, java-format
msgid "Data file deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:588
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:598
#, java-format
msgid "Data file could not be deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:607
#, java-format
msgid "Data dir deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:644
msgid "Error creating torrent - you must select a tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:659
#, java-format
msgid "Torrent created for \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:661
#, java-format
msgid ""
"Many I2P trackers require you to register new torrents before seeding - "
"please do so before starting \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:663
#, java-format
msgid "Error creating a torrent for \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:666
#, java-format
msgid "Cannot create a torrent for the nonexistent data: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:669
msgid "Error creating torrent - you must enter a file or directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:672
msgid "Stopping all torrents and closing the I2P tunnel."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:683
msgid "I2P tunnel closed."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:686
msgid "Opening the I2P tunnel and starting all torrents."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:808
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:813
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:819
msgid "Tracker Error"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:811
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:815
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:827
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:831
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:839
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:843
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:848
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:852
#, java-format
msgid "1 peer"
msgid_plural "{0} peers"
msgstr[0] ""
msgstr[1] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:824
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:829
msgid "Seeding"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:833
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1704
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1809
msgid "Complete"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:836
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:841
msgid "OK"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:845
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:850
msgid "Stalled"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:854
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:857
msgid "No Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:859
msgid "Stopped"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:891
msgid "Torrent details"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:903
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1167
msgid "Info"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:918
msgid "View files"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:920
msgid "Open file"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:962
msgid "Stop the torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:964
msgid "Stop"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:974
msgid "Start the torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:976
msgid "Start"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:987
msgid "Remove the torrent from the active list, deleting the .torrent file"
msgstr ""
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:992
#, java-format
msgid ""
"Are you sure you want to delete the file \\''{0}.torrent\\'' (downloaded "
"data will not be deleted) ?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:995
msgid "Remove"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1006
msgid "Delete the .torrent file and the associated data file(s)"
msgstr ""
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1011
#, java-format
msgid ""
"Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded "
"data?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1014
msgid "Delete"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1049
msgid "Unknown"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1061
msgid "Seed"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1084
msgid "Uninteresting (The peer has no pieces we need)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1086
msgid "Choked (The peer is not allowing us to request pieces)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1106
msgid "Uninterested (We have no pieces the peer needs)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1108
msgid "Choking (We are not allowing the peer to request pieces)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1166
#, java-format
msgid "Details at {0} tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1195
msgid "Add Torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1197
msgid "From URL"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1200
msgid ""
"Enter the torrent file download URL (I2P only), magnet link, or maggot link"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1205
msgid "Add torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1208
#, java-format
msgid "You can also copy .torrent files to: {0}."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1210
msgid "Removing a .torrent will cause it to stop."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1233
msgid "Create Torrent"
msgstr ""
#. out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1236
msgid "Data to seed"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1240
msgid "File or directory to seed (must be within the specified path)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1242
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1723
msgid "Tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1244
msgid "Select a tracker"
msgstr ""
#. out.write(_("Open trackers and DHT only"));
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1249
msgid "Open trackers only"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1264
msgid "or"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1267
msgid "Specify custom tracker announce URL"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1270
msgid "Create torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1291
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1459
msgid "Configuration"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1295
msgid "Data directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1297
msgid "Edit i2psnark.config and restart to change"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1301
msgid "Files readable by all"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1305
msgid "If checked, other users may access the downloaded files"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1309
msgid "Auto start"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1313
msgid "If checked, automatically start torrents that are added"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1317
msgid "Theme"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1330
msgid "Refresh time"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1343
msgid "Never"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1349
msgid "Startup delay"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1351
msgid "minutes"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1375
msgid "Total uploader limit"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1378
msgid "peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1382
msgid "Up bandwidth limit"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1385
msgid "Half available bandwidth recommended."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1387
msgid "View or change router bandwidth"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1391
msgid "Use open trackers also"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1395
msgid ""
"If checked, announce torrents to open trackers as well as the tracker listed "
"in the torrent file"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1399
msgid "Open tracker announce URLs"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1411
msgid "Inbound Settings"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1417
msgid "Outbound Settings"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1425
msgid "I2CP host"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1430
msgid "I2CP port"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1445
msgid "I2CP options"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1450
msgid "Save configuration"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1475
#, java-format
msgid "Invalid magnet URL {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1509
#, java-format
msgid "Invalid info hash in magnet URL {0}"
msgstr ""
#. * dummies for translation
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1539
#, java-format
msgid "1 hop"
msgid_plural "{0} hops"
msgstr[0] ""
msgstr[1] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1540
#, java-format
msgid "1 tunnel"
msgid_plural "{0} tunnels"
msgstr[0] ""
msgstr[1] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1702
msgid "Completion"
msgstr ""
#. else unknown
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1706
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1755
msgid "Size"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1711
msgid "Files"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1713
msgid "Pieces"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1714
msgid "Piece size"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1736
msgid "Magnet link"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1753
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1792
msgid "Directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1762
msgid "Priority"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1767
msgid "Up to higher level directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1797
msgid "Torrent not found?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1806
msgid "File not found in torrent?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1819
msgid "complete"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1820
msgid "bytes remaining"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1845
msgid "Open"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1871
msgid "High"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1876
msgid "Normal"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1881
msgid "Skip"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1890
msgid "Save priorities"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2006
#, java-format
msgid "Torrent fetched from {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2027
#, java-format
msgid "Torrent already running: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2029
#, java-format
msgid "Torrent already in the queue: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2035
#, java-format
msgid "Torrent at {0} was not valid"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2042
#, java-format
msgid "Torrent was not retrieved from {0}"
msgstr ""

View File

@ -0,0 +1,995 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the i2psnark package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# Translators:
# <b790979@klzlk.com>, 2011.
# <businesshehe@yahoo.com>, 2012.
# foo <foo@bar>, 2009.
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-02-02 22:40+0000\n"
"PO-Revision-Date: 2012-01-20 23:39+0000\n"
"Last-Translator: Warton <businesshehe@yahoo.com>\n"
"Language-Team: Polish (http://www.transifex.net/projects/p/I2P/team/pl/)\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2)\n"
#: ../java/src/org/klomp/snark/SnarkManager.java:355
#, java-format
msgid "Total uploaders limit changed to {0}"
msgstr "Ograniczenie liczby uploaderów zmieniono do {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:357
#, java-format
msgid "Minimum total uploaders limit is {0}"
msgstr "Minimalny całkowity limit uploadera: {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:369
#, java-format
msgid "Up BW limit changed to {0}KBps"
msgstr "Ograniczenie pasma WY zmieniono na: {0} KB/s"
#: ../java/src/org/klomp/snark/SnarkManager.java:371
#, java-format
msgid "Minimum up bandwidth limit is {0}KBps"
msgstr "Minimalne pasmo WY to: {0} KB/s"
#: ../java/src/org/klomp/snark/SnarkManager.java:383
#, java-format
msgid "Startup delay changed to {0}"
msgstr "Opóźnienia startu zmieniono na {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:394
#, java-format
msgid "Refresh time changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:396
msgid "Refresh disabled"
msgstr "Odświeżanie wyłączone"
#: ../java/src/org/klomp/snark/SnarkManager.java:451
msgid "I2CP and tunnel changes will take effect after stopping all torrents"
msgstr ""
"Zmiany dotyczące I2CP i tuneli będą wprowadzone po zatrzymaniu wszystkich "
"torrentów."
#: ../java/src/org/klomp/snark/SnarkManager.java:455
#, java-format
msgid "I2CP options changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:460
msgid "Disconnecting old I2CP destination"
msgstr "Rozłączanie starych celów I2CP"
#: ../java/src/org/klomp/snark/SnarkManager.java:462
#, java-format
msgid "I2CP settings changed to {0}"
msgstr "Ustawienia I2CP zmienione do: {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:467
msgid ""
"Unable to connect with the new settings, reverting to the old I2CP settings"
msgstr ""
"Nie można połączyć się z nowymi ustawieniami, powrót do starych ustawień I2CP"
#: ../java/src/org/klomp/snark/SnarkManager.java:471
msgid "Unable to reconnect with the old settings!"
msgstr "Nie można się połączyć ze starymi ustawieniami!"
#: ../java/src/org/klomp/snark/SnarkManager.java:473
msgid "Reconnected on the new I2CP destination"
msgstr "Ponowne podłączanie do nowych celów I2CP"
#: ../java/src/org/klomp/snark/SnarkManager.java:480
#, java-format
msgid "I2CP listener restarted for \"{0}\""
msgstr "Nasłuch I2CP zrestartowany dla \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:492
msgid "New files will be publicly readable"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:494
msgid "New files will not be publicly readable"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:501
msgid "Enabled autostart"
msgstr "Włącz automatycznie uruchamianie"
#: ../java/src/org/klomp/snark/SnarkManager.java:503
msgid "Disabled autostart"
msgstr "Wyłącz automatycznie uruchamianie"
#: ../java/src/org/klomp/snark/SnarkManager.java:509
msgid "Enabled open trackers - torrent restart required to take effect."
msgstr "Włączono otwarte trackery - wymagane ponowne uruchomienie torrenta."
#: ../java/src/org/klomp/snark/SnarkManager.java:511
msgid "Disabled open trackers - torrent restart required to take effect."
msgstr "Wyłączono otwarte trackery - wymagane ponowne uruchomienie torrenta."
#: ../java/src/org/klomp/snark/SnarkManager.java:519
msgid "Open Tracker list changed - torrent restart required to take effect."
msgstr ""
"Zmieniła się lista otwartych trackerów - wymagane ponowne uruchomienie "
"torrenta."
#: ../java/src/org/klomp/snark/SnarkManager.java:526
#, java-format
msgid "{0} theme loaded, return to main i2psnark page to view."
msgstr "{0} temat załadowany, powrót do strony głównej i2psnark by zobaczyć."
#: ../java/src/org/klomp/snark/SnarkManager.java:533
msgid "Configuration unchanged."
msgstr "Ustawienia niezmienione."
#: ../java/src/org/klomp/snark/SnarkManager.java:543
#, java-format
msgid "Unable to save the config to {0}"
msgstr "Nie można zapisać konfiguracji do {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:608
msgid "Connecting to I2P"
msgstr "Łączenie z I2P"
#: ../java/src/org/klomp/snark/SnarkManager.java:611
msgid "Error connecting to I2P - check your I2CP settings!"
msgstr "Nie można się połączyć z I2P, sprawdź swoje ustawienia I2CP!"
#: ../java/src/org/klomp/snark/SnarkManager.java:620
#, java-format
msgid "Error: Could not add the torrent {0}"
msgstr "Błąd: Nie można dodać torrenta {0}"
#. catch this here so we don't try do delete it below
#: ../java/src/org/klomp/snark/SnarkManager.java:642
#, java-format
msgid "Cannot open \"{0}\""
msgstr "Nie można otworzyć \"{0}\""
#. TODO - if the existing one is a magnet, delete it and add the metainfo instead?
#: ../java/src/org/klomp/snark/SnarkManager.java:661
#: ../java/src/org/klomp/snark/SnarkManager.java:737
#: ../java/src/org/klomp/snark/SnarkManager.java:792
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2036
#, java-format
msgid "Torrent with this info hash is already running: {0}"
msgstr ""
#. addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers and DHT only.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:668
#, java-format
msgid ""
"Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers "
"only."
msgstr ""
#. addMessage(_("Warning - No I2P trackers in \"{0}\", and DHT and open trackers are disabled, you should enable open trackers or DHT before starting the torrent.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:673
#, java-format
msgid ""
"Warning - No I2P Trackers found in \"{0}\". Make sure Open Tracker is "
"enabled before starting this torrent."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:694
#, java-format
msgid "Torrent in \"{0}\" is invalid"
msgstr "Torrent w \"{0}\" jest niepoprawny"
#: ../java/src/org/klomp/snark/SnarkManager.java:699
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2058
#, java-format
msgid "ERROR - Out of memory, cannot create torrent from {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:711
#, java-format
msgid "Torrent added and started: \"{0}\""
msgstr "Torrent dodany i uruchomiony: \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:713
#, java-format
msgid "Torrent added: \"{0}\""
msgstr "Torrent dodany: \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:748
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:499
#, java-format
msgid "Fetching {0}"
msgstr "Pobieranie: {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:751
#, java-format
msgid ""
"We have no saved peers and no other torrents are running. Fetch of {0} will "
"not succeed until you start another torrent."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:755
#, java-format
msgid "Adding {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:802
#: ../java/src/org/klomp/snark/SnarkManager.java:825
#: ../java/src/org/klomp/snark/SnarkManager.java:1260
#, java-format
msgid "Failed to copy torrent file to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1052
#, java-format
msgid "Too many files in \"{0}\" ({1}), deleting it!"
msgstr "Za dużo plików w \"{0}\" ({1}), usuwanie go!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1054
#, java-format
msgid "Torrent file \"{0}\" cannot end in \".torrent\", deleting it!"
msgstr "Torrent \"{0}\" nie może się kończyć w \".torrent\", usuwanie go!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1056
#, java-format
msgid "No pieces in \"{0}\", deleting it!"
msgstr "W torrencie \"{0}\" nie ma piece'ów, usuwanie go!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1058
#, java-format
msgid "Too many pieces in \"{0}\", limit is {1}, deleting it!"
msgstr "Za dużo piece''ów w \"{0}\" (limit to {1}), usuwanie go!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1060
#, java-format
msgid "Pieces are too large in \"{0}\" ({1}B), deleting it."
msgstr "Za duże piece''y w torrencie \"{0}\" ({1}B), usuwanie go."
#: ../java/src/org/klomp/snark/SnarkManager.java:1061
#, java-format
msgid "Limit is {0}B"
msgstr "Granica to {0}B"
#: ../java/src/org/klomp/snark/SnarkManager.java:1063
#, java-format
msgid "Torrent \"{0}\" has no data, deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1071
#, java-format
msgid "Torrents larger than {0}B are not supported yet, deleting \"{1}\""
msgstr "Torrenty większe niż {0}B nie są jeszcze wspierane, usunięcie \"{1}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:1087
#, java-format
msgid "Error: Could not remove the torrent {0}"
msgstr "Błąd: nie można usunąć torrenta {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:1108
#: ../java/src/org/klomp/snark/SnarkManager.java:1126
#, java-format
msgid "Torrent stopped: \"{0}\""
msgstr "Torrent zatrzymany: \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:1147
#, java-format
msgid "Torrent removed: \"{0}\""
msgstr "Torrent usunięty: \"{0}\""
#: ../java/src/org/klomp/snark/SnarkManager.java:1155
#, java-format
msgid "Adding torrents in {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1208
#, java-format
msgid "Download finished: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1256
#, java-format
msgid "Metainfo received for {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1257
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:534
#, java-format
msgid "Starting up torrent {0}"
msgstr "Uruchamianie torrenta: {0}"
#: ../java/src/org/klomp/snark/SnarkManager.java:1313
msgid "Unable to connect to I2P!"
msgstr "Nie można podłączyć się do I2P!"
#: ../java/src/org/klomp/snark/SnarkManager.java:1319
#, java-format
msgid "Unable to add {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:205
msgid "I2PSnark - Anonymous BitTorrent Client"
msgstr "I2PSnark anonimowy klient BitTorrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:221
msgid "Torrents"
msgstr "Torrenty"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:224
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:231
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1052
msgid "I2PSnark"
msgstr "I2PSnark"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:228
msgid "Refresh page"
msgstr "Odśwież stronę"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:233
msgid "Forum"
msgstr "Forum"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:251
msgid "Click \"Add torrent\" button to fetch torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:290
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1779
msgid "Status"
msgstr "Status"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:296
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:298
msgid "Hide Peers"
msgstr "Ukryj peery"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:303
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:305
msgid "Show Peers"
msgstr "Pokaż peery"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:312
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1702
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1718
msgid "Torrent"
msgstr "Torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:316
msgid "Estimated time remaining"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:319
msgid "ETA"
msgstr "Pozostało"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:323
msgid "Downloaded"
msgstr "Pobrano"
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:326
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:340
msgid "RX"
msgstr "RX"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:330
msgid "Uploaded"
msgstr "Wysłano"
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:333
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:350
msgid "TX"
msgstr "TX"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:338
msgid "Down Rate"
msgstr "Prędkość pobierania"
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:343
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:352
msgid "Rate"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:348
msgid "Up Rate"
msgstr "Prędkość wysyłania"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:372
msgid "Stop all torrents and the I2P tunnel"
msgstr "Zatrzymaj wszystkie torrenty i tunel I2P"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:374
msgid "Stop All"
msgstr "Zatrzymaj wszystkie"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:383
msgid "Start all torrents and the I2P tunnel"
msgstr "Uruchom wszystkie torrenty i tunel I2P"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:385
msgid "Start All"
msgstr "Uruchom wszystkie"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:404
msgid "No torrents loaded."
msgstr "Nie załadowano torrentów."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:409
msgid "Totals"
msgstr "Łącznie"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:411
#, java-format
msgid "1 torrent"
msgid_plural "{0} torrents"
msgstr[0] "{0} torrent"
msgstr[1] "{0} torrenty"
msgstr[2] "{0} torrentów"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:414
#, java-format
msgid "1 connected peer"
msgid_plural "{0} connected peers"
msgstr[0] "{0} podłączony peer"
msgstr[1] "{0} podłączone peery"
msgstr[2] "{0} podłączonych peerów"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:498
msgid "Opening the I2P tunnel"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:505
#, java-format
msgid "Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:553
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:580
#, java-format
msgid "Magnet deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:561
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:586
#, java-format
msgid "Torrent file deleted: {0}"
msgstr "Plik torrenta usunięto: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:592
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:603
#, java-format
msgid "Data file deleted: {0}"
msgstr "Pliki z danymi usunięte: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:594
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:605
#, java-format
msgid "Data file could not be deleted: {0}"
msgstr "Nie można usunąć pliku z danymi: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:617
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:624
#, java-format
msgid "Data dir deleted: {0}"
msgstr "Usunięto katalog z danymi: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:663
msgid "Error creating torrent - you must select a tracker"
msgstr "Błąd przy tworzeniu torrenta - musisz wybrać tracker"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:678
#, java-format
msgid "Torrent created for \"{0}\""
msgstr "Utworzono torrent dla \"{0}\""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:680
#, java-format
msgid ""
"Many I2P trackers require you to register new torrents before seeding - "
"please do so before starting \"{0}\""
msgstr ""
"Wiele trackerów w I2P wymaga zarejestrowania torrenta przed seedowaniem - "
"proszę, zrób tak przed uruchomieniem \"{0}\""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:682
#, java-format
msgid "Error creating a torrent for \"{0}\""
msgstr "Błąd podczas tworzenia torrenta dla: \"{0}\""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:685
#, java-format
msgid "Cannot create a torrent for the nonexistent data: {0}"
msgstr "Nie można utworzyć torrenta dla nieistniejących danych: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:688
msgid "Error creating torrent - you must enter a file or directory"
msgstr "Błąd przy tworzeniu torrenta - musisz podać plik lub katalog"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:691
msgid "Stopping all torrents and closing the I2P tunnel."
msgstr "Zatrzymywanie wszystkich torrentów i zamykanie tunelu I2P"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:702
msgid "I2P tunnel closed."
msgstr "Zamknięto tunel I2P."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:705
msgid "Opening the I2P tunnel and starting all torrents."
msgstr "Otwieranie tunelu I2P i uruchamianie wszystkich torrentów."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:827
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:832
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:838
msgid "Tracker Error"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:830
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:834
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:846
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:850
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:858
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:862
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:867
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:871
#, java-format
msgid "1 peer"
msgid_plural "{0} peers"
msgstr[0] "{0} peer"
msgstr[1] "{0} peery"
msgstr[2] "{0} peerów"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:843
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:848
msgid "Seeding"
msgstr "Seedowanie"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:852
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1724
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1830
msgid "Complete"
msgstr "Zakończono"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:855
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:860
msgid "OK"
msgstr "OK"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:864
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:869
msgid "Stalled"
msgstr "Utknięto"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:873
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:876
msgid "No Peers"
msgstr "Brak peerów"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:878
msgid "Stopped"
msgstr "Zatrzymany"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:910
msgid "Torrent details"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:922
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1186
msgid "Info"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:937
msgid "View files"
msgstr "Zobacz pliki"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:939
msgid "Open file"
msgstr "Otwórz plik"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:981
msgid "Stop the torrent"
msgstr "Zatrzymaj torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:983
msgid "Stop"
msgstr "Zatrzymaj"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:993
msgid "Start the torrent"
msgstr "Uruchom torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:995
msgid "Start"
msgstr "Uruchom"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1006
msgid "Remove the torrent from the active list, deleting the .torrent file"
msgstr "Usuń torrent z aktywnej listy, usuwając plik .torrent"
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1011
#, java-format
msgid ""
"Are you sure you want to delete the file \\''{0}.torrent\\'' (downloaded "
"data will not be deleted) ?"
msgstr ""
"Czy na pewno chcesz usunąć plik \\''{0}.torrent\\''? (pobrane dane nie "
"zostaną usunięte)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1014
msgid "Remove"
msgstr "Usuń"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1025
msgid "Delete the .torrent file and the associated data file(s)"
msgstr "Usuń plik .torrent i związane z nim pliki z danymi"
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1030
#, java-format
msgid ""
"Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded "
"data?"
msgstr "Czy na pewno chcesz usunąć plik \\''{0}.torrent\\'' oraz pobrane dane?"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1033
msgid "Delete"
msgstr "Usuń"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1068
msgid "Unknown"
msgstr "Nieznany"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1080
msgid "Seed"
msgstr "Seed"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1103
msgid "Uninteresting (The peer has no pieces we need)"
msgstr "Uninteresting (peer nie ma piece'ów, które potrzebujemy)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1105
msgid "Choked (The peer is not allowing us to request pieces)"
msgstr "Choked (peer nie pozwala nam na prośbę o piece)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1125
msgid "Uninterested (We have no pieces the peer needs)"
msgstr "Uninterested (nie mamy piece'ów, których peer potrzebuje)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1127
msgid "Choking (We are not allowing the peer to request pieces)"
msgstr "Choking (nie pozwalamy peerowi na prośbę o piece)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1185
#, java-format
msgid "Details at {0} tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1215
msgid "Add Torrent"
msgstr "Dodaj torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1217
msgid "From URL"
msgstr "Z adresu URL"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1220
msgid ""
"Enter the torrent file download URL (I2P only), magnet link, or maggot link"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1225
msgid "Add torrent"
msgstr "Dodaj torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1228
#, java-format
msgid "You can also copy .torrent files to: {0}."
msgstr "Możesz także skopiować pliki .torrent do: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1230
msgid "Removing a .torrent will cause it to stop."
msgstr "Usunięcie pliku .torrent spowoduje jego zatrzymanie."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1253
msgid "Create Torrent"
msgstr "Utwórz torrent"
#. out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br>\n");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1256
msgid "Data to seed"
msgstr "Dane do seedowania"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1260
msgid "File or directory to seed (must be within the specified path)"
msgstr ""
"Plik lub katalog do seedowania (musi się znajdować wewnątrz podanej ścieżki)"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1262
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1743
msgid "Tracker"
msgstr "Tracker"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1264
msgid "Select a tracker"
msgstr "Wybierz tracker"
#. out.write(_("Open trackers and DHT only"));
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1269
msgid "Open trackers only"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1284
msgid "or"
msgstr "lub"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1287
msgid "Specify custom tracker announce URL"
msgstr "Podaj własny adres announce trackera"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1290
msgid "Create torrent"
msgstr "Utwórz torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1311
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1479
msgid "Configuration"
msgstr "Ustawienia"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1315
msgid "Data directory"
msgstr "Katalog z danymi"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1317
msgid "Edit i2psnark.config and restart to change"
msgstr ""
"Edytuj plik i2psnark.config i uruchom ponownie by zmiany weszły w życie"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1321
msgid "Files readable by all"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1325
msgid "If checked, other users may access the downloaded files"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1329
msgid "Auto start"
msgstr "Automatyczne uruchamianie"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1333
msgid "If checked, automatically start torrents that are added"
msgstr "Jeśli zaznaczone - automatycznie uruchamiaj dodane torrenty"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1337
msgid "Theme"
msgstr "Motyw"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1350
msgid "Refresh time"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1363
msgid "Never"
msgstr "Nigdy"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1369
msgid "Startup delay"
msgstr "Opóźnienie uruchomienia"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1371
msgid "minutes"
msgstr "minuty"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1395
msgid "Total uploader limit"
msgstr "Całkowity limit uploaderów"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1398
msgid "peers"
msgstr "peery"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1402
msgid "Up bandwidth limit"
msgstr "Ograniczenie pasma WY"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1405
msgid "Half available bandwidth recommended."
msgstr "Zalecana połowa dostępnego pasma."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1407
msgid "View or change router bandwidth"
msgstr "Zobacz lub zmień pasmo routera"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1411
msgid "Use open trackers also"
msgstr "Używaj również otwartych trackerów"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1415
msgid ""
"If checked, announce torrents to open trackers as well as the tracker listed "
"in the torrent file"
msgstr ""
"Jeśli zaznaczone, zgłaszaj torrenty do otwartych trackerów, jak również do "
"trackerów podanych w pliku torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1419
msgid "Open tracker announce URLs"
msgstr "URL otwartego trackera"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1431
msgid "Inbound Settings"
msgstr "Tunele wejściowe"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1437
msgid "Outbound Settings"
msgstr "Tunele wyjściowe"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1445
msgid "I2CP host"
msgstr "Adres I2CP"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1450
msgid "I2CP port"
msgstr "Port I2CP"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1465
msgid "I2CP options"
msgstr "Parametry I2CP"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1470
msgid "Save configuration"
msgstr "Zapisz ustawienia"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1495
#, java-format
msgid "Invalid magnet URL {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1529
#, java-format
msgid "Invalid info hash in magnet URL {0}"
msgstr ""
#. * dummies for translation
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1559
#, java-format
msgid "1 hop"
msgid_plural "{0} hops"
msgstr[0] "{0} skok"
msgstr[1] "{0} skoki"
msgstr[2] "{0} skoków"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1560
#, java-format
msgid "1 tunnel"
msgid_plural "{0} tunnels"
msgstr[0] "{0} tunel"
msgstr[1] "{0} tunele"
msgstr[2] "{0} tuneli"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1722
msgid "Completion"
msgstr ""
#. else unknown
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1726
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1776
msgid "Size"
msgstr "Rozmiar"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1731
msgid "Files"
msgstr "Pliki"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1733
msgid "Pieces"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1734
msgid "Piece size"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1756
msgid "Magnet link"
msgstr ""
#. We don't have the hash of the torrent file
#. buf.append("<br>").append(_("Maggot link")).append(": <a href=\"").append(MAGGOT).append(hex).append(':').append(hex).append("\">")
#. .append(MAGGOT).append(hex).append(':').append(hex).append("</a>");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1762
#, fuzzy
msgid "Torrent file"
msgstr "Torrent"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1774
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1813
msgid "Directory"
msgstr "Katalog"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1783
msgid "Priority"
msgstr "Priorytet"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1788
msgid "Up to higher level directory"
msgstr "Do katalogu nadrzędnego"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1818
msgid "Torrent not found?"
msgstr "Torrent not found?"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1827
msgid "File not found in torrent?"
msgstr "File not found in torrent?"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1840
msgid "complete"
msgstr "zakończono"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1841
msgid "bytes remaining"
msgstr "bajtów pozostało"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1866
msgid "Open"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1892
msgid "High"
msgstr "Wysoki"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1897
msgid "Normal"
msgstr "Normalny"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1902
msgid "Skip"
msgstr "Pomiń"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1911
msgid "Save priorities"
msgstr "Zapisz priorytety"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2027
#, java-format
msgid "Torrent fetched from {0}"
msgstr "Torrent pobrano z {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2048
#, java-format
msgid "Torrent already running: {0}"
msgstr "Torrent już uruchomiony: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2050
#, java-format
msgid "Torrent already in the queue: {0}"
msgstr "Torrent już w kolejce: {0}"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2056
#, java-format
msgid "Torrent at {0} was not valid"
msgstr "Torrent pobrany z {0} jest niepoprawny"
#. FIXME don't lose peer setting
#. String peerParam = req.getParameter("p");
#. if (peerParam != null)
#. buf.append("<input type=\"hidden\" name=\"p\" value=\"").append(peerParam).append("\" >\n");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2070
#, java-format
msgid "Torrent was not retrieved from {0}"
msgstr "Torrent nie był pobrany z: {0}"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,916 @@
# I2P
# Copyright (C) 2009 The I2P Project
# This file is distributed under the same license as the i2psnark package.
# To contribute translations, see http://www.i2p2.de/newdevelopers
#
# dich_tran <tran.nathan@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: I2P\n"
"Report-Msgid-Bugs-To: https://trac.i2p2.de/\n"
"POT-Creation-Date: 2011-06-11 08:22+0000\n"
"PO-Revision-Date: 2011-05-17 18:05+0000\n"
"Last-Translator: ducki2p <ducki2p@gmail.com>\n"
"Language-Team: Vietnamese (http://www.transifex.net/projects/p/I2P/team/vi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: vi\n"
"Plural-Forms: nplurals=1; plural=0\n"
#: ../java/src/org/klomp/snark/SnarkManager.java:307
#, java-format
msgid "Total uploaders limit changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:309
#, java-format
msgid "Minimum total uploaders limit is {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:321
#, java-format
msgid "Up BW limit changed to {0}KBps"
msgstr "Giới hạn băng thông lên đổi thành {0}KBps"
#: ../java/src/org/klomp/snark/SnarkManager.java:323
#, java-format
msgid "Minimum up bandwidth limit is {0}KBps"
msgstr "Tối thiểu băng thông lên là {0}KBps"
#: ../java/src/org/klomp/snark/SnarkManager.java:335
#, java-format
msgid "Startup delay changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:386
msgid "I2CP and tunnel changes will take effect after stopping all torrents"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:393
msgid "Disconnecting old I2CP destination"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:397
#, java-format
msgid "I2CP settings changed to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:402
msgid ""
"Unable to connect with the new settings, reverting to the old I2CP settings"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:406
msgid "Unable to reconnect with the old settings!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:408
msgid "Reconnected on the new I2CP destination"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:418
#, java-format
msgid "I2CP listener restarted for \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:429
msgid "Enabled autostart"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:431
msgid "Disabled autostart"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:437
msgid "Enabled open trackers - torrent restart required to take effect."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:439
msgid "Disabled open trackers - torrent restart required to take effect."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:447
msgid "Open Tracker list changed - torrent restart required to take effect."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:454
#, java-format
msgid "{0} theme loaded, return to main i2psnark page to view."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:461
msgid "Configuration unchanged."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:471
#, java-format
msgid "Unable to save the config to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:536
msgid "Connecting to I2P"
msgstr "Nối kết vào I2P"
#: ../java/src/org/klomp/snark/SnarkManager.java:539
msgid "Error connecting to I2P - check your I2CP settings!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:548
#, java-format
msgid "Error: Could not add the torrent {0}"
msgstr ""
#. catch this here so we don't try do delete it below
#: ../java/src/org/klomp/snark/SnarkManager.java:570
#, java-format
msgid "Cannot open \"{0}\""
msgstr ""
#. TODO - if the existing one is a magnet, delete it and add the metainfo
#. instead?
#: ../java/src/org/klomp/snark/SnarkManager.java:589
#: ../java/src/org/klomp/snark/SnarkManager.java:665
#: ../java/src/org/klomp/snark/SnarkManager.java:720
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1976
#, java-format
msgid "Torrent with this info hash is already running: {0}"
msgstr ""
#. addMessage(_("Warning - No I2P trackers in \"{0}\", will announce to I2P
#. open trackers and DHT only.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:596
#, java-format
msgid ""
"Warning - No I2P trackers in \"{0}\", will announce to I2P open trackers "
"only."
msgstr ""
#. addMessage(_("Warning - No I2P trackers in \"{0}\", and DHT and open
#. trackers are disabled, you should enable open trackers or DHT before
#. starting the torrent.", info.getName()));
#: ../java/src/org/klomp/snark/SnarkManager.java:601
#, java-format
msgid ""
"Warning - No I2P Trackers found in \"{0}\". Make sure Open Tracker is "
"enabled before starting this torrent."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:622
#, java-format
msgid "Torrent in \"{0}\" is invalid"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:627
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1998
#, java-format
msgid "ERROR - Out of memory, cannot create torrent from {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:639
#, java-format
msgid "Torrent added and started: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:641
#, java-format
msgid "Torrent added: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:676
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:491
#, java-format
msgid "Fetching {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:679
#, java-format
msgid ""
"We have no saved peers and no other torrents are running. Fetch of {0} will "
"not succeed until you start another torrent."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:683
#, java-format
msgid "Adding {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:730
#: ../java/src/org/klomp/snark/SnarkManager.java:753
#: ../java/src/org/klomp/snark/SnarkManager.java:1180
#, java-format
msgid "Failed to copy torrent file to {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:976
#, java-format
msgid "Too many files in \"{0}\" ({1}), deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:978
#, java-format
msgid "Torrent file \"{0}\" cannot end in \".torrent\", deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:980
#, java-format
msgid "No pieces in \"{0}\", deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:982
#, java-format
msgid "Too many pieces in \"{0}\", limit is {1}, deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:984
#, java-format
msgid "Pieces are too large in \"{0}\" ({1}B), deleting it."
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:985
#, java-format
msgid "Limit is {0}B"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:987
#, java-format
msgid "Torrent \"{0}\" has no data, deleting it!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:995
#, java-format
msgid "Torrents larger than {0}B are not supported yet, deleting \"{1}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1011
#, java-format
msgid "Error: Could not remove the torrent {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1032
#: ../java/src/org/klomp/snark/SnarkManager.java:1050
#, java-format
msgid "Torrent stopped: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1071
#, java-format
msgid "Torrent removed: \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1079
#, java-format
msgid "Adding torrents in {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1128
#, java-format
msgid "Download finished: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1176
#, java-format
msgid "Metainfo received for {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1177
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:526
#, java-format
msgid "Starting up torrent {0}"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1231
msgid "Unable to connect to I2P!"
msgstr ""
#: ../java/src/org/klomp/snark/SnarkManager.java:1237
#, java-format
msgid "Unable to add {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:205
msgid "I2PSnark - Anonymous BitTorrent Client"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:218
msgid "Torrents"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:221
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:228
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1028
msgid "I2PSnark"
msgstr "I2PSnark"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:225
msgid "Refresh page"
msgstr "Nạp lại trang"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:230
msgid "Forum"
msgstr "Diễn đàn"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:284
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1719
msgid "Status"
msgstr "Tình trạng"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:290
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:292
msgid "Hide Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:297
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:299
msgid "Show Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:306
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1643
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1659
msgid "Torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:310
msgid "Estimated time remaining"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:313
msgid "ETA"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:317
msgid "Downloaded"
msgstr "Đã tải xuống"
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:320
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:334
msgid "RX"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:324
msgid "Uploaded"
msgstr "Đã tải lên"
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:327
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:344
msgid "TX"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:332
msgid "Down Rate"
msgstr ""
#. Translators: Please keep short or translate as " "
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:337
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:346
msgid "Rate"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:342
msgid "Up Rate"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:366
msgid "Stop all torrents and the I2P tunnel"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:368
msgid "Stop All"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:377
msgid "Start all torrents and the I2P tunnel"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:379
msgid "Start All"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:398
msgid "No torrents loaded."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:403
msgid "Totals"
msgstr "Tổng cộng"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:405
#, java-format
msgid "1 torrent"
msgid_plural "{0} torrents"
msgstr[0] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:408
#, java-format
msgid "1 connected peer"
msgid_plural "{0} connected peers"
msgstr[0] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:497
#, java-format
msgid "Invalid URL: Must start with \"http://\", \"{0}\", or \"{1}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:545
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:572
#, java-format
msgid "Magnet deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:553
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:578
#, java-format
msgid "Torrent file deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:584
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:594
#, java-format
msgid "Data file deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:586
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:596
#, java-format
msgid "Data file could not be deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:605
#, java-format
msgid "Data dir deleted: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:638
msgid "Error creating torrent - you must select a tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:653
#, java-format
msgid "Torrent created for \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:655
#, java-format
msgid ""
"Many I2P trackers require you to register new torrents before seeding - "
"please do so before starting \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:657
#, java-format
msgid "Error creating a torrent for \"{0}\""
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:660
#, java-format
msgid "Cannot create a torrent for the nonexistent data: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:663
msgid "Error creating torrent - you must enter a file or directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:666
msgid "Stopping all torrents and closing the I2P tunnel."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:677
msgid "I2P tunnel closed."
msgstr "Đường hầm I2P đóng lại."
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:680
msgid "Opening the I2P tunnel and starting all torrents."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:803
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:808
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:814
msgid "Tracker Error"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:806
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:810
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:822
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:826
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:834
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:838
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:843
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:847
#, java-format
msgid "1 peer"
msgid_plural "{0} peers"
msgstr[0] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:819
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:824
msgid "Seeding"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:828
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1665
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1770
msgid "Complete"
msgstr "Hoàn tất"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:831
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:836
msgid "OK"
msgstr "OK"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:840
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:845
msgid "Stalled"
msgstr "Khựng"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:849
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:852
msgid "No Peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:854
msgid "Stopped"
msgstr "Ngưng"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:886
msgid "Torrent details"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:898
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1160
msgid "Info"
msgstr "Thông tin"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:913
msgid "View files"
msgstr "Xem tập tin"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:915
msgid "Open file"
msgstr "Mở tập tin"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:957
msgid "Stop the torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:959
msgid "Stop"
msgstr "Ngưng"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:969
msgid "Start the torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:971
msgid "Start"
msgstr "Bắt đầu"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:982
msgid "Remove the torrent from the active list, deleting the .torrent file"
msgstr ""
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:987
#, java-format
msgid ""
"Are you sure you want to delete the file \\''{0}.torrent\\'' (downloaded "
"data will not be deleted) ?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:990
msgid "Remove"
msgstr "Bỏ"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1001
msgid "Delete the .torrent file and the associated data file(s)"
msgstr ""
#. Can't figure out how to escape double quotes inside the onclick string.
#. Single quotes in translate strings with parameters must be doubled.
#. Then the remaining single quite must be escaped
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1006
#, java-format
msgid ""
"Are you sure you want to delete the torrent \\''{0}\\'' and all downloaded "
"data?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1009
msgid "Delete"
msgstr "Xóa"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1042
msgid "Unknown"
msgstr "Không rõ"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1054
msgid "Seed"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1077
msgid "Uninteresting (The peer has no pieces we need)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1079
msgid "Choked (The peer is not allowing us to request pieces)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1099
msgid "Uninterested (We have no pieces the peer needs)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1101
msgid "Choking (We are not allowing the peer to request pieces)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1159
#, java-format
msgid "Details at {0} tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1188
msgid "Add Torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1190
msgid "From URL"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1193
msgid ""
"Enter the torrent file download URL (I2P only), magnet link, or maggot link"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1198
msgid "Add torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1201
#, java-format
msgid "You can also copy .torrent files to: {0}."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1203
msgid "Removing a .torrent will cause it to stop."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1226
msgid "Create Torrent"
msgstr ""
#. out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\"
#. value=\"" + newFile + "\" /><br>\n");
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1229
msgid "Data to seed"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1233
msgid "File or directory to seed (must be within the specified path)"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1235
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1684
msgid "Tracker"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1237
msgid "Select a tracker"
msgstr ""
#. out.write(_("Open trackers and DHT only"));
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1242
msgid "Open trackers only"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1257
msgid "or"
msgstr "hoặc"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1260
msgid "Specify custom tracker announce URL"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1263
msgid "Create torrent"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1281
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1420
msgid "Configuration"
msgstr "Cấu hình"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1285
msgid "Data directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1287
msgid "Edit i2psnark.config and restart to change"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1291
msgid "Auto start"
msgstr "Tự động bắt đầu"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1295
msgid "If checked, automatically start torrents that are added"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1299
msgid "Theme"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1312
msgid "Startup delay"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1314
msgid "minutes"
msgstr "phút"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1338
msgid "Total uploader limit"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1341
msgid "peers"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1345
msgid "Up bandwidth limit"
msgstr "Giới hạn băng thông lên"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1348
msgid "Half available bandwidth recommended."
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1350
msgid "View or change router bandwidth"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1354
msgid "Use open trackers also"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1358
msgid ""
"If checked, announce torrents to open trackers as well as the tracker listed"
" in the torrent file"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1362
msgid "Open tracker announce URLs"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1374
msgid "Inbound Settings"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1380
msgid "Outbound Settings"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1388
msgid "I2CP host"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1393
msgid "I2CP port"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1406
msgid "I2CP options"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1411
msgid "Save configuration"
msgstr "Lưu cấu hình"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1436
#, java-format
msgid "Invalid magnet URL {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1470
#, java-format
msgid "Invalid info hash in magnet URL {0}"
msgstr ""
#. * dummies for translation
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1500
#, java-format
msgid "1 hop"
msgid_plural "{0} hops"
msgstr[0] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1501
#, java-format
msgid "1 tunnel"
msgid_plural "{0} tunnels"
msgstr[0] ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1663
msgid "Completion"
msgstr ""
#. else unknown
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1667
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1716
msgid "Size"
msgstr "Kích thước"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1672
msgid "Files"
msgstr "Tập tin"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1674
msgid "Pieces"
msgstr "Mảnh"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1675
msgid "Piece size"
msgstr "Kích thước mảnh"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1697
msgid "Magnet link"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1714
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1753
msgid "Directory"
msgstr "Danh mục"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1723
msgid "Priority"
msgstr "Ưu tiên"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1728
msgid "Up to higher level directory"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1758
msgid "Torrent not found?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1767
msgid "File not found in torrent?"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1780
msgid "complete"
msgstr "hoàn tất"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1781
msgid "bytes remaining"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1806
msgid "Open"
msgstr "Mở"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1832
msgid "High"
msgstr "Cao"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1837
msgid "Normal"
msgstr "Thường"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1842
msgid "Skip"
msgstr "Lờ"
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1851
msgid "Save priorities"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1967
#, java-format
msgid "Torrent fetched from {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1988
#, java-format
msgid "Torrent already running: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1990
#, java-format
msgid "Torrent already in the queue: {0}"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:1996
#, java-format
msgid "Torrent at {0} was not valid"
msgstr ""
#: ../java/src/org/klomp/snark/web/I2PSnarkServlet.java:2003
#, java-format
msgid "Torrent was not retrieved from {0}"
msgstr ""

View File

@ -20,7 +20,10 @@
</classpath>
</depend>
</target>
<property name="javac.compilerargs" value="" />
<property name="require.gettext" value="true" />
<target name="compile" depends="depend">
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
@ -34,10 +37,7 @@
</javac>
</target>
<!-- TODO: Move the web classes from the jar to the war - they are not part of the API
- This will require sponge to rewrite some seedless stuff that uses it.
-->
<target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@ -49,30 +49,48 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
<jar destfile="./build/i2ptunnel.jar" basedir="./build/obj" includes="**/*.class">
</target>
<!-- The web classes are now in the war not the jar - they are not part of the API -->
<target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.j.tr" value="" />
<jar destfile="./build/i2ptunnel.jar" basedir="./build/obj" includes="**/*.class" excludes="**/EditBean.class **/IndexBean.class" >
<manifest>
<attribute name="Main-Class" value="net.i2p.i2ptunnel.I2PTunnel" />
<attribute name="Class-Path" value="i2p.jar mstreaming.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.j.tr}" />
</manifest>
</jar>
<jar destfile="./build/temp-beans.jar" basedir="./build/obj" includes="**/EditBean.class **/IndexBean.class" />
</target>
<target name="jarUpToDate">
<uptodate property="jar.uptodate" targetfile="build/i2ptunnel.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="bundle" depends="compile, precompilejsp">
<!-- 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" >
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" >
<arg value="./bundle-messages.sh" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" >
<arg value="./bundle-messages.sh" />
</exec>
<!-- multi-lang is optional -->
@ -83,21 +101,21 @@
<target name="poupdate" depends="compile, precompilejsp">
<!-- Update the messages_*.po files. -->
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
<exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
<exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
<exec executable="sh" osfamily="windows" failifexecutionfails="true" failonerror="true" >
<arg value="./bundle-messages.sh" />
<arg value="-p" />
</exec>
</target>
<target name="war" depends="precompilejsp, bundle, warUpToDate" unless="war.uptodate" >
<target name="listChangedFiles2" depends="warUpToDate" if="shouldListChanges2" >
<exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
@ -109,9 +127,19 @@
<arg value="[:space:]" />
<arg value="," />
</exec>
</target>
<!-- The web classes are now in the war not the jar - they are not part of the API -->
<target name="war" depends="precompilejsp, bundle, warUpToDate, listChangedFiles2" unless="war.uptodate" >
<!-- set if unset -->
<property name="workspace.changes.w.tr" value="" />
<copy file="build/obj/net/i2p/i2ptunnel/web/EditBean.class" todir="../jsp/WEB-INF/classes/net/i2p/i2ptunnel/web" />
<copy file="build/obj/net/i2p/i2ptunnel/web/IndexBean.class" todir="../jsp/WEB-INF/classes/net/i2p/i2ptunnel/web" />
<war destfile="build/i2ptunnel.war" webxml="../jsp/web-out.xml"
basedir="../jsp/" excludes="web.xml, web-fragment.xml, web-out.xml, **/*.java, *.jsp">
<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.w.tr}" />
@ -123,6 +151,14 @@
<uptodate property="war.uptodate" targetfile="build/i2ptunnel.war" >
<srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, **/*.java, *.jsp" />
</uptodate>
<condition property="shouldListChanges2" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target>
<target name="precompilejsp" depends="jar" unless="precompilejsp.uptodate">
@ -139,11 +175,14 @@
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../../jetty/jettylib/commons-logging.jar" />
<pathelement location="../../jetty/jettylib/commons-el.jar" />
<pathelement location="../../jetty/jettylib/ant.jar" />
<pathelement location="../../jetty/jettylib/jsp-api.jar" />
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="build/i2ptunnel.jar" />
<pathelement location="build/temp-beans.jar" />
</classpath>
<arg value="-d" />
<arg value="../jsp/WEB-INF/classes" />
<arg value="-v" />
<arg value="-p" />
<arg value="net.i2p.i2ptunnel.jsp" />
<arg value="-webinc" />
@ -160,7 +199,9 @@
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
<pathelement location="../../jetty/jettylib/commons-logging.jar" />
<pathelement location="../../jetty/jettylib/commons-el.jar" />
<pathelement location="../../jetty/jettylib/jsp-api.jar" />
<pathelement location="build/i2ptunnel.jar" />
<pathelement location="build/temp-beans.jar" />
</classpath>
</javac>
<copy file="../jsp/web.xml" tofile="../jsp/web-out.xml" />

View File

@ -12,6 +12,7 @@
CLASS=net.i2p.i2ptunnel.web.messages
TMPFILE=build/javafiles.txt
export TZ=UTC
RC=0
if [ "$1" = "-p" ]
then
@ -69,15 +70,17 @@ do
-o ${i}t
if [ $? -ne 0 ]
then
echo 'Warning - xgettext failed, not updating translations'
echo "ERROR - xgettext failed on ${i}, not updating translations"
rm -f ${i}t
RC=1
break
fi
msgmerge -U --backup=none $i ${i}t
if [ $? -ne 0 ]
then
echo 'Warning - msgmerge failed, not updating translations'
echo "ERROR - msgmerge failed on ${i}, not updating translations"
rm -f ${i}t
RC=1
break
fi
rm -f ${i}t
@ -94,11 +97,13 @@ do
msgfmt --java --statistics -r $CLASS -l $LG -d ../jsp/WEB-INF/classes $i
if [ $? -ne 0 ]
then
echo 'Warning - msgfmt failed, not updating translations'
echo "ERROR - msgfmt failed on ${i}, not updating translations"
# msgfmt leaves the class file there so the build would work the next time
find src/WEB-INF/classes -name messages_${LG}.class -exec rm -f {} \;
RC=1
break
fi
fi
done
rm -f $TMPFILE
# todo: return failure
exit 0
exit $RC

View File

@ -8,21 +8,21 @@ package net.i2p.i2ptunnel;
*
*/
import java.io.ByteArrayOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.util.zip.GZIPInputStream;
import java.util.Locale;
import java.util.concurrent.RejectedExecutionException;
import net.i2p.I2PAppContext;
import net.i2p.data.ByteArray;
import net.i2p.util.BigPipedInputStream;
import net.i2p.util.ByteCache;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import net.i2p.util.ReusableGZIPInputStream;
/**
* This does the transparent gzip decompression on the client side.
@ -43,8 +43,9 @@ class HTTPResponseOutputStream extends FilterOutputStream {
private boolean _headerWritten;
private final byte _buf1[];
protected boolean _gzip;
private long _dataWritten;
private InternalGZIPInputStream _in;
protected long _dataExpected;
protected String _contentType;
private static final int CACHE_SIZE = 8*1024;
private static final ByteCache _cache = ByteCache.getInstance(8, CACHE_SIZE);
// OOM DOS prevention
@ -74,7 +75,6 @@ class HTTPResponseOutputStream extends FilterOutputStream {
public void write(byte buf[], int off, int len) throws IOException {
if (_headerWritten) {
out.write(buf, off, len);
_dataWritten += len;
//out.flush();
return;
}
@ -90,7 +90,6 @@ class HTTPResponseOutputStream extends FilterOutputStream {
if (i + 1 < len) {
// write out the remaining
out.write(buf, off+i+1, len-i-1);
_dataWritten += len-i-1;
//out.flush();
}
return;
@ -129,10 +128,11 @@ class HTTPResponseOutputStream extends FilterOutputStream {
}
/**
* Tweak that first HTTP response line (HTTP 200 OK, etc)
* Possibly tweak that first HTTP response line (HTTP/1.0 200 OK, etc).
* Overridden on server side.
*
*/
protected static String filterResponseLine(String line) {
protected String filterResponseLine(String line) {
return line;
}
@ -172,17 +172,27 @@ class HTTPResponseOutputStream extends FilterOutputStream {
if (_log.shouldLog(Log.INFO))
_log.info("Response header [" + key + "] = [" + val + "]");
if ("Connection".equalsIgnoreCase(key)) {
String lcKey = key.toLowerCase(Locale.US);
if ("connection".equals(lcKey)) {
out.write("Connection: close\r\n".getBytes());
connectionSent = true;
} else if ("Proxy-Connection".equalsIgnoreCase(key)) {
} else if ("proxy-connection".equals(lcKey)) {
out.write("Proxy-Connection: close\r\n".getBytes());
proxyConnectionSent = true;
} else if ( ("Content-encoding".equalsIgnoreCase(key)) && ("x-i2p-gzip".equalsIgnoreCase(val)) ) {
} else if ("content-encoding".equals(lcKey) && "x-i2p-gzip".equals(val.toLowerCase(Locale.US))) {
_gzip = true;
} else if ("Proxy-Authenticate".equalsIgnoreCase(key)) {
} else if ("proxy-authenticate".equals(lcKey)) {
// filter this hop-by-hop header; outproxy authentication must be configured in I2PTunnelHTTPClient
} else {
if ("content-length".equals(lcKey)) {
// save for compress decision on server side
try {
_dataExpected = Long.parseLong(val);
} catch (NumberFormatException nfe) {}
} else if ("content-type".equals(lcKey)) {
// save for compress decision on server side
_contentType = val;
}
out.write((key.trim() + ": " + val.trim() + "\r\n").getBytes());
}
break;
@ -227,13 +237,13 @@ class HTTPResponseOutputStream extends FilterOutputStream {
protected void beginProcessing() throws IOException {
//out.flush();
PipedInputStream pi = new PipedInputStream();
PipedInputStream pi = BigPipedInputStream.getInstance();
PipedOutputStream po = new PipedOutputStream(pi);
// Run in the client thread pool, as there should be an unused thread
// there after the accept().
// Overridden in I2PTunnelHTTPServer, where it does not use the client pool.
try {
I2PTunnelClientBase._executor.execute(new Pusher(pi, out));
I2PTunnelClientBase.getClientExecutor().execute(new Pusher(pi, out));
} catch (RejectedExecutionException ree) {
// shouldn't happen
throw ree;
@ -242,25 +252,29 @@ class HTTPResponseOutputStream extends FilterOutputStream {
}
private class Pusher implements Runnable {
private InputStream _inRaw;
private OutputStream _out;
private final InputStream _inRaw;
private final OutputStream _out;
public Pusher(InputStream in, OutputStream out) {
_inRaw = in;
_out = out;
}
public void run() {
_in = null;
ReusableGZIPInputStream _in = null;
long written = 0;
ByteArray ba = null;
try {
_in = new InternalGZIPInputStream(_inRaw);
_in = ReusableGZIPInputStream.acquire();
// blocking
_in.initialize(_inRaw);
ba = _cache.acquire();
byte buf[] = ba.getData();
int read = -1;
while ( (read = _in.read(buf)) != -1) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Read " + read + " and writing it to the browser/streams");
_out.write(buf, 0, read);
; _out.write(buf, 0, read);
_out.flush();
written += read;
}
@ -272,13 +286,11 @@ class HTTPResponseOutputStream extends FilterOutputStream {
} catch (OutOfMemoryError oom) {
_log.error("OOM in HTTP Decompressor", oom);
} finally {
if (_log.shouldLog(Log.WARN) && (_in != null))
_log.warn("After decompression, written=" + written +
(_in != null ?
if (_log.shouldLog(Log.INFO) && (_in != null))
_log.info("After decompression, written=" + written +
" read=" + _in.getTotalRead()
+ ", expanded=" + _in.getTotalExpanded() + ", remaining=" + _in.getRemaining()
+ ", finished=" + _in.getFinished()
: ""));
+ ", finished=" + _in.getFinished());
if (ba != null)
_cache.release(ba);
if (_out != null) try {
@ -286,68 +298,21 @@ class HTTPResponseOutputStream extends FilterOutputStream {
} catch (IOException ioe) {}
}
double compressed = (_in != null ? _in.getTotalRead() : 0);
double expanded = (_in != null ? _in.getTotalExpanded() : 0);
if (compressed > 0 && expanded > 0) {
// only update the stats if we did something
double ratio = compressed/expanded;
_context.statManager().addRateData("i2ptunnel.httpCompressionRatio", (int)(100d*ratio), 0);
_context.statManager().addRateData("i2ptunnel.httpCompressed", (long)compressed, 0);
_context.statManager().addRateData("i2ptunnel.httpExpanded", (long)expanded, 0);
if (_in != null) {
double compressed = _in.getTotalRead();
double expanded = _in.getTotalExpanded();
ReusableGZIPInputStream.release(_in);
if (compressed > 0 && expanded > 0) {
// only update the stats if we did something
double ratio = compressed/expanded;
_context.statManager().addRateData("i2ptunnel.httpCompressionRatio", (int)(100d*ratio), 0);
_context.statManager().addRateData("i2ptunnel.httpCompressed", (long)compressed, 0);
_context.statManager().addRateData("i2ptunnel.httpExpanded", (long)expanded, 0);
}
}
}
}
/** just a wrapper to provide stats for debugging */
private static class InternalGZIPInputStream extends GZIPInputStream {
public InternalGZIPInputStream(InputStream in) throws IOException {
super(in);
}
public long getTotalRead() {
try {
return super.inf.getTotalIn();
} catch (Exception e) {
return 0;
}
}
public long getTotalExpanded() {
try {
return super.inf.getTotalOut();
} catch (Exception e) {
return 0;
}
}
/**
* From Inflater javadoc:
* Returns the total number of bytes remaining in the input buffer. This can be used to find out
* what bytes still remain in the input buffer after decompression has finished.
*/
public long getRemaining() {
try {
return super.inf.getRemaining();
} catch (Exception e) {
return 0;
}
}
public boolean getFinished() {
try {
return super.inf.finished();
} catch (Exception e) {
return true;
}
}
@Override
public String toString() {
return "Read: " + getTotalRead() + " expanded: " + getTotalExpanded() + " remaining: " + getRemaining() + " finished: " + getFinished();
}
}
@Override
public String toString() {
return super.toString() + ": " + _in;
}
/*******
public static void main(String args[]) {
String simple = "HTTP/1.1 200 OK\n" +

View File

@ -44,8 +44,8 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
@ -65,21 +65,22 @@ import net.i2p.i2ptunnel.socks.I2PSOCKSIRCTunnel;
import net.i2p.i2ptunnel.socks.I2PSOCKSTunnel;
import net.i2p.i2ptunnel.streamr.StreamrConsumer;
import net.i2p.i2ptunnel.streamr.StreamrProducer;
import net.i2p.util.EventDispatcher;
import net.i2p.util.EventDispatcherImpl;
import net.i2p.util.Log;
/**
* An I2PTunnel tracks one or more I2PTunnelTasks and one or more I2PSessions.
* Usually one of each.
*
* Todo: Most events are not listened to elsewhere, so error propagation is poor
*/
public class I2PTunnel implements Logging, EventDispatcher {
private Log _log;
private EventDispatcherImpl _event;
private I2PAppContext _context;
public class I2PTunnel extends EventDispatcherImpl implements Logging {
private final Log _log;
private final I2PAppContext _context;
private static long __tunnelId = 0;
private long _tunnelId;
private Properties _clientOptions;
private final List<I2PSession> _sessions;
private final long _tunnelId;
private final Properties _clientOptions;
private final Set<I2PSession> _sessions;
public static final int PACKET_DELAY = 100;
@ -96,7 +97,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
private static final String nocli_args[] = { "-nocli", "-die"};
private final List tasks = new ArrayList();
private final List<I2PTunnelTask> tasks = new ArrayList();
private int next_task_id = 1;
private final Set listeners = new CopyOnWriteArraySet();
@ -114,14 +115,14 @@ public class I2PTunnel implements Logging, EventDispatcher {
}
public I2PTunnel(String[] args, ConnectionEventListener lsnr) {
super();
_context = I2PAppContext.getGlobalContext(); // new I2PAppContext();
_tunnelId = ++__tunnelId;
_log = _context.logManager().getLog(I2PTunnel.class);
_event = new EventDispatcherImpl();
// as of 0.8.4, include context properties
Properties p = _context.getProperties();
_clientOptions = p;
_sessions = new ArrayList(1);
_sessions = new CopyOnWriteArraySet();
addConnectionEventListener(lsnr);
boolean gui = true;
@ -193,22 +194,17 @@ public class I2PTunnel implements Logging, EventDispatcher {
/** @return non-null */
List<I2PSession> getSessions() {
synchronized (_sessions) {
return new ArrayList(_sessions);
}
}
void addSession(I2PSession session) {
if (session == null) return;
synchronized (_sessions) {
if (!_sessions.contains(session))
_sessions.add(session);
}
_sessions.add(session);
}
void removeSession(I2PSession session) {
if (session == null) return;
synchronized (_sessions) {
_sessions.remove(session);
}
_sessions.remove(session);
}
public Properties getClientOptions() { return _clientOptions; }
@ -218,9 +214,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
if (tsk.isOpen()) {
tsk.setId(next_task_id);
next_task_id++;
synchronized (tasks) {
tasks.add(tsk);
}
tasks.add(tsk);
}
}
@ -237,7 +231,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
public void runCommand(String cmd, Logging l) {
if (cmd.indexOf(" ") == -1) cmd += " ";
int iii = cmd.indexOf(" ");
String cmdname = cmd.substring(0, iii).toLowerCase();
String cmdname = cmd.substring(0, iii).toLowerCase(Locale.US);
String allargs = cmd.substring(iii + 1);
String[] args = split(allargs, " "); // .split(" "); // java 1.4
@ -305,7 +299,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
*
* @param l logger to receive events and output
*/
public void runHelp(Logging l) {
private static void runHelp(Logging l) {
l.log("Command list:");
l.log("config <i2phost> <i2pport>");
l.log("listen_on <ip>");
@ -398,7 +392,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
notifyEvent("serverTaskId", Integer.valueOf(-1));
throw new IllegalArgumentException(getPrefix() + "Cannot open private key file " + args[2]);
}
I2PTunnelServer serv = new I2PTunnelServer(serverHost, portNum, privKeyFile, args[2], l, (EventDispatcher) this, this);
I2PTunnelServer serv = new I2PTunnelServer(serverHost, portNum, privKeyFile, args[2], l, this, this);
serv.setReadTimeout(readTimeout);
serv.startRunning();
addtask(serv);
@ -449,7 +443,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
notifyEvent("serverTaskId", Integer.valueOf(-1));
throw new IllegalArgumentException(getPrefix() + "Cannot open private key file " + args[2]);
}
I2PTunnelServer serv = new I2PTunnelIRCServer(serverHost, portNum, privKeyFile, args[2], l, (EventDispatcher) this, this);
I2PTunnelServer serv = new I2PTunnelIRCServer(serverHost, portNum, privKeyFile, args[2], l, this, this);
serv.setReadTimeout(readTimeout);
serv.startRunning();
addtask(serv);
@ -510,7 +504,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
notifyEvent("serverTaskId", Integer.valueOf(-1));
throw new IllegalArgumentException(getPrefix() + "Cannot open private key file " + args[3]);
}
I2PTunnelHTTPServer serv = new I2PTunnelHTTPServer(serverHost, portNum, privKeyFile, args[3], spoofedHost, l, (EventDispatcher) this, this);
I2PTunnelHTTPServer serv = new I2PTunnelHTTPServer(serverHost, portNum, privKeyFile, args[3], spoofedHost, l, this, this);
serv.setReadTimeout(readTimeout);
serv.startRunning();
addtask(serv);
@ -586,7 +580,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
throw new IllegalArgumentException(getPrefix() + "Cannot open private key file " + args[4]);
}
I2PTunnelHTTPBidirServer serv = new I2PTunnelHTTPBidirServer(serverHost, portNum, port2Num, privKeyFile, args[3], spoofedHost, l, (EventDispatcher) this, this);
I2PTunnelHTTPBidirServer serv = new I2PTunnelHTTPBidirServer(serverHost, portNum, port2Num, privKeyFile, args[3], spoofedHost, l, this, this);
serv.setReadTimeout(readTimeout);
serv.startRunning();
addtask(serv);
@ -640,7 +634,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
if (portNum <= 0)
throw new IllegalArgumentException(getPrefix() + "Bad port " + args[1]);
I2PTunnelServer serv = new I2PTunnelServer(serverHost, portNum, args[2], l, (EventDispatcher) this, this);
I2PTunnelServer serv = new I2PTunnelServer(serverHost, portNum, args[2], l, this, this);
serv.setReadTimeout(readTimeout);
serv.startRunning();
addtask(serv);
@ -688,12 +682,12 @@ public class I2PTunnel implements Logging, EventDispatcher {
String privateKeyFile = null;
if (args.length >= 4)
privateKeyFile = args[3];
task = new I2PTunnelClient(portNum, args[1], l, ownDest, (EventDispatcher) this, this, privateKeyFile);
task = new I2PTunnelClient(portNum, args[1], l, ownDest, this, this, privateKeyFile);
addtask(task);
notifyEvent("clientTaskId", Integer.valueOf(task.getId()));
} catch (IllegalArgumentException iae) {
String msg = "Invalid I2PTunnel configuration to create an HTTP Proxy connecting to the router at " + host + ':'+ port +
" and listening on " + listenHost + ':' + port;
" and listening on " + listenHost + ':' + portNum;
_log.error(getPrefix() + msg, iae);
l.log(msg);
notifyEvent("clientTaskId", Integer.valueOf(-1));
@ -741,7 +735,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
String proxy = "";
boolean isShared = true;
if (args.length > 1) {
if ("true".equalsIgnoreCase(args[1].trim())) {
if (Boolean.valueOf(args[1].trim()).booleanValue()) {
isShared = true;
if (args.length == 3)
proxy = args[2];
@ -764,12 +758,12 @@ public class I2PTunnel implements Logging, EventDispatcher {
I2PTunnelTask task;
ownDest = !isShared;
try {
task = new I2PTunnelHTTPClient(clientPort, l, ownDest, proxy, (EventDispatcher) this, this);
task = new I2PTunnelHTTPClient(clientPort, l, ownDest, proxy, this, this);
addtask(task);
notifyEvent("httpclientTaskId", Integer.valueOf(task.getId()));
} catch (IllegalArgumentException iae) {
String msg = "Invalid I2PTunnel configuration to create an HTTP Proxy connecting to the router at " + host + ':'+ port +
" and listening on " + listenHost + ':' + port;
" and listening on " + listenHost + ':' + clientPort;
_log.error(getPrefix() + msg, iae);
l.log(msg);
notifyEvent("httpclientTaskId", Integer.valueOf(-1));
@ -810,7 +804,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
String proxy = "";
boolean isShared = true;
if (args.length > 1) {
if ("true".equalsIgnoreCase(args[1].trim())) {
if (Boolean.valueOf(args[1].trim()).booleanValue()) {
isShared = true;
if (args.length == 3)
proxy = args[2];
@ -833,11 +827,11 @@ public class I2PTunnel implements Logging, EventDispatcher {
I2PTunnelTask task;
ownDest = !isShared;
try {
task = new I2PTunnelConnectClient(_port, l, ownDest, proxy, (EventDispatcher) this, this);
task = new I2PTunnelConnectClient(_port, l, ownDest, proxy, this, this);
addtask(task);
} catch (IllegalArgumentException iae) {
String msg = "Invalid I2PTunnel configuration to create a CONNECT client connecting to the router at " + host + ':'+ port +
" and listening on " + listenHost + ':' + port;
" and listening on " + listenHost + ':' + _port;
_log.error(getPrefix() + msg, iae);
l.log(msg);
// Since nothing listens to TaskID events, use this to propagate the error to TunnelController
@ -881,7 +875,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
boolean isShared = true;
if (args.length > 2) {
if ("true".equalsIgnoreCase(args[2].trim())) {
if (Boolean.valueOf(args[2].trim()).booleanValue()) {
isShared = true;
} else if ("false".equalsIgnoreCase(args[2].trim())) {
_log.warn("args[2] == [" + args[2] + "] and rejected explicitly");
@ -898,12 +892,12 @@ public class I2PTunnel implements Logging, EventDispatcher {
String privateKeyFile = null;
if (args.length >= 4)
privateKeyFile = args[3];
task = new I2PTunnelIRCClient(_port, args[1], l, ownDest, (EventDispatcher) this, this, privateKeyFile);
task = new I2PTunnelIRCClient(_port, args[1], l, ownDest, this, this, privateKeyFile);
addtask(task);
notifyEvent("ircclientTaskId", Integer.valueOf(task.getId()));
} catch (IllegalArgumentException iae) {
String msg = "Invalid I2PTunnel configuration to create an IRC client connecting to the router at " + host + ':'+ port +
" and listening on " + listenHost + ':' + port;
" and listening on " + listenHost + ':' + _port;
_log.error(getPrefix() + msg, iae);
l.log(msg);
notifyEvent("ircclientTaskId", Integer.valueOf(-1));
@ -948,16 +942,16 @@ public class I2PTunnel implements Logging, EventDispatcher {
boolean isShared = false;
if (args.length > 1)
isShared = "true".equalsIgnoreCase(args[1].trim());
isShared = Boolean.valueOf(args[1].trim()).booleanValue();
ownDest = !isShared;
try {
I2PTunnelTask task = new I2PSOCKSTunnel(_port, l, ownDest, (EventDispatcher) this, this, null);
I2PTunnelTask task = new I2PSOCKSTunnel(_port, l, ownDest, this, this, null);
addtask(task);
notifyEvent("sockstunnelTaskId", Integer.valueOf(task.getId()));
} catch (IllegalArgumentException iae) {
String msg = "Invalid I2PTunnel configuration to create a SOCKS Proxy connecting to the router at " + host + ':'+ port +
" and listening on " + listenHost + ':' + port;
" and listening on " + listenHost + ':' + _port;
_log.error(getPrefix() + msg, iae);
l.log(msg);
notifyEvent("sockstunnelTaskId", Integer.valueOf(-1));
@ -992,19 +986,19 @@ public class I2PTunnel implements Logging, EventDispatcher {
boolean isShared = false;
if (args.length == 2)
isShared = "true".equalsIgnoreCase(args[1].trim());
isShared = Boolean.valueOf(args[1].trim()).booleanValue();
ownDest = !isShared;
String privateKeyFile = null;
if (args.length == 3)
privateKeyFile = args[2];
try {
I2PTunnelTask task = new I2PSOCKSIRCTunnel(_port, l, ownDest, (EventDispatcher) this, this, privateKeyFile);
I2PTunnelTask task = new I2PSOCKSIRCTunnel(_port, l, ownDest, this, this, privateKeyFile);
addtask(task);
notifyEvent("sockstunnelTaskId", Integer.valueOf(task.getId()));
} catch (IllegalArgumentException iae) {
String msg = "Invalid I2PTunnel configuration to create a SOCKS IRC Proxy connecting to the router at " + host + ':'+ port +
" and listening on " + listenHost + ':' + port;
" and listening on " + listenHost + ':' + _port;
_log.error(getPrefix() + msg, iae);
l.log(msg);
notifyEvent("sockstunnelTaskId", Integer.valueOf(-1));
@ -1048,13 +1042,13 @@ public class I2PTunnel implements Logging, EventDispatcher {
throw new IllegalArgumentException(getPrefix() + "Bad port " + args[0]);
try {
StreamrConsumer task = new StreamrConsumer(_host, _port, args[2], l, (EventDispatcher) this, this);
StreamrConsumer task = new StreamrConsumer(_host, _port, args[2], l, this, this);
task.startRunning();
addtask(task);
notifyEvent("streamrtunnelTaskId", Integer.valueOf(task.getId()));
} catch (IllegalArgumentException iae) {
String msg = "Invalid I2PTunnel configuration to create a Streamr Client connecting to the router at " + host + ':'+ port +
" and sending to " + _host + ':' + port;
" and sending to " + _host + ':' + _port;
_log.error(getPrefix() + msg, iae);
l.log(msg);
notifyEvent("streamrtunnnelTaskId", Integer.valueOf(-1));
@ -1097,7 +1091,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
return;
}
StreamrProducer task = new StreamrProducer(_port, privKeyFile, args[1], l, (EventDispatcher) this, this);
StreamrProducer task = new StreamrProducer(_port, privKeyFile, args[1], l, this, this);
task.startRunning();
addtask(task);
notifyEvent("streamrtunnelTaskId", Integer.valueOf(task.getId()));
@ -1110,13 +1104,14 @@ public class I2PTunnel implements Logging, EventDispatcher {
/**
* Specify the i2cp host and port
* Deprecated - only used by CLI
*
* Sets the event "configResult" = "ok" or "error" after the configuration has been specified
*
* @param args {hostname, portNumber}
* @param l logger to receive events and output
*/
public void runConfig(String args[], Logging l) {
private void runConfig(String args[], Logging l) {
if (args.length == 2) {
host = args[0];
listenHost = host;
@ -1131,13 +1126,14 @@ public class I2PTunnel implements Logging, EventDispatcher {
/**
* Specify whether to use its own destination for each outgoing tunnel
* Deprecated - only used by CLI
*
* Sets the event "owndestResult" = "ok" or "error" after the configuration has been specified
*
* @param args {yes or no}
* @param l logger to receive events and output
*/
public void runOwnDest(String args[], Logging l) {
private void runOwnDest(String args[], Logging l) {
if (args.length == 1 && (args[0].equalsIgnoreCase("yes") || args[0].equalsIgnoreCase("no"))) {
ownDest = args[0].equalsIgnoreCase("yes");
notifyEvent("owndestResult", "ok");
@ -1193,21 +1189,22 @@ public class I2PTunnel implements Logging, EventDispatcher {
/**
* Generate a new keypair
* Deprecated - only used by CLI
*
* Sets the event "genkeysResult" = "ok" or "error" after the generation is complete
*
* @param args {privateKeyFilename, publicKeyFilename} or {privateKeyFilename}
* @param l logger to receive events and output
*/
public void runGenKeys(String args[], Logging l) {
private static void runGenKeys(String args[], Logging l) {
OutputStream pubdest = null;
if (args.length == 2) {
try {
pubdest = new FileOutputStream(args[1]);
} catch (IOException ioe) {
l.log("Error opening output stream");
_log.error(getPrefix() + "Error generating keys to out", ioe);
notifyEvent("genkeysResult", "error");
//_log.error(getPrefix() + "Error generating keys to out", ioe);
//notifyEvent("genkeysResult", "error");
return;
}
} else if (args.length != 1) {
@ -1215,7 +1212,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
l.log(" creates a new keypair and prints the public key.\n"
+ " if pubkeyfile is given, saves the public key there." + "\n"
+ " if the privkeyfile already exists, just print/save" + "the pubkey.");
notifyEvent("genkeysResult", "error");
//notifyEvent("genkeysResult", "error");
}
try {
File privKeyFile = new File(args[0]);
@ -1225,66 +1222,64 @@ public class I2PTunnel implements Logging, EventDispatcher {
} else {
makeKey(new FileOutputStream(privKeyFile), pubdest, l);
}
notifyEvent("genkeysResult", "ok");
//notifyEvent("genkeysResult", "ok");
} catch (IOException ioe) {
l.log("Error generating keys - " + ioe.getMessage());
notifyEvent("genkeysResult", "error");
_log.error(getPrefix() + "Error generating keys", ioe);
//notifyEvent("genkeysResult", "error");
//_log.error(getPrefix() + "Error generating keys", ioe);
}
}
/**
* Generate a new keypair
* Deprecated - only used by CLI
*
* Sets the event "privateKey" = base64 of the privateKey stream and
* sets the event "publicDestination" = base64 of the destination
*
* @param l logger to receive events and output
*/
public void runGenTextKeys(Logging l) {
private static void runGenTextKeys(Logging l) {
ByteArrayOutputStream privkey = new ByteArrayOutputStream(512);
ByteArrayOutputStream pubkey = new ByteArrayOutputStream(512);
makeKey(privkey, pubkey, l);
l.log("Private key: " + Base64.encode(privkey.toByteArray()));
notifyEvent("privateKey", Base64.encode(privkey.toByteArray()));
notifyEvent("publicDestination", Base64.encode(pubkey.toByteArray()));
//notifyEvent("privateKey", Base64.encode(privkey.toByteArray()));
//notifyEvent("publicDestination", Base64.encode(pubkey.toByteArray()));
}
/**
* Exit the JVM if there are no more tasks left running. If there are tunnels
* running, it returns.
* Deprecated - only used by CLI
*
* Sets the event "quitResult" = "error" if there are tasks running (but if there
* aren't, well, there's no point in setting the quitResult to "ok", now is there?)
*
* @param l logger to receive events and output
*/
public void runQuit(Logging l) {
private void runQuit(Logging l) {
purgetasks(l);
synchronized (tasks) {
if (tasks.isEmpty()) {
System.exit(0);
}
if (tasks.isEmpty()) {
System.exit(0);
}
l.log("There are running tasks. Try 'list'.");
notifyEvent("quitResult", "error");
//notifyEvent("quitResult", "error");
}
/**
* Retrieve a list of currently running tasks
* Deprecated - only used by CLI
*
* Sets the event "listDone" = "done" after dumping the tasks to
* the logger
*
* @param l logger to receive events and output
*/
public void runList(Logging l) {
private void runList(Logging l) {
purgetasks(l);
synchronized (tasks) {
for (int i = 0; i < tasks.size(); i++) {
I2PTunnelTask t = (I2PTunnelTask) tasks.get(i);
l.log("[" + t.getId() + "] " + t.toString());
}
for (I2PTunnelTask t : tasks) {
l.log("[" + t.getId() + "] " + t.toString());
}
notifyEvent("listDone", "done");
}
@ -1313,14 +1308,8 @@ public class I2PTunnel implements Logging, EventDispatcher {
argindex++;
}
if (args[argindex].equalsIgnoreCase("all")) {
List curTasks = null;
synchronized (tasks) {
curTasks = new LinkedList(tasks);
}
boolean error = false;
for (int i = 0; i < curTasks.size(); i++) {
I2PTunnelTask t = (I2PTunnelTask) curTasks.get(i);
for (I2PTunnelTask t : tasks) {
if (!closetask(t, forced, l)) {
notifyEvent("closeResult", "error");
error = true;
@ -1345,13 +1334,14 @@ public class I2PTunnel implements Logging, EventDispatcher {
/**
* Run all of the commands in the given file (one command per line)
* Deprecated - only used by CLI
*
* Sets the event "runResult" = "ok" or "error" after the closing is complete
*
* @param args {filename}
* @param l logger to receive events and output
*/
public void runRun(String args[], Logging l) {
private void runRun(String args[], Logging l) {
if (args.length == 1) {
try {
BufferedReader br = new BufferedReader(new FileReader(args[0]));
@ -1376,13 +1366,14 @@ public class I2PTunnel implements Logging, EventDispatcher {
/**
* Perform a lookup of the name specified
* Deprecated - only used by CLI
*
* Sets the event "lookupResult" = base64 of the destination, or an error message
*
* @param args {name}
* @param l logger to receive events and output
*/
public void runLookup(String args[], Logging l) {
private void runLookup(String args[], Logging l) {
if (args.length != 1) {
l.log("lookup <name>");
l.log(" try to resolve the name into a destination key");
@ -1406,17 +1397,18 @@ public class I2PTunnel implements Logging, EventDispatcher {
/**
* Start up a ping task with the specified args (currently supporting -ns, -h, -l)
* Deprecated - only used by CLI
*
* Sets the event "pingTaskId" = Integer of the taskId, or -1
*
* @param allargs arguments to pass to the I2Ping task
* @param l logger to receive events and output
*/
public void runPing(String allargs, Logging l) {
private void runPing(String allargs, Logging l) {
if (allargs.length() != 0) {
I2PTunnelTask task;
// pings always use the main destination
task = new I2Ping(allargs, l, false, (EventDispatcher) this, this);
task = new I2Ping(allargs, l, false, this, this);
addtask(task);
notifyEvent("pingTaskId", Integer.valueOf(task.getId()));
} else {
@ -1442,9 +1434,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
boolean closed = false;
_log.debug(getPrefix() + "closetask(): looking for task " + num);
synchronized (tasks) {
for (Iterator it = tasks.iterator(); it.hasNext();) {
I2PTunnelTask t = (I2PTunnelTask) it.next();
for (I2PTunnelTask t : tasks) {
int id = t.getId();
if (_log.shouldLog(Log.DEBUG))
_log.debug(getPrefix() + "closetask(): parsing task " + id + " (" + t.toString() + ")");
@ -1454,7 +1444,6 @@ public class I2PTunnel implements Logging, EventDispatcher {
} else if (id > num) {
break;
}
}
}
return closed;
}
@ -1482,15 +1471,14 @@ public class I2PTunnel implements Logging, EventDispatcher {
*
*/
private void purgetasks(Logging l) {
synchronized (tasks) {
for (Iterator it = tasks.iterator(); it.hasNext();) {
I2PTunnelTask t = (I2PTunnelTask) it.next();
List<I2PTunnelTask> removed = new ArrayList();
for (I2PTunnelTask t : tasks) {
if (!t.isOpen()) {
_log.debug(getPrefix() + "Purging inactive tunnel: [" + t.getId() + "] " + t.toString());
it.remove();
removed.add(t);
}
}
}
tasks.removeAll(removed);
}
/**
@ -1511,7 +1499,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
* @param pubDest location to store the destination
* @param l logger to send messages to
*/
public static void makeKey(OutputStream writeTo, OutputStream pubDest, Logging l) {
private static void makeKey(OutputStream writeTo, OutputStream pubDest, Logging l) {
try {
l.log("Generating new keys...");
I2PClient client = I2PClientFactory.createClient();
@ -1536,7 +1524,7 @@ public class I2PTunnel implements Logging, EventDispatcher {
* @param pubDest stream to write the destination to
* @param l logger to send messages to
*/
public static void showKey(InputStream readFrom, OutputStream pubDest, Logging l) {
private static void showKey(InputStream readFrom, OutputStream pubDest, Logging l) {
try {
Destination d = new Destination();
d.readBytes(readFrom);
@ -1657,41 +1645,4 @@ public class I2PTunnel implements Logging, EventDispatcher {
public interface ConnectionEventListener {
public void routerDisconnected();
}
/* Required by the EventDispatcher interface */
public EventDispatcher getEventDispatcher() {
return _event;
}
public void attachEventDispatcher(EventDispatcher e) {
_event.attachEventDispatcher(e.getEventDispatcher());
}
public void detachEventDispatcher(EventDispatcher e) {
_event.detachEventDispatcher(e.getEventDispatcher());
}
public void notifyEvent(String e, Object a) {
_event.notifyEvent(e, a);
}
public Object getEventValue(String n) {
return _event.getEventValue(n);
}
public Set getEvents() {
return _event.getEvents();
}
public void ignoreEvents() {
_event.ignoreEvents();
}
public void unIgnoreEvents() {
_event.unIgnoreEvents();
}
public Object waitEventValue(String n) {
return _event.waitEventValue(n);
}
}

View File

@ -9,7 +9,6 @@ import java.util.List;
import java.util.StringTokenizer;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.data.DataFormatException;
import net.i2p.data.Destination;
import net.i2p.util.EventDispatcher;
import net.i2p.util.Log;

View File

@ -14,10 +14,8 @@ import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.RejectedExecutionException;
@ -36,8 +34,6 @@ import net.i2p.data.Destination;
import net.i2p.util.EventDispatcher;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer;
public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runnable {
@ -51,7 +47,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
protected long _clientId;
protected final Object sockLock = new Object(); // Guards sockMgr and mySockets
protected I2PSocketManager sockMgr; // should be final and use a factory. LINT
protected List mySockets = new ArrayList();
protected final List<I2PSocket> mySockets = new ArrayList();
protected boolean _ownDest;
protected Destination dest = null;
@ -59,7 +55,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
private boolean listenerReady = false;
private ServerSocket ss;
protected ServerSocket ss;
private final Object startLock = new Object();
private boolean startRunning = false;
@ -68,7 +64,6 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
// private byte[] pubkey;
private String handlerName;
private String privKeyFile;
// true if we are chained from a server.
@ -83,12 +78,17 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
* Extending classes may use it for other purposes.
* Not for use by servers, as there is no limit on threads.
*/
static final Executor _executor;
private static volatile ThreadPoolExecutor _executor;
private static int _executorThreadCount;
static {
_executor = new CustomThreadPoolExecutor();
}
private static final Object _executorLock = new Object();
/**
* This constructor always starts the tunnel (ignoring the i2cp.delayOpen option).
* It is used to add a client to an existing socket manager.
*
* @param localPort if 0, use any port, get actual port selected with getLocalPort()
* @param sktMgr the existing socket manager
*/
public I2PTunnelClientBase(int localPort, Logging l, I2PSocketManager sktMgr,
I2PTunnel tunnel, EventDispatcher notifyThis, long clientId )
throws IllegalArgumentException {
@ -98,7 +98,6 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
_clientId = clientId;
this.localPort = localPort;
this.l = l;
this.handlerName = localPort + " #" + _clientId;
_ownDest = true; // == ! shared client
_context = tunnel.getContext();
_context.statManager().createRateStat("i2ptunnel.client.closeBacklog", "How many pending sockets remain when we close one due to backlog?", "I2PTunnel", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
@ -107,8 +106,12 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
_context.statManager().createRateStat("i2ptunnel.client.buildRunTime", "How long it takes to run a queued socket into an i2ptunnel runner?", "I2PTunnel", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
_log = _context.logManager().getLog(getClass());
synchronized (_executorLock) {
if (_executor == null)
_executor = new CustomThreadPoolExecutor();
}
Thread t = new I2PAppThread(this, "Client " + tunnel.listenHost + ':' + localPort);
listenerReady = false;
t.start();
open = true;
synchronized (this) {
@ -130,6 +133,14 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
}
}
/**
* The main constructor.
* This may take a LONG time if building and starting a new manager.
*
* @param localPort if 0, use any port, get actual port selected with getLocalPort()
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
* badly that we can't create a socketManager
*/
public I2PTunnelClientBase(int localPort, boolean ownDest, Logging l,
EventDispatcher notifyThis, String handlerName,
I2PTunnel tunnel) throws IllegalArgumentException {
@ -137,10 +148,14 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
}
/**
* @param pkf null to generate a transient key
* Use this to build a client with a persistent private key.
* This may take a LONG time if building and starting a new manager.
*
* @param localPort if 0, use any port, get actual port selected with getLocalPort()
* @param pkf Path to the private key file, or null to generate a transient key
*
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
* badly that we cant create a socketManager
* badly that we can't create a socketManager
*/
public I2PTunnelClientBase(int localPort, boolean ownDest, Logging l,
EventDispatcher notifyThis, String handlerName,
@ -149,7 +164,6 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
_clientId = ++__clientId;
this.localPort = localPort;
this.l = l;
this.handlerName = handlerName + _clientId;
_ownDest = ownDest; // == ! shared client
@ -160,6 +174,11 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
_context.statManager().createRateStat("i2ptunnel.client.buildRunTime", "How long it takes to run a queued socket into an i2ptunnel runner?", "I2PTunnel", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
_log = _context.logManager().getLog(getClass());
synchronized (_executorLock) {
if (_executor == null)
_executor = new CustomThreadPoolExecutor();
}
// normalize path so we can find it
if (pkf != null) {
File keyFile = new File(pkf);
@ -170,7 +189,10 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
// no need to load the netDb with leaseSets for destinations that will never
// be looked up
tunnel.getClientOptions().setProperty("i2cp.dontPublishLeaseSet", "true");
boolean dccEnabled = (this instanceof I2PTunnelIRCClient) &&
Boolean.valueOf(tunnel.getClientOptions().getProperty(I2PTunnelIRCClient.PROP_DCC)).booleanValue();
if (!dccEnabled)
tunnel.getClientOptions().setProperty("i2cp.dontPublishLeaseSet", "true");
boolean openNow = !Boolean.valueOf(tunnel.getClientOptions().getProperty("i2cp.delayOpen")).booleanValue();
if (openNow) {
@ -183,17 +205,17 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
}
}
if (sockMgr == null) {
l.log("Invalid I2CP configuration");
throw new IllegalArgumentException("Socket manager could not be created");
}
// can't be null unless we limit the loop above
//if (sockMgr == null) {
// l.log("Invalid I2CP configuration");
// throw new IllegalArgumentException("Socket manager could not be created");
//}
l.log("Tunnels ready for client: " + handlerName);
} // else delay creating session until createI2PSocket() is called
Thread t = new I2PAppThread(this);
t.setName("Client " + _clientId);
listenerReady = false;
t.start();
open = true;
synchronized (this) {
@ -219,7 +241,8 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
}
/**
* Sets the this.sockMgr field if it is null, or if we want a new one
* Sets the this.sockMgr field if it is null, or if we want a new one.
* This may take a LONG time if building a new manager.
*
* We need a socket manager before getDefaultOptions() and most other things
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
@ -258,27 +281,33 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
/**
* this is ONLY for shared clients
* This is ONLY for shared clients.
* This may take a LONG time if building a new manager.
*
* @return non-null
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
* badly that we cant create a socketManager
*/
protected synchronized I2PSocketManager getSocketManager() {
protected I2PSocketManager getSocketManager() {
return getSocketManager(getTunnel(), this.privKeyFile);
}
/**
* this is ONLY for shared clients
* This is ONLY for shared clients.
* This may take a LONG time if building a new manager.
*
* @return non-null
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
* badly that we cant create a socketManager
*/
protected static synchronized I2PSocketManager getSocketManager(I2PTunnel tunnel) {
protected static I2PSocketManager getSocketManager(I2PTunnel tunnel) {
return getSocketManager(tunnel, null);
}
/**
* this is ONLY for shared clients
* This is ONLY for shared clients.
* This may take a LONG time if building a new manager.
*
* @return non-null
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
* badly that we cant create a socketManager
@ -293,6 +322,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
_log.info(tunnel.getClientOptions().getProperty("inbound.nickname") + ": Building a new socket manager since the old one closed [s=" + s + "]");
if (s != null)
tunnel.removeSession(s);
// We could be here a LONG time, holding the lock
socketManager = buildSocketManager(tunnel, pkf);
} else {
if (_log.shouldLog(Log.INFO))
@ -307,6 +337,8 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
}
/**
* This may take a LONG time.
*
* @return non-null
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
* badly that we cant create a socketManager
@ -315,6 +347,8 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
return buildSocketManager(getTunnel(), this.privKeyFile, this.l);
}
/**
* This may take a LONG time.
*
* @return non-null
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
* badly that we cant create a socketManager
@ -327,6 +361,8 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
private static final int MAX_RETRIES = 4;
/**
* This may take a LONG time.
*
* @param pkf absolute path or null
* @return non-null
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
@ -337,6 +373,8 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
}
/**
* This may take a LONG time.
*
* @param pkf absolute path or null
* @return non-null
* @throws IllegalArgumentException if the I2CP configuration is b0rked so
@ -357,7 +395,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
}
I2PSocketManager sockManager = null;
// Todo: Can't stop a tunnel from the UI while it's in this loop (no session yet)
// FIXME: Can't stop a tunnel from the UI while it's in this loop (no session yet)
int retries = 0;
while (sockManager == null) {
if (pkf != null) {
@ -512,7 +550,7 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
if (localPort == 0) {
localPort = ss.getLocalPort();
}
notifyEvent("clientLocalPort", new Integer(ss.getLocalPort()));
notifyEvent("clientLocalPort", Integer.valueOf(ss.getLocalPort()));
// duplicates message in constructor
//l.log("Listening for clients on port " + localPort + " of " + getTunnel().listenHost);
@ -551,6 +589,30 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
}
}
/**
* @return may be null if no class has been instantiated
* @since 0.8.8
*/
static ThreadPoolExecutor getClientExecutor() {
return _executor;
}
/**
* @since 0.8.8
*/
static void killClientExecutor() {
synchronized (_executorLock) {
if (_executor != null) {
_executor.setRejectedExecutionHandler(new ThreadPoolExecutor.DiscardPolicy());
_executor.shutdownNow();
_executor = null;
}
// kill the shared client, so that on restart in android
// we won't latch onto the old one
socketManager = null;
}
}
/**
* Manage the connection just opened on the specified socket
*
@ -558,8 +620,16 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
*/
protected void manageConnection(Socket s) {
if (s == null) return;
ThreadPoolExecutor tpe = _executor;
if (tpe == null) {
_log.error("No executor for socket!");
try {
s.close();
} catch (IOException ioe) {}
return;
}
try {
_executor.execute(new BlockingRunner(s));
tpe.execute(new BlockingRunner(s));
} catch (RejectedExecutionException ree) {
// should never happen, we have an unbounded pool and never stop the executor
try {
@ -610,11 +680,11 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
synchronized (sockLock) {
if (sockMgr != null) {
mySockets.retainAll(sockMgr.listSockets());
if (!forced && mySockets.size() != 0) {
l.log("There are still active connections!");
if ((!forced) && (!mySockets.isEmpty())) {
l.log("Not closing, there are still active connections!");
_log.debug("can't close: there are still active connections!");
for (Iterator it = mySockets.iterator(); it.hasNext();) {
l.log("->" + it.next());
for (I2PSocket s : mySockets) {
l.log(" -> " + s.toString());
}
return false;
}
@ -630,12 +700,12 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
try {
if (ss != null) ss.close();
} catch (IOException ex) {
ex.printStackTrace();
if (_log.shouldLog(Log.WARN))
_log.warn("error closing", ex);
return false;
}
//l.log("Client closed.");
}
return true;
}

View File

@ -9,12 +9,10 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
import java.util.StringTokenizer;
import net.i2p.I2PAppContext;
import net.i2p.I2PException;
import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketOptions;
@ -24,6 +22,7 @@ import net.i2p.data.Destination;
import net.i2p.util.EventDispatcher;
import net.i2p.util.FileUtil;
import net.i2p.util.Log;
import net.i2p.util.PortMapper;
/**
* Supports the following:
@ -151,6 +150,20 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
return opts;
}
@Override
public void startRunning() {
super.startRunning();
_context.portMapper().register(PortMapper.SVC_HTTPS_PROXY, getLocalPort());
}
@Override
public boolean close(boolean forced) {
int reg = _context.portMapper().getPort(PortMapper.SVC_HTTPS_PROXY);
if (reg == getLocalPort())
_context.portMapper().unregister(PortMapper.SVC_HTTPS_PROXY);
return super.close(forced);
}
protected void clientConnectionRun(Socket s) {
InputStream in = null;
OutputStream out = null;
@ -163,7 +176,6 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
in = s.getInputStream();
String line, method = null, host = null, destination = null, restofline = null;
StringBuilder newRequest = new StringBuilder();
int ahelper = 0;
String authorization = null;
while (true) {
// Use this rather than BufferedReader because we can't have readahead,
@ -193,7 +205,7 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
restofline = request.substring(pos); // ":80 HTTP/1.1" or " HTTP/1.1"
}
if (host.toLowerCase().endsWith(".i2p")) {
if (host.toLowerCase(Locale.US).endsWith(".i2p")) {
// Destination gets the host name
destination = host;
} else if (host.indexOf(".") != -1) {
@ -209,7 +221,7 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
destination = currentProxy;
usingWWWProxy = true;
newRequest.append("CONNECT ").append(host).append(restofline).append("\r\n"); // HTTP spec
} else if (host.toLowerCase().equals("localhost")) {
} else if (host.toLowerCase(Locale.US).equals("localhost")) {
writeErrorMessage(ERR_LOCALHOST, out);
s.close();
return;
@ -224,7 +236,7 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
_log.debug(getPrefix(requestId) + "REST :" + restofline + ":");
_log.debug(getPrefix(requestId) + "DEST :" + destination + ":");
}
} else if (line.toLowerCase().startsWith("proxy-authorization: basic ")) {
} else if (line.toLowerCase(Locale.US).startsWith("proxy-authorization: basic ")) {
// strip Proxy-Authenticate from the response in HTTPResponseOutputStream
// save for auth check below
authorization = line.substring(27); // "proxy-authorization: basic ".length()
@ -261,7 +273,7 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
}
}
if (destination == null || !"CONNECT".equalsIgnoreCase(method)) {
if (destination == null || method == null || !"CONNECT".equals(method.toUpperCase(Locale.US))) {
writeErrorMessage(ERR_BAD_PROTOCOL, out);
s.close();
return;
@ -305,7 +317,8 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
else
response = SUCCESS_RESPONSE;
Runnable onTimeout = new OnTimeout(s, s.getOutputStream(), targetRequest, usingWWWProxy, currentProxy, requestId);
I2PTunnelRunner runner = new I2PTunnelRunner(s, i2ps, sockLock, data, response, mySockets, onTimeout);
// starts itself
new I2PTunnelRunner(s, i2ps, sockLock, data, response, mySockets, onTimeout);
} catch (SocketException ex) {
_log.info(getPrefix(requestId) + "Error trying to connect", ex);
handleConnectClientException(ex, out, targetRequest, usingWWWProxy, currentProxy, requestId);

View File

@ -8,7 +8,6 @@ import java.io.InputStream;
import java.net.InetAddress;
import net.i2p.util.EventDispatcher;
import net.i2p.util.Log;
public class I2PTunnelHTTPBidirServer extends I2PTunnelHTTPServer {

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