Commit Graph

15 Commits

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
2022-09-08 14:24:59 -04:00
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).
2022-07-15 22:17:59 -03:00
Jason Rhinelander 181953b4a6 Replace ::Hash nested structs with std::hash specializations 2021-03-10 11:19:52 -04:00
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.
2021-03-09 19:01:41 -05:00
Jeff Becker bd93a8f828
initial v6 exits 2021-02-16 10:59:57 -05:00
Jeff 252692a55b
dont poke routes if we have no exit (#1352)
* * refactor route poking out of llarp::Router and into llarp::RoutePoker
* only poke routes when we have an exit enabled as a client

* add route_poker header so it compiles
2020-09-23 20:28:38 -04:00
jeff f6f56029d3
working netlink route poker 2020-08-24 20:23:26 -04:00
jeff b0bb0b7609
initial route poking 2020-08-24 20:21:55 -04:00
Jeff Becker 301cb6d32f
fix issue #1320 (allow providing ip/port in bind section of config) 2020-07-30 10:36:36 -04:00
Jeff Becker 114bdd5ce5
add move and copy constructors/assigment operators to ip_address 2020-05-23 16:07:20 -04:00
Stephen Shelton 839fb42ba4
Hard code RPC's expectedHostname to 'localhost' 2020-05-11 09:47:26 -06:00
Stephen Shelton cd44caccaf
Attempt to get this SockAddr refactor up and running 2020-05-11 09:11:44 -06:00
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 2020-05-06 14:38:44 -06:00
Stephen Shelton 1cab83ad01
Expand upon IpAddress header, take in feedback 2020-05-04 15:36:08 -06:00
Stephen Shelton dff170712f
Gut Addr, replace with stubbed SockAddr and IpAddress 2020-05-04 15:17:16 -06:00