This commit is contained in:
darkclip committed 2023-07-22 00:20:09 +08:00
1 parent d3c58e8a36
commit 369b91843c
4 files changed
+76 -8

No files matched your search

+23 -4
View File
@@ -40,10 +40,29 @@ jobs:
run: rm target/*
- name: Rebuild target branch
run: |
./netgen.py ref/china.txt -o target/china.sh -p 'ip route add ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py ref/china6.txt -o target/china6.sh -p 'ip route add ' -s $' dev eth0 via fe80::6a77:24ff:fed6:809d || true\n'
./netgen.py ref/china.txt -o target/rm-china.sh -p 'ip route del ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py ref/china6.txt -o target/rm-china6.sh -p 'ip route del ' -s $' dev eth0 via fe80::6a77:24ff:fed6:809d || true\n'
echo 'iptables -t nat -A POSTROUTING -o wgcf -j MASQUERADE || true' >> target/wgcf-up.sh
echo 'ip6tables -t nat -A POSTROUTING -o wgcf -j MASQUERADE || true' >> target/wgcf-up.sh
echo 'ip route add 188.114.96.0/22 dev eth0 || true' >> target/wgcf-up.sh
echo 'ip route add 2606:4700:d0::/47 dev eth0 || true' >> target/wgcf-up.sh
echo 'ip route add 1.1.1.1/32 dev wgcf || true' >> target/wgcf-up.sh
echo 'ip route add 0.0.0.0/1 dev wgcf || true' >> target/wgcf-up.sh
echo 'ip route add 128.0.0.0/1 dev wgcf || true' >> target/wgcf-up.sh
echo 'ip route add ::/1 dev wgcf || true' >> target/wgcf-up.sh
echo 'ip route add 8000::/1 dev wgcf || true' >> target/wgcf-up.sh
./netgen.py ref/china.txt -o target/wgcf-up.sh -p 'ip route add ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py ref/china6.txt -o target/wgcf-up.sh -p 'ip route add ' -s $' dev eth0 via fe80::6a77:24ff:fed6:809d || true\n'
echo 'iptables -t nat -D POSTROUTING -o wgcf -j MASQUERADE || true' >> target/wgcf-down.sh
echo 'ip6tables -t nat -D POSTROUTING -o wgcf -j MASQUERADE || true' >> target/wgcf-down.sh
echo 'ip route del 188.114.96.0/22 dev eth0 || true' >> target/wgcf-down.sh
echo 'ip route del 2606:4700:d0::/47 dev eth0 || true' >> target/wgcf-down.sh
echo 'ip route del 1.1.1.1/32 dev wgcf || true' >> target/wgcf-down.sh
echo 'ip route del 0.0.0.0/1 dev wgcf || true' >> target/wgcf-down.sh
echo 'ip route del 128.0.0.0/1 dev wgcf || true' >> target/wgcf-down.sh
echo 'ip route del ::/1 dev wgcf || true' >> target/wgcf-down.sh
echo 'ip route del 8000::/1 dev wgcf || true' >> target/wgcf-down.sh
./netgen.py ref/china.txt -o target/wgcf-down.sh -p 'ip route del ' -s $' dev eth0 via 10.11.0.1 || true\n'
./netgen.py ref/china6.txt -o target/wgcf-down.sh -p 'ip route del ' -s $' dev eth0 via fe80::6a77:24ff:fed6:809d || true\n'
cp cf-watch.sh target/
cd target
chmod +x *.sh
tar -cf sha.tar *.sh