* revert some of the overly zealous peer distribution code - select randomly from the fast peers, not according to a strict LRU
(which was causing lots of queued up tunnel requests, as well as tunnel failures when they all failed)
need to think some more thunks about how to address this right now. a few different algorithms available
to deal with different scenarios and #s of users, but nothing that by itself strikes me as 'ideal', yet. perhaps its
time for another trip to the pub to see what inspiration can be found there ;)
* removed all of the "temporary" threads used for adding timeouts to blocking socket operations:
- use the ConnectionEstablisher's thread + a SimpleTimer.TimedEvent callback to timeout socket create
- added a pool of socket handler threads (size=3 atm) for receiving any inbound sockets, which are
pulled off a queue, after which a handshake occurs to verify the other side is I2NP (along side
another SimpleTimer.TimedEvent callback in case that blocks)
this should get the last of the temporary threads (Jetty has its own thread pool for dealing with
HTTP requests, so we can ignore that thread created in the AdminRunner). The only significant
reduction in threads left is to go with either NIO or UDP, but neither are happening in the immediate
future.
* use that to render the last few lines of the wrapper log on /logs.jsp (for the on demand stack trace)
* thread creation / finalization logging
* support a hard restart (stop immediately and restart the JVM) - useful for rerunning clients.config (etc)
* systray when not supported
* hook in to the service manager and let it know we're exiting gracefully (when appropriate)
* commented out but generally functional systray integration. i cant get it to build sometimes though, something is b0rking up
- set the nonce and noncePrev for the handler when rendering the form
- include the current nonce in the hidden parameter "nonce"
- include an "action" parameter (so we know we want to execute something and hence, validate the nonce, rather than just display the page)
- if the nonce submitted doesnt match what is set in the nonce or noncePrev when validating, its invalid. refuse to process
* new safer way of shutting down the router per discussions with oOo (dealing with a graceful
shutdown where the user updates their config before the shutdown is complete, etc)
* graceful shutdown implemented in the router - shutdownGracefully(), cancelGracefulShutdown(), shutdownInProgress()
into account various skew situations and the capacity growth constant with
the intent of producing a higher quality threshold whenever possible
* increased the minimum # of fast peers from 4 to 8 (yay), which means we'll
try to have at least some peers to choose from
* added a new router config option - "router.maxParticipatingTunnels". This is
useful for gracefully shutting down the router (aka set it to 0 and wait until
the router is no longer participating in tunnels, then shutdown). You can
probably also come up with other situations where this is useful, but I don't
want to spoil all the fun ;)