script iperf

This commit is contained in:
ssrlive 2023-11-13 09:28:07 +08:00
parent 413430f5db
commit ab18d5e78a
2 changed files with 21 additions and 2 deletions

View file

@ -53,3 +53,21 @@ jobs:
args: -- -D warnings args: -- -D warnings
- name: Build - name: Build
run: cargo build --verbose run: cargo build --verbose
iperf:
name: Iperf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- run: sudo apt-get install -y iperf3 dante-server
- run: sudo systemctl stop danted
- run: sudo tests/iperf/test.sh

View file

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
# sudo apt install iperf3 dante-server # sudo apt install iperf3 dante-server
# sudo systemctl stop danted
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo $SCRIPT_DIR echo $SCRIPT_DIR
@ -43,7 +44,7 @@ ip route add 10.0.0.4 dev tun0
# Run iperf client through tun2proxy # Run iperf client through tun2proxy
iperf3 -c 10.0.0.4 iperf3 -c 10.0.0.4
iperf3 -c 10.0.0.4 -R iperf3 -c 10.0.0.4 -R -P 10
# Clean up # Clean up
# sudo ip link del tun0 # sudo sh -c "pkill tun2proxy; pkill iperf3; pkill danted; ip link del tun0; ip netns del test"