Add Proxy to Addon Manager with UI

Correct crash when Macro description is not reachable

Python crashed when under proxy - Macro list is charged - Proxy is undone ( internet connection lost) - Try to load macro description (u=None)

Add Proxy setting in Addon Manager Option UI

Correction of SSL context

Replace ssl.Purpose.CLIENT_AUTH by ssl.Purpose.SERVER_AUTH as context for a client

Add configuration of proxy setting UI

Add proxy management by urllib
This commit is contained in:
Zackles
2020-01-09 18:25:25 +01:00
committed by Yorik van Havre
parent 683fbffe4a
commit d7d88da291
4 changed files with 88 additions and 16 deletions

View File

@@ -589,6 +589,10 @@ class CommandAddonManager:
pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons")
self.config.checkUpdates.setChecked(pref.GetBool("AutoCheck",False))
self.config.customRepositories.setPlainText(pref.GetString("CustomRepositories",""))
self.config.radioButtonNoProxy.setChecked(pref.GetBool("NoProxyCheck",True))
self.config.radioButtonSystemProxy.setChecked(pref.GetBool("SystemProxyCheck",False))
self.config.radioButtonUserProxy.setChecked(pref.GetBool("UserProxyCheck",False))
self.config.userProxy.setPlainText(pref.GetString("ProxyUrl",""))
# center the dialog over the Addon Manager
self.config.move(self.dialog.frameGeometry().topLeft() + self.dialog.rect().center() - self.config.rect().center())
@@ -599,6 +603,10 @@ class CommandAddonManager:
# OK button has been pressed
pref.SetBool("AutoCheck",self.config.checkUpdates.isChecked())
pref.SetString("CustomRepositories",self.config.customRepositories.toPlainText())
pref.SetBool("NoProxyCheck",self.config.radioButtonNoProxy.isChecked())
pref.SetBool("SystemProxyCheck",self.config.radioButtonSystemProxy.isChecked())
pref.SetBool("UserProxyCheck",self.config.radioButtonUserProxy.isChecked())
pref.SetString("ProxyUrl",self.config.userProxy.toPlainText())
def check_updates(addon_name,callback):