summaryrefslogtreecommitdiff
path: root/test/proxy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/proxy.sh')
-rwxr-xr-xtest/proxy.sh15
1 files changed, 15 insertions, 0 deletions
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