New Transparent capture is in preview. Record every app's traffic with no proxy configuration, on Windows, macOS and Linux. Learn more

forceHttp2Action Action

Advertise HTTP/2 only via ALPN so Fluxzy and the upstream agree on h2, breaking the exchange if the server does not support it.

HTTP/2 is everywhere, but proving that an endpoint actually uses it (rather than just advertising it) often requires more than a curl command. forceHttp2Action removes the ambiguity by pinning the ALPN to h2 so you can confirm protocol behaviour, debug gRPC, or surface HTTP/2 specific bugs.

When to use this action

Use forceHttp2Action when you specifically want to exercise the HTTP/2 path of an upstream server. Fluxzy advertises only h2 in the ALPN list, so the server either accepts HTTP/2 or the connection fails.

Typical situations include:

  • Validating that a server actually serves HTTP/2 (not just advertises it) on production hostnames.
  • Forcing gRPC traffic to stay on HTTP/2 when the client might otherwise fall back.
  • Reproducing a bug that only manifests under HTTP/2 multiplexing.
  • Comparing request framing and header compression behaviour between HTTP/1.1 and HTTP/2.

The action runs on the onAuthorityReceived scope and only affects the Fluxzy to remote leg. It is silently ignored on clear traffic because HTTP/2 cleartext (h2c) is not supported.

Real world examples

Force HTTP/2 on a gRPC backend

Keeps the connection on h2 even if a misbehaving client tries to downgrade.

rules:
- filter:
    typeKind: HostFilter
    pattern: grpc.internal.example.com
  actions:
  - typeKind: ForceHttp2Action

Test HTTP/2 only on a single path

Useful when one endpoint is migrating to HTTP/2 while the rest of the host stays on 1.1.

rules:
- filter:
    typeKind: FilterCollection
    operation: And
    children:
    - typeKind: HostFilter
      pattern: api.internal.example.com
    - typeKind: PathFilter
      pattern: /v2/
  actions:
  - typeKind: ForceHttp2Action

Force HTTP/2 when the client supports both protocols

Lets you reproduce a multiplexing bug deterministically.

rules:
- filter:
    typeKind: HostFilter
    pattern: payments.example.com
  actions:
  - typeKind: ForceHttp2Action

Reference

forceHttp2Action

Description

Forces the connection between fluxzy and remote to be HTTP/2.0. This value is enforced when setting up ALPN settings during SSL/TLS negotiation.
The exchange will break if the remote does not support HTTP/2.0.
This action will be ignored when the communication is clear (h2c not supported).

Evaluation scope

Evaluation scope defines the timing where this filter will be applied.

onAuthorityReceived This scope denotes the moment fluxzy is aware the destination authority. In a regular proxy connection, it will occur the moment where fluxzy parsed the CONNECT request.

YAML configuration name

forceHttp2Action

Settings

This action has no specific characteristic

Example of usage

The following examples apply this action to any exchanges

Forces the connection between fluxzy and remote to be HTTP/2.0. This value is enforced when setting up ALPN settings during SSL/TLS negotiation.
The exchange will break if the remote does not support HTTP/2.0.
This action will be ignored when the communication is clear (h2c not supported).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: ForceHttp2Action

.NET reference

View definition of ForceHttp2Action for .NET integration.

See also

The following actions are related to this action:

Frequently asked questions

What happens if the server does not support HTTP/2?

ALPN fails to negotiate a shared protocol and the TLS handshake closes. The exchange will report a network error you can inspect in Fluxzy.

Does this work over plain HTTP (no TLS)?

No. HTTP/2 cleartext (h2c) is not supported, so the action is ignored on clear traffic.

Can I use it alongside forceTlsVersionAction?

Yes. They control independent aspects of the handshake. A typical pairing is TLS 1.3 plus HTTP/2 to match a modern browser baseline.

Does forcing HTTP/2 affect captured request headers?

Yes. HTTP/2 uses pseudo headers (:method, :path, :scheme, :authority) and the captured request reflects that framing. The semantics stay the same.

Learn more about Fluxzy rules