Commit Graph

5504 Commits

Author SHA1 Message Date
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
zzz
9b361ce71c NetDB: Negative cache LS received with zero leases
Ratchet: Don't schedule a reply to a LS with zero leases
2021-04-01 08:12:35 -04:00
zzz
562b86636a SSU: Update address when IPv6 introducers change (prop. 158)
Enable ipv6 check in locked_rebuild()
Change locked_needsRebuild() to return codes for ipv4/v6
Change locked_needsRebuild() for introducers so it only
returns true if more are available
Change rebuildExternalAddress() so we can do a rebuild of ipv6 without an IP
Only call rebuildIfNecessary() on peer drop if it could have been an introducer
Fix check in pickInbound() for support of AliceIP field
Log tweaks
2021-03-31 12:50:21 -04:00
zzz
8447086c59 Transport: Fix NTCP removing IPv4 address when SSU removes IPv6 address 2021-03-30 07:14:35 -04:00
zzz
fed3063f36 Transport: Don't open UPnP ports when force-firewalled 2021-03-29 14:15:42 -04:00
zzz
e6f5ab967e Transport: Don't open UPnP ports when hidden 2021-03-29 14:04:38 -04:00
zzz
953b64af4a SSU: Don't request introducers when hidden 2021-03-29 13:38:18 -04:00
zzz
e21a3a366b Router: Fix decryption of blinded leasesets
Reverse cache wasn't regenerated at midnight,
so decryption would fail after the first routing key change.
We had the rollover() method but it wasn't called.
2021-03-27 08:15:01 -04:00
zzz
684506b0be Transports: Don't open UPnP ports for disabled IPv4/v6 2021-03-25 08:46:00 -04:00
zzz
aecd8efcca SSU: Implement IPv6 introductions (proposal 158)
WIP
Offer intro key for IPv6
Pick introducers for IPv6
Publish address with IPv6 introducers
Reduce churn of selected introducers
Only adjust transport bid if they publish C cap
Log tweaks
2021-03-25 08:03:33 -04:00
zzz
5f39426073 NetDB: Don't note 'enabled floodfill' in event log every startup when forced on 2021-03-24 09:32:01 -04:00
zzz
0ab429e1ed NetDB: Sort published addresses for consistency 2021-03-23 08:17:38 -04:00
zzz
bd6d6426fd SSU: Try to fix IPv6 transition from firewalled to non-firewalled
state was right but published address wasn't updated because looking
in wrong place for saved ipv6 address
2021-03-23 08:14:17 -04:00
zzz
9a106cb326 I2NP: lookup message debug output fixes 2021-03-22 12:42:28 -04:00
zzz
bbfd94359b Tunnels: Don't count established routers as new in OBEP throttle (ticket #2245)
reported by zlatinb
patch from jogger
2021-03-22 12:38:57 -04:00
zzz
64695a8060 SSU: Fix persisting IPv6 firewalled state 2021-03-22 12:02:36 -04:00
zzz
86b49546c8 Sybil: Persist blocklist 2021-03-22 10:36:42 -04:00
zzz
12c4f43109 Transport: Better IPv6 address check
We don't want to match on "46"
2021-03-22 07:00:17 -04:00
zzz
d5fd754a25 Tunnels: Garlic encrypt ITBM to IBGW
WIP, see proposal 157.
Will not take effect until we actually send ITBMs.
Tested with regular VTBMs.
2021-03-21 09:25:47 -04:00
zzz
4e1848c336 I2CP: Ensure nickname properties are set 2021-03-20 12:58:14 -04:00
zzz
b55fbbf099 Boolean.valueOf() -> Boolean.parseBoolean() 2021-03-20 12:27:46 -04:00
zzz
005ac38742 Tunnels: Fix RED dropping for part. tunnels (Gitlab MR !24)
Part 1:
Change bandwidth estimate to exponential moving average
(Similar to Westwood+ Simple Bandwidth Estimator in streaming)
instead of 40 ms bucket.
Also use it for tunnel.participatingBandwidthOut stat.
Remove linear moving average code previously used for stat
Reduce RED threshold from 120% to 95% of limit

Part 2:
Fix the other part of RED which is the dropping calculation.
Previously, it simply used the bandwidth to start dropping if
it was higher than a threshold. The drop percentage rose from
0 to 100%, linearly, based on how far the bandwidth was
above the threshold. This was far, far from the RED paper.

Now, we follow the RED paper (see ref. in SyntheticREDQueue javadoc)
to calculate an average queue size, using the exact same
exponential moving average method used for bandwidth.
Similar to CoDel, it also includes a count of how long
the size is over the threshold, and increases the drop probability with the count.
The unadjusted drop probability rises from 0 to 2%
and then everything is dropped, as in the RED paper.
The low and high thresholds are configured at 77 ms and 333 ms of queued data, respectively.

The queue is "synthetic" in that there's not actually a queue.
It only calculates how big the queue would be if it were
a real queue and were being emptied at exactly the target rate.
The actual queueing is done downstream in the transports and in UDP-Sender.

The goals are, for an 80% default share, to do most of the
part. traffic dropping here in RED, not downstream in UDP-Sender,
while fully utilizing the configured share bandwidth.
If the router goes into high message delay mode, that means we are not dropping enough in RED.
Above 80% share this probably doesn't work as well.

There may be more tuning required, in particular to achieve the goal of "protecting" the UDP-Sender
queue and local client/router traffic by dropping more aggressively in RED.

This patch also improves the overhead estimate for outbound part. tunnel traffic at the OBEP.

Reviewed, tested, acked by zlatinb
2021-03-20 10:49:30 -04:00
zzz
03c657b466 javadoc fix 2021-03-19 13:02:35 -04:00
zzz
3615a9b235 SSU: Skip router addresses with introducers and '6' cap
for now, until implemented, see proposal 158
2021-03-19 11:36:17 -04:00
zzz
bd724d1e1f Transports: Enable 4/6 caps
Set i2np.transportCaps=false to disable
Fix NTCP2 address with host and caps after state transition
Bump -7
2021-03-16 08:59:22 -04:00
zzz
be863d643e SSU: Fix IPv6 addresses not being removed on some state transitions
Ensure IPv4/v6 peer tests are alternated
Reschedule peer test if result is UNKNOWN and a state transition is pending
Fix peer test last send time not being set in all cases
2021-03-15 07:37:08 -04:00
zzz
023a7fdebe NetDB: Queue RI file deletion and delete in a single thread
Do both writes and removes in the writer thread
As suggested by jogger http://zzz.i2p/topics/3082
log tweaks
2021-03-10 14:17:45 -05:00
zzz
77375148e3 NTCP: More NTCP 1 removal cleanup 2021-03-10 07:16:29 -05:00
zzz
5c232792cc SSU: Don't change ports in some cases 2021-03-10 07:03:33 -05:00