]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] url_redirector: coherent browser fingerprint profiles 6053/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 22 May 2026 09:38:01 +0000 (10:38 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 22 May 2026 09:38:01 +0000 (10:38 +0100)
commitdd6214bd38a5b94861dd51fe5228ca7f7cc11b03
tree33df6931251a76c94c64b505bff970f67bd243fb
parentf7720651eddaed87626753bf7f7283bd5efd9902
[Feature] url_redirector: coherent browser fingerprint profiles

Resolving redirector/shortener URLs with a lone randomly-picked
User-Agent is easily spotted by cloaking pages, which key on a missing
or inconsistent header set. Replace the flat default_ua list with
default_profiles: five coherent browser profiles (Chrome, Edge,
Firefox, Safari) that each bundle a User-Agent with the exact header
set, values and order that browser sends. Chromium profiles carry
sec-ch-ua client hints; Firefox and Safari correctly omit them.

One profile is picked per task and reused for every hop of every
chain, so the identity stays consistent the way a real browser would.
Headers are sent as an ordered list so their order is preserved on the
wire (RSPAMD_HTTP_FLAG_ORDERED_HEADERS).

settings.user_agent becomes an optional operator override (legacy
single-header path) and is unset by default; settings.fingerprint_profiles
holds the profile list.

dummy_http.py logs received request headers in order; a new
STEALTH FINGERPRINT HEADERS functional test asserts the redirector
emits a coherent fingerprint with preserved header order.
src/plugins/lua/url_redirector.lua
test/functional/cases/162_url_redirector.robot
test/functional/util/dummy_http.py