summaryrefslogtreecommitdiff
path: root/test/auth.sh
blob: 3e7f3d41bfd48dc474715c6d3a8dd71a6ced7b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

ROOT=$(dirname $0)/..
PATH=$ROOT/cmd/tunnel:$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
nc -l 4000 &
echo "Hello, World!" | nc -N localhost 2000
wait
tunnel clear
tunnel del T
tunnel del X