Commit Graph

703 Commits

Author SHA1 Message Date
812c00f11e Move TunnelController config creation logic into class that Android UI can use 2015-03-10 20:05:45 +00:00
zzz
0972b6b56a more test cases 2015-03-08 20:20:50 +00:00
zzz
381dbc4b4a Proxy error page tweaks 2015-01-30 15:55:12 +00:00
zzz
5da492b9e5 spelling 2015-01-19 12:44:31 +00:00
zzz
3270ba840e I2PTunnel: Add option for multihoming optimization 2015-01-11 17:36:39 +00:00
zzz
65348b2365 more renaming 2015-01-08 18:20:08 +00:00
zzz
927e29b8ef I2PTunnel: Persist leaseset keys
I2CP: Use configured leaseset keys if available
2015-01-03 13:32:24 +00:00
zzz
fa51a0aef4 enhance logging for inproxy rejections 2014-12-15 14:40:00 +00:00
zzz
b2e17916e4 HTTP Proxy: Fix parsing of ECDSA address helper,
ignore '=' when comparing, reindent test
2014-12-08 14:12:00 +00:00
zzz
5e67008d26 I2PTunnel: Reduce i2ptunnel threads, more thread pooling.
Big savings is on client side (two less threads per connection)
 - Move client pool from static inI2PTunnelClientBase to TCG.
 - Use client pool for some server threads
 - Run some things inline that were formerly threads
 - Client-side I2PTunnelRunner thread used to do nothing but start 2 more
   threads; now it runs one inline (like we do for server-side HTTP)
 - Javadocs and cleanups
Was originally intended to reduce load for high-traffic servers
but most of the savings for now is on the client side.
Ref: http://zzz.i2p/topics/1741
Todo: Figure out how to run the HTTP client-side gunzipper inline too
Todo: More server-side improvements

---

Client side:

before:
4-5 threads, 1-2 pooled

  I2PTunnel Client Runner (BlockingRunner from client pool)
      starts I2PTunnelRunner or I2PTunnelHTTPClientRunner and exits
          starts StreamForwarder toI2P and waits
          starts StreamForwarder fromI2P and waits
              starts HTTPResponseOutputStream (HTTP gunzip only) (from client pool)
now:
2-3 threads, 1-2 pooled

  I2PTunnel Client Runner (BlockingRunner from client pool)
      runs I2PTunnelRunner or I2PTunnelHTTPClientRunner inline
          starts StreamForwarder toI2P and waits
          runs StreamForwarder fromI2P inline
              starts HTTPResponseOutputStream (HTTP gunzip only) (from client pool)

---

Server side:

before:
1-4 threads, 0-1 pooled

  Server Handler Pool (Handler from server pool) execpt for standard server, blockingHandle() inline in acceptor
      starts I2PTunnelRunner or CompressedRequestor and exits
          starts StreamForwarder toI2P and waits   (inline for HTTP)
          starts StreamForwarder fromI2P and waits  (except not for HTTP GET)

now:
1-4 threads, 0-2 pooled

  Server Handler Pool (Handler from server pool) execpt for standard server, blockingHandle() inline in acceptor
      starts I2PTunnelRunner or CompressedRequestor and exits (using client pool)
          starts StreamForwarder toI2P and waits   (inline for HTTP)
          starts StreamForwarder fromI2P and waits  (except not for HTTP GET)
2014-12-05 15:12:51 +00:00
zzz
fd47cb88de i2ptunnel: Fix automatic setting of random key 2014-11-24 14:15:44 +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
zzz
ae1d5648d5 Router, i2ptunnel: Add option for per-pool persistent random key,
so peer ordering does not change across restarts
2014-11-09 13:51:19 +00:00
zzz
a0b457b9a1 propagate from branch 'i2p.i2p.zzz.test2' (head 9dca19f228a66b5ac646c3d97d4f018c733081de)
to branch 'i2p.i2p' (head e7f2b0990f1ff9ab0e0d8633ac2faf35a993b917)
2014-11-06 17:53:02 +00:00
zzz
6ca0c54ba7 i2ptunnel:
ECDSA default for all new server tunnels
ECDSA default for streamr client tunnels
Fix display of server destination on edit page when not running (privkey file path wasn't absolute)
Fix display of persistent client key b32 on edit page when not running
Fix display of server sig type on edit page when we have a privkey file
Add KeysAndCert.getSigType()
Javadocs
2014-11-02 15:23:13 +00:00
zzz
83b3f242a9 Console, I2CP, i2ptunnel, SSLEepGet: Set allowed SSL protocols and ciphers 2014-10-15 20:44:23 +00:00
zzz
d2c6a80d24 i2ptunnel: Set default sig type to ECDSA P256 for client tunnel
types Standard, IRC, and Socks IRC, if non-shared.
2014-10-13 16:46:58 +00:00
zzz
6685acfef4 i2ptunnel: Handle named sig types from i2ptunnel.config in the GUI 2014-10-07 12:03:00 +00:00
zzz
85d38e7af2 I2PTunnelGUI: Deleted, moved to i2p.scripts 2014-09-15 19:17:24 +00:00
zzz
156d86835a propagate from branch 'i2p.i2p' (head 60a9a2297abeaf042645e3f0bc8d106f1ff585bf)
to branch 'i2p.i2p.zzz.test2' (head 6ff6f0bcee835d32aad62449a37f5171afde915a)
2014-09-13 14:50:11 +00:00
zzz
eab4397b0f * i2ptunnel:
- Fixes for stopping client tunnels
   - Fix status display for shared clients
   - Log tweaks
2014-09-13 14:49:38 +00:00
zzz
603b345405 * i2ptunnel: Fix updating session options on a running delay-open client tunnel 2014-09-12 21:48:29 +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
1d2e01c8cd i2ptunnel filter tweaks 2014-09-02 14:08:41 +00:00
zzz
053ce88743 * I2PTunnel: Allow changing of spoof host and target host/port without
restarting server tunnel
2014-08-31 13:17:44 +00:00
zzz
ed4fe56e7e I2CP:
- Verify crypto key pair in LS
 - Verfiy same dest as before in LS
Router: Don't try to use an unavailable sig type for the router,
   even if it's the default
RouterInfo: Work around unsupported raw signatures for
   RI Ed25519 sig type
2014-08-26 19:14:51 +00:00
zzz
7bf1949061 remove unused method 2014-08-26 13:46:28 +00:00
zzz
e65ec2a589 i2ptunnel escape fixes 2014-08-23 13:20:25 +00:00
zzz
975378b224 * i2ptunnel:
- Add local SSL support for std. and IRC client tunnels (ticket #1107)
    Keystore goes in ~/.i2p/keystore; pubkey cert goes in ~/.i2p/certificates/i2ptunnel
  - Escape messages to index page
  - Show message for uncaught exception
2014-08-21 12:21:29 +00:00
zzz
915e003355 * i2ptunnel: Use I2PAppThread 2014-08-21 11:58:09 +00:00
zzz
7187f6f714 * Console: Display full path to config file
* i2ptunnel: More escaping
2014-08-06 13:40:25 +00:00
zzz
0e9ceba057 * i2ptunnel: Fix filtering of custom options 2014-08-05 21:26:48 +00:00
zzz
b28eb708a4 * Console:
- Fix update buttons
   - Don't filter parameter names starting with "nofilter_"
   - Re-allow configadvanced, news URL, and unsigned update URL if routerconsole.advanced=true
   - Re-allow plugin install if routerconsole.advanced=true or routerconsole.enablePluginInstall=true
   - Only allow whitelisted plugin signers, unless routerconsole.allowUntrustedPlugins=true
   - Re-allow clients.config changes if routerconsole.advanced=true or routerconsole.enableClientChange=true
   - More escaping
 * i2psnark: Fix add torrent form
2014-08-03 13:58:51 +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
bc99bc7206 javadoc fixes 2014-06-26 12:51:33 +00:00
zzz
8b1abc08db Add Destination.toBase32() 2014-06-23 20:06:03 +00:00
zzz
002d057c92 findbugs all over 2014-06-13 21:37:18 +00:00
zzz
7c79f5d5e5 propagate from branch 'i2p.i2p.zzz.test2' (head 9aee013cf961ba795a6b5333481634c52d43abc5)
to branch 'i2p.i2p' (head e439e67c49695a624fabdf6f3cd1a8f7a3fd7ea5)
2014-05-29 12:31:49 +00:00
zzz
ff837cf66e i2ptunnel: Define standard tunnel properties and types in one place 2014-05-26 13:36:41 +00:00
zzz
c28f707f55 cleanup 2014-05-25 19:23:04 +00:00
zzz
ef96c88719 HTTP Client:
- Add GUI options for user-agent, referer, accept
  - Fix SSL (initial socket data in I2PTunnelRunner)
  - Disable SSL to i2p addresses by default, add GUI option
  - Fix NPE in error handler
2014-05-25 19:17:36 +00:00
zzz
73943b1a08 javadocs 2014-05-20 13:23:31 +00:00
zzz
d1bd893a7b * I2PTunnel:
- Display custom error pages for I2PSocketExceptions (ticket #788)
   - Tag I2PSocketException text for translation (no bundles yet)
   - Move methods from superclasses to I2PTunnelHTTPClientBase
   - Fix connect client error pages, but they aren't displayed anyway
   - Don't start I2PTunnelRunner threads in constructor (ticket #973)
   - Synch close() in I2PTunnelServer
   - Cleanups and javadocs
2014-05-18 21:13:22 +00:00
zzz
1acd5caaa8 * HTTP client: Fix 'connection reset' browser messages
after an error in the first line (ticket #1277)
   - A SocketException is an IOE
   - out can't be null
2014-05-17 23:44:16 +00:00
2bf2eb482e update outbound UA to match TBB's 2014-05-14 14:14:23 +00:00
zzz
1cdcf1cb0a i2ptunnel: Display warning for duplicate client ports (ticket #1265) 2014-05-07 16:00:38 +00:00
490727b401 fix i2ptunnel 2014-04-21 20:59:29 +00:00
b84682fdc9 * findbugs: mostly stream closure fixes in router, apps, core 2014-04-21 10:54:52 +00:00
67eb3cc140 unblocking USERS (ticket #1249) and various safe Inspircd commands 2014-04-20 11:53:39 +00:00