New Fluxzy v2 just shipped. Electron is out, Tauri is in. gRPC ready, 3x smaller install. Learn more

setUserAgentAction Action

Swap the outgoing User-Agent for a built-in browser profile so upstream servers see the agent string you want them to see.

The User-Agent header is still the simplest signal a server uses to decide which version of a page or API response to send back. Rewriting it on the fly is one of the fastest ways to reproduce client specific bugs or to test that a backend really respects the device classes it claims to support.

When to use this action

Reach for setUserAgentAction when you need to make a request look like it came from a different browser or operating system without touching the client. Fluxzy ships with a curated list of identifiers (Windows Chrome, macOS Safari, iOS Safari, Android Chrome, Linux Firefox and others) so you do not have to maintain version strings by hand.

This is useful for QA scenarios where a web app serves different markup to mobile and desktop visitors, for testing server side device detection logic, and for reproducing user bug reports that mention a specific browser. The action only rewrites the User-Agent header, it does not change TLS fingerprints or other client hints.

The rewrite happens on the requestHeaderReceivedFromClient scope, so it applies before the request is forwarded upstream.

Real world examples

Make every request look like mobile Safari on iOS

Useful for verifying responsive layouts and mobile only redirects served by a marketing site.

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: iOS_Safari

Send a Windows Chrome agent only to a specific host

Scope the override to one API so other traffic keeps the real client agent intact.

rules:
- filter:
    typeKind: HostFilter
    pattern: api.example.com
  actions:
  - typeKind: SetUserAgentAction
    name: Windows_Chrome

Emulate Android Chrome for traffic to a single domain

Reproduce an Android specific bug report against a staging environment without installing a device emulator.

rules:
- filter:
    typeKind: HostFilter
    pattern: staging.example.com
  actions:
  - typeKind: SetUserAgentAction
    name: Android_Chrome

Reference

setUserAgentAction

Description

Change the User-AgentThis action is used to change the User-Agent header of the request from a list of built-in user-agent values.

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

setUserAgentAction

Settings

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

Property Type Description DefaultValue
name string

Example of usage

The following examples apply this action to any exchanges

Change User-Agent to Android_Chrome (Mozilla/5.0 (Linux; Android 14; RMX3999 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.152 Mobile Safari/537.36).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: Android_Chrome

Change User-Agent to iOS_Safari (Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: iOS_Safari

Change User-Agent to Linux_Chrome (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: Linux_Chrome

Change User-Agent to Linux_Edge (Mozilla/5.0 (Wayland; Linux x86_64; System76 Galago Pro (galp2)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Ubuntu/24.04 Edg/122.0.2365.92).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: Linux_Edge

Change User-Agent to Linux_Firefox (Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: Linux_Firefox

Change User-Agent to macOS_Chrome (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: macOS_Chrome

Change User-Agent to macOS_Edge (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.11.3).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: macOS_Edge

Change User-Agent to macOS_Firefox (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: macOS_Firefox

Change User-Agent to macOS_Safari (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: macOS_Safari

Change User-Agent to Windows_Chrome (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: Windows_Chrome

Change User-Agent to Windows_Edge (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.11.3).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: Windows_Edge

Change User-Agent to Windows_Firefox (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0).

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: SetUserAgentAction
    name: Windows_Firefox

.NET reference

View definition of SetUserAgentAction for .NET integration.

See also

The following actions are related to this action:

Frequently asked questions

What values can I pass to the `name` property?

Built-in identifiers include Windows_Chrome, Windows_Edge, Windows_Firefox, macOS_Chrome, macOS_Safari, macOS_Firefox, macOS_Edge, Linux_Chrome, Linux_Firefox, Linux_Edge, iOS_Safari and Android_Chrome. Fluxzy maps each one to a realistic full User-Agent string.

Can I set a custom User-Agent that is not in the built-in list?

Yes. Use updateRequestHeaderAction with headerName: User-Agent and the exact value you want. setUserAgentAction is a convenience wrapper around the curated browser profiles.

Does this action also change TLS or JA3 fingerprints?

No. It only rewrites the HTTP header. If you need to match a browser at the TLS layer, combine it with setJa3FingerPrintAction or impersonateAction.

Will the change be visible in the Fluxzy capture?

Yes. The captured request shows the rewritten header as sent to the server, and you can compare it with the original client request in the exchange detail view.

Learn more about Fluxzy rules