Proxy checker for Linux and macOS in bash, with RBL

remcheck.sh checks a proxy list in hundreds of threads right on your server: which proxies answer, how fast, and which IP they exit from. The second mode also looks up every exit IP in 17 spam lists.

  • bash and curl, nothing to install
  • up to 1000 threads
  • connect and RBL modes
  • free

Version 1.2 · 17.7 KBSHA-256 cfad8abe4c98e914f58f34eec7acc50ed1c821c830a6c3b300cbcba0bf6298ce

A terminal checks hundreds of proxies: green and red lights linked to network nodes

Running in a minute

Nothing to install: bash, curl and the standard tools already ship with macOS and most Linux servers. The script checks them at start and prints the install command if something is missing.

  1. Download the script

    Straight to the server where the proxies will work.

    curl -fsSLO https://remproxy.com/files/remcheck.sh
  2. Allow it to run

    Once, right after the download.

    chmod +x remcheck.sh
  3. Check your list

    Pass the list link from the panel: every subscription has its own your_proxy_id. A file on disk works too: ./remcheck.sh -f proxies.txt. Results land in a new folder next to the script.

    ./remcheck.sh -P socks5 -f https://proxy.remproxy.com/your_proxy_id.csv
If the script says missing tools

It happens on minimal Debian and Alpine images and in Docker containers. Install what is missing with one command for your system:

Debian / Ubuntu
sudo apt-get update && sudo apt-get install -y curl gawk coreutils grep sed
CentOS / Rocky / Alma / Fedora
sudo dnf install -y curl gawk coreutils grep sed
Alpine
apk add bash curl coreutils gawk grep sed

macOS: everything is already there, nothing to install.

Two modes

connect: live and fast

The script opens a page that returns the IP through every proxy and records the response time. Live proxies go to alive.txt, the fastest on top.

./remcheck.sh -f proxies.txt -n 200 -T 8

rbl: live and clean

Every exit IP gets looked up in 17 spam lists over DNS over HTTPS. For a CSV from the RemProxy panel the script takes the addresses from the real_ip column, so the lookup starts at once, without connecting through the proxies. Other lists get a connect pass first. Clean proxies go to clean.txt, listed ones to listed.txt.

./remcheck.sh -f proxies.txt -m rbl -n 100

Options

-f LIST
Proxy list: a file, an http(s) link or - to read stdin.
-m MODE
Mode: connect (default) or rbl.
-n NUM
How many proxies to check at once, 64 by default, 1000 at most. In rbl mode it also sets how many IPs go to the spam lists at once: 128 without -n, 256 at most.
-T SEC
Timeout per proxy in seconds, 10 by default.
-P PROTO
Protocol for lines without a scheme: http (default), socks5 or socks4.
-e URL
Page opened through each proxy. It must answer with an IP address, ipv4.icanhazip.com by default.
-d DIR
Folder for the results, remcheck-DATE-TIME by default.
-C
rbl mode with a RemProxy CSV: connect through every proxy anyway instead of taking IPs from the real_ip column.
-q
No progress line. Under cron it turns off by itself.

List formats

The script reads different notations in one file and skips repeats and empty lines. The CSV from the RemProxy panel works too.

host:port
host:port:user:pass
user:pass@host:port
socks5://user:pass@host:port
ip;port;country;speed;uptime;real_ip

What appears in the folder

  • alive.txtWorking proxies, the fastest on top.
  • dead.txtProxies that did not answer.
  • results.tsvA table: proxy, status, exit IP, time in ms, plus the lists in rbl mode.
  • clean.txtrbl mode: live proxies with a clean exit IP.
  • listed.txtrbl mode: live proxies whose IP sits in spam lists.

Checking a RemProxy list

The CSV link from the panel works directly. In rbl mode the script takes exit IPs from the real_ip column, looks up each address once and never connects through the proxies. It checks 128 addresses at a time, so 1000 IPs take under a minute. The summary gives clean and listed proxies and addresses as counts and percentages.

./remcheck.sh -f https://proxy.remproxy.com/your_proxy_id.csv -m rbl

Keep -n at or below the thread count of your package, or part of the checks hits the limit and lands among the dead.

When the IP is not in the whitelist

The list is served only to IPs from the subscription whitelist. If this machine is not there, the script stops and prints its IP: open panel.remproxy.com/subscriptions, choose the subscription and add this IP to Allowed IPs in the Access section, then run the check again. Exit code 3 marks this case in cron logs.

remcheck: the list server rejected this machine, its IP is not in the subscription whitelist.
  IP of this machine:        203.0.113.7
  Allowed IPs of the plan:   198.51.100.20
Find the IP of this machine

Checks on a schedule

The script has no periodic mode: cron keeps the schedule. The check starts by itself, and the latest result always sits in the same folder.

  • Open the schedule with crontab -e.
  • Add the line below: a check every 30 minutes, results in remcheck-latest, the log in remcheck.log.
  • Save the file. crontab -l shows the schedule.
crontab -e
*/30 * * * * $HOME/remcheck.sh -P socks5 -f https://proxy.remproxy.com/your_proxy_id.csv -d $HOME/remcheck-latest -q >> $HOME/remcheck.log 2>&1

cron works the same way on macOS, but it needs Full Disk Access to reach Documents and Desktop. Keeping the script and the list in your home folder is easier.

Requirements: bash 3.2 or newer, curl, awk, sed, grep, sort. On Windows the script runs in Git Bash or WSL, see below.

Running on Windows

Windows has no bash of its own, but Git for Windows brings it: Git Bash comes with bash, curl and the tools the script needs. The script runs there unchanged.

  1. Install Git for Windows from git-scm.com, the installer defaults are fine.
  2. Open Git Bash from the Start menu.
  3. Create a folder and download the script into it:
    mkdir -p /c/remcheck && cd /c/remcheck && curl -fsSLO https://remproxy.com/files/remcheck.sh
  4. Run the check. The bash prefix replaces chmod:
    bash remcheck.sh -P socks5 -f https://proxy.remproxy.com/your_proxy_id.csv -n 100
  5. Results sit in C:\remcheck\remcheck-DATE-TIME. Starting processes is slower on Windows than on Linux, so begin with -n 100.

A schedule on Windows

  • Open Task Scheduler and choose Create Basic Task.
  • Trigger: Daily. Then in the task properties, on the Triggers tab, turn on repeat every 30 minutes.
  • Action: Start a program. Program and arguments are below.
    Program
    C:\Program Files\Git\bin\bash.exe
    Arguments
    -lc "/c/remcheck/remcheck.sh -P socks5 -f https://proxy.remproxy.com/your_proxy_id.csv -d /c/remcheck/latest -q"
  • Save the task. Fresh results will be in C:\remcheck\latest.

If the server has WSL, run the script in its Ubuntu the same way as on Linux.

Questions and answers

01How many threads should I set?
A server with a 100 Mbit/s channel handles 100 to 300. Each check is one short request, so timeouts limit the pace more often than bandwidth. For a RemProxy list stay within the thread count of your package.
02Why are all proxies from my RemProxy list dead?
If the list comes from a link, the script recognises the refusal and prints the IP of the machine: add it to Allowed IPs of the subscription. When you check a file, run the script on a machine from the whitelist. Its IP is on the My IP page or in the output of curl -4 ifconfig.me.
03Why use the rbl mode if the proxies work anyway?
Mail servers and some sites refuse addresses from spam lists. The rbl mode separates such exits, so tasks that depend on reputation run through clean IPs only.
04Does the script send my proxies anywhere?
No. In connect mode each proxy makes one request to ipv4.icanhazip.com, and in rbl mode the script asks Google and Cloudflare DNS about the exit IPs. The results stay in a folder on your machine.
05How do I check SOCKS5?
Put the scheme in the line, for example socks5://host:port, or add -P socks5 for the whole list. RemProxy ports accept both HTTP and SOCKS5.

Need a pool for mass checks?

MIX pools of up to 25,000 IPs, unlimited traffic, HTTP and SOCKS5 on one port, access by IP. A test hour costs $1.

See packages
LOGIN/REGISTER