1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # scanclient
//!
//! High-performance, connection-pooled, and observable HTTP client designed specifically
//! for Santh security scanning tools.
//!
//! This crate wraps `reqwest` to provide unified rate-limiting, custom DNS resolution,
//! automatic retries on specific status codes, proxy rotation, and specific security
//! scanning configurations (e.g. ignoring TLS errors or setting specific User-Agents).
//!
//! ## Architecture
//! - [`ScanClient`]: The main orchestration client.
//! - [`HttpConfig`]: Configuration options for proxies, timeouts, and rate limits.
//! - [`ScanResponse`]: A tailored response object capturing timing and status.
//!
//! ## Quick Start
//!
//! ```rust
//! use scanclient::config::HttpConfig;
//!
//! let config = HttpConfig::default();
//! assert_eq!(config.timeout_secs, 10);
//! assert_eq!(config.max_retries, 3);
//! assert!(config.tls_verify);
//!
//! // Load from TOML
//! let custom = HttpConfig::from_toml("timeout_secs = 30").unwrap();
//! assert_eq!(custom.timeout_secs, 30);
//! ```
/// TOML configuration helpers.
/// HTTP response wrappers.
pub use ;
pub use ;
pub use ScanResponse;