Author: Aaron Nelson
Contact: aaron.nelson805@gmail.com
Original project: https://github.com/xajnx/proxyhunter
ProxyHunter is a Python CLI tool that scans random CIDR blocks for open proxy services on common ports and saves working results to a list file.
This project was created as a direct scanner instead of relying on third-party proxy list sources. It reads networks from ip_ranges_US.txt, samples a subset, and scans hosts for open proxy ports.
Current workflow:
- Load CIDR ranges from ip_ranges_US.txt.
- Randomly select a set of subnets.
- Probe common proxy ports per host.
- Detect proxy protocol (HTTP/HTTPS/SOCKS5) when possible.
- Save found proxies into proxy.lst.
- Scans common proxy ports (editable in code).
- Random subnet sampling from a country IP range file.
- Detects and records proxy types.
- Writes results to proxy.lst for reuse.
Python 3.8+ is recommended.
Install dependencies:
pip3 install -r requirements.txtNotes:
sys,os,time,random,re, andsocketare part of the Python standard library.- SOCKS checks in
requestsrequirepysocks.
git clone https://github.com/xajnx/proxyhunter.git
cd proxyhunter
pip3 install -r requirements.txtRun from the project directory:
python3 proxyhunter.pyOutput is appended to proxy.lst.
Optional flags:
--target-count Nstop after finding N proxies.--timeout SECONDSset socket timeout for port checks.--subnet-sample Nchoose how many random CIDR ranges to scan.--output FILEwrite results to a custom output file.--ranges-file FILEload CIDR ranges from a custom file.--seed Nset RNG seed for reproducible subnet selection.
Examples:
# Find 50 proxies and save to a custom file
python3 proxyhunter.py --target-count 50 --output proxy_50.lst
# Increase timeout for slower networks
python3 proxyhunter.py --timeout 0.2
# Scan fewer subnets for a faster test run
python3 proxyhunter.py --subnet-sample 10
# Use a different country ranges file
python3 proxyhunter.py --ranges-file ip_ranges_CA.txt
# Reproduce the same random subnet sample for testing
python3 proxyhunter.py --subnet-sample 10 --seed 42To scan ranges for another country, pass a different ranges file with --ranges-file.
python3 proxyhunter.py --ranges-file ip_ranges_CA.txtYou can still replace ip_ranges_US.txt directly if you prefer. One source is: http://www.ipaddresslocation.org/ip_ranges/get_ranges.php
- Scan only networks and systems you are authorized to test.
- Large range files can take significant time to process.
- Some detected open ports are not usable proxies; follow-up validation is still useful.
The original demonstration output is kept here as requested:
skywalker@endor:~/scripts/python/proxyhunter$ python3 proxyhunter.py
_-=-__-=-__-=-__-=-__-=-_
Proxy Hunter v1
_-=-__-=-__-=-__-=-__-=-_
Would you like to spoof your MAC address?(y/n):n
Initializing scanner..
Please wait this may take some time.
104.236.27.0/24: 256 available IPs
Checking host: 104.236.27.2
104.236.27.2:80 is OPEN
no proxy
Checking host: 104.236.27.6
104.236.27.6:80 is OPEN
Service: Socks
Saving..
104.236.27.6:81 is OPEN
no proxy
104.236.27.6:3128 is OPEN
Service: Socks
Saving..
104.236.27.6:8080 is OPEN
Service: Squid
Saving..
Checking host: 104.236.27.7
104.236.27.7:80 is OPEN
....
If this project is useful to you and you want to support development:
- CashApp: $therealajnelson