Commit Graph

3438 Commits

Author SHA1 Message Date
zzz
e62b76d2cc Big refactor of the router console update subsystem, in preparation for
implementing out-of-console updaters like i2psnark.

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

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

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

New and moved classes:

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

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

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

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

move				NewsHandler from NewsFetcher
new				NewsFetcher
new				NewsTimerTask

new				DummyHandler


Initial checkin. Unfinished, untested, unpolished.
2012-06-18 22:09:45 +00:00
zzz
273d7399a0 jump table tweak 2012-06-15 01:30:58 +00:00
zzz
5ce0479268 tweaks 2012-06-15 01:29:29 +00:00
zzz
de3ce6cdb7 handle jump servers with ports 2012-06-14 22:08:40 +00:00
zzz
3e192cc57e remove text about restart 2012-06-14 22:07:28 +00:00
zzz
e522ffad4e * I2PTunnel:
- More client options cleanups
   - Options changes now propagate to running
     socket managers and sessions, and through to the router
 * SocketManager:
   - Simplify factory, use 4-arg constructor,
     make fields final, deprecate 0-arg constructor
   - Improve how options are updated
   - Javadocs
2012-06-14 19:44:47 +00:00
zzz
64221fb3fb * I2PSocketEepGet: Use specified port
* I2PTunnel:
   - Don't strip port from an I2P URL
2012-06-14 19:42:07 +00:00
zzz
c73044b6b4 * Streaming:
- Channel cleanups and comments
   - New I2PSocketAddress
2012-06-13 19:08:49 +00:00
zzz
ad1b356879 * i2psnark: Possible fix for piece-after-choke 2012-06-13 19:04:11 +00:00
zzz
07caf2e316 * I2PSocketEepGet: Set port to 80
* I2PTunnel:
   - Pass port through HTTP client proxy
   - HTTP server proxy sets host header to
     the value of "spoofedhost.xx" option for port xx
   - Set client options more efficiently
2012-06-13 19:02:09 +00:00
zzz
6e077ee621 * i2psnark:
- Reduce TrackerClient threads
   - Reduce delay between peer adds for faster startup
   - Thread the announces and reduce timeout when stopping
2012-06-11 19:38:33 +00:00
zzz
30e2f73d5f * i2psnark:
- Display torrent file downloads in torrent area
   - Sort magnets and downloads first
   - Fix sorting problem when torrent dir is a symlink
   - Reduce max file idle time
   - arrow_down icon copied from console css
2012-06-11 12:04:40 +00:00
zzz
e0313814b8 disable private config for default trackers 2012-06-08 16:39:10 +00:00
zzz
59df524a91 * i2psnark:
- Move private tracker config from create box to torrent config
   - Refactor private and open tracker configuration
   - Add private indication on details page
2012-06-08 16:11:55 +00:00
zzz
b304393bc3 * netdb.jsp: Don't show our info on summary page since there's a tab for it now 2012-06-08 16:10:26 +00:00
zzz
e1c9cd6cdc * i2psnark: Take tracker out of opentracker list when removed 2012-06-04 14:25:53 +00:00
0abbe45a6d correct flag country (I copied the line and changed all but the flag) 2012-06-03 15:02:27 +00:00
403d6a322a Italian language updates from tx & debconf updates
-10
2012-06-03 14:34:39 +00:00
4ec20ef796 typo fix (*facepalm*) 2012-06-03 14:09:41 +00:00
3b7eaa107e s/$ENGLISHNAME/$NATIVENAME/g 2012-06-03 13:52:27 +00:00
8375e9129d enable Hungarian in another spot 2012-06-03 13:46:33 +00:00
53fbece6b5 Hungarian language translation by AdminLMH from TX
Thanks!
2012-06-03 13:46:07 +00:00
zzz
7d94f9fb19 improve opentracker configuration 2012-06-02 13:49:14 +00:00
zzz
324e9c960d fix partially-complete torrent not announcing 2012-06-01 14:12:32 +00:00
zzz
96575e61f2 * Console: Tab the netdb and profile pages 2012-06-01 13:30:38 +00:00
zzz
e1823ece68 whitespace fix 2012-06-01 13:27:01 +00:00
zzz
38a4f05000 * i2psnark:
- Close connection immediately if bad protocol,
     this makes blacklist work better too
   - Stop adding peers when we hit the limit
   - Lower limit for outbound connections so we give
     new peers a better chance in large swarms
2012-05-31 15:20:50 +00:00
zzz
041c87a2c9 * i2psnark:
- Add per-hour conn limit
   - Blacklist peer after two bad handshakes
   - Reduce connect timeout
2012-05-31 12:19:27 +00:00
zzz
f14ff31a20 * Timestamper:
- Move from core to router, leave stub in core
     so it doesn't break compatibility. This removes a
     thread in app context and prevents any app context from
     running NTP; external clients must use the time
     received from the router.
   - Increase query interval
2012-05-30 20:03:30 +00:00
zzz
ddc329e8f1 Handle URI encoding, UTF-8, and multiple trackers in magnet links 2012-05-30 19:45:45 +00:00
zzz
8453c34bfc Improve rarest-first behavior by not favoring a partial piece
held by multiple peers when requesting from a seed
2012-05-30 15:21:37 +00:00
zzz
c6fcdf967c increase per-minute conn limit from 6 to 8 2012-05-30 14:10:03 +00:00
zzz
1427c502c0 Reduce log level to warn for normal EofException when generating graphs 2012-05-30 14:09:16 +00:00
zzz
4e84370128 Increase max upstream form field to 4 digits (9999) ticket #645 2012-05-30 14:06:45 +00:00
df3771e791 merge of '60890b0ffbf109b297bd6dd66a28d8179322331a'
and '7e63908db8b78229f8f0c963050b062ce0f6dd96'
2012-05-25 21:09:25 +00:00
464279ca1c German, Spanish, and Swedish translations from Transifex 2012-05-25 12:40:12 +00:00
6014de9cd5 Italian translation updates from Transifex (thanks colombo-bt!) 2012-05-25 11:05:22 +00:00
10bd1343c3 Changes to structure of /home.jsp to bring it back in line with /console.jsp 2012-05-25 00:43:29 +00:00
zzz
4979f8dace - Custom tracker map AIOOBE fix, thx kytv 2012-05-23 22:40:03 +00:00
zzz
501f2f85d5 * jobs.jsp: Add more queue diagnostics 2012-05-23 16:37:43 +00:00
zzz
580bb5a6fe * i2psnark:
- Fixes when complete except for skipped files
     (ticket #447) status in UI, don't connect outbound,
     disconnect seeds when done
   - More classes pkg private
2012-05-23 16:36:37 +00:00
zzz
e27df771aa - Fix deadlock when changing file priorities 2012-05-22 19:26:37 +00:00
zzz
0f321f1597 - Refactor tracker map 2012-05-22 18:19:52 +00:00
zzz
10872f751e - Prevent torrent shutdown when changing file priority to skip 2012-05-22 18:18:30 +00:00
zzz
f06d99480d javadoc fixes 2012-05-21 12:53:56 +00:00
zzz
c2e39687e6 * RoutingKeyModifier: Several changes to ensure the routing key
is correctly changed just after midnight.
2012-05-20 18:20:48 +00:00
zzz
d8b3d2c508 * i2psnark:
- Create sparse files at torrent creation and delay
     "ballooning" until first write (ticket #641)
   - Redo clear messages button
   - Concurrent message queue
2012-05-20 18:15:36 +00:00
zzz
c4f9485e13 * Console: Add full file path to thread dump message 2012-05-20 18:12:41 +00:00
zzz
9cff4d5a42 final 2012-05-20 18:12:20 +00:00
zzz
6ca4b519bf * i2psnark:
- Store received chunks in temp files
   - Don't allocate from heap for unneeded chunks
   - Remove peer count restriction for torrents with large pieces
   - Use priorities and rarest calculations to sort partials
   - Preserve p parameter in clear messages link
2012-05-19 13:27:02 +00:00