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

I have a problem with using a proxy server... as the administrators have installed some form of NTLM Authentication, which means the 'plain text' HTTP_PROXY environment variable mechanism no longer works, nor does the cpan configuration method.

I've been trying to use 'cpan' (the batch file) to install some modules... but I can't seem to get 'cpan' to bypass using the proxy server (this works for other languages, etc when I'm using my own internet from home and drop the corporate VPN connection). When the proxy server was not using the NTLM style of authentication, I had set the configuration with something like:-

cpan> o conf http_proxy 'host.com.au:8080' cpan> o conf commit
..and it worked Ok... but now it doesn't.

Worse, I can't seem to disable the use of the proxy entirely, even when off-line from the VPN. I have ensured there is no HTTP_PROXY defined, both the 'system' and 'personal' Config.pm/MyConfig.pm files do not contain any reference to the proxy server address.. and I've even configured cpan so the CPAN server I'm trying to access is listed in the 'no_proxy' configuration item... but whenever cpan tries to get to the 'module listings' file (like 01mailrc.txt.gz), it times out (HTTP 500 error) when trying to get to the proxy server address. (!?Why is it even trying?)

Downloading the module .gz files and trying to install them 'off-line' (after downloading the files through a web browser) doesn't work... and I fear there will be other module dependency issues anyway... As it is, using 'ppm' or 'cpan' still tries to get the 01mailrc.txt.gz file regardless (and fails 'coz it's still looking for the proxy server address... wherever it's getting it from).

Any suggestions on what to try next?

Using Windows 10 Version 6.3.17134, ActiveState Perl v5.16.3... and the proxy server uses some PAC-style thing to 'rediect' requests (Internet Options points to a corporate .pac file).

Thanks.

Replies are listed 'Best First'.
Re: Cannot Bypass Proxy Server after Removing It from CPAN Config
by jo37 (Curate) on May 08, 2020 at 15:10 UTC

    If your company's network requires a proxy, you cannot just bypass it. In case of a NTLM authenticating proxy, you may install a local proxy that forwards to the official proxy and does not require authentication locally. Take a look at CNTLM. I'm using it on my business PC (Win 10) for internet access from within Cygwin to solve this issue.

    Greetings,
    -jo

    $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$