Skip to content

Commit f2a124f

Browse files
Copilotmonosans
andcommitted
Add documentation and examples for CIDR range scanning
Co-authored-by: monosans <76561516+monosans@users.noreply.github.com>
1 parent 88c16b5 commit f2a124f

2 files changed

Lines changed: 55 additions & 1 deletion

File tree

CIDR_EXAMPLES.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# CIDR Range Scanning Examples
2+
3+
This file demonstrates how to use CIDR range scanning in proxy-scraper-checker.
4+
5+
## Basic CIDR Examples
6+
7+
# Single IP (equivalent to 192.168.1.100:8080)
8+
192.168.1.100/32:8080
9+
10+
# Small subnet (4 IPs: .0, .1, .2, .3)
11+
192.168.1.0/30:3128
12+
13+
# Medium subnet (8 IPs: .0 through .7)
14+
10.0.0.0/29:1080
15+
16+
# Larger subnet (16 IPs: .240 through .255)
17+
172.16.1.240/28:8888
18+
19+
# Class C subnet (256 IPs: .0 through .255)
20+
203.0.113.0/24:9090
21+
22+
## Mixed with Regular Entries
23+
24+
# You can mix CIDR ranges with regular IP:port entries:
25+
192.168.1.0/30:8080
26+
127.0.0.1:8888
27+
10.0.0.0/31:3128
28+
8.8.8.8:53
29+
30+
## Comments and Invalid Lines
31+
32+
# Lines starting with # are treated as comments and ignored
33+
# Invalid CIDR ranges are preserved as-is for the regular parser
34+
invalid-cidr-range:1234
35+
not-an-ip:port
36+
37+
# Different protocols can use the same format
38+
# Just put them in the appropriate protocol section in your config

config.toml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,31 @@ include_geolocation = true
7474
# Proxy sources configuration
7575
# Add local files: ["./my_proxies.txt"] or URLs
7676
# Sources are fetched in parallel for speed
77+
#
78+
# CIDR Range Support:
79+
# You can now use CIDR notation to scan entire network ranges!
80+
# Format: IP/prefix:port (e.g., "192.168.1.0/24:8080")
81+
# This expands to all IPs in the range with the specified port.
82+
# Examples:
83+
# 192.168.1.0/30:8080 → 4 IPs (.0, .1, .2, .3)
84+
# 10.0.0.0/24:3128 → 256 IPs (.0 through .255)
85+
# 203.0.113.0/29:1080 → 8 IPs (.0 through .7)
86+
# Mix CIDR ranges with individual IP:port entries in the same file.
7787

7888
[scraping.http]
7989
enabled = true
8090
urls = [
8191
# Local file examples:
8292
# "./my_http_proxies.txt",
83-
# "/home/user/my_http_proxies.txt",
93+
# "/home/user/my_http_proxies.txt",
8494
# "C:/Users/user/Desktop/my_http_proxies.txt",
8595
# "file:///home/user/my_http_proxies.txt",
96+
97+
# CIDR range file example:
98+
# File containing: 192.168.1.0/24:8080
99+
# 10.0.0.0/29:3128
100+
# 203.0.113.1:1080
101+
# "./my_cidr_ranges.txt",
86102

87103
# Advanced URL configuration examples (with basic auth or custom headers):
88104
# HTTP Basic Auth example:

0 commit comments

Comments
 (0)