Da_Mad_CoWw has asked for the wisdom of the Perl Monks concerning the following question:


Hi all,

I've got the following problem : I'm trying from a Unix to connect trough a proxyserver ( not a firewall )to an external FTP( ftp.nai.com) site using the Net::FTP module.But apparently the I'm not able to pass on my login and password to the proxy When I use the Win32::Internet module, all works fine, but using when the Net::FTP module I can't get it to work

##REM a01 Download dat-files virusscan McAfee
$ftp=Net::FTP->new("ftpwinproxy.domain.be",Debug => 1)|| die "$@ can't connect\n";

$ftp->login('anonymous@ftp.nai.com','user@mail.com');

$ftp->binary();

I'm able to establish a new connection, but that's as far as it gets.And I really need to get it to work on a Unix machine , windows is not an option.Has anybody got an idea how I can get this to work?

thx in advance


Da Mad CoWw

Replies are listed 'Best First'.
Re: FTP using a proxy and Net::FTP
by Limbic~Region (Chancellor) on Jun 07, 2004 at 13:56 UTC
    Da_Mad_CoWw,
    It depends on the proxy, but Net::FTP does have the Firewall and FirewallType options which are for FTP proxies.

    Some proxies are more transparent than others, so you will have to play with the options to get it to work but it is in The Friendly Manual.

    Cheers - L~R
      Don't forget the authorize method.