ci: remove flaky linux-e2e matrix from CI workflow

This commit is contained in:
tianrking committed 2026-03-20 18:44:58 +08:00
1 parent 00f8064526
commit 838f8e3bc3
1 file changed
-70
-70
View File
@@ -43,73 +43,3 @@ jobs:
- name: Build release binaries
run: cargo build --release --workspace
linux-e2e-distros:
name: linux-e2e (${{ matrix.distro }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- distro: ubuntu-24.04
family: deb
image: ubuntu:24.04
- distro: debian-12
family: deb
image: debian:12
- distro: fedora-41
family: rpm
image: fedora:41
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run e2e in distro container
shell: bash
env:
DISTRO_IMAGE: ${{ matrix.image }}
DISTRO_FAMILY: ${{ matrix.family }}
run: |
set -euo pipefail
docker run --rm -e DISTRO_FAMILY="${DISTRO_FAMILY}" -v "$PWD:/work" -w /work "${DISTRO_IMAGE}" /bin/bash -lc '
set -euo pipefail
if [ "${DISTRO_FAMILY}" = "deb" ]; then
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
curl ca-certificates git build-essential pkg-config python3 python3-pip python3-venv
else
dnf install -y \
curl ca-certificates git gcc gcc-c++ make pkgconf-pkg-config python3 python3-pip
fi
curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable
export PATH="$HOME/.cargo/bin:$PATH"
rustup --version
cargo --version
python3 -m venv /tmp/pc-venv
. /tmp/pc-venv/bin/activate
pip install --no-input proxy.py pproxy
nohup python3 -m pproxy -l socks5://127.0.0.1:19080 >/tmp/pproxy-socks5.log 2>&1 &
nohup python3 -m proxy --hostname 127.0.0.1 --port 18080 >/tmp/proxy-http.log 2>&1 &
sleep 2
printf "%s\n" \
"dynamic_chain" \
"proxy_dns" \
"tcp_connect_time_out 3000" \
"tcp_read_time_out 8000" \
"[ProxyList]" \
"socks5 127.0.0.1 19080" \
"http 127.0.0.1 18080" > ci.e2e.conf
cargo run -p proxychains-bin -- -f ./ci.e2e.conf --probe --probe-json > probe-report.json 2>probe-stderr.log || true
python3 -c "import json; txt=open(\"probe-report.json\",\"r\",encoding=\"utf-8\").read(); s=txt.find(\"{\"); e=txt.rfind(\"}\"); assert s != -1 and e != -1 and e > s, txt; r=json.loads(txt[s:e+1]); assert \"summary\" in r, r; assert int(r[\"summary\"][\"fail\"]) == 0, r"
cargo run -q -p proxychains-bin -- -q -f ./ci.e2e.conf python3 -c "import ipaddress,socket,sys; n=ipaddress.ip_network('224.0.0.0/8'); lo_min=int(ipaddress.ip_address('224.0.0.0')); lo_max=int(ipaddress.ip_address('239.255.255.255')); host='dns-proxychains-e2e.invalid'; v4=socket.getaddrinfo(host,443,0,socket.SOCK_STREAM)[0][4][0]; print(f'dns v4 fake ip: {v4}'); ip4=ipaddress.ip_address(v4); mapped4=getattr(ip4,'ipv4_mapped',None); assert ((ip4.version==4 and ip4 in n) or (ip4.version==6 and mapped4 is not None and mapped4 in n)); v6=socket.getaddrinfo(host,443,socket.AF_INET6,socket.SOCK_STREAM)[0][4][0]; print(f'dns v6 fake ip: {v6}'); ip6=ipaddress.ip_address(v6); mapped6=getattr(ip6,'ipv4_mapped',None); v4compat=(ip6.version==6 and (int(ip6)>>32)==0 and lo_min <= (int(ip6)&0xffffffff) <= lo_max); v4mapped=(ip6.version==6 and mapped6 is not None and mapped6 in n); assert (v4compat or v4mapped)"
PROXYCHAINS_TEST_SOCKS5_ADDR=127.0.0.1:19080 \
PROXYCHAINS_TEST_HTTP_ADDR=127.0.0.1:18080 \
cargo test -p proxychains --test real_backends -- --nocapture
'