Commit Graph

115 Commits

Author SHA1 Message Date
shendaras
418531736b imports
Did you miss me?
(shendaras)
2004-05-09 01:31:12 +00:00
jrandom
07b6a8ba92 if we lose our I2CP connection to the router, die hard and fast.
(only relevent for people whose socket manager / i2ptunnel / etc are located remote from the router)
2004-05-07 07:01:26 +00:00
jrandom
f772d6ddeb /me reboots brain, understands, and thanks mihi 2004-05-07 04:19:43 +00:00
jrandom
45ec73c115 include a unique request id in the client runner thread name
minor cleanup
2004-05-07 03:33:23 +00:00
mihi
4021deec7f poke jrandom's eyes into the semantic of an "else" clause
(you may remove both comments when you understood it)

[mihi]
2004-05-07 03:10:57 +00:00
mihi
a3977f37f7 javadoc, no functional changes 2004-05-07 03:06:41 +00:00
jrandom
766c12242e logging, javadoc 2004-05-07 01:45:12 +00:00
jrandom
a82b951aff made private things that don't need to be public
remove semantic inconsistency wrt getRemoteId(false) - it shouldn't ever timeout, since it always returns immediately
javadoc (though i wish i understood the close/close2/sendClose more clearly so i could javadoc that process)
2004-05-07 01:32:48 +00:00
jrandom
635535aac2 implement keyfile persistence (storing name=privKeyDataBase64\n for each name)
filename specified on the command line: SAMBridge [keyfile [listenHost] listenPortNum [ name=val]*]
2004-05-06 07:35:44 +00:00
jrandom
e0e7211852 lets default the read timeout to 5 minutes for clients (that hanging irc disconnect / not disconnected thing) 2004-05-05 22:57:43 +00:00
jrandom
07aa2e280d strip the Connection, Keep-Alive, and Proxy-Connection headers, and always inject Connection: close
(this is the cause of the intermittent "view $page through squid, try to view eepsite, end up requesting through squid" bug)
2004-05-05 07:29:48 +00:00
jrandom
6c4bc67ff3 simplistic streaming test (w00t, the streams worked - no mods necessary. go human, its your birthday, go human, its your birthday) 2004-05-05 04:43:05 +00:00
jrandom
59aec9d289 expose the read timeout for the client and put the default read timeout back to -1 for the server (override via command line, etc) 2004-05-05 03:36:18 +00:00
jrandom
3db8b63cde by default, set the readTimeout to 3 minutes, NOT infinity. Overridable as before (setting the timeout to -1)
add a unique id to the server thread
2004-05-04 08:16:41 +00:00
jrandom
6edf5d1e4f add a unique id to the thread names 2004-05-04 08:15:18 +00:00
jrandom
a23fa6fadd allow multiple concurrent connections to be created
added a unique ID to more threads
2004-05-04 08:14:19 +00:00
jrandom
51eb77e409 logging 2004-05-04 08:13:01 +00:00
jrandom
691326cea8 make sure we kill the threads that failed to ACK, rather than leave them sitting there, waiting forever
logging
2004-05-04 08:09:28 +00:00
jrandom
3cac1238ed handle reclose, logging, more clear notification 2004-05-04 05:53:11 +00:00
jrandom
3a4d0549aa add accept timeouts (default is that if the server doesnt .accept() in 5s, refuse the con)
add unique IDs to the various threads for logging / tracing purposes
2004-05-04 04:44:05 +00:00
jrandom
d7467f5dc3 disconnect isn't an error 2004-05-04 01:58:37 +00:00
jrandom
141902b86d parseParams throws exception on bad formatting, and its perfectly valid to have params with 0 values (e.g. DEST GENERATE\n) 2004-05-04 01:35:09 +00:00
jrandom
5aa680fc93 simple test of whether DEST GENERATE works 2004-05-04 01:32:39 +00:00
jrandom
a790117f5a test the naming commnads (fetching ME, a known host, and an unknown host) 2004-05-04 01:11:44 +00:00
jrandom
2156f4c2f3 * more verbose errors (include MESSAGE data on the I2P_ERROR reply, not just in the log)
* don't create excess I2PAppContexts (if any old context will do, use the global)
keep track of keys per spec (when DESTINATION=blah, create (or reuse) the destination private
keys).  we still need to persist this data though.
* the DESTINATION in the SESSION STATUS is now the same as the one sent in the
SESSION CREATE, /not/ the base64 of the private key, per spec
* enum is a reserved word in 1.5, so s/enum/names/ for future compatability
* logging
2004-05-03 11:34:38 +00:00
jrandom
2585460286 initial tests for HELLO and create session (style=stream). covers the basics, but doesn't cover a single normal scenario yet 2004-05-03 11:16:59 +00:00
jrandom
2bfbe1ca27 logging (toss a unique ID onto the handler / inactivity threads) 2004-05-03 03:36:38 +00:00
jrandom
60584228d9 refactored packet handling into type specific methods
removed nested synchronization (which had been causing undetected deadlocks)
made sync blocks smaller, though this may have opened holes related to
resent ACK/SYN/CLOSE packets that are delivered in a race.  I'm not as
fluent in the ministreaming lib code as i should be (yet), but duck's thread
dumps were showing hundreds of threads waiting on a lock that'll never get
released (since the only way to release it would be to receive another
packet, and no more packets can be received until the lock is released, etc)
also, I2PSession is threadsafe - i can see no reason to synchronize on it
(and it was being synchronized on only part of the time?)
also, refactored the charset encoding stuff and minor log tweaking
i've been testing this for the last hour or so, on eepsites and squid (large
and small files), as well as irc, and there haven't been any glitches.  but
it needs more testing before it can be released, obviously.
2004-05-03 03:34:25 +00:00
jrandom
44e34f7b11 trim the request line (StringTokenizer w/ " " as a delim doesn't include \n as a delim, etc) 2004-05-02 07:50:20 +00:00
jrandom
7912050647 allow overriding the I2CP port/host 2004-05-02 07:49:22 +00:00
jrandom
2231abd407 default the DIRECTION to BOTH for streams 2004-05-02 07:07:25 +00:00
jrandom
68a21f1fbb NTP client, GPLed 2004-05-02 04:18:53 +00:00
jrandom
1a38271104 made the event name more consistent 2004-04-30 23:01:35 +00:00
jrandom
f7212112b8 mark the ping datapoint before actually sending it, for those instances where a reply can be sent back faster than the ACK of the send 2004-04-30 06:58:42 +00:00
jrandom
86d55b32a6 include the (redundant) rtt in the output file to let tools that dont know how to combine columns do so
*cough*
2004-04-30 06:56:25 +00:00
jrandom
e73eb55d75 don't create two contexts just for this I2PTunnel (one implicit from the static new Log(I2PTunnel.class) and one explicit) 2004-04-24 12:51:15 +00:00
jrandom
393b1d7674 big ol' update to strip out the singletons, replacing them with
a rooted app context.  The core itself has its own I2PAppContext
(see its javadoc for, uh, docs), and the router extends that to
expose the router's singletons.  The main point of this is to
make it so that we can run multiple routers in the same JVM, even
to allow different apps in the same JVM to switch singleton
implementations (e.g. run some routers with one set of profile
calculators, and other routers with a different one).
There is still some work to be done regarding the actual boot up
of multiple routers in a JVM, as well as their configuration,
though the plan is to have the RouterContext override the
I2PAppContext's getProperty/getPropertyNames methods to read from
a config file (seperate ones per context) instead of using the
System.getProperty that the base I2PAppContext uses.
Once the multi-router is working, i'll shim in a VMCommSystem
that doesn't depend upon sockets or threads to read/write (and
that uses configurable message send delays / disconnects / etc,
perhaps using data from the routerContext.getProperty to drive it).
I could hold off until the sim is all working, but there's a
truckload of changes in here and I hate dealing with conflicts ;)
Everything works - I've been running 'er for a while and kicked
the tires a bit, but if you see something amiss, please let me
know.
2004-04-24 11:54:35 +00:00
human
c29a6b95ae Increased logging priority for connection timeouts
(human)
2004-04-23 14:18:48 +00:00
human
4fe7105e2f Implemented timeout handling to I2PTunnelServer 2004-04-21 17:58:26 +00:00
human
d7c3a53f2d Initial implementation of read() timeout on I2PSocket. Let's see whether it
could solve duck's problems with dangling threads...
(human)
2004-04-21 17:56:16 +00:00
human
90350786e6 s/InterruptedException/InterruptedIOException/
(human)
2004-04-20 15:43:04 +00:00
human
8038e1ee7d I2PSocketManager.connect() should have thrown InterruptedIOException, and *not*
InterruptedException (oops!)
(human)
2004-04-20 15:38:55 +00:00
jrandom
65f1a5fed6 write out the public dest every time we connect, /including/ the first time. (thanks duck) 2004-04-20 13:30:09 +00:00
jrandom
c03cb1de5e revised GUI fetch/build/dist process - at the top level, run
'ant prepGUI' to fetch and prepare the jfreechart code
'ant buildGUI' to build the jars necessary
'ant distGUI' to build a gui.zip that contains the jars and a
license notice related to the LGPL and APL software linked
within it.
("installing" the GUI == unzip gui.zip into the I2P install dir)
2004-04-20 09:13:07 +00:00
jrandom
7e1b49a742 fixed up some of the cleanup code to handle out of order responses
minor refactoring, formatting
2004-04-20 07:42:53 +00:00
jrandom
d26c56e467 verbose4life 2004-04-20 07:39:47 +00:00
jrandom
203d0e870a allow the user to override the I2CP options (exposed on the command line, ala
SAMBridge [[listenHost ]listenPort[ name=val]*]
where listenHost defaults to localhost, listenPort defaults to 7656, and name=val
can be the I2CP options to override (e.g. i2cp.tcp.host=localhost i2cp.tcp.port=4001)
2004-04-20 07:26:34 +00:00
human
ebc3e05f23 * Made the SAM bridge aware of the new exceptions thrown by
I2PSocketManager.connect(), with better error reporting to SAM clients;
* made SAMStreamSession destroy the associated I2PSocketManager when being
  closed.
(human)
2004-04-19 21:52:52 +00:00
human
674ad899f9 Made HTTPTunnel aware of the new exceptions thrown by
I2PSocketManager.connect()
(human)
2004-04-19 21:48:14 +00:00
human
d945eb6fcf Made all the ministreaming-based apps aware of the new exceptions thrown by
I2PSocketManager.connect()
(human)
2004-04-19 21:47:06 +00:00