Setting an application-wide proxy

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
chennes
Veteran
Posts: 3868
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Setting an application-wide proxy

Post by chennes »

I'm working on the Addon Manager right now, and I'd like to add support for authenticated proxies (see, e.g. this feature request for NTLM support). Obviously, it would be very desirable to only have to log in once per FreeCAD session. This is easy to set up, but has far-reaching ramifications that I thought should be discussed here before I just dove in and started modifying everyone's network connections!

The key feature is that Qt supports application-wide proxy settings. So the Addon Manager could call QNetworkProxy::setApplicationProxy and just set a proxy for the entirety of FreeCAD (that uses Qt for its network calls... this won't affect, e.g. "urllib" things in Python). I think this is a reasonable thing to do: I can't think of a case where you'd want the Addon Manager to use one proxy, but Start to use another. But I am also not behind a proxy! So I'm hoping for some input on this. If I set an application-wide proxy, is that going to break something I'm not thinking of?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply