{"id":355,"date":"2026-11-19T09:30:00","date_gmt":"2026-11-19T04:00:00","guid":{"rendered":"https:\/\/proxykite.com\/blog\/?p=355"},"modified":"2026-11-19T09:30:00","modified_gmt":"2026-11-19T04:00:00","slug":"socks5h-vs-socks5-dns-leak","status":"publish","type":"post","link":"https:\/\/proxykite.com\/blog\/socks5h-vs-socks5-dns-leak\/","title":{"rendered":"SOCKS5h vs SOCKS5: Prevent DNS Leaks"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The difference in <strong>socks5h vs socks5<\/strong> is where your client resolves the destination hostname: on your machine or through the SOCKS5 proxy. Choose the proxy-side option when the hostname should be resolved from the mobile-proxy network, then verify the result instead of assuming that a SOCKS5 connection prevents every DNS leak.<\/p>\n\n\n\n<aside class=\"ap-card\" aria-label=\"ProxyKite per-dongle licence\">\n<span class=\"ap-card__badge\">For your own dongles<\/span>\n<div class=\"ap-card__body\"><p class=\"ap-card__name\">ProxyKite per-dongle licence<\/p><p class=\"ap-card__best\">Best for anyone turning their own 4G\/LTE dongles + SIMs into HTTP\/SOCKS5 mobile proxies, from 1 dongle to hundreds<\/p><ul class=\"ap-card__features\"><li>Every dongle becomes an HTTP + SOCKS5 proxy on a public port of our cloud router \u2014 no static IP or port forwarding, works behind CGNAT<\/li><li>IP rotation on demand, by rotation link, or on a timer from 60 s to 7 days (sticky option); returns old + new IP<\/li><li>One-line installer on a Raspberry Pi \/ Linux box; Huawei E3372 HiLink is the reference stick<\/li><li>SIM inbox for carrier messages, bandwidth limits per day\/week\/month, live traffic insights<\/li><li>Sub-users, white-label (your logo\/colours), REST API, webhooks and Telegram alerts included<\/li><li>Flat price, traffic is free \u2014 rides on your own SIM data plans<\/li><\/ul><\/div>\n<div class=\"ap-card__side\"><p class=\"ap-card__price\">$9 per dongle <small>per month<\/small><\/p><a class=\"ap-card__btn\" href=\"https:\/\/proxykite.com\/#pricing\">Talk to us \u2192<\/a><\/div>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Where DNS happens with a proxy<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you request <code>https:\/\/example.com<\/code>, your application has to turn <code>example.com<\/code> into an IP address before it can open the connection. That lookup is DNS. It is separate from the later HTTP request and from the public IP that the destination sees.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are three relevant points in the connection:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li><strong>Proxy endpoint lookup:<\/strong> your client may resolve <code>proxy.example.net<\/code> so it can connect to the proxy. This lookup normally happens locally and is expected.<\/li>\n\n\n<li><strong>Destination lookup:<\/strong> your client resolves <code>example.com<\/code>, or it sends the hostname to the SOCKS5 proxy for resolution.<\/li>\n\n\n<li><strong>Destination connection:<\/strong> the proxy opens the TCP connection to the destination and relays the traffic.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The DNS leak question is about the second point. If your local resolver receives the destination hostname, your network operator or DNS service can learn which hostname your application requested even though the web connection itself goes through the proxy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SOCKS5 can carry either an IP address or a domain name in its connection request. <a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc1928\" target=\"_blank\" rel=\"noopener\">RFC 1928<\/a> defines the domain-name address type; the client library decides whether it sends that domain name or resolves it first. That is why two settings can use the same SOCKS version while producing different DNS paths.<\/p>\n\n\n\n<aside class=\"ap-note\"><p><code>socks5h<\/code> moves destination hostname resolution to the proxy; it does not make DNS automatically encrypted, and it does not hide the fact that your client must resolve the proxy endpoint itself.<\/p><\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">SOCKS5 vs SOCKS5h<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>h<\/code> in <code>socks5h<\/code> means <strong>hostname<\/strong>. In clients that support these URI schemes, it tells the library to pass the destination hostname to the SOCKS5 proxy. The proxy then resolves the hostname and connects to the resulting address.<\/p>\n\n\n\n<figure class=\"wp-block-table ap-table\"><table><thead><tr><th>Setting<\/th><th>Destination DNS lookup<\/th><th>What the SOCKS5 request carries<\/th><th>Typical reason to use it<\/th><\/tr><\/thead><tbody><tr><td><code>socks5:\/\/<\/code><\/td><td>Local machine<\/td><td>An IP address after local resolution<\/td><td>You deliberately want local DNS or need a client-side resolver<\/td><\/tr><tr><td><code>socks5h:\/\/<\/code><\/td><td>SOCKS5 proxy<\/td><td>The destination hostname<\/td><td>You want the lookup to follow the proxy path<\/td><\/tr><tr><td>SOCKS v5 + browser remote DNS<\/td><td>Browser\/proxy path, depending on its setting<\/td><td>Hostname when remote DNS is enabled<\/td><td>You are configuring a browser rather than a URL-aware script<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">These are client conventions, not two different proxy protocols. A SOCKS5 server can support hostname requests regardless of whether your client spells the endpoint <code>socks5:\/\/<\/code> or <code>socks5h:\/\/<\/code>. The important question is what the application does before it starts the SOCKS handshake.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you use a literal destination IP, there is no destination hostname to resolve for that request. That can be useful for a narrow diagnostic, but it does not test normal browsing, scraping, or API work where URLs contain hostnames.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a 4G proxy farm, the same rule applies whether the endpoint is on a local box or a cloud-routed port. ProxyKite exposes HTTP and SOCKS5 access for each active dongle, so the consuming client still needs to choose its DNS behavior. The <a href=\"https:\/\/proxykite.com\/docs\/guide\/proxy-formats\">proxy formats guide<\/a> shows the endpoint and authentication formats before you add the scheme required by your tool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">curl: <code>--socks5<\/code> vs <code>--socks5-hostname<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">curl makes the distinction explicit. The <a href=\"https:\/\/curl.se\/docs\/manpage.html\" target=\"_blank\" rel=\"noopener\"><code>--socks5<\/code> option<\/a> resolves the destination hostname locally. The <code>--socks5-hostname<\/code> option asks the proxy to resolve it. The same choice can be written in the proxy URL as <code>socks5:\/\/<\/code> or <code>socks5h:\/\/<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set placeholders in your shell first. Keep real credentials out of a committed script and avoid putting them in a command that will be copied into a shared ticket or chat.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PROXY_HOST='proxy.example.net'\nPROXY_PORT='30007'\nPROXY_USER='replace-with-user'\nPROXY_PASS='replace-with-password'\nTARGET='https:\/\/example.com\/'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command uses local destination DNS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl --fail --silent --show-error \\\n  --socks5 \"${PROXY_HOST}:${PROXY_PORT}\" \\\n  --proxy-user \"${PROXY_USER}:${PROXY_PASS}\" \\\n  \"${TARGET}\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command sends the destination hostname to the SOCKS5 proxy:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl --fail --silent --show-error \\\n  --socks5-hostname \"${PROXY_HOST}:${PROXY_PORT}\" \\\n  --proxy-user \"${PROXY_USER}:${PROXY_PASS}\" \\\n  \"${TARGET}\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The equivalent URL forms are:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl --fail --silent --show-error \\\n  --proxy \"socks5:\/\/${PROXY_HOST}:${PROXY_PORT}\" \\\n  --proxy-user \"${PROXY_USER}:${PROXY_PASS}\" \\\n  \"${TARGET}\"\n\ncurl --fail --silent --show-error \\\n  --proxy \"socks5h:\/\/${PROXY_HOST}:${PROXY_PORT}\" \\\n  --proxy-user \"${PROXY_USER}:${PROXY_PASS}\" \\\n  \"${TARGET}\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Both commands should return the destination response through the proxy. A successful response proves that the proxy connection and authentication work; it does not, by itself, prove where DNS happened. Use a packet capture or a controlled hostname test as described below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The proxy hostname is a separate detail. curl must resolve <code>PROXY_HOST<\/code> somehow before it can connect, even when <code>--socks5-hostname<\/code> is enabled. Do not treat that one local lookup as a leak of the destination hostname.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to see the connection negotiation while debugging, add <code>--verbose<\/code>. Verbose output can show the proxy connection and SOCKS handshake, but it is not a complete DNS audit. For a broader curl check, see the published guide to <a href=\"https:\/\/proxykite.com\/blog\/test-proxy-with-curl\/\">testing a SOCKS5 proxy with curl<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Requests and other clients<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Requests supports SOCKS through its optional dependency. Install it into the same Python environment that runs the worker:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python -m pip install 'requests[socks]'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/requests.readthedocs.io\/en\/latest\/user\/advanced\/#socks\" target=\"_blank\" rel=\"noopener\">Requests SOCKS documentation<\/a> states that <code>socks5<\/code> resolves on the client and <code>socks5h<\/code> resolves on the proxy. Use <code>socks5h<\/code> for both destination schemes when you want HTTP and HTTPS URLs to follow the same rule:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import os\nfrom urllib.parse import quote\n\nimport requests\n\nuser = quote(os.environ[\"PROXY_USER\"], safe=\"\")\npassword = quote(os.environ[\"PROXY_PASSWORD\"], safe=\"\")\nhost = os.environ[\"PROXY_HOST\"]\nport = os.environ[\"PROXY_PORT\"]\n\nproxy_url = f\"socks5h:\/\/{user}:{password}@{host}:{port}\"\nproxies = {\n    \"http\": proxy_url,\n    \"https\": proxy_url,\n}\n\nresponse = requests.get(\n    \"https:\/\/example.com\/\",\n    proxies=proxies,\n    timeout=(10, 30),\n)\nresponse.raise_for_status()\nprint(response.status_code)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>http<\/code> and <code>https<\/code> dictionary keys describe the destination URL schemes. They do not force the proxy itself to be an HTTP proxy. The <code>socks5h:\/\/<\/code> value is what selects SOCKS5 with proxy-side hostname resolution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you intentionally need local DNS, change only the scheme:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>proxy_url = f\"socks5:\/\/{user}:{password}@{host}:{port}\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Encoding the username and password matters when they contain URL-reserved characters such as <code>@<\/code>, <code>:<\/code>, <code>\/<\/code>, <code>#<\/code>, or <code>%<\/code>. Use separate secret fields when your library supports them. The longer <a href=\"https:\/\/proxykite.com\/blog\/python-requests-proxy\/\">Python Requests proxy guide<\/a> covers authentication, timeouts, sessions, and safe retries around this core setting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The same principle appears in other clients, but the spelling varies. Look for an option named <strong>remote DNS<\/strong>, <strong>proxy DNS<\/strong>, <strong>resolve hostname through proxy<\/strong>, or <strong>SOCKS5 hostname<\/strong>. A generic SOCKS5 dropdown does not tell you whether the application resolves the destination locally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Browsers and remote DNS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Browsers usually expose the choice as a checkbox or policy rather than as a <code>socks5h:\/\/<\/code> URL. In Firefox, open the connection settings, select SOCKS v5, enter the proxy host and port, and enable <strong>Proxy DNS when using SOCKS v5<\/strong>. Mozilla documents this behavior as the <code>proxyDNS<\/code> setting; current Firefox documentation says it defaults to true for SOCKS5, while older Firefox versions used a different default, so make the setting explicit when you need repeatable behavior.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft documents a different behavior for Edge: SOCKS5 requests use proxy-side name resolution, and Edge does not expose the Firefox-style toggle. Read the browser\u2019s current proxy documentation when you deploy managed settings rather than assuming that all Chromium-based tools share Firefox\u2019s controls.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Browser settings apply only to that browser profile. A scraper, command-line tool, browser extension, update service, or separate application may use its own resolver or bypass the browser proxy. Check these points when a browser appears clean but a worker still leaks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Confirm the proxy is configured as SOCKS v5, not SOCKS4.<\/li>\n\n\n<li>Enable the browser\u2019s remote-DNS option when one exists.<\/li>\n\n\n<li>Review bypass or <code>no_proxy<\/code> entries for destination domains.<\/li>\n\n\n<li>Check extensions that make direct network requests.<\/li>\n\n\n<li>Test IPv4 and IPv6 behavior if your machine has both enabled.<\/li>\n\n\n<li>Remember that DNS prefetching or preconnect features can create lookups outside the request you are watching.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For a client that accepts a proxy URL, prefer <code>socks5h:\/\/<\/code>. For a client with separate browser fields, select SOCKS v5 and enable its remote-DNS control.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to test for a DNS leak<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use a test hostname that has not already been resolved and a proxy endpoint that you are authorized to use. A cached result can make a local lookup invisible in a packet capture, while the proxy endpoint\u2019s own hostname will still be resolved locally.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Watch local DNS traffic<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">On Linux, start a capture in one terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tcpdump -ni any '(udp port 53 or tcp port 53)'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In a second terminal, run the same hostname through <code>socks5:\/\/<\/code> and then through <code>socks5h:\/\/<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl --proxy \"socks5:\/\/${PROXY_HOST}:${PROXY_PORT}\" \\\n  --proxy-user \"${PROXY_USER}:${PROXY_PASS}\" \\\n  \"https:\/\/a-fresh-hostname.example\/\"\n\ncurl --proxy \"socks5h:\/\/${PROXY_HOST}:${PROXY_PORT}\" \\\n  --proxy-user \"${PROXY_USER}:${PROXY_PASS}\" \\\n  \"https:\/\/a-different-fresh-hostname.example\/\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With the usual local-resolver setup, the first request produces a local DNS query for its destination, while the second should not. You may still see a query for the proxy hostname. That is expected and is not the destination leak you are testing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Use a controlled DNS name when possible<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The strongest test uses a unique subdomain under a domain you control and an authoritative DNS log you can inspect. Put a random label in the URL, make one request with <code>socks5h:\/\/<\/code>, and check which resolver received the query. Repeat with <code>socks5:\/\/<\/code> as a control.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This avoids relying on a public \u201cDNS leak test\u201d page and lets you distinguish a query from your machine, a local network resolver, or the proxy\u2019s network. Do not reuse a cached label, and do not send sensitive hostnames to a third-party test service.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Account for encrypted DNS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Port 53 capture is useful but not universal. Your operating system or browser may use DNS over HTTPS or DNS over TLS, so the lookup could travel inside HTTPS or TLS instead of appearing as a plain DNS packet. In that case, inspect the browser\u2019s DNS settings and use a controlled authoritative log alongside the local capture.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result you want is consistent: the destination hostname is not resolved by the client\u2019s ordinary local resolver when the request is configured for proxy-side DNS. If the proxy itself cannot resolve the hostname, the request may fail; a failure is not evidence that the hostname was resolved locally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common mistakes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Confusing the proxy hostname with the destination hostname<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>proxy.example.net<\/code> is the server you connect to first. <code>example.com<\/code> is the destination. <code>socks5h<\/code> does not remove the need to resolve the proxy endpoint locally; it changes the handling of the destination hostname.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Assuming all SOCKS5 fields mean remote DNS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">SOCKS5 is capable of carrying a hostname, but the client may choose to resolve that hostname first. Check the exact client option, scheme, or browser setting.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using <code>socks5h<\/code> with a client that does not support it<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Some applications reject an unknown scheme or silently fall back to a different proxy path. If the client has separate fields, use its documented remote-DNS setting. If it has no such setting, confirm behavior with a controlled test rather than guessing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Testing only with an IP address<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An IP-literal URL avoids the destination DNS step, so it cannot show whether normal hostnames leak. Use a fresh hostname for the DNS test and a normal hostname for the actual traffic test.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Treating one successful page load as proof<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A page can load through the proxy while DNS, prefetching, an extension, or another application uses the local network. Test the exact client and workflow that will run in production.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Is socks5h safer than socks5?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For destination-DNS privacy, <code>socks5h<\/code> is usually the correct choice because it asks the SOCKS5 proxy to resolve the hostname. It is not a complete privacy guarantee: the proxy still receives the hostname, and your client still needs to resolve the proxy endpoint.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does SOCKS5 always prevent DNS leaks?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. SOCKS5 supports hostname requests, but a client can resolve the destination locally and send only the resulting IP address to the proxy. Use the client\u2019s remote-DNS option or the <code>socks5h:\/\/<\/code> scheme, then verify the path.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What does the h mean in socks5h?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>h<\/code> means \u201chostname\u201d. It is a client URL convention that tells supported libraries to pass the destination hostname to the proxy for resolution. It does not describe a new SOCKS protocol version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does Python Requests support socks5h?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Install Requests\u2019 optional SOCKS dependencies, then use a <code>socks5h:\/\/<\/code> proxy URL in the <code>http<\/code> and <code>https<\/code> entries of the <code>proxies<\/code> dictionary. Requests documents <code>socks5:\/\/<\/code> as client-side DNS and <code>socks5h:\/\/<\/code> as proxy-side DNS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Should I use socks5 or socks5h in curl?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>socks5h:\/\/<\/code> or <code>--socks5-hostname<\/code> when the destination hostname should be resolved through the proxy. Use <code>socks5:\/\/<\/code> or <code>--socks5<\/code> only when local destination DNS is intentional or required by your workflow.<\/p>\n\n\n\n<aside class=\"ap-cta\" aria-label=\"Run your own 4G proxies\"><div class=\"ap-cta__content\"><p class=\"ap-cta__eyebrow\">Proxy routing<\/p><p class=\"ap-cta__title\">Run your own 4G proxies<\/p><p class=\"ap-cta__text\">Talk through a Raspberry Pi and Huawei HiLink setup with ProxyKite.<\/p><\/div><a class=\"ap-cta__btn\" href=\"https:\/\/proxykite.com\/contact\">Contact us<\/a><\/aside>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Is socks5h safer than socks5?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"For destination-DNS privacy, socks5h is usually the correct choice because it asks the SOCKS5 proxy to resolve the hostname. It is not a complete privacy guarantee: the proxy still receives the hostname, and your client still needs to resolve the proxy endpoint.\"}}, {\"@type\": \"Question\", \"name\": \"Does SOCKS5 always prevent DNS leaks?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. SOCKS5 supports hostname requests, but a client can resolve the destination locally and send only the resulting IP address to the proxy. Use the client\u2019s remote-DNS option or the socks5h:\/\/ scheme, then verify the path.\"}}, {\"@type\": \"Question\", \"name\": \"What does the h mean in socks5h?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"The h means \u201chostname\u201d. It is a client URL convention that tells supported libraries to pass the destination hostname to the proxy for resolution. It does not describe a new SOCKS protocol version.\"}}, {\"@type\": \"Question\", \"name\": \"Does Python Requests support socks5h?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes. Install Requests\u2019 optional SOCKS dependencies, then use a socks5h:\/\/ proxy URL in the http and https entries of the proxies dictionary. Requests documents socks5:\/\/ as client-side DNS and socks5h:\/\/ as proxy-side DNS.\"}}, {\"@type\": \"Question\", \"name\": \"Should I use socks5 or socks5h in curl?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Use socks5h:\/\/ or --socks5-hostname when the destination hostname should be resolved through the proxy. Use socks5:\/\/ or --socks5 only when local destination DNS is intentional or required by your workflow.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Learn socks5h vs socks5, see where DNS resolves, configure curl, Python Requests and Firefox, and verify that your proxy does not leak hostnames.","protected":false},"author":1,"featured_media":357,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[6],"tags":[121,247,131,135,246],"class_list":["post-355","post","type-post","status-publish","format-standard","has-post-thumbnail","category-troubleshooting","tag-curl","tag-dns-leak","tag-python-requests","tag-socks5","tag-socks5h","cs-entry"],"_links":{"self":[{"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/posts\/355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/comments?post=355"}],"version-history":[{"count":1,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"predecessor-version":[{"id":635,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/posts\/355\/revisions\/635"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/media\/357"}],"wp:attachment":[{"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/proxykite.com\/blog\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}