diff --git a/.gitattributes b/.gitattributes index 9a5991388..40b418198 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,4 @@ external/date/test export-ignore external/nlohmann/doc export-ignore external/nlohmann/test export-ignore external/nlohmann/benchmarks/data export-ignore +*.signed binary diff --git a/.gitignore b/.gitignore index 27e57ba86..d0dfc9844 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,8 @@ callgrind.* *.sig *.signed +!/contrib/bootstrap/mainnet.signed +!/contrib/bootstrap/testnet.signed *.key shadow.data diff --git a/cmake/StaticBuild.cmake b/cmake/StaticBuild.cmake index adf00bc0f..6b000a8ef 100644 --- a/cmake/StaticBuild.cmake +++ b/cmake/StaticBuild.cmake @@ -388,6 +388,7 @@ foreach(curl_arch ${curl_arches}) --disable-progress-meter --without-brotli --with-zlib=${DEPS_DESTDIR} ${curl_ssl_opts} --without-libmetalink --without-librtmp --disable-versioned-symbols --enable-hidden-symbols --without-zsh-functions-dir --without-fish-functions-dir + --without-nghttp3 --without-zstd "CC=${deps_cc}" "CFLAGS=${deps_noarch_CFLAGS}${cflags_extra}" ${curl_extra} BUILD_COMMAND true INSTALL_COMMAND ${_make} -C lib install && ${_make} -C include install diff --git a/cmake/win32_installer_deps.cmake b/cmake/win32_installer_deps.cmake index f928a5e60..95ea1aedf 100644 --- a/cmake/win32_installer_deps.cmake +++ b/cmake/win32_installer_deps.cmake @@ -5,17 +5,12 @@ endif() set(TUNTAP_URL "https://build.openvpn.net/downloads/releases/latest/tap-windows-latest-stable.exe") set(TUNTAP_EXE "${CMAKE_BINARY_DIR}/tuntap-install.exe") -set(BOOTSTRAP_URL "https://seed.lokinet.org/lokinet.signed") -set(BOOTSTRAP_FILE "${CMAKE_BINARY_DIR}/bootstrap.signed") +set(BOOTSTRAP_FILE "${PROJECT_SOURCE_DIR}/contrib/bootstrap/mainnet.signed") file(DOWNLOAD ${TUNTAP_URL} ${TUNTAP_EXE}) -file(DOWNLOAD - ${BOOTSTRAP_URL} - ${BOOTSTRAP_FILE}) - file(DOWNLOAD ${GUI_ZIP_URL} ${CMAKE_BINARY_DIR}/lokinet-gui.zip @@ -26,7 +21,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf ${CMAKE_BINARY_DIR}/lokinet-g install(DIRECTORY ${CMAKE_BINARY_DIR}/gui DESTINATION share COMPONENT gui) install(PROGRAMS ${TUNTAP_EXE} DESTINATION bin COMPONENT tuntap) -install(FILES ${BOOTSTRAP_FILE} DESTINATION share COMPONENT lokinet) +install(FILES ${BOOTSTRAP_FILE} DESTINATION share COMPONENT lokinet RENAME bootstrap.signed) set(CPACK_PACKAGE_INSTALL_DIRECTORY "Lokinet") set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/win32-setup/lokinet.ico") diff --git a/contrib/bootstrap/mainnet.signed b/contrib/bootstrap/mainnet.signed new file mode 100644 index 000000000..4dabc8e93 Binary files /dev/null and b/contrib/bootstrap/mainnet.signed differ diff --git a/contrib/bootstrap/testnet.signed b/contrib/bootstrap/testnet.signed new file mode 100644 index 000000000..9ad107115 --- /dev/null +++ b/contrib/bootstrap/testnet.signed @@ -0,0 +1 @@ +d1:ald1:ci2e1:d3:iwp1:e32:9ãxÚsX«l%ìû€ê<,sØ›”•©÷ïå_1:i21:::ffff:144.76.164.2021:pi1666e1:vi0eee1:i5:gamma1:k32:ÞÊðòm=o›„ZÐ1ÿßmcŒ%»¸ÿû¾™SĹ1:p32:!EÏâéz˜ý:Š‹úý… /0¡Ú„ Ãݪ„µNçB1:rli0ei0ei8ei3ee1:ui1614788310454e1:vi0e1:xle1:z64:Œ¤u G¿”D“=Œxµ¢{ïÌ51þ`í߀ùEâw m)q2Øg¯±˜øš ï³À)˜TÑP•´ò³ö—Á1e \ No newline at end of file diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt index e2e725d74..1eea3132a 100644 --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -1,3 +1,8 @@ +set(DEFAULT_WITH_BOOTSTRAP ON) +if(APPLE) + set(DEFAULT_WITH_BOOTSTRAP OFF) +endif() +option(WITH_BOOTSTRAP "build lokinet-bootstrap tool" ${DEFAULT_WITH_BOOTSTRAP}) add_executable(lokinet-vpn lokinet-vpn.cpp) if(APPLE) @@ -5,8 +10,12 @@ if(APPLE) enable_lto(lokinet) else() add_executable(lokinet lokinet.cpp) - add_executable(lokinet-bootstrap lokinet-bootstrap.cpp) - enable_lto(lokinet lokinet-vpn lokinet-bootstrap) + enable_lto(lokinet lokinet-vpn) + + if(WITH_BOOTSTRAP) + add_executable(lokinet-bootstrap lokinet-bootstrap.cpp) + enable_lto(lokinet-bootstrap) + endif() endif() @@ -30,7 +39,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") endif() endif() -if(NOT APPLE) +if(WITH_BOOTSTRAP) target_link_libraries(lokinet-bootstrap PUBLIC cpr::cpr) if(NOT WIN32) find_package(OpenSSL REQUIRED) @@ -40,7 +49,7 @@ if(NOT APPLE) endif() set(exetargets lokinet lokinet-vpn) -if(NOT APPLE) +if(WITH_BOOTSTRAP) list(APPEND exetargets lokinet-bootstrap) endif() @@ -79,10 +88,9 @@ if(APPLE) DEPENDS ${PROJECT_SOURCE_DIR}/contrib/lokinet.svg ${PROJECT_SOURCE_DIR}/contrib/macos/mk-icns.sh) add_custom_target(icons DEPENDS ${mac_icon}) add_dependencies(lokinet icons lokinet-extension) - file(DOWNLOAD "https://seed.lokinet.org/lokinet.signed" ${CMAKE_CURRENT_BINARY_DIR}/bootstrap.signed) add_custom_command(TARGET lokinet POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/bootstrap.signed + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/contrib/bootstrap/mainnet.signed $/Contents/Resources/bootstrap.signed COMMAND mkdir -p $/Contents/PlugIns COMMAND cp -a $ $/Contents/PlugIns/