Commit Graph

744 Commits

Author SHA1 Message Date
Jeff Becker
3cdca30a74
more auth shit 2020-07-02 11:13:30 -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
ad882d0d70
initial working code 2020-07-02 11:07:31 -04:00
Rick V
6d5155def4
jeff pls 2020-06-12 17:13:19 -05:00
Jeff Becker
800668348a
add regression test for key backup bug 2020-06-08 08:42:10 -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
Jeff Becker
f40ffc0fd6
simplify header for tom. 2020-06-01 13:58:45 -04:00
Jeff Becker
c6885ec285
remove Endpoint::GetExitRouters() 2020-06-01 09:35:21 -04:00
Jeff Becker
a45f92dca7
use random good path for outbound traffic so that it uses an even spread accross
all paths
2020-05-23 16:07:20 -04:00
Jeff Becker
6af498092b
exit traffic via loki addresses 2020-05-23 16:07:19 -04:00
Jason Rhinelander
3bb24580a4 make format 2020-05-20 19:48:13 -03:00
Jason Rhinelander
ebd2142114 Don't use std::optional::value() because f u macos
This replaces all use of std::optional's `opt.value()` with `*opt`
because macOS is great and the ghost of Steve Jobs says that actually
supporting std::optional's value() method is not for chumps before macOS
10.14.  So don't use it because Apple is great.

Pretty much all of our use of it actually is done better with operator*
anyway (since operator* doesn't do a check that the optional has a
value).

Also replaced *most* of the `has_value()` calls with direct bool
context, except for one in the config section which looked really
confusing at a glance without a has_value().
2020-05-20 19:18:28 -03:00
Jason Rhinelander
7f9160bb6e Untangle some interdependencies
macOS doing a shared library build is not working without untangling
some of the interdependencies.  This commit does that, at least enough
to get macOS to compile.

This isn't the cleanest as currently implemented (we have some net/
things in `liblokinet-platform` and some in `liblokinet`, and likewise
ev/vpnio.cpp is in `liblokinet` while the rest of `ev/*` is in
`liblokinet-platform`).
2020-05-20 19:18:28 -03:00
Jason Rhinelander
26ecf23ad8 Silence various warnings 2020-05-17 21:28:17 -03:00
Stephen Shelton
ed31cdaacf
Cosmetic fixes 2020-05-14 11:51:27 -06:00
Jeff Becker
555b9721ce
keyfile was being initialized before being set by configure call.
this made it so that snapps always use ephemeral keys.
this fixes this.
2020-05-14 13:45:27 -04:00
Jeff Becker
635dc4fe13
unbreak router hive
llarp/config/config.cpp:
respect [network]:type option

llarp/handlers/exit.cpp:
when [network]:type is null dont init tun interface

llarp/service/context.cpp:
respect [network]:type option
change endpoint name back to "default"

llarp/tooling/router_hive.cpp:
dont use LogicCall for obtaining RCs from underlying relays, it crashes the mainloop and it's probably safe to readonly access RCs.

pybind/common.hpp:
remove typecasters as we use C++17 now

pybind/llarp/config.cpp:
remove SnappConfig
wire up NetworkConfig

pybind/llarp/handlers/pyhandler.hpp:
remove SnappConfig from constructor

pybind/llarp/handlers/pyhandler.cpp:
update constructor implementation to match header

test/hive/hive.py:
remove broke endpoint related code
wire up null endpoint option using NetworkConfig
use index at 0 for relays and clients instead of 1
dont add a python endpoint to all clients
2020-05-06 10:45:30 -04:00
Stephen Shelton
5f0cbb4625
Don't forget to load your keys 2020-05-04 11:07:22 -04:00
Stephen Shelton
9ba0f117c7
Revert to previous "if hops > 0" logic in Configure() 2020-05-04 11:07:21 -04:00
Stephen Shelton
960dc37c1f
Refactor TunEndpoint::Configure() (partially) 2020-05-04 11:07:21 -04:00
Stephen Shelton
f2a26adcaa
Move all [endpoint] options to [network] 2020-05-04 11:07:21 -04:00
Stephen Shelton
dd9ab0f1d5
Remove ability to have multiple endpoints/snodes from config 2020-05-04 11:07:21 -04:00
Stephen Shelton
b7451b7632
Rip out tag, prefetch tags/addrs from Endpoint 2020-05-04 11:06:47 -04:00
Stephen Shelton
3198a8b139
Handle blacklist-snode validation in config 2020-05-04 11:06:47 -04:00
Stephen Shelton
fde93ac02d
Don't take EndpointConfig by value 2020-05-04 11:06:18 -04:00
Stephen Shelton
21ad442b55
Remove NetConfig_t 2020-05-04 11:05:51 -04:00
Stephen Shelton
df01770466
Rename SnappConfig -> EndpointConfig 2020-05-04 11:05:51 -04:00
Stephen Shelton
93b35c92a7
Eradicate service::Config 2020-05-04 11:05:51 -04:00
Jason Rhinelander
5cf2126bb9 make format 2020-05-01 19:25:32 -03:00
Jason Rhinelander
1697bf90fe C++17
Compiles with C++17, replaces ghc::filesystem with std::filesystem,
nonstd::optional with std::optional, and llarp::string_view with
std::string_view.
2020-05-01 17:43:27 -03:00
Jeff
54a7843bc5
Merge pull request #1186 from notlesh/config-cleanup-2020-03-13
Config cleanup
2020-04-24 12:49:08 -04:00
Jason Rhinelander
3c6aa002b8 Fix errors and warnings compiling on mac 2020-04-10 14:26:50 -03:00
Stephen Shelton
de8e44ba21
Re-apply clang-format rules after rebasing 2020-04-07 14:41:11 -06:00
Stephen Shelton
9d71228e74
Replace config visit pattern with explicit lookups
This is an initial pass at doing explicit value checks when handling
config parsing, as opposed to using a visiting pattern. The latter
made it difficult to check for conditions such as missing required
values, multiple values, etc.

It was also generally less readable (think declarative) which further
made it difficult to get a grasp for what our actual configuration file
requirements were.
2020-04-07 14:01:40 -06:00
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.
2020-04-07 12:38:56 -06:00
Jeff
d3091cf9fc
Merge pull request #1167 from tewinget/tooling
RouterHive initial PR
2020-04-07 13:13:02 -04:00
jeff
7089996ac5 discard unknown fields in introset for future use 2020-03-14 14:52:05 -04:00
Stephen Shelton
ea835405c5
Refactor NotifyRouterEvent() to forward args, event code cleanup
This template-ifies Router::NotifyRouterEvent() up so that it accepts
the arguments to instantiate the specified event type, forwarding them
to std::make_unique. This would allow (in the future) the function to
no-op the call and avoid memory allocation. It also slightly reduces
the amount of code required to fire an event.

This commit also simplifies some of the RouterEvent code to reduce
redundancy.
2020-03-12 11:50:46 -06:00
Stephen Shelton
6664202868
Add FindRouterSentEvent and FindRouterReceivedEvent to RouterHive 2020-03-10 12:12:11 -06:00
Jeff
f3d23d6fb6
strip rr from dns reply for .snode and .loki (#1172)
fix dns replies so that extra RR for edns are not included.
2020-03-09 17:47:27 -03:00
Thomas Winget
84a1d7dbcc clang format....... 2020-03-06 20:20:11 -05:00
Thomas Winget
695784b2b6 more hive things
DHT PubIntroSentEvent
some helper functions added to RouterHive (C++ class) as well as RouterHive(Python class)
hive.py main() continues to be a testbed for new event types
some more internal classes in pybind
2020-03-04 00:57:26 -05:00
Jason Rhinelander
c87fd66386 Fix lookup filter to filter second, not first, lookup 2020-03-04 01:32:20 -04:00
Jeff Becker
32dbe6b1ad more shiz 2020-03-03 19:57:09 -05:00
Jeff Becker
877443d95c more introspection code 2020-03-03 19:57:09 -05:00