Skip to content

unwired: ByparrProxy Cloudflare bypass implemented but serve.rs hardwires NoProxy — bypass config fields are never read #467

Description

@forkwright

Finding

ByparrProxy in crates/zetesis/src/cf_bypass/byparr.rs implements a complete Cloudflare bot-protection bypass for search indexer fetches: HTTP fetch, cookie extraction, and CloudflareProxy trait impl. serve.rs unconditionally passes Arc::new(NoProxy) to the search subsystem and never reads cloudflare_bypass_enabled or cf_proxy_url from SearchSubsystemConfig. The bypass is fully implemented and permanently disabled regardless of config.

Evidence

serve.rs:645: Arc::new(NoProxy) is hardwired. SearchSubsystemConfig fields cloudflare_bypass_enabled and cf_proxy_url exist but rg 'cloudflare_bypass_enabled|cf_proxy_url' in serve.rs = 0 hits. rg 'ByparrProxy' across the codebase = only definition + mod re-export.

Why this matters

Any indexer behind Cloudflare protection returns bot-detection failures for all fetch attempts. The bypass capability was built precisely to handle this class of indexer, but the wiring conditional was never added to serve.rs. Operators who set cloudflare_bypass_enabled = true in config receive no error and no effect — the config is silently ignored.

Desired correction

In serve.rs, replace the unconditional Arc::new(NoProxy) with a conditional: read config.zetesis.cloudflare_bypass_enabled; if true, construct Arc::new(ByparrProxy::new(config.zetesis.cf_proxy_url.clone())) and pass it instead. Add an integration test that verifies the bypass is selected when the config flag is set.

Done when: cloudflare_bypass_enabled = true in config causes ByparrProxy to be used for indexer fetches, and the config field has a production read site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions