Commit Graph

173 Commits

Author SHA1 Message Date
Jeff
dcb48db5fe
enable profiling on clients by default (#1421)
* enable client relay profiling by default

* macos dns fixes

* improve peer profiling algorithm to track timeouts vs failures

* remove debug ioctl call in tuntap code

* use ub_wait instead of ub_process as that was what was there before

* const correctness

* DRY out checking for SIIT

* typofix

* correct name
2020-10-27 17:34:09 -04:00
Rick V
7136f77c2e
allow running lokinet as root on windows (#1347)
* - allow running lokinet as root on windows
  ($PROGRAMDATA/.lokinet/lokinet.ini)
- oops forgot to eat my own command line args

* cursed windows

* now that we eat our own startup options the entry in cxxopts is fully
ded

* aha our command line options get smashed up

* revert plus DRY fix
2020-09-17 15:20:50 -04:00
Rick V
f283c565e7
make x.x.x.y+1 the default router on windows 2020-08-24 20:19:50 -04:00
Jason Rhinelander
c5faa86926 cmake refactor
Refactors many things in cmake to improve and simplify:

- don't use variable indirection for target names; target names are
*already* a variable of sorts.  (e.g. ${UTIL_LIB} is now just
lokinet-util).  cmake/basic_definitions.cmake is now gone.

- fix LTO enabling to use the standard cmake (3.9+) LTO mechanism rather
than shoving a bunch of flag hacks through link_libraries and
add_compile_options.  This also now enables LTO when building a shared
library (because previously the -flto hacks were only turned on in the
static code for some reason).

- build liblokinet as *either* shared library or static library, but not
both.  Building both makes things more complicated because they had
different names (lokinet-shared or lokinet-static) and seems pointless:
you generally want one or the other.  Now there is just the liblokinet
target, which will be shared or static depending on the value of
BUILD_SHARED_LIBS.

- Simplify lokinet-cryptography AVX2 code: just build *one* library, and
add in the additional AVX2 files when possible, rather than building two
and needing to merge them.

- Compress STATIC_LINK and STATIC_LINK_RUNTIME into just STATIC_LINK.
It makes no sense to use one of these (_RUNTIME) on Windows and the
other on non-Windows when they appear to try to do the same thing.

- remove a bunch of annotations from `endif(FOO)` -> `endif()`.

- move all the tuntap compilation code (including OS-specific source
file selection) into vendor/CMakeLists.txt and build tuntap as an
intermediate OBJECT library rather than keeping a global variable in 5
different files.

- move release motto define to root cmake; it made no sense being
duplicated in both unix.cmake and win32.cmake

- fix add_log_tag to not stomp on any existing source compile flags with
its definition.  Also use proper compile definition property instead of
cramming it into compile flags.

- make optimization/linker flags less hacky.  There's no reason for us
to force particular optimization flags because the cmake build type
already does that (e.g. -DCMAKE_BUILD_TYPE=Release does -O3).  Not doing
that also silences a bunch of cmake warnings because it thinks "-O0 -g3"
etc.  are link libraries (which is reasonable: that's what the code was
telling cmake they are).

- sets the default build type to RelWithDebInfo which gives us `-O2 -g`
if you don't specify a build type.

- Move PIC up (so that the things loaded in unix.cmake, notably libuv,
have it set).

- Add a custom `curl` interface library that carries the correct link
target and include paths for curl (system or bundled).
2020-05-17 23:31:23 -03:00
Rick V
b4d6f89452
try extracting dns bind addr from INI on windows 2020-03-05 12:47:45 -06:00
Jason Rhinelander
4338e38cd6 Remove old vendored ghc-filesystem
We aren't using this anymore; this should have been deleted in the
switch to submodules.
2020-02-24 14:27:44 -04:00
Jason Rhinelander
3df4eaef2d Devendor cxxopts to submodule 2020-02-13 15:18:17 -04:00
Jason Rhinelander
edbe0c7bf4 Devendor gtest to a submodule 2020-02-13 15:15:34 -04:00
Jason Rhinelander
5a787de73b Switch abseil & nlohmann to submodules and update to latest stable
Our current abseil won't build with gcc 10 (its `optional`
implementation appears broken), and spews warnings under slightly older
compilers; updating to the latest stable 2019 branch fixes both issues.
2020-02-13 15:14:17 -04:00
Ryan Tharp
4bea4867d0
Xenial compatibility
per https://github.com/loki-project/loki-network/blob/ubuntu/xenial/debian/patches/0004-Reduce-required-cmake-version.patch
2019-12-18 17:39:42 -08:00
Rick V
5d914cedd8
add definitions for System5 and generic non-Apple BSD 2019-12-16 11:31:24 -06:00
Jeff Becker
b82bd93a88
use linux codepath for freebsd in filesystem.hpp 2019-12-16 09:08:02 -05:00
Jason Rhinelander
8d2c22fc72 Replace cppbackport with ghc-filesystem
From https://github.com/gulrak/filesystem which is more up-to-date and
looks better maintained than cppbackport.
2019-12-06 20:41:22 -04:00
Jeff Becker
c1a81d26f1
pull in libsodium if local version sucks 2019-10-31 15:30:02 -04:00
Jeff Becker
e1a4e77d5a
fix compile error on freebsd 2019-10-28 11:27:02 -04:00
jeff
ff8c167362 make it compile on windows 2019-10-22 11:58:34 -04:00
Michael
fadedb4a7b
Distinct ios build 2019-09-30 09:59:34 +01:00
Michael
1aec0dfa2b
Move logging to subdirectory 2019-09-03 20:52:27 +01:00
Rick V
b3a975ff8e
sun fix
fix testing on sun
2019-08-27 06:53:08 -05:00
Michael
7d39f84ef3
Partial fixes for shadow 2019-08-26 23:10:48 +00:00
Michael
0ff3b1e707
Fix make install 2019-08-14 12:01:34 +00:00
Michael
8a8833d0fd
Bump version of cxxopts 2019-08-12 21:44:10 +00:00
Jeff
10d7e7cb77
Merge branch 'master' into master 2019-08-05 07:59:30 -04:00
Michael
f9e9227e19
Fix gcc trunk warnings 2019-08-02 10:29:08 +01:00
Rick V
244af9891b
fix a crash on some win32 systems
make clang+libc2 happy
2019-08-02 03:24:11 -05:00
Rick V
d4688ed3b3
get our TAP ifindex to pass to ipv6(1) on old platforms 2019-08-02 03:23:50 -05:00
Rick V
5b0b6e4ae2
fix header case
do not use Microsoft <filesystem>
add build stamp to version resource if we're doing local CI
2019-08-01 21:39:47 -05:00
Michael
df498c7bf8
try to make some windows 2019-07-29 21:31:26 +01:00
Jeff Becker
909e0399d6
make android compile 2019-07-24 10:17:54 -04:00
Michael
42b951aa80
Try to link shared again 2019-07-21 16:57:11 +01:00
Michael
4806e52f62
Try to silence some warnings to reduce noise 2019-07-21 16:57:11 +01:00
Michael
e52492911d
Refactor endpoint state management to a new class 2019-07-15 10:15:51 +01:00
Jeff Becker
9a2ffb85e6
Merge remote-tracking branch 'origin/master' into ipv6-tun 2019-07-14 08:10:09 -04:00
Jeff Becker
750397d085
use std::string instead of fs::path 2019-07-14 07:25:33 -04:00
Jeff Becker
1fd6b5ae74
Merge remote-tracking branch 'origin/master' into ipv6-tun 2019-07-12 09:53:52 -04:00
Michael
89eb1ded76
Add missing cppbackport fs::path constructor 2019-07-10 22:56:06 +01:00
Jeff Becker
134d36eb02
whitespace fix 2019-07-08 10:23:26 -04:00
Jeff Becker
4edb9d9b45
fix 2019-07-08 10:22:25 -04:00
Jeff Becker
58005c5f81
Merge remote-tracking branch 'origin/master' into ipv6-tun 2019-07-08 10:17:21 -04:00
Michael
661a8b6537
Fix macos build after rebase 2019-07-06 15:59:13 +01:00
Jeff
ce034b3dff
make it work 2019-07-05 10:14:07 -04:00
Jeff Becker
6467d21ba0
* fix testnet codepath
* add packet info for osx
2019-07-05 10:13:58 -04:00
Jeff
adcc866478 make it work 2019-07-05 08:51:54 -04:00
Jeff Becker
81cab62bb9
* fix testnet codepath
* add packet info for osx
2019-07-05 08:07:06 -04:00
Jeff Becker
04c9c61dfb
Merge remote-tracking branch 'origin/master' into ipv6-tun 2019-07-02 11:25:10 -04:00
Michael
59e8a7316f
Revert "Merge pull request #668 from michael-loki/remove_cppbackport"
This reverts commit 33142d5005, reversing
changes made to 408a652a01.
2019-07-01 10:33:03 +01:00
Jeff Becker
a225759c0f
Merge remote-tracking branch 'origin/master' into ipv6-tun 2019-06-28 16:12:34 -04:00
Michael
1639c58cb6
Remove cppbackport from vendor dir 2019-06-27 16:25:44 +01:00
Jeff Becker
5c61df08b5
Merge remote-tracking branch 'origin/master' into ipv6-tun 2019-06-20 10:35:51 -04:00
Rick V
a83402bc3a
finally fix solaris
Be more descriptive: strm_fd is the file handle used to link up
the STREAMS modules, while fd is the handle we use to read/write
user data from the network. -rick
2019-06-18 19:35:10 -05:00