Debian Codegraph @

src/testsuite/socks5-test

raw
1 #! /bin/sh
2
3 if [ -z "$srcdir" ] ; then
4 srcdir=`pwd`
5 fi
6
7 . $srcdir/functions.sh
8
9 need_tsocks
10
11 SERVERPORT=`expr $PORT + 1`
12 SOCKSPORT=10080
13
14 TSOCKS_CONF_FILE="$srcdir/socks5-config"
15 export TSOCKS_CONF_FILE
16
17 # FIXME: We need to configure tsocks to use a socks server on localhot
18 # to connect to other servers on localhost.
19 at_connect $SERVERPORT 1 'grep bar && echo foo' \
20 && spawn_lshd \
21 && spawn_lsh -D$SOCKSPORT \
22 && echo bar | tsocks ./tcpconnect localhost $SERVERPORT | grep foo \
23 && test_success
24
25 test_done