Commit Graph

612 Commits (871c3e3281d15ce876fcd85a02228b4e70453bac)

Author SHA1 Message Date
Jeff 871c3e3281
changeset for windows port
* wintun vpn platform for windows
* bundle config snippets into nsis installer for exit node, keyfile persisting, reduced hops mode.
* use wintun for vpn platform
* isolate all windows platform specific code into their own compilation units and libraries
* split up internal libraries into more specific components
* rename liblokinet.a target to liblokinet-amalgum.a to elimiate ambiguity with liblokinet.so
* DNS platform for win32
* rename llarp/ev/ev_libuv.{c,h}pp to llarp/ev/libuv.{c,h}pp as the old name was idiotic
* split up net platform into win32 and posix specific compilation units
* rename lokinet_init.c to easter_eggs.cpp as that is what they are for and it does not need to be a c compilation target
* add cmake option STRIP_SYMBOLS for seperating out debug symbols for windows builds
* intercept dns traffic on all interfaces on windows using windivert and feed it into lokinet
2 years ago
Jeff 2d586145ee
wire up dns srv records 2 years ago
Jason Rhinelander 81f05d63c1
Move destructor back to .cpp file
Having it there (even defaulted, like this) means endpoint.hpp doesn't
have to include endpoint_state.hpp (which it otherwise would need,
because of the std::unique_ptr<EndpointState> default deleter
requirements).
2 years ago
Jason Rhinelander 4a4f16e5c8
Remove dead code: netns, shell hooks
These haven't been activated in a long time and aren't worth
resuscitating.
2 years ago
Jeff 14d75cc654
add util::ascending_priority_queue type 2 years ago
Jeff 205584acdf redo systemd status line to include number of paths and endpoint count. optionally warn about low path success. 2 years ago
Jeff Becker 172c2dec45
create new constexpr for the staleness window for introsets and use it in publishing introsets and intro selection 3 years ago
Jason Rhinelander 189c4bfba4
Also consider last publish; eliminate unwanted condition
We don't really carry about when the last regen was attempted, but
rather about when the last publish was attempted (or succeeded).
3 years ago
Jeff Becker 8ba03de44e
match timeouts in introset selection spread with logic for publishing 3 years ago
Jason Rhinelander 0fe7153f6e Fix client latency bug; De-shared_ptr IHopHandler queues
- Replace m_FlushWakeup with a call to the router's god mode pump
  method.  m_FlushWakeup apparently isn't enough to get things out, and
  we can end up with incoming packets that don't get properly handled
  right away without it.

- The shared_ptr around the ihophandler queues isn't needed and is just
  adding a layer of obfuscation; instead just exchange the list directly
  into the lambda.

- Use std::exchange rather than swap

- A couple other small code cleanups.
3 years ago
Jason Rhinelander 70553c7627 Remove hopeless flush
The TriggerPump just below this is *already* going to trigger a flush,
so the extra flush call here can't do anything useful (and in
particular, it won't clear up the queue *immediately*, which is what
this code looks like it was aimed at doing).
3 years ago
Jason Rhinelander fbc5cb0a6d Add another missing pump trigger 3 years ago
Jason Rhinelander bce7e2e56d Pump outbound context 3 years ago
Jason Rhinelander 846577a0aa Add missing inbound traffic pump trigger 3 years ago
Jason Rhinelander f9395cd5dd Cleanup: avoid pointless copy of `this` pointer 3 years ago
Jason Rhinelander 9844d358e6 Fix packet delay creep
- Make the main PumpLL also pump hidden services, rather than using
  separate wakers in each TunEndpoint.  It seems there is some
  interactions that just one or the other is not enough.

- Eliminate TunEndpoint send queue -- it isn't needed as we can just
  send directly.
3 years ago
Jason Rhinelander 78cc466bf2 Rename PumpLL -> TriggerPump
And rename the actual pump implementation back to PumpLL.
3 years ago
Jason Rhinelander 031ea7aa37 Get rid of external event loop direct wakeups
If something needs to wake up the event loop it should be using an
async, as we are now with PumpLL(); but we had various code triggering a
wakeup, expecting that PumpLL gets called on every wakeup, which isn't
true anymore.
3 years ago
Jeff 1846c3e3d8
prevent bizare half open state. (#1754)
* attempt path timeout bullshittery fix

* make sure ServiceInfo always has its address set up

* do not copy intros in constuctor, ammend logging and
add assert
3 years ago
Jeff Becker 0900ab88d1
publish introsets on nearest routers
fetch introset from random routers
3 years ago
Jeff Becker ee5723ecdc
add upperbound to number of endpoints used in lns lookups 3 years ago
Jeff Becker 3393b5a5a7
make it so lookups dont time out 3 years ago
Jeff Becker 4b11858bb0
make clang compile, remove unused variable 3 years ago
Jeff Becker 963250c0ef
format 3 years ago
Jeff Becker 71d17dc2c9
format and logging
ignore outbound session auth messages
3 years ago
Jeff Becker b70ecade2b
correct the logic for inbound convos
send back traffic on the correct path
3 years ago
Jeff Becker 5909ad0386
add MarkAddressOutbound to plainquic 3 years ago
Jeff Becker cce15b13c8
dont establish paths to inbound sessions to try and address state race condition 3 years ago
Jeff Becker aefab797d7
unconditional putsenderfor 3 years ago
Jeff Becker e4ed53224c
use weak_ptr on a path to reference its parent pathset instead of a bare pointer so crashes dont happen 3 years ago
Jeff Becker a7b20b79c5
add relay order to error message 3 years ago
Jeff Becker 34e31ba04f
only inform failure or success of introset lookups when all lookups have returned 3 years ago
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
3 years ago
Jeff Becker 85cd1b6863
use inbound sessions we don't have paths to in GetBestConvoTagFor just so we can give the caller SOMETHING. 3 years ago
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
3 years ago
Jeff Becker 42d75b934d
remove service nodes we can't look up from the nodedb as client 3 years ago
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
3 years ago
Jeff Becker 9a1a022d62
add relayOrder awareness to introset lookups.
* only propgate fail when relay order is non zero as zero relay order often fails
3 years ago
Jeff Becker f1efcc29ea
mark inbound traffic as convotag active 3 years ago
Jeff Becker c5350ab2c4
DefaultPathAlignmentTimeout -> PathAlignmentTimeout 3 years ago
Jeff Becker c834414b47
when we have to reestablish an outbound session use a much much higher timeout for restablishment
so it doesn't time out and get into a state that's totally screwed.

add virtual function service::Endpont::DefaultPathAlignmentTimeout() to get the timeout for path alignment
and use it for resetablishing outbound sessions
3 years ago
Jeff Becker 3c22e01d7c
in the event that a session is removed and then gets more traffic we would re-add the session with everything blank if there was more traffic in the same tick.
this remedies this behavior by only increment usage timestamps on sessions if they exist.
3 years ago
Jeff Becker d3d929efa7
fixups in service endpoint
* increase publish introset timeout so that it does not time out on the network
* remove pedantic log warn
* make sure the path we are using for replying on inbound sessions is alive
* include convotag in log message so we know wtf is going on
* appease tom's autism, improve log message text
3 years ago
Jeff Becker e916c9610c
format 3 years ago
Jeff Becker 0826a557d6
use correct intro 3 years ago
Jeff Becker 0005bee196
allow more than one outbound context per endpoint for fallback in case one outbound context takes a shit 3 years ago
Jeff Becker 83e70d95e0
dont invalidate cache on lns timeout, only on explicit negative 3 years ago
Jeff Becker f9fe6f7e3b
consmetic fixes
* print names in lookup jobs instead of yyyyyy
* update syntax in construction of objects
3 years ago
Jeff Becker f2e8b5547d
compat for lokinet 0.8.x
* don't send messages back that aren't expected
3 years ago
Jeff Becker b721b8d65b
finish wiring up config for #1595 3 years ago