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
Stephen Shelton
8adb6295fc
Initialize sqlite_orm and start interacting with it
2020-07-02 10:12:13 -06:00
Stephen Shelton
73c9ddff52
Begin peer stats infrastructure
2020-07-02 10:12:11 -06:00
Jeff Becker
2c0c6aa819
log error instead of executing job
2020-07-02 12:05:39 -04:00
Jeff Becker
d7ff6c579c
address feedback from jason
...
* split up ipv6 netmask
* revert iwp ack interval change
* c++17-isms in ip range map
* lambda-ize nodedb
* mutable lambdas in transit hops
* perfect forwarding of args in abstract router
* mutable lambdas in lokid rpc client
* notes in readme about nproc
2020-07-02 11:13:32 -04:00
Jeff Becker
d85c7bc628
remove wrapper and just use a lambda that throws on non empty value
2020-07-02 11:13:32 -04:00
Jeff Becker
a0dc2e795c
add a wrapper that always throws with a custom error message
...
use that wrapper for lokid.jsonrpc
2020-07-02 11:13:32 -04:00
Jeff Becker
a9109aa91b
* deprecate old unused lokid rpc options
...
* use lokimq::address in config and in lokid rpc
* bump lokimq submodule
2020-07-02 11:13:31 -04:00
Jeff Becker
80919a3b76
address feedback.
...
* use exceptions when fetching identity key instead of std::optional, will throw on fail
* fix up config options for endpoint auth and add better docs
* add llarp::serive::AuthType enum for controlling what kind of endpoint auth to use
2020-07-02 11:13:31 -04:00
Jason Rhinelander
a7c42ab2bd
Use lokimq's hex/base32z encoding/decoding
2020-07-02 11:13:31 -04:00
Jeff Becker
e85efcf7ce
move include so it's included on all platforms including windows
2020-07-02 11:13:30 -04:00
Jeff Becker
00aa78c80a
it's safe to call reply from another thread because all it does is fufill a promoise
2020-07-02 11:13:30 -04:00
Jeff Becker
0f21eeccb0
* rework exit codepath to allow multiple exits
...
* rework net code for ip ranges to be cleaner
* clean up endpoint auth code
* refactor config to validate network configs before setting up endpoints
* remove buildone from path/pathbuilder.cpp so we don't spam connection attempts
2020-07-02 11:13:30 -04:00
Jeff Becker
3cdca30a74
more auth shit
2020-07-02 11:13:30 -04:00
Jeff Becker
0d6e3bcd89
fix crashing tests
2020-07-02 11:13:30 -04:00
Jeff Becker
98a3b45f16
disable logging to see why ci tests die like a sucka
2020-07-02 11:12:50 -04:00
Jeff Becker
63b56d55a9
check pw and pw_dir to be not null so that if either are null it bails to else block
2020-07-02 11:12:06 -04:00
Jeff Becker
2371e416bd
dont use $HOME when checking for default data dir
2020-07-02 11:12:05 -04:00
Jeff Becker
e13e886df9
fix up event loop crap so that unit tests pass
2020-07-02 11:10:06 -04:00
Jeff Becker
e95b9d530e
fix unit tests, make them pass
2020-07-02 11:10:06 -04:00
Jeff Becker
1779f33506
fix makefile fromat target
...
use lokimq::address instead of std::string or std::string_view
2020-07-02 11:07:34 -04:00
Jeff Becker
ca9e015ca4
virtual destructor
2020-07-02 11:07:34 -04:00
Jeff Becker
397d558af8
wtf
2020-07-02 11:07:34 -04:00
Jeff Becker
59eb1b0842
make format
2020-07-02 11:07:34 -04:00
Jeff Becker
f1e7fc2cba
make format and update submodule
2020-07-02 11:07:34 -04:00
Jeff Becker
f4971a88fd
use lokimq workers instead of llarp: 🧵 :ThreadPool
2020-07-02 11:07:34 -04:00
Jeff Becker
5abf111159
endpoint auth whitelist
2020-07-02 11:07:33 -04:00
Jeff Becker
9f11b03016
enable exit node again
2020-07-02 11:07:33 -04:00
Jeff Becker
a42d3d51c3
more
2020-07-02 11:07:33 -04:00
Jeff Becker
1e8368b636
make it compile
2020-07-02 11:07:33 -04:00
Jeff Becker
61c5808765
exit authentication (initial)
2020-07-02 11:07:33 -04:00
Jeff Becker
be01808a6b
more
2020-07-02 11:07:33 -04:00
Jeff Becker
c5dbb670ca
set sane defaults for config, implement lmq rpc server, update lokinetmon
2020-07-02 11:07:33 -04:00
Jeff Becker
6bbf7beaf5
add stubs for lmq rpc server
2020-07-02 11:07:33 -04:00
Jeff Becker
1175a583d2
initial working code
2020-07-02 11:07:32 -04:00
Stephen Shelton
13b0a4f2fc
WIP: LokidRpcClient
2020-07-02 11:07:32 -04:00
Jeff Becker
9bfff61d08
initial wack at lokimq
2020-07-02 11:07:32 -04:00
Stephen Shelton
fd4b03f896
WIP: LokidRpcClient
2020-07-02 11:07:32 -04:00
Stephen Shelton
17026a0b21
Remove libabyss and rpc::Caller/rpc::Server
2020-07-02 11:07:32 -04:00
Jeff Becker
749c5a813c
require at least 2 hops because otherwise stuff wont publish
2020-07-02 11:07:32 -04:00
Jeff Becker
d5b4dbe052
more
2020-07-02 11:07:32 -04:00
Jeff Becker
b1259e25c5
set sane defaults for config, implement lmq rpc server, update lokinetmon
2020-07-02 11:07:31 -04:00
Jeff Becker
fb8b8e2e56
add stubs for lmq rpc server
2020-07-02 11:07:31 -04:00
Jeff Becker
ad882d0d70
initial working code
2020-07-02 11:07:31 -04:00
Stephen Shelton
78256e3228
WIP: LokidRpcClient
2020-07-02 11:07:31 -04:00
Jeff Becker
0006751d80
initial wack at lokimq
2020-07-02 11:07:31 -04:00
Stephen Shelton
91725a8530
WIP: LokidRpcClient
2020-07-02 11:07:31 -04:00
Stephen Shelton
11951510bf
Remove libabyss and rpc::Caller/rpc::Server
2020-07-02 11:07:30 -04:00
Stephen Shelton
0aa43c6b07
Pass RuntimeOptions instead of 'bool isRelay'
2020-07-01 08:38:56 -06:00
Stephen Shelton
daecd6eda5
Remove llarp_config and llarp_main
2020-06-29 14:51:13 -06:00
Stephen Shelton
d85e48c9d0
Use llarp::Context::CallSafe() for vpn AsyncClose()
2020-06-29 14:39:31 -06:00
Stephen Shelton
b5d6a73ffd
Rip out most of C API
2020-06-29 13:55:59 -06:00
Thomas Winget
32843510bb
libunbound can now be built as a static dep
2020-06-15 18:44:59 -04:00
Thomas Winget
8f0330c9f2
std::vector instead of std::array
2020-06-15 18:32:57 -04:00
Thomas Winget
b875d40491
restructure how upstream dns replies are handled
...
llarp::dns::Message does not fully support DNS packets,
so converting the upstream response to one will not work
for all query types. Also it is kinda silly to begin with,
as the upstream reply is already a network packet, ready to go.
2020-06-15 18:32:57 -04:00
Thomas Winget
221e9ff5de
make format
2020-06-15 18:32:57 -04:00
Thomas Winget
df284cb757
proper CMake finding and using of libunbound
2020-06-15 18:32:57 -04:00
Thomas Winget
c2a30692cf
Implement upstream DNS using libunbound
2020-06-15 18:32:57 -04:00
Rick V
dc52f8c2fe
remove stray path separator
2020-06-12 20:50:00 -05:00
Rick V
2fe4c15792
why jeff why
2020-06-12 18:00:39 -05:00
Rick V
a787db9b35
fix ipv4_hdr
2020-06-12 17:34:53 -05:00
Rick V
6d5155def4
jeff pls
2020-06-12 17:13:19 -05:00
Jeff Becker
6984cda3a6
add pybind and router hive to ci
2020-06-08 15:50:12 -04:00
Jeff Becker
3358a3371e
restore correct logstream
2020-06-08 09:31:09 -04:00
Jeff Becker
3d2990f90d
use llarp::LogSilencer to shut up loging in unit tests
2020-06-08 09:26:53 -04:00
Jeff Becker
a73335579a
silence logging in regression test
2020-06-08 09:07:49 -04:00
Jeff Becker
800668348a
add regression test for key backup bug
2020-06-08 08:42:10 -04:00
Jeff Becker
019168fef0
remove unused local variable
2020-06-05 11:40:19 -04:00
Jeff Becker
1899debfb5
unfug transit hops
2020-06-05 11:40:18 -04:00
Stephen Shelton
193060d602
Undo client-related changes to RC creation
...
This partially reverts changes from
1497b829bd
and intsead only prevents
clients from saving their RC to disk.
2020-06-04 15:02:05 -06:00
Jeff
098df580e8
Merge pull request #1298 from majestrate/unfug-transit-hops-2020-06-04
...
Unfug transit hops
2020-06-04 16:23:47 -04:00
Jeff Becker
9fb681eb7c
typo
2020-06-04 16:16:07 -04:00
Jeff Becker
fe1dae8f30
fix transit hop job queuing
2020-06-04 15:48:32 -04:00
Stephen Shelton
980853804d
Remove log statement
2020-06-04 13:34:15 -06:00
Stephen Shelton
cecafb3215
Undo unintentional revert?
2020-06-04 13:32:38 -06:00
Stephen Shelton
43ffe23f66
Remove obnoxious log statement
2020-06-04 13:21:05 -06:00
Stephen Shelton
d8b12ce764
Let KeyManager assemble key filenames
2020-06-04 12:38:35 -06:00
Stephen Shelton
1497b829bd
Ignore our self.signed file if we're a client
2020-06-04 11:05:23 -06:00
Jeff
bb14b44bcf
Merge pull request #1296 from majestrate/fix-one-hop-path-building-2020-06-02
...
fix one hop mode path builds
2020-06-02 11:29:51 -04:00
Jeff Becker
ac26037c34
when in 1 hop mode we where hitting a case where we were failing to build paths
...
this was because we were trying to diversify the endpoints used which is not
appicable in 1 hop mode because first hops are sticky.
2020-06-02 07:14:13 -04:00
Stephen Shelton
91a2af0eda
Sanity checks around shared_from_this()
2020-06-01 14:56:58 -06:00
Jeff
45cda241f0
Merge pull request #1272 from majestrate/exit-nodes-2020-05-16
...
exit traffic via snapps
2020-06-01 14:42:43 -04:00
Jeff Becker
f40ffc0fd6
simplify header for tom.
2020-06-01 13:58:45 -04:00
Jeff Becker
95e55a2544
consistent spelling and use std::max
2020-06-01 13:31:12 -04:00
Jeff Becker
c6885ec285
remove Endpoint::GetExitRouters()
2020-06-01 09:35:21 -04:00
Jeff Becker
44c790b65c
revert back to for loop for simplicity
2020-06-01 09:23:17 -04:00
Jeff Becker
acecb23eb3
make libuv event loop logic queue size configurable.
...
remove logic constructor that is no-op.
add constant for default logic queue size
add constant for transit hop queue size
2020-06-01 09:17:44 -04:00
Rick V
1340cd0dce
remove some string conversions entirely
2020-05-26 23:09:16 -05:00
Rick V
5529371637
RouterContact::[Read|Write] now take a fs::path const ref
2020-05-26 22:39:01 -05:00
Rick V
f62214cf8c
first pass fix wstring path conversions
2020-05-26 20:48:07 -05:00
Jeff Becker
c47a210302
remove a std::move that prevents copy elision
2020-05-26 14:04:43 -04:00
Jeff Becker
f25e9bb01f
use std::list here too
2020-05-24 08:51:17 -04:00
Jeff Becker
db00d080f6
use std::list instead of std::vector because idfk man
2020-05-24 08:36:46 -04:00
Jeff Becker
9298313066
use std::move
2020-05-24 08:21:04 -04:00
Jeff Becker
96cbab33c3
style: put iterator erase in for loop update
2020-05-24 08:15:36 -04:00
Jeff Becker
44ff3a9928
copy assignment so we don't crash
2020-05-24 08:14:08 -04:00
Jeff Becker
149a01c80f
dont use std::bind, use lambda
2020-05-24 08:07:37 -04:00
Jeff Becker
403bc74493
unbreak unit tests
2020-05-24 07:06:27 -04:00
Jeff Becker
f0eca908a4
use static_assert instead
2020-05-23 17:18:00 -04:00
Jeff Becker
4ad8ae253d
align to either 64bit or max_align_t which ever is smaller, for 32 bit.
2020-05-23 17:06:04 -04:00