proxy-lane-checker 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- proxy_lane_checker-0.2.0/.github/workflows/ci.yml +30 -0
- proxy_lane_checker-0.2.0/.github/workflows/release.yml +53 -0
- proxy_lane_checker-0.2.0/.gitignore +12 -0
- proxy_lane_checker-0.2.0/CHANGELOG.md +27 -0
- proxy_lane_checker-0.2.0/LICENSE +21 -0
- proxy_lane_checker-0.2.0/PKG-INFO +282 -0
- proxy_lane_checker-0.2.0/README.md +245 -0
- proxy_lane_checker-0.2.0/docs/AFFILIATE.md +52 -0
- proxy_lane_checker-0.2.0/docs/FAQ.md +21 -0
- proxy_lane_checker-0.2.0/docs/MLX_INTEGRATION.md +104 -0
- proxy_lane_checker-0.2.0/examples/brightdata.mapping.yaml +12 -0
- proxy_lane_checker-0.2.0/examples/brightdata.sample.csv +3 -0
- proxy_lane_checker-0.2.0/examples/generic.mapping.yaml +18 -0
- proxy_lane_checker-0.2.0/examples/generic.sample.csv +3 -0
- proxy_lane_checker-0.2.0/examples/oxylabs.mapping.yaml +17 -0
- proxy_lane_checker-0.2.0/examples/oxylabs.sample.csv +3 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/__init__.py +19 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/checks/__init__.py +7 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/checks/dnsbl.py +26 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/checks/http.py +71 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/checks/tcp.py +28 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/cli.py +311 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/deal.py +15 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/dedupe.py +23 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/import_adapters.py +178 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/mlx.py +266 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/models.py +177 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/parser.py +32 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/report.py +162 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/retry.py +53 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/runner.py +140 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/stats.py +16 -0
- proxy_lane_checker-0.2.0/proxy_lane_checker/tags.py +93 -0
- proxy_lane_checker-0.2.0/pyproject.toml +84 -0
- proxy_lane_checker-0.2.0/tests/test_cli.py +160 -0
- proxy_lane_checker-0.2.0/tests/test_dedupe.py +31 -0
- proxy_lane_checker-0.2.0/tests/test_geo_http.py +44 -0
- proxy_lane_checker-0.2.0/tests/test_import_adapters.py +101 -0
- proxy_lane_checker-0.2.0/tests/test_mlx.py +39 -0
- proxy_lane_checker-0.2.0/tests/test_mlx_apply.py +149 -0
- proxy_lane_checker-0.2.0/tests/test_models.py +23 -0
- proxy_lane_checker-0.2.0/tests/test_report.py +40 -0
- proxy_lane_checker-0.2.0/tests/test_retry.py +58 -0
- proxy_lane_checker-0.2.0/tests/test_runner.py +49 -0
- proxy_lane_checker-0.2.0/tests/test_stats.py +13 -0
- proxy_lane_checker-0.2.0/tests/test_tags.py +20 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
test:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
strategy:
|
|
10
|
+
fail-fast: false
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ matrix.python-version }}
|
|
20
|
+
|
|
21
|
+
- name: Install package and dev deps
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
pip install -e ".[dev]"
|
|
25
|
+
|
|
26
|
+
- name: Ruff
|
|
27
|
+
run: ruff check .
|
|
28
|
+
|
|
29
|
+
- name: Pytest
|
|
30
|
+
run: pytest
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up Python 3.12
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
|
|
19
|
+
- name: Install package and dev deps
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install --upgrade pip
|
|
22
|
+
pip install -e ".[dev]"
|
|
23
|
+
|
|
24
|
+
- name: Ruff
|
|
25
|
+
run: ruff check .
|
|
26
|
+
|
|
27
|
+
- name: Pytest
|
|
28
|
+
run: pytest
|
|
29
|
+
|
|
30
|
+
publish:
|
|
31
|
+
needs: test
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
- name: Set up Python 3.12
|
|
37
|
+
uses: actions/setup-python@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.12"
|
|
40
|
+
|
|
41
|
+
- name: Install build tools
|
|
42
|
+
run: python -m pip install --upgrade pip build twine
|
|
43
|
+
|
|
44
|
+
- name: Build
|
|
45
|
+
run: python -m build
|
|
46
|
+
|
|
47
|
+
- name: Twine check
|
|
48
|
+
run: twine check dist/*
|
|
49
|
+
|
|
50
|
+
- name: Publish to PyPI
|
|
51
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
52
|
+
with:
|
|
53
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.2.0 — 2026-06-11
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `mlx-apply --results` — read validated proxy from check JSON (`--index`, `--tag`, `--allow-failed`)
|
|
8
|
+
- `mlx-apply --dry-run` — print redacted PATCH payload without calling MLX API
|
|
9
|
+
- `PATCH /profile/partial_update` as default apply path (`--full` for POST `/profile/update`)
|
|
10
|
+
- `docs/MLX_INTEGRATION.md` — MLX apply + profile-yaml-factory workflow
|
|
11
|
+
- MLX apply tests with `httpx.MockTransport`
|
|
12
|
+
|
|
13
|
+
- `--format csv|json|table` on `proxy-lane check` (stdout) and `report`
|
|
14
|
+
- `proxy-lane dedupe proxies.txt` — remove duplicate lines, optional `-o`
|
|
15
|
+
- Transient-failure retry (max 2 retries) for TCP, HTTP, and geo checks
|
|
16
|
+
- Rich-powered table output for human-readable reports
|
|
17
|
+
- GitHub Actions CI (Python 3.10–3.12)
|
|
18
|
+
- README walkthrough: 48 proxies → 12 dead → tag residential
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- `check` always writes JSON to `-o`; `--format` controls stdout only
|
|
23
|
+
- Core deps: `click`, `httpx[socks]`, `rich` (MLX remains optional `[mlx]` extra)
|
|
24
|
+
|
|
25
|
+
## v0.1.0 — 2026-06-01
|
|
26
|
+
|
|
27
|
+
- Initial release: concurrent TCP/HTTP/geo/DNSBL checks, MLX apply, JSON results
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 proxy-lane-checker contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: proxy-lane-checker
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Dead proxies waste accounts — batch-check TCP, HTTP, geo, and DNSBL before assigning lanes.
|
|
5
|
+
Project-URL: Homepage, https://github.com/proxy-lane-checker/proxy-lane-checker
|
|
6
|
+
Project-URL: Documentation, https://github.com/proxy-lane-checker/proxy-lane-checker#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/proxy-lane-checker/proxy-lane-checker
|
|
8
|
+
Project-URL: Issues, https://github.com/proxy-lane-checker/proxy-lane-checker/issues
|
|
9
|
+
Author: proxy-lane-checker contributors
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: datacenter-proxy,dnsbl-check,geoip-proxy,http-proxy,lane-checker,proxy-batch,proxy-checker,proxy-health,proxy-latency,proxy-validator,residential-proxy,socks5-proxy
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: click>=8.1
|
|
25
|
+
Requires-Dist: httpx[socks]>=0.27
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
27
|
+
Requires-Dist: rich>=13.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: httpx[socks]>=0.27; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-httpx>=0.34; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: ruff>=0.8; extra == 'dev'
|
|
34
|
+
Provides-Extra: mlx
|
|
35
|
+
Requires-Dist: httpx>=0.27; extra == 'mlx'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# proxy-lane-checker
|
|
39
|
+
|
|
40
|
+
Python 3.10+ | MLX optional · [Compatibility](../packages/COMPATIBILITY.md)
|
|
41
|
+
|
|
42
|
+
Concurrent **proxy validator** — TCP connect, HTTP through proxy, optional geo IP lookup, latency p50/p95, and optional DNSBL listing.
|
|
43
|
+
|
|
44
|
+
Outputs JSON with pass/fail per proxy and recommended tags: `residential`, `datacenter`, `dead`.
|
|
45
|
+
|
|
46
|
+
## Problem
|
|
47
|
+
|
|
48
|
+
Proxy lists rot quickly. Before assigning IPs to scrapers or antidetect profiles, you need:
|
|
49
|
+
|
|
50
|
+
- Can we reach the host:port?
|
|
51
|
+
- Does HTTP actually work through the proxy?
|
|
52
|
+
- What country/ISP is the exit IP?
|
|
53
|
+
- Is latency acceptable (p50/p95)?
|
|
54
|
+
- Is the IP on a spam blacklist?
|
|
55
|
+
|
|
56
|
+
`proxy-lane` checks all of this concurrently and writes machine-readable results.
|
|
57
|
+
|
|
58
|
+
## pip install
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install proxy-lane-checker
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
MLX profile proxy apply:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install proxy-lane-checker[mlx]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Quick start
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Batch check a list (table to stdout, JSON saved to -o)
|
|
74
|
+
proxy-lane check proxies.txt --concurrency 20 --format table -o results.json
|
|
75
|
+
|
|
76
|
+
# CSV for spreadsheets
|
|
77
|
+
proxy-lane check proxies.txt --format csv -o results.json
|
|
78
|
+
|
|
79
|
+
# Single proxy with geo
|
|
80
|
+
proxy-lane check --proxy socks5://user:pass@host:port --geo
|
|
81
|
+
|
|
82
|
+
# Dedupe before checking
|
|
83
|
+
proxy-lane dedupe proxies.txt -o proxies-unique.txt
|
|
84
|
+
|
|
85
|
+
# Import vendor CSV (column mapping only — no API keys)
|
|
86
|
+
proxy-lane import examples/brightdata.sample.csv --format brightdata -o proxies.txt
|
|
87
|
+
proxy-lane check examples/oxylabs.sample.csv --import-format oxylabs --geo
|
|
88
|
+
|
|
89
|
+
# Pretty-print saved results
|
|
90
|
+
proxy-lane report results.json --format table
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Walkthrough: 48 proxies → 12 dead → tag residential
|
|
94
|
+
|
|
95
|
+
You bought a mixed list and need to know what is alive, what is dead, and which exits look residential before assigning them to MLX profiles.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# 1. Remove duplicate lines (vendor lists often repeat)
|
|
99
|
+
proxy-lane dedupe proxies.txt -o proxies-unique.txt
|
|
100
|
+
# Deduped 48 -> 45 (3 removed) -> proxies-unique.txt
|
|
101
|
+
|
|
102
|
+
# 2. Check with geo + limited concurrency (retries transient timeouts)
|
|
103
|
+
proxy-lane check proxies-unique.txt \
|
|
104
|
+
--concurrency 10 \
|
|
105
|
+
--geo \
|
|
106
|
+
--format table \
|
|
107
|
+
-o results.json
|
|
108
|
+
# Checked ... — total=45 passed=33 failed=12
|
|
109
|
+
# Table shows tags: dead, datacenter, residential, unknown
|
|
110
|
+
|
|
111
|
+
# 3. Export CSV for filtering in a spreadsheet
|
|
112
|
+
proxy-lane report results.json --format csv > results.csv
|
|
113
|
+
# Filter rows where tags contains "residential" and passed=yes
|
|
114
|
+
|
|
115
|
+
# 4. Apply a winner to an MLX profile
|
|
116
|
+
export MLX_TOKEN="..."
|
|
117
|
+
proxy-lane mlx-apply --profile-id "$PROFILE_ID" --proxy socks5://user:pass@residential-host:1080
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
In this example **48** lines became **45** unique after dedupe; **12** failed TCP/HTTP (`dead` tag); the remaining **33** get geo-based tags — pick `residential` for consumer ISP exits, `datacenter` for hosting ASNs.
|
|
121
|
+
|
|
122
|
+
## CLI
|
|
123
|
+
|
|
124
|
+
| Command | Description |
|
|
125
|
+
|---------|-------------|
|
|
126
|
+
| `proxy-lane check FILE` | Batch validate proxies from text file |
|
|
127
|
+
| `proxy-lane check --proxy URL` | Check one proxy |
|
|
128
|
+
| `proxy-lane check --format csv\|json\|table` | Stdout format (`-o` always JSON) |
|
|
129
|
+
| `proxy-lane check --concurrency N` | Asyncio semaphore limit (default 20) |
|
|
130
|
+
| `proxy-lane import FILE --format brightdata\|oxylabs\|generic` | Vendor CSV → `host:port[:user:pass]` lines |
|
|
131
|
+
| `proxy-lane check FILE --import-format FORMAT` | Check vendor CSV directly (YAML maps in `examples/`) |
|
|
132
|
+
| `proxy-lane dedupe FILE [-o OUT]` | Remove duplicate proxy lines |
|
|
133
|
+
| `proxy-lane report FILE --format csv\|json\|table` | Format saved JSON results |
|
|
134
|
+
| `proxy-lane mlx-apply --profile-id UUID --proxy URL` | Apply proxy to MLX profile (`[mlx]`) |
|
|
135
|
+
|
|
136
|
+
### Vendor CSV import
|
|
137
|
+
|
|
138
|
+
Maps common proxy list exports via YAML column configs in [`examples/`](examples/) — **no API keys**, only header → field mapping.
|
|
139
|
+
|
|
140
|
+
| `--format` | Mapping file | Typical columns |
|
|
141
|
+
|------------|--------------|-----------------|
|
|
142
|
+
| `brightdata` | `examples/brightdata.mapping.yaml` | `host`, `port`, `username`, `password` |
|
|
143
|
+
| `oxylabs` | `examples/oxylabs.mapping.yaml` | `ip`, `port`, `user`, `password` |
|
|
144
|
+
| `generic` | `examples/generic.mapping.yaml` | Edit `columns` to match your CSV |
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Convert CSV to proxies.txt
|
|
148
|
+
proxy-lane import vendor.csv --format oxylabs -o proxies.txt
|
|
149
|
+
|
|
150
|
+
# Custom mapping (copy generic.mapping.yaml)
|
|
151
|
+
proxy-lane import vendor.csv --format generic --mapping my.mapping.yaml -o proxies.txt
|
|
152
|
+
|
|
153
|
+
# Check without writing an intermediate file
|
|
154
|
+
proxy-lane check vendor.csv --import-format brightdata --concurrency 10 -o results.json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Sample fixtures: `examples/*.sample.csv` paired with `examples/*.mapping.yaml`.
|
|
158
|
+
|
|
159
|
+
### Proxy line formats
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
http://user:pass@host:8080
|
|
163
|
+
socks5://user:pass@host:1080
|
|
164
|
+
host:port
|
|
165
|
+
host:port:user:pass
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Lines starting with `#` are ignored.
|
|
169
|
+
|
|
170
|
+
### Checks performed
|
|
171
|
+
|
|
172
|
+
| Check | Description |
|
|
173
|
+
|-------|-------------|
|
|
174
|
+
| TCP | `asyncio.open_connection` to proxy host:port |
|
|
175
|
+
| HTTP | GET via proxy (default `http://httpbin.org/ip`) |
|
|
176
|
+
| Geo | `ip-api.com` JSON through proxy (`--geo`) |
|
|
177
|
+
| Latency | Multiple HTTP samples → p50 / p95 ms |
|
|
178
|
+
| DNSBL | Optional Spamhaus-style lookup (`--dnsbl`) |
|
|
179
|
+
| Retry | Up to 2 retries on transient timeouts / 5xx only |
|
|
180
|
+
|
|
181
|
+
### Tags
|
|
182
|
+
|
|
183
|
+
| Tag | When |
|
|
184
|
+
|-----|------|
|
|
185
|
+
| `dead` | TCP or HTTP failed |
|
|
186
|
+
| `datacenter` | Hosting ASN/org keywords or `hosting=true` from geo API |
|
|
187
|
+
| `residential` | Mobile ISP signals or residential org keywords |
|
|
188
|
+
| `unknown` | Alive but inconclusive classification |
|
|
189
|
+
|
|
190
|
+
### Exit codes
|
|
191
|
+
|
|
192
|
+
| Code | Meaning |
|
|
193
|
+
|------|---------|
|
|
194
|
+
| `0` | All proxies passed |
|
|
195
|
+
| `1` | One or more proxies failed |
|
|
196
|
+
| `2` | Runtime error |
|
|
197
|
+
|
|
198
|
+
## API
|
|
199
|
+
|
|
200
|
+
```python
|
|
201
|
+
from proxy_lane_checker import ProxyChecker, ProxySpec
|
|
202
|
+
from proxy_lane_checker.runner import CheckOptions
|
|
203
|
+
|
|
204
|
+
checker = ProxyChecker(CheckOptions(concurrency=20, geo=True))
|
|
205
|
+
batch = checker.run([ProxySpec.from_url("socks5://user:pass@1.2.3.4:1080")])
|
|
206
|
+
for item in batch.results:
|
|
207
|
+
print(item.proxy.display, item.passed, item.tags, item.latency_p95_ms)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## MLX apply (`[mlx]` extra)
|
|
211
|
+
|
|
212
|
+
Apply a **validated** proxy from check results or a direct URL. See [docs/MLX_INTEGRATION.md](docs/MLX_INTEGRATION.md) (pairs with **profile-yaml-factory**).
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
export MLX_TOKEN="your-bearer-token"
|
|
216
|
+
proxy-lane check proxies.txt --geo -o results.json
|
|
217
|
+
proxy-lane mlx-apply --profile-id PROFILE_UUID --results results.json --tag residential
|
|
218
|
+
proxy-lane mlx-apply --profile-id PROFILE_UUID --results results.json --dry-run
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
- Default: `PATCH /profile/partial_update` (proxy + `proxy_masking=custom`)
|
|
222
|
+
- `--full`: `POST /profile/update`
|
|
223
|
+
- `--dry-run`: print redacted payload, no API call
|
|
224
|
+
|
|
225
|
+
## Limitations
|
|
226
|
+
|
|
227
|
+
- **HTTP test URL** — default probe uses `httpbin.org`; blocked networks need a custom URL (future flag) or offline TCP-only inference.
|
|
228
|
+
- **Geo provider** — uses ip-api.com free tier (HTTP, rate limits); not a commercial geo database.
|
|
229
|
+
- **DNSBL accuracy** — public DNS resolvers may block or rate-limit DNSBL queries; treat as advisory.
|
|
230
|
+
- **Tag heuristics** — `residential` / `datacenter` are keyword + API flags, not ground truth.
|
|
231
|
+
- **SOCKS4** — parsed but prefer SOCKS5 for auth support.
|
|
232
|
+
|
|
233
|
+
## Production
|
|
234
|
+
|
|
235
|
+
Partner offers, eligibility, and disclosure: [docs/AFFILIATE.md](docs/AFFILIATE.md).
|
|
236
|
+
|
|
237
|
+
Typical workflow with antidetect profiles:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
proxy-lane check proxies.txt --concurrency 20 --geo --dnsbl -o results.json
|
|
241
|
+
proxy-lane report results.json --format table
|
|
242
|
+
export MLX_TOKEN="..."
|
|
243
|
+
proxy-lane mlx-apply --profile-id "$PROFILE_ID" --results results.json --tag residential
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Pair with [cookie-jar-bridge](https://github.com/cookie-jar-bridge/cookie-jar-bridge) and [playwright-cdp-probe](https://github.com/playwright-cdp-probe/playwright-cdp-probe) for full session QA.
|
|
247
|
+
|
|
248
|
+
## Guides
|
|
249
|
+
|
|
250
|
+
Monorepo playbooks (copy-paste commands, sample output, diagrams):
|
|
251
|
+
|
|
252
|
+
| Guide | Flow |
|
|
253
|
+
|-------|------|
|
|
254
|
+
| [Detection fail → MLX farm](../packages/docs/workflows/WORKFLOW_DETECTED.md) | `cdp-probe` → `cdp-connect` → `farm-runner mlx-pool` |
|
|
255
|
+
| [Competitor migration](../packages/docs/workflows/WORKFLOW_MIGRATION.md) | `antidetect-import` → `profile-factory mlx-create` |
|
|
256
|
+
| [Proxy lane → profile pool](../packages/docs/workflows/WORKFLOW_FARM.md) | `proxy-lane` → `profile-factory` → `farm-runner mlx-pool` |
|
|
257
|
+
|
|
258
|
+
**FAQ:** [docs/FAQ.md](docs/FAQ.md) — SOCKS5 checks, residential vs datacenter, DNSBL.
|
|
259
|
+
|
|
260
|
+
## Related tools
|
|
261
|
+
|
|
262
|
+
| Tool | Use with |
|
|
263
|
+
|------|----------|
|
|
264
|
+
| [playwright-cdp-probe](../playwright-cdp-probe/) — Score CDP/WebDriver exposure and fingerprint leaks | → [cdp-connect-kit](../cdp-connect-kit/) when probe fails |
|
|
265
|
+
| [cookie-jar-bridge](../cookie-jar-bridge/) — Convert, validate, and merge cookies across formats | → [session-bundle-kit](../session-bundle-kit/) for full session |
|
|
266
|
+
| [proxy-lane-checker](../proxy-lane-checker/) — Batch-check proxies for connectivity, geo, and DNSBL | → [profile-yaml-factory](../profile-yaml-factory/) |
|
|
267
|
+
| [fingerprint-coherence](../fingerprint-coherence/) — Lint fingerprints for cross-signal contradictions | → [profile-yaml-factory](../profile-yaml-factory/) before create |
|
|
268
|
+
| [human-input-kit](../human-input-kit/) — Human-like mouse, scroll, and warmup replay | → [automation-farm-runner](../automation-farm-runner/) |
|
|
269
|
+
| [cdp-connect-kit](../cdp-connect-kit/) — Playwright CDP connect; MLX start/stop helpers | → all packages needing CDP |
|
|
270
|
+
| [session-bundle-kit](../session-bundle-kit/) — Export/import cookies and storage as portable bundles | → [cookie-jar-bridge](../cookie-jar-bridge/) |
|
|
271
|
+
| [profile-yaml-factory](../profile-yaml-factory/) — YAML blueprints → MLX `profile/create` payloads | → [antidetect-importer](../antidetect-importer/) after migration |
|
|
272
|
+
| [antidetect-importer](../antidetect-importer/) — Parse competitor exports and push to MLX | → [profile-yaml-factory](../profile-yaml-factory/) |
|
|
273
|
+
| [automation-farm-runner](../automation-farm-runner/) — YAML job queue and MLX profile-pool runner | → [cdp-connect-kit](../cdp-connect-kit/) `[mlx]` |
|
|
274
|
+
|
|
275
|
+
## License
|
|
276
|
+
|
|
277
|
+
MIT
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
**Production antidetect:** [Multilogin X](https://multilogin.com/?ref=SAAS50) · Code `SAAS50` (-50% browser) · `MIN50` (-50% cloud phone)
|
|
282
|
+
More scripts: [@Multilogin_Scripts_Bot](https://t.me/Multilogin_Scripts_Bot) · [Coupons](https://anti-detect.github.io/)
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# proxy-lane-checker
|
|
2
|
+
|
|
3
|
+
Python 3.10+ | MLX optional · [Compatibility](../packages/COMPATIBILITY.md)
|
|
4
|
+
|
|
5
|
+
Concurrent **proxy validator** — TCP connect, HTTP through proxy, optional geo IP lookup, latency p50/p95, and optional DNSBL listing.
|
|
6
|
+
|
|
7
|
+
Outputs JSON with pass/fail per proxy and recommended tags: `residential`, `datacenter`, `dead`.
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
Proxy lists rot quickly. Before assigning IPs to scrapers or antidetect profiles, you need:
|
|
12
|
+
|
|
13
|
+
- Can we reach the host:port?
|
|
14
|
+
- Does HTTP actually work through the proxy?
|
|
15
|
+
- What country/ISP is the exit IP?
|
|
16
|
+
- Is latency acceptable (p50/p95)?
|
|
17
|
+
- Is the IP on a spam blacklist?
|
|
18
|
+
|
|
19
|
+
`proxy-lane` checks all of this concurrently and writes machine-readable results.
|
|
20
|
+
|
|
21
|
+
## pip install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install proxy-lane-checker
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
MLX profile proxy apply:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install proxy-lane-checker[mlx]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Batch check a list (table to stdout, JSON saved to -o)
|
|
37
|
+
proxy-lane check proxies.txt --concurrency 20 --format table -o results.json
|
|
38
|
+
|
|
39
|
+
# CSV for spreadsheets
|
|
40
|
+
proxy-lane check proxies.txt --format csv -o results.json
|
|
41
|
+
|
|
42
|
+
# Single proxy with geo
|
|
43
|
+
proxy-lane check --proxy socks5://user:pass@host:port --geo
|
|
44
|
+
|
|
45
|
+
# Dedupe before checking
|
|
46
|
+
proxy-lane dedupe proxies.txt -o proxies-unique.txt
|
|
47
|
+
|
|
48
|
+
# Import vendor CSV (column mapping only — no API keys)
|
|
49
|
+
proxy-lane import examples/brightdata.sample.csv --format brightdata -o proxies.txt
|
|
50
|
+
proxy-lane check examples/oxylabs.sample.csv --import-format oxylabs --geo
|
|
51
|
+
|
|
52
|
+
# Pretty-print saved results
|
|
53
|
+
proxy-lane report results.json --format table
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Walkthrough: 48 proxies → 12 dead → tag residential
|
|
57
|
+
|
|
58
|
+
You bought a mixed list and need to know what is alive, what is dead, and which exits look residential before assigning them to MLX profiles.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# 1. Remove duplicate lines (vendor lists often repeat)
|
|
62
|
+
proxy-lane dedupe proxies.txt -o proxies-unique.txt
|
|
63
|
+
# Deduped 48 -> 45 (3 removed) -> proxies-unique.txt
|
|
64
|
+
|
|
65
|
+
# 2. Check with geo + limited concurrency (retries transient timeouts)
|
|
66
|
+
proxy-lane check proxies-unique.txt \
|
|
67
|
+
--concurrency 10 \
|
|
68
|
+
--geo \
|
|
69
|
+
--format table \
|
|
70
|
+
-o results.json
|
|
71
|
+
# Checked ... — total=45 passed=33 failed=12
|
|
72
|
+
# Table shows tags: dead, datacenter, residential, unknown
|
|
73
|
+
|
|
74
|
+
# 3. Export CSV for filtering in a spreadsheet
|
|
75
|
+
proxy-lane report results.json --format csv > results.csv
|
|
76
|
+
# Filter rows where tags contains "residential" and passed=yes
|
|
77
|
+
|
|
78
|
+
# 4. Apply a winner to an MLX profile
|
|
79
|
+
export MLX_TOKEN="..."
|
|
80
|
+
proxy-lane mlx-apply --profile-id "$PROFILE_ID" --proxy socks5://user:pass@residential-host:1080
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
In this example **48** lines became **45** unique after dedupe; **12** failed TCP/HTTP (`dead` tag); the remaining **33** get geo-based tags — pick `residential` for consumer ISP exits, `datacenter` for hosting ASNs.
|
|
84
|
+
|
|
85
|
+
## CLI
|
|
86
|
+
|
|
87
|
+
| Command | Description |
|
|
88
|
+
|---------|-------------|
|
|
89
|
+
| `proxy-lane check FILE` | Batch validate proxies from text file |
|
|
90
|
+
| `proxy-lane check --proxy URL` | Check one proxy |
|
|
91
|
+
| `proxy-lane check --format csv\|json\|table` | Stdout format (`-o` always JSON) |
|
|
92
|
+
| `proxy-lane check --concurrency N` | Asyncio semaphore limit (default 20) |
|
|
93
|
+
| `proxy-lane import FILE --format brightdata\|oxylabs\|generic` | Vendor CSV → `host:port[:user:pass]` lines |
|
|
94
|
+
| `proxy-lane check FILE --import-format FORMAT` | Check vendor CSV directly (YAML maps in `examples/`) |
|
|
95
|
+
| `proxy-lane dedupe FILE [-o OUT]` | Remove duplicate proxy lines |
|
|
96
|
+
| `proxy-lane report FILE --format csv\|json\|table` | Format saved JSON results |
|
|
97
|
+
| `proxy-lane mlx-apply --profile-id UUID --proxy URL` | Apply proxy to MLX profile (`[mlx]`) |
|
|
98
|
+
|
|
99
|
+
### Vendor CSV import
|
|
100
|
+
|
|
101
|
+
Maps common proxy list exports via YAML column configs in [`examples/`](examples/) — **no API keys**, only header → field mapping.
|
|
102
|
+
|
|
103
|
+
| `--format` | Mapping file | Typical columns |
|
|
104
|
+
|------------|--------------|-----------------|
|
|
105
|
+
| `brightdata` | `examples/brightdata.mapping.yaml` | `host`, `port`, `username`, `password` |
|
|
106
|
+
| `oxylabs` | `examples/oxylabs.mapping.yaml` | `ip`, `port`, `user`, `password` |
|
|
107
|
+
| `generic` | `examples/generic.mapping.yaml` | Edit `columns` to match your CSV |
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Convert CSV to proxies.txt
|
|
111
|
+
proxy-lane import vendor.csv --format oxylabs -o proxies.txt
|
|
112
|
+
|
|
113
|
+
# Custom mapping (copy generic.mapping.yaml)
|
|
114
|
+
proxy-lane import vendor.csv --format generic --mapping my.mapping.yaml -o proxies.txt
|
|
115
|
+
|
|
116
|
+
# Check without writing an intermediate file
|
|
117
|
+
proxy-lane check vendor.csv --import-format brightdata --concurrency 10 -o results.json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Sample fixtures: `examples/*.sample.csv` paired with `examples/*.mapping.yaml`.
|
|
121
|
+
|
|
122
|
+
### Proxy line formats
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
http://user:pass@host:8080
|
|
126
|
+
socks5://user:pass@host:1080
|
|
127
|
+
host:port
|
|
128
|
+
host:port:user:pass
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Lines starting with `#` are ignored.
|
|
132
|
+
|
|
133
|
+
### Checks performed
|
|
134
|
+
|
|
135
|
+
| Check | Description |
|
|
136
|
+
|-------|-------------|
|
|
137
|
+
| TCP | `asyncio.open_connection` to proxy host:port |
|
|
138
|
+
| HTTP | GET via proxy (default `http://httpbin.org/ip`) |
|
|
139
|
+
| Geo | `ip-api.com` JSON through proxy (`--geo`) |
|
|
140
|
+
| Latency | Multiple HTTP samples → p50 / p95 ms |
|
|
141
|
+
| DNSBL | Optional Spamhaus-style lookup (`--dnsbl`) |
|
|
142
|
+
| Retry | Up to 2 retries on transient timeouts / 5xx only |
|
|
143
|
+
|
|
144
|
+
### Tags
|
|
145
|
+
|
|
146
|
+
| Tag | When |
|
|
147
|
+
|-----|------|
|
|
148
|
+
| `dead` | TCP or HTTP failed |
|
|
149
|
+
| `datacenter` | Hosting ASN/org keywords or `hosting=true` from geo API |
|
|
150
|
+
| `residential` | Mobile ISP signals or residential org keywords |
|
|
151
|
+
| `unknown` | Alive but inconclusive classification |
|
|
152
|
+
|
|
153
|
+
### Exit codes
|
|
154
|
+
|
|
155
|
+
| Code | Meaning |
|
|
156
|
+
|------|---------|
|
|
157
|
+
| `0` | All proxies passed |
|
|
158
|
+
| `1` | One or more proxies failed |
|
|
159
|
+
| `2` | Runtime error |
|
|
160
|
+
|
|
161
|
+
## API
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
from proxy_lane_checker import ProxyChecker, ProxySpec
|
|
165
|
+
from proxy_lane_checker.runner import CheckOptions
|
|
166
|
+
|
|
167
|
+
checker = ProxyChecker(CheckOptions(concurrency=20, geo=True))
|
|
168
|
+
batch = checker.run([ProxySpec.from_url("socks5://user:pass@1.2.3.4:1080")])
|
|
169
|
+
for item in batch.results:
|
|
170
|
+
print(item.proxy.display, item.passed, item.tags, item.latency_p95_ms)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## MLX apply (`[mlx]` extra)
|
|
174
|
+
|
|
175
|
+
Apply a **validated** proxy from check results or a direct URL. See [docs/MLX_INTEGRATION.md](docs/MLX_INTEGRATION.md) (pairs with **profile-yaml-factory**).
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
export MLX_TOKEN="your-bearer-token"
|
|
179
|
+
proxy-lane check proxies.txt --geo -o results.json
|
|
180
|
+
proxy-lane mlx-apply --profile-id PROFILE_UUID --results results.json --tag residential
|
|
181
|
+
proxy-lane mlx-apply --profile-id PROFILE_UUID --results results.json --dry-run
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
- Default: `PATCH /profile/partial_update` (proxy + `proxy_masking=custom`)
|
|
185
|
+
- `--full`: `POST /profile/update`
|
|
186
|
+
- `--dry-run`: print redacted payload, no API call
|
|
187
|
+
|
|
188
|
+
## Limitations
|
|
189
|
+
|
|
190
|
+
- **HTTP test URL** — default probe uses `httpbin.org`; blocked networks need a custom URL (future flag) or offline TCP-only inference.
|
|
191
|
+
- **Geo provider** — uses ip-api.com free tier (HTTP, rate limits); not a commercial geo database.
|
|
192
|
+
- **DNSBL accuracy** — public DNS resolvers may block or rate-limit DNSBL queries; treat as advisory.
|
|
193
|
+
- **Tag heuristics** — `residential` / `datacenter` are keyword + API flags, not ground truth.
|
|
194
|
+
- **SOCKS4** — parsed but prefer SOCKS5 for auth support.
|
|
195
|
+
|
|
196
|
+
## Production
|
|
197
|
+
|
|
198
|
+
Partner offers, eligibility, and disclosure: [docs/AFFILIATE.md](docs/AFFILIATE.md).
|
|
199
|
+
|
|
200
|
+
Typical workflow with antidetect profiles:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
proxy-lane check proxies.txt --concurrency 20 --geo --dnsbl -o results.json
|
|
204
|
+
proxy-lane report results.json --format table
|
|
205
|
+
export MLX_TOKEN="..."
|
|
206
|
+
proxy-lane mlx-apply --profile-id "$PROFILE_ID" --results results.json --tag residential
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Pair with [cookie-jar-bridge](https://github.com/cookie-jar-bridge/cookie-jar-bridge) and [playwright-cdp-probe](https://github.com/playwright-cdp-probe/playwright-cdp-probe) for full session QA.
|
|
210
|
+
|
|
211
|
+
## Guides
|
|
212
|
+
|
|
213
|
+
Monorepo playbooks (copy-paste commands, sample output, diagrams):
|
|
214
|
+
|
|
215
|
+
| Guide | Flow |
|
|
216
|
+
|-------|------|
|
|
217
|
+
| [Detection fail → MLX farm](../packages/docs/workflows/WORKFLOW_DETECTED.md) | `cdp-probe` → `cdp-connect` → `farm-runner mlx-pool` |
|
|
218
|
+
| [Competitor migration](../packages/docs/workflows/WORKFLOW_MIGRATION.md) | `antidetect-import` → `profile-factory mlx-create` |
|
|
219
|
+
| [Proxy lane → profile pool](../packages/docs/workflows/WORKFLOW_FARM.md) | `proxy-lane` → `profile-factory` → `farm-runner mlx-pool` |
|
|
220
|
+
|
|
221
|
+
**FAQ:** [docs/FAQ.md](docs/FAQ.md) — SOCKS5 checks, residential vs datacenter, DNSBL.
|
|
222
|
+
|
|
223
|
+
## Related tools
|
|
224
|
+
|
|
225
|
+
| Tool | Use with |
|
|
226
|
+
|------|----------|
|
|
227
|
+
| [playwright-cdp-probe](../playwright-cdp-probe/) — Score CDP/WebDriver exposure and fingerprint leaks | → [cdp-connect-kit](../cdp-connect-kit/) when probe fails |
|
|
228
|
+
| [cookie-jar-bridge](../cookie-jar-bridge/) — Convert, validate, and merge cookies across formats | → [session-bundle-kit](../session-bundle-kit/) for full session |
|
|
229
|
+
| [proxy-lane-checker](../proxy-lane-checker/) — Batch-check proxies for connectivity, geo, and DNSBL | → [profile-yaml-factory](../profile-yaml-factory/) |
|
|
230
|
+
| [fingerprint-coherence](../fingerprint-coherence/) — Lint fingerprints for cross-signal contradictions | → [profile-yaml-factory](../profile-yaml-factory/) before create |
|
|
231
|
+
| [human-input-kit](../human-input-kit/) — Human-like mouse, scroll, and warmup replay | → [automation-farm-runner](../automation-farm-runner/) |
|
|
232
|
+
| [cdp-connect-kit](../cdp-connect-kit/) — Playwright CDP connect; MLX start/stop helpers | → all packages needing CDP |
|
|
233
|
+
| [session-bundle-kit](../session-bundle-kit/) — Export/import cookies and storage as portable bundles | → [cookie-jar-bridge](../cookie-jar-bridge/) |
|
|
234
|
+
| [profile-yaml-factory](../profile-yaml-factory/) — YAML blueprints → MLX `profile/create` payloads | → [antidetect-importer](../antidetect-importer/) after migration |
|
|
235
|
+
| [antidetect-importer](../antidetect-importer/) — Parse competitor exports and push to MLX | → [profile-yaml-factory](../profile-yaml-factory/) |
|
|
236
|
+
| [automation-farm-runner](../automation-farm-runner/) — YAML job queue and MLX profile-pool runner | → [cdp-connect-kit](../cdp-connect-kit/) `[mlx]` |
|
|
237
|
+
|
|
238
|
+
## License
|
|
239
|
+
|
|
240
|
+
MIT
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
**Production antidetect:** [Multilogin X](https://multilogin.com/?ref=SAAS50) · Code `SAAS50` (-50% browser) · `MIN50` (-50% cloud phone)
|
|
245
|
+
More scripts: [@Multilogin_Scripts_Bot](https://t.me/Multilogin_Scripts_Bot) · [Coupons](https://anti-detect.github.io/)
|