Commit Graph

670 Commits (quic-wip)

Author SHA1 Message Date
Jason Rhinelander b3dc23e1bf Remove release motto
This doesn't really have a purpose.
6 months ago
dr7ana 07271f9ae7 RC refactor layout
- Local and Remote RC's now implemented with discrete functionalities and uses
7 months ago
Jason Rhinelander a7a18868c7
Turn off terrible new cmake 3.24+ default 7 months ago
dr7ana 46ad8d4058 Clang format include sorting + CMake
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use
- shuffled around some cmake linking to simplify dependency graph
- superfluous files removed
7 months ago
dr7ana bda8b211dd Cmake restructuring 7 months ago
dr7ana 11e54f6552 More message refactoring
- routing messages and surrounding code
- shim code in place for iteration and optimization after deciding what to do with buffer, string handling, and subsequent function calls
9 months ago
dr7ana a921575c55 mein gott 9 months ago
Thomas Winget edd3534425 Default cmake BUILD_SHARED_LIBS to OFF
By not having BUILD_SHARED_LIBS as a defaulted option, if it was not set
in the invocation of cmake then any submodule could come along and set
it instead by declaring it as an option.  If/when this happens in the
middle of the cmake process, some modules will have the flag unset and
others will have it as the default that the submodule set, leading to
inconsistent compilation parameters at best, but likely linking failure.
9 months ago
Jason Rhinelander d92d95177d
ngtcp2 build fix
-std=c99 breaks ngtcp2's build -- it appears to depend on GNU extensions
when compiling on linux, so don't force compiler C extensions off.
9 months ago
Jason Rhinelander c997ca2b60
Don't rely on cmake search path for StaticBuild
Resolves a conflict with libquic's StaticBuild.
9 months ago
dr7ana ad5055b85f cmake tweaks for redundant dependencies (WIP) 9 months ago
dr7ana 9acac2c33e CI fixes
- oxen-logging updated to bump fmt version
- version bump oxen-logging to fix fmt version
- version bump oxen-mq to solve uniform distribution error
- misc errors introduced by above version bumps
- clang-format 14 -> 15
10 months ago
Jeff Becker 2498a085db
rearrange cmake libraries
define relations and document them.
make responsibilies clear and consice.
1 year ago
Jason Rhinelander d9d3041dce
Bump version for fix release
In retrospect the last release really should have been called 0.10.0 and
this should be 0.10.1, but too late now.
2 years ago
Jason Rhinelander 82e2e6fb10
bake in bootstrap fallbacks at build time
also change the defailt/fallback bootstrap file for testnet to be a list
of RCs (albeit of size 1) rather than just an RC dict.
2 years ago
Thomas Winget cc1bcf86fa
Fallback bootstrap router build parameter
Adds a fallback bootstrap file path parameter to CMake, specify
-DBOOTSTRAP_SYSTEM_PATH="/path/to/file" to use.

Adds a list of (currently 1) obsolete bootstrap RouterIDs to check
bootstrap RCs against.  Will not use bootstrap RCs if they're on that
list.

Log an error periodically if we appear to be an active service node but
have fewer than a set number (5) known peers.

Bumps oxen-logging version for literal _format.
2 years ago
Jason Rhinelander bac3f9dca1
fix macos assemble_gui dependency
The `sign` target on macos was not working properly -- the signing
script would run before the build is finished.  This was caused by
cmake/macos.cmake having an `if(BUILD_GUI)`, but BUILD_GUI isn't defined
as an option until cmake/gui.cmake, which hadn't been included yet where
macos.cmake was included.

This extracts just the `option(BUIL_GUI)` from gui.cmake into a separate
gui-option.cmake file that we can load earlier to fix it.

While here I also noticed the GUI_EXE setting was defined as an option,
but isn't actually a boolean value, as an option, but isn't actually a
boolean value, so fixed it by making it a `set(... CACHE FILEPATH ...)`.
2 years ago
Jason Rhinelander c4c5d128c3
Add ring buffer sink to macos build 2 years ago
Jason Rhinelander 7078ab06bc
compiler warnings cmake 3.13 compatibility fix 2 years ago
Jason Rhinelander a82907bc6c
Set various -W flags on apple
Apple supports anything here that Clang supports and should have them
set the same as everywhere else.

Most importantly this gives apple the -Wno-deprecated-declarations flag
which has been driving me nuts on macos.

This also version-gates the -Wno-deprecated-declarations so that it
will turn on again when we bump the version beyond .10.
2 years ago
Jason Rhinelander ef4e720890
Bump cmake min to 3.13 and adopt policies up to 3.24
3.13...3.xx means "minimum is 3.13, but use any new cmake policies
introduced up to 3.xx".

There was, in particular, a policy w.r.t.  external project timestamps
causing warnings under 3.24.
2 years ago
Jeff Becker 4490fdcf46
fix up CI
add jason's suggested changes for artifact upload

use lokinet-ci-nodejs-lts as base image so we can build the installer

update ci pipeline for windows to have building gui toggle-able

by default we will build the gui from this repo, but this allows it to
easily run using a custom gui asset if needed
2 years ago
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 e981c9f899
tweaks for wine and yarn for gui
* allow specifying a custom yarn binary for building the gui using -DYARN= cmake option
* unset DISPLAY when calling wine because i hate popups
* do not rebuild gui when building for windows
* by setting the magical undocumented env var USE_SYSTEM_7ZA to 'true' we can have the pile of npm bullshit code use our system's local 7z binary instead of the probably not backdoored binary from npm, yes for real. i hate nodejs so god damn much you have no fucking idea
* allow providing a custom gui from a zip file via -DGUI_ZIP_FILE cmake option
2 years ago
Jason Rhinelander 2eef7c5915
Don't look for sqlite when not building peerstats 2 years ago
Jason Rhinelander 500530a336 dmg: version, and set icon
- Add the version number into the .dmg filename
- Set the lokinet icon on the .dmg.  This is done via a swift program
  because all the Apple CLI tools to do this are deprecated.
2 years ago
Jason Rhinelander 039d1429f5 Build an installer dmg 2 years ago
Jeff a9abeb33cc
bump version to 0.9.10
* update release motto for 0.9.10
2 years ago
Jason Rhinelander 2b7b1fcc79 Working signed macOS GUI build 2 years ago
Jason Rhinelander 496c1d274c Stub out the peer stats sqlite_orm code
This avoids needing to build it and include it in static builds since we
aren't currently making use of it.
2 years ago
jeff 181de210cd Build apple/macos GUI from lokinet project
This adds the gui as a submodule, and consolidates the GUI handling a
bit between the two platforms.
2 years ago
Jason Rhinelander 09372994bb macOS system extension support
Adds support for building Lokinet as a system extension, and fixes
various problems in the macos implementation found during development of
the system extension support.
2 years ago
Jason Rhinelander 4c39a2d395 Make sure BUILD_SHARED_LIBS is a cache variable
Otherwise cmake warns about propagation of normal variables into cache
variables when it hits the option in the oxen-mq submodule.
2 years ago
Jeff 68148e098f
* add mockable network functions
* add unit tests with ability to pretend to be different network setups
2 years ago
Jason Rhinelander b81f7025c9
Replace logging with oxen-logger
Replaces custom logging system with spdlog-based oxen logging.  This
commit mainly replaces the backend logging with the spdlog-based system,
but doesn't (yet) convert all the existing LogWarn, etc. to use the new
format-based logging.

New logging statements will look like:

    llarp::log::warning(cat, "blah: {}", val);

where `cat` should be set up in each .cpp or cluster of .cpp files, as
described in the oxen-logging README.

As part of spdlog we get fmt, which gives us nice format strings, where
are applied generously in this commit.

Making types printable now requires two steps:
- add a ToString() method
- add this specialization:

      template <>
      constexpr inline bool llarp::IsToStringFormattable<llarp::Whatever> = true;

This will then allow the type to be printed as a "{}" value in a
fmt::format string.  This is applied to all our printable types here,
and all of the `operator<<` are removed.

This commit also:
- replaces various uses of `operator<<` to ToString()
- replaces various uses of std::stringstream with either fmt::format or
  plain std::string
- Rename some to_string and toString() methods to ToString() for
  consistency (and to work with fmt)
- Replace `stringify(...)` and `make_exception` usage with fmt::format
  (and remove stringify/make_exception from util/str.hpp).
2 years ago
Jason Rhinelander c37d6ea43b
Remove shadow testing framework
Bitrotten and apparently doesn't work with libuv event loop.
2 years ago
Jason Rhinelander 0edb4435d4
Cmake cleanup: remove unneeded =1 from definitions
We only check for definedness, not truth, in the code so make the cmake
definitions agree with that.

This also avoids warnings when building on macos (because swift only
allowed defined/undefined but not values)
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
Jason Rhinelander 523a8a74ca
Clean up system-or-submodule handling
Fixes a bug on older cmake linking against oxenmq (older cmake hates the
direct oxenmq::oxenmq -> PkgConfig::OXENMQ alias), and also makes it
easier to handle things like nlohmann::json (which we can use from the
system *or* submodule).

Borrowed from oxen-ss/oxen-core.
2 years ago
Jeff 2576b87c5d
version bump to 0.9.9 2 years ago
Jeff 1dfc2e883b
bump verions of all deps
bump submodules

Fix dynamic version generation

   - GIT_FOUND OR Git_FOUND wasn't available because we hadn't done a
     find_package(Git) yet.
   - required version variables weren't being passed through to the cmake
     script
2 years ago
Jeff f05c2ebc71
macro removals
clean up version cmake stuff

clean up generated cpp version stuff

make all the windows rc stuff get generated by cmake

bump release motto message

properly inject release motto into version
2 years ago
Jeff 9556741f6a
split up link order for oxenmq and oxenc
* lokinet uberlib needs oxenc and oxenmq
* lokinet-util only needs oxenc

fixes #1911
2 years ago
Jason Rhinelander c2f8a618e0
Update to oxenc 1.0.2 2 years ago
Jeff 56492c88ac dry cross compile 2 years ago
Jeff 6629e8c881 cmake workarround for quark in older cmake where pkg config produces non existing targets 2 years ago
Jason Rhinelander d02558350a
Crank oxen-mq to (1.2.)11; switch to oxen-encoding
- Update oxen-mq submodule to latest stable
- Add oxen-encoding submodule
- Convert all oxenmq encoding usage to oxenc
- Modernize cmake handling of oxenmq/oxenc
2 years ago
Jeff Becker 8153edbf43 dont enable apple languages when not building daemon 2 years ago
Jeff Becker f38bf2770d move WITH_BOOTSTRAP option to root project CMakeLists.txt 2 years ago
Jeff Becker 9d069983b4 add WITH_BOOTSTRAP option for toggling building lokinet-bootstrap 2 years ago