Commit Graph

16164 Commits

Author SHA1 Message Date
zzz
0560b3221d SSU2: Flush tokens on ip/port change
both inbound and outbound
2022-03-24 05:21:58 -04:00
zzz
631a6dd2b2 I2CP: Synch fixes
Synch fields in the data messages both directions,
after one report of zero session ID in MessagePayloadMessage
to an external client on fast hardware with Java 18.
Add new constructors for efficiency.
Deprecated setters, unit tests not changed, TODO.
Should fix all the other messages also, TODO.
2022-03-23 07:25:01 -04:00
zzz
0154a87cbf SSU2: Refactor tokens
Store OB tokens by IP/port
Centralize token generation and expiration in Establishment Manager
Add methods to flush OB tokens on IP/port change
Log tweaks
Javadoc fix
2022-03-23 06:46:01 -04:00
zzz
4f8ad3b6cb Router family fixes
Don't overwrite an existing family keystore file
Don't allow starting a new family with an existing family keystore file
Don't add family to RI until we have restarted and have a keystore file
Don't fail a netdb store for no family sig
Don't ever fail our own netdb store for family errors, to avoid rekey/restart
2022-03-22 08:03:18 -04:00
zzz
458e980e2f bump -10, javadoc typo 2022-03-20 07:59:32 -04:00
zzz
e08d2f354a File missed in previous netdb checkin 2022-03-20 07:57:43 -04:00
zzz
037e6940a9 SSU2: More work on peer test
generate msgs 1,5-7
handle msgs 5-7
log tweaks
2022-03-20 07:53:41 -04:00
zzz
b3055feff6 NetDB: Remove duplicate store in FloodOnlyLookupMatchJob
which bypassed all the checks in HandleFloodfillDatabaseStoreMessageJob
Don't store an entry which is older
2022-03-20 07:45:33 -04:00
zzz
c520dcb0f6 NetDB: Refactor family validation
Return a result code from verify()
Load all known certs at startup rather than continually reloading them
Only give full verified status to known keys
Enforce signatures in netdb store when key is available
Show family verification status on /netdb
Export our cert to disk if missing
Add stormycloud family cert
Bypass /24 Sybil penalty
2022-03-20 07:41:49 -04:00
zzz
fc88d672c5 Console: Fix rare IAE on destination sort 2022-03-18 11:40:09 -04:00
zzz
c62884ef85 SSU2: Implement peer test state machine
msgs 5-7 still TODO
WIP, untested
2022-03-18 10:21:30 -04:00
zzz
d9c629a6b1 SSU2: Log tweaks 2022-03-17 16:45:16 -04:00
zzz
70b7d1204b SSU2: Still more prep for Peer Test (WIP) 2022-03-17 16:43:24 -04:00
zzz
a90bbc3554 SSU2: More prep for Peer Test (WIP) 2022-03-17 16:10:26 -04:00
zzz
c2ec6cdeff SSU2: Set _lastACKSend 2022-03-17 16:08:15 -04:00
zzz
f57abe84bd SSU: Peer Test refactor
to store Bob's PeerState directly in PeerTestState
prep for SSU2
2022-03-17 16:04:28 -04:00
zzz
a1ee8220bb SSU2: Relay and Peer Test WIP
Packet building, fix peer test block
Not hooked in
2022-03-17 10:48:10 -04:00
zzz
ce73b9e8da Console: Remove CSS for hidden text on /graph 2022-03-16 07:59:55 -04:00
zzz
e6c3c097b5 Console: Remove UTC text already hidden by CSS 2022-03-16 07:47:26 -04:00
zzz
8961009292 SSU2: Minor cleanups
Add min packet size constants and notes
Don't attempt to decrypt a packet as a new inbound session if too small
Remove unused payload[] in IES2, now decrypted in-place
Log level tweaks in Establisher
2022-03-16 07:28:22 -04:00
zzz
de27cb1a46 Util: Increase min log file size limit
Rotate the log before we hit the limit, not after
2022-03-16 07:22:00 -04:00
zzz
e8afbc5b92 Transport: Don't use HE addresses for GeoIP
Limit max MTU for HE addresses
2022-03-15 14:30:04 -04:00
zzz
587409daa7 SSU2: Compress large RIs in Session Confirmed
even if they would fit in the MTU uncompressed,
to save bandwidth and room for other blocks
2022-03-15 07:23:53 -04:00
zzz
af5019c8dd SSU2: Fixes part 11
Save data messages received before or immediately after session confirmed
by queueing them for processing after the PeerState2 is created.
The fragments for the first I2NP message from Alice to Bob are frequently lost,
this will hopefully fix it.
Not fully tested, needs wider network testing.
2022-03-15 07:20:23 -04:00
zzz
46bba0fe71 SSU2: Fixes part 10
Avoid relaying until it's implemented:
Don't use SSU2 for an SSU address with introducers (fixes NPE)
Don't connect to SSU2 address without host/port
Don't ask for relay tag
Log tweaks
2022-03-15 07:12:25 -04:00
zzz
049456493f SSU2: Stubs for relay and peer test (phase 2) 2022-03-13 12:42:13 -04:00
zzz
2f63762c80 SSU2: Fixes part 9
Fix length calculation to see if new token block will fit in session confirmed
Extend timeout after sending retry
Fix retx timer for sess req after sending token req
Remove dup call to confirmedPacketsSent()
Cancel ack timer when sending acks
Include intro key in firewalled addresses too
Use SSU2 version of ping packet for SSU2 peers
Reduce max padding
Log tweaks
2022-03-13 07:33:36 -04:00
zzz
ca0d9f5a26 Tunnels: Reduce build reply timeout 2022-03-12 11:37:29 -05:00
zzz
aa620f5ed3 SSU2: Fixes part 8
Fix packet length for retransmitted handshake messages
Expire pending acks
2022-03-12 11:08:20 -05:00
zzz
15bb157126 NTCP: Encrypt handshake options in-place
round timestamp in Session Created
2022-03-12 09:48:33 -05:00
zzz
7e3e42ce42 i2psnark standalone: Add DTG and notifications 2022-03-11 07:23:46 -05:00
zzz
981c5e3878 i2psnark: Don't js-reload CSS on first click 2022-03-11 07:13:09 -05:00
zzz
393ee71ad9 SSU2: Fixes part 7
Clean up and optimize ack handling
Log tweaks and javadocs
2022-03-10 10:27:19 -05:00
zzz
97736cef1c SSU2: Fixes part 6
MTU and related fixes:
Fix max fragment size
Fix max space for acks
Fix max packet size
Pull MTU from best address in Session Confirmed
Pass MTU from establish state to peer state
Use SSU2 min/default/max MTU in PeerState
Stop looping when out of space in OMF (SSU 1 too)
2022-03-09 13:53:16 -05:00
zzz
25af51faf9 SSU2: Fixes part 5
Correctly calculate skew after retry in establish state
Pass calculated skew from establish state to peer state
Round time in DateTime block
Periodically send DateTime block
Handle DateTime block in peer state
2022-03-09 07:04:31 -05:00
zzz
a717dfb923 DTG: Add new ExternalMain class for app context use
that does not require router.jar
and rework other classes as necessary
2022-03-09 05:21:58 -05:00
zzz
e594b9532c SSU2: Track dup packets received
Log tweaks
2022-03-09 04:37:36 -05:00
zzz
a7a5b06b5c I2NP: Fix TunnelGatewayMessage.calculateWrittenLength()
so it doesn't null out the contained message.
Required for SSU2.
Unrelated TunnelDispatcher cleanup done while trying to find the problem.
2022-03-08 05:39:47 -05:00
zzz
eb72e97c03 SSU2: Fixes part 4
Fix deadlock in AckTimer
Enforce token in IES2
Increase bitfield sizes in PS2
Log tweaks
2022-03-07 10:44:17 -05:00
zzz
25cdc988e1 SSU2: Fixes part 3
Handle acks
Set ack timer
Retransmit session confirmed
Fix bitfield constructor when no ranges
2022-03-07 09:55:10 -05:00
zzz
3ce669575f SSU2: Fixes part 2
Add method to put additional blocks in data messages
Send and handle termination blocks
2022-03-06 07:31:16 -05:00
zzz
63aa64f8bb Console: Improve class selection on /configlogging 2022-03-06 06:16:59 -05:00
zzz
a6f61d2bf6 SSU2: Fixes part 1
after initial testnet testing

Use correct intro key for Session/Token request
Fix state management in EstablishmentManager, OES2, IES2
Fix next send time during handshake
Fix header decryption in PacketHandler
Add additional packet checks in IES2 handling
Remove expired IES immediately (SSU1 also)
Failsafe sleep in EstablishmentManager on exception
Remove dup requestSent() calls
Don't release packet in PS2
Log tweaks and javadocs
2022-03-06 06:15:23 -05:00
zzz
9457271ce6 Transport: Fix wasUnreachable() for transports with alt style
Only affects NTCP for now.
This bug had little impact when both transports were enabled,
but significantly harmed connectivity and tunnel building for NTCP2-only.
Decrease unreachable cache time in testnet
Make cache cleaner a little more efficient
2022-03-04 09:17:26 -05:00
zzz
22512d3889 i2psnark standalone: Add more CLI messages
Increase memory
2022-03-04 07:15:16 -05:00
zzz
a7115263f0 i2psnark: Reduce log level 2022-03-04 05:57:27 -05:00
zzz
c4b167b845 i2psnark: Fix css icon link 2022-03-04 05:52:44 -05:00
zzz
5e09245234 i2psnark: Add js theme preview 2022-03-04 05:47:18 -05:00
zzz
fee38c1c32 Console: Add SSU version column to /peers 2022-03-04 05:36:18 -05:00
zzz
a1ced67bad Transport: Fix port selection for NTCP-only 2022-03-04 05:06:01 -05:00