Browse Source

Add more tests to test.sh

master
Travis Burtrum 3 years ago
parent
commit
a9f7daf823
  1. 2
      README.md
  2. 7
      test.sh

2
README.md

@ -8,9 +8,9 @@ Proxy wireguard UDP packets over TCP/TLS @@ -8,9 +8,9 @@ Proxy wireguard UDP packets over TCP/TLS
Testing:
`udp-test` is a utility to send a UDP packet and then receive a UDP packet and ensure they are the same, this verifies packets sent through proxy/proxyd are unmolested
`test.sh` runs udp-test against itself and then through proxyd/proxy
`udp-test -s` runs udp-test against itself through proxyd/proxy by spawning actual binaries
`udp-test -is` runs udp-test against itself through proxyd/proxy in same executable by using library, so does not test command line parsing etc
`test.sh` runs udp-test against itself, then the udp-test self tests above, and then through proxyd/proxy in the shell script
Testing with GNU netcat:

7
test.sh

@ -1,8 +1,15 @@ @@ -1,8 +1,15 @@
#!/bin/sh
set -x
# first make sure udp-test succeeds running against itself
cargo run --release --bin udp-test || exit 1
# now run udp-test without spawning other processes
cargo run --release --bin udp-test -- -is || exit 1
# now run udp-test essentially just like the script below, but all in rust
cargo run --release --bin udp-test -- -s || exit 1
# now run proxyd pointing to udp-test
cargo run --release --bin wireguard-proxyd -- 127.0.0.1:5555 127.0.0.1:51822 &
proxyd_pid=$!

Loading…
Cancel
Save