summaryrefslogtreecommitdiff
path: root/test/auth.sh
diff options
context:
space:
mode:
authorMikhail Osipov <mike.osipov@gmail.com>2020-02-23 17:13:30 +0300
committerMikhail Osipov <mike.osipov@gmail.com>2020-02-23 17:13:30 +0300
commit313241616373ad01413e20758b6edb36afc2762b (patch)
tree8e7b46c117509f70e08294b7b29dce9255385645 /test/auth.sh
parentd3e48b2676c70ef20c33d70220c4a4b22f3a0e5b (diff)
auth simple test
Diffstat (limited to 'test/auth.sh')
-rwxr-xr-xtest/auth.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/auth.sh b/test/auth.sh
new file mode 100755
index 0000000..4f822c3
--- /dev/null
+++ b/test/auth.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+ROOT=$(dirname $0)/..
+PATH=$PATH:$ROOT/cmd/tunnel
+
+tunnel add name T 2000,listen auth 3000
+tunnel add name X 3000,listen - auth 4000
+tunnel var set tunnel.T.secret secret
+tunnel var set tunnel.X.secret secret
+nc -l 4000 &
+echo "Hello, World!" | nc -N localhost 2000
+tunnel var clear
+tunnel del T
+tunnel del X