Commit Graph

65 Commits (fedora/35)

Author SHA1 Message Date
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 0d0295e2dc
remove unneeded submodule 2 years ago
Jeff 7396eb7f3b
bump oxenc submodule and force oxenc submodule on win32 2 years ago
Jason Rhinelander c2f8a618e0
Update to oxenc 1.0.2 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
majestrate 838183e36e
Merge pull request #1748 from majestrate/liblokinet-udp-api-2021-09-19
liblokinet updates
2 years ago
Jeff 95efe8f4e5 bump ngtcp2 to v0.1.0 tag 2 years ago
Jeff Becker b20e7bedf8 identify 2 years ago
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
2 years ago
Jeff Becker ec83641ee8
update submodule 3 years ago
Jeff Becker 3c61af1de9
bump ngtcp2 submodule 3 years ago
Jason Rhinelander 089fc026d8 Redo how we build ngtcp2 lib
ngtcp2's top-level CMakeLists.txt is not friendly to being used as a
subdirectory (for instance, it always adds a `check` target when cunit
is installed), so stop using it in favour of skipping directly into the
ngtcp2/lib subdir.

This requires some hackery to set up a couple of the things the
top-level cmake does, but it isn't *too* painful.
3 years ago
jeff 0708a0d897
initial network extension code for macos
probably does not work
3 years ago
Jason Rhinelander d90b28ce24 Remove double cpr submodule
Fix cpr being listed twice in .gitmodules and submodule check.
3 years ago
Jason Rhinelander ed1a80170a Update submodules and static build deps
Static deps:
- expat 2.3.0
- unbound 1.13.1
- sqlite 3.35.5
- libuv 1.41.0
- curl 7.76.1

Submodules:
- ghc-filesystem 1.5.4
- ngtcp2 (latest master)
- oxenmq 1.2.5
- pybind11 2.6.2
- sqlite_orm 1.6
3 years ago
Jeff Becker 83b0f25075
cleanup after rebase 3 years ago
Jeff Becker c547cd0118
fixes for lokinet-bootstrap
* use schannel on windows platforms
* load ca bundle for non windows platforms
* use geteuid for detecting root user when finding default data dir
3 years ago
Jeff Becker 3d87dbff91
bullshit for windows and openssl with CPR
* windows static cross compile is wonky af so we add some hacks to make it work
3 years ago
Jeff Becker ebdb9699c0
refactor: make lokinet-bootstrap a native executable
* pull in cpr
* tidy up windows.sh
* rename main.cpp to lokinet.cpp to satisfy my autism
* add llarp::GetDefaultBootstrap()
3 years ago
Jason Rhinelander db2344505f
Update ngtcp2 3 years ago
Jason Rhinelander a1a152b5c3
Disable building ngtcp2 example code 3 years ago
Jeff Becker eb965c8323
fix link error in ngtcp2 3 years ago
Jeff Becker 1885b1cae9
more 3 years ago
Jason Rhinelander 46c619c49f
Move external/ cmake bits into external/CMakeLists.txt
- Move uvw target to external instead of llarp/CMakeLists.txt

- Add sqlite_orm headers via interface library rather than shoving it
  into the global include search path.

- Find sqlite3 as part of the sqlite_orm target deps rather than linking
  it separately.  (Also don't link it into lokinet-util, which doesn't
  appear to actually need it).
3 years ago
Jason Rhinelander 442fa951fc
Add ngtcp2 submodule 3 years ago
Jeff Becker 0c37cc7f60
lokinet-bootstrap native binary 3 years ago
Jason Rhinelander e0bb7b7d0f Bump oxen-mq submodule to tagged 1.2.4 3 years ago
Jason Rhinelander 91d6698a9d Reformat with clang-format-11 3 years ago
Jason Rhinelander ced035d401 Switch uvw to a fork with libuv backwards compat support 3 years ago
Jason Rhinelander 5b555ee5aa Replace libuv with uvw & related refactoring
- removes all the llarp_ev_* functions, replacing with methods/classes/functions in the llarp
  namespace.
- banish ev/ev.h to the void
- Passes various things by const lvalue ref, especially shared_ptr's that don't need to be copied
  (to avoid an atomic refcount increment/decrement).
- Add a llarp::UDPHandle abstract class for UDP handling
- Removes the UDP tick handler; code that needs tick can just do a separate handler on the event
  loop outside the UDP socket.
- Adds an "OwnedBuffer" which owns its own memory but is implicitly convertible to a llarp_buffer_t.
  This is mostly needed to take over ownership of buffers from uvw without copying them as,
  currently, uvw does its own allocation (pending some open upstream issues/PRs).
- Logic:
  - add `make_caller`/`call_forever`/`call_every` utility functions to abstract Call wrapping and
    dependent timed tasks.
  - Add inLogicThread() so that code can tell its inside the logic thread (typically for
    debugging assertions).
  - get rid of janky integer returns and dealing with cancellations on call_later: the other methods
    added here and the event loop code remove the need for them.
- Event loop:
  - redo everything with uvw instead of libuv
  - rename EventLoopWakeup::Wakeup to EventLoopWakeup::Trigger to better reflect what it does.
  - add EventLoopRepeater for repeated events, and replace the code that reschedules itself every
    time it is called with a repeater.
  - Split up `EventLoop::run()` into a non-virtual base method and abstract `run_loop()` methods;
    the base method does a couple extra setup/teardown things that don't need to be in the derived class.
  - udp_listen is replaced with ev->udp(...) which returns a new UDPHandle object rather that
    needing gross C-style-but-not-actually-C-compatible structs.
  - Remove unused register_poll_fd_(un)readable
  - Use shared_ptr for EventLoopWakeup rather than returning a raw pointer; uvw lets us not have to
    worry about having the event loop class maintain ownership of it.
  - Add factory EventLoop::create() function to create a default (uvw-based) event loop (previously
    this was one of the llarp_ev_blahblah unnamespaced functions).
  - ev_libuv: this is mostly rewritten; all of the glue code/structs, in particular, are gone as
    they are no longer needed with uvw.
- DNS:
  - Rename DnsHandler to DnsInterceptor to better describe what it does (this is the code that
    intercepts all DNS to the tun IP range for Android).
- endpoint:
  - remove unused "isolated network" code
  - remove distinct (but actually always the same) variables for router/endpoint logic objects
- llarp_buffer_t
  - make constructors type-safe against being called with points to non-size-1 values
- tun packet reading:
  - read all available packets off the device/file descriptor; previously we were reading one packet
    at a time then returning to the event loop to poll again.
  - ReadNextPacket() now returns a 0-size packet if the read would block (so that we can implement
    the previous point).
  - ReadNextPacket() now throws on I/O error
- Miscellaneous code cleanups/simplifications
3 years ago
Jeff Becker 60bfdacc23
get rid of the rest of gtest/gmock 3 years ago
Jeff Becker 979a652446
loki-mq -> oxen-mq 3 years ago
Jeff Becker 811b2a3fbf
bump submodule 3 years ago
Jeff 0ed8942dc6
libuv cmake fixups (#1511)
* fix up cmake parts for libuv
* make libuv use external project via StaticBuild.cmake
* remove libuv submodule
3 years ago
Jason Rhinelander 8dd5bd6899 Update to lokimq 1.2.2 for segfault-at-shutdown fix 4 years ago
Jason Rhinelander e47b70a82f
CMake fixes: libuv static build, base_libs, shared lib install dir (#1431)
* Update how we build libuv

- Update submoduled libuv to latest stable (1.40.0)
- Don't look for a system libuv if we're under BUILD_STATIC_DEPS
- Add a libuv interface library rather than using globals
- Make the windows build fall back to the submodule if not explicitly
  given a LIBUV_ROOT

* Replace ${LIBS} global with `base_libs` interface

This simplifies linking and include handling a bit.

* Remove unneeded header

* Add missing csignal header

(This was previously being pulled in incredibly indirectly via some
stuff that eventually includes some other stuff that eventually included
uv.h)

* Use GNUInstallDirs to get lib dir instead of hard-coding lib

Fixes #1429
4 years ago
Jason Rhinelander a888b7bbc2
Reduce macOS target to 10.12, and fix target for deps (#1414)
This is relatively painless for lokinet as it already had workarounds
during 0.8 dev work for the things macos hated in 10.13.

Dependencies, however, were not being built with the proper macos target
junk, so this fixes that.
4 years ago
Jason Rhinelander 60de84fde7
Try to build for 10.14 (#1412) 4 years ago
Jeff Becker ac16cdc177 bump lokimq submodule to 1.2.0 4 years ago
Thomas Winget 15229ea7ff
New RC format (#1368)
* initial work for RC SRVs.

Needs tests for new RC format.

Needs SRVs added to new RC, and associated tests.

* convert rc sign/verify test to catch2, add test for new rc

Also fixes a mistake in new rc serialization

* bump loki-mq submodule

need support for viewing bt deserialize consumer buffer so we
know how much it has consumed.

* fix some behavior errors

need to advance llarp_buffer_t after consuming data from it

only rewind and modify size of llarp_buffer_t in owning context.

* Add test for router contact (de-)serialization

Adds a test that makes a list of RouterContact with mixed
versions and ensures it serializes and deserializes correctly.
4 years ago
Jason Rhinelander f5e5066bd5
Update deps (#1348)
* Update submodules/static deps to latest versions

* Add mingw zmq build patch

* Drop support for Windows 2000
4 years ago
Thomas Winget b1c14af938
SRV Record handling for introsets (#1331)
* update loki-mq submodule for tuple support

* srv record reply implementation

still need to encode srv records into intro sets / router contacts
as well as decode from them and match against queried service.proto

* inverted condition fix in config code

* SRV record struct (de-)serialization for intro sets

* parsing and using srv records from config (for/in introsets)

* adopt str utils from core and use for srv parsing

* changes to repeat requests

no longer drop repeat requests on the floor, but do not make
an *actual* request for them if one is in progress.

do not call reply hook for each reply for a request, as
each userland request is actually made into several lokinet
requests and this would result in duplicate replies.

* fetch SRVs from introsets for .loki

* make format

* dns and srv fixes, srv appears to be working
4 years ago
Jason Rhinelander fd684a225b Update nlohmann to latest stable 4 years ago
Stephen Shelton 73c9ddff52
Begin peer stats infrastructure 4 years ago
Jeff Becker a9109aa91b
* deprecate old unused lokid rpc options
* use lokimq::address in config and in lokid rpc
* bump lokimq submodule
4 years ago
Jeff Becker 92bb135a73
only bump loki-mq submodule 4 years ago
Jeff Becker c9a2222d39
Revert "bump submodules"
This reverts commit 0de2b994fa3e3252eae46d39960dd17872184050.
4 years ago
Jeff Becker 2ef2e6171a
bump submodules 4 years ago
Jeff Becker 30b158b906
update submodule 4 years ago
Stephen Shelton a7dceed4eb
Remove libabyss and rpc::Caller/rpc::Server 4 years ago