1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
Commit graph

669 commits

Author SHA1 Message Date
dr7ana 07271f9ae7 RC refactor layout
- Local and Remote RC's now implemented with discrete functionalities and uses
2023-10-31 13:49:14 -07:00
Jason Rhinelander a7a18868c7
Turn off terrible new cmake 3.24+ default 2023-10-27 13:37:18 -03:00
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
2023-10-24 12:11:51 -07:00
dr7ana bda8b211dd Cmake restructuring 2023-10-24 08:40:18 -07:00
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
2023-08-31 09:28:16 -07:00
dr7ana a921575c55 mein gott 2023-08-30 12:25:47 -07:00
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.
2023-08-29 13:17:55 -04:00
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.
2023-08-28 19:23:46 -03:00
Jason Rhinelander c997ca2b60
Don't rely on cmake search path for StaticBuild
Resolves a conflict with libquic's StaticBuild.
2023-08-28 13:15:36 -03:00
dr7ana ad5055b85f cmake tweaks for redundant dependencies (WIP) 2023-08-28 11:06:06 -04:00
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
2023-08-11 14:01:07 -07:00
Jeff Becker 2498a085db
rearrange cmake libraries
define relations and document them.
make responsibilies clear and consice.
2023-01-20 15:58:07 -05:00
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.
2022-11-29 12:42:40 -04:00
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.
2022-10-06 13:59:49 -03:00
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.
2022-10-06 13:59:47 -03:00
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 ...)`.
2022-10-06 11:56:07 -03:00
Jason Rhinelander c4c5d128c3
Add ring buffer sink to macos build 2022-10-06 11:56:06 -03:00
Jason Rhinelander 7078ab06bc
compiler warnings cmake 3.13 compatibility fix 2022-09-19 20:26:40 -03:00
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.
2022-09-19 20:26:39 -03:00
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.
2022-09-19 20:26:35 -03:00
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
2022-09-08 14:25:01 -04:00
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
2022-09-08 14:24:59 -04:00
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
2022-09-08 14:23:54 -04:00
Jason Rhinelander 2eef7c5915
Don't look for sqlite when not building peerstats 2022-08-30 17:26:08 -03:00
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.
2022-08-30 14:00:58 -03:00
Jason Rhinelander 039d1429f5 Build an installer dmg 2022-08-29 12:53:08 -03:00
Jeff a9abeb33cc
bump version to 0.9.10
* update release motto for 0.9.10
2022-08-22 16:50:34 -04:00
Jason Rhinelander 2b7b1fcc79 Working signed macOS GUI build 2022-08-12 21:13:39 -03:00
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.
2022-08-12 21:13:39 -03:00
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.
2022-08-12 21:13:39 -03:00
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.
2022-08-12 21:13:38 -03:00
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.
2022-08-12 20:23:00 -03:00
Jeff 68148e098f
* add mockable network functions
* add unit tests with ability to pretend to be different network setups
2022-07-20 13:36:03 -04:00
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).
2022-07-15 22:17:59 -03:00
Jason Rhinelander c37d6ea43b
Remove shadow testing framework
Bitrotten and apparently doesn't work with libuv event loop.
2022-06-22 11:08:07 -03:00
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)
2022-06-21 18:57:36 -03:00
Jason Rhinelander 4a4f16e5c8
Remove dead code: netns, shell hooks
These haven't been activated in a long time and aren't worth
resuscitating.
2022-06-21 18:56:25 -03:00
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.
2022-05-31 19:51:29 -03:00
Jeff 2576b87c5d
version bump to 0.9.9 2022-05-30 17:08:41 -03:00
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
2022-05-30 17:08:08 -03:00
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
2022-05-30 09:06:48 -04:00
Jeff 9556741f6a
split up link order for oxenmq and oxenc
* lokinet uberlib needs oxenc and oxenmq
* lokinet-util only needs oxenc

fixes #1911
2022-05-10 10:34:19 -04:00
Jason Rhinelander c2f8a618e0
Update to oxenc 1.0.2 2022-04-28 14:23:52 -03:00
Jeff 56492c88ac dry cross compile 2022-03-16 14:21:40 -04:00
Jeff 6629e8c881 cmake workarround for quark in older cmake where pkg config produces non existing targets 2022-02-28 10:46:41 -05:00
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
2022-02-17 16:30:17 -04:00
Jeff Becker 8153edbf43 dont enable apple languages when not building daemon 2022-01-31 10:53:48 -05:00
Jeff Becker f38bf2770d move WITH_BOOTSTRAP option to root project CMakeLists.txt 2022-01-31 10:53:48 -05:00
Jeff Becker 9d069983b4 add WITH_BOOTSTRAP option for toggling building lokinet-bootstrap 2022-01-31 10:53:48 -05:00
Jeff Becker 5b8ebb269c changes for liblokinet-ffi
* cmake option BUILD_DAEMON for toggling building of daemon directory
* when WITH_BOOTSTRAP is OFF dont build curl or cpr
2022-01-31 10:53:48 -05:00