socks4-test 527 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#! /bin/sh

if [ -z "$srcdir" ] ; then
  srcdir=`pwd`
fi

. $srcdir/functions.sh

need_tsocks

SERVERPORT=`expr $PORT + 1`
SOCKSPORT=10080

TSOCKS_CONF_FILE="$srcdir/socks4-config"
export TSOCKS_CONF_FILE

# FIXME: We need to configure tsocks to use a socks server on localhot
# to connect to other servers on localhost.
at_connect $SERVERPORT 1 'grep bar && echo foo' \
    && spawn_lshd \
    && spawn_lsh -D$SOCKSPORT \
22
    && echo bar | tsocks ./tcpconnect localhost $SERVERPORT | grep foo \
23
    && test_success
24 25

test_done