Nginx is best known as a web server and reverse proxy, but its stream module can handle TCP-level proxying too. This makes it useful for creating a centralized proxy endpoint that your entire team can use.

I set this up when my team needed everyone to route through the same Snowpad proxy pool without configuring each tool individually.

Why Centralize Your Proxy

When every team member configures proxies separately, you end up with:

  • Inconsistent proxy settings across the team
  • No centralized monitoring or logging
  • Difficulty rotating credentials
  • No load balancing across multiple connections

A centralized nginx proxy solves all of these.

Basic Configuration

Install nginx with stream module support:

# Ubuntu/Debian
sudo apt install nginx

# Verify stream module is available
nginx -V 2>&1 | grep stream

Create a stream configuration:

stream {
    upstream snowpad_proxy {
        server gw.snowpad.io:9999;
    }

    server {
        listen 1080;
        proxy_pass snowpad_proxy;
        proxy_connect_timeout 10s;
        proxy_timeout 30m;
    }
}

Advanced: Load Balancing with Multiple Connections

If you have multiple Snowpad accounts, you can load balance across them:

stream {
    upstream snowpad_pool {
        least_conn;
        server 127.0.0.1:2001;
        server 127.0.0.1:2002;
        server 127.0.0.1:2003;
    }

    server {
        listen 1080;
        proxy_pass snowpad_pool;
    }
}

Each local SOCKS5 client (like redsocks) connects to Snowpad with different credentials, and nginx distributes traffic across them.

Health Checks

Add passive health checks to detect failed upstreams:

upstream snowpad_proxy {
    server gw.snowpad.io:9999 max_fails=3 fail_timeout=30s;
}

Team Workflow

Once nginx is configured, your team just points their tools to localhost:1080 with no authentication. All traffic routes through Snowpad's mobile IPs transparently.

For a deeper understanding of how SOCKS5 proxies work, read my SOCKS5 vs HTTP proxy comparison. The what is a proxy server guide covers the fundamentals.