What HTTP Client Does Holehe Use and How Is It Configured?

Holehe uses the httpx library for all HTTP requests, with an httpx.AsyncClient configured solely through a user-adjustable timeout parameter.

Holehe is an open-source OSINT tool by megadose for checking if an email address is registered on various websites. Understanding its HTTP client configuration helps users optimize request behavior for different network conditions and security requirements.

HTTP Client: httpx.AsyncClient

Holehe performs all asynchronous HTTP requests through httpx, a modern Python HTTP client. The client instantiation occurs in holehe/core.py at line 213:

client = httpx.AsyncClient(timeout=timeout)

This single-line configuration creates the core HTTP client used across all website checks. The httpx dependency is declared in setup.py as a required package, ensuring consistent behavior across installations.

Configurable Settings

Timeout (User-Accessible)

The only HTTP client setting exposed through Holehe's public interface is request timeout. Users control this via command-line options:

Option Description Default
-T / --timeout Seconds to wait for server response 10 seconds

The timeout value is parsed in holehe/core.py at line 94 and passed directly to the httpx.AsyncClient constructor.

Example: Running Holehe with extended timeout

holehe user@example.com --timeout 30

This sets the timeout to 30 seconds, useful for slower networks or rate-limited targets.

Default Behavior (Non-Configurable)

Beyond timeout, the client uses httpx defaults with no customization:

  • No custom headers
  • No proxy configuration
  • No retry logic
  • Default connection pooling
  • No SSL/TLS customizations

A synchronous httpx.get call for version checking also uses default settings without modification.

Customizing the HTTP Client

CLI-Level Customization

Users can only adjust timeout through command-line arguments. This limitation is by design for simplicity, but restricts advanced use cases.

Code-Level Customization (Advanced)

To modify proxy settings, retry behavior, connection limits, or headers, developers must either:

  1. Edit source code: Modify holehe/core.py line 213 to pass additional parameters to httpx.AsyncClient
  2. Inject a pre-configured client: Bypass the default initialization by passing a custom httpx.AsyncClient to internal functions

Example: Custom client with proxy and connection limits

import httpx
from holehe.core import launch_module, get_functions, import_submodules

# Create a custom httpx client with advanced configuration

custom_client = httpx.AsyncClient(
    timeout=20,
    proxies="http://myproxy:8080",
    limits=httpx.Limits(max_connections=10, max_keepalive=5),
    headers={"User-Agent": "Custom-Holehe/1.0"}
)

# Load modules and retrieve website check functions

modules = import_submodules("holehe.modules")
websites = get_functions(modules)

# Use custom_client when calling launch_module instead of the default

This approach requires direct interaction with Holehe's internal API, as no public interface currently accepts an external client instance.

Key Source Files

  • holehe/core.py (line 213) — httpx.AsyncClient instantiation with timeout
  • holehe/core.py (line 94) — --timeout argument parsing
  • setup.py (line 11) — httpx dependency declaration

Summary

  • Holehe uses httpx.AsyncClient for all asynchronous HTTP requests
  • Only timeout is user-configurable via --timeout / -T flag (default: 10 seconds)
  • All other HTTP settings follow httpx defaults with no customization hooks
  • Advanced customization requires source code modification or direct client injection
  • Synchronous version checks use httpx.get with default settings

Frequently Asked Questions

What HTTP library does Holehe use?

Holehe uses httpx, a modern Python HTTP client that supports both synchronous and asynchronous requests. The core functionality relies on httpx.AsyncClient for concurrent website checks.

Can I use a proxy with Holehe?

Not through the command line. Holehe's CLI does not expose proxy settings. To use a proxy, you must either modify holehe/core.py line 213 to add a proxies parameter, or inject a pre-configured httpx.AsyncClient with proxy settings when calling internal functions directly.

How do I change the request timeout in Holehe?

Use the --timeout or -T flag followed by seconds: holehe email@example.com --timeout 30. The default is 10 seconds. This is the only HTTP client setting available through the public CLI.

Why does Holehe use httpx instead of requests?

Holehe uses httpx specifically for its async/await support. The tool performs many concurrent website checks, and httpx.AsyncClient enables efficient asynchronous I/O. The synchronous requests library would require thread-based concurrency, which is less efficient for high-concurrency HTTP workloads.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →