Commit Graph

34 Commits (871c3e3281d15ce876fcd85a02228b4e70453bac)

Author SHA1 Message Date
Jeff 871c3e3281
changeset for windows port
* wintun vpn platform for windows
* bundle config snippets into nsis installer for exit node, keyfile persisting, reduced hops mode.
* use wintun for vpn platform
* isolate all windows platform specific code into their own compilation units and libraries
* split up internal libraries into more specific components
* rename liblokinet.a target to liblokinet-amalgum.a to elimiate ambiguity with liblokinet.so
* DNS platform for win32
* rename llarp/ev/ev_libuv.{c,h}pp to llarp/ev/libuv.{c,h}pp as the old name was idiotic
* split up net platform into win32 and posix specific compilation units
* rename lokinet_init.c to easter_eggs.cpp as that is what they are for and it does not need to be a c compilation target
* add cmake option STRIP_SYMBOLS for seperating out debug symbols for windows builds
* intercept dns traffic on all interfaces on windows using windivert and feed it into lokinet
2 years ago
Jeff 68148e098f
* add mockable network functions
* add unit tests with ability to pretend to be different network setups
2 years ago
Jeff 98b3860655
set source ip on service nodes for outbound link to not use all interfaces 2 years ago
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
Thomas Winget 4c630e0437 Large collection of changes to make android work
- Previous android java and jni code updated to work, but with much love
  still needed to make it work nicely, e.g. handling when the VPN is
  turned off.

- DNS handling refactored to allow android to intercept and handle DNS
  requests as we can't set the system DNS to use a high port
  (and apparently Chrome ignores system DNS settings anyway)

- add packet router structure to allow separate handling of specific
  intercepted traffic, e.g. UDP traffic to port 53 gets handled by our
  DNS handler rather than being naively forwarded as exit traffic.

- For now, android lokinet is exit-only and hard-coded to use exit.loki
  as its exit.  The exit will be configurable before release, but
  allowing to not use exit-only mode is more of a challenge.

- some old gitignore remnants which were matching to things we don't
  want them to (and are no longer relevant) removed

- some minor changes to CI configuration
3 years ago
Jeff Becker bb9bd25059
get rid of use of llarp::IpAddress from hotpaths 3 years ago
Jeff Becker 0600f42814
fix up names of functions to be less hidious. 3 years ago
Jeff Becker 35137913b9
windows and macos route pokers for ipv6 3 years ago
Jeff Becker bd93a8f828
initial v6 exits 3 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 6af498092b
exit traffic via loki addresses 4 years ago
Jason Rhinelander 3bb24580a4 make format 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
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 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
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 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
Jason Rhinelander 27025030ce Renamed uint128.h -> uint128.hpp 4 years ago
Jason Rhinelander 0839c16f19 Final abseil purge
Bye-bye Google Boost.
4 years ago
Jason Rhinelander 9283aac4b6 Big endian fixes 4 years ago
Jeff Becker ac686a9329
remove valgrind access errors 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
Michael 16cdfbd5f0
clang-tidy modernize pass 5 years ago
Jeff Becker c4aaa80e75
use sane defaults and deprecated "auto" as it's horribly bad style 5 years ago
Jeff Becker 2403ab8f86
ipv6 5 years ago
Jeff Becker e1522faeaa
add introspection rpc endpoint 5 years ago
Michael da6cdfc0b2
More refactoring to continue to make dependency graph acylic 5 years ago
Michael a3463120cc
Move net components into a distinct folder 5 years ago