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

h2TrafficOnlyFilter Filter

Restrict a rule to HTTP/2 exchanges so multiplexed traffic gets its own actions, separate from HTTP/1.1 and HTTP/3.

HTTP/2 multiplexing changes how an application behaves under load, and isolating that traffic with h2TrafficOnlyFilter gives you a clean way to study it. Whether you are profiling stream backpressure, downgrading flaky servers, or simply correlating logs by protocol, this filter pairs naturally with header, throttling, and routing actions.

When to use this filter

Use h2TrafficOnlyFilter when a rule should apply only to exchanges negotiated over HTTP/2. The filter runs as soon as the request headers are parsed, so it composes cleanly with header modifications, throttling, or any action that targets the request or response.

Typical scenarios:

  • Verifying that a feature works identically over HTTP/2 and HTTP/1.1 by tagging each path differently.
  • Forcing a fallback to HTTP/1.1 on a host that has flaky HTTP/2 support.
  • Measuring how a multiplexed client reacts to artificial latency without disturbing other traffic.

Real world examples

Add a header only on HTTP/2 traffic

Annotate every HTTP/2 request with a debug header so you can correlate it on the backend or in a downstream tool.

rules:
- filter:
    typeKind: H2TrafficOnlyFilter
  actions:
  - typeKind: AddRequestHeaderAction
    headerName: x-fluxzy-protocol
    headerValue: http2

Force a downgrade to HTTP/1.1 for a specific host over H2

Useful when a server advertises HTTP/2 but actually misbehaves; downgrade the connection so you can capture cleaner traces.

rules:
- filter:
    typeKind: FilterCollection
    operation: And
    children:
    - typeKind: H2TrafficOnlyFilter
    - typeKind: HostFilter
      pattern: flaky.example.com
      operation: Exact
  actions:
  - typeKind: ForceHttp11Action

Inject a delay on HTTP/2 callers

Simulate a slow network for multiplexed clients so you can see how a single-stream backpressure event affects user experience.

rules:
- filter:
    typeKind: H2TrafficOnlyFilter
  actions:
  - typeKind: DelayAction
    delay: 500

Reference

h2TrafficOnlyFilter

Description

Select H2 exchanges only.

Evaluation scope

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

requestHeaderReceivedFromClient This scope occurs the moment fluxzy parsed the request header receiveid from client

YAML configuration name

h2TrafficOnlyFilter

Settings

This filter has no specific characteristic

The following table describes the customizable properties available for this filter:

Property Type Description DefaultValue
inverted boolean Negate the filter result false

Example of usage

The following examples apply a comment to the filtered exchange

Select H2 exchanges only.

rules:
- filter:
    typeKind: H2TrafficOnlyFilter
  actions:
  - typeKind: ApplyCommentAction
    comment: filter was applied

.NET reference

View definition of H2TrafficOnlyFilter for .NET integration.

See also

The following filters are related to this filter:

Frequently asked questions

Does the filter cover HTTP/3 (QUIC) traffic?

No. HTTP/3 is a separate protocol, and this filter matches only HTTP/2 exchanges. Use h11TrafficOnlyFilter for HTTP/1.1 and stack filters as needed.

Can I detect server push or just regular requests?

Each multiplexed stream surfaces as its own exchange in Fluxzy, so any stream negotiated over HTTP/2 is matched regardless of its origin.

How do I know which protocol was actually used?

The captured exchange in the Fluxzy desktop or trace files records the negotiated protocol. You can also rely on this filter to verify rule application end to end.

Learn more about Fluxzy rules