diff --git a/.gitmodules b/.gitmodules index 4519378c..eff1f8ca 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "tunnel/tools/wireguard-tools"] - path = tunnel/tools/wireguard-tools - url = https://github.com/amnezia-vpn/amnezia-wg-tools +[submodule "tunnel/tools/amneziawg-tools"] + path = tunnel/tools/amneziawg-tools + url = https://github.com/amnezia-vpn/amneziawg-tools [submodule "tunnel/tools/elf-cleaner"] path = tunnel/tools/elf-cleaner url = https://github.com/termux/termux-elf-cleaner diff --git a/tunnel/tools/CMakeLists.txt b/tunnel/tools/CMakeLists.txt index 490a1755..74c58bd8 100644 --- a/tunnel/tools/CMakeLists.txt +++ b/tunnel/tools/CMakeLists.txt @@ -3,18 +3,18 @@ # Copyright © 2017-2023 WireGuard LLC. All Rights Reserved. cmake_minimum_required(VERSION 3.4.1) -project("WireGuard") +project("AmneziaWG") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") add_link_options(LINKER:--build-id=none) add_compile_options(-Wall -Werror) -add_executable(libwg-quick.so wireguard-tools/src/wg-quick/android.c ndk-compat/compat.c) +add_executable(libwg-quick.so amneziawg-tools/src/wg-quick/android.c ndk-compat/compat.c) target_compile_options(libwg-quick.so PUBLIC -std=gnu11 -include ${CMAKE_CURRENT_SOURCE_DIR}/ndk-compat/compat.h -DWG_PACKAGE_NAME=\"${ANDROID_PACKAGE_NAME}\") target_link_libraries(libwg-quick.so -ldl) -file(GLOB WG_SOURCES wireguard-tools/src/*.c ndk-compat/compat.c) +file(GLOB WG_SOURCES amneziawg-tools/src/*.c ndk-compat/compat.c) add_executable(libwg.so ${WG_SOURCES}) -target_include_directories(libwg.so PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/wireguard-tools/src/uapi/linux/" "${CMAKE_CURRENT_SOURCE_DIR}/wireguard-tools/src/") +target_include_directories(libwg.so PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/amneziawg-tools/src/uapi/linux/" "${CMAKE_CURRENT_SOURCE_DIR}/amneziawg-tools/src/") target_compile_options(libwg.so PUBLIC -std=gnu11 -include ${CMAKE_CURRENT_SOURCE_DIR}/ndk-compat/compat.h -DRUNSTATEDIR=\"/data/data/${ANDROID_PACKAGE_NAME}/cache\") add_custom_target(libwg-go.so WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libwg-go" COMMENT "Building wireguard-go" VERBATIM COMMAND "${ANDROID_HOST_PREBUILTS}/bin/make" diff --git a/tunnel/tools/amneziawg-tools b/tunnel/tools/amneziawg-tools new file mode 160000 index 00000000..af245c00 --- /dev/null +++ b/tunnel/tools/amneziawg-tools @@ -0,0 +1 @@ +Subproject commit af245c000edad1fd4865340bdb516beb8530bb98 diff --git a/tunnel/tools/wireguard-tools b/tunnel/tools/wireguard-tools deleted file mode 160000 index c9ff85e9..00000000 --- a/tunnel/tools/wireguard-tools +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c9ff85e9edbb424de2535e286108dd73e45c5a5e