Commit Graph

362 Commits

Author SHA1 Message Date
cf780e296e bugfixes for autodetection/update of IP address 2004-09-27 18:05:28 +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
63355ecd5b more tcp transport updates (getting closer to the old functionality)
* avoid bad peers
* shitlist appropriately
* include the bandwidth limiter
* add socket timeouts
* deal with *cough* closing connections
* javadocs
2004-09-26 18:11:39 +00:00
0f54ba59fb die phttp die 2004-09-26 15:32:24 +00:00
b67b243ebd the following isn't the end of the 0.4.1 updates, as there are still more things left to clean
up and debug in the new tcp transport, but it all works, and i dont like having big changes
sitting on my local machine (and there's no real need for branching atm)
2004-09-26  jrandom
    * Complete rewrite of the TCP transport with IP autodetection and
      low CPU overhead reconnections.  More concise connectivity errors
      are listed on the /oldconsole.jsp as well.  The IP autodetection works
      by listening to the first person who tells you what your IP address is
      when you have not defined one yourself and you have no other TCP
      connections.
    * Update to the I2NP message format to add transparent verification at
      the I2NP level (beyond standard TCP verification).
    * Remove a potential weakness in our AESEngine's safeEncrypt and safeDecrypt
      implementation (rather than verifying with E(H(key)), we now verify with
      E(H(iv))).
    * The above changes are NOT BACKWARDS COMPATIBLE.
    * Removed all of the old unused PHTTP code.
    * Refactor various methods and clean up some javadoc.
2004-09-26 15:16:44 +00:00
ea5662a4a2 another minor semantic jikes warning 2004-09-23 01:21:33 +00:00
54dce61a95 2004-09-21 jrandom
* Have two tiers of hosts.txt files - the standard "hosts.txt" and
      the new "userhosts.txt".  Updates to I2P will only overwrite the former,
      but values stored in the later take precedence.  Both are queried on
      lookup.
2004-09-22 00:10:26 +00:00
05acf32f39 2004-09-16 jrandom
* Refactor the TCP transport to deal with changing identities gracefully,
      and to prevent some wasted effort by keeping track of what host+port
      combinations we are connected to (rather than just the identities).  Also
      catch a few configuration errors earlier.
    * Removed no longer relevent methods from the Transport API that were
      exposing ideas that probably shouldn't be exposed.
    * Removed the 0.4.0.1 specific files from i2pupdate.zip (relating to script
      updates)
2004-09-16 23:55:12 +00:00
10e93c3b1b rename (wtf was i thinking "Calculator"...) 2004-09-16 02:04:40 +00:00
51285efbc3 2004-09-13 jrandom
* Update for the SDK reconnection to deal with overflow.
    * Web improvements (@ not # on the /logs.jsp [thanks ugha!] and fixed the
      rounding on lifetime bandwidth used [thanks gott!]).
2004-09-13 03:08:16 +00:00
39f3d6cc80 (release in the next hour or so)
2004-09-08  jrandom
    * Updated the "Active:" peer count to display the # of connections as well
      as the number of recently active router identities.
    * Implement some basic updating code - on startup, if there is a file named
      "i2pupdate.zip" in the I2P installation directory, extract it, delete it,
      then restart.
    * Added an ugly little script to allow launching the router on win9x
      machines without a dos box (using javaw to run a .bat file).
    * Logging updates.
    * Updated VERSION constants to 0.4.0.1
2004-09-09 02:26:42 +00:00
58461ff5bb * Bugfix: Running the installer as a non-privileged user on Red Hat (and
hopefully any other affected *nix systems) now properly discards non-
   essential directories after installation.
* Support for Win9x in the installer and postinstall.bat.
* Changed the name of the default installation directory on all platforms
   from "I2P" to "i2p" in the installer.
* Changed "wrapper.conf" to "wrapper.config" for naming consistency with the
   other configuration files.
2004-09-08 22:04:13 +00:00
6ceb330baa 2004-09-07 jrandom
* Make sure that peers placed in the 'fast' group are ones we both know
      how to reach and have been able to reach recently.  These peers may
      still be placed in the 'high capacity' group however (though that group
      is only queried if the 'fast' group is too small)
    * Include some updates to the ProgileOrganizer's CLI.
2004-09-07 22:13:11 +00:00
05cd3d736b 2004-09-07 jrandom
* Disable the timestamper by default for all applications except the router
      (enable via -Dtime.disabled=false)
    * Simplify the retrieval of the full destination with text based browsers.
    * Bundle the updated wrapper.config and hosts.txt in the i2pupdate.tar.bz2
2004-09-07 09:49:02 +00:00
6151d63eac 2004-09-07 jrandom
* Write the native libraries to the current directory when they are loaded
      from a resource, and load them from that file on subsequent runs (in
      turn, we no longer *cough* delete the running libraries...)
    * Added support for a graceful restart.
    * Added new pseudo-shutdown hook specific to the router, allowing
      applications to request tasks to be run when the router shuts down.  We
      use this for integration with the service manager, since otherwise a
      graceful shutdown would cause a timeout, followed by a forced hard
      shutdown.
    * Handle a bug in the SimpleTimer with requeued tasks.
    * Made the capacity calculator a bit more dynamic by not outright ignoring
      the otherwise valid capacity data for a period with a single rejected
      tunnel (except for the 10 minute period).  In addition, peers with an
      equal capacity are ordered by speed rather than by their hashes.
    * Cleaned up the SimpleTimer, addressing some threading and synchronization
      issues.
    * When an I2PTunnel client or httpclient is explicitly closed, destroy the
      associated session (unless there are other clients using it), and deal
      with a closed session when starting a new I2PTunnel instance.
    * Refactoring and logging.
2004-09-07 07:17:02 +00:00
da3c4b87c1 (oops, forgot to up the build # on the last round) 2004-09-06 05:21:26 +00:00
0eedc1b128 2004-09-06 jrandom
* Address a race condition in the key management code that would manifest
      itself as a corrupt router identity.
    * Properly clear old transport addresses from being displayed on the old
      console after soft restarts.
    * Properly refuse to load the client applications more than once in the
      same JVM.
    * Added support for a graceful restart (a graceful shutdown followed by a
      full JVM restart - useful for restarting client apps).
    * More defensive programming, HTML cleanup, logging
    * wrapper.config cleanup of duplicate lines
2004-09-06 05:20:40 +00:00
db339d40de 2004-09-04 jrandom
* Added some basic guards to prevent multiple instances from running.
       Specifically, a file "router.ping" in the install directory which is
       written to once a minute - if that file exists and has been modified
       within the last minute, refuse to start up.  In turn, adjust the
       service wrapper to wait a minute before restarting a crashed JVM.
     * Create a "work" directory in the I2P install dir which Jetty will
       use for all of its temporary files.
     * Tell the browser not to cache most of the router console's pages.
2004-09-04 21:54:08 +00:00
6bc92b26a7 2004-09-04 jrandom
* Update the SDK to automatically reconnect indefinitely with an
      exponential delay on retries (capped at 5 minutes).
2004-09-04 05:41:42 +00:00
63937d0fba 2004-09-03 jrandom
* Updated default wrapper.config to deal with the hard restart option
    * Include the history.txt in the /help.jsp page
    * HTML updates (wrapper.log, and no more unix scripts)
    * Updated VERSION constants to 0.4
2004-09-03 19:46:07 +00:00
49d4e565c6 2004-09-03 oOo
* Added some filters to the HTTP request, replacing the User-Agent,
      Referrer, Via, and From headers, which helps until we have a more
      comprehensive filtering system.
2004-09-03  jrandom
    * Disabled the old listener on port 7655.
2004-09-03 07:22:24 +00:00
44c54ecc16 2004-09-02 jrandom
* Cleaned up the base build.xml, adding a new target ("updater") which
      builds the file i2pupdate.tar.bz2 which can be safely extracted over
      existing installs.
2004-09-02 21:26:03 +00:00
6e543f825d new history file and RouterVersion.BUILD (displayed on the web console and in the published stats)
(see soon-to-be-posted email to the list about this stuff)
2004-09-02 20:00:28 +00:00
446d863106 use the new .jsp filenames (i'm not quite ready to drop support for this old admin console... yet) 2004-09-02 07:20:45 +00:00
252ec98e24 default to publish rankings & stats (disable via router.publishPeerRankings=false) 2004-09-02 05:41:30 +00:00
8c4c72c8b5 * in the multirouter (sim), give each router a randomly distributed clock skew (within the acceptable period)
* in the multirouter (sim), disable the timestamper (so the clock skew 'sticks')
* logging
2004-08-30 22:28:15 +00:00
49d7b568df * removed some failsafe code that had been preventing any messages from being sent down alternate tunnels in a leaseSet [oops]
this may have unintended consequences, as we need to deal with messages received from skewed clocks, but I believe the two pathways
used here are safe (we leave the larger timeout thresholds intact for dealing with remotely generated message times)
2004-08-30 08:29:06 +00:00
07ef3582f7 clarify the nextInt/nextLong boundaries (thanks oOo) 2004-08-29 22:42:21 +00:00
b9e667e155 if a netDb refetch of a lease we were able to fetch is going slowly, short circuit it by reinjecting the old (dropped) one after 10 seconds so we can attempt a resend 2004-08-29 20:56:24 +00:00
4eb5070753 clear another possible thread leak 2004-08-27 23:52:13 +00:00
f57adc9cc4 don't fail the tunnels used to send/receive a request on a lost reply, as the potential that they're to blame is only 1 out of 5.
(and if other people's tunnels suck, that leads us to kill all of our tunnels.  which is Bad)
2004-08-27 20:56:00 +00:00
3e0b7bfeff cleaned up peer selection so we don't have to repeatedly ask the profileOrganizer the same thing over and over
(instead, have the profileOrganizer check the netDb to see if the profiled peer is reachable)
cleaned up the threshold calculation a bit more
2004-08-27 19:18:24 +00:00
a5ed02eb1c fixed some foolishness w/ booleans (thanks oOo!) 2004-08-27 02:04:49 +00:00
e3379b31cb only base the thresholds on peers who are not in recovery 2004-08-26 18:46:25 +00:00
c73f3385c0 don't ask the bandwidth limiter to authorize reading an EOF ;)
(this fixes the longstanding "-318 bytes read" bug)
2004-08-26 17:59:47 +00:00
36b446c012 * never drop the threshold under the baseline (the peer selection algorithm can handle there being no fast peers, etc)
* 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 ;)
2004-08-26 08:07:48 +00:00
fab3c0df3e take care of another scenario where a thread can leak 2004-08-26 03:08:19 +00:00
7e7f97d72a * add a new simplified version of java.util.Timer/TimedEvent
* 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.
2004-08-25 20:17:46 +00:00
3a1fcf2865 oh, you mean we should actually stop waiting for something on a thread that has nothing left to do? what a concept!
(this should kill the leaking thread issue)
2004-08-25 19:49:07 +00:00
e81c1df19f * helper to read the last few lines of a textfile
* 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
2004-08-24 18:02:48 +00:00
cdafefebd3 the shutdown detector is a daemon 2004-08-24 03:19:54 +00:00
eef8c06b39 new shutdown(exitCode) usage 2004-08-23 21:34:22 +00:00
9f7320fa67 * new configservice.jsp page that shuts down the router (and has hooks for a few other things)
* 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()
2004-08-23 07:33:14 +00:00
8e3e8ada32 * refactored and revamped the capacity threshold calculation to take
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 ;)
2004-08-23 03:54:55 +00:00
190d0f9304 never ignore a (potential) tunnel failure, even though the tunnel may not have failed
(e.g. test outbound through A with a reply inbound through B.  if the message is lost, which tunnel failed?  both!)
2004-08-22 22:00:21 +00:00
84e03f8b16 0.3.4.3, backwards compatible, to be released later today 2004-08-20 19:56:34 +00:00
288580aed7 be more accepting in what router references we receive (let them be up to 6h old before throwing a hissy fit) 2004-08-20 19:55:46 +00:00
8b30852639 might as well link 'em to the netDb like the shitlist 2004-08-20 00:31:42 +00:00
bdaa14c257 formatting fix 2004-08-20 00:19:58 +00:00
687ca781ab the DoS isn't CRIT and we log instances and publish the stat appropriately 2004-08-19 23:18:38 +00:00