pub struct DataDomeBypass<'tab> { /* private fields */ }datadome only.Expand description
DataDome bypass surface re-exports. Gated by the datadome cargo feature.
Drives a DataDome clearance flow against a single tab’s session.
Constructed via Tab::datadome().
Implementations§
Source§impl<'tab> DataDomeBypass<'tab>
impl<'tab> DataDomeBypass<'tab>
Sourcepub fn new(session: &'tab SessionHandle) -> DataDomeBypass<'tab>
pub fn new(session: &'tab SessionHandle) -> DataDomeBypass<'tab>
New driver with default 250ms poll interval + 30s timeout.
Sourcepub fn timeout(self, dur: Duration) -> DataDomeBypass<'tab>
pub fn timeout(self, dur: Duration) -> DataDomeBypass<'tab>
Override the default 30s overall timeout.
Sourcepub fn poll_interval(self, dur: Duration) -> DataDomeBypass<'tab>
pub fn poll_interval(self, dur: Duration) -> DataDomeBypass<'tab>
Override the default 250ms poll interval.
Sourcepub fn with_interception(self) -> DataDomeBypass<'tab>
pub fn with_interception(self) -> DataDomeBypass<'tab>
Enable the Fetch-domain fast-path. Spawns a Fetch subscription that
signals on first 2xx response to captcha-delivery.com or any
datadome* URL, waking the poll loop immediately.
Sourcepub fn on_captcha<F, Fut>(self, f: F) -> DataDomeBypass<'tab>
pub fn on_captcha<F, Fut>(self, f: F) -> DataDomeBypass<'tab>
Register a caller-supplied async CAPTCHA solver. Without it, a CAPTCHA
surface yields DataDomeError::CaptchaRequired.
The solver receives a DataDomeChallenge (captcha URL, page URL, UA,
cid, hash) and returns a DataDomeSolution carrying the solved
datadome cookie — wire it to a service like 2captcha / capsolver.
Sourcepub async fn wait_for_clearance(self) -> Result<ClearanceOutcome, DataDomeError>
pub async fn wait_for_clearance(self) -> Result<ClearanceOutcome, DataDomeError>
Run the surface-aware poll loop until clearance, block, or timeout.
§Returns
Cleared { datadome }— cookie landed and markers gone.ChallengeGone— markers gone, no cookie observed.AlreadyClear— no surface at call time.Blocked—window.dd.t == 'bv'(IP banned).TimedOut { last_surface }— deadline elapsed.
§Errors
DataDomeError::CaptchaRequired— captcha surface, no solver.DataDomeError::CaptchaSolver— registered solver errored.DataDomeError::Interception/DataDomeError::Call/DataDomeError::JsError.