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
Jeff Becker
39f8f17b53
dont set callback if non provided
2020-05-23 16:07:21 -04:00
Jeff Becker
c826d0a0b1
increase transit hop limits
2020-05-23 16:07:20 -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
Jeff Becker
1780e86faa
fix up unit tests, make them all pass
2020-05-15 08:38:04 -04:00
Jason Rhinelander
dccc663f31
Miss Match demands her name be removed from the code
...
(i.e. fix speeling mistack: missmatch -> mismatch)
2020-05-13 22:35:15 -03:00
Jeff
e6a85d7176
Merge pull request #1263 from jagerman/c++17-niceties
...
C++17 niceties
2020-05-12 16:07:27 -04:00
Jason Rhinelander
e470a6d73e
C++17 niceties
...
- class template argument deduction lets us write `std::unique_lock
foo{mutex}` instead of `std::unique_lock<mutex_type> foo{mutex}` which
makes the `unique_lock` and `shared_lock` functions unnecessary.
- Replace GNU-specific warn_unused_result attribute with C++17-standard
[[nodiscard]]
- Remove pre-C++17 workaround code for fold expressions, void_t
2020-05-12 16:42:35 -03: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
01cc2c86bf
format
2020-05-06 11:37:15 -04:00
Jeff Becker
f1edca9fa1
additional cleanup of cruft
2020-05-04 14:39:14 -04:00
Jeff Becker
1cbf50296c
only add endpoint for hidden service if not service node
2020-05-04 12:58:46 -04:00
Jeff Becker
6aa79b7ca9
set network section
2020-05-04 12:36:29 -04:00
Jason Rhinelander
cd7fd1b6ad
FIXME fix the FIXME
2020-05-04 13:27:14 -03: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
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
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
f8439dab61
Misc aesthetic tweaks
2020-04-29 14:19:48 -06:00
Stephen Shelton
526b1320b7
Some maybe-fixes for RouterHive post config cleanup
2020-04-24 11:18:25 -06: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
ca24f25665
Make fewer assumptions about config state
...
This handles values missing when config is created through RouterHive.
2020-04-07 17:52:14 -06:00
Stephen Shelton
de8e44ba21
Re-apply clang-format rules after rebasing
2020-04-07 14:41:11 -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
91206725cb
Inject a default bootstrap file if none in conf
2020-04-07 14:26:31 -06:00
Stephen Shelton
7ea8d62640
Use fs::path over std::string for files
2020-04-07 14:26:30 -06:00
Stephen Shelton
4f77080f75
Remove optional<> from block-bogons
2020-04-07 14:23:53 -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
733efbab40
Reflect removal of accessors on config structs
2020-04-07 14:20:31 -06:00
Stephen Shelton
5b520a4dff
Simplify connection limit constants
2020-04-07 14:13:27 -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
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
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
Jeff Becker
5191af1525
typo fix
2020-03-09 17:06:25 -04:00
Jeff Becker
5d86587aab
typo fix
2020-03-09 17:06:25 -04:00
Jeff Becker
bce5cd7b0f
add additional case check and documentation comments for pruning logic
2020-03-09 17:06:24 -04:00