CLI, Bash, Python, Proxifier, Firefox, Chrome — using remote DNS (socks5h)
| Field | Value |
|---|---|
| Host | proxyIP |
| Port | proxyPORT |
| Username | proxyusername |
| Password | proxypassword |
| SOCKS URL | socks5h://proxyusername:proxypassword@proxyIP:proxyPORT |
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.
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.
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
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())
Edit /etc/proxychains.conf and add:
[ProxyList] socks5 proxyIP proxyPORT proxyusername proxypassword
proxychains4 curl https://ifconfig.me
google-chrome --proxy-server="socks5://proxyIP:proxyPORT"