Skip to main content

ezcapsolver/tasks/
incapsula.rs

1use serde::Serialize;
2
3use super::ExtraFields;
4
5/// Incapsula Reese84 task.
6#[derive(Debug, Clone, Serialize, Default, bon::Builder)]
7#[builder(on(String, into))]
8#[serde(remote = "Self", rename_all = "camelCase")]
9pub struct IncapsulaTask {
10    /// Full Reese84 sensor script source.
11    #[builder(default)]
12    pub script: String,
13    /// URL of the sensor script.
14    #[builder(default)]
15    pub script_url: String,
16    /// URL of the page executing the sensor script.
17    #[builder(default)]
18    pub page_url: String,
19    /// Accept-Language header used by the browser flow.
20    #[serde(skip_serializing_if = "Option::is_none")]
21    pub accept_language: Option<String>,
22    /// Browser user agent.
23    #[builder(default)]
24    pub ua: String,
25    /// Optional proxy used by the worker.
26    #[serde(skip_serializing_if = "Option::is_none")]
27    pub proxy: Option<String>,
28    /// Proof-of-work data, required by sites that have PoW challenges enabled.
29    #[serde(skip_serializing_if = "Option::is_none")]
30    pub pow: Option<String>,
31    /// Additional worker parameters.
32    #[serde(skip)]
33    #[builder(default)]
34    pub extra: ExtraFields,
35}