summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/auth.sh1
-rwxr-xr-xtest/proxy.sh15
2 files changed, 16 insertions, 0 deletions
diff --git a/test/auth.sh b/test/auth.sh
index 58b1180..66855e2 100755
--- a/test/auth.sh
+++ b/test/auth.sh
@@ -9,6 +9,7 @@ tunnel set tunnel.T.secret secret
tunnel set tunnel.X.secret secret
nc -l 4000 &
echo "Hello, World!" | nc -N localhost 2000
+wait
tunnel clear
tunnel del T
tunnel del X
diff --git a/test/proxy.sh b/test/proxy.sh
new file mode 100755
index 0000000..ec513fe
--- /dev/null
+++ b/test/proxy.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+ROOT=$(dirname $0)/..
+PATH=$ROOT/cmd/tunnel:$PATH
+
+tunnel add name C 2000,listen proxy,addr=localhost:4000 3000
+tunnel add name S 3000,listen proxy
+tunnel set tunnel.C.proxy.auth user:password
+tunnel set tunnel.S.proxy.auth user:password
+nc -l 4000 &
+echo "Hello, World!" | nc -N localhost 2000
+wait
+tunnel clear
+tunnel del C
+tunnel del S