Commit Graph

3729 Commits (0a4089286781b3030ced6a6f60f8f966ef578e9f)

Author SHA1 Message Date
Stephen Shelton a6787657be
Refactor config comments to take list of strings 4 years ago
Stephen Shelton a8671cf9c7
Rename config classes for clarity
ConfigDefinition -> OptionDefiniton
Configuration -> ConfigDefinition
4 years ago
Stephen Shelton f250b7adcb
Remove pidfile support 4 years ago
Stephen Shelton 4f77080f75
Remove optional<> from block-bogons 4 years ago
Stephen Shelton 4d053231d3
Define config defaults as constexpr 4 years ago
Stephen Shelton adfcbd1d0b
Slight cleanup of k:v option maps 4 years ago
Stephen Shelton e06c2e4502
Check that [router]min-connections <= [router]max 4 years ago
Stephen Shelton 6fd270ba09
Rip out link type spec and factory
We only support IWP now, so this is all effectively dead code.
4 years ago
Stephen Shelton 9e850705b4
Add 'AssignmentAcceptor' convenience for simple config acceptors 4 years ago
Stephen Shelton f2a8dd10ce
Modernize Snapp config 4 years ago
Stephen Shelton 733efbab40
Reflect removal of accessors on config structs 4 years ago
Stephen Shelton c8c940b0f5
Replace individual file locations with dataDir 4 years ago
Stephen Shelton 5d0b53e1be
Remove environment variable support in config 4 years ago
Stephen Shelton 05257126fe
Make distinction between config dir and data dir 4 years ago
Stephen Shelton 923e73f693
Plumb isRelay CLI arg through to config 4 years ago
Stephen Shelton 028e55e997
Remove pre-refactor config test 4 years ago
Stephen Shelton 2e75e03434
Remove incomplete impl of config hot-reloading 4 years ago
Stephen Shelton 6301fefd43
Add router-specific config comments 4 years ago
Stephen Shelton 5b520a4dff
Simplify connection limit constants 4 years ago
Stephen Shelton 14e7789847
Add padding to config file generated output 4 years ago
Stephen Shelton 1273f11ce8
First pass at updating comments to lokinet config 4 years ago
Stephen Shelton 18ee23c2a3
Support for comments in config definition 4 years ago
Stephen Shelton 1653b73ee5
Clean up the logic around generating default confs 4 years ago
Stephen Shelton c5ff672c79
Use 'undeclared handler' for multi-valued 'add-node' config option 4 years ago
Stephen Shelton feacde7864
Hook up 'undeclared handlers' to mop up loosely-structured INI values 4 years ago
Stephen Shelton 9a1b7b20de
Add "undeclared value" handler to Configuration 4 years ago
Stephen Shelton e9708a5d1c
Add split(string_view, char) util function 4 years ago
Stephen Shelton ffc58fcedb
Remove dead code (serverOptions) 4 years ago
Stephen Shelton 2e47262350
Demystify LinksConfig 4 years ago
Stephen Shelton cd1e7713de
Clean up / consolidate config logging logic 4 years ago
Stephen Shelton 4c00c6238e
Join config definition and config parser 4 years ago
Stephen Shelton 653a650cf9
Fix typo 4 years ago
Stephen Shelton 9f0ae43149
Remove dead code 4 years ago
Stephen Shelton d82f5e6b93
First pass at replacing config value logic 4 years ago
Stephen Shelton 69331f1571
Remove multiValued as an argument to ConfigDefinition 4 years ago
Stephen Shelton f6d000838f
Clarity and convenience for defining config options 4 years ago
Stephen Shelton 02e31f3867
Introduce acceptor function in ConfigDefinition 4 years ago
Stephen Shelton 60d0bf2a9b
Rename function for clarity 4 years ago
Stephen Shelton 8160c13458
More documentation around Configuration/ConfigDefinition 4 years ago
Stephen Shelton 8352de7bd4
Config documentation, clarity 4 years ago
Stephen Shelton d9340a873e
Consolidate Configuration generate INI functions 4 years ago
Stephen Shelton 1b19314278
Implement Configuration::generateDefaultConfig(), maintain insertion order 4 years ago
Stephen Shelton 7dacc30862
Conveience and clarity around config definiton maps 4 years ago
Stephen Shelton 105dd30fd9
More ConfigDefinition unit tests, fixes, support std::string as type 4 years ago
Stephen Shelton 25212b929c
Add ConfigDefinition unit tests, fixes 4 years ago
Stephen Shelton a856e772c8
Stylistic clean up 4 years ago
Stephen Shelton 0fb888890f
First pass at Configuration definition classes 4 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.
4 years ago
Stephen Shelton 858e252820
Add stringify() to util/str 4 years ago
Stephen Shelton ca67c12928
Why template when we only use one type?? 4 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.
4 years ago
Jeff Becker 4375df2f7d
add forgotten files for generating docs 4 years ago
Jeff Becker c36b6a409c
move version to cmake so docs can access it 4 years ago
Jeff Becker 3e7acb72e1
more docs, make doxygen work 4 years ago
Jeff d3091cf9fc
Merge pull request #1167 from tewinget/tooling
RouterHive initial PR
4 years ago
Jeff Becker 2190da8c81
cpack win32 4 years ago
Jeff d3c3aebeaf
Merge pull request #1194 from majestrate/disable-iwp-fec-2020-03-23
disable accedental fec in iwp outbound messages
4 years ago
Jeff Becker 3b424f76f1
strict check of bounds 4 years ago
Jeff Becker 67883aa945
when we have an inbound session and we do a forward dns lookup
we should not look up the descriptor on the network as we
already have a session with them
4 years ago
Jeff Becker b398076bc6
add bounds check 4 years ago
Jeff Becker b96700579e
remove un needed check 4 years ago
Jeff Becker 53e7397935
fix use after move 4 years ago
Jeff Becker 769bafd281
disable accedental fec in iwp outbound messages 4 years ago
Jeff b1f036bb7f
Merge pull request #1188 from majestrate/call-jsonrpc-server-cleanup-2020-03-16
fix memleak in jsonrpc
4 years ago
Jeff Becker 1e434c03f8
cleanup 4 years ago
Jeff Becker d1f8752b7c
fix memleak in jsonrpc
llarp_tcp_acceptor ticker wasn't being called so connections where not
being cleaned up
4 years ago
jeff 7089996ac5 discard unknown fields in introset for future use 4 years ago
Stephen Shelton 8a12da8bd5
Remove some .cpp files related to RouterEvents
The motivation is to reduce the raw amount of code required to create
and maintain events.
4 years ago
Stephen Shelton 4c6be3c8d1
Add PathBuildRejectedEvent to RouterHive 4 years ago
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.
4 years ago
Jeff Becker 4452b152aa
add an A Record for random.snode so that it works 4 years ago
Jeff Becker 7ba30eec25
squash commits 4 years ago
Jeff ac80357552
Merge pull request #1175 from majestrate/limit-snode-session-build-rate-2020-03-09
limit path builds on snode sessions
4 years ago
Jeff 3f4b2a53fa
add additional case (#1180)
* add additional case for if we are near the end and all elements are in the exlcude set

* fix stop condition in second loop
4 years ago
Jeff Becker a1e8500035
use for loop 4 years ago
Jeff Becker 1ea210ace6
typo fix 4 years ago
Jeff bf82740c08
only try fetching identity key once so we can interrupt lokinet (#1178) 4 years ago
Jeff c6fd007688
Merge pull request #1176 from majestrate/randomize-hop-selection-more-2020-03-10
fully randomize hop selection
4 years ago
Jeff Becker 9cdc7f498d
remove dead code 4 years ago
Jeff Becker 69126c67df
code dedup 4 years ago
Stephen Shelton 6664202868
Add FindRouterSentEvent and FindRouterReceivedEvent to RouterHive 4 years ago
Jeff Becker 6047d578f8
fully randomize hop selection 4 years ago
Jeff bc85082502
Merge pull request #1171 from majestrate/prune-nodedb-as-client-2020-03-08
better nodedb pruning logic
4 years ago
Jeff a6a3d77bb4
Merge pull request #1174 from notlesh/reduce-rr-decode-fail-verbosity-2020-03-09
Reduce log verbosity when DNS RR decode fails
4 years ago
Jeff Becker 677e19e6a9
limit path builds on snode sessions 4 years ago
Jeff Becker 5191af1525
typo fix 4 years ago
Jeff Becker 5d86587aab
typo fix 4 years ago
Jeff Becker bce5cd7b0f
add additional case check and documentation comments for pruning logic 4 years ago
Jeff Becker b3f2c71617
add comment 4 years ago
Jeff Becker d8da3f0a83
simplify logic 4 years ago
Jeff Becker 327ab6f178
prune nodedb as client and service node with no whitelist 4 years ago
Jeff Becker 51516f751b return NS record for localhost.loki to squash errors in host lookups 4 years ago
Jason Rhinelander 6715b86d51 Fix IPv6 lookups to return empty response
The logic here wasn't quite right and was returning an A record in
response to an AAAA lookup.

This returns nothing, which is better, but not quite enough: this gives
empty responses, which produces warnings in host/dig.
4 years ago
Jeff f3d23d6fb6
strip rr from dns reply for .snode and .loki (#1172)
fix dns replies so that extra RR for edns are not included.
4 years ago
Stephen Shelton f40ce505a8
Reduce log verbosity when DNS RR decode fails 4 years ago
Thomas Winget 84a1d7dbcc clang format....... 4 years ago
Rick V 26d1001e53
fix logging 4 years ago
Rick V b449e03f43
So as of GCC 9.2, std::random_device on Windows is RtlGenRandom()
....which is precisely the thing i patch out in libsodium to use CryptoAPI
documented interfaces instead (which fall through to RtlGenRandom() on
such devices _anyway_)
we can just use libsodium directly, i happened to patch it out in libstdc++
as a side effect (since my local toolchain can target any version of windows)
4 years ago
Rick V c9f2f90e13
move these out of the way 4 years ago
Rick V 9b0ec0935a
bump for next release 4 years ago
Rick V 8e9842f4b2
bindaddr a common field on the machine-independent side 4 years ago
Rick V db0920d921
use backport fork for release installer only
move all invariant assets to common repo

remove ded code, libuv patches can be swapped in at build time for debug/release builds
4 years ago
Rick V b4d6f89452
try extracting dns bind addr from INI on windows 4 years ago
Jeff abff5c35cb
Merge pull request #1160 from majestrate/dns-rebinding-fix-2020-03-04
add llarp.admin.die rpc call to gracefully kill router
4 years ago
Jeff Becker 99c814e6b0
fix dns rebinding vuln in jsonrpc 4 years ago
Jason Rhinelander 3b0927ce13
Merge pull request #1140 from despair86/cmake-cleanup
some light cmake cleanup for win32
4 years ago
Jason Rhinelander a78a7fbb17
Merge pull request #1158 from majestrate/prune-routers-2020-03-03
Prune non routers from nodedb
4 years ago
Jason Rhinelander 6707037909
Merge pull request #1157 from majestrate/fix-systemd-status-2020-03-03
fix status line
4 years ago
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
4 years ago
Thomas Winget 6d472d2423 rc gossip delay adjustment for hive
allows enough time for every relay (at least in a hive of 50) to connect
to the bootstrap node so all will get all gossips, but not too long so
tests can run relatively quickly.
4 years ago
Jason Rhinelander c87fd66386 Fix lookup filter to filter second, not first, lookup 4 years ago
Jeff Becker 08de84d40b
remove non public routers from nodedb 4 years ago
Thomas Winget 6fc05ca1ff RCGossipSentEvent 4 years ago
Thomas Winget f01624d10a 2ms between hive router spin-up instead of 20ms 4 years ago
Thomas Winget a58a8c9a61 hive.py now defaults to 1000 relays because f your box.
also check for error on uv_async_init...

may want to `ulimit -Sn $(ulimit -Hn)`...
4 years ago
Thomas Winget c8c66f0a5f some refactoring of tooling code, added RCGossipReceivedEvent 4 years ago
Thomas Winget 88c80dc2ee add cxxopts to shared_lib dependencies 4 years ago
Thomas Winget df0380e746 LRSM RouterEvent, added to hive test and test passes. 4 years ago
Thomas Winget 771d0b4489 hive pytest framework in place (and path build test works)! 4 years ago
Thomas Winget 04c1f67f78 more structure to python hive code 4 years ago
Thomas Winget ee7b7e917d hive can now instantiate and start relays/clients separately 4 years ago
Thomas Winget 2bbb274131 superfluous class declaration 4 years ago
Stephen Shelton 4741d81051 Add GotIntro event to RouterHive 4 years ago
Thomas Winget 68c1ae52b3 add ShortHex function to AlignedBuffer 4 years ago
Thomas Winget 341d03bcf8 changes 4 years ago
Jeff Becker e7689b40a7 dht pub intro message router event thiny doo 4 years ago
Thomas Winget 5672c42f20 RouterEvent::ToString in parent class 4 years ago
Thomas Winget a9882ad475 PathRequestReceivedEvent implemented 4 years ago
Thomas Winget c9a278c0de some more changes to pybind/hive code, read below
hive.py is currently largely for testing the pybind stuff, so changes to it will likely
be frequent and arbitrary for now.

Added pybind for llarp::path::PathHopConfig, but not every member -- just rc and upstream routerID

Hive now uses std::queue with mutex instead of our lockless queue.

Removed some functions from Hive that will not be necessary as things are being handled from python.
4 years ago
Thomas Winget 5cf35769b4 don't have python try to intercept stdout/stderr 4 years ago
Jeff Becker 32dbe6b1ad more shiz 4 years ago
Jeff Becker 877443d95c more introspection code 4 years ago
Thomas Winget 931ff521d1 working toward full testnet of routers (not clients yet) in hive/pybind setup
Not working yet -- some sort of RC issue.  Checkout the commit prior to this if you want something that 'works' that you can play with.
4 years ago
Thomas Winget 1e04decb66 can ping on lokinet running in python context! 4 years ago
Thomas Winget 5e498e962f working on more pybinds 4 years ago
Thomas Winget 0f34a950a9 pybind config object, working 4 years ago
Thomas Winget 9b3bf833e0 revert nop logging -- un-revert later 4 years ago
Thomas Winget a5c2b369b7 nop logging on hive build for now
a bunch of routers logging to stdout at the same time is a complete
charlie foxtrot.  until we take the time to make logger not a singleton
(and probably make each router able to log to its own file rather than stdout)
just make it not log.

Note: this is very temporary, as the logs will be annoying for testing the
pybind stuff and shouldn't be necessary for debugging it
4 years ago
Thomas Winget 0007996fde using instead of typedef 4 years ago
Jeff Becker a5dc41b049 OMG IT DOES STUFF :DDDDDD 4 years ago
Thomas Winget f712acc486 huzzah it builds, time to test soon! 4 years ago
Jeff Becker da79b14703 make it compile 4 years ago
Thomas Winget 8dc5dabe49 working toward compilation, still has include issue 4 years ago
Jeff Becker 26c1670af7 make it compile 4 years ago
Jeff Becker 35bea37fd1 make it compile 4 years ago
Jeff Becker 1fdb8b4c94 initial pybind11 introspection code 4 years ago
Thomas Winget 8d03e6dd3c more router hive stuff, read below the fold
Router now has a hive pointer if LOKINET_HIVE is set.
llarp::Context has a method InjectHive to give Router the pointer.
Router has a method NotifyRouterEvent which does:
  - when LOKINET_HIVE is set, passes the event to RouterHive
  - else when LOKINET_DEBUG is set, prints the event at a low log level
  - else NOP
4 years ago
Jeff Becker add305b9f4
use size / 2 as the number of transit paths 4 years ago
Jeff Becker 05082e2507
fix status line 4 years ago
Rick V 4cd7a22ca3
fix libsodium cross compile 4 years ago