diff options
Diffstat (limited to 'sysproxy.py')
-rw-r--r-- | sysproxy.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sysproxy.py b/sysproxy.py new file mode 100644 index 0000000..81867ad --- /dev/null +++ b/sysproxy.py | |||
@@ -0,0 +1,7 @@ | |||
1 | import urllib.request | ||
2 | |||
3 | |||
4 | def configure_system_proxy(): | ||
5 | proxy = urllib.request.ProxyHandler(urllib.request.getproxies()) | ||
6 | opener = urllib.request.build_opener(proxy) | ||
7 | urllib.request.install_opener(opener) | ||