mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
gh-104180: Read SOCKS proxies from macOS System Configuration (#104181)
read SOCKS proxies from macOS System Configuration in ``urllib.request``. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
This commit is contained in:
parent
bf89d4283a
commit
9a9b176eb7
2 changed files with 7 additions and 0 deletions
|
|
@ -206,6 +206,11 @@ get_proxies(PyObject* Py_UNUSED(mod), PyObject *Py_UNUSED(ignored))
|
|||
kSCPropNetProxiesGopherProxy,
|
||||
kSCPropNetProxiesGopherPort);
|
||||
if (r == -1) goto error;
|
||||
r = set_proxy(result, "socks", proxyDict,
|
||||
kSCPropNetProxiesSOCKSEnable,
|
||||
kSCPropNetProxiesSOCKSProxy,
|
||||
kSCPropNetProxiesSOCKSPort);
|
||||
if (r == -1) goto error;
|
||||
|
||||
CFRelease(proxyDict);
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue