Re: Firewall ftp support?
David A. Ladd (ladd@research.att.com)
Mon, 11 Apr 1994 08:12:33 -0500
> I want to have ange-ftp use a different ftp program "rftp" when
> ange-ftp-local-host-regexp is nil, but NOT go through a gateway host.
> The "rftp" program we use goes through the firewall but since it does
> not work on local hosts, I need to use "ftp" when
> ange-ftp-local-host-regexp is t.
I have struggled with this for a while in various versions of ange-ftp.
It's much easier to write a shell script that decides which ftp to run and
call that ftp.
here it is. Our external ftp is called pftp.
real=`where ftp | tail -1`
proxy=`where pftp`
host=
for i
do
case $i in
-*) opts="$opts $i"; shift;;
[a-z]*) host="$i"; shift;;
esac
done
if [ "$host" = "" ]
then
if [ -f /bin/sun ] && sun
then
/usr/5bin/echo "ftp>\\c"
else
echo "ftp>\\c"
fi
read host
set $host
host=$2
fi
case $host in
*.ncr.com) exec $real $opts $host;;
*.att.com) exec $real $opts $host;;
*.*) exec $proxy $opts $host;;
*) exec $real $opts $host;;
esac