Expand description
nab - Ultra-minimal browser engine
§Features
- HTTP Acceleration: HTTP/2 multiplexing, TLS 1.3, Brotli/Zstd compression
- Browser Fingerprinting: Realistic Chrome/Firefox/Safari profiles
- Authentication: 1Password CLI integration, cookie extraction
- JavaScript:
QuickJSengine with minimal DOM
§Example
use nab::AcceleratedClient;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = AcceleratedClient::new()?;
let html = client.fetch_text("https://example.com").await?;
println!("Fetched {} bytes", html.len());
Ok(())
}Re-exports§
pub use error::NabError;pub use api_discovery::ApiDiscovery;pub use api_discovery::ApiEndpoint;pub use auth::CookieSource;pub use auth::Credential;pub use auth::CredentialRetriever;pub use auth::CredentialSource;pub use auth::OnePasswordAuth;pub use auth::OtpCode;pub use auth::OtpRetriever;pub use auth::OtpSource;pub use browser_detect::BrowserType;pub use browser_detect::detect_default_browser;pub use fingerprint::BrowserProfile;pub use fingerprint::chrome_profile;pub use fingerprint::firefox_profile;pub use fingerprint::random_profile;pub use fingerprint::safari_profile;pub use form::Form;pub use form::parse_field_args;pub use http_client::AcceleratedClient;pub use http_client::SafeFetchConfig;pub use http_client::SafeFetchResponse;pub use http3_client::Http3Client;pub use http3_client::Http3Response;pub use login::LoginFlow;pub use login::LoginResult;pub use login::get_session_dir;pub use mfa::MfaHandler;pub use mfa::MfaResult;pub use mfa::MfaType;pub use mfa::NotificationConfig;pub use mfa::detect_mfa_type;pub use prefetch::EarlyHintLink;pub use prefetch::EarlyHints;pub use prefetch::PrefetchManager;pub use prefetch::extract_link_hints;pub use session::MAX_SESSIONS;pub use session::SessionStore;pub use ssrf::DEFAULT_MAX_BODY_SIZE;pub use ssrf::DEFAULT_MAX_REDIRECTS;pub use ssrf::extract_mapped_ipv4;pub use ssrf::is_denied_ipv4;pub use ssrf::is_denied_ipv6;pub use ssrf::validate_ip;pub use ssrf::validate_redirect_target;pub use ssrf::validate_url;pub use stream::StreamBackend;pub use stream::StreamInfo;pub use stream::StreamProvider;pub use websocket::JsonRpcWebSocket;pub use websocket::WebSocket;pub use websocket::WebSocketMessage;
Modules§
- api_
discovery - Static API Endpoint Discovery
- arena
- Arena Allocator for Response Buffering
- auth
- Authentication Module
- browser_
detect - Browser Detection
- content
- Content-type-aware response conversion.
- error
- Stable error type hierarchy for the
nabpublic API. - fingerprint
- Browser Fingerprint Spoofing
- form
- Form parsing and submission
- http3_
client - HTTP/3 + QUIC Client
- http_
client - High-Performance HTTP Client
- impersonate_
client - TLS fingerprint impersonation for anti-bot bypass.
- login
- Auto-login orchestration
- mfa
- Multi-Factor Authentication Flow Handler
- plugin
- External plugin system for custom
SiteProviderimplementations. - prefetch
- Prefetch & Early Hints (103)
- rate_
limit - Per-domain rate limiter for concurrent HTTP fetching.
- session
- Persistent named sessions for the
nab-mcpserver. - site
- Site-specific content extraction.
- ssrf
- SSRF (Server-Side Request Forgery) protection.
- stream
- Streaming media support for nab.
- websocket
- WebSocket Client with TLS
Constants§
- VERSION
- Version of nab