SOCKS5 Proxy Configuration Guide

CLI, Bash, Python, Proxifier, Firefox, Chrome — using remote DNS (socks5h)

Credentials (replace placeholders)
FieldValue
HostproxyIP
PortproxyPORT
Usernameproxyusername
Passwordproxypassword
SOCKS URLsocks5h://proxyusername:proxypassword@proxyIP:proxyPORT

1) Command Line — curl

1

Quick external IP test (remote DNS)

Use socks5h or --socks5-hostname to force DNS through the proxy.

curl --socks5-hostname proxyIP:proxyPORT https://ifconfig.me
curl --proxy socks5h://proxyusername:proxypassword@proxyIP:proxyPORT https://ifconfig.me

Output should show your proxy IP, not your real one.

2) Bash Tester Script

1

Create and run

Save as /usr/local/bin/test-socks.sh, make executable, then run:

#!/usr/bin/env bash
set -euo pipefail
P="socks5h://proxyusername:proxypassword@proxyIP:proxyPORT"
echo "Testing SOCKS5 connection..."
IP=$(curl -s --proxy "$P" https://ifconfig.me)
echo "External IP: $IP"
echo "Checking DNS (manual if blocked)..."
curl -s --proxy "$P" https://dnsleaktest.com || echo "Open dnsleaktest.com in browser using the proxy"

Compact format — no empty lines.

3) Python (requests + PySocks)

1

Install and test inline

Run directly from terminal:

pip install requests[socks]
python3 - <<'EOF'
import requests
proxy="socks5h://proxyusername:proxypassword@proxyIP:proxyPORT"
proxies={"http":proxy,"https":proxy}
r=requests.get("https://ifconfig.me",proxies=proxies,timeout=10)
print("External IP:",r.text.strip())
EOF
2

Standalone Python Script

Save as test_socks.py and run with python3 test_socks.py:

#!/usr/bin/env python3
import requests
proxy="socks5h://proxyusername:proxypassword@proxyIP:proxyPORT"
proxies={"http":proxy,"https":proxy}
r=requests.get("https://ifconfig.me",proxies=proxies,timeout=10)
print("External IP:",r.text.strip())

4) proxychains (Linux)

1

Configure

Edit /etc/proxychains.conf and add:

[ProxyList]
socks5 proxyIP proxyPORT proxyusername proxypassword
2

Run app through proxy

proxychains4 curl https://ifconfig.me

5) Proxifier (Windows)

1

Add SOCKS5 proxy

  • Profile → Proxy Servers → Add
  • Address: proxyIP, Port: proxyPORT
  • Protocol: SOCKS Version 5
  • Authentication: Username proxyusername, Password proxypassword
  • Click “Check” → OK → Apply
2

Create rule & test

  • Profile → Proxification Rules → Add → select target apps
  • Open browser → visit ifconfig.me to verify proxy IP

6) Firefox & Chrome

1

Firefox

  • Settings → Network Settings → Manual proxy configuration
  • SOCKS Host: proxyIP, Port: proxyPORT
  • Select SOCKS v5 and enable “Proxy DNS when using SOCKS v5”
  • Enter Username proxyusername and Password proxypassword
2

Chrome

  • Launch with flag (no auth):
google-chrome --proxy-server="socks5://proxyIP:proxyPORT"
  • For auth, use the SwitchyOmega extension and enter credentials.

7) Troubleshooting

Common issues & fixes

  • DNS leaks: Always use socks5h or enable remote DNS in Firefox.
  • Auth failed: Double-check proxyusername/proxypassword accuracy.
  • No SOCKS support: Use Proxifier (Windows) or proxychains (Linux).
  • Blocked sites: Rotate to another proxy location.
  • Slow speed: Choose geographically closer proxy.
Quick Checklist
  • Always use socks5h for remote DNS
  • Test with curl or Python before integrating
  • Proxifier and proxychains route full applications
  • Rotate proxies periodically for optimal performance