I operate behind a firewall at work, and so to access the many very awesome plugins and other external goodies for QGIS I need to use a proxy.
We also have our own WMS server - which doesn't like the proxy.
To access the internal WMS, I need the proxy off, to access an external WFS I need it on.

Is there a way, using PyQGIS, to control the proxy (as found in Settings > Options > Network)?

Does anyone know of any examples I can refer to?

With thanks,