Commit Graph

20 Commits (8b321612da4e129b8eee4e02af755184d2405fe9)

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
Jason Rhinelander eec8244a6c
Remote util::Printer and related cruft 2 years ago
Jason Rhinelander b81f7025c9
Replace logging with oxen-logger
Replaces custom logging system with spdlog-based oxen logging.  This
commit mainly replaces the backend logging with the spdlog-based system,
but doesn't (yet) convert all the existing LogWarn, etc. to use the new
format-based logging.

New logging statements will look like:

    llarp::log::warning(cat, "blah: {}", val);

where `cat` should be set up in each .cpp or cluster of .cpp files, as
described in the oxen-logging README.

As part of spdlog we get fmt, which gives us nice format strings, where
are applied generously in this commit.

Making types printable now requires two steps:
- add a ToString() method
- add this specialization:

      template <>
      constexpr inline bool llarp::IsToStringFormattable<llarp::Whatever> = true;

This will then allow the type to be printed as a "{}" value in a
fmt::format string.  This is applied to all our printable types here,
and all of the `operator<<` are removed.

This commit also:
- replaces various uses of `operator<<` to ToString()
- replaces various uses of std::stringstream with either fmt::format or
  plain std::string
- Rename some to_string and toString() methods to ToString() for
  consistency (and to work with fmt)
- Replace `stringify(...)` and `make_exception` usage with fmt::format
  (and remove stringify/make_exception from util/str.hpp).
2 years ago
Jeff 1eba0f836e
replace LLARP_PROTO_VERSION macro 2 years ago
Jeff 98b3860655
set source ip on service nodes for outbound link to not use all interfaces 2 years ago
Jason Rhinelander 181953b4a6 Replace ::Hash nested structs with std::hash specializations 3 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
Jeff Becker be3faeb402
feedback from tom.
* remove unneeded header.
* fix typo in docs
3 years ago
Jeff Becker bb9bd25059
get rid of use of llarp::IpAddress from hotpaths 3 years ago
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 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 4f87a95f66 fixes for travis 4 years ago
Jeff Becker 0ec4e583d4
initialize with zeros 5 years ago
Michael 7cb1b525c9
Dump more info from router contact 5 years ago
Michael 16cdfbd5f0
clang-tidy modernize pass 5 years ago
Michael 3f53965b71
Remove all use of IBEncodeMessage 5 years ago
Michael e4cf1f245c
Convert most of llarp to use Printer 5 years ago
Michael 2de621b0ad
Disable copy constructing llarp_buffer_t 5 years ago
Jeff Becker 6064ff5a68
try fixing unit tests 5 years ago
Michael da6cdfc0b2
More refactoring to continue to make dependency graph acylic 5 years ago