Commit Graph

18 Commits (7caa87862ee8eaf3c93609d1f7d31bada3517361)

Author SHA1 Message Date
Thomas Winget 7caa87862e standardize include format and pragma once
All #ifndef guards on headers have been removed, I think,
in favor of #pragma once

Headers are now included as `#include "filename"` if the included file
resides in the same directory as the file including it, or any
subdirectory therein.  Otherwise they are included as
`#include <project/top/dir/relative/path/filename>`

The above does not include system/os headers.
3 years ago
Jeff 21930cf667
LNS (#1342)
* initial relay side lns

* fix typo

* add reserved names and refactor test for dns

* lns name decryption

* all wired up (allegedly)

* refact to use service::EncryptedName for LNS responses to include nonce with ciphertext

* fully rwemove tag_lookup_job

* replace lns cache with DecayingHashTable

* check for lns name validity against the following rules:

* not localhost.loki, loki.loki, or snode.loki

* if it contains no dash then max 32 characters long, not including the .loki tld (and also assuming a leading subdomain has been stripped)

* These are from general DNS requirements, and also enforced in
registrations:

* Must be all [A-Za-z0-9-]. (A-Z will be lower-cased by the RPC call).

* cannot start or end with a -

* max 63 characters long if it does contain a dash

* cannot contain -- in the third and fourth characters unless it starts with xn--

* handle timeout in name lookup job by calling the right handler with std::nullopt
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 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 1d5c712adb
monkey patch upstream dns to rewrite .loki cname answers 4 years ago
Michael 16cdfbd5f0
clang-tidy modernize pass 5 years ago
Jeff Becker 1fd6b5ae74
Merge remote-tracking branch 'origin/master' into ipv6-tun 5 years ago
Michael 488695047f
Remove redundant else blocks 5 years ago
Jeff Becker c60099002b
reverse dns for ipv6 5 years ago
Jeff Becker fea64eaf12
handle subdomains 5 years ago
Rick V 61fb9a9c82
added some notes to gear up for the #371 putback by @michael-loki
moved platform-specifc stuff *to* platform specifc lib
removed -Wno-format on windows and *actually* turn on proper format checking
here using compiler-specifc extension for C99
5 years ago
Michael a00d6afc5e
Convert llarp_buffer_t to be a class with methods 5 years ago
Michael a3463120cc
Move net components into a distinct folder 5 years ago
Michael 85dde7b6b0
Move remaining include/llarp headers to llarp/ 6 years ago
Michael d9ce493a9e
Move dns* to llarp/ 6 years ago
Jeff Becker 1f104881be
unit testing for ptr 6 years ago
Jeff Becker 40678f9019
add dnslib unit test coverage 6 years ago
Jeff Becker 1d1bde2e88
add dnslib 6 years ago