> /tools/gulp
gulp
alphaCheck many URLs and TLS endpoints in parallel: status, latency, redirect hops, certificate days left, chain and name match, exit codes for scripts.
Details
gulp answers two questions about a list of sites: are they up, and are their certificates fine? It checks many URLs and TLS endpoints in parallel and reports the HTTP status, latency, every redirect hop with its timings, and the final URL, plus the certificate's days left, issuer, name match and chain validity.
URLs get an HTTP request with the certificate of every https hop checked. host:port and tls://host targets get a TLS handshake only, so mail servers and other TLS ports work too. The verdict is in the exit status (0 ok, 1 fail, 5 warnings only), a short line per target, --json or --jsonl, always in input order.
It is one static binary with the Mozilla roots built in. It reads only the status line and headers, never the body, and never sends anything secret, even over a connection with a bad certificate.
Install and verify
Download the archive, check the minisign signature on SHA256SUMS, then the checksum, then unpack.
The archive holds the binary, its README and its license files.
The key is also at /minisign.pub.
# x86_64-unknown-linux-musl; for aarch64-unknown-linux-musl put that target in the file names instead B=https://crocbot.net/dl/gulp/0.1.1 curl -fsSO "$B/gulp-0.1.1-x86_64-unknown-linux-musl.tar.gz" -O "$B/SHA256SUMS" -O "$B/SHA256SUMS.minisig" minisign -Vm SHA256SUMS -P RWRSMj4Ps2C5uvNlvesTSmGGtyMounRPtQpqzEVG7+ryiL5TwCUnvd5v sha256sum -c --ignore-missing SHA256SUMS tar xzf gulp-0.1.1-x86_64-unknown-linux-musl.tar.gz && ./gulp-0.1.1-x86_64-unknown-linux-musl.d/gulp --version mkdir -p ~/.local/bin && install -m 755 gulp-0.1.1-x86_64-unknown-linux-musl.d/gulp ~/.local/bin/
Without minisign, sha256sum -c alone still catches corrupted downloads, but only the
signature proves the files came from crocbot.net. The last line copies gulp-0.1.1-x86_64-unknown-linux-musl.d/gulp to
~/.local/bin/; make sure that directory is on your PATH, or install it anywhere else you like.
Usage
gulp [OPTIONS] [TARGET...]: a TARGET is an http(s):// URL (HTTP request, redirects followed, the certificate of every https hop) or host:port, [v6]:port, tls://host[:port] (TLS handshake only). Targets also come from -f FILE (repeatable, - for stdin) or from stdin when none is given, one per line with # comments. A bare example.com is refused.
Exit codes
0every target ok1at least one target failed5warnings only (nothing failed)2usage,3input (unreadable--fileor--ca-file, invalid target in a file),4network (a target could not be checked)- the worst outcome wins: error (
4) > fail (1) > warn (5) > ok (0)
Examples
$ gulp https://crocbot.net/ crocbot.net:443
ok https://crocbot.net/ HTTP 200 in 75 ms; cert 86 days left (TLSv1.3, Let's Encrypt YE2)
ok crocbot.net:443 cert 86 days left (TLSv1.3, Let's Encrypt YE2)
2 checked: 2 ok, 0 warn, 0 fail, 0 error
# act on the exit status
gulp -q https://example.com/ https://example.com/api/health
case $? in 0) echo fine ;; 5) echo "works, needs a look" ;; 1) echo FAILING ;; *) echo "could not check" ;; esac
# certificates only (any TLS port), warn 30 days ahead, JSON Lines
gulp -l -w 30 example.com:443 mail.example.com:993 tls://example.org
# a list from a file, 32 at a time, only the problems
gulp -l -P 32 -f sites.txt | jq -c 'select(.status != "ok") | {target, problems}'
# every tool page on this site, from another tool's output
curl -s https://crocbot.net/api/v1/tools.json | snap '.tools[].url' | gulp
# expect a redirect, judge the first response only
gulp -s 301 --max-redirects 0 http://example.com/
# private CA (staging, internal services)
gulp --ca-file ./ca.pem https://staging.internal:8443/
Status
ok: everything passedwarn: works but needs attention: certificate expires within--warn-days(14), slower than--warn-ms, redirect from https to plain httpfail: answered, but wrong: status not in--expect(200-399), certificate expired, not yet valid, untrusted, for another name or under--fail-days, redirect loop, too many redirectserror: could not be checked: DNS, connect, timeout, TLS handshake failure, not HTTP
A bad certificate does not stop the HTTP check: the handshake completes, the certificate is described, and the status is still reported.
Options
-j,--json: one JSON object{checked_at, summary: {total, ok, warn, fail, error}, results: [...]};-l,--jsonl: one result per line, written as soon as it and those before it are done;-q,--quiet: exit status only-w,--warn-days N(14);-c,--fail-days N(0, only once expired)-s,--expect LIST: accepted final statuses, e.g.200,2xx,200-299, comma-separated (200-399)--warn-ms MS: warn when the HTTP requests take longer in total;--max-redirects N(10);--head: HEAD instead of GET--tls-only: https URLs get only the TLS handshake;--ca-file PEM: also trust these CA certificates-f,--file PATH;-P,--parallel N(8);-t,--timeout SECSper target, every hop included (10)
JSON result
{"target", "kind": "url"|"tls", "status", "problems": [...], "checked_at", "elapsed_ms",
"http": {"status","reason","final_url","redirects","ms","ttfb_ms","content_type","server",
"hops": [{"url","status","location","address","dns_ms","connect_ms","tls_ms",
"ttfb_ms","ms","tls"}]} | null,
"tls": {"host","port","sni","protocol","cipher","alpn","handshake_ms","chain_valid",
"chain_error","name_match","days_left","not_before","not_after","subject",
"issuer","san","serial","sig_alg","sha256","chain": [...]} | null,
"error", "error_kind": "dns"|"refused"|"connect"|"timeout"|"tls"|"http"|"redirect"|null}
tlsis the certificate of the final https hop, or of the endpoint for TLS targets.days_leftis whole days, negative once expired.chain_validis the full WebPKI verdict against the bundled Mozilla roots (plus--ca-file), withchain_errorsaying why not.name_matchis checked separately.- Phase timings are
nullwhen the phase was never reached.problemsare human-readable, worst first.
Network
Direct connections only (no proxy), HTTP/1.1 over rustls, TLS 1.2 and 1.3, a fresh handshake for every check. When a host has several addresses, each connect attempt gets a short timeout so a blackholed IPv6 path cannot exhaust the budget before IPv4 is tried. Only the status line and headers are read. User-Agent: gulp/VERSION (+https://crocbot.net/tools/gulp/). Please check politely: every few minutes is plenty for most sites.
Files for 0.1.1
| File | Kind | Target | Size | SHA-256 |
|---|---|---|---|---|
gulp-0.1.1-x86_64-unknown-linux-musl | binary | x86_64-unknown-linux-musl | 1.6 MiB | b422e0fd01015dee6c5ddfc5ff037b3563824eac4c69bb5887699311feda62f2 |
gulp-0.1.1-aarch64-unknown-linux-musl | binary | aarch64-unknown-linux-musl | 1.3 MiB | 4d06f31ec281e203c6a1179d6e641dc0c73629c1e8ed5901b755c4c0953024b2 |
gulp-0.1.1-x86_64-unknown-linux-musl.tar.gz | archive | x86_64-unknown-linux-musl | 903 KiB | de7077c3496ee28fb867097fb9a5f215b77e2088e4c03a04edc142808263b53d |
gulp-0.1.1-aarch64-unknown-linux-musl.tar.gz | archive | aarch64-unknown-linux-musl | 829 KiB | 840e7eb6819903b53313660dfb09d6f98630ccd8b0841ef86a4d2b7be7050282 |
gulp-0.1.1-src.tar.gz | source | - | 133 KiB | 7b87662988bee7a9abcfb30c8a7e5375e5e2f535faf775b23220e414489653bb |
SHA256SUMS | checksums | - | 516 B | 32e53cfd7f322ec5dda17df155514d8e2b3d2094c1d42c87b8c21ca56c2c41e5 |
SHA256SUMS.minisig | signature | - | 317 B | 593c960ab3f7b01b54a74788d9f0d6241fc16e2921b915ad58f46956ec8700f7 |