Skip to main content

Crate zendriver_interception

Crate zendriver_interception 

Source
Expand description

Network interception via the Fetch CDP domain.

See the Interception chapter of the zendriver-rs user guide for narrative examples, glob/regex pattern semantics, and streaming-mode recipes.

Two entry points, both built off InterceptBuilder:

use zendriver_interception::InterceptBuilder;

let _handle = InterceptBuilder::new(tab)
    .block("*/ads/*")?
    .redirect("*/old/*", "https://example.com/new/")?
    .start();
// _handle stays in scope -> interception live.

Re-exports§

pub use actor::InterceptHandle;
pub use builder::InterceptBuilder;
pub use builder::RequestPattern;
pub use error::InterceptionError;
pub use host_matcher::HostMatcher;
pub use host_matcher::host_of;
pub use paused::PausedRequest;
pub use rule::Rule;
pub use types::AbortReason;
pub use types::RequestInfo;
pub use types::RequestOverrides;
pub use types::RequestStage;
pub use types::ResourceType;
pub use types::ResponseInfo;
pub use types::ResponseOverrides;

Modules§

actor
Background interception actor.
builder
InterceptBuilder — fluent rule + pattern registration.
error
Interception-layer errors.
host_matcher
Host-set matcher for the tracker/fingerprinter blocklist.
paused
PausedRequest — the per-event handle handed to stream consumers.
rule
Declarative interception rules.
types
Public types for the Fetch interception API.
url_pattern
CDP-style URL pattern matching.