Commit Graph

5532 Commits

Author SHA1 Message Date
zzz
aa0e0b3a62 Tunnels: Change class of TunnelPoolSettings random key
from Hash to SessionKey. It's not a Hash.
2021-06-13 11:34:17 -04:00
zzz
4c6aa8cfc1 Tests: Add serialize/deserialize test for STBM/OTBRM 2021-06-13 10:52:42 -04:00
zzz
010d1a9953 Tunnels: Continue work on new build messages (proposal #157)
WIP, still disabled, proposal not complete

- Use ChaCha20 to encrypt/decrypt records
- Add OTBRM methods for plaintext record
- Add OTBRM checks for correct plaintext slot number
- Add BRR checks to prevent use of nonexistent AES key/IV
- Set plaintext reply at OBEP in BuildHandler
- Allow OTBRM in InboundMessageDistributor
- Remove timing measurements in BuildMessageProcessor.decrypt()
- Add test to BuildMessageTestStandalone for outbound build
- Add check for all replies to BuildMessageTestStandalone
- Log tweaks
2021-06-13 10:31:02 -04:00
zzz
3fbfb689af Tests: Add ECIES test to BuildMessageTestStandalone 2021-06-12 16:20:07 -04:00
zzz
2bb3cf046d Tests: Fix BuildMessageTestStandalone 2021-06-12 15:42:47 -04:00
zzz
988e0e796f Tests: Fixup tunnel test after build classes move 2021-06-12 10:45:18 -04:00
zzz
d93e16e52e UPnP: Bind to IPv6 addresses for search responses
Older miniupnpd 2.0 will send a SSDP search response with an IPv6 location to a IPv4 address,
but newer ones 2.2 won't. So we need to also bind to an IPv6 address for the SSDP search
to receive the router's IPv6 location. Then we can bind to our public IPv6 address
for a port forward and it will work when miniupnpd is configured for "secure".

Also, don't bind a POST request to a mismatched v4/v6 address.
2021-06-11 09:29:16 -04:00
zzz
4f12081b59 Tunnels: Move 3 build classes from tunnel to tunnel/pool
and make package private, so all the tunnel build classes are in one place.
2021-06-08 12:47:28 -04:00
zzz
2f371301ad NetDB: Prevent rare deadlock in rebuildRouterInfo()
by making it always nonblocking.
as reported by drzed
2021-06-08 10:06:41 -04:00
zzz
c2c922b665 Tunnels: Switch from SHA256 to SipHash for arbitrary deterministic sort
of peers. For efficiency.
ref: http://zzz.i2p/topics/3082
thx: jogger
2021-06-08 09:44:17 -04:00
zzz
aee9a3f639 Tunnels: Extend use of high cap peers in expl. tunnels at startup, after extended downtime 2021-06-08 09:28:15 -04:00
zzz
d9c98580d1 Continue implementation of short tunnel build messages (proposal 157)
- Generate and parse short record format
- Encrypt and decrypt short records
- Register handlers for 3 new messages ITBM/STBM/OTBRM
- Send ITBM/STBM if all hops support it (disabled)
- Reply with OTBRM at OBEP if STBM received (disabled)
- Send STBM at IBGW if ITBM received (disabled)
- Add logic for when to send new messages
- ChaCha encryption of other short records
- Fix compare logic in ITBM parser (ticket #2814)

All is still preliminary, disabled, untested; proposal is still incomplete

Still todo:
- Fill in plaintext record for ITBM/OTBRM
- OTBRM key/tag
2021-06-08 08:43:40 -04:00
zzz
8b4a93554f Router: Fix JobQueue getLastJobBegin() and getLastJobEnd() (ticket #2809) 2021-06-01 09:32:21 -04:00
zzz
f9b5ee697c Transport: Consolidate now() calls 2021-06-01 09:01:40 -04:00
zzz
6dab5b44ae unused import 2021-06-01 08:53:29 -04:00
zzz
b88c8a4f6a UPnP: Fix IPv6 address check (ticket #2811) 2021-05-23 07:38:28 -04:00
zzz
58aa95df87 Router: Increase rekey probability 2021-05-21 09:52:26 -04:00
zzz
557c1d0f04 Console: Make the /confighome headers match the home page headers
Fix padding on file chooser buttons
2021-05-20 08:47:20 -04:00
zzz
48cfb6114b 0.9.50 2021-05-18 08:21:33 -04:00
zzz
fb6e8249d0 bump for review 2021-05-15 14:03:03 -04:00
zzz
121cb2c94c NTCP: Fix reported NPE in debug logging on java 16 2021-05-10 08:42:04 -04:00
zzz
ea7183eeda Sybil: Fix retention of old analysis files when configured to never delete 2021-05-10 08:38:35 -04:00
zzz
38dbe2f509 poupdate-source 2021-05-05 12:02:22 -04:00
zzz
f77677f1f4 Router: Unused methods and fields (findbugs) 2021-05-05 10:58:16 -04:00
zzz
20c528debe Router: Cleanup fix for gitlab ticket #16
Only check for clients.config if there was no clients.config.d
2021-04-27 10:58:17 -04:00
zzz
fe507b63b5 SSU: Add more state transitions that require confirmation 2021-04-25 10:33:40 -04:00
zzz
21485eff87 SusiMail: Prevent infinite loop on decoding error
More test mods
Fix StringBuilderWriter.write(int)
2021-04-24 19:37:18 -04:00
zzz
78168be85c Jetty: Add patch for CVE-2021-28165 - Jetty #6072 -
Jetty server high CPU when client send data length > 17408

This affects SSL connections only, which is not part of our default setup.
Adapted from workaround at:
https://github.com/eclipse/jetty.project/security/advisories/GHSA-26vr-8j45-3r4w
Put the new checks directly in the unwrap() method,
rather than subclassing SslConnection, as that would require config file changes.
2021-04-24 16:04:33 -04:00
idk
025445fc65 When checking whether to use Roaming appdata(like on older installs or on installs where people deliberately use Roaming appdata) also check whether clients.config exists and if it does, set home to Roaming appdata since people may be updating from routers before the migration to clients.config.d directories. This should fix #16 2021-04-22 23:27:31 -04:00
zzz
1a05475f47 SSU: Don't start peer test when shutting down 2021-04-20 08:58:48 -04:00
zzz
23b704960d NTCP: More NTCP1 removal cleanup 2021-04-20 08:50:00 -04:00
zzz
388bac5aae NTCP: Set outbound addresses at startup when force-firewalled
TODO: set outbound addresses on transition to firewalled later
2021-04-20 08:24:50 -04:00
zzz
5af19314db SSU: Call replaceCurrentExternalAddress() from startup()
for local interfaces even when not force-firewalled, because REA2()
now needs them to set the IPs regardless
2021-04-20 07:33:08 -04:00
zzz
11151464f3 Router: State transition fixes 2021-04-17 14:30:25 -04:00
zzz
cebef747ef Transport: Don't update queue size stat unless enabled 2021-04-12 10:32:58 -04:00
zzz
76fd180b63 SSU: Fix peer test getting stuck
Timer was not getting rescheduled in all cases,
so testComplete() was never called,
so no more tests could run.
Always remove test when testComplete() is called.
Log tweaks
2021-04-12 10:30:37 -04:00
zzz
0963a1339c SSU: IPv6-only fixes 2021-04-11 08:54:40 -04:00
zzz
f0e606cc46 Router: Don't fail migration at install if missing eepsite/ or clients.config,
for embedded applications.

Ensure a migration failure is logged if file does exist.
Reported and tested by zlatinb
2021-04-09 09:08:36 -04:00
zzz
009eb8c9f6 SSU: Fix IPv6 introducers
Ensure introducers are required when force-firewalled
Log tweaks
2021-04-08 14:20:31 -04:00
zzz
02cf79c4c8 NetDB: Don't repeatedly log about reseed disabled 2021-04-08 14:16:07 -04:00
zzz
7482142431 Util: Parameterize CDPBQ
Same as CDBQ earlier. To allow experiments on adjusted params.
2021-04-06 08:36:05 -04:00
zzz
e16c80516d I2NP: Add msg ID to all build msg toString() 2021-04-05 08:37:28 -04:00
zzz
4acf0ecd05 Sybil: Register blocklist version with update manager
Fix "very close" message when configured for all routers
2021-04-05 08:05:17 -04:00
zzz
2eedfe5382 SSU: Add note about skew threshold 2021-04-04 13:56:13 -04:00
zzz
a2dde559f1 SSU: Don't call PS.expireInboundMessages() from messageReceived()
it's already called from IMF
2021-04-04 13:25:57 -04:00
zzz
de108dbc5e Tunnels: Fix build message timestamp check for ECIES records
Log tweaks
2021-04-04 13:21:07 -04:00
zzz
00d3965303 SSU: Log enhancement, fix possible log NPE 2021-04-03 17:12:49 -04:00
zzz
7ad7846f86 SAM: Remove subsessions when primary session closes 2021-04-03 15:25:20 -04:00
zzz
1307e5b2e0 SSU: Remove restrictions on IPv6 introducers (prop. 158)
WIP, not fully tested
Don't try to rebuild IPv4 address when IPv4 disabled
Don't bid on a peer if marked unreachable
Fail outbound immediately if no valid introducers
Reduce IPv6 too-close length check from 8 bytes to 4
Log tweaks
2021-04-03 15:24:03 -04:00
zzz
1b1b0f545f SSU: Fix dup IPv6 introducers 2021-04-02 09:30:29 -04:00