summaryrefslogtreecommitdiff
path: root/test/proxy.sh
blob: ec513fed6ceee8020e5bb30bae2972fa104aa7f4 (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 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