Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.9.6 #1731

Merged
merged 98 commits into from
Sep 8, 2021
Merged

v0.9.6 #1731

Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
7ba15f9
add --help and -h flags to lokinet-bootstrap to show help message
majestrate May 18, 2021
4f1bd14
fix issue with excessively pedantic stl on archlinux
majestrate Jul 6, 2021
dace022
fix dns on android
majestrate Jul 9, 2021
e96ec15
add / remove route blackhole so we dont leak if we crash
majestrate Jun 25, 2021
a4b552a
Merge pull request #1682 from majestrate/route-blackhole-linux-2021-0…
majestrate Jul 12, 2021
048fdad
Update readme.md
darcys22 Jul 29, 2021
f130312
Merge pull request #1708 from darcys22/patch-1
majestrate Jul 29, 2021
29418f7
bencode-dump.py: support reading from stdin
jagerman Aug 6, 2021
ee4e73f
Merge pull request #1712 from jagerman/bencode-dump-stdin
majestrate Aug 6, 2021
ae1243e
Remove unused defaults.hpp
jagerman Aug 10, 2021
f40052d
Remove old unused lokinet-bootstrap script
jagerman Aug 10, 2021
ea79d1c
Merge pull request #1713 from jagerman/remove-unused-user-defines
majestrate Aug 10, 2021
9950adf
Remove unneeded split(str, char) method
jagerman Aug 11, 2021
73f0432
Fix default upstream DNS not working
jagerman Aug 11, 2021
1b878e3
Merge pull request #1715 from jagerman/default-upstream-dns-port
jagerman Aug 11, 2021
f39084b
Merge pull request #1714 from jagerman/remove-broken-split
jagerman Aug 11, 2021
37dde7d
format
majestrate Aug 16, 2021
0871862
initial routing table refactor
majestrate Aug 27, 2021
9791fd6
initial win32 port of route manager
majestrate Aug 27, 2021
64cd299
remove old routing table maniuplation code
majestrate Aug 27, 2021
e25ae71
introduce add/del route via interface to route manager
majestrate Aug 27, 2021
c9b9ed9
make add/del blackhole default to empty implementation
majestrate Aug 27, 2021
07a58ff
use vpn::NetworkInterface for add/del route via interface instead of …
majestrate Aug 27, 2021
6251c13
add NOP implementation of VPN route manager for android
majestrate Aug 27, 2021
3deb551
SockAddr string optimization
jagerman Aug 30, 2021
2e52908
Merge pull request #1722 from jagerman/sockaddr-optimization
majestrate Aug 31, 2021
439183b
bump openssl static deps version for upstream security update
majestrate Aug 31, 2021
418eb4e
Merge pull request #1721 from majestrate/platform-bits-2021-08-26
majestrate Aug 31, 2021
a70035b
Revert "fix dns on android"
jagerman Aug 26, 2021
3ce329d
Reapply "fix dns on android" + fix argument order
jagerman Sep 1, 2021
c0b8c87
Merge pull request #1725 from jagerman/dnsinterceptor-arg-reverse
majestrate Sep 1, 2021
a4a9062
dont save addrmap on android as it hangs
majestrate Sep 1, 2021
0c1a3e1
redo dns to use event loop on non windows and threading bullshit on w…
majestrate Sep 1, 2021
14c93e2
Unbound callbacks also need arguments reversed
jagerman Sep 1, 2021
0447ffc
Merge pull request #1728 from jagerman/fix-arg-order-v2
majestrate Sep 1, 2021
a8a7ef5
Stop using deprecated OMQ connect_remote overload
jagerman Sep 1, 2021
cd99e5c
Merge pull request #1729 from jagerman/fix-omq-deprecation
majestrate Sep 1, 2021
060c571
Merge pull request #1727 from majestrate/android-hang-fix-2021-09-01
majestrate Sep 1, 2021
3bcc8f9
Merge pull request #1726 from majestrate/dns-graceful-teardown-2021-0…
majestrate Sep 1, 2021
f3bc00b
Merge pull request #1724 from majestrate/update-static-deps-2021-08-31
jagerman Sep 1, 2021
f65ec8e
make ci try building the flutter apk in the android apk pipeline
majestrate Sep 2, 2021
c39225b
correct lokinet flutter url
majestrate Sep 2, 2021
92cfa8a
dont bundle raw jni libs
majestrate Sep 2, 2021
63ed5c1
upload bare apk as ci artifact
majestrate Sep 2, 2021
0708a0d
initial network extension code for macos
May 14, 2021
5edd045
add swift version bullshit file and additional bullshittery
Jun 30, 2021
0bb00ba
Various cmake build cleanups/refactors
jagerman Jul 27, 2021
faf8a69
Set version into Info.plist, don't manually configure
jagerman Jul 28, 2021
3ab117a
Switch extension from a framework to an appex
jagerman Jul 29, 2021
81d27c3
Default CODESIGN_APPEX to CODESIGN_APP
jagerman Jul 29, 2021
7db2459
macos sort of works now
Jul 29, 2021
d24221e
make ci run ./contrib/mac.sh with no codesigning
Aug 16, 2021
1272a4f
add dummy sign target for ci when we don't have signing keys
Aug 16, 2021
deb0a98
it works
Aug 16, 2021
3f0b34e
Consolidate apple-specific bits into llarp/apple
jagerman Aug 23, 2021
712b5a5
Tweak icns generation to only run when necessary
jagerman Aug 25, 2021
329da95
Apple OS interface cleanup & refactoring
jagerman Aug 25, 2021
2964051
Remove swift version (do not squash)
jagerman Aug 25, 2021
e39c473
format.sh: support macports clang-format
jagerman Aug 25, 2021
fec3598
Remove no-longer-used framework.mm
jagerman Aug 26, 2021
58da228
Generate a default client lokinet.ini on startup if it doesn't exist
jagerman Aug 26, 2021
3527c9c
Remove more unused dns-proxy files
jagerman Aug 26, 2021
9afa95c
Remove unused/empty/no longer used apple headers
jagerman Aug 26, 2021
c74dcba
Add lokinet subnet to default routes
jagerman Aug 30, 2021
e843907
Add RouteManager; make exit on/off work
jagerman Aug 30, 2021
fd75991
Remove unused vars
jagerman Aug 30, 2021
f00e78c
Add DNS trampoline
jagerman Aug 31, 2021
0f09745
Remove debug
jagerman Sep 1, 2021
9dd6048
Unleak exit mode DNS via unbound DNS trampoline on (macOS)
jagerman Sep 1, 2021
e11efe9
Reformat
jagerman Sep 1, 2021
a7decd5
Silence warnings
jagerman Sep 1, 2021
067fcf7
Remove dead code
jagerman Sep 1, 2021
1315dab
disable language ASM, yolo
majestrate Sep 1, 2021
f51d0a8
Forward-declare ub_ctx/ub_result
jagerman Sep 1, 2021
10cd331
invert logic for android dns hook
majestrate Sep 2, 2021
8aef5d7
Re-enable LTO; target macos 10.12+
jagerman Sep 2, 2021
38335f1
Remove debugging
jagerman Sep 2, 2021
92c7fb9
LOKINET_VERSION -> built in lokinet_VERSION
jagerman Sep 2, 2021
2b8ef41
Remove old mac installer packaging
jagerman Sep 2, 2021
12e00b7
Remove advertising of big crappy company
jagerman Sep 2, 2021
831cc23
Remove obsolete bigs
jagerman Sep 2, 2021
82314a3
add comment about android dns
majestrate Sep 2, 2021
0d64de1
tmp commit for debugging (revert me)
majestrate Sep 2, 2021
9794888
remove unused import
majestrate Sep 3, 2021
7fe5ffb
Fix IPv4 routes are disabling exit
jagerman Sep 3, 2021
b52cf97
override ShouldHandlePacket on android to bypass non .snode/.loki dns…
majestrate Sep 3, 2021
c52782a
Add IPv6 addr/routing for macos
jagerman Sep 3, 2021
2ee43c2
set ipv6 address on apple to hardcoded value
majestrate Sep 3, 2021
344d0a2
format
majestrate Sep 3, 2021
41ba49a
Merge pull request #1688 from majestrate/macos-network-extension-2021…
jagerman Sep 3, 2021
d91ce53
limit RC gossip to 20 peers max
majestrate Aug 30, 2021
a739e7b
try not to prefer outbound vs inbound link sessions
majestrate Aug 31, 2021
9ad6314
use std::sample to grab MaxGossipPeers when populating std::unordered…
majestrate Aug 31, 2021
53b6285
Disable tests on static bionic
jagerman Sep 3, 2021
1972cf3
Merge pull request #1723 from majestrate/rc-gossip-limiter-2021-08-30
jagerman Sep 4, 2021
0f8297a
Bump dev branch version
jagerman Sep 4, 2021
6c3c523
Update wording and wrap help message
jagerman Sep 8, 2021
dbea1f9
Merge pull request #1651 from majestrate/lokinet-bootstrap-help-messa…
jagerman Sep 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 14 additions & 15 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ local debian_pipeline(name, image,
cmake_extra='',
extra_cmds=[],
jobs=6,
tests=true,
loki_repo=false,
allow_fail=false) = {
kind: 'pipeline',
Expand Down Expand Up @@ -55,10 +56,12 @@ local debian_pipeline(name, image,
'cmake .. -DWITH_SETCAP=OFF -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_BUILD_TYPE='+build_type+' ' +
(if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') +
'-DWITH_LTO=' + (if lto then 'ON ' else 'OFF ') +
(if tests then '' else '-DWITH_TESTS=OFF ') +
cmake_extra,
'VERBOSE=1 make -j' + jobs,
'../contrib/ci/drone-gdb.sh ./test/testAll --use-colour yes',
] + extra_cmds,
]
+ (if tests then ['../contrib/ci/drone-gdb.sh ./test/testAll --use-colour yes'] else [])
+ extra_cmds,
}
],
};
Expand All @@ -76,7 +79,13 @@ local apk_builder(name, image, extra_cmds=[], allow_fail=false, jobs=6) = {
[if allow_fail then "failure"]: "ignore",
environment: { SSH_KEY: { from_secret: "SSH_KEY" }, ANDROID: "android" },
commands: [
'VERBOSE=1 JOBS='+jobs+' NDK=/usr/lib/android-ndk ./contrib/android.sh'
'VERBOSE=1 JOBS='+jobs+' NDK=/usr/lib/android-ndk ./contrib/android.sh',
'git clone https://github.com/majestrate/lokinet-mobile',
'cp -av lokinet-jni-*/* lokinet-mobile/lokinet_lib/android/src/main/jniLibs/',
'cd lokinet-mobile',
'flutter build apk --debug',
'cd ..',
'cp lokinet-mobile/build/app/outputs/apk/debug/app-debug.apk lokinet.apk'
] + extra_cmds
}
]
Expand Down Expand Up @@ -191,12 +200,7 @@ local mac_builder(name,
// basic system headers. WTF apple:
'export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"',
'ulimit -n 1024', // because macos sets ulimit to 256 for some reason yeah idk
'mkdir build',
'cd build',
'cmake .. -DCMAKE_CXX_FLAGS=-fcolor-diagnostics -DCMAKE_BUILD_TYPE='+build_type+' ' +
(if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') + cmake_extra,
'VERBOSE=1 make -j' + jobs,
'./test/testAll --use-colour yes',
'./contrib/mac.sh'
] + extra_cmds,
}
]
Expand Down Expand Up @@ -252,7 +256,7 @@ local mac_builder(name,
]),

// Static build (on bionic) which gets uploaded to builds.lokinet.dev:
debian_pipeline("Static (bionic amd64)", docker_base+'ubuntu-bionic', deps='g++-8 python3-dev automake libtool', lto=true,
debian_pipeline("Static (bionic amd64)", docker_base+'ubuntu-bionic', deps='g++-8 python3-dev automake libtool', lto=true, tests=false,
cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ' +
'-DCMAKE_CXX_FLAGS="-march=x86-64 -mtune=haswell" -DCMAKE_C_FLAGS="-march=x86-64 -mtune=haswell" -DNATIVE_BUILD=OFF ' +
'-DWITH_SYSTEMD=OFF',
Expand All @@ -274,9 +278,4 @@ local mac_builder(name,
// Macos builds:
mac_builder('macOS (Release)'),
mac_builder('macOS (Debug)', build_type='Debug'),
mac_builder('macOS (Static)', cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON -DDOWNLOAD_SODIUM=FORCE -DDOWNLOAD_CURL=FORCE -DDOWNLOAD_UV=FORCE',
extra_cmds=[
'../contrib/ci/drone-check-static-libs.sh',
'../contrib/ci/drone-static-upload.sh'
]),
]
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.4.2
80 changes: 38 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,32 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Has to be set before `project()`, and ignored on non-macos:
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "macOS deployment target (Apple clang only)")

set(LANGS C CXX)
if(APPLE)
set(LANGS ${LANGS} OBJC Swift)
endif()

find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
foreach(lang C CXX)
foreach(lang ${LANGS})
if(NOT DEFINED CMAKE_${lang}_COMPILER_LAUNCHER AND NOT CMAKE_${lang}_COMPILER MATCHES ".*/ccache")
message(STATUS "Enabling ccache for ${lang}")
set(CMAKE_${lang}_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE STRING "")
endif()
endforeach()
endif()


project(lokinet
VERSION 0.9.5
VERSION 0.9.6
DESCRIPTION "lokinet - IP packet onion router"
LANGUAGES C CXX)
LANGUAGES ${LANGS})

if(APPLE)
# Apple build number: must be incremented to submit a new build for the same lokinet version,
# should be reset to 0 when the lokinet version increments.
set(LOKINET_APPLE_BUILD 0)
endif()

set(RELEASE_MOTTO "A Series of Tubes" CACHE STRING "Release motto")

Expand All @@ -29,10 +41,8 @@ if(RELEASE_MOTTO AND CMAKE_BUILD_TYPE MATCHES "[Rr][Ee][Ll][Ee][Aa][Ss][Ee]")
add_definitions(-DLLARP_RELEASE_MOTTO="${RELEASE_MOTTO}")
endif()


list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")


# Core options
option(USE_AVX2 "enable avx2 code" OFF)
option(USE_NETNS "enable networking namespace support. Linux only" OFF)
Expand Down Expand Up @@ -94,14 +104,6 @@ endif()

add_definitions(-D${CMAKE_SYSTEM_NAME})

if(MSVC_VERSION)
enable_language(ASM_MASM)
list(APPEND CMAKE_ASM_MASM_SOURCE_FILE_EXTENSIONS s)
add_definitions(-D_WIN32_WINNT=0x0600 -DNOMINMAX -DSODIUM_STATIC)
else()
enable_language(ASM)
endif()

include(cmake/solaris.cmake)
include(cmake/win32.cmake)

Expand Down Expand Up @@ -184,8 +186,12 @@ else()
endif()


# this is messing with release builds
add_compile_options(-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0)
if(NOT APPLE)
add_compile_options(-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -Wall -Wextra -Wno-unknown-pragmas -Wno-unused-function -Wno-deprecated-declarations -Werror=vla)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-unknown-warning-option)
endif()
endif()

if (NOT CMAKE_SYSTEM_NAME MATCHES "Linux" AND SHADOW)
message( FATAL_ERROR "shadow-framework is Linux only" )
Expand Down Expand Up @@ -213,36 +219,27 @@ if(TRACY_ROOT)
endif()


if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-unknown-warning-option)
endif()

if (NOT MSVC_VERSION)
add_compile_options(-Wall -Wextra -Wno-unknown-pragmas)
# vla are evil
add_compile_options(-Werror=vla)
add_compile_options(-Wno-unused-function -Wno-deprecated-declarations)
endif()

include(cmake/coverage.cmake)

# these vars are set by the cmake toolchain spec
if (WOW64_CROSS_COMPILE OR WIN64_CROSS_COMPILE)
include(cmake/cross_compile.cmake)
endif()

if(NATIVE_BUILD)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL ppc64le)
add_compile_options(-mcpu=native -mtune=native)
else()
add_compile_options(-march=native -mtune=native)
endif()
elseif(NOT NON_PC_TARGET)
if (USE_AVX2)
add_compile_options(-march=haswell -mtune=haswell -mfpmath=sse)
else()
# Public binary releases
add_compile_options(-march=nocona -mtune=haswell -mfpmath=sse)
if(NOT APPLE)
if(NATIVE_BUILD)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL ppc64le)
add_compile_options(-mcpu=native -mtune=native)
else()
add_compile_options(-march=native -mtune=native)
endif()
elseif(NOT NON_PC_TARGET)
if (USE_AVX2)
add_compile_options(-march=haswell -mtune=haswell -mfpmath=sse)
else()
# Public binary releases
add_compile_options(-march=nocona -mtune=haswell -mfpmath=sse)
endif()
endif()
endif()

Expand Down Expand Up @@ -332,12 +329,11 @@ endif()
add_subdirectory(crypto)
add_subdirectory(llarp)
add_subdirectory(daemon)


if(WITH_HIVE)
add_subdirectory(pybind)
endif()



if (NOT SHADOW)
if(WITH_TESTS OR WITH_HIVE)
add_subdirectory(test)
Expand All @@ -361,6 +357,6 @@ if(NOT TARGET uninstall)
endif()


if(BUILD_PACKAGE)
if(BUILD_PACKAGE AND NOT APPLE)
include(cmake/installer.cmake)
endif()
4 changes: 2 additions & 2 deletions cmake/StaticBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

set(LOCAL_MIRROR "" CACHE STRING "local mirror path/URL for lib downloads")

set(OPENSSL_VERSION 1.1.1k CACHE STRING "openssl version")
set(OPENSSL_VERSION 1.1.1l CACHE STRING "openssl version")
set(OPENSSL_MIRROR ${LOCAL_MIRROR} https://www.openssl.org/source CACHE STRING "openssl download mirror(s)")
set(OPENSSL_SOURCE openssl-${OPENSSL_VERSION}.tar.gz)
set(OPENSSL_HASH SHA256=892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5
set(OPENSSL_HASH SHA256=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
CACHE STRING "openssl source hash")

set(EXPAT_VERSION 2.3.0 CACHE STRING "expat version")
Expand Down
5 changes: 1 addition & 4 deletions cmake/installer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ if(WIN32)
include(cmake/win32_installer_deps.cmake)
endif()

if(APPLE)
include(cmake/macos_installer_deps.cmake)
endif()


# This must always be last!
include(CPack)

113 changes: 0 additions & 113 deletions cmake/macos_installer_deps.cmake

This file was deleted.

8 changes: 5 additions & 3 deletions contrib/bencode-dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import sys
import pprint

if len(sys.argv) != 2 or sys.argv[1].startswith('-'):
if len(sys.argv) == 1 or (len(sys.argv) == 2 and sys.argv[1] == '-'):
f = sys.stdin.buffer
elif len(sys.argv) != 2 or sys.argv[1].startswith('-'):
print("Usage: {} FILE -- dumps a bencoded file".format(sys.argv[0]), file=sys.stderr)
sys.exit(1)

f = open(sys.argv[1], 'rb')
else:
f = open(sys.argv[1], 'rb')

class HexPrinter():
def __init__(self, data):
Expand Down
7 changes: 3 additions & 4 deletions contrib/ci/drone-static-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ if [ -e build-windows ]; then
# zipit up yo
archive="$base.zip"
zip -r "$archive" "$base"
elif [ -e build-android ] ; then
elif [ -e lokinet.apk ] ; then
# android af ngl
cp -av lokinet-jni-* "$base"
archive="$base.tar.xz"
tar cJvf "$archive" "$base"
archive="$base.apk"
cp -av lokinet.apk "$archive"
else
cp -av daemon/lokinet daemon/lokinet-vpn daemon/lokinet-bootstrap "$base"
# tar dat shiz up yo
Expand Down