Commit Graph

76 Commits (4c630e0437462374af9e9df6fb2fa990c45fed20)

Author SHA1 Message Date
Thomas Winget 4c630e0437 Large collection of changes to make android work
- Previous android java and jni code updated to work, but with much love
  still needed to make it work nicely, e.g. handling when the VPN is
  turned off.

- DNS handling refactored to allow android to intercept and handle DNS
  requests as we can't set the system DNS to use a high port
  (and apparently Chrome ignores system DNS settings anyway)

- add packet router structure to allow separate handling of specific
  intercepted traffic, e.g. UDP traffic to port 53 gets handled by our
  DNS handler rather than being naively forwarded as exit traffic.

- For now, android lokinet is exit-only and hard-coded to use exit.loki
  as its exit.  The exit will be configurable before release, but
  allowing to not use exit-only mode is more of a challenge.

- some old gitignore remnants which were matching to things we don't
  want them to (and are no longer relevant) removed

- some minor changes to CI configuration
3 years ago
Jeff Becker bb9bd25059
get rid of use of llarp::IpAddress from hotpaths 3 years ago
Jeff a0ed303d7b
try to handle router deregistrations on the network better (#1461)
* don't send messages to de-registered relays but allow traffic to clients

* actively close sessions to de-registered relays
4 years ago
Jeff 60f4d96ba5
proper route poking (#1330)
* route poking:

* remove popen() call, replace with reading /proc/net/route for getting default route
* dynamically poke and unpoke routes on runtime

* swap intros and fix rpc endpoint for version to return what the ui expects

* use std::string::find_first_not_of instead of using a lambda
4 years ago
Stephen Shelton b2a72dd46a
Initial test_peer_stats hive test 4 years ago
Stephen Shelton cb8e5354f5
Add some breadcrumbs about how ILinkLayer's callbacks are used 4 years ago
Jeff Becker f4971a88fd
use lokimq workers instead of llarp:🧵:ThreadPool 4 years ago
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 4 years ago
Stephen Shelton 273270916e
The Great Wall of Blame
This commit reflects changes to clang-format rules. Unfortunately,
these rule changes create a massive change to the codebase, which
causes an apparent rewrite of git history.

Git blame's --ignore-rev flag can be used to ignore this commit when
attempting to `git blame` some code.
4 years ago
Jeff Becker 7ba30eec25
squash commits 4 years ago
Jeff Becker d2d109e92c
llarp_time_t is now using std::chrono 4 years ago
Jason Rhinelander b4440094b0 De-abseil, part 2: mutex, locks, (most) time
- util::Mutex is now a std::shared_timed_mutex, which is capable of
  exclusive and shared locks.

- util::Lock is still present as a std::lock_guard<util::Mutex>.

- the locking annotations are preserved, but updated to the latest
  supported by clang rather than using abseil's older/deprecated ones.

- ACQUIRE_LOCK macro is gone since we don't pass mutexes by pointer into
  locks anymore (WTF abseil).

- ReleasableLock is gone.  Instead there are now some llarp::util helper
  methods to obtain unique and/or shared locks:
    - `auto lock = util::unique_lock(mutex);` gets an RAII-but-also
      unlockable object (std::unique_lock<T>, with T inferred from
      `mutex`).
    - `auto lock = util::shared_lock(mutex);` gets an RAII shared (i.e.
      "reader") lock of the mutex.
    - `auto lock = util::unique_locks(mutex1, mutex2, mutex3);` can be
      used to atomically lock multiple mutexes at once (returning a
      tuple of the locks).
  This are templated on the mutex which makes them a bit more flexible
  than using a concrete type: they can be used for any type of lockable
  mutex, not only util::Mutex.  (Some of the code here uses them for
  getting locks around a std::mutex).  Until C++17, using the RAII types
  is painfully verbose:

  ```C++
  // pre-C++17 - needing to figure out the mutex type here is annoying:
  std::unique_lock<util::Mutex> lock(mutex);
  // pre-C++17 and even more verbose (but at least the type isn't needed):
  std::unique_lock<decltype(mutex)> lock(mutex);
  // our compromise:
  auto lock = util::unique_lock(mutex);
  // C++17:
  std::unique_lock lock(mutex);
  ```

  All of these functions will also warn (under gcc or clang) if you
  discard the return value.  You can also do fancy things like
  `auto l = util::unique_lock(mutex, std::adopt_lock)` (which lets a
  lock take over an already-locked mutex).

- metrics code is gone, which also removes a big pile of code that was
  only used by metrics:
  - llarp::util::Scheduler
  - llarp:🧵:TimerQueue
  - llarp::util::Stopwatch
4 years ago
Jeff Becker 8b8d636ded
make format 4 years ago
Thomas Winget 55b44cfc13 fix derp nested function call and derp merge error 4 years ago
Thomas Winget 50118c3127 Change ILinkLayer::ScheduleTick to use new timer 4 years ago
Jeff Becker 9be4092a2a
more close changes 5 years ago
Jeff 27b1e36039
Merge pull request #936 from majestrate/dev
last changes before 0.6.0 version bump
5 years ago
Stephen Shelton 521ef9b5bb Handle link transport key in KeyManager 5 years ago
Jeff Becker 01b24c7090
limit connections 5 years ago
Jeff Becker c9f26c4911
call Router::PumpLL after every batch of packets from a link session 5 years ago
jeff 3c1d5518d8 fix windows port and make it compile 5 years ago
jeff ac2a2aed1d gut libutp and finish making things compile and pass tests 5 years ago
Jeff Becker e3bb59707e
more 5 years ago
Jeff Becker 3c0245f8b3
Merge remote-tracking branch 'github/master' into iwp-multi-ack 5 years ago
Jeff Becker 4bf6882c8a
more async cryptography 5 years ago
Jeff Becker 1adae338ce
Merge remote-tracking branch 'origin/master' 5 years ago
Michael edd0ec398f
Move thread stuff to subdirectory 5 years ago
Jeff Becker c01112e4b7
tracy lock contention testing and other fun things 5 years ago
Jeff Becker acf5f78949
update iwp , add NACK 5 years ago
Jeff Becker c1f33bb1ac
initial mempipe implementation 5 years ago
Jeff Becker 822f529be8
add link layer delivery feedback 5 years ago
Jeff Becker ec1910b8ca
remove threadpool.hpp
make link layer not use null lock and null mutex
5 years ago
Michael 491fee206b
Port code to use CryptoManager over passing Crypto pointers 5 years ago
Jeff Becker 64c7ed42fc
make format 5 years ago
Jeff Becker 9c96aecf3f
move llarp::Logic to std::shared_ptr
add sequence numbers to HSD messages

begin work on network isolation code

add more docs
5 years ago
Jeff Becker 73f1d34239
make format and revert stupid alloc changes 5 years ago
Jeff Becker 5d388bc9f2
meh 5 years ago
Jeff Becker 34533db620
add urgent build that builds over an existing path for an endpoint 5 years ago
Michael c39c931d03
Remove IStateful virtual inheritance 5 years ago
Jeff Becker e178a70929
use shared_ptr for event loop 5 years ago
Jeff 3715c28616
Merge pull request #483 from loki-project/staging
Staging
5 years ago
Jeff 97b9c679b0 don't use bootstrap nodes for first hops in paths 5 years ago
Michael 25f10d5b11
Fix more address sanitiser issues 5 years ago
Michael 5ef4e18827
Refactor utp into multiple files 5 years ago
Jeff Becker 800f5001c2
allow up to 5 sessions per endpoint 5 years ago
Jeff Becker d4cb6808ec
more 5 years ago
Jeff Becker 734a5b5fae
more 5 years ago
Jeff Becker 2218749134
Merge remote-tracking branch 'origin/staging' into staging 5 years ago
Jeff Becker eceb55623c
more 5 years ago
Michael 61f3273dc4
Add threading annotations and fix potential deadlocks 5 years ago