Skip to content

DKeken/proxy-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

proxy-toolkit

Two small tools for working with public proxies.

proxy-check    test a list, see what's actually alive
proxy-harvest  pull fresh public lists, rank, optionally push to 9Router

Both run locally. No API keys. No vendor lock-in.


Install

Clone anywhere:

git clone https://github.com/<you>/proxy-toolkit.git
cd proxy-toolkit

Requirements:

  • bash, curl, nc, python3 (every Mac/Linux)
  • bun for harvest (brew install oven-sh/bun/bun)

Optional — wire as Claude Code skills:

mkdir -p ~/.claude/skills
ln -sfn "$PWD/skills/proxy-check"   ~/.claude/skills/proxy-check
ln -sfn "$PWD/skills/proxy-harvest" ~/.claude/skills/proxy-harvest

Now Claude triggers on phrases like "check proxies", "найди прокси", "обнови 9router прокси".


proxy-check

Validate a proxy list. Outputs a clean table.

./skills/proxy-check/check-proxies.sh proxies.txt
pbpaste | ./skills/proxy-check/check-proxies.sh -
./skills/proxy-check/check-proxies.sh -r 5 -t 4 proxies.txt

Flags:

flag default meaning
-r 3 rounds per proxy
-c 40 parallel workers
-t 6 per-request timeout (sec)

Input formats accepted:

socks5://1.2.3.4:1080
http://user:pass@1.2.3.4:8080
1.2.3.4:8080

Output:

#  STATUS  CC  AVG_MS  OK/N  SPEED  TYPE    HOST:PORT          ORG
1  ALIVE   DE  1083    5/5   ok     socks5  130.61.119.46:3128 Oracle
2  ALIVE   FR  1125    5/5   ok     socks5  62.171.162.59:1080 Contabo

SPEED: fast ≤800ms · ok ≤1500ms · slow >1500ms. Country and ISP via ip-api.com batch (free, 45 req/min).


proxy-harvest

Pull from a curated set of auto-updated GitHub/CDN proxy repos, dedupe, validate via proxy-check, keep only stable proxies in rich countries, optionally drop them into a 9Router instance.

./skills/proxy-harvest/harvest-proxies.sh                  # top 10 table
./skills/proxy-harvest/harvest-proxies.sh -n 20            # wider
./skills/proxy-harvest/harvest-proxies.sh --import-9router # add to 9router
./skills/proxy-harvest/harvest-proxies.sh --replace-9router# wipe old, add new

Flags:

flag default meaning
-n 10 how many top proxies to keep
-r 5 rounds per proxy
-t 4 (sec) per-request timeout
-c 40 concurrency (don't go higher — local curl saturates)
-m 6000 max candidates after dedupe
--import-9router add top to 9Router
--replace-9router delete old harvest * / best-proxies * first

Env:

NINEROUTER_URL=http://localhost:20128   # default

If your 9Router has requireLogin, log in once and reuse the cookie:

curl -s -X POST $NINEROUTER_URL/api/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"password":"YOUR_PASSWORD"}' \
  -c ~/.9router-cookies.txt

(The script will gain --cookie-jar support on the next pass — for now, paste the same login + cookie flag into the script if you want auth.)

What gets kept

A proxy makes it to the top list only if:

  • ALIVE through https://api.ipify.org via socks/http CONNECT
  • success rate ≥ 80% over -r rounds
  • avg latency ≤ 1600ms
  • exit IP in a "rich" country: US CA GB DE FR IT JP NL CH SE NO DK FI IE BE AT AU SG LU

Rationale: public proxies die fast and most exit in places that get auto-rate-limited. Filtering by country and stability is the only thing that gives you a list that's still useful in 2 hours.

Sources

proxygenerator1/ProxyGenerator        MostStable + per-country
proxifly/free-proxy-list              jsdelivr CDN, every 5 min
nguywnben/daily-proxy-updates         every 6h
ErcinDedeoglu/proxies                 hourly
iplocate/free-proxy-list              every 30m
Mohammedcha/ProxRipper                every 15m
Ian-Lusule/Proxies                    every 30m
hookzof/socks5_list                   socks5/Telegram
noarche/proxylist-socks5-...          socks online

Add or remove sources by editing the SOURCES array in skills/proxy-harvest/harvest-proxies.ts.


A word on free proxies

Public proxies churn fast. Expect ~80% of any list to be dead. A proxy that worked an hour ago is probably gone now. This toolkit makes that visible — it does not make it go away.

If you need stability, buy private SOCKS5 (Webshare, Decodo, Oxylabs, Proxy-Seller) and feed those into proxy-check the same way.


Files

skills/
  proxy-check/
    check-proxies.sh   bash + python, no deps
    SKILL.md           Claude Code skill manifest
  proxy-harvest/
    harvest-proxies.ts bun script (the real one)
    harvest-proxies.sh thin wrapper: bun harvest-proxies.ts
    SKILL.md           Claude Code skill manifest

MIT.

About

Bun + bash tools to validate proxy lists and harvest fresh public proxies, with optional 9Router import

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors