syn- Asked: 2010-04-09 12:10:33 +0800 CST2010-04-09 12:10:33 +0800 CST 2010-04-09 12:10:33 +0800 CST Force CPAN to download via HTTP (skipping proxy) 772 I'm about to lose my mind. How in the world do you tell CPAN to download via HTTP only? ...and NOT via a proxy. http perl cpan 5 Answers Voted Altreus 2011-07-22T06:29:48+08:002011-07-22T06:29:48+08:00 Simplest way of having it not use FTP is to shove HTTP URLs on the front of your urllist - or replace it completely like sebastionopilla said. You can do it from inside the cpan shell too: o conf urllist unshift http://some.cpan.mirror/here/ You can use o conf urllist - o conf urllist shift to empty it first if you wish. Use o conf no_proxy 1 to turn off the proxy. Use o conf commit to save the config Jason 2010-04-09T14:54:34+08:002010-04-09T14:54:34+08:00 Try these: Before running cpan: export -n http_proxy In the cpan shell: o conf http_proxy '' To save your modified cpan config: o conf commit That will disable any http proxy CPAN is configured to use. Sebastiano Pilla 2010-10-25T12:28:26+08:002010-10-25T12:28:26+08:00 Try putting only HTTP URLs in your CPAN's Config.pm file, like: 'urllist' => [q[http://cpan.cict.fr/], q[http://cpan.enstimac.fr/], q[http://mirrors4.kernel.org/cpan/]], I routinely do this and as far as I can see there's no FTP traffic to any CPAN mirror. Jim 2011-04-20T12:55:46+08:002011-04-20T12:55:46+08:00 cpan[1]> o conf /proxy/ cpan[2]> o conf no_proxy 1 cpan[3]> o conf commit Set proxy username and password: cpan[4]> o conf proxy_user your_username cpan[5]> o conf proxy_pass your_password cpan[6]> o conf commit toshiro 2010-04-17T09:57:55+08:002010-04-17T09:57:55+08:00 If you don't want to use a cpan shell, you can also edit your cpan config file with a text editor, in unix systems it's here: ~/.cpan/CPAN/MyConfig.pm Of course, the field to change in your particular question is 'http_proxy'.
Simplest way of having it not use FTP is to shove HTTP URLs on the front of your urllist - or replace it completely like sebastionopilla said. You can do it from inside the cpan shell too:
You can use
to empty it first if you wish.
Use
to turn off the proxy.
Use
to save the config
Try these:
export -n http_proxy
o conf http_proxy ''
o conf commit
That will disable any http proxy CPAN is configured to use.
Try putting only HTTP URLs in your CPAN's Config.pm file, like:
I routinely do this and as far as I can see there's no FTP traffic to any CPAN mirror.
Set proxy username and password:
If you don't want to use a cpan shell, you can also edit your cpan config file with a text editor, in unix systems it's here:
~/.cpan/CPAN/MyConfig.pm
Of course, the field to change in your particular question is 'http_proxy'.