How to Configure Holehe to Use Proxies for HTTP Requests

Set the standard HTTP_PROXY and HTTPS_PROXY environment variables before executing Holehe; the tool relies on httpx's default behavior to automatically route all requests through the configured proxy since no dedicated --proxy CLI flag is implemented.

Holehe is an open-source OSINT tool developed by megadose that checks email addresses and usernames across various platforms. Because it performs all network operations using the httpx library (declared as a dependency in setup.py), configuring proxies requires setting system environment variables rather than using command-line arguments. This guide explains how to leverage Holehe's underlying httpx client to route traffic through HTTP, HTTPS, or SOCKS5 proxies as implemented in the source code.

How Holehe Handles Network Requests

Holehe performs all network calls through an asynchronous client instantiated in holehe/core.py. At line 213, the tool creates an httpx.AsyncClient instance without an explicit proxies argument:

import httpx                              # holehe/core.py#L3

...
timeout = args.timeout
client = httpx.AsyncClient(timeout=timeout)   # holehe/core.py#L213

Because the client initialization omits a proxies parameter, it defaults to httpx's standard behavior of automatically detecting proxy configuration from environment variables. According to the megadose/holehe source code, this design choice means the tool inherits all proxy capabilities directly from the underlying library.

Configuring Proxy Environment Variables

Because Holehe does not expose a --proxy CLI flag, you must configure proxies using the environment variables that httpx recognizes. The library supports HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and their lowercase equivalents.

HTTP and HTTPS Proxies

For standard HTTP or HTTPS proxies, export the following variables in your terminal:

export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="http://proxy.example.com:8080"

After setting these variables, every request made by Holehe's internal httpx client routes through the specified proxy server.

SOCKS5 Proxy Support

To use a SOCKS5 proxy, set the ALL_PROXY environment variable using the socks5:// scheme:

export ALL_PROXY="socks5://proxy.example.com:1080"

This configuration tunnels all traffic (both HTTP and HTTPS) through the SOCKS5 proxy.

Temporary vs. Permanent Configuration

You can set proxy variables for a single execution without modifying your shell environment permanently. Prefix the Holehe command with the variables:

HTTP_PROXY="http://proxy.example.com:8080" \
HTTPS_PROXY="http://proxy.example.com:8080" \
holehe -u target@example.com

For a permanent configuration valid across your entire session, use the export command as shown in the previous section.

Complete Configuration Examples

The following examples demonstrate practical proxy setups for different scenarios.

Permanent HTTP proxy for the current session:

export HTTP_PROXY="http://myproxy:3128"
export HTTPS_PROXY="http://myproxy:3128"
holehe -u alice@example.com

One-off execution without environment modification:

HTTP_PROXY="http://myproxy:3128" HTTPS_PROXY="http://myproxy:3128" holehe -u bob@example.org

Using a SOCKS5 proxy:

ALL_PROXY="socks5://myproxy:1080" holehe -u carol@example.net

Summary

  • Holehe uses httpx.AsyncClient defined in holehe/core.py (line 213) for all network requests, importing httpx at line 3.
  • The tool does not implement a --proxy CLI argument; configuration relies entirely on environment variables.
  • Set HTTP_PROXY and HTTPS_PROXY for standard HTTP proxies, or ALL_PROXY for SOCKS5 support.
  • Environment variables can be exported permanently or prefixed to a single command for temporary use.
  • Both uppercase (HTTP_PROXY) and lowercase (http_proxy) variable names are supported by the underlying httpx library.

Frequently Asked Questions

Does Holehe support a --proxy command-line argument?

No. As implemented in megadose/holehe, the tool does not expose a dedicated --proxy flag. The httpx.AsyncClient is created without explicit proxy arguments in holehe/core.py, forcing reliance on standard environment variables for proxy configuration.

Can I route Holehe traffic through a SOCKS5 proxy?

Yes. Set the ALL_PROXY environment variable using the socks5:// scheme (e.g., socks5://proxy.example.com:1080). This instructs the httpx client to tunnel all requests through the specified SOCKS5 server.

Do lowercase environment variables like http_proxy work?

Yes. The httpx library recognizes both uppercase (HTTP_PROXY, HTTPS_PROXY, ALL_PROXY) and their lowercase equivalents (http_proxy, https_proxy, all_proxy). Holehe inherits this behavior directly from its dependency.

Can I configure proxies via a configuration file instead of environment variables?

No. According to the source analysis, Holehe only supports proxy configuration through environment variables. The tool reads no proxy settings from configuration files; it solely depends on the environment variables read by the httpx client at initialization time in holehe/core.py.

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 →