Add end-to-end test for ss-redir transparent proxy via QEMU

Boot a minimal Alpine Linux guest in QEMU with iptables, ss-redir, and
ss-nat to verify the full transparent proxy chain: iptables REDIRECT →
ss-redir → ss-server (host) → internet. The host-built ss-redir binary
and its shared library dependencies are copied into the Alpine rootfs,
avoiding static linking issues. Uses QEMU user-mode networking with KVM
acceleration when available. Linux-only CI step with 8-minute timeout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Max Lv
2026-02-07 19:01:32 +08:00
co-authored by Claude Opus 4.6
parent 5c2d0e43fa
commit 14b5544634
4 changed files with 488 additions and 0 deletions
+7
View File
@@ -45,3 +45,10 @@ jobs:
- name: Stress test
run: |
python3 tests/stress_test.py --bin build/shared/bin/ --size 10
- name: ss-redir transparent proxy test (QEMU)
if: runner.os == 'Linux'
run: |
sudo apt-get install -y qemu-system-x86
bash tests/test_redir_qemu.sh build/shared/bin/
timeout-minutes: 8