Commit Graph

4337 Commits

Author SHA1 Message Date
Jason Rhinelander
e198bfd3e1 Remove unused variable 2021-03-04 16:51:18 -04:00
Jason Rhinelander
c4559d158e Make format 2021-03-04 16:51:18 -04:00
Jason Rhinelander
ccc7b5c9e9 Merge Logic functions into EventLoop
loop->call(...) is similar to the old logic->Call(...), but is smart
about the current thread: if called from within the event loop it simply
runs the argument directly, otherwise it queues it.

Similarly most of the other event loop calls are also now thread-aware:
for example, `call_later(...)` can queue the job directly when called if
in the event loop rather than having to double-queue through the even
loop (once to call, then inside the call to initiate the time).
2021-03-04 16:51:18 -04:00
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
2021-03-04 16:51:18 -04:00
Jason Rhinelander
c71d3527bd C++17 simplification 2021-03-04 16:51:18 -04:00
Jason Rhinelander
8b00eacabf Fix signed/unsigned char comparison bug
These functions would not working properly if given a high bit char
value.
2021-03-04 16:51:18 -04:00
Jeff
abf057d6e3
Merge pull request #1536 from majestrate/memleak-fix-2021-02-15
plug super slow memory leak
2021-03-04 15:50:11 -05:00
Jeff Becker
ec0f45eeb7
plug memory leak in outbound message queue.
sometimes we use rxid in our pathid so we need to clear those queues too.
if we don't it'll leak from never clearing those queues.
2021-03-04 15:29:09 -05:00
Jeff Becker
7dbd25f271
don't leave old multi ack codepath in 2021-03-04 15:25:11 -05:00
Jeff Becker
c9ff917e0d
revert priority queue ordering change 2021-03-04 15:21:51 -05:00
Jeff Becker
ad3c23ba2b
simplify call 2021-03-04 15:21:51 -05:00
Jeff Becker
5cffc3b0f8
consolidate rx message handling in iwp
* add toggle flag for using multi ack
* check replay filter before processing message
2021-03-04 15:21:51 -05:00
Jeff Becker
e6ac7e721d
use a std::map instead of a std::unordered_map for holding message buffers by their sequentially increasing message id.
when retransmissions happen, they will be executed in a deterministic order by their delivery id.
this reduces the jitter from delayed message delivery on link layer as with an unordered map the order of iteration is "random",
so when we iterate all messages for retransmission we do it lowest id first (the messages queued first).
2021-03-04 15:21:51 -05:00
Jeff Becker
74f707ee01
only do single ack packets 2021-03-04 15:21:51 -05:00
Jeff
4992629f20
Merge pull request #1563 from majestrate/dont-multiplex-from-outbound-context-2021-03-03
use lowest latency path for send context
2021-03-04 15:16:40 -05:00
Jeff Becker
7060a60c84
enable route poker poking before going "up" 2021-03-04 06:22:23 -05:00
Jeff Becker
f77cbfb48e
fixes for ipv4 traffic: dont use new range because that breaks backwards comapt 2021-03-03 20:08:38 -05:00
Jeff Becker
f67668f0a6
use lowest latency path for send context 2021-03-03 18:42:10 -05:00
Jeff
f2b234d6c3
Merge pull request #1539 from majestrate/path-algorithm-flavors-2021-02-18
add option to enforce unique netblocks per path.
2021-03-03 14:06:40 -05:00
Jeff
b4b8b84e57
Merge pull request #1548 from majestrate/lns-mx-records-2021-02-25
add mx records to lns names
2021-03-03 14:06:28 -05:00
Jeff Becker
d6567614e3
use mutable lambda instead of shared_ptr for handling mx dns reply for lns 2021-03-03 10:37:31 -05:00
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
2021-03-02 13:18:22 -05:00
Jeff Becker
b59a92aa01
add mx records to lns names 2021-03-02 07:21:05 -05:00
Jeff Becker
0fa91381ba
add llarp::CSRNG for cryptographically secure random number generator for use in std::shuffle 2021-03-02 07:20:29 -05:00
Jeff Becker
a88aec5f01
fix typo 2021-03-02 07:20:29 -05:00
Jeff Becker
a3585caa70
add value 0 to disable unique-range-size 2021-03-02 07:20:29 -05:00
Jeff Becker
f7424b8bbe
dont use std::optional 2021-03-02 07:20:29 -05:00
Jeff Becker
4478cf6f72
use pointers to entries instead of lookups by key 2021-03-02 07:20:29 -05:00
Jeff Becker
b865ffb736
use 64-bit Mersenne Twister instead of 32 bit flavor in nodedb 2021-03-02 07:20:29 -05:00
Jeff Becker
e584cbe44d
make non 64 bit platforms happy 2021-03-02 07:20:29 -05:00
Jeff Becker
3425069b41
feedback from jason
* use emplace in PeerSectionConfig::Acceptable use insert everywhere else
* use const l-value references
* fix typos and spelling mistakes
2021-03-02 07:20:29 -05:00
Jeff Becker
5d465264a8
truly random access in nodedb iteration 2021-03-02 07:20:29 -05:00
Jeff Becker
9457da27d9
add option to enforce unique netblocks per path. 2021-03-02 07:20:28 -05:00
Jason Rhinelander
56cbef6086 SockAddr fixes and cleanups
- Remove SIIT from method names & comments because we're doing IPv4
mapped addresses (::ffff:0:0/96) rather than actual SIIT
(::ffff:0:0:0/96).

- add constructor taking a string+numeric port (and then don't allow a
port in the string).

- simplify IP string parsing by using parse_int()

- replace addrIsV4 with call to ipv6_is_mapped_ipv4 (this also fixes a
bug where addrIsV4 was not checking for leading 0s and so could return
true for a public IPv6 that happened to have ffff in the wrong spot).
2021-02-24 19:34:42 -04:00
Jeff Becker
dcdd147e74
use static_cast with enum class 2021-02-24 14:08:21 -05:00
Jeff Becker
5fe7e00765
make AuthResultCode an enum class 2021-02-24 14:08:21 -05:00
Jeff Becker
94b8743b1c
fix typo 2021-02-24 14:08:21 -05:00
Jeff Becker
5b2abce86f
add string reason to auth messages 2021-02-24 14:08:21 -05:00
Jeff Becker
2cb889013b
revise lambda captures 2021-02-24 14:08:21 -05:00
Jeff Becker
6d5f1b0c6a
feedback auth result via lmq rpc 2021-02-24 14:07:50 -05:00
Jeff
c76f2fe8de
Merge pull request #1496 from majestrate/rpc-kill-endpoint-sessions-2020-11-28
add llarp.endpoint rpc command
2021-02-23 18:53:06 -05:00
Jeff Becker
785b4258ed
only set public address when provided 2021-02-23 09:35:24 -05:00
Jeff Becker
d7842d18ee
add missing header 2021-02-23 05:53:48 -05:00
Jeff Becker
cb3b89457f
remove pointless operator overload 2021-02-23 05:49:32 -05:00
Jeff Becker
be3faeb402
feedback from tom.
* remove unneeded header.
* fix typo in docs
2021-02-23 05:48:50 -05:00
Jeff Becker
1c3020a05e
drop on overload 2021-02-22 15:29:12 -05:00
Jeff Becker
bb9bd25059
get rid of use of llarp::IpAddress from hotpaths 2021-02-22 10:01:05 -05:00
Jeff Becker
01262d1c4d
flush queue when full 2021-02-22 09:03:34 -05:00
Jeff Becker
42ffbcca0a
try coleasing inbound packets from iwp 2021-02-22 08:26:32 -05:00
Jeff Becker
dc68ff6de9
prevent bad side effects, dont use iterator after use and use operator[] 2021-02-18 18:51:43 -05:00
Jeff Becker
b2b68c413c
actually set disabled when disabiling route poker 2021-02-18 18:24:50 -05:00
Jeff Becker
6a29cc7380
call closed hook when we explicitly close a link session 2021-02-17 14:26:54 -05:00
Jeff Becker
6a2d35d907
always use most recent convotag 2021-02-17 14:26:39 -05:00
Jeff Becker
b484d9bebb
update route poker logic to include "up" 2021-02-17 13:36:57 -05:00
Jeff Becker
e46204b068
dont wire up router thaw to sigusr1 2021-02-17 13:35:06 -05:00
Jeff Becker
07b599430e
thaw router when connectivity changes 2021-02-17 13:35:06 -05:00
Jeff Becker
676ca7f511
close stale sessions on thaw because they are probably already gone. this removes them and forces the sessions to be renegotiated. 2021-02-17 13:32:55 -05:00
Jeff Becker
ffef3bc48f
wire up sigusr1 to reset libunbound dns resolver 2021-02-17 13:32:55 -05:00
Jeff Becker
8239efa71b
clarify new member's purpose and name. add comment. 2021-02-17 07:54:18 -05:00
Jeff Becker
1526941f3a
make it compile again 2021-02-17 07:49:47 -05:00
Jeff Becker
0600f42814
fix up names of functions to be less hidious. 2021-02-17 06:37:21 -05:00
Jeff Becker
1ee545d6d2
fix up macos route command for ipv6 2021-02-16 16:37:08 -05:00
Jeff Becker
35137913b9
windows and macos route pokers for ipv6 2021-02-16 15:01:07 -05:00
Jeff Becker
1c7079dbab
fix up route poking with lokinet to work with ipv6 2021-02-16 12:37:16 -05:00
Jeff Becker
063e982ef6
fix exit range default value 2021-02-16 11:25:44 -05:00
Jeff Becker
bd93a8f828
initial v6 exits 2021-02-16 10:59:57 -05:00
Jeff Becker
1f1db29816
GetIf -> GetRandom 2021-02-03 16:38:31 -05:00
Jeff Becker
f24cdb305b
clean up calls to NodeDB::GetIf to be cleaner and more concise 2021-02-03 14:49:33 -05:00
Jeff Becker
c8aba0af31
make llarp::NodeDB::GetIf always randmize location 2021-02-03 14:49:00 -05:00
Jeff Becker
d55705362a
use good routers 2021-02-03 13:50:12 -05:00
Jeff Becker
b6dbbb4bef
consolidate pathbuilder logic
* deduplicate code for path hops selection
2021-02-03 13:44:43 -05:00
Jeff Becker
242e56507c
proper lokimq -> oxenmq refactor 2021-02-03 13:12:21 -05:00
Jeff Becker
1e58715e0b
fix pybind layer 2021-02-02 13:16:34 -05:00
Jeff Becker
922f4fb724
fix iteration bug 2021-02-02 13:15:51 -05:00
Jeff Becker
df4ea34a56
nodedb refactor
* bump zmq static dep
* lokimq -> oxenmq
* llarp_nodedb -> llarp::NodeDB
* remove all crufty api parts of NodeDB
* make NodeDB rc selection api not suck
* make path builder api not suck
* propagate all above changes so that unit tests work and it all compiles
2021-02-02 09:35:40 -05:00
Jeff
5f0f4e0c70
prevent crash by removing duplicate logic (#1515)
when a path expires or fails or something causes its lifecycle to end we have cleanup
logic that handles clean up for it. this removes a code path that was crashing that
is duplicated elsewhere and is thus probably safe to bin. yolo.
2021-01-19 07:39:22 -05:00
Jeff Becker
82b3ec19e8
unbreak the build
* remove llarp/ev/pipe.cpp from cmake
* fix typo in llarp/ev/ev_libuv.cpp
2021-01-12 08:37:45 -05:00
Jeff
49b9ad7197
tun code refactor (#1495)
* partial tun code refactor

* take out the trash

* move vpn platform code into llarp/vpn/platform.cpp

* fix hive build

* fix win32

* fix memory leak on win32

* reduce cpu use

* make macos compile

* win32 patches:

* use wepoll for zmq
* use all cores on windows iocp read loop

* fix zmq patch for windows

* clean up cmake for win32

* add uninstall before reinstall option to win32 installer

* more ipv6 stuff

* make it compile

* fix up route poker

* remove an unneeded code block in macos wtf

* always use call to system

* fix route poker behavior on macos

* disable ipv6 on windows for now

* cpu perf improvement:

* colease calls to Router::PumpLL to 1 per event loop wakeup

* set up THEN add addresses

* emulate proactor event loop on win32

* remove excessively verbose error message

* fix issue #1499

* exclude uv_poll from win32 so that it can start up

* update logtag to include directory

* create minidump on windows if there was a crash

* make windows happy

* use dmp suffix on minidump files

* typo fix

* address feedback from jason
* use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR
* quote $@ in apply-patches in case path has spaces in it

* address feedback from tom

* remove llarp/ev/pipe
* add comments for clairification
* make event loop queue size constant named
2021-01-11 18:13:22 -05:00
Jeff Becker
7ee9d0281c
add llarp.endpoint rpc command with kill option to kill all active convotags given
a list of or a single remote service address.
2020-11-28 07:15:55 -05:00
Jeff
6407733c8e
* make llarp.halt rpc call actually return a reply (#1488)
* add --kill flag to lokinet-vpn that calls llarp.halt
* make macos uninstaller kill lokinet via lokinet-vpn --kill
2020-11-20 12:37:30 -05:00
Jason Rhinelander
384b968cf0
Merge pull request #1437 from majestrate/key-manager-fixes-2020-10-30
key manager should throw on failure to load keys
2020-11-17 19:05:56 -04:00
Jeff
db7abe8f09
do /1 route poker split on linux (#1480)
* do /1 route poker split on linux

i hate netlink so god damn much

* use an enum class for the gateway mode
2020-11-16 13:33:45 -05:00
Jeff
dad66c50cb
poke route hole for loopback on windows because that OS is made by brain damaged non programmers. (#1473)
this fixes the gui bug where it hangs on adding an exit becuase loopback gets routed over the exit.
before it was causing the lmq connection to hang becuase of that route change.
2020-11-16 12:16:38 -05:00
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
2020-11-10 09:24:58 -05:00
Jeff
a7518057cb Revert "deny traffic to non whitelisted routers. (#1444)"
This reverts commit ff02e62a79.
2020-11-08 10:04:28 -05:00
Jeff
c743022cfb
try fixing deadlock (#1454)
* fix deadlock in #1453

* remove use of shared_lock in profiling
* clean up Save and Load to acquire lock
* bencode and bdecode are now non locking

* remove all places using std::shared_lock

* bail if write fails
2020-11-05 06:19:43 -05:00
Jeff
e66522b9dd
fix path reference leak (#1451) 2020-11-04 11:08:29 -05:00
Jeff
34c7f0da0d
profiles.dat is always relative so if you spawn lokinet in / then it will error about permissions. (#1449)
* use absolute path for profiles.dat.

* remove old bencoding bits to use const fs::path instead of const char *
2020-11-03 10:54:55 -05:00
Jeff
8be7c46531
try fixing memory leak in path builder (#1442) 2020-11-02 08:06:46 -05:00
Jeff
ff02e62a79
deny traffic to non whitelisted routers. (#1444)
* deny message delivery from non registered nodes when whitelist is enabled and applicable

* use DoCallback and return true so that the event gets fired right
2020-11-01 10:02:24 -05:00
Jeff
87c76a6769
add exit.localhost.loki cname record (#1440)
* add exit.localhost.loki cname record

* return cname in localhost.loki A/AAAA lookup reply

* correctly handle case where we have no exit

* typofix

* simplify logic
2020-10-31 11:59:03 -04:00
Jeff
3ec727d844
I have no words. (#1438)
So apparently dnsConfig in Router was never set.
Router::networkConfig was set, but only used in the function
which set it and otherwise only passed to another function once.
dnsConfig was only used in one place.

both member variables have been removed in favor of just
referencing Router::m_Config.

Co-authored-by: Thomas Winget <tewinget@gmail.com>
2020-10-30 19:32:00 -04:00
Jeff Becker
5233b26552
format 2020-10-30 15:53:05 -04:00
Jeff Becker
bf1a692005
key manager should throw on failures 2020-10-30 15:52:19 -04:00
Jeff
0e1e0aaef3
allow for relative file paths in config (#1432)
* llarp::Config constructor can take an empty fs::path now and it will default to fs::current_path
* llarp::ensureConfig now throws on fs error
* updates to daemon/main.cpp to reflect changes to llarp::ensureConfig's new throwability
* dowse parts of the code with holy water for the 0.8.1 tag
2020-10-30 09:38:17 -04:00
Jeff
c81b6049f1
fix crashes on shutdown (#1433) 2020-10-29 10:19:45 -04:00
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
2020-10-28 18:26:43 -04:00
Jeff
dcb48db5fe
enable profiling on clients by default (#1421)
* enable client relay profiling by default

* macos dns fixes

* improve peer profiling algorithm to track timeouts vs failures

* remove debug ioctl call in tuntap code

* use ub_wait instead of ub_process as that was what was there before

* const correctness

* DRY out checking for SIIT

* typofix

* correct name
2020-10-27 17:34:09 -04:00
Jeff
4c7d52ac20
more aggressive path building. (#1423)
* more aggressive path building.

* do more than one in parallel path builds at a time

* correct last commit's logic

* rename numPaths -> numDesiredPaths to clarify intent

* revert string change as it will break a lot

* don't prematurly short circuit on snode builds

Co-authored-by: Thomas Winget <tewinget@gmail.com>
2020-10-27 16:27:14 -04:00
Jeff
7a1207dc47
dont bind inbound links as client (#1419)
* dont bind inbound links as client

* fix broken test

* logic call MUST defer call
2020-10-21 17:31:57 -04:00
Thomas Winget
a91bb35dbf
Some Windows fixes (#1415)
* Should fix some windows service issues

* fix return condition inversion

* Add some Trace level logging

also make the logger actually respect the log level you set.

* event loop should not queue things to itself...

at present, logic thread queue continues until it is empty, so
queueing things onto itself is just wasteful.

* call_later(foreach thing) is better than foreach thing (call later)

also if you already queued those things but they have not happened yet,
there is no sense to queue them to happen again.

* do not queue read on write finish, only on read finish

* failure to start DNS server should be proper startup failure.

without the DNS server working lokinet is...kinda pointless, right?

* format

* don't queue stuff to logic thread if in logic thread
the thing that clears the queue...clears it.  So you're just delaying and adding overhead.

* windows unbound thread sleep instead of just busy-waiting

also clang-format decided I can't have a blank line for some reason...

* fix unbound async worker on windows
2020-10-21 09:06:43 -04:00
Jeff
12eb32a816
add conf.d directory for config overrides (#1410)
* add conf.d directory for config overrides

* refactor llarp::Config

* add explicit constructor with datadir as parameter
* have all config files be passed as std::optional
* make Config::LoadDefault private and use std::optional in Config::Load to remove ambiguity
* update rest of codebase to reflect above changes

* fix pybind

* rename bootstrap config skipBootstrap to seednode as it's more descriptive
* make seednode configurable
* make pybind layer compile
* make pybind layer run
2020-10-21 08:58:08 -04:00
Jeff
22acf0a537
Lns exits (#1407)
* lns exits

* try appeasing the clang

* clean up lambda
2020-10-21 05:39:01 -04:00
Thomas Winget
df36ed953d
Route Poker changes (#1416)
If not using an exit, messing with the routing table is not good.
As such, the ability to keep track of routes we *might* want is good,
but the ability to set/unset those routes is necessary, to correspond
to enabling/disabling exit functionality.
2020-10-20 05:15:39 -04:00
Jeff
98e022ea21
Unflaky-ify lns dns (#1406)
* always ensure path to service on dns lookup

* deprecate profiles option
2020-10-12 13:55:58 -04:00
Jeff
38f13533df
always use data directory for bootstrap.signed (#1405) 2020-10-12 13:03:39 -04:00
Jeff
5b5bd6b44e
dns features (#1404)
* add some dns txt records for stuff we want to expose

* fix txt records

* txt records for snode info

* dont send cname as it mangles the response

* check for 3 parts not 3 characters
2020-10-12 12:18:46 -04:00
Jason Rhinelander
d10fee87c7
Don't report a huge negative elapsed time on startup (#1401) 2020-10-09 11:40:04 -04:00
Jeff
3b70b99dd2
fix empty config case (#1400)
* fix empty config case

* * fix case for empty ifname / ifaddr on relay
* bail if no dns server bound

* use AssignmentAcceptor
2020-10-09 11:39:39 -04:00
Jeff
50aea744f6
order packets when writing to network interface (#1372)
* order packet writes on userside

* make it compile

* fix pybind
2020-10-08 07:59:01 -04:00
Jason Rhinelander
af6caf776a
Config file improvements (#1397)
* Config file API/comment improvements

API improvements:
=================

Make the config API use position-independent tag parameters (Required,
Default{123}, MultiValue) rather than a sequence of bools with
overloads.  For example, instead of:

    conf.defineOption<int>("a", "b", false, true, 123, [] { ... });

you now write:

    conf.defineOption<int>("a", "b", MultiValue, Default{123}, [] { ... });

The tags are:
- Required
- MultiValue
- Default{value}
plus new abilities (see below):
- Hidden
- RelayOnly
- ClientOnly
- Comment{"line1", "line2", "line3"}

Made option definition more powerful:
=====================================

- `Hidden` allows you to define an option that won't show up in the
  generated config file if it isn't set.

- `RelayOnly`/`ClientOnly` sets up an option that is only accepted and
  only shows up for relay or client configs.  (If neither is specified
  the option shows up in both modes).

- `Comment{...}` lets the option comments be specified as part of the
  defineOption.

Comment improvements
====================

- Rewrote comments for various options to expand on details.
- Inlined all the comments with the option definitions.
- Several options that were missing comments got comments added.
- Made various options for deprecated and or internal options hidden by
  default so that they don't show up in a default config file.
- show the section comment (but not option comments) *after* the
  [section] tag instead of before it as it makes more sense that way
  (particularly for the [bind] section which has a new long comment to
  describe how it works).

Disable profiling by default
============================

We had this weird state where we use and store profiling by default but
never *load* it when starting up.  This commit makes us just not use
profiling at all unless explicitly enabled.

Other misc changes:
===================

- change default worker threads to 0 (= num cpus) instead of 1, and fix
  it to allow 0.
- Actually apply worker-threads option
- fixed default data-dir value erroneously having quotes around it
- reordered ifname/ifaddr/mapaddr (was previously mapaddr/ifaddr/ifname)
  as mapaddr is a sort of specialization of ifaddr and so makes more
  sense to come after it (particularly because it now references ifaddr
  in its help message).
- removed peer-stats option (since we always require it for relays and
  never use it for clients)
- removed router profiles filename option (this doesn't need to be
  configurable)
- removed defunct `service-node-seed` option
- Change default logging output file to "" (which means stdout), and
  also made "-" work for stdout.

* Router hive compilation fixes

* Comments for SNApp SRV settings in ini file

* Add extra blank line after section comments

* Better deprecated option handling

Allow {client,relay}-only options in {relay,client} configs to be
specified as implicitly deprecated options: they warn, and don't set
anything.

Add an explicit `Deprecated` tag and move deprecated option handling
into definition.cpp.

* Move backwards compat options into section definitions

Keep the "addBackwardsCompatibleConfigOptions" only for options in
sections that no longer exist.

* Fix INI parsing issues & C++17-ify

- don't allow inline comments because it seems they aren't allowed in
ini formats in general, and is going to cause problems if there is a
comment character in a value (e.g. an exit auth string).  Additionally
it was breaking on a line such as:

    # some comment; see?

because it was treating only `; see?` as the comment and then producing
an error message about the rest of the line being invalid.

- make section parsing stricter: the `[` and `]` have to be at the
beginning at end of the line now (after stripping whitespace).

- Move whitespace stripping to the top since everything in here does it.

- chop off string_view suffix/prefix rather than maintaining position
values

- fix potential infinite loop/segfault when given a line such as `]foo[`

* Make config parsing failure fatal

Load() LogError's and returns false on failure, so we weren't aborting
on config file errors.

* Formatting: allow `{}` for empty functions/structs

Instead of using two lines when empty:

    {
    }

* Make default dns bind 127.0.0.1 on non-Linux

* Don't show empty section; fix tests

We can conceivably have sections that only make sense for clients or
relays, and so want to completely omit that section if we have no
options for the type of config being generated.

Also fixes missing empty lines between tests.

Co-authored-by: Thomas Winget <tewinget@gmail.com>
2020-10-07 18:22:58 -04:00
Jeff
b0088b3298
dont segfault on exit (#1396)
* dont segfault on exit

* initialize m_isServiceNode earlier.
2020-10-06 09:44:51 -04:00
Jeff
ff23106852
don't allow running lokid-rpc as client (#1394) 2020-10-05 12:55:19 -04:00
Jason Rhinelander
753d989f7c Set default inbound link to best public interface
Fixes default config not working.
2020-10-02 23:27:25 -03:00
Jason Rhinelander
7aa4566016 Make format 2020-10-02 20:57:51 -03:00
Jason Rhinelander
4faaf9082c Fix broken unbound resolver when including upstream port
unbound breaks when given "1.2.3.4:53" as it expects only an IP.
2020-10-02 20:19:53 -03:00
Jason Rhinelander
01013c1963 Make upstream= override work; reject non-default upstream port
If you specify upstream= then you get no upstream, if you give one then
you use that instead of the default, but you can still list multiple.

unbound doesn't support an upstream port, so bail if the user gives a
non-port-53 response.
2020-10-02 20:17:12 -03:00
Jason Rhinelander
d129b0432a Allow empty values so that upstream= can disable the default 2020-10-02 19:39:43 -03:00
Jason Rhinelander
c97b9ef31b Simplify k=v parsing code 2020-10-02 19:38:58 -03:00
Jeff
9d6dc40f81 format 2020-10-02 18:02:03 -04:00
Jeff
2b5b3ce8e1 default upstream dns to cloudflare 2020-10-02 18:01:26 -04:00
Jeff
0f7e848903
disable rpc on relays by default (#1383)
* disable rpc on relays by default

* add default inbound link as service node

* throw if public-ip and public-port are not set
2020-10-02 16:54:31 -04:00
Jason Rhinelander
fbfa8ca89c
make format (#1381) 2020-10-02 15:50:20 -04:00
Jason Rhinelander
b121933374
Make public-ip option work (#1380)
0.7 supported both public-address and public-ip, but only the former was
being allowed in 0.8.

This makes `public-ip=...` work again, and makes it the canonical option
(because it makes a bit more sense than address when we also have the
public-port parameter), while making `public-address=` accepted with a
deprecation warning.

Also adds default descriptions for port and ip for the generated ini.
2020-10-02 14:47:14 -04:00
Jeff
f797405318 ping lokid every 30 second after starting up 2020-10-02 14:11:39 -04:00
Thomas Winget
4f3ed5d1c4
remove unnecessary code
the signed_bt_dict field is not used for a Version 0 RC anyway, so no need to handle it here.  That was my bad.
2020-10-02 11:41:21 -04:00
Jeff Becker
c04cbfe34f
fix decode version 0 rc when in version 1 mode 2020-10-02 11:09:38 -04:00
Jeff Becker
79dfb6d357
kill lmq before stopping links/ 2020-10-02 11:09:13 -04:00
Jeff Becker
bb67b42f0b
put pubkey_ed25519 in fields 2020-10-02 10:06:35 -04:00
Jeff Becker
23302cd10c
use size_left 2020-10-02 10:06:08 -04:00
Jeff
503a92c992 un limit lmq 2020-10-02 05:51:52 -04:00
Jeff
7852735b36 tweak configuration defaults 2020-10-02 05:48:08 -04:00
Jeff
28bfaf0372
ammend log levels for common spammy log events (#1375) 2020-10-01 11:14:08 -04:00
Jeff
8943be6c3a
serialize auth codes in rpc (#1369)
* serialize auth codes in rpc

* format

* format

* config and route fixups

* bump lokimq

* fix compile

* discard unknown members in service keys

* format
2020-09-29 09:26:45 -04:00
Thomas Winget
7f18df4e9a
fix format string for size_t (#1371) 2020-09-28 20:07:40 -04:00
Jeff
56f49a6980
make win32 exits work again (#1367) 2020-09-28 18:43:31 -04:00
Jeff
53598ec0e9
dont serialize ephemeral members of service identity (#1370)
* prepare for keytool script

* dont serialize ephemeral members in service key file
* regnerate ephemeral members in service identity on load

* add keygen script

* use nacl for generating keys

* format
2020-09-28 11:15:07 -04:00
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.
2020-09-25 14:05:28 -04:00
Jeff
252692a55b
dont poke routes if we have no exit (#1352)
* * refactor route poking out of llarp::Router and into llarp::RoutePoker
* only poke routes when we have an exit enabled as a client

* add route_poker header so it compiles
2020-09-23 20:28:38 -04:00
Jeff
10e3d80559
resolve issue #1361 about peer stats excessive logging (#1365) 2020-09-23 14:44:39 -04:00
Jeff Becker
7a18d14fde make it compile 2020-09-23 14:39:06 -03:00
Jeff
a9d23d3ac3
use absolute path for route command (#1354)
* ignore tun interfaces on windows for mitigating foot cannons

* add flag for git add -p when using format verifier as git hook

* use explicit path for route command on windows

* fix typo

* fix typo

* remove hunk for win32 route exclusion based off being a tun interface

* add metric to win32 route command

* * refactor win32 route poking to use a common function for iterating over routes

* put interface in route poking for default route

* mnake it compile

* use correct route command on windows

* use fs::path for service::Identity::EnsureKeys
2020-09-23 07:06:11 -04:00
Jeff
11ed8924c6
use fs::path for service::Identity::EnsureKeys (#1364) 2020-09-23 07:05:37 -04:00
Jason Rhinelander
d03066ee05
Support [dns] no-resolvconf option (ignored by lokinet) for deb compatibility (#1362)
* Add ignored [dns]no-resolvconf option for deb backwards compat

The debs hack a `#no-resolvconf=1` into the config file in 0.7 to allow
a user to disable resolvconf setup during startup by uncommenting it.
That doesn't work anymore since 0.8 errors on invalid config options, so
add it as an ignored option so that 0.7 deb config files can still be
compatible.

* Fix `[dns]upstream` comment not being produced in generated conf file

* fix test

Co-authored-by: Jeff <jeff@i2p.rocks>
2020-09-22 17:46:06 -04:00
Jeff
c91e4df856
make errors with service keyfile throw (#1358) 2020-09-22 15:04:31 -04:00
Jeff
fe30193a97
revive android build system (#1339)
* it lives?

* clean up

* add readme and add x86_64 to abi filters

* disable route poking on android

* make it compile on android

* it compiles!!111

* typofix

* re-enable ccache for android
2020-09-22 15:04:15 -04:00
Jeff
75ef28531e allow lns subdomains 2020-09-19 10:38:57 -04:00
Jeff
a035dbdb9a enable peer stats by default 2020-09-19 09:56:47 -04:00
Jeff
78b40d6725 wire up lns gotnamemessage handler to kitchen sink 2020-09-19 09:29:36 -04:00
Jeff
21930cf667
LNS (#1342)
* initial relay side lns

* fix typo

* add reserved names and refactor test for dns

* lns name decryption

* all wired up (allegedly)

* refact to use service::EncryptedName for LNS responses to include nonce with ciphertext

* fully rwemove tag_lookup_job

* replace lns cache with DecayingHashTable

* check for lns name validity against the following rules:

* not localhost.loki, loki.loki, or snode.loki

* if it contains no dash then max 32 characters long, not including the .loki tld (and also assuming a leading subdomain has been stripped)

* These are from general DNS requirements, and also enforced in
registrations:

* Must be all [A-Za-z0-9-]. (A-Z will be lower-cased by the RPC call).

* cannot start or end with a -

* max 63 characters long if it does contain a dash

* cannot contain -- in the third and fourth characters unless it starts with xn--

* handle timeout in name lookup job by calling the right handler with std::nullopt
2020-09-17 15:18:08 -04:00
Jeff
c64c9093f2
make endpoints reachable by default (#1344) 2020-09-14 18:19:17 -04:00
Jeff
681459185f
remove locks (#1336)
* remove locks

* use tryPushBack to attempt to prevent deadlocks
2020-09-04 15:55:49 -04:00
Jeff
3ab7db7723
macos route poking (#1333)
* fix up macos route poker logic

* fix typo

* use string_view

* add forgotten header

* full paths

* add debugging

* catch exception on adding route

* workarround for macos

* typofix

* typofix

* fix for macos

* fix command for macos

* because we autopoke remove explicit route poking in rpc

* probably final fix of macos route poking

* split routes instead of deleting them

* dynamic route poking

* move log statement for introset lookup and dont consider bad sessions as able to send

* send convotag reset frame when we have no session

* add exit map to rpc

* use split_any
2020-09-03 18:22:22 -04:00
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
2020-09-01 17:22:22 -04:00
Thomas Winget
2c6e7b86c3
SRV records fixes (#1332)
* fix a log print log level

* correctly match SRV record service and protocol...

* tests for new dns question functions
2020-08-31 19:25:58 -04:00
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
2020-08-31 16:07:17 -04:00
jeff
1537ad18df format 2020-08-28 11:35:10 +00:00
jeff
75f550434c change assert to throw an exception instead when service node has no peer stats enable.
update unit tests so it passes on debian sid
2020-08-28 11:26:50 +00:00
jeff
52d20968a7 remove llarp::StrEq 2020-08-28 11:05:29 +00:00
jeff
5391e6a66a initial config overriding on runtime 2020-08-27 12:43:53 +00:00
jeff
e3bfe76f98 add exit auth token awareness to config 2020-08-27 07:12:56 -04:00
Jeff Becker
1b4f5ee5ea
add forgotten win32 header 2020-08-25 17:24:38 -04:00
jeff
39f5e7213f set send timeout to 5 seconds for exits 2020-08-25 19:00:05 +00:00
Jeff Becker
d39ed26ff0
add headers and fix type for windows 2020-08-25 10:12:40 -04:00
Jeff Becker
68e72d88fd
add forgotten header on macos 2020-08-25 09:51:39 -04:00
Jeff Becker
d4e1a44452
fix typo 2020-08-25 08:55:15 -04:00
Jeff Becker
184503dab1
change to unsigned char for CI 2020-08-25 08:48:35 -04:00
Jeff Becker
bc40453100
get rid of void pointer arithmatic and signed vs unsigned comparison 2020-08-25 08:41:38 -04:00
Jeff Becker
43a58b9c74
const correctness 2020-08-24 20:44:20 -04:00
Jeff Becker
d8dcffe80a
resolve conflict with dev 2020-08-24 20:27:47 -04:00
jeff
574a986d9a
explicitly set frame reset field to zero by default 2020-08-24 20:23:26 -04:00
jeff
f6f56029d3
working netlink route poker 2020-08-24 20:23:26 -04:00
jeff
668ddf837f
checks 2020-08-24 20:21:55 -04:00
jeff
e039aeb6d5
remove codepath for convotag invalidation 2020-08-24 20:21:55 -04:00
jeff
0c3b57199a
fix initialization 2020-08-24 20:21:55 -04:00
jeff
abc55924e7
forgot header 2020-08-24 20:21:55 -04:00
jeff
5a8884cc2f
uncomment block 2020-08-24 20:21:55 -04:00
jeff
8472aea93f
initial netlink jizz 2020-08-24 20:21:55 -04:00
jeff
b0bb0b7609
initial route poking 2020-08-24 20:21:55 -04:00
jeff
2e7f9d1b87
remove convo tag when we invalidate it 2020-08-24 20:21:18 -04:00
jeff
3fbc46879d
Revert "don't send protocol discard message on fail"
This reverts commit ee2a42118c88bd7778cd6dc8694564c7d10e60d1.
2020-08-24 20:21:18 -04:00
jeff
78a4d361ab
don't send protocol discard message on fail 2020-08-24 20:21:18 -04:00
jeff
30a6e901f5
add router.enable-peer-stats config option unconditionally 2020-08-24 20:21:18 -04:00
jeff
75f9643776
attempt to fix snode traffic ip rewrite bug 2020-08-24 20:19:52 -04:00
jeff
fac5502c55
if Router::SendToOrQueue fails propagate that failure in LRCM handler 2020-08-24 20:19:52 -04:00
jeff
b6d63968c4
* correct unit tests for exit context so they pass
* when providing an ip address for inbound links dont throw if they are valid
2020-08-24 20:19:52 -04:00
jeff
2aaed895f3
disable exits in RCs 2020-08-24 20:19:51 -04:00
Jeff Becker
3619356406
attempt fixing 100% cpu use on relays 2020-08-24 20:19:51 -04:00
Jeff Becker
ff130e2b5e
die if we are a relay and don't have any inbound links 2020-08-24 20:19:51 -04:00
Jeff Becker
8c3621cead
fix issue #1328 2020-08-24 20:19:51 -04:00
Jeff Becker
37e16291cb
working on linux with root 2020-08-24 20:19:48 -04:00
Jeff Becker
576c6ec9d4
fix serialize order of dict in peer stats and make the unit tests match this change 2020-08-24 20:19:48 -04:00
Jeff Becker
e9aa200e8c
make formatting happy 2020-08-24 20:19:48 -04:00
Rick V
5c34665fce
move win32 lokimq patch 2020-08-10 13:51:48 -05:00
Jeff Becker
4bb214eba0
attempt fix for libunbound on win32
* run unbound stuff in another thread because LOL windows
* because unbound runs in another thread callbacks for libunbound need to be wrapped in a deferred call so they are done in the logic thread
* bump sqlite3 dep because it's gone, repin hash.
2020-08-04 10:53:32 -04:00
Jeff Becker
301cb6d32f
fix issue #1320 (allow providing ip/port in bind section of config) 2020-07-30 10:36:36 -04:00
Stephen Shelton
83d337ddfd
Send response on error conditions in API request 2020-07-24 11:55:15 -06:00
Stephen Shelton
b037cf0ae4
Handle get_peer_stats request's list of router ids 2020-07-24 11:49:14 -06:00
Stephen Shelton
4699280d97
Crude attempt at retrying lokid connection 2020-07-23 10:54:39 -06:00
Stephen Shelton
1d9c337021
Grab lokimq::ConnectionID on connection attempt 2020-07-23 10:53:34 -06:00
Stephen Shelton
eedf7ca599
Add implementation of get_peer_stats API 2020-07-20 13:48:57 -06:00
Stephen Shelton
bbc1cd5a31
Stub out get_peer_stats LMQ API request 2020-07-16 16:48:26 -06:00
Stephen Shelton
c07dcaa2ef
Handle service node privkeys response correctly 2020-07-16 16:48:04 -06:00
Stephen Shelton
acb0248f94
Use LMQ request instead of command for lokid ping 2020-07-16 16:46:59 -06:00
Stephen Shelton
9deee9e542
Add bencoding serialization to PeerStats 2020-07-09 13:06:31 -06:00
Stephen Shelton
159447b984
Don't "safely" visit relays in RouterHive 2020-07-06 18:11:15 -06:00
Stephen Shelton
305795315b
Specify disabling RC gossiping (testing only) properly 2020-07-06 17:38:41 -06:00
Stephen Shelton
0f074cff8c
Remove ambguity WRT loading and passing of Config 2020-07-06 13:38:02 -06:00
Stephen Shelton
f607b99dbe
Fixes to Context::Configure with default config 2020-07-02 12:25:16 -06:00
Stephen Shelton
ced2ac64fb
Remove last remnants of 'worker' 2020-07-02 11:25:53 -06:00
Stephen Shelton
cdaa28bfd3
Use QueueDiskIO instead of diskworker for db flushing 2020-07-02 10:36:12 -06:00
Stephen Shelton
88c3e9ce00
Remove worker thread parameter from Router constructors 2020-07-02 10:35:44 -06:00
Stephen Shelton
ec20d94c6b
Fix Context::Configure() 2020-07-02 10:26:53 -06:00
Stephen Shelton
ed47ba998f
Minor fixes around Context 2020-07-02 10:26:52 -06:00
Stephen Shelton
552dcce5fd
Use inheritance to handle Hive injection 2020-07-02 10:25:10 -06:00
Stephen Shelton
b0d8568452
Remove llarp C API usage from RouterHive 2020-07-02 10:24:19 -06:00
Stephen Shelton
84c83a2400
Add specialized subclass of Router for Hive 2020-07-02 10:22:57 -06:00
Stephen Shelton
e38a507551
<3 Windows (prefer fs::path::string() over native()) 2020-07-02 10:22:07 -06:00
Stephen Shelton
93bafcf142
Set up sqlite3 deps 'if NOT TAGRET sqlite3' 2020-07-02 10:22:06 -06:00
Stephen Shelton
186a35c0e2
Appease clang (fixes for minor compilation errors) 2020-07-02 10:22:06 -06:00
Stephen Shelton
fd230dd93b
<3 apple 2020-07-02 10:22:05 -06:00
Stephen Shelton
6e1a23cdc7
Use pkg_check_modules instead of find_package for sqlite3 2020-07-02 10:22:05 -06:00
Stephen Shelton
0ecdda7a89
make format 2020-07-02 10:22:04 -06:00
Stephen Shelton
4aa6f8e2df
Use find_package() for sqlite3 2020-07-02 10:22:04 -06:00
Stephen Shelton
aeb0c2be3a
Remove ability to stop routers from gossiping for now 2020-07-02 10:22:03 -06:00
Stephen Shelton
bdac43e19f
Peer stats test which artificially stops a router from gossiping its RC 2020-07-02 10:22:03 -06:00
Stephen Shelton
63f41d6a98
Introduce mutex for hive's routers 2020-07-02 10:22:03 -06:00
Stephen Shelton
3b6f84c68c
Peek at peer stats db in test_peer_stats 2020-07-02 10:22:02 -06:00
Stephen Shelton
c4cbbd6731
RouterHive: store router contexts by routerId instead of index 2020-07-02 10:22:02 -06:00
Stephen Shelton
d1b629f494
RouterHive ConnectionAttemptEvent 2020-07-02 10:22:02 -06:00
Stephen Shelton
d69d538f1a
Add missing files 2020-07-02 10:16:19 -06:00
Stephen Shelton
b2a72dd46a
Initial test_peer_stats hive test 2020-07-02 10:16:19 -06:00
Stephen Shelton
2453fff10b
Piggyback on link callbacks to add peer stats 2020-07-02 10:13:26 -06:00
Stephen Shelton
cb8e5354f5
Add some breadcrumbs about how ILinkLayer's callbacks are used 2020-07-02 10:13:26 -06:00
Stephen Shelton
c9faddc8e4
Use fs::path since mac doesn't support std::filesystem 2020-07-02 10:13:25 -06:00
Stephen Shelton
5a8f390b3b
Make mutex mutable, fix typo 2020-07-02 10:13:25 -06:00
Stephen Shelton
023e061146
Make [router]:enable-peer-stats only valid for client 2020-07-02 10:13:25 -06:00
Stephen Shelton
54017652d6
log-- 2020-07-02 10:13:24 -06:00
Stephen Shelton
d897099e1d
Track traffic peerstats 2020-07-02 10:13:24 -06:00
Stephen Shelton
77b98459dd
Implement RouterID serialization in sqlite_orm 2020-07-02 10:13:24 -06:00
Stephen Shelton
a9ce319e76
Make llarp_time_t serializable in sqlite_orm 2020-07-02 10:13:23 -06:00
Stephen Shelton
aa1c8f257f
Sort out peerstats receive <-> expiry windows 2020-07-02 10:13:23 -06:00
Stephen Shelton
4b4284ccf4
PeerDb sqlite optimizations 2020-07-02 10:13:23 -06:00
Stephen Shelton
5e05defc76
Add API query for peer stats, other related fixes 2020-07-02 10:13:22 -06:00
Stephen Shelton
595288e046
Add PeerDb::handleGossipedRC 2020-07-02 10:13:22 -06:00
Stephen Shelton
7109ddc951
Add PeerDb::modifyPeerStats() 2020-07-02 10:13:21 -06:00
Stephen Shelton
4f4192e272
constexpr 2020-07-02 10:13:21 -06:00
Stephen Shelton
2a30e7dac2
Add PeerDb to Router 2020-07-02 10:13:21 -06:00
Stephen Shelton
cc6e9c882a
Use foo.snode as peerstats unique id, test file-backed db 2020-07-02 10:12:14 -06:00
Stephen Shelton
a30806b375
Some sqlite_orm related fixes 2020-07-02 10:12:14 -06:00