how to change system-wide proxy settings by Python ?

Discussion in 'Python' started by iMath, Feb 3, 2013.

  1. iMath

    iMath Guest

    I have already known a valid proxy server(63.141.216.159)and port(8087) which support both http and https protocols ,so how to change system-wide proxy settings to this proxy by Python ?
    I use WinXP ,can you show me an example of this ?
    thanks in advance !
    iMath, Feb 3, 2013
    #1
    1. Advertising

  2. iMath

    Kwpolska Guest

    Re: how to change system-wide proxy settings by Python ?

    On Sun, Feb 3, 2013 at 4:34 PM, iMath <> wrote:
    > I have already known a valid proxy server(63.141.216.159)and port(8087) which support both http and https protocols ,so how to change system-wide proxy settings to this proxy by Python ?
    > I use WinXP ,can you show me an example of this ?
    > thanks in advance !
    > --
    > http://mail.python.org/mailman/listinfo/python-list


    This may help you:

    http://stackoverflow.com/questions/...stem-proxy-settings-on-windows-xp-with-python

    Next time, please use Google before you ask.
    --
    Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
    stop html mail | always bottom-post
    http://asciiribbon.org | http://caliburn.nl/topposting.html
    Kwpolska, Feb 3, 2013
    #2
    1. Advertising

  3. On 02/03/2013 08:34 AM, iMath wrote:
    > I have already known a valid proxy server(63.141.216.159)and
    > port(8087) which support both http and https protocols ,so how to
    > change system-wide proxy settings to this proxy by Python ? I use
    > WinXP ,can you show me an example of this ? thanks in advance !


    There really is no way on any operating system to set a system-wide
    proxy that is honored by every program that does http.

    However if you can change the one "Internet Settings" proxy
    programmatically, any windows app that use the IE browser engine will
    pick it up. One method to do this is to interact with the registry.
    You can google for the appropriate key. Setting it for all users,
    though, is a bit trickier. Your script would need privileges to access
    keys in HKEY_LOCAL_MACHINE.

    But be warned that other programs like firefox and Chrome will not
    automatically know about this setting or honor it. Or any program that
    implements its own http requests with sockets. It's not something that
    can be enforced as a sort of policy. If you need that kind of
    enforcing, you'll have to work with the network hardware to block
    un-proxied http and https traffic.
    Michael Torrie, Feb 3, 2013
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Web Developer

    char 8bit wide or 7bit wide in c++?

    Web Developer, Jul 31, 2003, in forum: C++
    Replies:
    2
    Views:
    571
    John Harrison
    Jul 31, 2003
  2. Replies:
    0
    Views:
    333
  3. donet programmer
    Replies:
    3
    Views:
    1,517
    Gregory A. Beamer
    Nov 20, 2009
  4. Disc Magnet
    Replies:
    2
    Views:
    695
    Jukka K. Korpela
    May 15, 2010
  5. Disc Magnet
    Replies:
    2
    Views:
    779
    Neredbojias
    May 14, 2010
Loading...

Share This Page