• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

Get Proxy configuration

I am trying to develop a Perl program on Windows, which will be compiled, that would access a remote web page and retrieve a result.

I would like to be able to automatically identify the machine's proxy settings, if present for not to ask a user to modify the program's configuration.

Internet Explorer or Netscape is storing the proxy configuration somewhere, anybody knows how we could get that information and use it?

1 Solution
use Win32::TieRegistry ( Delimiter=>"/", ArrayValues=>1 );
    $Registry->Delimiter("/"); # Set delimiter to "/".    
    $userKey= $Registry->{"CUser/Software/Microsoft/Windows/CurrentVersion/Internet Settings/"};
    $enable = $userKey->GetValue("ProxyEnable");
    $server = $userKey->GetValue("ProxyServer");
    undef $userKey; # Explicit way to close a key.    
    print "Enable:$enable\n";
    print "Proxy server:$server\n";

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now