diff options
Diffstat (limited to 'test/auth.sh')
| -rwxr-xr-x | test/auth.sh | 18 |
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 |
