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
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Rust client for the Blokli GraphQL API.
//!
//! # DNS override
//!
//! By default, [`BlokliClient`] uses the system DNS resolver through `reqwest`. Callers that need to keep Blokli
//! communication working while DNS is unreliable can configure [`BlokliClientConfig::dns_override`] to pin the Blokli
//! URL hostname to a fixed IP address.
//!
//! The request hostname is not rewritten. For example, a client configured with `https://blokli.example.org` and a DNS
//! override still sends requests for `blokli.example.org`, preserving TLS SNI and certificate validation while
//! bypassing system DNS for that hostname. When [`BlokliDnsOverride::port`] is set, it becomes the request port;
//! otherwise the original URL port or scheme default is used.
//!
//! ```no_run
//! use std::net::IpAddr;
//!
//! use blokli_client::{BlokliClient, BlokliClientConfig, BlokliDnsOverride};
//!
//! let client = BlokliClient::new(
//! "https://blokli.example.org".parse()?,
//! BlokliClientConfig {
//! dns_override: Some(BlokliDnsOverride {
//! ip: IpAddr::from([203, 0, 113, 10]),
//! port: None,
//! }),
//! ..Default::default()
//! },
//! );
//! # let _ = client;
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
//!
//! Leave `dns_override` as `None` to use normal system DNS resolution.
/// Current Blokli client API.
/// Errors returned by the Blokli client.
pub const CLIENT_VERSION: &str = env!;
pub use ;
pub use ;