Tutorials · 13 min read

How to Set Up a SOCKS5 Proxy on Any Device: Windows, macOS, Linux, Android and iOS

A device-by-device walkthrough for configuring SOCKS5 proxies correctly in 2026 — including the DNS leak settings almost every tutorial forgets, and how to verify the connection before you trust it.

Author

Best SOCKS5 Editorial

Published

July 30, 2026

Reading time

13 minutes

UpdatedThis article was reviewed and refreshed on July 30, 2026.
How to Set Up a SOCKS5 Proxy on Any Device: Windows, macOS, Linux, Android and iOS

Setting up a SOCKS5 proxy is one of those tasks that looks trivial in a five-line tutorial and then quietly fails in production. The connection works, pages load, and everything seems fine — until you check your DNS resolver and discover that your ISP has been resolving every hostname you visited. Or the proxy works in Chrome but not in your Python worker. Or it works on desktop and silently falls back to the mobile carrier on your phone.

This guide is the version we wish existed when we started benchmarking providers. It walks through configuration on every major platform, explains *why* each setting matters, and ends with a verification routine you should run every single time you change a proxy endpoint.

If you are still choosing a provider, read our best SOCKS5 proxy providers ranking first — configuration is far easier when the endpoint you are configuring is actually reliable.

Before you configure anything: what you should have in hand

Every commercial SOCKS5 provider hands you the same four pieces of information, even if they label them differently:

1. Hostname or IP — something like gate.provider.com or a raw IPv4 address. 2. Port — commonly 1080 (the historical SOCKS port), but providers increasingly use 7777, 9000, 10000+ for rotating gateways. 3. Username — often with modifiers baked in, e.g. user-country-us-session-abc123. 4. Password.

Some providers use IP authentication instead of credentials: you whitelist your server's public IP in the dashboard and connect with no username. IP auth is convenient for fixed servers and terrible for laptops, because your IP changes every time you move networks.

Write these down before you start. The single most common "the proxy is broken" support ticket is a typo in the port.

Understand what SOCKS5 actually does

SOCKS5 is a session-layer protocol standardised in RFC 1928. It forwards TCP (and optionally UDP) between you and a destination without parsing or rewriting the payload. The SOCKS protocol on Wikipedia is a good neutral primer if you want the historical context.

The practical consequence: SOCKS5 does not encrypt anything. It moves bytes. If you send plain HTTP through a SOCKS5 proxy, the proxy operator can read it. Every serious workflow layers TLS on top — HTTPS, or SSH, or a tunnelled protocol. We cover the threat model in detail in our SOCKS5 security and anonymity guide.

Windows 10 and Windows 11

Windows has a system proxy setting, and you should mostly ignore it.

The built-in Settings → Network & Internet → Proxy panel only supports HTTP/HTTPS proxies through the "Manual proxy setup" box. There is no SOCKS5 field. The old Internet Options → Connections → LAN Settings → Advanced dialog has a "Socks" row, but it is legacy WinINET plumbing: it applies to Internet Explorer-era applications, is ignored by Chrome's network stack in most configurations, and does not proxy DNS.

You have three real options on Windows.

Configure the proxy in the application that needs it. Firefox, most download managers, Telegram, and every scriptable HTTP client support SOCKS5 natively. This is the safest approach because you always know exactly what is proxied.

Option 2: A Chromium launch flag

Create a shortcut to Chrome or Edge with an explicit proxy server:

chrome.exe --proxy-server="socks5://gate.provider.com:7777"
  --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"

The --host-resolver-rules flag is the part everyone skips. Without it, Chromium resolves DNS locally and your ISP sees every hostname. With it, resolution is pushed through the proxy connection.

Chromium's flag does not accept inline credentials. If your provider requires username/password, use an authenticated local relay (Option 3) or switch that endpoint to IP authentication.

Option 3: A local SOCKS-to-HTTP relay

Tools such as Proxifier, Proxycap, or the open-source gost and 3proxy create a local listener that forwards everything into your SOCKS5 endpoint. This is how you proxy applications that have no proxy settings at all.

A minimal gost command that exposes an authenticated upstream on 127.0.0.1:1081:

gost -L socks5://:1081 -F socks5://user:pass@gate.provider.com:7777

Now any app pointed at 127.0.0.1:1081 uses your upstream, credentials included, without you pasting a password into ten different config screens.

macOS

macOS does expose SOCKS natively, and it works well.

Go to System Settings → Network → (your interface) → Details → Proxies, enable SOCKS proxy, and enter the host and port. Tick "Proxy server requires password" and add your credentials.

Two caveats that trip people up:

  • The setting is per network service. Configure it on Wi-Fi and it will not apply when you plug in Ethernet or tether. Configure both.
  • macOS proxies DNS through the SOCKS server for most applications, but not universally. Verify rather than assume — the verification section below tells you how.

On the command line, macOS ignores the GUI setting for most CLI tools. Set environment variables instead:

export ALL_PROXY="socks5h://user:pass@gate.provider.com:7777"
curl https://api.ipify.org

Note socks5h, not socks5. The trailing h means "resolve hostnames at the proxy". This is the single most important character in this entire article.

Linux

Linux gives you the cleanest options because everything is a config file or an environment variable.

Environment variables (per shell)

export ALL_PROXY="socks5h://user:pass@gate.provider.com:7777"
export NO_PROXY="localhost,127.0.0.1,::1,.internal"

NO_PROXY matters more than people expect. Without it, your health checks, metrics scrapers, and internal service calls all get routed out through a paid residential IP and back — slow, expensive, and occasionally a security incident.

GNOME / KDE system settings

Both desktops expose a SOCKS host field under network proxy settings. They export the same environment variables to GUI applications, so treat this as a convenience wrapper rather than a distinct mechanism.

System-wide with proxychains

proxychains4 intercepts libc socket calls and redirects them. Edit /etc/proxychains4.conf:

strict_chain
proxy_dns
[ProxyList]
socks5 gate.provider.com 7777 user pass

Then prefix commands: proxychains4 curl https://api.ipify.org. Keep proxy_dns enabled. Note that proxychains cannot intercept statically linked binaries or Go programs that bypass libc — Go's runtime does its own networking, so for Go tooling you must configure the proxy in the application.

systemd services

For a long-running scraper or bot, put the proxy in the unit file rather than a shell profile:

[Service]
Environment="ALL_PROXY=socks5h://user:pass@gate.provider.com:7777"
Environment="NO_PROXY=localhost,127.0.0.1"

This survives reboots and does not depend on whoever last logged in.

Android

Android's native Wi-Fi proxy settings only support HTTP proxies, and only for Wi-Fi — never for mobile data. For SOCKS5 you need an app that creates a local VPN interface and forwards traffic into your proxy.

The pattern is the same across the popular options:

1. Install a SOCKS-capable tunnelling client from Google Play. 2. Create a profile: server, port, username, password, protocol SOCKS5. 3. Enable remote DNS (sometimes labelled "proxy DNS" or "DNS over proxy"). 4. Set the app to route all apps, or explicitly select the apps you want proxied. 5. Approve the VPN permission prompt — Android requires it because the app is creating a virtual interface.

Two Android-specific warnings:

  • Battery optimisation will kill your tunnel. Exempt the app in Settings → Battery, or your proxy will silently drop when the screen sleeps and your traffic will egress over the carrier.
  • Private DNS bypasses the tunnel. If Settings → Network → Private DNS is set to a hostname, Android may resolve out-of-band. Set it to "Off" or "Automatic" while proxying.

iOS and iPadOS

iOS is the most restrictive platform. There is no system SOCKS5 setting, and no way to force all apps through a proxy without either a VPN profile or a tunnelling app that uses the NetworkExtension API.

Your realistic options:

  • A tunnelling app that wraps SOCKS5 in a local VPN profile. Same configuration fields as Android, same requirement to enable remote DNS.
  • Per-app proxying in apps that support it (a handful of browsers and download tools).
  • A shared upstream: run the proxy client on a router or a small VPS and point the iPhone at that. This is the most reliable approach if you need consistent behaviour across a household or test fleet.

iOS aggressively suspends background apps. If you need a proxy to persist for hours, an always-on configuration profile is the only dependable route.

Routers and network-wide setups

Consumer firmware rarely supports SOCKS5 as an outbound client. OpenWrt does, via redsocks or gost, and this is how people proxy smart TVs, consoles, and IoT devices that have no proxy settings of their own.

The design is simple: run the SOCKS client on the router, redirect outbound TCP through it with an iptables/nftables rule, and force DNS to a resolver that is itself reachable only through the tunnel. Get the DNS part wrong and every device on your LAN leaks.

If you are testing at scale, a small VPS in the same region as your exit IPs makes a better forwarding node than a router. Reference pricing and specs on vpsrated.com/proxy if you want to compare hosts before renting one.

Browsers, in detail

Firefox

Firefox is the best browser for SOCKS5 because it implements it properly. Go to Settings → General → Network Settings → Manual proxy configuration, fill in the SOCKS Host and Port, choose SOCKS v5, and — critically — tick "Proxy DNS when using SOCKS v5."

Firefox prompts for credentials on first connection and remembers them for the session.

For multi-identity work, Firefox's Multi-Account Containers extension plus per-container proxy add-ons let you run several exit IPs in one window. That is far lighter than spinning up separate browser profiles.

Chrome, Edge, Brave

Chromium browsers read the OS proxy setting on macOS and Linux, and only accept SOCKS5 via launch flags on Windows. There is no in-browser SOCKS5 UI. Extensions that claim to add one are usually configuring an HTTP proxy under the hood, or worse, routing your traffic through the extension author's own infrastructure. Read the permissions before you install one.

Command-line and code

cURL

curl -x socks5h://user:pass@gate.provider.com:7777 https://api.ipify.org

Our cURL command generator builds these for you with the right escaping when your password contains special characters — a surprisingly frequent cause of "authentication failed".

Python

import requests

proxies = {
    "http": "socks5h://user:pass@gate.provider.com:7777",
    "https": "socks5h://user:pass@gate.provider.com:7777",
}
r = requests.get("https://api.ipify.org?format=json", proxies=proxies, timeout=20)
print(r.json())

You need pip install "requests[socks]" for the SOCKS handler. The full walkthrough, including aiohttp and Playwright, is in our SOCKS5 in Python guide.

Node.js

import { SocksProxyAgent } from "socks-proxy-agent";

const agent = new SocksProxyAgent("socks5h://user:pass@gate.provider.com:7777");
const res = await fetch("https://api.ipify.org?format=json", { dispatcher: agent });

SSH as a SOCKS5 server

You do not always need a commercial provider. Any server you can SSH into can act as a SOCKS5 proxy:

ssh -D 1080 -q -N user@your-server.example.com

Point applications at 127.0.0.1:1080. This gives you a single static datacenter IP — perfect for bypassing a geo-restriction on your own infrastructure, useless for anything that requires IP diversity.

Verify before you trust: the five-minute checklist

Configuration is not finished until it is verified. Run these five checks in order every time you change an endpoint.

1. Confirm the exit IP changed.

curl https://api.ipify.org                                  # your real IP
curl -x socks5h://user:pass@gate:7777 https://api.ipify.org # should differ

Or open our My IP tool in the proxied browser.

2. Confirm DNS is not leaking. This is the check nobody runs. Load a DNS leak test page through the proxy and inspect the resolvers reported. If you see your ISP's name or your home country while your exit IP is in another country, you configured socks5 where you needed socks5h, or you forgot Firefox's "Proxy DNS" checkbox.

3. Confirm WebRTC is not exposing your real address. Browsers can reveal local and public IPs through WebRTC independently of proxy settings. Our WebRTC leak test shows what a site can actually see.

4. Measure latency and stability. A proxy that works once is not a proxy that works. Run 50–100 requests and record p50, p95, and failure rate. Our latency test tool does this in-browser; the methodology is explained in how to test SOCKS5 proxy speed.

5. Confirm the IP type matches your target. A datacenter IP will be rejected by most consumer platforms no matter how well configured it is. Check the ASN and whether it is flagged as hosting. Public lookup services such as proxyip.top are useful for a quick sanity check on classification.

Troubleshooting the eight most common failures

"Connection refused" — wrong port, or your provider requires IP authentication and your current IP is not whitelisted.

"Authentication failed" with correct credentials — special characters in the password are being mangled by the shell or by URL parsing. Percent-encode them (@ becomes %40, : becomes %3A).

Works in cURL, fails in the browser — the browser is using the OS proxy setting, and you configured a different one. Or an extension is overriding it.

Works on Wi-Fi, fails on Ethernet (macOS) — proxy settings are per network service. Configure each one.

Exit IP is correct but sites still block you — the IP is fine, your fingerprint is not. TLS fingerprint, header order, and user-agent all matter. See our proxy safety and effectiveness guide.

Intermittent failures under load — you are exceeding your concurrency allowance. Most providers throttle rather than error clearly. Check your plan's concurrent-session limit.

UDP does not work — many providers advertise SOCKS5 but only implement the TCP subset. UDP ASSOCIATE support is worth confirming before you buy if you need it.

Everything slows to a crawl after an hour — you have burned through the healthy portion of a small pool. This is a provider problem, not a configuration problem. Compare pool sizes in our provider comparisons.

Choosing where to point all this configuration

The setup steps above are identical regardless of provider; the results are not. Pool size, IP classification, session control, and honest concurrency limits determine whether your carefully configured client succeeds or spends its day retrying.

We maintain independent benchmarks and full provider reviews, and track discounts on the deals page so you are not paying list price while testing. For a broader view of the market, directories such as 5-proxy.com and proxypromo.top list additional vendors and current promotional pricing worth cross-checking before you commit to an annual plan.

The short version

  • Use socks5h, never socks5, wherever a URL scheme is accepted.
  • Tick "Proxy DNS when using SOCKS v5" in Firefox.
  • Set NO_PROXY so internal traffic never leaves your network.
  • Configure the proxy per network service on macOS, per unit file on Linux, per application on Windows.
  • On mobile, exempt the tunnel from battery optimisation and disable Private DNS.
  • Verify exit IP, DNS, WebRTC, latency, and IP classification before you trust the setup.

Configuration takes ten minutes. Verification takes five. Skipping the second one is what turns a working proxy into a data-leaking one.

Related SOCKS5 deals & promo codes

All deals →

Tags

#how to set up socks5 proxy#socks5 windows 11#socks5 android#socks5 dns leak#proxy configuration

About the author

Best SOCKS5 Editorial

The Best SOCKS5 editorial team independently benchmarks, tests, and audits every SOCKS5 proxy provider we cover. We accept affiliate commissions but never accept paid rankings.

Trusted partners