| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 | #! /bin/sh# Wrapper script for use of the tsocks(8) transparent socksification library# See the tsocks(1) and torify(1) manpages.# Copyright (c) 2004, 2006 Peter Palfrader# Modified by Jacob Appelbaum <jacob@appelbaum.net> April 16th 2006# May be distributed under the same terms as Tor itself# Define and ensure we have tsocks# XXX: what if we don't have which?TSOCKS="`which tsocks`"if [ ! -x "$TSOCKS" ]then        echo "$0: Can't find tsocks in PATH. Perhaps you haven't installed it?" >&2        exit 1fi# Check for any argument listif [ "$#" = 0 ]then        echo "Usage: $0 <command> [<options>...]" >&2        exit 1fiif [ "$#" = 1 ] && ( [ "$1" = "-h" ] || [ "$1" = "--help" ] )then        echo "Usage: $0 <command> [<options>...]"        exit 0fi# Define our tsocks config fileTSOCKS_CONF_FILE="@CONFDIR@/tor-tsocks.conf"export TSOCKS_CONF_FILE# Check that we've got a tsocks config fileif [ -r "$TSOCKS_CONF_FILE" ]then	exec tsocks "$@"	echo "$0: Failed to exec tsocks $@" >&2	exit 1else	echo "$0: Missing tsocks configuration file \"$TSOCKS_CONF_FILE\"." >&2	exit 1fi
 |