Artica Wiki

VirtualBrowser and relays: X-Forwarded-For and X-Authenticated-User

Show the real workstation IP and user name behind a VirtualBrowser cluster or another relay, with X-Forwarded-For and X-Authenticated-User.

Some networks place a relay between the browsers and the Artica proxy.
A VirtualBrowser cluster is a common example: users browse inside a remote, isolated browser, and the VirtualBrowser servers send the web requests to Artica.
A load balancer or a parent proxy in front of Artica behaves the same way.

Without any setting, Artica only sees the relay.
Every request in Realtime requests, in the logs and in the statistics shows the IP address of a VirtualBrowser server.
The real user and the real workstation are lost.

The relay usually sends this information in two HTTP headers:

Artica can read both headers.

Benefits

How it works

  1. You declare the IP addresses of the relays in Follow sources clients addresses.
  2. When a request comes directly from a declared relay, the proxy takes the client IP address from X-Forwarded-For.
    Logs and IP-based rules use this address.
  3. When the option User from the X-Authenticated-User header is enabled, the proxy marks the requests that come from a declared relay.
    The Filtering service reads X-Authenticated-User only on marked requests and hands the name back to the proxy.
  4. A request from any other address is never marked.
    Its headers are ignored, and the proxy keeps the real source IP address.

The proxy checks the address of the machine connected to it.
The content of the headers cannot change that address.

A user authenticated by the proxy itself (Kerberos, NTLM, LDAP) always takes precedence over the header.

Requirements

Step 1: declare the relays

Open Your proxy > Global settings.
In the Events section, the card Follow sources clients addresses lists the declared relays.
The card User from the X-Authenticated-User header shows the state of the option.

Global settings, Events section: trusted relays and X-Authenticated-User option

The Events section of the proxy global settings.

Click the card Follow sources clients addresses to open the list of relays.

Follow sources clients addresses window with two VirtualBrowser servers

Two VirtualBrowser servers declared as trusted relays.

Click New Server and type the address of a relay.
Repeat for each VirtualBrowser server.

New Server dialog with an IP address

Add a relay.

Three formats are accepted:

Declare only the relays.
Every declared address is trusted to tell the proxy who the user is.

The check box in the Enabled column suspends a relay without deleting it.
Each change reloads the proxy.

Step 2: take the user from X-Authenticated-User

In the same window, click User from the X-Authenticated-User header.
The button switches between Enabled and Disabled, and the proxy reloads.

The option has no effect while no relay is declared.
When the option is disabled, the proxy still follows X-Forwarded-For from the declared relays.

Step 3: check the result

Click Requests in the top bar to open Realtime requests.

Realtime requests with workstation IP addresses and user names

Requests from VirtualBrowser with the real workstation and user.

In this example, every request comes from the VirtualBrowser server 192.168.90.116.

To find the requests of one user, see How to find an IP address and/or an user or a domain in realtime monitor.

Not to be confused with "protocol X-Forwarded-For"

The card protocol X-Forwarded-For, next to the relays, is a different setting.
It controls the header that Artica sends to the web sites, not the header it receives from the relays.

Value Header sent to the web sites
Enabled Artica adds the client IP address to the header.
Disabled Artica adds unknown instead of the client IP address.
pass Artica forwards the header unchanged.
anonymous Artica removes the header.
hide Artica replaces the header with the client IP address only.

Both settings are independent.
The relays you declare are taken into account whatever the value of protocol X-Forwarded-For.

REST API

The same settings are available on the local REST socket.

SOCKET=/usr/share/artica-postfix/bin/run/articarest.sock

# List the relays
curl -s --unix-socket $SOCKET http://localhost/proxy/balancers

# Add a relay, then apply (rebuild and one reload)
curl -s --unix-socket $SOCKET -X POST -d '{"ipsrc":"192.168.90.116"}' http://localhost/proxy/balancers
curl -s --unix-socket $SOCKET http://localhost/proxy/balancers/apply

# Suspend or resume relay 2, delete relay 2
curl -s --unix-socket $SOCKET -X PUT http://localhost/proxy/balancers/2/toggle
curl -s --unix-socket $SOCKET -X DELETE http://localhost/proxy/balancers/2

# State of the X-Authenticated-User option
curl -s --unix-socket $SOCKET http://localhost/proxy/balancers/xauthuser
{"Status":true,"Error":"","Data":{"enabled":true,"supported":true,"sources":2}}

# Enable it (the proxy reloads by itself)
curl -s --unix-socket $SOCKET -X PUT -d '{"enabled":true}' http://localhost/proxy/balancers/xauthuser

supported is false on proxy versions older than 5.
sources counts the enabled relays.

Limits

Troubleshooting

Symptom Check
Requests still show the relay address. The relay is declared with the address it uses to connect to the proxy.
The relay sends X-Forwarded-For.
The real IP address appears but no user. The option User from the X-Authenticated-User header is enabled.
The Proxy connector is active.
The relay sends X-Authenticated-User with this exact name.
A relay entered as a range is ignored. Versions before October 2026 dropped ranges silently.
Update Artica, or declare each address.
The option button does not appear. The proxy version is older than 5.
Only X-Forwarded-For is available.