how to change system-wide proxy settings by Python ?

I

iMath

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 !
 
M

Michael Torrie

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top