Expand description
HTTP client for wire-relay-server.
Sync wrapper around reqwest::blocking so CLI commands stay synchronous —
the only async surface in the crate is relay_server::serve. Async clients
land in v0.2 if a long-running daemon needs them.
Structs§
Constants§
- INSECURE_
SKIP_ TLS_ ENV - Env var: when set to a truthy value (
1,true,yes), every TLS verification check on every wire HTTPS client is disabled. Intended as an emergency-only operator override for environments behind a TLS-intercepting middlebox (corporate proxy, AV product like Avast re-signing certs with its own root, captive portal). Prints a loud stderr banner on every send when active. Do not set this in production. Documented in THREAT_MODEL.md + README.
Functions§
- build_
blocking_ client - Centralized builder for blocking HTTPS clients across wire. Loads
the OS native trust store (rustls-tls-native-roots) so corporate
proxies, AV cert-resign products, and on-prem CAs validate. Honors
the
INSECURE_SKIP_TLS_ENVescape hatch for the corporate-proxy emergency case. - format_
transport_ error - Flatten an
anyhow::Errorsource chain into a single human-readable transport-error line for thereasonfield inwire push --jsonand for stderr surfaces. Classifies the topmost cause (TLS error,DNS error,connect timeout,read timeout,HTTP error) so a silent failure no longer leaks past the user as a bare URL.