Metadata-Version: 2.4
Name: proxycheck-cli
Version: 0.1.0
Summary: CLI tool to check HTTP/HTTPS/SOCKS5 proxies — liveness, latency, exit IP, speed, geo, rotation, blacklist
Author: proxy-checker contributors
License: MIT
Project-URL: Homepage, https://github.com/anomalyco/Proxy-checker
Project-URL: Bug Tracker, https://github.com/anomalyco/Proxy-checker/issues
Project-URL: Source, https://github.com/anomalyco/Proxy-checker
Keywords: proxy,checker,socks5,http-proxy,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: Proxy Servers
Classifier: Topic :: System :: Networking
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx[socks]>=0.27
Requires-Dist: typer>=0.12
Requires-Dist: rich>=13
Requires-Dist: pydantic>=2
Dynamic: license-file

# proxy-checker

CLI tool to check HTTP/HTTPS/SOCKS5 proxies — liveness, latency, exit IP, speed, geo enrichment, rotation detection, and DNSBL blacklist checks.

![CLI screenshot](https://via.placeholder.com/800x400?text=Screenshot)

## Install

```bash
pip install proxycheck-cli
```

Requires Python 3.11+.

## Quick start

```bash
# Check proxies from file
proxycheck check proxies.txt

# Single proxy
proxycheck check http://user:pass@localhost:8888

# With geo, speed & blacklist
proxycheck check proxies.txt --geo --speed --blacklist

# Export results
proxycheck check proxies.txt -o results.json -f json
```

## Options

| Flag | Default | Description |
|------|---------|-------------|
| `SOURCE` | (required) | Proxy file path or inline proxy string |
| `-c`, `--concurrency` | 50 | Concurrent checks |
| `-t`, `--timeout` | 10 | Request timeout (s) |
| `--retries` | 1 | Retries per proxy on network error |
| `--rotations` | — | Rotation mode — makes N requests to detect exit IP changes |
| `--speed` | off | Measure download speed (Mbps) |
| `--geo` / `--no-geo` | on | Enrich with country, city, ASN via ip-api.com |
| `--expect-country` | — | Expected country code (e.g. US, RU) |
| `--expect-type` | — | Expected proxy type: residential, datacenter, mobile |
| `--blacklist` | off | Check exit IPs against public DNSBL blacklists |
| `-o`, `--output` | — | Export path |
| `-f`, `--format` | table | Output: table, csv, json |
| `-q`, `--quiet` | off | Only show final summary |

## Metrics per proxy

- **Status** — alive / dead
- **Latency** — response time in ms
- **Exit IP** — detected exit IP address
- **Country / City / ASN** — via ip-api.com (when `--geo`)
- **Proxy type** — residential, datacenter, mobile (when `--geo`)
- **Speed** — download speed in Mbps (when `--speed`)
- **Blacklisted** — status per DNSBL provider (when `--blacklist`)
- **Matches** — ✓ if exit IP matches expected country/type, ✗ if mismatch

## Input formats

One proxy per line. Comments (`#`) and blank lines are ignored.

```
host:port
user:pass@host:port
http://host:port
http://user:pass@host:port
https://host:port
socks5://host:port
```

## Privacy

Passwords are masked (`user:***@host:port`) in all output — table, CSV, and JSON.

## DNSBL providers

- `zen.spamhaus.org`
- `bl.blocklist.de`
- `dnsbl.dronebl.org`

## Contributing

PRs welcome. Run tests before submitting:

```bash
pip install -e ".[dev]"
ruff check
ruff format --check
python -m pytest
```

## License

MIT
