{"id":323,"date":"2026-05-10T20:33:31","date_gmt":"2026-05-10T12:33:31","guid":{"rendered":"https:\/\/www.maskproxy.net\/blog\/?p=323"},"modified":"2026-05-10T20:33:31","modified_gmt":"2026-05-10T12:33:31","slug":"proxy-config-not-working-curl-python-socks","status":"publish","type":"post","link":"https:\/\/www.maskproxy.net\/blog\/proxy-config-not-working-curl-python-socks\/","title":{"rendered":"\u4ee3\u7801\u91cc\u4ee3\u7406\u914d\u7f6e\u4e0d\u751f\u6548\uff1acurl\u3001Python requests \u548c SOCKS \u4f9d\u8d56\u6392\u67e5\u987a\u5e8f"},"content":{"rendered":"<p>\u5982\u679c\u4ee3\u7406\u5728\u6d4f\u89c8\u5668\u6216\u9762\u677f\u91cc\u80fd\u7528\uff0c\u4f46\u5199\u8fdb\u811a\u672c\u540e\u4ecd\u7136\u5931\u8d25\uff0c\u5148\u4e0d\u8981\u628a\u95ee\u9898\u76f4\u63a5\u5f52\u5230 IP \u8d28\u91cf\u3002\u4ee3\u7801\u5c42\u9762\u7684\u4ee3\u7406\u914d\u7f6e\u6709\u51e0\u7c7b\u5e38\u89c1\u65ad\u70b9\uff1a\u534f\u8bae\u5199\u9519\u3001\u8ba4\u8bc1\u6ca1\u6709\u4f20\u8fdb\u53bb\u3001HTTP \u548c HTTPS \u952e\u53ea\u914d\u4e86\u4e00\u534a\u3001SOCKS \u4f9d\u8d56\u6ca1\u88c5\u3001DNS \u89e3\u6790\u4f4d\u7f6e\u4e0d\u5bf9\u3001\u73af\u5883\u53d8\u91cf\u88ab\u8986\u76d6\uff0c\u6216\u8005\u76ee\u6807\u5e93\u6839\u672c\u6ca1\u6709\u8bfb\u53d6\u4f60\u5199\u7684\u4ee3\u7406\u53c2\u6570\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u6309\u53ef\u590d\u73b0\u987a\u5e8f\u6392\u67e5\uff1a\u5148\u7528 curl \u5efa\u7acb\u6700\u5c0f\u8bf7\u6c42\uff0c\u518d\u628a\u540c\u4e00\u7ec4\u4ee3\u7406\u4fe1\u606f\u6620\u5c04\u5230 Python requests\uff0c\u6700\u540e\u518d\u5224\u65ad\u662f\u5426\u9700\u8981\u66f4\u6362\u4ee3\u7406\u8d44\u6e90\u3002\u8fd9\u6837\u80fd\u628a\u201c\u4ee3\u7801\u914d\u7f6e\u6ca1\u751f\u6548\u201d\u548c\u201c\u4ee3\u7406\u51fa\u53e3\u672c\u8eab\u4e0d\u53ef\u7528\u201d\u5206\u5f00\u3002<\/p>\n<h2>\u5148\u628a\u4ee3\u7406\u4fe1\u606f\u62c6\u6210\u56db\u4e2a\u5b57\u6bb5<\/h2>\n<p>\u6392\u67e5\u524d\u5148\u628a\u4ee3\u7406\u4fe1\u606f\u5199\u6210\u56fa\u5b9a\u683c\u5f0f\uff1a<\/p>\n<ul>\n<li>\u534f\u8bae\uff1aHTTP\u3001HTTPS\u3001SOCKS5\uff0c\u6216\u9700\u8981\u8fdc\u7aef DNS \u7684 SOCKS5H\u3002<\/li>\n<li>\u4e3b\u673a\u548c\u7aef\u53e3\uff1a\u4f8b\u5982 <code>host:port<\/code>\u3002<\/li>\n<li>\u8ba4\u8bc1\u65b9\u5f0f\uff1a\u7528\u6237\u540d\u5bc6\u7801\u3001\u767d\u540d\u5355 IP\uff0c\u6216\u4e8c\u8005\u7ec4\u5408\u3002<\/li>\n<li>\u76ee\u6807 URL\uff1a\u7528\u4e00\u4e2a\u7a33\u5b9a\u7684\u5916\u90e8\u68c0\u6d4b\u9875\u6216\u4f60\u7684\u5b9e\u9645\u4e1a\u52a1\u63a5\u53e3\u3002<\/li>\n<\/ul>\n<p>\u5f88\u591a\u201c\u4ee3\u7406\u4e0d\u751f\u6548\u201d\u7684\u95ee\u9898\u4e0d\u662f\u4ee3\u7801\u903b\u8f91\u590d\u6742\uff0c\u800c\u662f\u5b57\u6bb5\u6df7\u5728\u4e00\u8d77\u540e\u65e0\u6cd5\u786e\u8ba4\u54ea\u4e00\u6bb5\u9519\u4e86\u3002\u6bd4\u5982\u4f9b\u5e94\u5546\u7ed9\u7684\u662f HTTP \u4ee3\u7406\uff0c\u4f60\u5728\u4ee3\u7801\u91cc\u5199\u6210 <code>socks5:\/\/<\/code>\uff1b\u6216\u8005\u4ee3\u7406\u9700\u8981\u7528\u6237\u540d\u5bc6\u7801\uff0c\u4f46\u811a\u672c\u53ea\u4f20\u4e86 host \u548c port\u3002<\/p>\n<h2>\u7b2c\u4e00\u6b65\uff1a\u7528 curl \u505a\u6700\u5c0f\u9a8c\u8bc1<\/h2>\n<p>\u5148\u7528 curl \u9a8c\u8bc1\u540c\u4e00\u7ec4\u4ee3\u7406\u80fd\u4e0d\u80fd\u72ec\u7acb\u5de5\u4f5c\u3002curl \u652f\u6301\u901a\u8fc7 <code>--proxy<\/code> \u6307\u5b9a\u4ee3\u7406\uff0c\u4e5f\u80fd\u7528 <code>--proxy-user<\/code> \u62c6\u5f00\u8ba4\u8bc1\u4fe1\u606f\u3002curl \u5b98\u65b9\u6587\u6863\u7684 <a href=\"https:\/\/everything.curl.dev\/usingcurl\/proxies\/index.html\" target=\"_blank\" rel=\"noopener\">proxy \u8bf4\u660e<\/a>\u9002\u5408\u4f5c\u4e3a\u53c2\u6570\u6838\u5bf9\u53c2\u8003\u3002<\/p>\n<p>HTTP \u4ee3\u7406\u53ef\u4ee5\u8fd9\u6837\u6d4b\uff1a<\/p>\n<pre><code>curl -v --proxy http:\/\/USER:PASS@HOST:PORT https:\/\/example.com\/<\/code><\/pre>\n<p>SOCKS5 \u4ee3\u7406\u53ef\u4ee5\u8fd9\u6837\u6d4b\uff1a<\/p>\n<pre><code>curl -v --proxy socks5h:\/\/USER:PASS@HOST:PORT https:\/\/example.com\/<\/code><\/pre>\n<p>\u8fd9\u91cc\u5efa\u8bae\u4f18\u5148\u770b\u4e09\u4ef6\u4e8b\uff1a<\/p>\n<ol>\n<li>curl \u662f\u5426\u771f\u7684\u8fde\u63a5\u5230\u4e86\u4ee3\u7406 host \u548c port\u3002<\/li>\n<li>\u8fd4\u56de\u91cc\u662f\u5426\u51fa\u73b0\u8ba4\u8bc1\u5931\u8d25\u3001\u8fde\u63a5\u62d2\u7edd\u3001\u8d85\u65f6\u6216 TLS \u9519\u8bef\u3002<\/li>\n<li>\u8bbf\u95ee IP \u68c0\u6d4b\u9875\u65f6\uff0c\u51fa\u53e3 IP \u662f\u5426\u53d8\u6210\u4ee3\u7406\u51fa\u53e3\u3002<\/li>\n<\/ol>\n<p>\u5982\u679c curl \u90fd\u65e0\u6cd5\u901a\u8fc7\u540c\u4e00\u7ec4\u53c2\u6570\u8bbf\u95ee\u76ee\u6807\uff0c\u540e\u9762\u7684 Python\u3001\u722c\u866b\u6846\u67b6\u6216\u81ea\u52a8\u5316\u5de5\u5177\u901a\u5e38\u4e5f\u4e0d\u4f1a\u7a33\u5b9a\u3002\u6b64\u65f6\u8981\u5148\u6392\u67e5\u8ba4\u8bc1\u3001\u767d\u540d\u5355\u3001\u7aef\u53e3\u3001\u534f\u8bae\u7c7b\u578b\u548c\u4ee3\u7406\u53ef\u7528\u6027\u3002<\/p>\n<h2>\u7b2c\u4e8c\u6b65\uff1a\u628a curl \u53c2\u6570\u6620\u5c04\u5230 Python requests<\/h2>\n<p>\u5982\u679c curl \u80fd\u901a\uff0c\u4e0b\u4e00\u6b65\u518d\u68c0\u67e5 Python requests\u3002requests \u7684\u4ee3\u7406\u914d\u7f6e\u901a\u5e38\u9700\u8981\u540c\u65f6\u8986\u76d6 <code>http<\/code> \u548c <code>https<\/code> \u4e24\u4e2a\u952e\uff0c\u5426\u5219\u8bbf\u95ee HTTPS \u76ee\u6807\u65f6\u53ef\u80fd\u6ca1\u6709\u8d70\u4f60\u671f\u671b\u7684\u4ee3\u7406\u3002requests \u5b98\u65b9\u6587\u6863\u7684 <a href=\"https:\/\/requests.readthedocs.io\/en\/latest\/user\/advanced\/#proxies\" target=\"_blank\" rel=\"noopener\">proxies \u914d\u7f6e<\/a>\u53ef\u4ee5\u4f5c\u4e3a\u5b57\u6bb5\u6838\u5bf9\u4f9d\u636e\u3002<\/p>\n<p>\u5e38\u89c1\u5199\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre><code>import requests\n\nproxies = {\n    &quot;http&quot;: &quot;http:\/\/USER:PASS@HOST:PORT&quot;,\n    &quot;https&quot;: &quot;http:\/\/USER:PASS@HOST:PORT&quot;,\n}\n\nr = requests.get(&quot;https:\/\/example.com\/&quot;, proxies=proxies, timeout=20)\nprint(r.status_code)<\/code><\/pre>\n<p>\u6ce8\u610f\u4e24\u4e2a\u7ec6\u8282\u3002<\/p>\n<p>\u7b2c\u4e00\uff0c<code>https<\/code> \u952e\u91cc\u7684\u4ee3\u7406\u5730\u5740\u4e0d\u4e00\u5b9a\u8981\u5199\u6210 <code>https:\/\/<\/code>\u3002\u5f88\u591a\u4ee3\u7406\u670d\u52a1\u63d0\u4f9b\u7684\u662f HTTP CONNECT \u4ee3\u7406\uff0c\u6240\u4ee5\u8bbf\u95ee HTTPS \u7f51\u7ad9\u65f6\uff0c\u4ee3\u7406 URL \u4ecd\u7136\u53ef\u80fd\u662f <code>http:\/\/USER:PASS@HOST:PORT<\/code>\u3002<\/p>\n<p>\u7b2c\u4e8c\uff0c\u7528\u6237\u540d\u548c\u5bc6\u7801\u5982\u679c\u5305\u542b <code>@<\/code>\u3001<code>:<\/code>\u3001<code>#<\/code>\u3001\u7a7a\u683c\u7b49\u5b57\u7b26\uff0c\u8981\u505a URL \u7f16\u7801\u3002\u5426\u5219 requests \u53ef\u80fd\u628a\u5bc6\u7801\u7684\u4e00\u90e8\u5206\u5f53\u4f5c host \u6216\u8def\u5f84\uff0c\u8868\u73b0\u6210\u8ba4\u8bc1\u5931\u8d25\u6216\u8fde\u63a5\u5931\u8d25\u3002<\/p>\n<h2>\u7b2c\u4e09\u6b65\uff1aSOCKS \u4ee3\u7406\u8981\u786e\u8ba4\u4f9d\u8d56\u662f\u5426\u5b89\u88c5<\/h2>\n<p>Python requests \u9ed8\u8ba4\u4e0d\u4e00\u5b9a\u5e26 SOCKS \u652f\u6301\u3002\u6ca1\u6709\u5b89\u88c5\u989d\u5916\u4f9d\u8d56\u65f6\uff0c\u5e38\u89c1\u62a5\u9519\u4f1a\u63a5\u8fd1 <code>Missing dependencies for SOCKS support<\/code>\u3002\u8fd9\u4e0d\u662f\u4ee3\u7406\u6c60\u574f\u4e86\uff0c\u800c\u662f\u672c\u5730\u8fd0\u884c\u73af\u5883\u7f3a\u4f9d\u8d56\u3002<\/p>\n<p>\u901a\u5e38\u8981\u5b89\u88c5\u5e26 SOCKS \u652f\u6301\u7684 requests\uff1a<\/p>\n<pre><code>python -m pip install &quot;requests[socks]&quot;<\/code><\/pre>\n<p>\u6216\u8005\u786e\u8ba4\u8fd0\u884c\u73af\u5883\u91cc\u6709 PySocks\u3002PyPI \u4e0a\u7684 <a href=\"https:\/\/pypi.org\/project\/PySocks\/\" target=\"_blank\" rel=\"noopener\">PySocks \u9879\u76ee<\/a>\u8bf4\u660e\u4e86\u5b83\u4e3a Python \u63d0\u4f9b SOCKS \u652f\u6301\u3002<\/p>\n<p>SOCKS \u5199\u6cd5\u793a\u4f8b\uff1a<\/p>\n<pre><code>proxies = {\n    &quot;http&quot;: &quot;socks5h:\/\/USER:PASS@HOST:PORT&quot;,\n    &quot;https&quot;: &quot;socks5h:\/\/USER:PASS@HOST:PORT&quot;,\n}<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u865a\u62df\u73af\u5883\u3001Docker\u3001\u5b9a\u65f6\u4efb\u52a1\u6216\u670d\u52a1\u5668\u540e\u53f0\u8fdb\u7a0b\uff0c\u8981\u786e\u8ba4\u4f9d\u8d56\u88c5\u5728\u771f\u6b63\u6267\u884c\u811a\u672c\u7684\u90a3\u4e2a\u73af\u5883\u91cc\u3002\u5f88\u591a\u6392\u67e5\u4f1a\u5361\u5728\u8fd9\u91cc\uff1a\u547d\u4ee4\u884c\u6d4b\u8bd5\u88c5\u597d\u4e86\u4f9d\u8d56\uff0c\u4f46\u751f\u4ea7\u8fdb\u7a0b\u4f7f\u7528\u7684\u662f\u53e6\u4e00\u4e2a Python \u89e3\u91ca\u5668\u3002<\/p>\n<h2>\u7b2c\u56db\u6b65\uff1a\u533a\u5206 socks5 \u548c socks5h<\/h2>\n<p><code>socks5:\/\/<\/code> \u548c <code>socks5h:\/\/<\/code> \u7684\u5173\u952e\u5dee\u522b\u5728 DNS \u89e3\u6790\u4f4d\u7f6e\u3002<code>socks5:\/\/<\/code> \u5e38\u89c1\u884c\u4e3a\u662f\u672c\u5730\u5148\u89e3\u6790\u57df\u540d\uff0c\u518d\u628a\u76ee\u6807 IP \u4ea4\u7ed9\u4ee3\u7406\uff1b<code>socks5h:\/\/<\/code> \u5219\u8ba9\u4ee3\u7406\u7aef\u89e3\u6790\u57df\u540d\u3002Tor \u9879\u76ee\u7684 <a href=\"https:\/\/github.com\/torproject\/torspec\/blob\/main\/socks-extensions.txt\" target=\"_blank\" rel=\"noopener\">SOCKS \u6269\u5c55\u8bf4\u660e<\/a>\u4e5f\u89e3\u91ca\u4e86\u8fdc\u7aef hostname \u89e3\u6790\u7684\u8bed\u4e49\u3002<\/p>\n<p>\u8fd9\u4f1a\u5f71\u54cd\u51e0\u7c7b\u95ee\u9898\uff1a<\/p>\n<ul>\n<li>\u672c\u5730\u7f51\u7edc\u65e0\u6cd5\u89e3\u6790\u76ee\u6807\u57df\u540d\uff0c\u4f46\u4ee3\u7406\u6240\u5728\u5730\u533a\u53ef\u4ee5\u89e3\u6790\u3002<\/li>\n<li>\u76ee\u6807\u7f51\u7ad9\u6839\u636e DNS \u6216\u5730\u533a\u5dee\u5f02\u8fd4\u56de\u4e0d\u540c\u7ed3\u679c\u3002<\/li>\n<li>\u4f60\u5e0c\u671b\u51cf\u5c11\u672c\u673a DNS \u6cc4\u9732\u6216\u8ba9\u8bf7\u6c42\u66f4\u63a5\u8fd1\u4ee3\u7406\u51fa\u53e3\u73af\u5883\u3002<\/li>\n<li>\u67d0\u4e9b\u5e93\u867d\u7136\u63a5\u53d7 SOCKS \u4ee3\u7406\uff0c\u4f46\u9ed8\u8ba4\u6ca1\u6709\u6309\u4f60\u671f\u671b\u7684\u65b9\u5f0f\u5904\u7406\u57df\u540d\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u4f60\u6000\u7591 DNS \u89e3\u6790\u4f4d\u7f6e\u5bfc\u81f4\u95ee\u9898\uff0c\u53ef\u4ee5\u7528\u540c\u4e00\u4e2a\u4ee3\u7406\u5206\u522b\u6d4b\u8bd5 <code>socks5:\/\/<\/code> \u548c <code>socks5h:\/\/<\/code>\u3002\u5982\u679c\u53ea\u6709 <code>socks5h<\/code> \u6b63\u5e38\uff0c\u5c31\u4e0d\u8981\u628a\u9519\u8bef\u5f52\u56e0\u5230\u4ee3\u7406 IP \u672c\u8eab\u3002<\/p>\n<h2>\u7b2c\u4e94\u6b65\uff1a\u68c0\u67e5\u73af\u5883\u53d8\u91cf\u548c\u4ee3\u7801\u8986\u76d6<\/h2>\n<p>\u5f88\u591a\u5de5\u5177\u4f1a\u8bfb\u53d6 <code>HTTP_PROXY<\/code>\u3001<code>HTTPS_PROXY<\/code>\u3001<code>ALL_PROXY<\/code>\u3001<code>NO_PROXY<\/code> \u8fd9\u4e9b\u73af\u5883\u53d8\u91cf\u3002\u95ee\u9898\u5728\u4e8e\uff1a\u5b83\u4eec\u53ef\u80fd\u5e2e\u52a9\u4f60\uff0c\u4e5f\u53ef\u80fd\u8986\u76d6\u4f60\u7684\u663e\u5f0f\u914d\u7f6e\u3002<\/p>\n<p>\u5efa\u8bae\u68c0\u67e5\uff1a<\/p>\n<ul>\n<li>\u5f53\u524d shell\u3001systemd\u3001Docker\u3001CI \u91cc\u662f\u5426\u8bbe\u7f6e\u4e86\u4ee3\u7406\u73af\u5883\u53d8\u91cf\u3002<\/li>\n<li><code>NO_PROXY<\/code> \u662f\u5426\u628a\u76ee\u6807\u57df\u540d\u6392\u9664\u6389\u4e86\u3002<\/li>\n<li>\u4ee3\u7801\u91cc\u662f\u5426\u65e2\u4f20\u4e86 <code>proxies<\/code>\uff0c\u53c8\u5728\u4f1a\u8bdd\u5bf9\u8c61\u6216\u6846\u67b6\u914d\u7f6e\u91cc\u8bbe\u7f6e\u4e86\u53e6\u4e00\u5957\u4ee3\u7406\u3002<\/li>\n<li>\u591a\u7ebf\u7a0b\u6216\u5f02\u6b65\u4efb\u52a1\u662f\u5426\u590d\u7528\u4e86\u6ca1\u6709\u4ee3\u7406\u914d\u7f6e\u7684 client\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u540c\u4e00\u6bb5\u4ee3\u7801\u5728\u672c\u673a\u6709\u6548\u3001\u670d\u52a1\u5668\u65e0\u6548\uff0c\u4f18\u5148\u6bd4\u8f83\u73af\u5883\u53d8\u91cf\u3001Python \u7248\u672c\u3001requests \u7248\u672c\u3001\u4f9d\u8d56\u5b89\u88c5\u4f4d\u7f6e\u548c\u51fa\u53e3\u7f51\u7edc\u9650\u5236\u3002<\/p>\n<h2>\u7b2c\u516d\u6b65\uff1a\u4ec0\u4e48\u65f6\u5019\u624d\u5224\u65ad\u662f\u4ee3\u7406\u8d44\u6e90\u95ee\u9898<\/h2>\n<p>\u53ea\u6709\u5f53\u6700\u5c0f\u94fe\u8def\u90fd\u6392\u8fc7\uff0c\u624d\u8fdb\u5165\u8d44\u6e90\u8d28\u91cf\u5224\u65ad\u3002\u4e0b\u9762\u8fd9\u4e9b\u73b0\u8c61\u66f4\u50cf\u4ee3\u7406\u8d44\u6e90\u6216\u670d\u52a1\u7aef\u9650\u5236\uff1a<\/p>\n<ul>\n<li>curl \u4f7f\u7528\u540c\u6837\u53c2\u6570\u4e5f\u65e0\u6cd5\u8fde\u901a\uff0c\u4e14\u8ba4\u8bc1\u3001\u767d\u540d\u5355\u3001\u7aef\u53e3\u90fd\u786e\u8ba4\u65e0\u8bef\u3002<\/li>\n<li>\u4e0d\u540c\u76ee\u6807\u7f51\u7ad9\u90fd\u51fa\u73b0\u8fde\u63a5\u8d85\u65f6\u6216\u4ee3\u7406\u62d2\u7edd\u8fde\u63a5\u3002<\/li>\n<li>\u51fa\u53e3 IP \u548c\u4f9b\u5e94\u5546\u8bf4\u660e\u4e0d\u4e00\u81f4\uff0c\u6216\u5730\u533a\u957f\u671f\u4e0d\u7b26\u5408\u4efb\u52a1\u8981\u6c42\u3002<\/li>\n<li>\u540c\u4e00\u6c60\u5b50\u5927\u91cf\u51fa\u53e3\u90fd\u89e6\u53d1\u9a8c\u8bc1\u7801\u3001403\u3001429\uff0c\u4e14\u964d\u4f4e\u8bf7\u6c42\u9891\u7387\u540e\u4ecd\u6ca1\u6709\u6539\u5584\u3002<\/li>\n<li>\u76ee\u6807\u7f51\u7ad9\u5b9e\u6d4b\u7a33\u5b9a\u5931\u8d25\uff0c\u4f46\u66f4\u6362\u534f\u8bae\u3001\u4f9d\u8d56\u548c DNS \u89e3\u6790\u65b9\u5f0f\u540e\u6ca1\u6709\u53d8\u5316\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u95ee\u9898\u96c6\u4e2d\u5728\u534f\u8bae\u652f\u6301\u3001HTTP\/SOCKS5 \u9009\u62e9\u6216\u5de5\u5177\u94fe\u914d\u7f6e\uff0c\u53ef\u4ee5\u5148\u6309 <a href=\"https:\/\/www.maskproxy.net\/proxy-protocols.html\">\u4ee3\u7406\u534f\u8bae\u652f\u6301\u9875\u9762<\/a>\u6838\u5bf9\u534f\u8bae\u80fd\u529b\uff1b\u5982\u679c\u8fd8\u9700\u8981\u7ed3\u5408\u4f4f\u5b85\u3001\u673a\u623f\u3001\u5730\u533a\u6c60\u505a\u9a8c\u8bc1\uff0c\u53ef\u4ee5\u4ece <a href=\"https:\/\/www.maskproxy.net\/\">\u6309\u4efb\u52a1\u5339\u914d\u4ee3\u7406\u8d44\u6e90\u5165\u53e3<\/a>\u56de\u5230\u4ea7\u54c1\u5c42\u9762\u91cd\u65b0\u9009\u62e9\u8d44\u6e90\u3002<\/p>\n<h2>\u4e00\u4e2a\u53ef\u590d\u7528\u7684\u6392\u67e5\u6e05\u5355<\/h2>\n<p>\u53d1\u5e03\u811a\u672c\u6216\u81ea\u52a8\u5316\u4efb\u52a1\u524d\uff0c\u5efa\u8bae\u6309\u4e0b\u9762\u7684\u987a\u5e8f\u7559\u4e00\u4efd\u8bb0\u5f55\uff1a<\/p>\n<ol>\n<li>curl \u6700\u5c0f\u8bf7\u6c42\u662f\u5426\u6210\u529f\uff0c\u51fa\u53e3 IP \u662f\u5426\u53d8\u5316\u3002<\/li>\n<li>HTTP \u4e0e HTTPS \u76ee\u6807\u662f\u5426\u90fd\u8d70\u4ee3\u7406\u3002<\/li>\n<li>\u7528\u6237\u540d\u5bc6\u7801\u662f\u5426 URL \u7f16\u7801\u3002<\/li>\n<li>SOCKS \u4f9d\u8d56\u662f\u5426\u5b89\u88c5\u5728\u5b9e\u9645\u8fd0\u884c\u73af\u5883\u3002<\/li>\n<li><code>socks5h<\/code> \u4e0e <code>socks5<\/code> \u7684\u7ed3\u679c\u662f\u5426\u4e0d\u540c\u3002<\/li>\n<li>\u73af\u5883\u53d8\u91cf\u662f\u5426\u8986\u76d6\u4ee3\u7801\u914d\u7f6e\u3002<\/li>\n<li>\u76ee\u6807\u7f51\u7ad9\u4f4e\u9891\u5b9e\u6d4b\u662f\u5426\u7a33\u5b9a\u3002<\/li>\n<li>\u6362\u4e00\u4e2a\u4ee3\u7406\u51fa\u53e3\u540e\uff0c\u9519\u8bef\u662f\u5426\u968f\u51fa\u53e3\u53d8\u5316\u3002<\/li>\n<\/ol>\n<p>\u8fd9\u4efd\u8bb0\u5f55\u80fd\u5e2e\u52a9\u4f60\u548c\u4f9b\u5e94\u5546\u6c9f\u901a\uff0c\u4e5f\u80fd\u907f\u514d\u628a\u672c\u5730\u4f9d\u8d56\u3001\u73af\u5883\u53d8\u91cf\u548c DNS \u89e3\u6790\u95ee\u9898\u8bef\u5224\u6210\u6574\u6279\u4ee3\u7406\u4e0d\u53ef\u7528\u3002\u771f\u6b63\u9700\u8981\u6362 IP \u6216\u6362\u6c60\u65f6\uff0c\u4e5f\u80fd\u8bf4\u6e05\u695a\u662f\u54ea\u4e00\u5c42\u5df2\u7ecf\u6392\u9664\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee3\u7406\u5199\u8fdb\u4ee3\u7801\u540e\u4ecd\u4e0d\u751f\u6548\u65f6\uff0c\u5148\u7528 curl \u505a\u6700\u5c0f\u9a8c\u8bc1\uff0c\u518d\u6838\u5bf9 Python requests \u7684 http\/https \u4ee3\u7406\u3001SOCKS \u4f9d\u8d56\u3001socks5h DNS \u548c\u73af\u5883\u53d8\u91cf\u3002<\/p>\n","protected":false},"author":2,"featured_media":324,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[1],"tags":[151,152,153,150],"class_list":["post-323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-maskproxy","tag-curl-","tag-python-requests-","tag-socks5-","tag-150"],"_links":{"self":[{"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/posts\/323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":2,"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"predecessor-version":[{"id":326,"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/posts\/323\/revisions\/326"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/media\/324"}],"wp:attachment":[{"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.maskproxy.net\/blog\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}