HTTP/2 Proxies: How They Work and What They Change

An HTTP/2 proxy is a proxy that speaks HTTP/2, the multiplexed version of the web protocol, on one or both of its sides. For data collection, the part that matters most is simpler: your scraper can still use HTTP/2 with the target site when the traffic goes through a proxy, because the proxy usually just carries an encrypted tunnel. What decides whether requests succeed, and from which city they appear to come, is the IP address behind that tunnel, not the protocol version. That is why we build around real US carrier IPs and treat protocol support as the layer that has to stay out of your way.
TL;DR
- "HTTP/2 proxy" covers three different things: a proxy server that accepts HTTP/2 from clients, a reverse proxy that translates between versions, and an ordinary forward proxy that tunnels your HTTP/2 traffic with CONNECT.
- For scrapers, the common case is the last one: your client negotiates h2 with the origin site inside a CONNECT tunnel, and the proxy sees only ciphertext.
- HTTP/2 improves concurrency on a connection. It does not change your IP address, your location or your block rate.
- Geo-targeting and block resistance come from the IP type and location. Real mobile carrier IPs in a chosen city are what make requests look local.
- Check four things in your own stack: ALPN negotiation, stream limits, connection reuse and proxy DNS behavior.
Table of Contents
- What people mean by an HTTP/2 proxy
- How HTTP/2 traffic crosses a proxy
- What HTTP/2 does and doesn't change for data collection
- Does an HTTP/2 proxy give you a location or prevent blocks?
- Configuring a client for HTTP/2 through a proxy
- Debugging when something fails
- What to compare in a proxy API before you scale
- Our perspective
- Try it on real carrier IPs
- FAQ
- Sources
What people mean by an HTTP/2 proxy
HTTP/2 is defined in RFC 9113 as a connection-oriented protocol over TCP in which each request and response exchange runs on its own stream. A stalled request on one stream does not stop progress on the others. That is multiplexing, and it is the main difference from HTTP/1.1, where a client opens several parallel connections to get concurrency.
The phrase "HTTP/2 proxy" gets used for three setups, and mixing them up is the source of most confusing forum threads.
1. A forward proxy that accepts HTTP/2 from the client. Your client connects to the proxy over HTTP/2 and sends requests through it. Tools like GOST offer this as a dedicated proxy mode that works over TLS only, with no plaintext support.
2. A reverse proxy or gateway that translates versions. The nghttpx documentation describes its default mode as a reverse proxy for HTTP/3, HTTP/2 and HTTP/1 clients, and its --http2-proxy mode as a forward proxy in front of an HTTP proxy server, with the backend speaking HTTP/1.1 unless you specify h2. Envoy was designed first as an HTTP/2 multiplexing proxy and translates each wire protocol into a protocol-agnostic stream internally. These matter if you run infrastructure in front of your own services.
3. A regular proxy that tunnels HTTP/2 end to end. This is what a data collector normally uses. The client asks the proxy to open a tunnel to the target host, then negotiates TLS and HTTP/2 directly with that host through the tunnel.
If you are a developer, analyst or marketer pulling data from public sites, you almost certainly care about the third setup. The first two are server-side design choices.

How HTTP/2 traffic crosses a proxy
Negotiation: ALPN and h2
Over TLS, HTTP/2 is identified by the ALPN token h2. ALPN is a field in the TLS handshake where client and server agree on the application protocol. Per RFC 9113, the older h2c upgrade mechanism for cleartext was never widely deployed and is deprecated, so cleartext HTTP/2 starts only by prior knowledge, with a fixed connection preface.
Practically, this means HTTP/2 to public websites is an HTTPS matter. If your scraper hits a site over https://, the TLS handshake decides whether you get h2 or HTTP/1.1. A proxy that only tunnels does not take part in that decision.
CONNECT tunnels
A proxy tunnels HTTPS with the CONNECT method. We cover the mechanics in our guide to how the HTTPS proxy CONNECT tunnel works and how to debug it. The short version: your client asks the proxy to connect to host:443, the proxy answers with a success status, and from then on bytes flow both ways untouched.
One detail differs by version. On an HTTP/1.1 connection to the proxy, CONNECT takes over the whole connection. In HTTP/2, per RFC 9113 section 8.5, CONNECT sets up a tunnel over a single stream: the proxy replies with a 2xx HEADERS frame, then DATA frames on that stream are relayed to and from the TCP connection. Cloudflare's primer on proxies points out the consequence: a client can open several CONNECT tunnels over one connection to the proxy, saving TCP connections, while the proxy still uses separate TCP connections toward each destination.

Because the tunnel is typically used for end-to-end TLS, the proxy sees only ciphertext. Your HTTP/2 session with the target site is untouched by the proxy, which is also why you will not see the proxy rewriting your frames.
Connection reuse
HTTP/2 allows one connection to serve several hostnames when the server is authoritative for them. RFC 9113 section 9.1.1 says a server that does not want that reuse can answer with 421 Misdirected Request. A client talking HTTP/2 to a proxy sends all of its requests to that proxy over a single connection. If you ever see 421 responses in a scraper, your client is reusing a connection for a host the server does not want to handle on it, and disabling coalescing for that host is the fix.
What HTTP/2 does and doesn't change for data collection
Here is the honest division of labor.
| Question | Decided by HTTP/2? | What actually decides it |
|---|---|---|
| How many requests run concurrently on one connection | Yes | Stream limits, flow control |
| Header overhead on repeated requests | Yes | HPACK header compression |
| Which IP the target sees | No | The proxy exit IP |
| Which city the request appears to come from | No | The exit IP's location |
| Whether the site treats the IP as a real user | No | IP type and reputation |
| Whether sessions stay pinned to one IP | No | Sticky versus rotating sessions |
A common misunderstanding is that switching a scraper to HTTP/2 lowers block rates. The protocol can make your client look more like a modern browser at the connection level, since browsers use h2, but the target site sees the exit IP first. A datacenter IP range on HTTP/2 is still a datacenter range.
Where HTTP/2 genuinely helps
When you run many requests against the same host, multiplexing avoids opening dozens of connections. The Cloudflare primer notes that HTTP/2 puts frames from different streams onto one TCP byte stream, which improves concurrency over HTTP/1.1's parallel connections. HPACK header compression also reduces the cost of repeated headers: one comparison of API protocols attributes much of the measured gRPC advantage on tiny messages to HPACK, since repeated headers cost only a few bytes after the first request. If you pay per byte, as with metered proxy data, smaller repeated headers are a real if modest saving.
Where it has limits
- Stream caps. The .NET team's gRPC performance guidance notes that most servers limit an HTTP/2 connection to 100 concurrent streams by default, so extra calls queue. A scraper that fires 500 requests at one host on one connection will queue behind that cap, so a small pool of connections often works better.
- Flow control. The same page explains that when the buffer window is smaller than incoming payloads or latency is high, data moves in start-and-stop bursts. Large downloads over a high-latency mobile path are exactly where you notice it.
- Channel reuse. Creating a new connection per request throws away the multiplexing benefit. Keep one client object alive and reuse it.
- Head-of-line blocking. Cloudflare's primer notes that multiplexed streams still share one TCP connection and remain exposed to TCP-level head-of-line blocking.
- Path support. For gRPC, the whole path must stay on HTTP/2 and preserve trailers. The protocol comparison linked above notes that a component that downgrades to HTTP/1.1, buffers whole responses or strips trailers breaks calls. Telemetry benchmarks point the same way: one OTLP comparison reports that many firewalls and forward proxies block gRPC more readily than standard-port HTTP.
Sustained throughput also depends on the network under your client, not only the protocol. If you move large volumes from a workstation or office, it is worth reading about speeds, ports and backups for long-running streams, because the same bandwidth and port considerations apply to any long, steady transfer.
Does an HTTP/2 proxy give you a location or prevent blocks?
No, and this is the question we would put at the top of a data team's checklist. A protocol version has no geography. The location a target site infers comes from the exit IP address, and whether it trusts the request comes from the IP type, its history and how your client behaves.
Two separate layers are involved:
- Transport layer: HTTP/1.1, HTTP/2, SOCKS5, CONNECT. This decides how bytes move.
- Identity layer: the IP, its carrier or datacenter origin, its city, and how long you hold it. This decides what the site thinks you are.
For price comparison across regions, local search testing or ad verification, the identity layer is the one that changes your data. A request from a datacenter range in Virginia will not show what a shopper on a mobile network in Denver sees. We use real US mobile carrier IPs across 46 cities, so the request carries the identity of a real carrier connection in the city you target. That is the part HTTP/2 cannot provide on its own.
The same logic applies to sessions. If you need a login or a cart to persist, use a sticky session that holds one IP. If you want each request to look like a different visitor, use rotation. HTTP/2 connection reuse interacts with this: a long-lived multiplexed connection through one tunnel keeps one exit IP for its lifetime, so if you expect rotation per request, open a new tunnel for each rotation rather than expecting a reused connection to change IPs.
Configuring a client for HTTP/2 through a proxy
Most modern HTTP libraries negotiate h2 automatically on HTTPS. Go's HTTP library, for instance, uses HTTP/2 when the server supports it. The things to verify are the same across languages.
- Confirm the proxy scheme and port. Use an
http://orhttps://proxy URL, orsocks5://, as your provider documents. Our walkthroughs for HTTPX proxy setup in Python, C# HttpClient with SocketsHttpHandler and Ruby Net::HTTP show the exact options. - Enable HTTP/2 in the client explicitly where required. Some libraries default to HTTP/1.1 and need a flag or an extra package to offer h2 in ALPN.
- Check which protocol was negotiated. Log the negotiated version on a test request to a site you know supports h2. If it says HTTP/1.1, the client never offered h2.
- Handle authentication. Proxy credentials are sent in the CONNECT request. A 407 means the proxy rejected them; see fixing 407 proxy authentication errors.
- Mind DNS behavior. The gRPC Go project changed this in release 1.71: with proxy environment variables, default resolvers no longer resolve the target on the client, and an option forces client-side resolution. Where the hostname is resolved affects which region's answer you get from geo-aware DNS.
- Reuse the client. Build the session or channel once and keep it, so you benefit from multiplexing and avoid repeated handshakes.
- Watch headers. Proxies and clients add or strip headers; our guide to HTTP proxy headers lists the ones to review.
WebSockets deserve a note because they start life as HTTP/1.1 upgrades on many stacks; if your collection uses them, see WebSocket over proxy.
Debugging when something fails
Work from the outside in, and identify the failing layer before you change anything.
- Proxy refuses or times out: check the endpoint, port and credentials first.
- Tunnel opens but TLS fails: the problem is between your client and the target, not the proxy.
- Tunnel works but responses are 403 or 429: the site is reacting to the IP or behavior, so look at IP type, session length and request rate, not the protocol.
- 421 responses: connection reuse across hostnames, as described above.
- Hangs on large responses: suspect flow control and window sizes.
Our proxy error troubleshooting guide walks through this sequence with concrete commands. If you are deciding between proxy types for the front end of a pipeline, the HTTP vs HTTPS proxy decision rules cover the choice.
What to compare in a proxy API before you scale
Protocol support is one line on a longer list. For a team running automated collection, we would compare, in this order: IP type and carrier origin, city-level targeting, sticky and rotating sessions, protocol support (HTTP, HTTPS, SOCKS5), billing model, credential management for teams, and a usage dashboard. We expand on this in 8 proxy API features data teams should compare first.
Our perspective
Teams often come to us asking whether they need an "HTTP/2 proxy." Usually the real question is different: why is a pipeline that works on a laptop getting throttled in production?
In our experience of how these systems are built, the answer sits in the identity layer. Your client can speak perfect HTTP/2 and still be treated as automated traffic if the exit IP belongs to a datacenter range. That is why MaskLabs uses real US mobile carrier IPs rather than datacenter proxies, with city-level targeting, so requests look like the local traffic you want to measure.
We support HTTP, HTTPS and SOCKS5, with sticky or rotating sessions, so you can tunnel whatever your client negotiates and decide per job whether an IP should hold for a session or change. Credentials are self-serve and a usage dashboard shows consumption, which matters when billing is metered per byte. Compact, reused HTTP/2 connections help there too.
Get the identity right first, then tune the protocol.
Jon
Try it on real carrier IPs
If you are building a scraper, a price-monitoring job or an ad-verification check, MaskLabs gives you real US mobile carrier IPs in 46 cities, with rotating and sticky sessions, API access and HTTP, HTTPS and SOCKS5 support. Plans are billed monthly by data pool size: Starter is $30.00 per month, Basic $100.00, Advanced $500.00 and Scale $1,000.00. There is a free trial with limited data, and you can set up without a sales call or a long-term commitment.

Prepaid data add-ons billed per GB are available when a project needs more than your monthly pool. See the features and integrations for Python, Node.js, Java, C#, Rust and browser automation setups.
FAQ
Does HTTP/2 make a proxy faster?
It can improve concurrency and reduce header overhead when you send many requests to the same host over one connection. It does not change the network path or the exit IP. Stream limits, flow control and mobile network latency still shape the results.
Can a normal HTTPS proxy carry HTTP/2 traffic?
Yes, in the common case. Your client sends CONNECT, the proxy opens a TCP tunnel to the target, and your client negotiates TLS and h2 with the target through it. The proxy only relays encrypted bytes.
Will HTTP/2 hide my location or stop blocks?
No. Location and trust come from the exit IP. To appear in a specific US city, you need an IP that is actually in that city, such as a real carrier IP.
Why do I get 421 errors through a proxy?
The server is rejecting reuse of an HTTP/2 connection for a hostname it does not want to serve on that connection. Open a separate connection for that host.
Sources
- RFC 9113: HTTP/2
- nghttpx - HTTP/2 proxy - HOW-TO
- Envoy HTTP connection management
- HTTP2 | GOST v2
- A Primer on Proxies | Cloudflare Blog
- aspnetcore/grpc/performance.md
- OTLP/gRPC vs OTLP/HTTP for telemetry export
- API protocol comparison: gRPC, REST, GraphQL, Connect
- grpc-go PR #7881
- Livestream internet requirements