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
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
5abf111159
endpoint auth whitelist
2020-07-02 11:07:33 -04:00
Jeff Becker
a42d3d51c3
more
2020-07-02 11:07:33 -04:00
Stephen Shelton
daecd6eda5
Remove llarp_config and llarp_main
2020-06-29 14:51:13 -06:00
Jeff Becker
800668348a
add regression test for key backup bug
2020-06-08 08:42:10 -04:00
Jeff Becker
6af498092b
exit traffic via loki addresses
2020-05-23 16:07:19 -04:00
Stephen Shelton
ffdeca5378
Initialize all primitive values in Config
2020-05-20 15:54:23 -06:00
Stephen Shelton
aee96e53a3
Refactor Addr -> IpAddress/SockAddr
2020-05-06 14:38:44 -06: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
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
779658edd0
Refactor ExitEndpoint's config, mv dns ops from [network] to [dns]
2020-05-04 11:05:51 -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
Stephen Shelton
cbd93fcb09
Find "-snapp" conf sections, add more snapp conf options
2020-05-04 11:03:53 -04: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
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
526b1320b7
Some maybe-fixes for RouterHive post config cleanup
2020-04-24 11:18:25 -06:00
Stephen Shelton
dfcf8fb62e
Update RouterHive to reflect config changes
2020-04-07 17:50:50 -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
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
a8671cf9c7
Rename config classes for clarity
...
ConfigDefinition -> OptionDefiniton
Configuration -> ConfigDefinition
2020-04-07 14:24:49 -06:00
Stephen Shelton
f250b7adcb
Remove pidfile support
2020-04-07 14:24:48 -06:00
Stephen Shelton
4f77080f75
Remove optional<> from block-bogons
2020-04-07 14:23:53 -06:00
Stephen Shelton
4d053231d3
Define config defaults as constexpr
2020-04-07 14:23:32 -06:00
Stephen Shelton
adfcbd1d0b
Slight cleanup of k:v option maps
2020-04-07 14:23:11 -06:00
Stephen Shelton
6fd270ba09
Rip out link type spec and factory
...
We only support IWP now, so this is all effectively dead code.
2020-04-07 14:22:53 -06:00
Stephen Shelton
f2a8dd10ce
Modernize Snapp config
2020-04-07 14:20:59 -06:00
Stephen Shelton
c8c940b0f5
Replace individual file locations with dataDir
2020-04-07 14:19:21 -06:00
Stephen Shelton
5d0b53e1be
Remove environment variable support in config
2020-04-07 14:19:21 -06:00
Stephen Shelton
05257126fe
Make distinction between config dir and data dir
2020-04-07 14:18:14 -06:00
Stephen Shelton
923e73f693
Plumb isRelay CLI arg through to config
2020-04-07 14:17:13 -06:00
Stephen Shelton
028e55e997
Remove pre-refactor config test
2020-04-07 14:14:33 -06:00
Stephen Shelton
1653b73ee5
Clean up the logic around generating default confs
2020-04-07 14:11:57 -06:00
Stephen Shelton
feacde7864
Hook up 'undeclared handlers' to mop up loosely-structured INI values
2020-04-07 14:10:11 -06:00
Stephen Shelton
ffc58fcedb
Remove dead code (serverOptions)
2020-04-07 14:09:13 -06:00
Stephen Shelton
2e47262350
Demystify LinksConfig
2020-04-07 14:08:45 -06:00
Stephen Shelton
cd1e7713de
Clean up / consolidate config logging logic
2020-04-07 14:07:40 -06:00
Stephen Shelton
4c00c6238e
Join config definition and config parser
2020-04-07 14:06:10 -06:00
Stephen Shelton
9f0ae43149
Remove dead code
2020-04-07 14:05:11 -06:00
Stephen Shelton
d82f5e6b93
First pass at replacing config value logic
2020-04-07 14:04:36 -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
Thomas Winget
84a1d7dbcc
clang format.......
2020-03-06 20:20:11 -05:00
Thomas Winget
0f34a950a9
pybind config object, working
2020-03-03 19:57:09 -05:00
Jeff Becker
a5dc41b049
OMG IT DOES STUFF :DDDDDD
2020-03-03 19:57:09 -05:00
Jason Rhinelander
74d4afad51
Remove metric config parsing
2020-02-24 14:27:44 -04:00
Jason Rhinelander
5efcd49a3b
Deabseil: remove absl::StrCat, de-templatize fromEnv
...
fromEnv here wasn't usefully templatized (the base template basically
couldn't be used for anything except a string anyway), so just replaced
it with the overloads we need and moved the implementations out of the
header.
2020-02-24 14:27:44 -04:00
Jason Rhinelander
ac1486d0be
Replace absl::optional with optional-lite
...
Step 1 of removing abseil from lokinet.
For the most part this is a drop-in replacement, but there are also a
few changes here to the JSONRPC layer that were needed to work around
current gcc 10 dev snapshot:
- JSONRPC returns a json now instead of an optional<json>. It doesn't
make any sense to have a json rpc call that just closes the connection
with returning anything. Invoked functions can return a null (default
constructed) result now if they don't have anything to return (such a
null value won't be added as "result").
2020-02-19 18:21:25 -04:00
Jeff Becker
e90cb2929e
disable metrics by default
2019-12-09 08:13:38 -05:00
Jeff Becker
dd48b149ca
make job queue size configurable
2019-11-25 16:30:34 -05:00
Michael
3371da98cf
Use libcurl (optional dependency) to hit jsonrpc
2019-10-09 23:00:50 +01:00
Jeff Becker
b5402dc6c3
Merge remote-tracking branch 'origin/master' into iwp-redux
2019-08-27 08:15:41 -04:00
Michael
70937ab503
Fix docker-compose isolated network
2019-08-27 01:57:37 +01:00
Jeff Becker
6a48a3b402
code review fixes:
...
* use std::unordered_set
* use default for ctor/dtor
* don't crash on short packet with nack
2019-08-26 07:16:46 -04:00
Jeff Becker
ba316f85ba
default to iwp
2019-08-22 16:56:27 -04:00
Jeff Becker
3c3338e801
Merge remote-tracking branch 'origin/master' into memlink
2019-08-21 10:53:25 -04:00
Jeff
ecf3c37d2e
Merge pull request #768 from majestrate/sane-limits
...
Sane limits
2019-08-14 06:28:28 -04:00
Michael
16cdfbd5f0
clang-tidy modernize pass
2019-08-12 16:52:58 +01:00
Jeff Becker
2345dd3239
try adding proper limits
2019-08-12 07:20:57 -04:00
Jeff Becker
c1f33bb1ac
initial mempipe implementation
2019-08-07 12:33:29 -04:00
Michael
8fd4ceb55b
Don't use LoadFromString
2019-07-21 16:57:11 +01:00
Jeff Becker
9a2ffb85e6
Merge remote-tracking branch 'origin/master' into ipv6-tun
2019-07-14 08:10:09 -04:00
Jeff Becker
750397d085
use std::string instead of fs::path
2019-07-14 07:25:33 -04:00
Jeff
b9cdfd116e
correct worker threads amounts
2019-07-13 07:54:58 -04:00
Michael
3ce90b678e
Allow override of the rest of the config
2019-07-09 00:29:43 +01:00
Michael
fbb83704a0
Allow override of some config via env variables
2019-07-09 00:29:43 +01:00
Michael
08d306f6e9
Have fromSection return void
2019-07-09 00:29:43 +01:00
Michael
937f28f75d
Move router config to be encapsulated
2019-07-09 00:29:43 +01:00
Michael
f310160065
Fixup and add tests
2019-07-06 14:46:25 +01:00
Michael
a2326efa37
Revert "Merge pull request #679 from tewinget/revert-config-refactor"
...
This reverts commit 2996a7f29c
, reversing
changes made to 10df3bd4b3
.
2019-07-06 14:46:25 +01:00
Thomas Winget
d044d60101
Reverts #678 #677 and #669 with hashes:
...
10df3bd
766ece8
979f095
See those commits for further details
2019-07-02 11:02:20 -04:00
Michael
b51f7d8015
Convert to load config in config loader
2019-07-02 01:58:39 +01:00
Michael
00c237dc6d
Move config class to its own dir
2019-07-02 01:58:38 +01:00