Commit Graph

438 Commits

Author SHA1 Message Date
zzz
5555c52376 Streaming: Locking for next send time,
rename shadowing field in inner class
2015-04-17 13:00:16 +00:00
zzz
706ee243a5 Streaming read timeout fixes:
i2ptunnel:
- Better timeout handling when reading headers in HTTP server (improved fix for ticket #723)
  Enforce total header timeout with new readLine()
- Prep for returning specific HTTP errors to client on request timeout and header errors,
  instead of just closing socket... further work to be in i2p.i2p.zzz.test2 branch
Streaming:
- Fix read timeout on input stream - was waiting too long, often twice as long as timeout, or more
  Enforce total timeout even when notify()ed
- Fix read() returning 0 on read timeout instead of -1 (possible fix for ticket #335)
  This prevents passing partial headers to server on timeout
- Fix javadocs for read timeout to match current behavior
- Fix StandardSocket SoTimeout to account for differences with I2PSocket readTimeout
- log tweaks
2015-04-04 17:00:57 +00:00
zzz
fadc624f7c API: Fix some client-side APIs to honor defaults in Properties;
add javadocs to specify where we do and don't (ticket #1491)
2015-03-31 13:18:11 +00:00
zzz
956730c5e9 log tweak to help diagnose ServerSocket closed 2015-03-28 10:54:00 +00:00
zzz
9e18c7ea18 Streaming: Throw I2PSocketException when connection is reset,
display new error page in HTTP client (ticket #643)
javadocs
2015-03-24 14:33:36 +00:00
zzz
cb4359cd0a Streaming: Reduce min RTT again 2015-03-18 17:50:40 +00:00
zzz
4fccd258e6 javadoc fixes 2015-03-16 09:08:03 +00:00
zzz
a1358deda2 private method 2015-01-31 15:16:42 +00:00
zzz
7767430af2 EepGet: Fix PcapWriter 2015-01-05 17:05:36 +00:00
zzz
6e847a4cc4 Streaming: Add API for sending/receiving payload in ping/pong 2015-01-05 15:09:12 +00:00
zzz
045f6dccf8 Latency reduction all over:
- SSU: Reduce ack delay
- Streaming: Reduce min RTO and flusher delay
- Tunnels: Reduce GW batching time
2015-01-05 13:19:34 +00:00
zzz
2f2aa7f5a8 I2PTunnel:
- Fix bug that left server acceptor thread running after close
- Add destroy() methods to release all resources when closing a tunnel for good,
  particularly the streaming timer threads
- Use COWAL to prevent concurrency problems
- Javadocs
Streaming:
- Don't return null from accept() any more; actually throw
  ConnectException as the javadocs have always specified
- Throw ConnectException from accept() if interrupted; previously caught and ignored
- Throw exceptions from ConnectionHandler.accept(), not higher up
- Close ServerSocket when ConnectionManager is shut down
- Synchronize setActive(), clear queue when starting to accept,
  better handling of calls that don't change state
- Javadocs
ConfigClientsHelper: Call isPluginRunning() less often
PluginStarter: Simplify detection of active threads

Above changes mostly in support of zzzot plugin implementing ClientApp
and being able to shut down completely so there are no threads
in its thread group, so /configclients will all show status as stopped.
Previously, the I2PTunnelServer acceptor thread and
one or more streaming timer threads would remain.
2014-11-13 20:12:55 +00:00
0773a30578 add hamcrest-all to classpaths and minor formatting fixes 2014-11-12 17:42:50 +00:00
zzz
49118b8bf1 propagate from branch 'i2p.i2p' (head e606c473eb1e461a477e45419f6295b6430a7353)
to branch 'i2p.i2p.zzz.test2' (head 6212892778308db10a86e58f9f275c838f604973)
2014-09-09 19:27:10 +00:00
zzz
330a5ddd0f NetDB:
- Better handling of unsupported encryption in destinations
 - Implement handling of unsupported encryption in router identities
 - Banlist forever all RIs with unsupported encryption
 - New negative cache of all dests with unsupported encryption
 - New methods for destination lookup that will succeed even if
   the LS is expired or encryption is unsupported
 - Use new dest lookup so client will get the right error code
   later, rather than failing with no LS when we really got it
   but just couldn't verify it.
 - Cleanups and javadocs

OCMOSJ: Detect unsupported encryption on dest and return the correct failure code
   through I2CP to streaming to i2ptunnel

Streaming: Re-enable message status override, but treat LS lookup failure
   as a soft failure for now.

HTTP Client: Add error page for unsupported encryption
2014-09-05 22:52:23 +00:00
zzz
f6e508ca14 * Streaming: Fix verify of Ed25519 signatures in CLOSE packets
- cleanup writtenSize()
2014-08-28 13:57:52 +00:00
zzz
2c7006e9bd Streaming; Disable fail-fast for now. It's failing on leaseset lookup
far too often. Need to fix that first.
2014-07-19 12:39:37 +00:00
zzz
616866cc9e Build: Move remaining jars to Java 6, as we will require
API 9 in the next Android release.
2014-06-27 13:57:43 +00:00
zzz
ca4555c496 lint redundant cast all over 2014-06-26 15:26:58 +00:00
zzz
1420c773a6 * Streaming; Drop the preliminary channel implementations,
as added by 'dream' in late 2011. Testing couldn't have happened,
   as they don't work and can't ever work as designed.
   Channels must have underlying file descriptors unless you implement
   your own Selector and that would probably require JNI.
   See http://zzz.i2p/topics/1229 for details.
   Also http://stackoverflow.com/questions/911780/how-do-i-define-my-own-selectablechannel
2014-06-24 12:49:18 +00:00
zzz
986de4c1d6 Streaming: Fix connection error message 2014-06-23 20:12:12 +00:00
zzz
002d057c92 findbugs all over 2014-06-13 21:37:18 +00:00
zzz
40e5bcbdbb * NetDB: Reduce negative lookup cache time
* OCMOSJ:
   - Increase timeout if we must lookup leaseset
 * Streaming:
   - Shorter expire time in TCBCache
   - Don't fail a connection once it is up
   - Log tweaks
2014-06-07 13:23:38 +00:00
zzz
2467856011 * Streaming: Cleanup, don't fail hard on no tunnels (ticket #788) 2014-05-18 00:44:51 +00:00
zzz
d32b4e9f24 * I2CP: Per-message status codes back through streaming (ticket #788)
- New I2PSessionException
   - Streaming PacketQueue requests status for SYNs on outbound conns
   - PacketQueue throws I2PSessionException in streams
2014-05-18 00:05:13 +00:00
zzz
e1fc6893b4 SocketErrorListener callback is unimplemented 2014-04-05 12:18:14 +00:00
zzz
2cca2781fd * Streaming: Track recently closed connections (ticket #1161)
Consolidate and synchronize code for selecting a random stream ID
2014-03-12 12:39:53 +00:00
zzz
2f7eb56790 propagate from branch 'i2p.i2p.zzz.ecdsa' (head e83bcdc842f5995d310a4295147f9326a993e010)
to branch 'i2p.i2p' (head 4983f716f8740bc7ddfae5561a562a0d42a815ae)
2014-02-17 13:29:41 +00:00
zzz
66d9017d58 fix PingTest 2014-02-11 19:45:52 +00:00
zzz
855cae0a45 propagate from branch 'i2p.i2p' (head eac6caabd2ea6731ee27111f0dbadf5afcd3695b)
to branch 'i2p.i2p.zzz.test2' (head 911a8782667d878dd7a2976c7fb10d481d80e023)
2014-02-07 16:33:59 +00:00
zzz
3622501471 * Streaming:
- Set ports on many packets that were missing them
   - Use connection throttling methods on pings too (ticket #1142)
   - Add methods to set ports on pings
   - Argument checking on ping methods
2014-02-02 16:47:29 +00:00
zzz
3ab149a399 streaming javadoc fixes 2014-02-01 12:37:45 +00:00
zzz
9eefe1e935 propagate from branch 'i2p.i2p.zzz.i2cp' (head d4ac8162a4ba299ac912640f19076c3c90afdc67)
to branch 'i2p.i2p' (head adc5102c93383e01c74b87f04449dc9c307f6e75)
2014-01-27 16:47:22 +00:00
zzz
ce475d2cd6 sort imports 2014-01-25 15:05:43 +00:00
zzz
44e7110c9a Fix StandardServerSocket.isClosed() and close()
thx cacapo
ref: http://zzz.i2p/topics/1547
2014-01-08 00:32:51 +00:00
zzz
b59aa1fb69 move I2PSocketOptionsImpl from mini to impl 2014-01-04 22:10:10 +00:00
54a21bfa7b Fix compilation of non-JUnit tests (disabled by default) 2014-01-04 19:57:47 +00:00
50f55877f8 make public method protected 2014-01-04 19:56:55 +00:00
f9ff262318 Fix junit tests for streaming, thank you zab (and thank you zzz) for helping out. 2014-01-04 19:45:52 +00:00
91ba76f2a6 merge of '1fd43bf251a91d33bb1ea9b06f2b35a40be3b9c9'
and '766a92b57cdf82d3b1d1e3a71ef2a3109e883add'
2014-01-04 17:41:15 +00:00
ec97bc2f81 Stab at fixing streaming tests.
Add javadoc package.html
Fix import order
2014-01-04 17:39:32 +00:00
zzz
c03511b971 exception causes 2014-01-04 16:40:06 +00:00
2a09d5baa6 * Streaming: Move streaming to new package (ticket #1135) 2014-01-04 14:09:33 +00:00
zzz
e8e239616f * Crypto: More implementation for key certs
- Support i2cp.destination.sigType option in TunnelController and
    I2PSocketManagerFactory
  - Fixup of Destination.create() and Destination.size()
  - Add generic off/len methods in DSAEngine, needed for streaming
  - Fixup of sign/verify in streaming Packet
  - Javadocs
2014-01-03 00:22:44 +00:00
zzz
5842e25205 Initial support for key certificates and arbitrary types and lengths
of signing keys and signatures in RouterIdentities and Destinations.
Untested, not even for regressions, except with command line
using PrivateKeyFile.
Based on preliminary spec at http://zzz.i2p/topics/1442?page=1#p7524
Not done:
 - Transport handshake signing
 - Configuration of default type
 - Specification of type in options to I2PSocketManagerFactory
 - Specification of type in i2ptunnel
 - Fix up caching of SigningPublicKey and P256 key cert
 - Any non-default crypto type in the key cert
 - Documentation
2013-12-24 16:41:05 +00:00
zzz
5219791673 I2CP:
- Add support for b64 conversion in destLookup()
  - Catch invalid message length sooner
I2Ping:
  - Extend I2PTunnelClientBase so non-shared-client,
    I2CP options, and other features will work
  - Fixes for fields and threading
Streaming:
  - Send LS with ping (broken since 0.9.2)
  - Set the NO_ACK flag on pings and pongs
2013-12-21 18:10:59 +00:00
zzz
38c02b44b9 Streaming: final, volatile, logging 2013-12-19 12:24:51 +00:00
zzz
2b39d28e99 fix comment 2013-12-19 12:16:39 +00:00
c180292358 Style fix: leave brackets around for() one-liners 2013-12-04 03:51:02 +00:00
1112fc8544 Yes it's deprecated, it should still use proper generics 2013-11-30 12:52:50 +00:00