1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
Commit graph

126 commits

Author SHA1 Message Date
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 be9ddf2ae1 Bring back ghc::filesystem for broke AF macos
macOS doesn't provide `<filesystem>` support when targetting anything
earlier than 10.15.
2020-05-20 19:18:27 -03:00
Jason Rhinelander 26ecf23ad8 Silence various warnings 2020-05-17 21:28:17 -03:00
Jeff ad9edc4ecf
Merge pull request #1266 from majestrate/issue-1264-fix-setting-upstream-dns-2020-05-14
default to port 53 in dns section entries
2020-05-14 13:58:30 -04:00
Stephen Shelton ed31cdaacf
Cosmetic fixes 2020-05-14 11:51:27 -06:00
Jeff Becker 09a356a8a4
dont use static local lambda 2020-05-14 13:30:23 -04:00
Jeff Becker ebed21c392
DRY 2020-05-14 12:33:37 -04:00
Jeff Becker 3753dfbddb
IpAddresses in dns section config were not defaulting to port 53 when no port was provided.
Fixes #1264
2020-05-14 08:14:19 -04:00
Jeff a5b09c47e1
Merge pull request #1262 from notlesh/bandaids-for-sockaddr-refactor-2020-05-11
Bandaids for sockaddr refactor 2020 05 11
2020-05-12 12:04:59 -04:00
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 2020-05-06 14:38:44 -06: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
Jeff Becker f1edca9fa1
additional cleanup of cruft 2020-05-04 14:39:14 -04:00
Jeff Becker c4b5b641bb
default to default data dir given by params instead 2020-05-04 13:14:46 -04:00
Jeff Becker e33a1a2e0f
proper autodetect of ifname and ifaddr 2020-05-04 12:51:57 -04:00
Jason Rhinelander 4f09090c58 Add [network]:enabled to ignored settings list
No one knows what this option does or did, but it is in some generated
config files.
2020-05-04 13:02:28 -03:00
Jeff Becker 96a6d81380
add ifname and ifaddr to network config parsing 2020-05-04 11:44:56 -04:00
Stephen Shelton 78eb0d976d
nonstd::optional -> std::optional 2020-05-04 09:21:26 -06:00
Jeff Becker 7c12347e80
upstream-dns -> upstream 2020-05-04 11:08:25 -04:00
Stephen Shelton 42a7bcd434
Less invasive fix for Addr 2020-05-04 11:08:25 -04:00
Stephen Shelton f2a26adcaa
Move all [endpoint] options to [network] 2020-05-04 11:07:21 -04:00
Stephen Shelton 559610ec94
Properly handle empty config default values 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 1d12e9d14e
Lokinet_INIT() is already checked in main(), so remove from config 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 2730491641
Remove NetworkConfig's freehand options 2020-05-04 11:06:18 -04:00
Stephen Shelton 2bc908cd40
Remove [dns]:local-dns in favor of [dns]:bind 2020-05-04 11:05:52 -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
Stephen Shelton cbd93fcb09
Find "-snapp" conf sections, add more snapp conf options 2020-05-04 11:03:53 -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
Stephen Shelton f0f9b1abdd
Allow 0 as outbound port 2020-04-29 14:23:50 -06:00
Stephen Shelton f8439dab61
Misc aesthetic tweaks 2020-04-29 14:19:48 -06:00
Stephen Shelton 7d83611a0a
Default outbound port to 0, not 1090 2020-04-29 14:19:35 -06:00
Stephen Shelton c4de0f8493
Add more ignored config options 2020-04-29 13:42:06 -06:00
Stephen Shelton 517922e4c3
Reintroduce support for configurable key files 2020-04-29 13:41:39 -06:00
Stephen Shelton 331770b348
Add ability to tolerate (ignore) old config options
This allows us to explicitly ignore (with a warning) old options
that are no longer supported.
2020-04-29 10:47:51 -06:00
Stephen Shelton cdd4439cff
Temporary fix for [dns]bind and [dns]local-dns 2020-04-29 10:10:33 -06:00
Stephen Shelton 526b1320b7
Some maybe-fixes for RouterHive post config cleanup 2020-04-24 11:18:25 -06:00
Stephen Shelton de8e44ba21
Re-apply clang-format rules after rebasing 2020-04-07 14:41:11 -06:00
Stephen Shelton a66f502ed6
Remove [netdb] conf and place it under data-dir
This does three things:

1) Remove the [netdb] conf section,
2) Rename the subdir 'netdb' -> 'nodedb'
3) Place 'nodedb' under 'data-dir'
2020-04-07 14:28:23 -06:00
Stephen Shelton be014175e9
Consolidate logging initialization logic 2020-04-07 14:27:31 -06:00
Stephen Shelton 6909e20588
Fix logging initialization and flush at program exit 2020-04-07 14:27:30 -06:00
Stephen Shelton d3bcc05aa6
Organize some constants and default values 2020-04-07 14:26:32 -06:00
Stephen Shelton 7ea8d62640
Use fs::path over std::string for files 2020-04-07 14:26:30 -06:00
Stephen Shelton 28c1ca9c7a
Handle missing IP address in conf properly 2020-04-07 14:25:19 -06:00
Stephen Shelton 0e5e9a1222
Silently ignore config file if it exists already 2020-04-07 14:25:19 -06:00
Stephen Shelton 1fc7c61d1f
Share common conf comments for client and relay 2020-04-07 14:24:50 -06:00
Stephen Shelton 3739fc1d70
Reinstate multi-valued option 2020-04-07 14:24:50 -06:00