Commit Graph

183 Commits

Author SHA1 Message Date
jrandom
cdaeb4d176 track and publish two new stats:
* netDb.failedPeers (how many peers didn't reply to a lookup in time)
* netDb.searchCount (how many searches we send out in a 3 hour period)
probabalistically include the leaseSet of the sender in the garlic sent
to a peer if the client requests it to be included (aka if they want
replies).  By default, this is enabled (disable by setting the I2CP
prop "shouldBundleReplyInfo=false").  Also, by default the probability is
30% (w00 h00, arbitrary values!), which can be overridden via the I2CP
prop "bundleReplyInfoProbability=80" (or =10, or =100, etc).  The tradeoff
here is quicker replies in exchange for bandwidth (the dbStore).
Yeah, it'd be nice if there were something keeping track of which leaseSet
each client sent to each peer so that it could explicitly include it only
if it were necessary, but for now that's probably overkill.
2004-05-05 22:46:10 +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
d9f0cc27ef formatting 2004-05-05 03:37:26 +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
451f4c503d fixed typo on timestamper, keep NetMonitor off by default 2004-05-05 01:32:08 +00:00
duck
cd82089d4d upgrade deprecated argument
fix ze german
(duck)
2004-05-04 17:17:10 +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
b04512a4f6 add unique IDs to the threads for easier tracing 2004-05-04 04:46:04 +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
2a5a52c810 added xilog.i2p 2004-05-04 00:43:09 +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
1b4af66986 flag as closed /after/ we send the disconnect message *cough* 2004-05-03 11:13:44 +00:00
jrandom
0324bac044 added lucky.i2p, removed lp.i2p 2004-05-03 07:04:12 +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
8d17ba4d66 added sungo.i2p 2004-05-02 06:59:38 +00:00
jrandom
8244bdb440 include the timestamper (and fire the client on startup, using a pair of arbitrary NTP hosts - to be configured later) 2004-05-02 05:11:06 +00:00
jrandom
bc3b7ffd86 start the admin listener ASAP (right after reading the config)
fire the LoadClientAppsJob right after the admin listener is booted, which now includes support for the onBoot property (which causes the client to run immediately, instead of waiting 2+ minutes)
(yeah, it'd suck if all routers started up, tried to connect to people, got shitlisted, then 2 minutes later got the right NTP time, 'eh?)
2004-05-02 05:02:10 +00:00
jrandom
e22cb62493 handle /setTime?blah&now=yyyyMMdd_HH:mm:ss.SSSS (updating the router's clock)
yes, we'll want to filter the access to the admin manager ;)
2004-05-02 04:46:52 +00:00
jrandom
e923aa1f72 add the timestamper 2004-05-02 04:29:18 +00:00
jrandom
68a21f1fbb NTP client, GPLed 2004-05-02 04:18:53 +00:00
jrandom
74209e2607 0.3.1 (backwards compatible, still testnet, release later this evening) i2p_0_3_1 2004-04-30 23:04:13 +00:00
jrandom
1a38271104 made the event name more consistent 2004-04-30 23:01:35 +00:00
jrandom
e5ab5d6a5a new stat: client.sendAckTime containing the average time to get an ack for a client message send
this stat is published in the netDb, but the quantity fields (how many acks the stat is averaged over) is h4x0red
(it always reads "666", since otherwise it'd be fairly easy to identify what routers run servers, and i can live without knowing the quantity)
2004-04-30 07:56:05 +00:00
jrandom
2745ff727f don't include a peer by default 2004-04-30 07:16:30 +00:00
jrandom
24ea383937 don't harvest so much data 2004-04-30 07:15:29 +00:00
jrandom
9cb11d4d5f allow some overrides that the ExploreJob needs
logging
2004-04-30 07:14:26 +00:00
jrandom
7202ea3340 dont dieFatal() if the first leaseSet lookup fails (this was the cause of those "fast fail" errors [bugId=69])
try up to 6 times to search (or until the expiration, etc)
logging
2004-04-30 07:11:41 +00:00
jrandom
d234ea01d0 logging 2004-04-30 07:09:05 +00:00
jrandom
e246cd37dd simple exponential decay on the exploration
(min/max frequency=1m/30m, doubling every time we don't find something new)
reduce the bredth and duration of explorations
republish less often (every 60s send out one random one [or however many explicit ones])
logging
2004-04-30 07:08:25 +00:00
jrandom
0a4ddedac9 be more forgiving of slow connections (and fix my math in the comments) 2004-04-30 07:03:13 +00:00
jrandom
0e4b80b002 make sure we only try to request from people we know about (*cough*) 2004-04-30 07:02:16 +00:00
jrandom
a460a0dc44 logging, and be more forgiving if the guaranteed/failed comes back before the ack does 2004-04-30 07:00:13 +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
4b0d1aac15 only read from or write to disk if necessary 2004-04-27 08:47:48 +00:00