jeff
abc55924e7
forgot header
4 years ago
jeff
5a8884cc2f
uncomment block
4 years ago
jeff
8472aea93f
initial netlink jizz
4 years ago
jeff
b0bb0b7609
initial route poking
4 years ago
Jeff Becker
301cb6d32f
fix issue #1320 (allow providing ip/port in bind section of config)
4 years ago
Jeff Becker
d7ff6c579c
address feedback from jason
...
* split up ipv6 netmask
* revert iwp ack interval change
* c++17-isms in ip range map
* lambda-ize nodedb
* mutable lambdas in transit hops
* perfect forwarding of args in abstract router
* mutable lambdas in lokid rpc client
* notes in readme about nproc
4 years ago
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
3cdca30a74
more auth shit
4 years ago
Jeff Becker
f4971a88fd
use lokimq workers instead of llarp: 🧵 :ThreadPool
4 years ago
Rick V
a787db9b35
fix ipv4_hdr
4 years ago
Jeff Becker
114bdd5ce5
add move and copy constructors/assigment operators to ip_address
4 years ago
Jeff Becker
6af498092b
exit traffic via loki addresses
4 years ago
Jason Rhinelander
3bb24580a4
make format
4 years ago
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().
4 years ago
Jason Rhinelander
7f9160bb6e
Untangle some interdependencies
...
macOS doing a shared library build is not working without untangling
some of the interdependencies. This commit does that, at least enough
to get macOS to compile.
This isn't the cleanest as currently implemented (we have some net/
things in `liblokinet-platform` and some in `liblokinet`, and likewise
ev/vpnio.cpp is in `liblokinet` while the rest of `ev/*` is in
`liblokinet-platform`).
4 years ago
Jason Rhinelander
97088719e0
Avoid reserved __identifiers
...
Identifier names with `__` in them are reserved for the implementation.
One leading underscore followed by a lower-case letter is fine though
(leading underscore followed by *upper*-case is, however, also
reserved).
4 years ago
Jason Rhinelander
60d704b25d
Remove dead code
4 years ago
Jason Rhinelander
f9bbc30c3d
IsIPv4Bogon: constexpr array instead of a function-local static vector
...
The fixed-size array + not needing to do an atomic operation in the
function should allow better compiler optimization.
(And with C++17 the type and size are inferred).
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
Jason Rhinelander
72bf215da4
Move IPPacket header (part 1)
...
Rename net/ip.{cpp,hpp} to net/ip_packet.{cpp,hpp}.
(Doing this in two commits because I want to repurpose ip.hpp/ip.cpp,
and want git to figure out the history properly).
4 years ago
Rick V
918a09c0cf
fix sockaddr win32 and collapse headers on the unix side
4 years ago
Jason Rhinelander
a45bec7c4f
Removed RPI definition
...
This was a long-obsolete fix for things that don't matter anymore.
4 years ago
Jason Rhinelander
26ecf23ad8
Silence various warnings
4 years ago
Jeff Becker
fc5b28b66f
const correctness
4 years ago
Jeff Becker
1780e86faa
fix up unit tests, make them all pass
4 years ago
Stephen Shelton
4dd4327f36
IpAddress::toString() support for IPv6
4 years ago
Stephen Shelton
043f993e41
Return stream in operator<<(stream, IpAddress)
4 years ago
Stephen Shelton
0a40892867
Implement SockAddr operator<() and operator==()
4 years ago
Stephen Shelton
1c7d57f207
Don't forget to return
4 years ago
Stephen Shelton
c0f58c8159
Properly read in ExitInfo's address
4 years ago
Stephen Shelton
e85105e738
Implement SockAddr's operator<<ostream
4 years ago
Stephen Shelton
dfe71309f1
Add to/from in6_addr to SockAddr
4 years ago
Stephen Shelton
fd145d6eeb
Make FIXME throws uniquely identifiable
4 years ago
Stephen Shelton
839fb42ba4
Hard code RPC's expectedHostname to 'localhost'
4 years ago
Stephen Shelton
0cd5d7a060
Derp
4 years ago
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
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
e33a1a2e0f
proper autodetect of ifname and ifaddr
4 years ago
Stephen Shelton
42a7bcd434
Less invasive fix for Addr
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
Rick V
df634b7775
remove a ton of ded win32 code
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
7ba30eec25
squash commits
5 years ago
Linux User
fd23fd6894
32-bit linux patches
5 years ago
Jason Rhinelander
27025030ce
Renamed uint128.h -> uint128.hpp
5 years ago
Jason Rhinelander
3fedd5ba6b
Avoid wrong-order initialization on big endian
5 years ago
Jason Rhinelander
2093f94244
Make uint128_t use big/little endian layout internally
...
Thus if someone wants to memcpy out of it it will have the expected
endianness of the internal data.
5 years ago
Jason Rhinelander
454abb4f9f
Avoid copies in mutators
...
Reimplement operators in terms of mutators, rather than vice versa, so
that mutators don't have to make a copy.
5 years ago
Jason Rhinelander
4207a7cfa3
Rewrite In6ToHUInt to be endian agnostic
5 years ago
Jason Rhinelander
0839c16f19
Final abseil purge
...
Bye-bye Google Boost.
5 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.
5 years ago
Jason Rhinelander
3be7eb789b
Endian defines fix for macOS
...
It seems `__BYTE_ORDER`/`__LITTLE_ENDIAN`/`__BIG_ENDIAN` aren't defined
on macOS, so `if __BYTE_ORDER == __BIG_ENDIAN` was true which made macOS
take the big endian path *twice* (which cancelled out the big endian
conversion).
This makes util/endian.hpp define __LITTLE_ENDIAN__ or __BIG_ENDIAN__
everywhere, and errors if it can't be set.
5 years ago
Jason Rhinelander
9283aac4b6
Big endian fixes
5 years ago
Jeff Becker
a96fd645c5
remove side effect from address detection assert
5 years ago
Jeff Becker
8817e7fe21
fix include
5 years ago
Jeff Becker
c9d38d421b
clang fixes
5 years ago
Jeff Becker
4f87a95f66
fixes for travis
5 years ago
Stephen Shelton
93b8832026
Merge branch 'dev' into private-keys-backup-support
5 years ago
Jeff Becker
0828307906
fix address mapping bug
5 years ago
Jeff Becker
ac686a9329
remove valgrind access errors
5 years ago
Jeff Becker
0ec4e583d4
initialize with zeros
5 years ago
Stephen Shelton
1666498405
Replace bencode_write_version_entry with a more general-purpose function for writing bencoded dictionary entries
5 years ago
Rick V
df29052a75
fix windows
5 years ago
Jeff
3a6c16aa36
Merge pull request #871 from majestrate/ed25519-signing
...
Ed25519 signing
5 years ago
jeff
ff8c167362
make it compile on windows
5 years ago
jeff
c69165dad3
try making it work in the case that is broken on travis
5 years ago
jeff
1621ca676b
Merge remote-tracking branch 'upstream/dev' into ed25519-signing
5 years ago
jeff
869ab0b652
Merge remote-tracking branch 'upstream/dev' into vpn-api-2019-10-03
5 years ago
jeff
1e3cd03880
make format
5 years ago
Stephen Shelton
7dc1351eba
Add missing #endif (presumably from 281fbff
)
5 years ago
jeff
265da6f37b
use get_service_nodes rpc endpoint
5 years ago
jeff
0e2fb6abd5
revert to ed25519 for signing, this breaks everything (again).
5 years ago
Jason Rhinelander
281fbff42f
Fix build on xenial
...
- xenial's cmake version (3.5.1) builds everything fine and test suite
passes, so lower the minimum to that.
- add a hack for xenial's kernel header & glibc version breaking if both
net/if.h and linux/if.h get included. The only thing we actually need
from net/if.h that linux/if.h doesn't have is `if_nametoindex`, so
just hack that definition in for xenial's specific glibc/kernel header
versions.
5 years ago
jeff
52757fef0e
Merge remote-tracking branch 'micheal/background_mode' into vpn-api-2019-10-03
5 years ago
jeff
32ed821763
Merge remote-tracking branch 'upstream/dev' into multithreaded-cryptography
5 years ago
Rick V
ed6ef2d527
clang-format
5 years ago
Rick V
cbdbe94bab
skip null adapters
5 years ago
Rick V
ade2ae1e9a
ok let's see how we're locked up
...
more debug
5 years ago
Rick V
4389e3fee2
try install .net manually
...
use full path
test
5 years ago
Jeff Becker
d04762ab49
unstaged changed
5 years ago
Jeff Becker
da6a3bf9bb
Merge remote-tracking branch 'origin/master' into iwp-multi-ack
5 years ago
Jeff Becker
fd787cc56d
try more ranges
5 years ago
Jeff Becker
1adae338ce
Merge remote-tracking branch 'origin/master'
5 years ago
Michael
1aec0dfa2b
Move logging to subdirectory
5 years ago
Jeff Becker
c01112e4b7
tracy lock contention testing and other fun things
5 years ago
Rick V
b3a975ff8e
sun fix
...
fix testing on sun
5 years ago
Michael
7cb1b525c9
Dump more info from router contact
5 years ago
Michael
16cdfbd5f0
clang-tidy modernize pass
5 years ago
Michael
f9e9227e19
Fix gcc trunk warnings
5 years ago
Michael
4763888d2c
Add fail-able docker build for gcc trunk
5 years ago
Jeff Becker
b4af87aa42
have IPPacket::srcv6 and IPPacket::dstv6 check for ipv4 packets and expand them to ipv6
5 years ago
Michael
ac8624698d
Fix some string_view problems
5 years ago
Jeff Becker
b2fd0e86cc
fix network interface iteration infinite loop
5 years ago
Michael
e52492911d
Refactor endpoint state management to a new class
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
f5291951f6
use logical or not bitwise or and change function name to be plural
5 years ago
Jeff Becker
84407b3557
make it compile
5 years ago
Jeff Becker
fb803cfe11
lel
5 years ago
Jeff Becker
58005c5f81
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Michael
a2326efa37
Revert "Merge pull request #679 from tewinget/revert-config-refactor"
...
This reverts commit 2996a7f29c
, reversing
changes made to 10df3bd4b3
.
5 years ago
Jeff Becker
c4aaa80e75
use sane defaults and deprecated "auto" as it's horribly bad style
5 years ago
Thomas Winget
d044d60101
Reverts #678 #677 and #669 with hashes:
...
10df3bd
766ece8
979f095
See those commits for further details
5 years ago
Michael
b51f7d8015
Convert to load config in config loader
5 years ago
Jeff Becker
bcde59569e
make freebsd compile
5 years ago
cathugger
ddaf0834e2
net/ip: correct IPv6 fragment processing, also check for length before modifying
5 years ago
cathugger
53f3be2013
net/ip: skip IPv6 option headers
5 years ago
cathugger
72b1ea613c
make format
5 years ago
cathugger
a9dac85c28
fix stuff
5 years ago
cathugger
88acadf415
net/ip: update names
5 years ago
cathugger
e085f3e6c5
net/ip: IPv6 packet deltachecksum
5 years ago
cathugger
6730af207f
net/ip: IPv6 TCP/UDP delta chksum funcs
5 years ago
cathugger
891f5d156c
net/ip: cleanup
5 years ago
Jeff Becker
de51ef23bf
more
5 years ago
Jeff Becker
2403ab8f86
ipv6
5 years ago
Michael
3f53965b71
Remove all use of IBEncodeMessage
5 years ago
Jeff Becker
b86e834e1b
Merge remote-tracking branch 'origin/master'
5 years ago
Michael
dd8a93a400
Apply rule of zero to code base
5 years ago
Jeff Becker
4862dec4be
commit recent stuff
5 years ago
Michael
f734ffeae4
Fixup MSVC build
5 years ago
Jeff Becker
34533db620
add urgent build that builds over an existing path for an endpoint
5 years ago
Jeff Becker
92ad98be8b
refactor hooks to be have more c++isms
...
make path build timeouts use log level warning
5 years ago
Jeff Becker
9bc7508b5b
remove nuint128_t
6 years ago
Jeff Becker
5b49008bca
more
6 years ago
Jeff Becker
4404d272b2
remove uint128_t for now
6 years ago
Jeff Becker
e060082441
hook every dns for .loki and .snode when applicable
...
make {n,h}uint{32,16}_t templated type.
6 years ago
Michael
9ee525a006
Fix shadowing warnings
6 years ago
Michael
4143472a17
Add cmake module to target a library as 'system', and fix a few warnings
6 years ago
michael-loki
0195152e05
Allow builds on MSVC ( #518 )
...
* Import cxxopts to replace getopts usage
* Add visual studio build things
* Fixup abseil build parts
* Replace __attribute__((unused)) with ABSL_ATTRIBUTE_UNUSED
* Fixup minor windows build issues
* Replace getopts usage
* Temporarily fixup .rc files
* More minor windows fixes
* Get a working build
* Revert .rc files
* Revert changes to nodedb
6 years ago
Jeff Becker
dfa00e3415
fix exit address
6 years ago
Jeff Becker
20e398b684
fix exit info
6 years ago
Jeff Becker
e178a70929
use shared_ptr for event loop
6 years ago
Jeff Becker
3e1c067974
add include
6 years ago
Jeff Becker
c931ac069f
add AAAA records that return SIIT addresses
6 years ago
Michael
e4cf1f245c
Convert most of llarp to use Printer
6 years ago
Michael
a00d6afc5e
Convert llarp_buffer_t to be a class with methods
6 years ago
Jeff Becker
e1522faeaa
add introspection rpc endpoint
6 years ago
Michael
6d8d910aff
Refactor and add tests for bits.hpp
6 years ago
Ryan Tharp
4bf4faa956
make format
6 years ago
Michael
f3b0af9d2f
Create CopyableBuffer type
6 years ago
Michael
2de621b0ad
Disable copy constructing llarp_buffer_t
6 years ago
Jeff Becker
4406ef9c9c
enable xi serialization
6 years ago
Jeff Becker
6064ff5a68
try fixing unit tests
6 years ago