summaryrefslogtreecommitdiffstats
path: root/Modules/_scproxy.c
diff options
context:
space:
mode:
authorsamschott <sam.schott@outlook.com>2023-05-09 08:24:29 (GMT)
committerGitHub <noreply@github.com>2023-05-09 08:24:29 (GMT)
commit9a9b176eb7e052af84c01c0cfb3231e51f980f2d (patch)
tree4a2d96d291e99f462bb49bc138b15d5401c916ad /Modules/_scproxy.c
parentbf89d4283a28dd00836f2c312a9255f543f93fc7 (diff)
downloadcpython-9a9b176eb7e052af84c01c0cfb3231e51f980f2d.zip
cpython-9a9b176eb7e052af84c01c0cfb3231e51f980f2d.tar.gz
cpython-9a9b176eb7e052af84c01c0cfb3231e51f980f2d.tar.bz2
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>
Diffstat (limited to 'Modules/_scproxy.c')
-rw-r--r--Modules/_scproxy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c
index e669180..0df0324 100644
--- a/Modules/_scproxy.c
+++ b/Modules/_scproxy.c
@@ -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;