diff --git a/.github/workflows/format-build.yml b/.github/workflows/format-build.yml index 6fefc0f..9469bf9 100644 --- a/.github/workflows/format-build.yml +++ b/.github/workflows/format-build.yml @@ -53,3 +53,21 @@ jobs: args: -- -D warnings - name: Build 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 diff --git a/tests/iperf/test.sh b/tests/iperf/test.sh index cea9fc2..6332152 100755 --- a/tests/iperf/test.sh +++ b/tests/iperf/test.sh @@ -1,6 +1,7 @@ #!/bin/bash # sudo apt install iperf3 dante-server +# sudo systemctl stop danted SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" echo $SCRIPT_DIR @@ -43,7 +44,7 @@ ip route add 10.0.0.4 dev tun0 # Run iperf client through tun2proxy iperf3 -c 10.0.0.4 -iperf3 -c 10.0.0.4 -R +iperf3 -c 10.0.0.4 -R -P 10 # Clean up -# sudo ip link del tun0 +# sudo sh -c "pkill tun2proxy; pkill iperf3; pkill danted; ip link del tun0; ip netns del test"