Geonode logo
Protocols

TCP Proxy

A TCP proxy; it's in layer 4 of the OSI model and works right at the transport layer. It just forwards raw TCP connections between a client and a server. No checking or changing of data above that layer. Unlike HTTP proxies, it deals with any TCP protocol—yep, even HTTPS, SMTP, FTP—which means it's a basic socket proxy for moving traffic across networks.

/ˌtiː.siː.ˈpiː ˈprɒk.si/noun

Quick Facts

Also known as
layer 4 proxy, transport layer proxy, socket proxy, TCP tunnel
IP source
Residential, datacenter, or mobile IPs , Geonode offers 2.5M+ residential IPs across 195+ countries
Detection risk
Low to medium , traffic appears as standard TCP connections with no HTTP fingerprint
Typical use
Non-HTTP protocol proxying, game server routing, database tunneling, reverse proxy TCP setups
Price range
$0.27–$0.79/GB, down to $0.27/GB at scale

How a tcp proxy works

Here's what happens: a client opens a TCP connection to the proxy. Then, the proxy sets up another connection to the destination. Data streams through both sockets without a hitch, flowing in both directions. No parsing or changes to the payload occur since it’s all at the transport layer. Works with any protocol on TCP. If you're using it as a reverse proxy, it sits ahead of backend servers. It can do load balancing and also hide origin IPs from being exposed directly.

TCP Proxy vs. HTTP Proxy

An HTTP proxy gets in there, decodes, inspects everything at the application-level. So you can do header injections, filter URLs, but it sticks to HTTP and HTTPS traffic. A TCP proxy just streams transport-layer data, no idea what the protocol is. So it can handle a variety of TCP services—think databases, mail servers, game backends—but you won’t get the same level of control over applications.

Why this is different

Advantages

  • Works with protocols HTTP proxies can't touch: SMTP, MySQL, custom TCP. But there's a catch: adds about 1.2ms latency per hop and needs a separate instance per protocol family for load balancing.
  • Throughput's faster since data goes straight through without stopping for inspection or re-serialization.
  • Protocol-agnostic means today it's set up for PostgreSQL on 5432; tomorrow it could be some custom game protocol.
  • Scales up for high-traffic workloads without getting bogged down by per-request parsing overhead.

Tradeoffs

  • It doesn't inspect or filter content: you can't rewrite headers or block specific URLs at this layer.
  • Debugging's messier than with HTTP proxies: you need tcpdump or Wireshark to see what's flowing through the socket.
  • You'll need to set it up manually for each use case; no generic TCP proxy autodetects its payload.
  • Less visibility into application-level traffic patterns unless you add instrumentation.

Examples in practice

Real-world deployments of TCP Proxy , where it works and where alternatives win.

MySQL Failover

Route production writes through a TCP proxy to detect a dead primary in under 500ms. TCP passthrough keeps the MySQL binary protocol intact. Stick an HTTP proxy here and it screws up the handshake, breaking the whole connection. Without a TCP proxy, the app keeps a connection to a dead host until the OS TCP keepalive steps in, which is 2 hours on most Linux kernels.

DDoS Attack Mitigation

Cloudflare uses TCP proxy layers to absorb and filter giant attacks before traffic hits origin servers. In 2023, they stopped a 71 million RPS attack with TCP-layer filtering, the biggest recorded DDoS back then. Operating at layer 4, they drop malicious connections before any HTTP parsing overhead rears its head.

Geo-Restricted Content Access

TCP proxies reroute traffic through IPs in specific countries, jumping over regional blocks on platforms like Netflix, BBC iPlayer, or regional e-commerce sites. Geonode supplies IPs in 195+ countries for precise location targeting at this layer, no need for application-level protocol support.

Automated Scraping Pipelines

Scrapy-based scraping pipelines send requests through TCP proxies to switch IPs and dodge bans. Rotating through Geonode's 2.5M+ residential IP pool drops block rates on sites like Amazon and Google Shopping by making each connection look just like organic residential traffic.

Financial Data Collection

Quant trading firms use TCP proxies to grab real-time market data from Bloomberg terminals and exchange co-location APIs. With sub-10ms latency targets common in HFT, the 1.2ms overhead per TCP proxy hop is nothing. An HTTP proxy messing with TLS by decoding and re-encoding responses? Not an option.

Secure Internal Tunneling

Engineering teams at companies like HashiCorp and Cloudflare run TCP proxies for internal service traffic between data centers without exposing services to the internet. It's like SSH port forwarding but managed centrally. A well-tuned Linux host can handle 100,000+ concurrent connections, making them useful for service mesh sidecars and internal load balancers.

Common misconceptions

Common myths about TCP Proxy , and what is actually true.

MythReality
"TCP proxies are only useful for non-HTTP traffic"
TCP proxies handle HTTP and HTTPS just fine , they just don't inspect or modify it. That makes them useful when you want low-overhead load balancing or IP rotation without the overhead of full HTTP parsing.
"A TCP proxy is always slower than a direct connection"
The latency overhead is typically ~1,2ms per hop on a well-configured proxy. For most use cases that's negligible, and the architectural benefits , failover detection, IP rotation, DDoS absorption , outweigh it.
"TCP proxies provide no security benefit"
TCP proxies hide origin server IPs, absorb connection-flood attacks at the proxy layer, and let you enforce connection rate limits without touching application code. They're a standard component in DDoS mitigation architectures.

Need TCP Proxies?

2.5M+ residential IPs, 195+ countries, from $0.27/GB.

View Residential Proxies

TCP Proxy FAQ

Yeah, TCP proxies forward HTTPS traffic without issues. They pass the encrypted TLS stream through as raw bytes, don't try to decrypt it. The proxy has no TLS parsing overhead and can't break certificate validation or HSTS headers like a bad HTTP proxy setup might. If you need to see inside HTTPS traffic, you'll need a full TLS-terminating HTTP proxy.