Commit Graph

7972 Commits

Author SHA1 Message Date
Jeff Becker
67c7f2f91e
do not build embedded lokinet 2022-11-08 09:12:14 -05:00
Jeff Becker
b5a020c0e8
fix path for systemd-resolved files in PKGBUILD 2022-11-08 09:12:14 -05:00
Jeff Becker
5353ca7707
fix user/group in lokinet.tmpfiles to be proper name 2022-11-08 09:12:14 -05:00
Jeff Becker
887176f0f2
add initial pkgbuild jizz for archlinux so that we can help make sure it is not broken ALL the time 2022-11-08 09:12:14 -05:00
Jason Rhinelander
67863cd9a4
Merge branch 'dev' into stable 2022-11-04 11:36:05 -03:00
Jason Rhinelander
4f1f336e50
Bump openssl static build version 2022-11-03 20:51:02 -03:00
Jason Rhinelander
2660761ce2
Merge pull request #2047 from oxen-io/dev
lokinet v0.9.10
2022-11-03 20:38:38 -03:00
majestrate
7325878afd
Merge pull request #2048 from majestrate/simplify-ons-ready-logic-2022-11-03
simplify llarp::service::Endpoint::ReadyToDoLookup()
2022-11-03 11:14:35 -04:00
majestrate
29da2a9943
Update llarp/service/endpoint.cpp
Co-authored-by: Jason Rhinelander <jason@imaginary.ca>
2022-11-03 10:49:57 -04:00
Jeff Becker
e5efe793ca
llarp::service::Endpoint::ReadyToDoLookup()
previously we had a checking style function that passes in an optional
defaulting to nullopt as a micro optimzation, this makes the code
unnessarily obtuse.

simplify this by splitting up into 2 functions,
one for getting the unique endpoints and one for checking if the
number of them is above the minimum.

add overload for ReadyToDoLookup() that checks against constant but
can do more in the future if desired to reduce the burden on future contributors.
2022-11-03 10:00:44 -04:00
Jason Rhinelander
9dfb4a389c
Update gui subproject 2022-11-02 20:47:28 -03:00
majestrate
b67a70517d
Merge pull request #2046 from majestrate/fix-lokinet-vpn-2022-11-02
prevent throwing on no error in lokinet-vpn
2022-11-02 16:41:44 -04:00
Jeff Becker
0cf637178d
prevent throwing on no error in lokinet-vpn 2022-11-02 15:42:49 -04:00
Jeff Becker
0bb58b4ac0
dont hardcode keyid 2022-11-02 09:32:31 -04:00
Jeff Becker
88b5a84df3
explicitly select signing key used in source tarball signing script 2022-11-02 09:24:31 -04:00
Jeff Becker
9adf099d20
remove dead file 2022-11-02 09:13:37 -04:00
majestrate
8ec1a57dac
correct documentation
the `make format` target doesn't exist anymore as we moved it to a shell script.
2022-11-02 09:12:47 -04:00
majestrate
bcaf9f886c
point to explicit link
linking to docs directory is technically not correct. we should link to the file github shows for preview which is docs/readme.md
2022-11-02 09:07:12 -04:00
majestrate
9ca0d7094e
update note about platform support
android is currently unsupported
2022-11-02 09:05:34 -04:00
majestrate
1c51bb1041
Merge pull request #2045 from majestrate/windows-service-issues
windows platform bug fixes
2022-11-02 08:27:12 -04:00
Jeff Becker
d911e26b1d
remove duplicate log statement 2022-11-01 19:09:17 -04:00
Jeff Becker
3a8007cc3f
remove assert()
we_changed_our_state can accept the state we are in right now, so this
assert no longer is correct.
2022-11-01 11:29:00 -04:00
Jason Rhinelander
6a110a4f1b
RPC: fix "halt" command 2022-11-01 11:06:03 -04:00
Jason Rhinelander
3bc3ae9d84
patch unbound to fix windows shutdown crash 2022-11-01 11:06:03 -04:00
Jason Rhinelander
40348b24e1
Fix crash on unbound cleanup
We need to make a copy here because (see comment).
2022-11-01 11:06:03 -04:00
Jason Rhinelander
b8678a767e
Fix crashy race condition in shutdown
Query->Cancel() will remove the Query, but that introduces a race
condition where unbound may still try to invoke the callback (with a
no-longer-valid pointer) if we do it before the ub_ctx_delete call.

Move to it afterwards so that we only cancel things that unbound didn't
2022-11-01 11:06:02 -04:00
Jeff Becker
9aa6b64c1e
use std::shared_ptr for pending queries 2022-11-01 11:06:02 -04:00
Jason Rhinelander
c7a133ac9c
windivert: avoid trying to send during shutdown
Occasionally during shutdown windivert will crash because a thread tries
sending after we've called wd::shutdown, which isn't allowed.  Add an
atomic bool to prevent this.
2022-11-01 11:06:02 -04:00
Jason Rhinelander
cdc4c486c4
Add more stopping signals 2022-11-01 11:06:02 -04:00
Jason Rhinelander
2b5f1ee029
Remove bad assert
We do and should be able to call this multiple times during shutdown to
signal that we are advancing through shutdown.
2022-11-01 11:06:02 -04:00
Jason Rhinelander
3d429b353a
Don't raise log level on shutdown
If already below info (e.g. debug) it should stay there; we only want to
*lower* it to info if above info.
2022-11-01 11:06:01 -04:00
Thomas Winget
9960aed45c
stop-time debug statements 2022-11-01 11:06:01 -04:00
Jeff Becker
57b77fecb3
fix crash on shutdown
we were calling llarp::Context::HandleSignal from a non mainloop
thread when running as a win32 service. this caused issues with a non
clean destruction.

call our signal handler instead of llarp::Context::HandleSignal
2022-11-01 11:06:01 -04:00
Thomas Winget
dceef0b21e
remove dead dns resolver code 2022-11-01 11:06:01 -04:00
Jason Rhinelander
95c0c8a707
Improve windows running-as-a-service detection works
Get rid of the --win32-daemon hack (which was removed from the service
itself earlier in this PR, by mistake) and replace it with detection of
the error code for "not running as a service" that windows gives us back
if we try to set up service controller dispatching but aren't a service.
2022-11-01 11:06:00 -04:00
Jason Rhinelander
4ad66ac2a5
Remove unused VERSION_STR constant 2022-11-01 11:06:00 -04:00
Jason Rhinelander
5be7dbf8ec
Move log init even earlier 2022-11-01 11:06:00 -04:00
Jeff Becker
3b6cbec08e
fix typo in filename 2022-11-01 11:06:00 -04:00
Jeff Becker
a16af792d2
simplify logic for disabling service manager on windows 2022-11-01 11:06:00 -04:00
majestrate
84834089d1
Update llarp/router/router.cpp
use `fmt::join` for lokinet version string in status

Co-authored-by: Jason Rhinelander <jason@imaginary.ca>
2022-11-01 11:05:59 -04:00
Jason Rhinelander
31c312ad41
Extend windows startup timeout
If wintun fails it seems to take about 15s, so extend the startup
timeout so that it can fail gracefully (and let us clean up before
exiting).

Also refactors the timeouts to chrono constants.
2022-11-01 11:05:59 -04:00
Jason Rhinelander
71bea4f0fc
Add networkReady to stats result 2022-11-01 11:05:59 -04:00
Jason Rhinelander
bd5efd8149
Update gui to latest 2022-11-01 11:05:59 -04:00
Jason Rhinelander
5c12110e93
Add some more debugging 2022-11-01 11:05:58 -04:00
Jason Rhinelander
64cf268457
Fix crashes in wintun and windivert stopping
Fixes windows shutdown crashes:

- windivert wasn't handling an ERROR_NO_DATA, which it gets when
  finished handling everything after a shutdown.
- wintun ReadPacket still gets invoked after end_session is called, but
  shouldn't be.  This adds an atomic<bool> to early return.
- fixes up some settings we send for windows service manager notify
2022-11-01 11:05:58 -04:00
Jason Rhinelander
879e678771
Remove dead/redundant code
- win32_platform.cpp is dead
- win32_platform.hpp is useless

Style changes from clang-tidy warnings:
- remove `virtual` from some definitions that already have `override`
- remove virtual destructor from NetworkInterface because it already has
  a virtual destructor via the base type (and clang-tiny warns about it)
2022-11-01 11:05:58 -04:00
Jeff Becker
4103908a8d
system layer manager (llarp::sys::service_manager)
the win32 and sd_notify components provided a disjointed set of
similar high level functionality so we consolidate these duplicate
code paths into one that has the same lifecycle regardless of platform
to reduce complexity of this feature.

this new component is responsible for reporting state changes to the
system layer and optionally propagating state change to lokinet
requested by the system layer (used by windows service).
2022-11-01 11:04:58 -04:00
Jeff Becker
a7f3c3595b
fix comment to reflect reality 2022-10-27 11:03:45 -04:00
Thomas Winget
7ddad87dbf some useful log statements 2022-10-27 11:00:40 -04:00
Jeff Becker
9cdfae2e42
correct windows service manager behavior.
report status to window service manager when we get and iterogate
message from the service manager.
update comments to reflect these changes.
2022-10-27 10:54:43 -04:00