forked from nomoresat/DPITunnel-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6243894
Showing
338 changed files
with
106,711 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CD | ||
|
||
on: | ||
release: | ||
types: [created] | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- arch: amd64 | ||
- arch: x86 | ||
- arch: armhf | ||
- arch: arm64 | ||
name: Build on ${{ matrix.arch }} | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Docker | ||
run: | | ||
docker run --rm --privileged multiarch/qemu-user-static:register --reset | ||
- name: Build | ||
run: | | ||
docker run --workdir /github/workspace --rm --entrypoint "./build_static_alpine.sh" -v "$(pwd)":"/github/workspace" multiarch/alpine:${{ matrix.arch }}-v3.14 | ||
- name: Upload Binary | ||
if: github.event_name != 'release' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dpitunnel-cli-${{ matrix.arch }} | ||
path: build/DPITunnel-cli-exec | ||
|
||
- name: Upload Binary to Release | ||
if: github.event_name == 'release' | ||
uses: svenstaro/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: build/DPITunnel-cli-exec | ||
asset_name: dpitunnel-cli-${{ matrix.arch }} | ||
tag: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- arch: amd64 | ||
name: Build on ${{ matrix.arch }} | ||
steps: | ||
- name: Git Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Docker | ||
run: | | ||
docker run --rm --privileged multiarch/qemu-user-static:register --reset | ||
- name: Build | ||
run: | | ||
docker run --workdir /github/workspace --rm --entrypoint "./build_static_alpine.sh" -v "$(pwd)":"/github/workspace" multiarch/alpine:${{ matrix.arch }}-v3.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CMakeLists.txt.user | ||
CMakeCache.txt | ||
CMakeFiles | ||
CMakeScripts | ||
Testing | ||
Makefile | ||
cmake_install.cmake | ||
install_manifest.txt | ||
compile_commands.json | ||
CTestTestfile.cmake | ||
_deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Set the minimum version of CMake that can be used | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
cmake_policy(SET CMP0065 NEW) | ||
|
||
if (STATIC_BINARY) | ||
message("Building static portable binary with small size") | ||
endif () | ||
|
||
|
||
# Set the project name | ||
project(DPITunnel-cli) | ||
|
||
# Add dependencies | ||
add_subdirectory(RawSocket) | ||
add_subdirectory(cpp-httplib) | ||
add_subdirectory(dnslib) | ||
add_subdirectory(libnl) | ||
|
||
# Add an executable | ||
add_executable(DPITunnel-cli-exec | ||
autoconf.cpp | ||
desync.cpp | ||
dns.cpp | ||
dpitunnel-cli.cpp | ||
netiface.cpp | ||
packet.cpp | ||
profiles.cpp | ||
socket.cpp | ||
ssl.cpp | ||
utils.cpp | ||
) | ||
|
||
if (STATIC_BINARY) | ||
target_link_libraries(DPITunnel-cli-exec -static) | ||
target_link_options(DPITunnel-cli-exec PRIVATE "LINKER:--gc-sections") | ||
target_link_options(DPITunnel-cli-exec PRIVATE "LINKER:-s") | ||
target_compile_options(DPITunnel-cli-exec PRIVATE -ffunction-sections) | ||
endif () | ||
|
||
# Set the directories that should be included in the build command for this target | ||
target_include_directories(DPITunnel-cli-exec | ||
PRIVATE | ||
${PROJECT_SOURCE_DIR}/include | ||
${PROJECT_SOURCE_DIR}/RawSocket/include | ||
${PROJECT_SOURCE_DIR}/cpp-httplib/include | ||
${PROJECT_SOURCE_DIR}/dnslib/include | ||
${PROJECT_SOURCE_DIR}/libnl/include | ||
) | ||
|
||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
find_package(Threads REQUIRED) | ||
|
||
if (STATIC_BINARY) | ||
set(OPENSSL_USE_STATIC_LIBS TRUE) | ||
endif () | ||
find_package(OpenSSL REQUIRED) | ||
|
||
target_link_libraries(DPITunnel-cli-exec | ||
RawSocket | ||
cpp-httplib | ||
dnslib | ||
libnl | ||
Threads::Threads | ||
OpenSSL::SSL | ||
OpenSSL::Crypto | ||
) | ||
|
||
if (STATIC_BINARY) | ||
target_link_libraries(DPITunnel-cli-exec ${CMAKE_DL_LIBS}) | ||
endif () |
Oops, something went wrong.