Commit Graph

54 Commits

Author SHA1 Message Date
14bacc272e propagate from branch 'i2p.i2p' (head 439bb8be3133559026640ebd22fdf93d10ba2cb9)
to branch 'i2p.i2p.str4d.ui' (head 83c1a136effdf092093e9af799a138e86da7ec43)
2017-01-08 01:37:15 +00:00
zzz
afa5a193a7 Console: Add jsps to view entire router.log and wrapper.log files
Add links to /logs
Add some headers to the history.txt jsp
javadocs
2016-08-21 20:21:50 +00:00
33229a31ee Use tables for /logs 2016-04-18 05:46:58 +00:00
zzz
4e635aa485 Console: Add JSTL version to /logs 2016-04-16 16:05:19 +00:00
22b9876b68 Rename _() for translation to _t() for Java 9 compatibility (ticket #1456) 2015-09-25 19:55:36 +00:00
zzz
fa1c077fdd * Console: Show unavailable crypto on /logs
* Router: Log warnings for unavailable crypto at startup
2014-08-30 19:00:57 +00:00
b84682fdc9 * findbugs: mostly stream closure fixes in router, apps, core 2014-04-21 10:54:52 +00:00
zzz
05aa88b4e8 * /logs: Fix encoding of wrapper log section (ticket #1193)
- remove a cast in FileUtil
2014-01-31 18:34:27 +00:00
zzz
e394d3d4c5 * DatabaseLookupmessage:
- Add support for requesting an encrypted reply
* NetDB:
  - Add support for encrypted DatabaseSearchReplyMessage and DatabaseStoreMessage
    in response to a DatabaseLookupMessage
* PRNG: Cleanups using Collections.singletonMap()
* Router utils: New RemovableSingletonSet
* TransientSessionKeyManager:
  - Support variable expiration for inbound tag sets
  - Several efficiency improvements
* VersionComparator: Add static method, use most places
2013-05-26 17:25:02 +00:00
zzz
f1dd77982a RouterConsole compile fixes for Jetty 7.
Convert LocaleWebAppHandler from extending WebAppContext to
extending HandlerWrapper, since handle() is now final in WebAppContext.
Untested.
2012-11-21 20:49:18 +00:00
zzz
32f3ca0568 * logs.jsp:
- Don't display dup message if last
   - Spacing tweaks
2012-10-29 22:10:42 +00:00
zzz
4db4010abf propagate from branch 'i2p.i2p' (head 2da3b585b42d058e25909bc303d72277ae2463b5)
to branch 'i2p.i2p.zzz.update' (head ebbad994215dc2822e9a1776399864ed77a0e5a0)
2012-10-14 22:42:00 +00:00
zzz
6b97e1bfaf * Logs:
- Flush buffers in logs.jsp
   - Add dup message to buffers, was in file only
2012-10-07 20:50:26 +00:00
zzz
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
c4f9485e13 * Console: Add full file path to thread dump message 2012-05-20 18:12:41 +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
7874488a61 * logs.jsp: Use wrapper method to find wrapper log if available 2012-01-14 17:46:34 +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
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
708e943c44 updates after review 2012-01-06 00:38:33 +00:00
zzz
87008f3fe3 make jetty version comparable 2011-12-30 22:12:30 +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
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
zzz
97fe1baf6a * Console: Add Jetty version to logs page 2011-11-16 00:48:17 +00:00
zzz
b3711e31ad color by default 2011-09-01 13:25:18 +00:00
zzz
0f91899aa9 * Console: Fix HTML errors in form message box,
logs.jsp, netdb.jsp, profiles.jsp, stats.jsp
2011-03-12 16:11:10 +00:00
zzz
0e53445e91 * logs.jsp: Format multiline messages better 2010-11-06 12:34:53 +00:00
zzz
07aa07981d * logs.jsp: Add message if wrapper log not found
(ticket #103)
2010-10-31 14:52:09 +00:00
zzz
466128c179 * replaceAll() -> replace() when not using regex
* ampersand escaping (lots more to do)
2010-10-19 14:39:29 +00:00
zzz
6100c799b7 LogConsoleBuffer cleanup 2010-10-02 15:03:20 +00:00
zzz
afd54fc212 logs.jsp tweak 2009-12-30 22:25:21 +00:00
zzz
1fc32c5e6f more logs.jsp tagging 2009-12-26 19:54:27 +00:00
z3d
1811e3b9cd Whitespace rationalization; theme enhancements; draft itoopie graphic for proxy errors. 2009-10-12 23:55:21 +00:00
35da3f3334 HTML bugfixes in routerconsole pages. 2009-08-15 16:08:33 +00:00
z3d
5d40ad1749 Add <code> tags to location(s) for logs. 2009-07-16 02:48:44 +00:00
z3d
ab66dfcb65 Cosmetic tweaks and under the radar flag sabotage. 2009-07-15 23:57:28 +00:00
zzz
abc23e9a49 * Move almost all uses of StringBuffer to StringBuilder,
for efficiency (thanks Arsene for the suggestion)
2009-07-01 16:00:43 +00:00
zzz
256c5356fb Add router log location to logs.jsp 2009-06-28 17:40:17 +00:00
zzz
24daf00616 * i2prouter:
- Don't cd to script location, no longer required
    * RouterLaunch:
      - If no wrapper, put wrapper.log in system temp dir
        unless specified with -Dwrapper.logfile=/path/to/wrapper.log
        or it already exists in CWD (for backward compatibility)
      - Append rather than replace wrapper.log
      - Pass wrapper log location to router as a property, so that logs.jsp can find it
    * logs.jsp:
      - Get wrapper log location from a property too
    * runplain.sh:
      - Add path substitution to runplain.sh on install
      - Pass I2P base dir to the router as a property
    * wrapper.config:
      - Put wrapper.log in system temp dir for new installs
      - Pass I2P base dir to the router as a property
    * WorkingDir:
      - Don't migrate an existing install by default
      - Never migrate the data (too hard)
2009-06-13 21:04:27 +00:00
zzz
524a25eb2c Big directory rework.
Eliminate all uses of the current working directory, and
set up multiple directories specified by absolute paths for various uses.

Add a WorkingDir class to create a user config directory and
migrate files to it for new installs.
The directory will be $HOME/.i2p on linux and %APPDIR%\I2P on Windows,
or as specified in the system property -Di2p.dir.config=/path/to/i2pdir
All files except for the base install and temp files will be
in the config directory by default.
Temp files will be in a i2p-xxxxx subdirectory of the system temp directory
specified by the system property java.io.tmpdir.

Convert all file opens in the code to be relative to a specific directory,
as specified in the context. Code and applications should never open
files relative to the current working directory (e.g. new File("foo")).
All files should be accessed in the appropriate context directory,
e.g. new File(_context.getAppDir(), "foo").

The router.config file location may be specified as a system property on the
java command line with -Drouter.configLocation=/path/to/router.config
All directories may be specified as properties in the router.config file.

The migration will copy all files from an existing installation,
except i2psnark/, with the system property -Di2p.dir.migrate=true.
Otherwise it will just set up a new directory with a minimal configuration.

The migration will also create a modified wrapper.config and (on linux only)
a modified i2prouter script, and place them in the config directory.

There are no changes to the installer or the default i2prouter, i2prouter.bat,
i2prouter, wrapper.config, runplain.sh, windows service installer/uninstaller,
etc. in this checkin.


    *  Directories. These are all set at instantiation and will not be changed by
    *  subsequent property changes.
    *  All properties, if set, should be absolute paths.
    *
    *  Name	Property 	Method		Files
    *  -----	-------- 	-----		-----
    *  Base	i2p.dir.base	getBaseDir()	lib/, webapps/, docs/, geoip/, licenses/, ...
    *  Temp	i2p.dir.temp	getTempDir()	Temporary files
    *  Config	i2p.dir.config	getConfigDir()	*.config, hosts.txt, addressbook/, ...
    *
    *  (the following all default to the same as Config)
    *
    *  Router	i2p.dir.router	getRouterDir()	netDb/, peerProfiles/, router.*, keyBackup/, ...
    *  Log	i2p.dir.log	getLogDir()	wrapper.log*, logs/
    *  PID	i2p.dir.pid	getPIDDir()	wrapper *.pid files, router.ping
    *  App	i2p.dir.app	getAppDir()	eepsite/, ...
    *
    *  Note that we can't control where the wrapper actually puts its files.

All these will be set appropriately in a Router Context.
In an I2P App Context, all except Temp will be the current working directory.

Lightly tested so far, needs much more testing.
2009-06-04 19:14:40 +00:00
zzz
69e6393442 * Routerconsole:
- Move common methods to new HelperBase class
      - Make reseed link a button
2009-01-29 02:16:18 +00:00
zzz
7c083ed33b * logs.jsp: Remove unused connection log, cut wrapper log output in half
* configlogging.jsp: Increase box width
2008-09-15 16:23:47 +00:00
10dde610dc 2005-10-30 dust
* Merge sucker into syndie with a rssimport.jsp page.
    * Add getContentType() to EepGet.
    * Make chunked transfer work (better) with EepGet.
    * Do replaceAll("<","&lt;") for logs.
2005-10-30 05:47:55 +00:00
2d15a42137 big code cleanup to reduce number of compiler warnings 2005-03-01 23:25:15 +00:00
c17433cb93 2005-02-22 jrandom
* Adjusted (and fixed...) the timestamper change detection
    * Deal with a rare reordering bug at the beginning of a stream (so we
      don't drop it unnecessarily)
    * Cleaned up some dropped message handling in the router
    * Reduced job queue churn when dealing with a large number of tunnels by
      sharing an expiration job
    * Keep a separate list of the most recent CRIT messages (shown on the
      logs.jsp).  This way they don't get buried among any other messages.
    * For clarity, display the tunnel variance config as "Randomization" on
      the web console.
    * If lease republishing fails (boo! hiss!) try it again
    * Actually fix the negative jobLag in the right place (this time)
    * Allow reseeding when there are less than 10 known peer references
    * Lots of logging updates.
2005-02-22 07:07:29 +00:00
8bd99f699f 2004-11-25 jrandom
* Revised the installer to include start menu and desktop shortcuts for
      windows platforms, including pretty icons (thanks DrWoo!)
    * Allow clients specified in clients.config to have an explicit startup
      delay.
    * Update the default install to launch a browser pointing at the console
      whenever I2P starts up, rather than only the first time it starts up
      (configurable on /configservice.jsp, or in clients.config)
    * Bugfix to the clock skew checking code to monitor the delta between
      offsets, not the offset itself (duh)
    * Router console html update
    * New (and uuuuugly) code to verify that the wrapper.config contains
      the necessary classpath entries on update.  If it has to update the
      wrapper.config, it will stop the JVM and service completely, since the
      java service wrapper doesn't reread the wrapper.config on JVM restart -
      requiring the user to manually restart the service after an update.
    * Increase the TCP connection timeout to 30s (which is obscenely long)
------------------------------------------------
2004-11-25 21:57:19 +00:00
010b285e67 2004-09-29 jrandom
* Always wipe the Jetty work directory on startup, so that web updates
      are reflected immediately (Jetty does not honor the cache across
      multiple executions)
in addition, refactor various file ops out of the DataHelper into FileUtil
2004-09-29 19:34:02 +00:00
0361246db0 2004-09-27 jrandom
* Limit the number of connection tags saved to 10,000.  This is a huge
      limit, but consumes no more than 1MB of RAM.  For now, we drop them
      randomly after reaching that size, forcing those dropped peers to use
      a full DH negotiation.
    * HTML cleanup in the console.
2004-09-27 07:57:43 +00:00