mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-04-30 07:32:17 +00:00
monorepo: combine vpnhide-zygisk, vpnhide (lsposed), and vpnhide-kmod
Unified repository for the complete Android VPN-hiding stack: - zygisk/ — Rust Zygisk module (inline libc hooks via shadowhook) - lsposed/ — Kotlin LSPosed module (Java API + system_server hooks) - kmod/ — C kernel module (kretprobe hooks, invisible to anti-tamper) CI workflows use path filters to build only the changed component.
This commit is contained in:
commit
12daca5c1a
54 changed files with 11342 additions and 0 deletions
128
.github/workflows/kmod.yml
vendored
Normal file
128
.github/workflows/kmod.yml
vendored
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
name: Kmod
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'kmod/**'
|
||||
- '.github/workflows/kmod.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'kmod/**'
|
||||
- '.github/workflows/kmod.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
gki:
|
||||
- branch: android14-6.1
|
||||
symvers: kmod/symvers/android14-6.1.symvers
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
bc kmod clang lld llvm \
|
||||
binutils-aarch64-linux-gnu
|
||||
|
||||
- name: Cache kernel source
|
||||
uses: actions/cache@v4
|
||||
id: kernel-cache
|
||||
with:
|
||||
path: kernel-source
|
||||
key: kernel-${{ matrix.gki.branch }}-v1
|
||||
|
||||
- name: Clone kernel source (shallow)
|
||||
if: steps.kernel-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone --depth=1 -b ${{ matrix.gki.branch }} \
|
||||
https://android.googlesource.com/kernel/common \
|
||||
kernel-source
|
||||
|
||||
- name: Prepare kernel source
|
||||
run: |
|
||||
cd kernel-source
|
||||
|
||||
make ARCH=arm64 LLVM=1 LLVM_IAS=1 \
|
||||
CROSS_COMPILE=aarch64-linux-gnu- \
|
||||
gki_defconfig
|
||||
|
||||
touch abi_symbollist.raw
|
||||
|
||||
make ARCH=arm64 LLVM=1 LLVM_IAS=1 \
|
||||
CROSS_COMPILE=aarch64-linux-gnu- \
|
||||
olddefconfig prepare || true
|
||||
|
||||
clang -E -Wp,-MD,scripts/.module.lds.d -nostdinc \
|
||||
-I arch/arm64/include -I arch/arm64/include/generated \
|
||||
-I include -I include/generated \
|
||||
-include include/linux/kconfig.h \
|
||||
-D__KERNEL__ -DCC_USING_PATCHABLE_FUNCTION_ENTRY \
|
||||
--target=aarch64-linux-gnu -x c scripts/module.lds.S \
|
||||
2>/dev/null | grep -v '^#' > scripts/module.lds
|
||||
sed -i 's/((1UL) << 12)/4096/g' scripts/module.lds
|
||||
|
||||
cp "$GITHUB_WORKSPACE/${{ matrix.gki.symvers }}" Module.symvers
|
||||
|
||||
PLACEHOLDER="6.1.999-placeholder-$(printf 'x%.0s' $(seq 1 100))"
|
||||
echo "#define UTS_RELEASE \"$PLACEHOLDER\"" \
|
||||
> include/generated/utsrelease.h
|
||||
echo -n "$PLACEHOLDER" > include/config/kernel.release
|
||||
|
||||
- name: Build kernel module
|
||||
run: |
|
||||
make -C kernel-source M=$GITHUB_WORKSPACE/kmod \
|
||||
ARCH=arm64 LLVM=1 LLVM_IAS=1 \
|
||||
CROSS_COMPILE=aarch64-linux-gnu- \
|
||||
modules
|
||||
ls -lh kmod/vpnhide_kmod.ko
|
||||
|
||||
- name: Package KSU module zip
|
||||
id: package
|
||||
run: |
|
||||
cp kmod/vpnhide_kmod.ko kmod/module/
|
||||
ZIPNAME="vpnhide-kmod-${{ matrix.gki.branch }}.zip"
|
||||
(cd kmod/module && zip -qr "../../$ZIPNAME" .)
|
||||
ls -lh "$ZIPNAME"
|
||||
echo "zipname=$ZIPNAME" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: vpnhide-kmod-${{ matrix.gki.branch }}
|
||||
path: vpnhide-kmod-${{ matrix.gki.branch }}.zip
|
||||
if-no-files-found: error
|
||||
|
||||
release:
|
||||
needs: build
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: dist/
|
||||
merge-multiple: true
|
||||
|
||||
- name: Generate checksums
|
||||
run: |
|
||||
cd dist
|
||||
for f in *.zip; do sha256sum "$f" > "${f}.sha256"; done
|
||||
|
||||
- name: Upload release assets
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
files: |
|
||||
dist/*.zip
|
||||
dist/*.sha256
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue