IE proxy settings extension

TK Soh teekaysoh at gmail.com
Fri Nov 5 02:06:21 CDT 2010


On Thu, Nov 4, 2010 at 8:26 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 11/03/2010 10:46 PM, Steve Borho wrote:
>>
>> Attached is an extension that I've just written with the intention of
>> automatically reading proxy settings from the Internet Explorer's
>> registry configuration.   In many corporate environments, proxies are
>> configured to be discovered by DHCP and friends.  If the user enables
>> this extension, Mercurial will also autodetect these settings and
>> stuff "just works".
>>
>> I've run it on my Windows machines, but I do not use proxies so it
>> doesn't do much. I'm hoping some people who do use proxies can test
>> this for me and give me some feedback on what works and what doesn't.
>>
>> You can either run this as a standalone script, or enable it as an
>> extension and try some command line hg commands.
>
> Here be dragons...
>
> I had to do something like what is attached in order to make proxy detection
> work reliably on windows in corporate environments. It is so big and ugly
> that I don't think it belongs in core Mercurial, but an extension would be
> fine.
>
> Feel free to use the attached code, but please let me know if you have
> comments or fixes to it.
>
> (The next problem once the proxy has been detected is to get transparent
> proxy authentication with NTLM or Negotiate...)

I got the error below when running the original script:

      File "proxy_detection.py", line 211
        print = """For PAC testing put this script on a web server and
configure win
    dows to use its url for automatic configuration:
              ^
    SyntaxError: invalid syntax

Otherwise it works great after removing the '=' char. Can you help
turn it into an extension? Surely it can get cleaned up over time.


More information about the Mercurial-devel mailing list