Skip to content

proxy configuration

alzzdev edited this page Jun 12, 2026 · 1 revision

Proxy Configuration

Atdork supports multiple proxy sources that work together as a unified pool.
You can combine a file, command‑line strings, and Tor – the tool will validate, rotate, and manage them automatically.


Why Proxies Matter

  • Anonymity – hide your real IP from search engines.
  • Rate‑limit evasion – distribute requests across multiple addresses.
  • Geo‑targeting – use region‑specific proxies for localised results.
  • Resilience – dead proxies are automatically removed from the pool.

Proxy Sources

1. Command‑Line String (--proxy)

Provide one or more proxy URLs separated by commas.

python main.py -q "test" --proxy "http://user:pass@proxy1:8080,socks5://127.0.0.1:1080"

Supported schemes: http, https, socks4, socks5, socks5h.

2. Proxy File (--proxy-file)

Create a plain text file with one proxy URL per line.
Lines starting with # are treated as comments and ignored.

Example proxies.txt:

# Premium datacenter proxies
http://user:pass@dc1.example.com:3128
http://user:pass@dc2.example.com:3128

# Residential proxies
socks5h://res1.provider.com:1080
socks5h://res2.provider.com:1080

Usage:

python main.py -q "test" --proxy-file proxies.txt

3. Tor Network (--tor)

If Tor is running on your machine, Atdork can use it as a proxy automatically.

# Start Tor service first, then:
python main.py -q "test" --tor

Atdork looks for Tor on 127.0.0.1:9050 (the default SOCKS5 port).
The proxy URL socks5h://127.0.0.1:9050 is added to the pool.


Proxy Management

Rotation

Proxies are selected from the pool in a round‑robin fashion.
Each request picks the next available proxy that is not currently in cooldown.

Cooldown (--proxy-cooldown)

When a proxy fails, it is temporarily banned for a configurable number of seconds.

python main.py -q "test" --proxy-file proxies.txt --proxy-cooldown 120

After 120 seconds, the proxy becomes available again automatically.

Auto‑Removal (--max-failures)

If a proxy fails consecutively a certain number of times, it is permanently removed from the pool.

python main.py -q "test" --proxy-file proxies.txt --max-failures 3
  • 3 – remove after 3 consecutive failures (default).
  • 0 – never remove; keep all proxies regardless of failures.

Strict Mode (--strict)

Prevents Atdork from ever falling back to a direct connection when all proxies are down.

python main.py -q "sensitive search" --proxy-file proxies.txt --strict

If all proxies fail, the tool raises an error instead of exposing your real IP.


Combining Sources

You can mix all three sources. They are merged into a single pool (duplicates are removed).

python main.py -q "test" \
  --proxy "http://backup:8080" \
  --proxy-file proxies.txt \
  --tor \
  --strict \
  --proxy-cooldown 90 \
  --max-failures 2

Priority when selecting: round‑robin across the combined pool.
If --strict is set, the tool never falls back to a direct connection.


Monitoring with Debug Mode

Use --debug to see real‑time proxy statistics after a search.

python main.py -q "test" --proxy-file proxies.txt --debug

Sample output:

Proxy stats: {'active': 4, 'banned': 1, 'total_success': 23, 'total_failure': 2}
  • active – proxies currently available.
  • banned – proxies in cooldown.
  • total_success – successful searches using proxies.
  • total_failure – failed searches using proxies.

Proxy Format Validation

Only valid proxy URLs are accepted. Each URL must contain:

  • A scheme (http, socks5, etc.)
  • A hostname or IP address
  • A port number (1‑65535)

Invalid proxies are silently ignored with a warning in debug mode.


Examples

Basic proxy file

python main.py -q "inurl:admin" --proxy-file proxies.txt -r 30

Tor only, strict mode

python main.py -q "confidential" --tor --strict

Combined with custom cooldown and auto‑removal

python main.py -q "target" --proxy-file proxies.txt --proxy-cooldown 120 --max-failures 5

Debug to inspect proxy health

python main.py -q "test" --proxy-file proxies.txt --debug

Related Pages

Clone this wiki locally