v1.10.90-0e025b8
Skip to main content
Back to Hex Proxies

Proxy Chaining Guide

Last updated: April 2026

By Hex Proxies Engineering Team

Chain multiple Hex Proxies together to create layered anonymity. Covers chaining patterns, performance trade-offs, and practical configuration examples.

advanced25 minutesadvanced-techniques

Prerequisites

  • Understanding of proxy protocols (HTTP, SOCKS5)
  • Hex Proxies account with credentials
  • Basic command-line knowledge

Steps

1

Install ProxyChains

Install proxychains-ng on macOS via Homebrew or proxychains4 on Ubuntu via apt.

2

Configure the chain

Edit proxychains.conf with your Hex Proxies credentials in the ProxyList section.

3

Choose a chaining mode

Select strict_chain for security, dynamic_chain for resilience, or random_chain for unpredictability.

4

Test the chain

Run proxychains4 curl httpbin.org/ip and verify the exit IP differs from your real IP.

5

Check for DNS leaks

Ensure proxy_dns is enabled so DNS queries also go through the chain.

6

Monitor performance

Measure added latency per hop and adjust the chain length based on your requirements.

Proxy Chaining: Layered Anonymity

Proxy chaining routes your traffic through multiple proxy servers in sequence. Each hop adds a layer of indirection, making it significantly harder to trace requests back to the origin. Hex Proxies supports chaining across its multi-carrier US ISP network and 10M+ residential IP partner network.

Why Chain Proxies

  • Enhanced anonymity: Each hop only knows the previous and next node, not the full path.
  • Geographic diversity: Route through multiple countries in a single request chain.
  • Defense in depth: If one proxy is compromised, the full chain remains protected.

Chaining with ProxyChains (Linux/macOS)

ProxyChains is the most common tool for transparent proxy chaining:

# Install proxychains
# macOS: brew install proxychains-ng
# Ubuntu: apt install proxychains4

Edit /etc/proxychains4.conf (or proxychains.conf) ```

# proxychains4.conf
strict_chain
proxy_dns
tcp_read_time_out 15000
tcp_connect_time_out 8000

[ProxyList] http gate.hexproxies.com 8080 YOUR_USERNAME YOUR_PASSWORD socks5 gate.hexproxies.com 1080 YOUR_USERNAME_2 YOUR_PASSWORD_2 ```

# Run any command through the chain
proxychains4 curl https://httpbin.org/ip
proxychains4 python3 my_scraper.py

Chaining in Python

import requests
from requests.auth import HTTPProxyAuth

First hop: SOCKS5 proxy first_hop = "socks5://YOUR_USERNAME:YOUR_PASSWORD@gate.hexproxies.com:1080"

Create a session that routes through the first hop session = requests.Session() session.proxies = { "http": first_hop, "https": first_hop, }

The request exits through the SOCKS5 proxy # For a second hop, configure the first proxy to forward to another response = session.get("https://httpbin.org/ip") print(response.json()) ```

SSH Tunnel + Proxy Chain

Create a local SOCKS5 tunnel, then chain it with a Hex Proxies exit node:

# Step 1: Create SSH SOCKS tunnel on port 9050
ssh -D 9050 -N user@your-server.com &

Step 2: Configure proxychains to go through SSH then Hex Proxies # [ProxyList] # socks5 127.0.0.1 9050 # http gate.hexproxies.com 8080 YOUR_USERNAME YOUR_PASSWORD ```

Chaining Modes

  • strict_chain: Requests must pass through every proxy in order. If one fails, the entire request fails. Most secure but least fault-tolerant.
  • dynamic_chain: Skips dead proxies and continues through the remaining chain. More resilient but slightly less predictable.
  • random_chain: Picks a random subset of proxies from the list. Adds unpredictability at the cost of consistency.

Performance Impact

Each hop adds latency. A two-hop chain typically adds 100-300ms compared to a single proxy. For most use cases, two hops provide strong anonymity without unacceptable performance loss. Three or more hops are rarely necessary outside of high-security scenarios.

Verification

Always verify your chain is working correctly:

# Check exit IP
proxychains4 curl -s https://httpbin.org/ip

Verify DNS is not leaking proxychains4 curl -s https://dnsleaktest.com/api/v1/ ```

Tips

  • Two hops provide strong anonymity for most use cases — three or more rarely justify the latency cost.
  • Always enable proxy_dns to prevent DNS leak attacks.
  • Use strict_chain when you need guaranteed path routing through all hops.
  • Test the chain thoroughly before running production workloads through it.

Ready to Get Started?

Put this guide into practice with Hex Proxies.