How to Set Up a SOCKS5 Proxy on Any Device

How to Set Up a SOCKS5 Proxy on Any Device

SOCKS5 is the most versatile proxy protocol available, supporting all types of internet traffic — not just HTTP. Unlike HTTP proxies that only handle web requests, SOCKS5 proxies can tunnel TCP and UDP traffic, making them suitable for gaming, streaming, torrenting, VoIP, and any other network application.

This comprehensive guide covers how to set up SOCKS5 proxies on every major platform, from desktop operating systems and mobile devices to browsers and command-line tools.

What Makes SOCKS5 Different from HTTP Proxies

Before setting up a SOCKS5 proxy, understanding its advantages is important:

FeatureSOCKS5 ProxyHTTP Proxy
Protocol supportAll TCP/UDP trafficHTTP/HTTPS only
DNS resolutionCan resolve through proxyUsually local resolution
SpeedFaster (no header processing)Slightly slower
AuthenticationUsername/password + GSS-APIBasic, Digest, NTLM
UDP supportYesNo
Use casesAll applicationsWeb browsing only

SOCKS5 proxies operate at a lower network layer (Layer 5, the session layer) than HTTP proxies, which means they do not inspect or modify your traffic. They simply relay it to the destination.

For more on proxy types and terminology, visit our proxy glossary.

Setting Up SOCKS5 on Windows

Method 1: System Settings (Limited)

Windows does not have native system-wide SOCKS5 proxy support. The built-in proxy settings only support HTTP/HTTPS. For SOCKS5, you need either an application that supports it directly or a tool like Proxifier.

Method 2: Using Proxifier (Recommended)

Proxifier forces all Windows applications through a SOCKS5 proxy:

  1. Download and install Proxifier.
  2. Go to Profile > Proxy Servers > Add.
  3. Enter:
  • Address: proxy.example.com
  • Port: 1080
  • Protocol: SOCKS Version 5
  1. If authentication is required, check Enable and enter credentials.
  2. Click Check to verify connectivity.
  3. Click OK.
  4. Configure proxification rules to control which applications use the proxy.

Method 3: PuTTY SSH Tunnel

Create a local SOCKS5 proxy using an SSH connection:

  1. Open PuTTY.
  2. Enter your SSH server hostname and port.
  3. Go to Connection > SSH > Tunnels.
  4. Set:
  • Source port: 1080
  • Dynamic
  1. Click Add.
  2. Go back to Session and click Open.
  3. Log in to the SSH server.
  4. Your local SOCKS5 proxy is now available at 127.0.0.1:1080.

Setting Up SOCKS5 on macOS

Method 1: System Settings

macOS has built-in SOCKS proxy support:

  1. Open System Settings > Network.
  2. Select your active connection (Wi-Fi or Ethernet).
  3. Click Details > Proxies.
  4. Toggle SOCKS Proxy to On.
  5. Enter:
  • Server: proxy.example.com
  • Port: 1080
  1. Enter credentials if required.
  2. Click OK.

Method 2: Terminal (networksetup)

# Enable SOCKS proxy
networksetup -setsocksfirewallproxy "Wi-Fi" proxy.example.com 1080

# With authentication
networksetup -setsocksfirewallproxy "Wi-Fi" proxy.example.com 1080 on username password

# Verify
networksetup -getsocksfirewallproxy "Wi-Fi"

# Disable
networksetup -setsocksfirewallproxystate "Wi-Fi" off

Method 3: SSH Tunnel

ssh -D 1080 -f -C -q -N user@remote-server.com

This creates a local SOCKS5 proxy at 127.0.0.1:1080. All traffic routed through this proxy exits from the SSH server’s IP address.

Setting Up SOCKS5 on Linux

Method 1: Environment Variables

Some applications support SOCKS5 via environment variables:

export ALL_PROXY="socks5://username:password@proxy.example.com:1080"
export all_proxy="socks5://username:password@proxy.example.com:1080"

Method 2: GNOME Settings

gsettings set org.gnome.system.proxy mode 'manual'
gsettings set org.gnome.system.proxy.socks host 'proxy.example.com'
gsettings set org.gnome.system.proxy.socks port 1080

Method 3: tsocks / proxychains

proxychains forces any command-line application through a SOCKS5 proxy:

# Install
sudo apt install proxychains4

# Configure
sudo nano /etc/proxychains4.conf

Edit the configuration:

[ProxyList]
socks5 proxy.example.com 1080 username password

Use proxychains to wrap any command:

proxychains4 curl https://api.ipify.org
proxychains4 wget https://example.com/file.zip
proxychains4 python3 scraper.py

Method 4: SSH Tunnel

ssh -D 1080 -f -C -q -N user@remote-server.com

Then configure applications to use 127.0.0.1:1080 as a SOCKS5 proxy.

Setting Up SOCKS5 on iPhone and iPad

iOS does not have native SOCKS5 proxy support in its Wi-Fi settings (only HTTP). Use a third-party app:

Shadowrocket

  1. Install Shadowrocket from the App Store.
  2. Tap + to add a new server.
  3. Select SOCKS5 as the type.
  4. Enter:
  • Address: proxy.example.com
  • Port: 1080
  • Username: Your username
  • Password: Your password
  1. Tap Save.
  2. Toggle the connection on.

Shadowrocket creates a local VPN that tunnels all traffic through the SOCKS5 proxy.

Surge

Surge is an advanced networking tool for iOS:

  1. Install Surge from the App Store.
  2. Add a proxy configuration with SOCKS5 details.
  3. Activate the proxy.

Setting Up SOCKS5 on Android

SocksDroid (Free, No Root)

  1. Install SocksDroid from the Play Store.
  2. Enter:
  • Server Address: proxy.example.com
  • Server Port: 1080
  • Username: Your username (if required)
  • Password: Your password (if required)
  1. Tap Start.
  2. SocksDroid creates a VPN connection that routes all traffic through the SOCKS5 proxy.

Drony

  1. Install Drony from the Play Store.
  2. Configure a SOCKS5 proxy under the network settings.
  3. Enable the proxy.

Setting Up SOCKS5 in Browsers

Firefox (Built-In Support)

Firefox has the best built-in SOCKS5 support:

  1. Go to Settings > General > Network Settings > Settings.
  2. Select Manual proxy configuration.
  3. Enter:
  • SOCKS Host: proxy.example.com
  • Port: 1080
  • Select SOCKS v5
  1. Critical: Check Proxy DNS when using SOCKS v5 to prevent DNS leaks.
  2. Click OK.

Chrome / Edge / Brave (Command Line)

google-chrome --proxy-server="socks5://proxy.example.com:1080"

Via Extension (SwitchyOmega)

  1. Install Proxy SwitchyOmega.
  2. Create a profile with:
  • Protocol: SOCKS5
  • Server: proxy.example.com
  • Port: 1080
  1. Activate the profile.

Setting Up SOCKS5 for Command-Line Tools

curl

# SOCKS5 proxy
curl --socks5 proxy.example.com:1080 https://api.ipify.org

# SOCKS5 with DNS resolution through proxy
curl --socks5-hostname proxy.example.com:1080 https://api.ipify.org

# SOCKS5 with authentication
curl --socks5 username:password@proxy.example.com:1080 https://api.ipify.org

The --socks5-hostname flag is important — it resolves DNS through the SOCKS5 proxy, preventing DNS leaks.

wget

wget does not natively support SOCKS5. Use proxychains:

proxychains4 wget https://example.com/file.zip

Python (requests + PySocks)

import requests

proxies = {
    'http': 'socks5h://username:password@proxy.example.com:1080',
    'https': 'socks5h://username:password@proxy.example.com:1080'
}

response = requests.get('https://api.ipify.org', proxies=proxies)
print(response.text)

Note: Use socks5h:// (with the h) to resolve DNS through the proxy. Use socks5:// for local DNS resolution.

Node.js

const SocksProxyAgent = require('socks-proxy-agent');

const agent = new SocksProxyAgent('socks5://username:password@proxy.example.com:1080');

fetch('https://api.ipify.org', { agent })
    .then(res => res.text())
    .then(console.log);

Git

# Configure SOCKS5 proxy for Git
git config --global http.proxy 'socks5://proxy.example.com:1080'
git config --global https.proxy 'socks5://proxy.example.com:1080'

DNS Resolution: The Most Important SOCKS5 Setting

When using a SOCKS5 proxy, you have two options for DNS resolution:

Local DNS Resolution (socks5://)

  • DNS queries go to your local DNS server (usually your ISP)
  • Faster but reveals which domains you visit
  • Your ISP can see the domains even though they cannot see the traffic content

Remote DNS Resolution (socks5h://)

  • DNS queries are sent through the SOCKS5 proxy
  • Slightly slower but fully private
  • Your ISP sees only the connection to the proxy server

Always use remote DNS resolution (socks5h:// or the equivalent option) when privacy is important. This is one of the key advantages of SOCKS5 over HTTP proxies.

SOCKS5 Authentication Methods

SOCKS5 supports two authentication methods:

  1. No authentication — The proxy accepts all connections (typically IP-whitelisted)
  2. Username/Password — Standard credential-based authentication

Configure authentication as provided by your proxy service. Mobile proxy providers typically offer both IP whitelisting and username/password authentication.

Troubleshooting SOCKS5 Proxy Issues

Connection Refused

  1. Verify the proxy address and port.
  2. Test with: nc -zv proxy.example.com 1080
  3. Check if a firewall is blocking port 1080.
  4. Ensure the SOCKS5 server is running.

DNS Leaks

  1. Visit dnsleaktest.com through the proxy.
  2. If your ISP’s DNS servers appear, enable remote DNS resolution.
  3. In Firefox, check “Proxy DNS when using SOCKS v5”.
  4. In curl, use --socks5-hostname instead of --socks5.

Authentication Failures

  1. Verify username and password.
  2. Ensure you are using SOCKS5 (not SOCKS4, which has different authentication).
  3. Check if the proxy uses IP-based authentication instead.

Application Does Not Support SOCKS5

Use proxychains (Linux), Proxifier (Windows/Mac), or an SSH tunnel to convert the SOCKS5 proxy into a system-level proxy that all applications can use.

For more context on web scraping and data collection with proxies, see our web scraping proxy guide.

Conclusion

SOCKS5 is the most capable proxy protocol, supporting all traffic types with optional DNS tunneling for complete privacy. While not every platform and application supports SOCKS5 natively, tools like proxychains, Proxifier, and SSH tunnels bridge the gap. The key to a secure SOCKS5 setup is always enabling remote DNS resolution to prevent DNS leaks. With the configurations outlined in this guide, you can route traffic through a SOCKS5 proxy on any device or application.


Related Reading

last updated: April 3, 2026

Scroll to Top

Resources

Proxy Signals Podcast
Operator-level insights on mobile proxies and access infrastructure.

Multi-Account Proxies: Setup, Types, Tools & Mistakes (2026)