Commit Graph

917 Commits

Author SHA1 Message Date
Jason Rhinelander
9dd604820f
Unleak exit mode DNS via unbound DNS trampoline on (macOS)
When we enable/disable exit mode on this restarts the unbound DNS
responder with the DNS trampoline (or restores upstream, when disabling)
to properly route DNS requests through the tunnel (because libunbound's
direct requests don't get tunneled because unbound is inside the network
extension).
2021-09-02 14:17:10 -04:00
Jeff Becker
e7ac0f3902
expunge outbound contexts that have not gotten inbound traffic for a long while 2021-07-05 09:09:20 -04:00
Jeff Becker
abd6e4c558
use weak_ptr instead of bare pointer to prevent use after free 2021-06-25 05:08:31 -04:00
Jeff Becker
3ad59105ef
when an outbound context is "marked bad" we want to ignore any new paths.
before this commit when a new path was made when an outbound context marked bad lokinet would segfault.
2021-06-23 07:21:01 -04:00
Jeff Becker
67f8a7116f
if we get a discard message from the pivot discard the outbound context if the remote intro is also expired 2021-06-21 16:02:03 -04:00
Jeff Becker
0900ab88d1
publish introsets on nearest routers
fetch introset from random routers
2021-06-21 16:01:38 -04:00
Jeff Becker
ee5723ecdc
add upperbound to number of endpoints used in lns lookups 2021-06-21 15:16:28 -04:00
Jeff Becker
3393b5a5a7
make it so lookups dont time out 2021-06-21 15:16:27 -04:00
Jeff Becker
b5efb8c604
rename local variable to be clear about meaning, add comment 2021-06-21 15:16:27 -04:00
Jeff Becker
1a0e6a7ac1
remove redundant check as ReadyToSend also checks IntroSent() 2021-06-21 15:16:27 -04:00
Jeff Becker
d45f0f8951
value initialize introduction so that expiresAt defaults to zero 2021-06-21 15:16:27 -04:00
Jeff Becker
9f353238af
ReadyToSend also should include checking we have a path to the remote 2021-06-21 15:16:27 -04:00
Jeff Becker
4b11858bb0
make clang compile, remove unused variable 2021-06-21 15:16:27 -04:00
Jeff Becker
963250c0ef
format 2021-06-21 15:16:27 -04:00
Jeff Becker
00d4942d85
more 2021-06-21 15:16:26 -04:00
Thomas Winget
7f9a60066b
make sure we have a path to the next introduction we want to use 2021-06-21 15:16:26 -04:00
Jeff Becker
d9cae4a6c6
in outbound context, ShouldBuildMore intro.ExpiresSoon delta is too big and has no overlap, change it so that 2021-06-21 15:16:26 -04:00
Jeff Becker
e48feb8b9a
kill outbound context when we remove our convotag 2021-06-21 15:16:26 -04:00
Jeff Becker
71d17dc2c9
format and logging
ignore outbound session auth messages
2021-06-21 15:16:26 -04:00
Jeff Becker
b70ecade2b
correct the logic for inbound convos
send back traffic on the correct path
2021-06-21 15:16:25 -04:00
Jeff Becker
ce7643a3aa
remove case that spams build on an outbound context 2021-06-09 09:36:08 -04:00
Jeff Becker
c97fe4aa96
convert magic number to where it came from 2021-06-08 18:07:54 -04:00
Jeff Becker
3594d3e211
spelling fix 2021-06-08 17:54:40 -04:00
Jeff Becker
f9e0c8f50c
add idempotent wakeup for flushing instead of the dumb queue checking 2021-06-08 17:38:04 -04:00
Jeff Becker
e2bdf8792b
typofix 2021-06-08 17:27:50 -04:00
Jeff Becker
5a713b0142
tweak timeouts to be a bit more sane 2021-06-08 14:36:33 -04:00
Jeff Becker
c2722be81c
this fixes the shit wtf 2021-06-08 14:36:33 -04:00
Jeff Becker
5909ad0386
add MarkAddressOutbound to plainquic 2021-06-08 14:36:33 -04:00
Jeff Becker
cce15b13c8
dont establish paths to inbound sessions to try and address state race condition 2021-06-08 14:36:33 -04:00
Jeff Becker
aefab797d7
unconditional putsenderfor 2021-06-08 14:36:33 -04:00
Jeff Becker
0096bd4e35
account for path latency in introset lookups on outbound contexts 2021-06-08 14:36:32 -04:00
Jeff Becker
e4ed53224c
use weak_ptr on a path to reference its parent pathset instead of a bare pointer so crashes dont happen 2021-06-08 14:36:32 -04:00
Jeff Becker
c6660dd6c1
add path aligntment timeout to send and connect timeouts on outbound context to reduce the chance of timing race conditon 2021-06-08 14:36:32 -04:00
Jeff Becker
108b8e089e
HandleTimeout can touch iterators so do all handling of lookup timeouts outside of loop iteration 2021-06-08 14:36:32 -04:00
Jeff Becker
0f1e806155
don't kill outbound context after build or lookup fails 2021-06-08 14:36:32 -04:00
Jeff Becker
a7b20b79c5
add relay order to error message 2021-06-08 14:36:31 -04:00
Jeff Becker
34e31ba04f
only inform failure or success of introset lookups when all lookups have returned 2021-06-08 14:36:31 -04:00
Jeff Becker
220b8837da
delay setting sentIntro by the advertised latency of the remote intro instead of static value 2021-06-08 14:36:31 -04:00
Jeff Becker
c5a86a49a3
defer ready to send state until after we send a handshake 2021-06-08 14:36:31 -04:00
Jeff Becker
40a189a9a3
log drop events more 2021-06-08 14:36:31 -04:00
Jeff Becker
00257567c2
dont call null handler
if we have no path to the remote router that's fine still use it just in case we have no other convotags
2021-06-08 14:36:31 -04:00
Jeff Becker
85cd1b6863
use inbound sessions we don't have paths to in GetBestConvoTagFor just so we can give the caller SOMETHING. 2021-06-08 14:36:31 -04:00
Jeff Becker
b03d17bc8e
dont change send timeout for exits from tun handler as that screws with consistency in testing.
improve log messages, provide more info
2021-06-08 14:36:30 -04:00
Jeff Becker
a94c100e7b
improve log messages about expiring convotags 2021-06-08 14:36:30 -04:00
Jeff Becker
42d75b934d
remove service nodes we can't look up from the nodedb as client 2021-06-08 14:36:30 -04:00
Jeff Becker
8dd1358cc6
* tweak introset handover timeouts
* introset path haodver tweaks
* improve warn/error messages to convey more information
* dont block on queue insertion
* reset convotag on decrypt/verify fail
* add multiple ready hooks on outbound context
* lookup introsets from close routers on dht
* continue to tick dead sessions so they expire their paths
* introset spacing
* reduce lns lookup diversity requirement for speed
* add a function to send reset convotag message
* only have 1 outbound context at a time
2021-06-08 14:36:30 -04:00
Jeff Becker
9a1a022d62
add relayOrder awareness to introset lookups.
* only propgate fail when relay order is non zero as zero relay order often fails
2021-06-08 14:36:30 -04:00
Jeff Becker
b1d30f9803
updates to lokinetmon
* add introset inspector mode
* add required parts for introset insecptor mode to rpc introspection
2021-06-08 14:36:29 -04:00
Jeff Becker
f172db75c5
don't defer call to ready hook with timer call it right away because we are ready 2021-05-16 19:31:59 -04:00
Jeff Becker
432e7f2a5a
update introset if we get a discard message from a possibly expired intro 2021-05-16 16:27:48 -04:00