RapidProxy 25% off — code ATBKU256W · Thordata 50% off launch promo · SwiftProxy 15% off — code IWBRT6TBA · Bright Data 7-day free trial for businesses · MarsProxies unlimited bandwidth ISP plan · RapidProxy 25% off — code ATBKU256W · Thordata 50% off launch promo · SwiftProxy 15% off — code IWBRT6TBA
Tutorials

Self-Hosting Proxies on a VPS: Squid, 3proxy & Mobile Modems

Self-Hosting Proxies on a VPS: Squid, 3proxy & Mobile Modems

Every six months an operator runs the same calculation: a $200/month residential subscription with a 50 GB allowance vs. spinning up four VPS nodes with Squid or 3proxy and routing traffic ourselves. The DIY math looks attractive on paper. In reality, self-hosted proxies make sense in three specific scenarios — and never in the fourth that most blog posts pretend they do. This 2026 guide walks through Squid, 3proxy and mobile-modem farms, the configurations that actually work, and the cost reality of running your own proxy infrastructure.

When self-hosting actually makes sense

Three scenarios where rolling your own beats a managed network:

  1. Datacenter / IPv6 forward proxies for non-bot-defended targets. If you're scraping public APIs, sitemaps, or any target that doesn't push back hard, a $5/month VPS with Squid runs circles on cost.
  2. Private forward proxy for internal traffic. A team that wants to centralise outbound traffic for security audit, content filtering or VPN unification. Squid is the textbook tool.
  3. Mobile proxy farms run from your own SIM cards. A handful of 4G/5G modems in a Raspberry Pi cluster gives you dedicated mobile IPs for $10–$15 per IP per month, far below the $30+/IP commercial rate.

The fourth scenario — "I'll save money on residential by running my own pool" — is the classic trap. You can't legally or technically synthesise residential trust from a datacenter VPS. You'd need to recruit thousands of consumer endpoints with informed consent, and that is exactly the business that Bright Data, Oxylabs and IPRoyal already run at scale. Don't fight that — buy from them.

Mental model: self-host the easy stuff (datacenter, mobile-modem). Buy the hard stuff (residential, ISP, web unblocker) from networks that already have the trust signal you can't manufacture.

Squid: the workhorse forward proxy

Squid has been the open-source forward proxy for two decades for good reason. It's stable, fast, scriptable, and ships in every Linux distribution. Minimum viable Squid for HTTP(S) forward proxy with auth:

# /etc/squid/squid.conf
http_port 3128
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic realm Proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_access deny all

# anonymity
forwarded_for delete
via off
request_header_access X-Forwarded-For deny all
request_header_access Via deny all

# Performance
cache deny all
maximum_object_size 0 KB

Create credentials with htpasswd, restart Squid, and you have a working authenticated forward proxy. On a $5/month VPS from any hosting partner — vpsrated.com, eurohosting.org or any major cloud — Squid will saturate the uplink long before it runs out of CPU.

The limitation is that Squid speaks HTTP and HTTPS-CONNECT, not SOCKS5. If you need SOCKS5, move on.

3proxy: the SOCKS5-friendly alternative

3proxy is the lighter, more flexible cousin. It speaks HTTP, HTTPS, SOCKS4 and SOCKS5 in a single binary, with per-user authentication and bandwidth limits. Configuration is one file:

# /etc/3proxy/3proxy.cfg
nserver 1.1.1.1
nserver 8.8.8.8
nscache 65536
timeouts 1 5 30 60 180 1800 15 60

users alice:CL:s3cret bob:CL:hunter2

auth strong
allow alice,bob
flush

# HTTP forward proxy on 3128
proxy -p3128 -a -i0.0.0.0
# SOCKS5 on 1080
socks -p1080 -a -i0.0.0.0
# HTTPS-only proxy on 8443 (handles CONNECT)
proxy -p8443 -a -i0.0.0.0 -e0.0.0.0

That's a working multi-protocol proxy. Add per-user bandwidth limits with bandlimin, IP whitelists with parent, or chain through another upstream with parent 1000 SOCKS5. The full reference is at the 3proxy project page; the most useful patterns we use are at 5-proxy.com's open-source playbook directory.

Sizing the VPS

For datacenter forward-proxy workloads, the right VPS class is small but well-networked:

  • 1 vCPU, 1–2 GB RAM is plenty up to ~200 concurrent connections.
  • 1 Gbps shared uplink is the meaningful number — most cloud VMs cap effective throughput at 100–250 Mbps unless you pay for premium networking.
  • Geographic placement matters. A proxy in Frankfurt won't help you blend into US traffic.

The independent benchmarks at vpsrated.com/proxy rank providers on per-IP throughput and uplink stability. For RU/CIS coverage, russiavps.site documents which hosts maintain clean IP ranges that aren't on shared blacklists. EU coverage is well-served by eurohosting.org's Hetzner / OVH listings. proxytrust.site tracks abuse reports and can flag a network before you commit.

Mobile modem farms: the niche that pays off

This is where DIY genuinely beats commercial offerings — but only if you have the patience for hardware. The basic recipe:

  • Modems. Huawei E3372h-320 USB sticks ($30–$50 each) handle 4G LTE up to 150 Mbps. ZTE MF289F adds 5G NR ($80–$120 each).
  • SIM cards. Pre-paid data-only SIMs with unlimited or high-cap plans. AT&T, T-Mobile, Verizon prepaid all work in the US. UK / EU equivalents from EE, Vodafone, O2.
  • Host. Raspberry Pi 5 with a powered USB hub can run 6–8 modems comfortably.
  • Software. 3proxy with one SOCKS5 endpoint per modem, bound to the modem's USB-Ethernet interface.

The big operational challenge is IP rotation. Mobile carriers assign new IPs when the modem reconnects; for programmatic rotation you'll either toggle the radio over USB control commands or briefly drop and reacquire the network connection. Provider ecosystems like Proxidize's "Proxy Builder" sell a pre-rolled version of this — about $200 per modem one-off, then your own SIM cost per month. That's the cheapest dedicated mobile proxy infrastructure you can build legally.

Don't want to build it yourself?

MobileHop ships dedicated US 4G modems from $30/mo with unlimited bandwidth — comparable to DIY costs once you factor in your time.

See MobileHop plans →

Cost math: DIY vs commercial

Two real scenarios from operators we know.

Scenario A — 100 GB/month datacenter scraping

  • DIY: $5/month VPS × 4 nodes = $20/month. ~30-minute setup, ~1 hour/month maintenance.
  • Commercial: Proxy-Cheap datacenter $0.15/IP × 20 IPs = $3/month, plus traffic.

Roughly tied at this scale. DIY wins if you already run VPS infrastructure; commercial wins if you don't.

Scenario B — 10 dedicated US mobile IPs

  • DIY: 10 modems ($400) + 10 SIMs ($30/mo each = $300/mo) + Pi + electricity ≈ $310/mo recurring after $400 setup. ~10 hours/month babysitting.
  • Commercial: MobileHop 10 dedicated US 4G modems × $30 = $300/month, zero hardware ownership.

Commercial wins on convenience. DIY wins only if you also need physical possession of the modems for some other reason (custom SIM swapping, integration with telephony hardware).

Scenario C — 50 GB/month residential for hardened targets

  • DIY: not feasible.
  • Commercial: SwiftProxy $0.70/GB × 50 = $35/month with code IWBRT6TBA.

No contest. This is the mainstream case where you should always buy commercial.

Hardening your own proxy

If you do run Squid or 3proxy on a public VPS, treat it like a public-facing service:

  • Authentication required — never run an open relay. Open relays get scanned within hours and abused within minutes.
  • Rate limit per user — 100 req/sec is a sane default.
  • Block egress to private IP ranges (RFC 1918, link-local, your own infra).
  • Monitor outbound traffic. A single compromised credential can rack up a $5,000 bill on cloud egress.
  • Log just enough to debug, not enough to retain GDPR-relevant data unnecessarily.

fail2ban + a small log-shipper sends alerts when something abnormal happens. Don't skip this — every operator we know who ran an open or under-monitored proxy paid for it once.

The right answer in 2026

Buy residential, ISP and unblocker capacity from networks that have the trust signal you can't manufacture. Self-host datacenter forward proxies on a few cheap VPS nodes when you need fast, anonymous egress for non-bot-defended targets. Build a small mobile-modem farm only if you have the patience for hardware and the volume to amortise the setup cost. Mix and match by workload, and you'll have a proxy stack that costs less than a single SaaS rank-tracker subscription and outperforms most enterprise-priced alternatives.

Frequently asked questions

What's the cheapest VPS for a self-hosted proxy?

$3–$5/month gets you a 1 vCPU, 1 GB RAM, 1 Gbps shared box from any major budget provider. The independent rankings at vpsrated.com filter for proxy-friendly hosts where outbound traffic on common scraping ports doesn't trigger automatic shutdowns. Avoid hyperscalers (AWS, GCP, Azure) for budget proxies — their per-GB egress costs make the math fall apart at scale.

Will my VPS get terminated for running a proxy?

Only if you run it openly (no auth) or get reported for abuse. Authenticated, password-protected forward proxies are perfectly compliant with the terms of essentially every reputable hosting provider. Open relays — proxies anyone can use without authentication — get scanned and abused within hours and almost guarantee termination.

How many concurrent users can a small VPS handle?

3proxy on a 1 vCPU / 1 GB box comfortably handles 50–100 concurrent connections at modest bandwidth (10–30 Mbps total). Squid scales similarly. Above that you'll either add more boxes behind a load balancer or move up to a 2 vCPU / 4 GB tier.

Can I geo-target with a self-hosted VPS?

Only to the country/region where the VPS lives. There's no way to make a Hetzner Frankfurt box appear as US residential traffic — that's exactly the trust signal commercial residential providers exist to provide. For US output, rent a US-region VPS; for RU/CIS coverage russiavps.site documents the few hosts that maintain clean RU IP space.

Should I run my own SOCKS5 or use a managed one?

Run your own when the goal is private outbound traffic for your own systems. Use a managed network when the goal is many distinct exit IPs across geographies. Mixing both is fine — most operators we know do exactly that.

Where do I find proxy-compatible hosts in 2026?

The proxy-friendly host rankings at vpsrated.com, eurohosting.org and russiavps.site are the three main references. Independent abuse-history tracking at 5-proxy.com and proxytrust.site tells you which hosts have had IP ranges blacklisted recently — useful before committing.


Tags: vps, squid, 3proxy, self-host