http://www.perlmonks.org?node_id=394737


in reply to Forcing CPAN.pm to ignore LWP/Net::FTP and use wget/lynx etc

You are going to get the benefit of my having hacked through this one a few weeks ago! I wish I, then, had been you, now :-). Finally I am going to get some XP points! Woo-hoo! Oops, I mean, Ommmmmmmmm <glances nervously at head monk>.

Here's what you need for LWP to work with an authenticated proxy (assumes bash):

export ftp_proxy=proxyuserid:proxypass@ftpproxy.foo.com:21 export http_proxy=http://proxyuserid:proxypass@httpproxy.foo.com:9090

(Change proxyuserid, proxypass, 9090, and the addresses as appropriate.)

This also assumes there is a call like $ua->env_proxy; in LWP by default (making LWP pay attention to those environment variables by default), which I believe there is.

Let us know if you figure out Net::FTP. I ended up using ncftpget and wget, and hand editing the CPAN file to make it try those first, as someone else described.

Here are the settings for ncftpget:

# ncftpget proxy settings; put in ~/.ncftp/firewall # ftp only firewall-type=2 firewall-host=hostname.com firewall-user=userid firewall-password=whatever firewall-port=21 firewall-exception-list=.foo.com,localhost,localdomain
And this is what I have for wget:

# put in .wgetrc file: http_proxy = http://wwwproxy.foo.com:9090/ ftp_proxy = ftpproxy.foo.com:21 # ftp untested use_proxy = on proxy-user=userid proxy-passwd=passwd