Commit Graph

311 Commits (a7c42ab2bdf62cb7ee3deeef6ad4c7fe4613b62a)

Author SHA1 Message Date
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
4 years ago
Jeff Becker 5abf111159
endpoint auth whitelist 4 years ago
Jeff Becker a42d3d51c3
more 4 years ago
Jeff Becker 1899debfb5
unfug transit hops 4 years ago
Jeff Becker 6af498092b
exit traffic via loki addresses 4 years ago
Jason Rhinelander d05e6716cb Remove llarp::str(string_view)
It was a workaround for pre-C++17 std::string which didn't support
passing a string_view to various functions/operators.  There's only one
place left that needs an explicit conversion, and that's where it is
used as a map key; so just be explicit there and remove llarp::str()
everywhere else.
4 years ago
Jason Rhinelander 3bb24580a4 make format 4 years ago
Jason Rhinelander bdc9c7bfa8 Move IPRange out of net.hpp; free up TruncateV6 etc.
- Move IPRange into its own net/ip_range.hpp

- Move the static net::IPPacket::TruncateV6, etc. functions to free
net::TruncateV6, etc. functions (now from net/ip.hpp instead of
net/ip_packet.hpp).

- Make net::TruncateV6 and net::ExpandV4 constexpr.

- Add IPRange::FromIPv4 factory function (to replace the iprange_ipv4
free function)
4 years ago
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 4 years ago
Jeff Becker e33a1a2e0f
proper autodetect of ifname and ifaddr 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 dd9ab0f1d5
Remove ability to have multiple endpoints/snodes from config 4 years ago
Stephen Shelton df01770466
Rename SnappConfig -> EndpointConfig 4 years ago
Stephen Shelton 93b35c92a7
Eradicate service::Config 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 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 4452b152aa
add an A Record for random.snode so that it works 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
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 b4d6f89452
try extracting dns bind addr from INI on windows 4 years ago
Jason Rhinelander c0eb0c4db4 Avoid unnecessary copy 4 years ago
Jeff Becker d50a0149f9
use std::chrono 4 years ago
Jeff Becker 9c30ff7a26
handle snode and clean up codepath for hooked dns 4 years ago
Jeff Becker 1d5c712adb
monkey patch upstream dns to rewrite .loki cname answers 4 years ago
Jeff a8a6c175fc
Merge pull request #1128 from majestrate/use-std-chrono-2020-02-24
make llarp_time_t use std::chrono::milliseconds
4 years ago
Jeff Becker bf0416cab8
remove Time_t, add operator overload for printing llarp_time_t and add to_json function for serializing llarp_time_t to json 4 years ago
Jason Rhinelander 3bd400f6fe Fix string_view C++17 compatibility
string_view was implicitly convertible to std::string, but
std::string_view is only explicitly convertible.  This makes the
`operator std::string` explicit to be more compatible, and re-adds a
bunch of explicit string casts to the code where needed.

(This also fixes the build if changing the standard to c++17)
4 years ago
Jeff Becker d2d109e92c
llarp_time_t is now using std::chrono 4 years ago
Jason Rhinelander 46242ba69b TrimWhiteSpace -> TrimWhitespace
Fix my dumb initial capitalization choice.
4 years ago
Jason Rhinelander 54186c4a89 Replace absl string_view with string_view from lokimq
When we add loki-mq has a dependency we can just alias it, but for now
it's easier to copy the header than add the whole submodule library.
4 years ago
Jason Rhinelander 98c34d995b De-abseil: Add our own llarp::TrimWhiteSpace
Adds a TrimWhiteSpace instead of using abseil's.

Adds Catch2 tests for it, and also converts the existing str tests to
catch (which look much, much nicer than the gtest ones).
4 years ago
Jeff Becker 6c67cc1f01
make default endpoint non reachable by default 4 years ago
Jeff Becker 70eb353c42
make publishing introsets optional using reachable=false to disable 4 years ago
Jeff Becker ee752c00e6
make format 4 years ago
Jeff Becker c014d21f84
use std::shared_ptr not a bare pointer to prevent memleak 4 years ago
Jeff Becker 79c3c748e4
limit number of snode sessions client side 4 years ago
Jeff Becker 92bbda600b
remove callsto Router::PumpLL and stuff gets faster (or stuff) 5 years ago
Jeff Becker 0c5c1aab1b
remove unneeded log statement 5 years ago
Jeff Becker a2fc35a7aa lower limit to 25ms 5 years ago
Jeff Becker 5924a2cec0 limit calls 5 years ago
Jeff Becker 0828307906 fix address mapping bug 5 years ago
Jeff Becker 5188873288 batch and flush 5 years ago
Jason Rhinelander d13a3d2b62 Don't flush here; we already have a tick flushing 5 years ago
Jeff Becker ba0fd223d9 reduce number of jobs we put onto the logic thread 5 years ago
Jeff Becker 6f95fbfece
work in progress 5 years ago