Commit Graph

5820 Commits

Author SHA1 Message Date
zzz
c5323a8d36 SSU2: Fix overhead calculation for followon fragments
so as not to exceed MTU
2022-06-20 07:37:05 -04:00
zzz
b3072d9ef3 SSU: PeerState _remotePeer cannot be null 2022-06-19 12:05:39 -04:00
zzz
3c4956f0c3 SSU2: Add delayed lookup of RI for relay and peer test
Prefer SSU2 introducers for slots 1 and 2
log tweaks
2022-06-19 12:04:10 -04:00
zzz
d69a65605d SSU2: Don't delete empty ipv6 address at startup
Needed for SSU2 handshakes
2022-06-19 12:01:44 -04:00
zzz
c2edd7e926 SusiDNS: Fix classloading on Java 11+
Caused SusiDNS and addressbook to be in a different context
addressbook config would be stored in base dir
and subscriptions would not load because it couldn't find i2ptunnel
2022-06-17 12:52:36 -04:00
zzz
fa145ff7c5 Util: ArraySet improvements
Was never used; prep for actual usage
Move from router to core
Add Set constructors that are more efficient
Add addUnique() method
Allow size of set passed in constructors
Prepare for extension
javadocs
2022-06-17 10:21:15 -04:00
zzz
7610b3842f SSU2: Hole punch processing
Validate and process hole punch payload
Send session request immediately after receiving hole punch
Remove some unused code
Log tweaks
2022-06-16 08:22:55 -04:00
zzz
d812f82e92 SSU2: Fixes
Fix conn ids on hole punch
Fix min size on relay response
2022-06-16 08:16:12 -04:00
zzz
0a87559ba2 SSU2: Add per-introducer relay state machine
Enable relay
Set session created token to 0 as per spec
Log tweaks
2022-06-14 12:48:00 -04:00
zzz
22efde37e3 SSU2: Relay WIP part 15
Fix sending charlie's address in relay response
Fix sending session request after introduction
Send 0-length endpoint in relay response on failure
Log tweaks
2022-06-12 16:08:23 -04:00
zzz
c976b86b6e SSU2: Fix peer test msg 1 signature 2022-06-12 13:20:37 -04:00
zzz
3ef06f88c9 SSU2: Relay WIP part 14
Fixes after testnet testing:
Fix NPE in OES2 constructor
Fix relay request signature
Fix relay response signature verification bugs
Fix unhandled state OB_STATE_INTRODUCED
Refactor state handling to switch
Remove dup copy in SSU2Util.sign()
Log tweaks
2022-06-12 12:54:52 -04:00
zzz
2ec0894c35 SSU2: Relay WIP part 13
Reject SSU1/SSU2 relay request mismatch as Bob
2022-06-11 13:06:29 -04:00
zzz
d85d501291 SSU2: Relay WIP part 12
Don't send SSU1 relay request to SSU2-connected introducers
and vice versa
Log tweaks
2022-06-11 09:13:36 -04:00
zzz
e4996a2db6 SSU: No need to validate Bob IP/port on relay intro as Charlie
as it is received in-session only
Log tweaks all over
2022-06-10 16:50:46 -04:00
zzz
ffc4520382 Transport: Remove mtn port from invalid list 2022-06-10 16:03:48 -04:00
zzz
386b259666 SSU: Reduce level of SSU 1 relay logging
to make it easier to debug SSU2 relay
2022-06-10 15:09:23 -04:00
zzz
788babeaa0 SSU2: Relay WIP part 11
prevent dup SSU2 introducers take 2
2022-06-10 13:29:42 -04:00
zzz
bfdf75f45b SSU2: Fix test/relay response code for banned IP 2022-06-10 09:08:08 -04:00
zzz
9de618d644 SSU2: Catch errors on bad ack blocks
so rest of payload can be processed
Improve debug output on errors
2022-06-10 07:50:43 -04:00
zzz
cdf778514c SSU2: Don't attempt SSU1 fallback validation on a SSU2 peer
This should actually fix the HMAC NPE
2022-06-10 07:35:53 -04:00
zzz
03f315fc1c SSU2: Relay WIP part 10
Fix OES2 initial state when pending intro
Handle relay response as Alice
Check relay request and relay response sigs as Bob
Remove unused method OES2.reset()
Fix javadoc for one OES state
2022-06-10 07:32:54 -04:00
zzz
3d9ded4ab1 SSU2: Relay WIP part 9
Alice side:
check for valid v2 introducers,
fetch Bob RIs if not found,
connect if not connected,
then send relay request
2022-06-09 12:24:29 -04:00
zzz
29c827c076 SSU2: Ignore dup session confirmed 2022-06-09 11:54:52 -04:00
zzz
5582814d7c Noise: Add state info to debug output 2022-06-09 09:49:06 -04:00
zzz
43a5998cfd SSU2: Set timer to remove peer test state
Reduce SSU 1/2 max test time as Bob
2022-06-08 11:31:42 -04:00
zzz
d1633938db NetDb: Bypass checks on lookups of our router hash 2022-06-08 11:04:33 -04:00
zzz
5129665256 SSU: Request RI from introducer if we don't have it 2022-06-08 10:58:16 -04:00
zzz
0d51b2d25f Transport: Don't requeue message after multiple failures
Change failed transports from a Set to a List for efficiency
Check fail count before getting bids
Don't remove from netdb after a failure
Other minor tweaks
2022-06-07 14:22:27 -04:00
zzz
ba7b154a09 SSU: Ban IP on bad handshake signature 2022-06-07 14:15:00 -04:00
zzz
52bb2aea94 SSU2: Peer test fixes
per spec, Alice hash not included in msg 1/2 sig
Add sig checks of msgs 1/3 at Bob
Fix checking of 'B' cap in peer selection
2022-06-07 14:08:53 -04:00
zzz
74795a83d6 SSU2: Relay WIP part 8
prevent dup SSU2 introducers
2022-06-06 16:25:30 -04:00
zzz
0fe437f649 SSU2: Check for missing address block in peer test msg 7 2022-06-06 16:24:19 -04:00
zzz
df4be26878 SSU: Don't allow android to be introducers 2022-06-06 16:20:44 -04:00
zzz
06456fb318 SSU2: Peer test fix message 7
Put source address of msg 6 into address block for msg 7
Use msg 7 address block for received address
2022-06-06 11:41:31 -04:00
zzz
d9c932ac2e Compile fix previous checkin 2022-06-06 11:40:24 -04:00
zzz
d680cfd80c SSU2: Relay WIP part 7
Add SSU2 parameter support to UDPAddress
Count SSU2 introducers in UDPAddress
Fix reuse of SSU2 introducers
Don't immediately remove introducer for idle time
2022-06-06 11:07:45 -04:00
zzz
4a9f8240db SSU2: Relay WIP part 6
Fix saving relay tag as Bob
Select introducers by newest connection instead of random
Ping introducers more often
Check and set ping time when pinging introducers
Remove unused nextCipherKey
Debug: Prefer selecting SSU2 introducers
Log tweaks
2022-06-05 11:21:04 -04:00
zzz
266dc09384 Transports: Periodically send RI to connected peers (Gitlab ticket #356) 2022-06-03 08:15:01 -04:00
zzz
4dd5e7737b SSU: Make cipher/MAC keys final
Possible fix for HMAC NPE
2022-06-03 08:07:29 -04:00
zzz
af6722c57b SSU2: Relay WIP part 5
Publish SSU2 introducers
2022-06-02 11:39:30 -04:00
zzz
2ff0a13990 SSU2: Relay WIP part 4
Decrypt and handle hole punch as alice
2022-06-02 10:14:37 -04:00
zzz
cfdc2203fb SSU2: Relay WIP part 3
Put alice hash in relay intro as Bob
Fix relay intro/response generation and signing
Add token to relay response as Charlie
Store relay nonce as Bob
Handle relay response as Bob and forward to Alice
Stub out handling relay response as Alice
2022-06-02 08:43:50 -04:00
zzz
2c53424210 SSU2: Relay WIP part 2
Handle relay request as bob
Send relay intro as bob
Send relay response rejection as bob
Check for valid time in relay request and relay intro
2022-06-01 13:59:15 -04:00
zzz
8b0edde290 SSU2: Relay WIP part 1
Pass relay data from PS2 to Intro manager
Handle relay intro as charlie
Send hole punch as charlie
Send relay response as charlie
Update hole punch format to match spec
2022-06-01 13:12:35 -04:00
zzz
a4d3bf285d SSU2: Enable peer test 2022-06-01 09:01:50 -04:00
zzz
ef08dfad55 SSU2: Remove role field from peer test block
to match spec change
2022-05-29 10:18:19 -04:00
zzz
80f76e38b4 i2psnark: Fix DHT not restarting after router restart
cancel DHT cleaner and explorer on stop
2022-05-28 13:00:32 -04:00
zzz
e44eeaf5ae Router: Don't fail to start up on unchecked family key errors 2022-05-28 10:53:25 -04:00
zzz
86996dde28 UPnP: Don't bind HTTP listen sockets to all addresses at startup
The lib was binding to all addresses, and then our
UPnP.updateInterfaces() was closing most of them on first run.
Fix the lib to only bind to the non-public and non-deprecated ones,
using the same getLocalAddresses() method as in our code.
2022-05-27 11:18:48 -04:00