Commit Graph

3823 Commits (a73335579acbcc1a987ab258698af5a85965efc2)

Author SHA1 Message Date
Stephen Shelton cd44caccaf
Attempt to get this SockAddr refactor up and running 4 years ago
Stephen Shelton 78d09f2ae5
Support SockAddr in from sockaddr and friends 4 years ago
Stephen Shelton e944bcb28a
Unit tests and fixes for SockAddr::fromString() 4 years ago
Stephen Shelton 0b54087689
Begin implementing SockAddr 4 years ago
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 4 years ago
Jeff Becker 01cc2c86bf
format 4 years ago
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
4 years ago
Stephen Shelton 1cab83ad01
Expand upon IpAddress header, take in feedback 4 years ago
Stephen Shelton dff170712f
Gut Addr, replace with stubbed SockAddr and IpAddress 4 years ago
Jeff Becker 7e4fdc5b0e
check for zero address for bogons 4 years ago
Jeff Becker f1edca9fa1
additional cleanup of cruft 4 years ago
Jeff Becker c425355a6b
set data dir in in loadconfig too 4 years ago
Jeff Becker f307c25d3e
set datadir path when giving filename for config 4 years ago
Jeff Becker c4b5b641bb
default to default data dir given by params instead 4 years ago
Jeff Becker 1cbf50296c
only add endpoint for hidden service if not service node 4 years ago
Jeff Becker e33a1a2e0f
proper autodetect of ifname and ifaddr 4 years ago
Jeff Becker 6aa79b7ca9
set network section 4 years ago
Jason Rhinelander cd7fd1b6ad FIXME fix the FIXME 4 years ago
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.
4 years ago
Jason Rhinelander 1d98632fd3
Merge pull request #1254 from majestrate/network-ifaddr-ifname-2020-05-04
add ifname and ifaddr to network config parsing
4 years ago
Jeff Becker 96a6d81380
add ifname and ifaddr to network config parsing 4 years ago
Jason Rhinelander 4be7b2c8a5
Merge pull request #1253 from notlesh/better-config-error-messages-2020-05-04
Use more user-friendly error messages in config
4 years ago
Stephen Shelton f96fded525
Use more user-friendly error messages in config 4 years ago
Stephen Shelton 78eb0d976d
nonstd::optional -> std::optional 4 years ago
Jeff Becker 7c12347e80
upstream-dns -> upstream 4 years ago
Stephen Shelton 42a7bcd434
Less invasive fix for Addr 4 years ago
Stephen Shelton 5f0cbb4625
Don't forget to load your keys 4 years ago
Stephen Shelton 9ba0f117c7
Revert to previous "if hops > 0" logic in Configure() 4 years ago
Stephen Shelton 15918ff1c9
log-- 4 years ago
Stephen Shelton 960dc37c1f
Refactor TunEndpoint::Configure() (partially) 4 years ago
Stephen Shelton f2a26adcaa
Move all [endpoint] options to [network] 4 years ago
Stephen Shelton 559610ec94
Properly handle empty config default values 4 years ago
Stephen Shelton dd9ab0f1d5
Remove ability to have multiple endpoints/snodes from config 4 years ago
Stephen Shelton b7451b7632
Rip out tag, prefetch tags/addrs from Endpoint 4 years ago
Stephen Shelton 1d12e9d14e
Lokinet_INIT() is already checked in main(), so remove from config 4 years ago
Stephen Shelton 3198a8b139
Handle blacklist-snode validation in config 4 years ago
Stephen Shelton fde93ac02d
Don't take EndpointConfig by value 4 years ago
Stephen Shelton 2730491641
Remove NetworkConfig's freehand options 4 years ago
Stephen Shelton daf599b032
Update comment about ExitEndpoint config TODO 4 years ago
Stephen Shelton 2bc908cd40
Remove [dns]:local-dns in favor of [dns]:bind 4 years ago
Stephen Shelton 779658edd0
Refactor ExitEndpoint's config, mv dns ops from [network] to [dns] 4 years ago
Stephen Shelton 21ad442b55
Remove NetConfig_t 4 years ago
Stephen Shelton df01770466
Rename SnappConfig -> EndpointConfig 4 years ago
Stephen Shelton 93b35c92a7
Eradicate service::Config 4 years ago
Stephen Shelton cbd93fcb09
Find "-snapp" conf sections, add more snapp conf options 4 years ago
Jason Rhinelander 3efaf9ff76 Add string header (reportedly needed for libc++) 4 years ago
Jason Rhinelander 5cf2126bb9 make format 4 years ago
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.
4 years ago
Stephen Shelton f0f9b1abdd
Allow 0 as outbound port 4 years ago
Stephen Shelton f8439dab61
Misc aesthetic tweaks 4 years ago
Stephen Shelton 7d83611a0a
Default outbound port to 0, not 1090 4 years ago
Stephen Shelton c4de0f8493
Add more ignored config options 4 years ago
Stephen Shelton 517922e4c3
Reintroduce support for configurable key files 4 years ago
Stephen Shelton 320564d792
Specialize ConfigOption for bool to accept "truthy" / "falsy" values 4 years ago
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.
4 years ago
Stephen Shelton cdd4439cff
Temporary fix for [dns]bind and [dns]local-dns 4 years ago
Stephen Shelton 936fbb2424
Fix config not falling back to undeclared handler for missing option 4 years ago
Stephen Shelton 526b1320b7
Some maybe-fixes for RouterHive post config cleanup 4 years ago
Jeff 54a7843bc5
Merge pull request #1186 from notlesh/config-cleanup-2020-03-13
Config cleanup
4 years ago
Jeff edc0d1a3ed
Merge pull request #1225 from majestrate/macos-cpack-setup-and-bootstrap-2020-04-10
macos cpack installer infra
4 years ago
Rick V 6eaaeab094
reeee 4 years ago
Rick V 337a21d6f6
ew stinki 4 years ago
Rick V 76aa0421ff
use a new read buffer every time 4 years ago
Rick V 1e51bfde2c
fix 4 years ago
Rick V 4e87e8dc08
correctly return true/false when writing 4 years ago
Rick V c65eecf399
are we leaking data randomly 4 years ago
Rick V 46d4ab2708
this might just crash 4 years ago
Rick V df634b7775
remove a ton of ded win32 code 4 years ago
Rick V 938f40efe1
probably got mangled in a patch
supposed to tick at the end
4 years ago
Jason Rhinelander 3dd3d48fbb Consolidate cmake vars & definitions
CMake will set version variables itself if you give the version in the
project(), which is cleaner.  Also removes some (nearly) duplicate
definitions and settings added in basic_definitions.cmake for unknown
reasons.

Removes some redundant settings (name, description, version) from the
cpack settings which already default to the values from the project()
call.
4 years ago
Jeff 5b1941222b
unscrew travis-ci (#1223)
* update travis ci clang-format to clang-format-9 because we use that now
add python3-dev package becuase something inside ci thinks it has python but really does not

* try using python3.6

* try working around hot garbage that is travis-ci

* add deadsnakes repo for python3.8

* prevent nullptr deference when running in unit tests

* move python3.8 to main dependancy matrix and add python3.8 to homebrew deps

* add deadsnake apt repo

* add deadsnakes and python3.8 back to previous matrix

* dev package for python

* toggle hive build in ci

* dont add pybind11 if not bulding hive

* revert setting pyenv shim for travis ci

* make native builds on by default except for windows ci

* only apply native build being off for windows release target becuase that broke macos
4 years ago
Jason Rhinelander 3c6aa002b8 Fix errors and warnings compiling on mac 5 years ago
Stephen Shelton ca24f25665
Make fewer assumptions about config state
This handles values missing when config is created through RouterHive.
5 years ago
Stephen Shelton dfcf8fb62e
Update RouterHive to reflect config changes 5 years ago
Stephen Shelton 6a10a33e9e
Revert "Remove llarp::Config::Copy()"
This reverts commit 3a1c727b9b.
5 years ago
Stephen Shelton de8e44ba21
Re-apply clang-format rules after rebasing 5 years ago
Stephen Shelton 3a1c727b9b
Remove llarp::Config::Copy()
I probably missed this in my rebase on top of The Great Wall of Blame
5 years ago
Stephen Shelton 6d001c5fd2
Opportunistically move 'netdb' to 'nodedb' 5 years ago
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'
5 years ago
Stephen Shelton 3c6a127dce
Complain loudly when we can't create nodedb dirs 5 years ago
Stephen Shelton be014175e9
Consolidate logging initialization logic 5 years ago
Stephen Shelton 6909e20588
Fix logging initialization and flush at program exit 5 years ago
Stephen Shelton 2479049876
Remove dead code 5 years ago
Stephen Shelton d3bcc05aa6
Organize some constants and default values 5 years ago
Stephen Shelton 91206725cb
Inject a default bootstrap file if none in conf 5 years ago
Stephen Shelton da6bda15a1
Where did rc.signed come from?! 5 years ago
Stephen Shelton 7ea8d62640
Use fs::path over std::string for files 5 years ago
Stephen Shelton 7ce256d846
Prefer fs::path over std::string @ KeyManager 5 years ago
Stephen Shelton 0a9515a94a
Proper support for multiple values @ ConfigDefinition 5 years ago
Stephen Shelton 28c1ca9c7a
Handle missing IP address in conf properly 5 years ago
Stephen Shelton 0697d57190
Important TODO 5 years ago
Stephen Shelton 0e5e9a1222
Silently ignore config file if it exists already 5 years ago
Stephen Shelton 1fc7c61d1f
Share common conf comments for client and relay 5 years ago
Stephen Shelton 3739fc1d70
Reinstate multi-valued option 5 years ago
Stephen Shelton a6787657be
Refactor config comments to take list of strings 5 years ago
Stephen Shelton a8671cf9c7
Rename config classes for clarity
ConfigDefinition -> OptionDefiniton
Configuration -> ConfigDefinition
5 years ago
Stephen Shelton f250b7adcb
Remove pidfile support 5 years ago
Stephen Shelton 4f77080f75
Remove optional<> from block-bogons 5 years ago
Stephen Shelton 4d053231d3
Define config defaults as constexpr 5 years ago
Stephen Shelton adfcbd1d0b
Slight cleanup of k:v option maps 5 years ago
Stephen Shelton e06c2e4502
Check that [router]min-connections <= [router]max 5 years ago
Stephen Shelton 6fd270ba09
Rip out link type spec and factory
We only support IWP now, so this is all effectively dead code.
5 years ago
Stephen Shelton 9e850705b4
Add 'AssignmentAcceptor' convenience for simple config acceptors 5 years ago
Stephen Shelton f2a8dd10ce
Modernize Snapp config 5 years ago
Stephen Shelton 733efbab40
Reflect removal of accessors on config structs 5 years ago
Stephen Shelton c8c940b0f5
Replace individual file locations with dataDir 5 years ago
Stephen Shelton 5d0b53e1be
Remove environment variable support in config 5 years ago
Stephen Shelton 05257126fe
Make distinction between config dir and data dir 5 years ago
Stephen Shelton 923e73f693
Plumb isRelay CLI arg through to config 5 years ago
Stephen Shelton 028e55e997
Remove pre-refactor config test 5 years ago
Stephen Shelton 2e75e03434
Remove incomplete impl of config hot-reloading 5 years ago
Stephen Shelton 6301fefd43
Add router-specific config comments 5 years ago
Stephen Shelton 5b520a4dff
Simplify connection limit constants 5 years ago
Stephen Shelton 14e7789847
Add padding to config file generated output 5 years ago
Stephen Shelton 1273f11ce8
First pass at updating comments to lokinet config 5 years ago
Stephen Shelton 18ee23c2a3
Support for comments in config definition 5 years ago
Stephen Shelton 1653b73ee5
Clean up the logic around generating default confs 5 years ago
Stephen Shelton c5ff672c79
Use 'undeclared handler' for multi-valued 'add-node' config option 5 years ago
Stephen Shelton feacde7864
Hook up 'undeclared handlers' to mop up loosely-structured INI values 5 years ago
Stephen Shelton 9a1b7b20de
Add "undeclared value" handler to Configuration 5 years ago
Stephen Shelton e9708a5d1c
Add split(string_view, char) util function 5 years ago
Stephen Shelton ffc58fcedb
Remove dead code (serverOptions) 5 years ago
Stephen Shelton 2e47262350
Demystify LinksConfig 5 years ago
Stephen Shelton cd1e7713de
Clean up / consolidate config logging logic 5 years ago
Stephen Shelton 4c00c6238e
Join config definition and config parser 5 years ago
Stephen Shelton 653a650cf9
Fix typo 5 years ago
Stephen Shelton 9f0ae43149
Remove dead code 5 years ago
Stephen Shelton d82f5e6b93
First pass at replacing config value logic 5 years ago
Stephen Shelton 69331f1571
Remove multiValued as an argument to ConfigDefinition 5 years ago
Stephen Shelton f6d000838f
Clarity and convenience for defining config options 5 years ago
Stephen Shelton 02e31f3867
Introduce acceptor function in ConfigDefinition 5 years ago
Stephen Shelton 60d0bf2a9b
Rename function for clarity 5 years ago
Stephen Shelton 8160c13458
More documentation around Configuration/ConfigDefinition 5 years ago
Stephen Shelton 8352de7bd4
Config documentation, clarity 5 years ago
Stephen Shelton d9340a873e
Consolidate Configuration generate INI functions 5 years ago
Stephen Shelton 1b19314278
Implement Configuration::generateDefaultConfig(), maintain insertion order 5 years ago
Stephen Shelton 7dacc30862
Conveience and clarity around config definiton maps 5 years ago
Stephen Shelton 105dd30fd9
More ConfigDefinition unit tests, fixes, support std::string as type 5 years ago
Stephen Shelton 25212b929c
Add ConfigDefinition unit tests, fixes 5 years ago
Stephen Shelton a856e772c8
Stylistic clean up 5 years ago
Stephen Shelton 0fb888890f
First pass at Configuration definition classes 5 years ago
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.
5 years ago
Stephen Shelton 858e252820
Add stringify() to util/str 5 years ago
Stephen Shelton ca67c12928
Why template when we only use one type?? 5 years ago
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.
5 years ago
Jeff Becker 4375df2f7d
add forgotten files for generating docs 5 years ago
Jeff Becker c36b6a409c
move version to cmake so docs can access it 5 years ago
Jeff Becker 3e7acb72e1
more docs, make doxygen work 5 years ago
Jeff d3091cf9fc
Merge pull request #1167 from tewinget/tooling
RouterHive initial PR
5 years ago
Jeff Becker 2190da8c81
cpack win32 5 years ago