blob: d52b105024c9b483c1df9c1e7d0ef6e3e00d1192 (
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 listen,addr=-:2000 proxy,addr=-:4000 dial,addr=-:3000
tunnel add name S listen,addr=-:3000 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
|