Commit Graph

7951 Commits (0cf637178d21393b696df7a0efa00081e077ad1d)
 

Author SHA1 Message Date
Jeff Becker 0cf637178d
prevent throwing on no error in lokinet-vpn 2 years ago
Jeff Becker 0bb58b4ac0
dont hardcode keyid 2 years ago
Jeff Becker 88b5a84df3
explicitly select signing key used in source tarball signing script 2 years ago
Jeff Becker 9adf099d20
remove dead file 2 years ago
majestrate 8ec1a57dac
correct documentation
the `make format` target doesn't exist anymore as we moved it to a shell script.
2 years ago
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
2 years ago
majestrate 9ca0d7094e
update note about platform support
android is currently unsupported
2 years ago
majestrate 1c51bb1041
Merge pull request #2045 from majestrate/windows-service-issues
windows platform bug fixes
2 years ago
Jeff Becker d911e26b1d
remove duplicate log statement 2 years ago
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.
2 years ago
Jason Rhinelander 6a110a4f1b
RPC: fix "halt" command 2 years ago
Jason Rhinelander 3bc3ae9d84
patch unbound to fix windows shutdown crash 2 years ago
Jason Rhinelander 40348b24e1
Fix crash on unbound cleanup
We need to make a copy here because (see comment).
2 years ago
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
2 years ago
Jeff Becker 9aa6b64c1e
use std::shared_ptr for pending queries 2 years ago
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.
2 years ago
Jason Rhinelander cdc4c486c4
Add more stopping signals 2 years ago
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.
2 years ago
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.
2 years ago
Thomas Winget 9960aed45c
stop-time debug statements 2 years ago
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
2 years ago
Thomas Winget dceef0b21e
remove dead dns resolver code 2 years ago
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.
2 years ago
Jason Rhinelander 4ad66ac2a5
Remove unused VERSION_STR constant 2 years ago
Jason Rhinelander 5be7dbf8ec
Move log init even earlier 2 years ago
Jeff Becker 3b6cbec08e
fix typo in filename 2 years ago
Jeff Becker a16af792d2
simplify logic for disabling service manager on windows 2 years ago
majestrate 84834089d1
Update llarp/router/router.cpp
use `fmt::join` for lokinet version string in status

Co-authored-by: Jason Rhinelander <jason@imaginary.ca>
2 years ago
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.
2 years ago
Jason Rhinelander 71bea4f0fc
Add networkReady to stats result 2 years ago
Jason Rhinelander bd5efd8149
Update gui to latest 2 years ago
Jason Rhinelander 5c12110e93
Add some more debugging 2 years ago
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
2 years ago
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)
2 years ago
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).
2 years ago
Jeff Becker a7f3c3595b
fix comment to reflect reality 2 years ago
Thomas Winget 7ddad87dbf some useful log statements 2 years ago
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.
2 years ago
Thomas Winget a9a2a115bc
debian missing yacc apparently all of a sudden 2 years ago
Thomas Winget fcc4f6050d
wait until actually stopped to tell windows we are
We should send STOP_PENDING rather than STOPPED while we aren't yet
actually stopped; STOPPED is already sent when we actually finish
stopping.

Also fixes some silly argc/argv shenanigans, I think.
2 years ago
majestrate e8055a05ad
Merge pull request #2039 from jagerman/shorter-gossip-times
Shorten gossip times in systemd status line
2 years ago
Jason Rhinelander b6924f3ef1
Replace duration/timestamp formats with functions
We're defining formats for std::chrono types, which feels wrong (because
fmt itself also has these), so just replace them with functions:

short_time_from_now(...) gives a short "in 14m12s" or "5.123s ago" time
span relative to now, given a time point.  Precision gets reduced for
larger deviations from now (e.g. "4h12m ago").

ToString(Duration_t) gives a string such as "-3h22m02.123s" for a
duration.
2 years ago
majestrate d91c82c623
Merge pull request #2038 from majestrate/bind-fix-2022-10-26
proper handling of public ips
2 years ago
Jason Rhinelander 67e002c8ee
Fix time_delta<seconds> formatting in milliseconds
The time_delta<T> was using the wrong duration type when formatting, so
was outputting millisecond precision in the systemd status string which
is pointless (and unintended).
2 years ago
Jason Rhinelander 9f10e8003e
Remove useless iterator assignments
A back_inserter doesn't change when you insert onto it.
2 years ago
majestrate 3d0bc4a76c
Merge pull request #2037 from jagerman/ico-using-rsvg-convert
Use rsvg instead of imagemagick to make windows .ico; split up windows build
2 years ago
Jeff Becker 1e5b5ca1f5
proper handling of public ips
in service node mode make sure that when overriding public ip we only
fail when using 2 different public ip.
2 years ago
Jason Rhinelander 491f452dd7
Windows prebuilt gui fixes
Currently you can't use GUI_EXE without BUILD_GUI, but BUILD_GUI also
requires the yarn command (even though it will never use it when GUI_EXE
is set).

This commit fixes it:

- Make `GUI_EXE` a windows-only top-level project options, rather than
  being guarded by `BUILD_GUI`.
- Make `BUILD_GUI` control *building* the GUI instead of bundling it.
- GUI_EXE and BUILD_GUI are now mutually exclusive.
2 years ago
Jason Rhinelander caf97b1861
Split windows into gui/main builds, main now builds on bookworm
The options we need in rsvg-convert are apparently too new for bullseye,
so split the build so that we do the gui separately (in the nodejs-lts
container) and then build lokinet in bookworm.
2 years ago
Jason Rhinelander 11e052cb39
Add rsvg-convert dep to windows readme 2 years ago