summaryrefslogtreecommitdiff
path: root/test/auth.sh
diff options
context:
space:
mode:
authorMikhail Osipov <mike.osipov@gmail.com>2021-09-22 02:51:33 +0300
committerMikhail Osipov <mike.osipov@gmail.com>2021-09-22 12:45:07 +0300
commitd9b9516ed6a372b1270011c2177681a9713c9d31 (patch)
tree79a3a0c37998d494d4a8a3983fb57af10252b228 /test/auth.sh
parent3c9f376276c4f59bfaf93195441cde402fb1d333 (diff)
auth: via file
Diffstat (limited to 'test/auth.sh')
-rwxr-xr-xtest/auth.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/auth.sh b/test/auth.sh
index d8a1dee..608b4fd 100755
--- a/test/auth.sh
+++ b/test/auth.sh
@@ -1,12 +1,22 @@
#!/bin/bash
+FILE=`mktemp`
+
+cat > $FILE <<EOF
+T t
+X x
+EOF
+
+trap 'unlink $FILE' EXIT
+
ROOT=$(dirname $0)/..
PATH=$ROOT/bin:$PATH
-tunnel add name T listen,addr=-:2000 auth aes dial,addr=-:3000
-tunnel add name X listen,addr=-:3000 -aes -auth dial,addr=-:4000
-tunnel set tunnel.T.secret secret
-tunnel set tunnel.X.secret secret
+tunnel add name T listen,addr=%2000 auth dump aes dial,addr=%3000
+tunnel add name X listen,addr=%3000 /aes /auth dial,addr=%4000
+tunnel set authfile $FILE
+tunnel set tunnel.T.authuser T
+tunnel set tunnel.X.authuser X
nc -l 4000 &
echo "Hello, World!" | nc -N localhost 2000
wait