Skip to content

feat(haproxy): add optional User-Agent policy - #67

Merged
fionera merged 3 commits into
masterfrom
agent/ua-policy-example
Jul 11, 2026
Merged

fionera merged 3 commits into
masterfrom
agent/ua-policy-example

Conversation

@fionera

@fionera fionera commented Jul 10, 2026

Copy link
Copy Markdown
Member

What

  • Add a complete opt-in HAProxy configuration for User-Agent and public-endpoint traffic shaping.
  • Keep the default configuration User-Agent neutral.
  • Use separate lowercase substring maps with deterministic public, tarpit, AI-challenge, allowed-tool, and browser precedence.
  • Bound tarpits, preserve challenge POST levels, pseudonymize source logs, and support the larger inline-worker bundle.

Why

User-Agent strings are spoofable, so this is explicitly an operator-reviewed traffic-shaping example rather than authentication. It also fixes the omnibus config where mixed curl + GPTBot markers could bypass the challenge.

Closes #19.

Validation

  • Both HAProxy configurations on HAProxy 3.3
  • Live routing checks for public, tarpit, AI, allowed-tool, and browser cases
  • Full browser challenge solve through the alternative configuration
  • npm run build

fionera and others added 3 commits July 11, 2026 04:57
The example was written on top of stacked branches that did not all
merge: drop the pseudonymous source-log key and the inline POW worker
bufsize tuning, and use the split berghain_challenge SPOE engine that
master's berghain.cfg now defines.
@fionera
fionera force-pushed the agent/ua-policy-example branch from f604e7a to 8ed9317 Compare July 11, 2026 03:02
@fionera
fionera merged commit b1d88d9 into master Jul 11, 2026
6 checks passed
@fionera
fionera deleted the agent/ua-policy-example branch July 11, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Haproxy sample config for usaergant based filtering

1 participant