From b953ca1b6451bfa7e3f831c386c8f2f64a25bc12 Mon Sep 17 00:00:00 2001 From: darkclip Date: Tue, 25 Jul 2023 17:33:59 +0800 Subject: [PATCH] update --- .github/workflows/build-sha.yml | 8 ++++---- cf-watch.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-sha.yml b/.github/workflows/build-sha.yml index 10da0d7d..80b4f1e1 100644 --- a/.github/workflows/build-sha.yml +++ b/.github/workflows/build-sha.yml @@ -42,8 +42,8 @@ jobs: run: | 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 188.114.96.0/22 dev eth0 via 10.11.0.1 || true' >> target/wgcf-up.sh + echo 'ip route add 2606:4700:d0::/47 dev eth0 via fe80::6a77:24ff:fed6:809d || 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 @@ -53,8 +53,8 @@ jobs: ./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 188.114.96.0/22 dev eth0 via 10.11.0.1 || true' >> target/wgcf-down.sh + echo 'ip route del 2606:4700:d0::/47 dev eth0 via fe80::6a77:24ff:fed6:809d || 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 diff --git a/cf-watch.sh b/cf-watch.sh index e55d1006..70c5e649 100755 --- a/cf-watch.sh +++ b/cf-watch.sh @@ -6,7 +6,7 @@ get_rnd(){ }; get_ping_loss(){ - loss_percent=$(ping -c 5 -q $1 | awk '/packet loss/{print $7}'); + loss_percent=$(ping -c 5 -q $1 | awk '/packet loss/{print $6}'); echo ${loss_percent%?}; return $?; };