shape1

SOCKS5 vs SOCKS5h: Remote DNS Resolution, DNS Leaks, and How to Test Them

SOCKS5 vs SOCKS5h: the Short Answer

The difference between SOCKS5 vs SOCKS5h usually comes down to where a hostname is resolved into an IP address:

  • socks5:// commonly means the client resolves the hostname locally before asking the proxy to connect.
  • socks5h:// commonly means the client sends the hostname to the proxy, allowing the proxy to resolve it remotely.

The extra h means “hostname.” It is a client-side URL-scheme convention, most notably used by tools such as curl. It is not a separate SOCKS protocol version or an extension defined by the SOCKS5 specification.

This distinction matters because local DNS resolution can disclose the domains you intend to visit to your configured DNS resolver or local network. Remote resolution can move that lookup to the proxy side, but it does not make browsing anonymous, encrypt every connection, or prevent every other type of IP exposure.

Configuration also depends on the application. Using socks5h in curl does not automatically change how a browser, operating system, or another application handles DNS.

What Changes Between SOCKS5 and SOCKS5h?

SOCKS5 is a proxy protocol defined in RFC 1928. A client connects to the SOCKS5 server, optionally authenticates, and requests an operation such as CONNECT.

Side-by-side network diagram showing a client resolving a destination locally before using a SOCKS5 proxy, compared with sending the hostname to a proxy for remote resolution.

For a TCP connection, the client can provide the target in several forms:

  • An IPv4 address
  • An IPv6 address
  • A domain name

The important decision happens before the connection request is sent.

Standard SOCKS5 behavior in many clients

With a socks5:// proxy URL, many clients first ask the local operating system or configured DNS resolver for the address of a hostname.

For example, a client may want to reach:

example.net

The connection flow may look like this:

Client → local DNS resolver: What is example.net?
Client → SOCKS5 proxy: CONNECT 93.184.216.34:443
SOCKS5 proxy → destination: 93.184.216.34:443

The SOCKS5 proxy handles the TCP connection to the resolved IP address. However, the initial DNS lookup has already occurred outside the proxy path.

SOCKS5h behavior

With socks5h://, a compatible client sends the domain name in its SOCKS5 CONNECT request instead of resolving it first.

Client → SOCKS5 proxy: CONNECT example.net:443
SOCKS5 proxy → its DNS path: What is example.net?
SOCKS5 proxy → destination: resolved-address:443

This is often described as SOCKS5 remote DNS or proxy DNS resolution. The DNS query is made from the proxy side, subject to the proxy server’s implementation, network configuration, and resolver settings.

The proxy must resolve the name somehow before it can make a TCP connection. RFC 1928 allows a domain-name address type in a request, but it does not specify which recursive resolver the proxy must use or how a commercial provider operates its DNS infrastructure.

Local DNS Resolution vs Proxy-Side DNS Resolution

DNS translates names such as www.example.net into IP addresses. Without an address, an application generally cannot initiate an ordinary TCP connection to a hostname.

Network illustration contrasting a local DNS lookup through a home network with a hostname resolved on the proxy side before reaching a website.

Local resolution

In a local-resolution setup, the application uses DNS configured on the device, router, operating system, browser, or encrypted-DNS feature.

Depending on the device and network, a lookup may go to:

  • A home or office router
  • An ISP resolver
  • An enterprise DNS server
  • A manually configured public resolver
  • A browser’s DNS-over-HTTPS provider
  • A locally running resolver or security product

This lookup may occur before the application reaches the SOCKS5 proxy. As a result, the local resolver can potentially observe the queried domain, while the destination website sees the proxy exit IP for the proxied TCP connection.

Remote resolution

In a remote-resolution setup, the SOCKS client supplies the hostname to the proxy. The proxy resolves it through its own available DNS path.

This can help prevent the local DNS resolver from receiving that particular lookup. It can also produce geographically different DNS answers. Content-delivery networks sometimes return different addresses based on the apparent location of the resolver, so resolving near the proxy may be useful when testing location-specific delivery behavior.

Remote DNS resolution is not automatically better in every environment. An internal hostname, such as printer.office.example, may resolve only through a company DNS server reachable from the local network. Sending that hostname to a remote proxy will likely fail or return a different result.

The proxy hostname still needs DNS

Even when the destination hostname is resolved remotely, the client may need to resolve the proxy server hostname locally before it can connect to the proxy.

For example:

socks5h://proxy.example-provider.net:1080

The device may first resolve proxy.example-provider.net through its usual DNS configuration. To avoid that lookup, some clients allow a proxy IP address instead of a hostname. This creates operational tradeoffs: provider endpoint changes, certificate validation requirements, load balancing, and IPv6 support may depend on using the provider’s hostname.

When Can a SOCKS5 DNS Leak Occur?

A SOCKS5 DNS leak occurs when domains or DNS traffic expected to use the proxy path instead use a local or otherwise unintended DNS path.

Diagram showing a browser connection using a SOCKS proxy while separate DNS and encrypted DNS traffic bypass the proxy to reach other resolvers.

A leak is configuration-dependent. It is not proof that SOCKS5 itself is broken.

The application resolves locally

The most common cause is an application configured with a normal SOCKS5 proxy while resolving names before sending its CONNECT request.

This is expected behavior for some clients and configurations. Use a remote-DNS setting or a socks5h scheme only where the application explicitly supports it.

The application bypasses the proxy

A device can run many networked processes at once. Configuring one browser or command-line tool does not proxy every application.

Common bypasses include:

  • Background updaters and telemetry services
  • Other browser profiles or extensions
  • Apps with separate proxy settings
  • Operating-system services
  • A proxy bypass list such as localhost or internal domains
  • Applications that do not support SOCKS5

A browser IP check verifies only the browser tab used for the test. It does not prove that the operating system is fully proxied.

Browser encrypted DNS changes the path

Modern browsers may use DNS-over-HTTPS (DoH). Instead of sending conventional DNS traffic to port 53, the browser can make HTTPS requests to a DNS provider.

This can reduce visibility to a local network observer, but it may still bypass the SOCKS5 proxy if the browser’s DoH connection is direct. In that case, there may be no visible UDP or TCP port 53 traffic, yet the browser may still be resolving domains outside the intended proxy route.

For a meaningful test, check both the proxy configuration and the browser’s encrypted-DNS settings. Behavior varies among browsers, versions, policies, and extensions.

DNS and connections follow different network paths

A VPN, split tunnel, firewall policy, security agent, or virtual machine can route DNS differently from application traffic. For instance, the TCP connection may go through a SOCKS5 proxy while the device’s DNS remains directed to a corporate resolver.

IPv6 can create a similar mismatch. A test that checks only IPv4 does not prove that IPv6 traffic or IPv6 DNS behavior follows the same policy.

The proxy does not support the expected behavior

A provider may offer a SOCKS5 endpoint that supports TCP CONNECT but not every optional capability or client behavior. Remote hostname resolution for a TCP request is distinct from UDP relay support.

SOCKS5 also defines UDP ASSOCIATE, but support is implementation-dependent. A proxy that works for browser TCP traffic is not necessarily a UDP proxy. Likewise, a general UDP connectivity test does not prove that the proxy supports SOCKS5 UDP ASSOCIATE. For protocol details, see SOCKS5 UDP Associate: How UDP Proxying Works, Testing, and Troubleshooting.

Configuration Examples in Common Clients

Use these examples as patterns, then confirm the specific application’s documentation and test its behavior. Proxy capabilities, authentication methods, and remote-DNS support vary.

curl: socks5:// versus socks5h://

curl makes the distinction explicit.

Local resolution:

curl --proxy socks5://USERNAME:PASSWORD@PROXY_HOST:PORT https://example.net/

Remote resolution:

curl --proxy socks5h://USERNAME:PASSWORD@PROXY_HOST:PORT https://example.net/

With socks5h, curl passes the hostname to the SOCKS proxy. With socks5, curl resolves the target hostname locally by default.

Use URL encoding if a username or password includes reserved URL characters such as @, :, /, or #. Alternatively, use curl options designed for credentials rather than placing sensitive values directly in shell history.

For a SOCKS5 endpoint and connection details, consult the relevant ProxySocks5 SOCKS5 proxy page. Confirm the plan and endpoint documentation rather than assuming a particular authentication or DNS implementation.

Firefox: enable proxy DNS for SOCKS

Firefox has SOCKS proxy settings and a remote-DNS preference. In a test profile:

  1. Open Firefox settings and locate the network proxy configuration.
  2. Select manual proxy configuration.
  3. Enter the SOCKS host and port.
  4. Choose SOCKS v5.
  5. In about:config, locate network.proxy.socks_remote_dns.
  6. Set it to true if your intended configuration requires proxy-side DNS.
  7. Review Firefox’s DNS-over-HTTPS settings and test them as part of the same configuration.

The exact settings layout can change between Firefox versions. Selecting SOCKS v5 alone should not be treated as proof that hostname lookups are remote.

Applications without a remote-DNS option

Some applications support a SOCKS5 proxy host and port but do not provide a choice about hostname resolution. Others accept only HTTP proxy settings.

Do not assume that entering a SOCKS5 endpoint makes DNS remote. First determine whether the application:

  • Resolves hostnames before connecting
  • Sends domain names to the SOCKS server
  • Uses an internal DNS-over-HTTPS client
  • Supports only HTTP or HTTPS proxy protocols
  • Has a proxy bypass list

For protocol-selection guidance, see Residential SOCKS5 Proxies vs HTTP(S): Compatibility Guide.

How to Test the Proxy DNS Path

A reliable DNS test verifies the behavior of the exact client, profile, and network you plan to use. One successful webpage load is not enough.

Controlled testing diagram showing a client, local resolver logs, proxy-side resolver, unique test domain, authoritative DNS service, and destination connection through a proxy.

1. Establish a baseline without the proxy

Before changing settings, record the normal behavior:

  • Check the public IP shown to a website.
  • Note the DNS servers or encrypted-DNS service configured on the device.
  • If you administer the resolver, review its query logs.
  • Identify browser DoH, VPN, endpoint security, and local DNS filtering features.

This makes it easier to identify which change affected the path.

2. Test the client with a hostname, not only an IP address

A connection to an IP address does not require a DNS lookup, so it cannot verify remote hostname resolution.

Use a hostname with the exact application configuration you intend to deploy. Then separately confirm that the destination connection appears from the expected proxy exit IP.

For curl, compare:

curl -v --proxy socks5://USER:PASS@PROXY_HOST:PORT https://example.net/

with:

curl -v --proxy socks5h://USER:PASS@PROXY_HOST:PORT https://example.net/

Verbose output can help diagnose proxy negotiation and connection failures. It does not necessarily show every DNS query made by the operating system or browser.

3. Observe the local network path

On a controlled network, capture or monitor local DNS activity while running the test.

Possible approaches include:

  • Reviewing query logs on a DNS resolver you administer
  • Using a firewall or router log
  • Capturing traffic with Wireshark or tcpdump
  • Monitoring outbound connections to known DoH endpoints

If a local resolver records a lookup for the test hostname while testing expected remote DNS, investigate further. The lookup may come from the target application, the operating system, browser prefetching, a security tool, or another process.

A lack of port 53 traffic is not conclusive if DoH or DNS-over-TLS is enabled. Check for encrypted DNS connections and browser-specific DNS behavior.

4. Use a unique controlled test hostname where possible

The strongest method is to use a unique hostname under a domain and authoritative DNS service you control. Review the authoritative query logs while testing.

A unique hostname reduces ambiguity from browser caches, DNS caches, prefetching, and unrelated user activity. For example, create a temporary hostname such as:

test-2026-unique.example.net

Then compare observations:

  • Does your local resolver receive the query?
  • Does the proxy-side DNS path reach the authoritative DNS server?
  • Does the destination connection come from the proxy exit IP?

Authoritative DNS logs can show that a resolver queried the domain, but they do not always identify the individual client. Recursive resolvers cache answers and may use shared infrastructure.

5. Repeat after clearing relevant caches

DNS results may be cached by the application, operating system, router, recursive resolver, or browser. Cached results can make a later test appear to avoid DNS entirely.

Use a fresh, unique hostname for each test when possible. Avoid relying only on clearing a local cache because upstream caches may still contain the result.

6. Test failure behavior

A good test proxy DNS leak workflow also examines failures.

Try a deliberately nonexistent hostname and observe where the resulting lookup occurs. Then test a hostname that resolves only on your internal DNS, if applicable. This can reveal whether a client silently falls back to local DNS when remote resolution fails.

Do not assume fallback behavior is universal. It differs by client and configuration.

What Remote DNS Does Not Protect

Remote DNS is one privacy control, not a complete security model.

SOCKS5 does not inherently encrypt traffic

SOCKS5 forwards connections; it does not itself encrypt application traffic between the client and proxy. HTTPS can protect web content between the browser and website, but it does not make every metadata field invisible.

Use secure protocols such as HTTPS, SSH, or other application-layer encryption where appropriate. Treat proxy credentials carefully as well: the username/password sub-negotiation described in RFC 1929 is not encryption.

Websites can still identify the requested host

For HTTPS connections, the destination hostname may be visible through mechanisms such as TLS Server Name Indication (SNI), although encrypted Client Hello support can change this in compatible environments. After TLS terminates at the destination, the HTTP request authority is visible to that destination: Host in HTTP/1.1 and :authority in HTTP/2 and HTTP/3.

Remote DNS prevents a local DNS resolver from receiving a specific lookup when correctly configured. It does not hide the hostname from the website being contacted.

Other browser and device signals remain

A proxy may change the source IP observed by the destination, but websites can use cookies, login sessions, browser fingerprints, time zone, language, WebRTC behavior, and other signals.

Test WebRTC separately from DNS. WebRTC may create connectivity paths that do not match ordinary browser requests. See WebRTC Leak Test: Find and Reduce IP Exposure for a focused testing workflow.

The proxy operator and its resolver are part of the trust model

With remote resolution, the proxy-side network or DNS resolver can potentially observe requested domain names. Consider who operates the proxy, how it authenticates clients, its applicable policies, and the sensitivity of the activity.

A DNS proxy may be relevant when DNS routing is the specific requirement, but its behavior should be evaluated using its documented configuration and testing in the intended client environment.

Troubleshooting SOCKS5h and DNS Problems

The site works with socks5 but not socks5h

The proxy-side resolver may be unable to resolve the name, the name may be private to the local network, or the proxy may reject the request. Test a public hostname first, then review proxy endpoint details and authentication.

The proxy IP is visible, but local DNS queries still appear

Check whether the tested application actually supports remote resolution. Inspect browser DoH settings, extensions, background prefetching, and other processes. A visible proxy IP proves that the HTTP or TCP connection used the proxy; it does not independently prove the DNS path.

A domain resolves differently through the proxy

This can be normal. DNS responses can vary by resolver location, resolver policy, IP version, CDN routing, split-horizon DNS, and cached answers. Compare records and TTL values, and test from the same application configuration.

UDP-based applications fail

Do not switch to socks5h expecting it to enable UDP. Remote hostname resolution for TCP CONNECT and SOCKS5 UDP ASSOCIATE are different functions. Verify whether both the client and proxy explicitly support UDP relay if the application requires it.

FAQ

1. Is SOCKS5h more secure than SOCKS5?

SOCKS5h can reduce exposure of destination DNS queries to the local DNS path by sending the hostname to the proxy for resolution. It does not encrypt SOCKS5 traffic by itself, secure an unsafe application, or guarantee anonymity. Security depends on the application protocol, proxy transport, device configuration, and network environment.

2. Is SOCKS5h an official SOCKS5 protocol version?

No. SOCKS5 is defined by RFC 1928. `socks5h` is a proxy URL-scheme convention used by some clients, including curl, to request remote hostname resolution. Support is client-specific.

3. Does SOCKS5h prevent every DNS leak?

No. A client may still resolve the proxy hostname locally, use browser DNS-over-HTTPS directly, run background DNS lookups, or bypass the proxy for some traffic. Test the exact application, profile, and network configuration.

4. Does a SOCKS5 proxy support UDP when SOCKS5h works?

Not necessarily. SOCKS5h typically concerns how a client submits a hostname for a TCP `CONNECT` request. UDP proxying requires `UDP ASSOCIATE` support from both the client and proxy, which is implementation-dependent.

5. Can an IP-check website prove remote DNS is working?

No. An IP-check website can show the apparent IP address of the connection reaching that website. It does not show where the hostname was resolved. Use resolver logs, controlled DNS testing, local traffic observation, and application-specific configuration checks.

shape6

Buy Proxy, SOCKS5 & ShadowSocks Now

Buy Proxy now HTTP Proxies or SOCKS5, Dedicated or Shared, Residential or Datacenter. Fully Anonymous and Premium.

Buy Proxy
shape5shape4

What Can We Offer You?

We offer a unique proxy infrastructure, monitored 24/7 with a 99% uptime. In the rare event of a failure, we take immediate action to resolve the issue.

Fast HTTP and SOCKS5 Proxies

Our proxy servers are optimized for performance, powered by a 1Gb/s network. Whether you use our residential or datacenter proxies, you'll experience seamless performance.

Privacy and Security Built In

Our static proxies and VPNs (residential or datacenter) ensure 100% anonymity without any IP or DNS leaks. We maintain a no-logs policy.

Pick Country, State, or City

Select proxies by city, state, or country. Our static IP proxies, VPNs, residential or datacenter, can be filtered by your desired location. Residential proxies can also be filtered by ISP.

Proxies With Unlimited Bandwidth

Our Dedicated, Shared, Residential Proxy, SOCKS5, Shadowsocks, and VPNs offer unlimited bandwidth, allowing you to use them as much as you need without any concerns.

QUIC and UDP Support

We are supporting QUIC and UDP on SOCKS5, Shadowsocks, and WireGuard VPN for apps that need faster, real-time traffic.

Amnezia VPN Obfuscation

We are offering Amnezia-based obfuscation for VPN users who need traffic to look more like regular HTTPS.

Choose Your TCP Fingerprint

We offer static Proxies and VPNs with Windows as the default TCP fingerprint, plus MacOs, Linux, Android, and iOS options.

Instant Activation, No Waiting

Purchase proxies with Instant Activation using a Card or PayPal. Transactions with cryptocurrencies require network confirmations.

Dual Authentication

Opt for username and password authentication, or authenticate by adding your IP address to our system. Access your proxy password or add your IP in your account.

Monthly IP Refresh

We offer monthly proxies, both residential and datacenter. For long-term purchases, we provide the option to change proxies directly in your account.

Helpful Support When You Need It

We understand the importance of support. If you have questions about our services, contact us via Live Chat. For any issues, open a support ticket in your account.

Multiple Payment Methods: From Card to Crypto

Buy proxies with Card, PayPal, Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), Solana (SOL), TRON (TRX), Toncoin (TON), BNB, Polygon, Avalanche, XRP, Cardano, Dogecoin, USDT, USDC, DAI, EURT, and 70+ supported cryptocurrencies.

Our Services

We offer a variety of static and dynamic IP solutions designed for legitimate business and technical use, with global coverage tailored to your project requirements.

High quality & private proxies

Dream no more! Get acquainted with our products today: protected proxy-servers, at incredible speed and minimum cost from you. Still not convinced? Check our proxies features out: - work with any sites/programs - supports HTTP/HTTPS, SOCKS5, ShadowSocks, Trojan protocols - simple login: your proxy password or by your IP

With our proxies you get fast, stable and most important, an anonymous tool to get by on the internet. High quality proxies is our motto. Try our products today: spare 5 minutes from your time to gain continuos work-flow.

Buy Proxy
shape7shape8
logo
We offer premium and secure proxy and VPN services designed for legitimate business, development, and research use cases. Our products include residential and dedicated SOCKS5, HTTP, Shadowsocks, Trojan proxies, shared proxies, and static IP VPNs with global coverage
DLR TECHNOLOGIES S.R.L, Brasov, RomaniaCopyright © 2026 ProxySocks5. All rights reserved