{"slug": "a-script-that-tests-whether-your-network-breaks-large-uploads-to-the-claude-api", "title": "A script that tests whether your network breaks large uploads to the Claude API", "summary": "A new MIT-licensed Node.js script, claude-net-check.js, tests whether a local network path is corrupting large HTTPS uploads to api.anthropic.com, the fault behind Claude Code failures such as EPROTO, ECONNRESET and bad record mac. The script sends filler bytes in 1 KB, 50 KB, 300 KB and 1 MB sizes 25 times each (about 34 MB total by default), sends no API key or real content, and prints the TLS certificate issuer to reveal HTTPS interception; on one Windows 11 machine it reproduced the fault, with 50 KB uploads failing 10 of 25 times and 300 KB failing 15 of 25. The author reports the script has unit tests that all pass but has not been run on macOS or Linux, and it identifies which layer is at fault rather than which product is responsible.", "body_md": "Is something on your network breaking big HTTPS uploads to the Claude API?\n\nIf Claude Code keeps dying with `API Error: Unable to connect to API (EPROTO)`, `ECONNRESET`, or `bad record mac` / `TLSV1_ALERT_DECODE_ERROR`, but your internet otherwise works, this one-file script tells you whether the fault is on your network path and not in Claude Code.\n\n```\nnode claude-net-check.js\n```\n\nNeeds Node.js (tested on v24; it uses only Node's standard library, so older versions should work but haven't been tried). No dependencies, nothing to install.\n\nIt sends filler bytes (the letter \"a\") to `api.anthropic.com` in growing sizes, 1 KB, 50 KB, 300 KB and 1 MB, 25 times each, and counts how many complete. It sends **no API key and no real content**; the server just answers with an error status. What is being tested is whether the TLS connection survives the upload. It also prints the certificate issuer, so you can see if a security product is re-signing your HTTPS traffic.\n\nExample from a machine with the fault:\n\n```\nCertificate issuer: Google Trust Services\n    1 KB: ok 25/25  failed 0\n   50 KB: ok 15/25  failed 10  {\"ERR_SSL_SSL/TLS_ALERT_BAD_RECORD_MAC\":7,\"EPROTO\":3}\n  300 KB: ok 10/25  failed 15  {\"ERR_SSL_SSL/TLS_ALERT_BAD_RECORD_MAC\":14,\"EPROTO\":1}\n 1024 KB: ok 13/25  failed 12  {\"ERR_SSL_SSL/TLS_ALERT_BAD_RECORD_MAC\":11,\"ECONNRESET\":1}\n```\n\nThe signature is: **small requests always pass, big ones fail in bursts.** That is not a Claude Code bug. It points at something between you and the API that damages long TLS transfers.\n\n| Verdict | Meaning | \n|---|---|\n| All uploads completed | Your network path is fine. Look elsewhere. | \n| Small fine, large fail | The fault this tool is for. Suspects below. | \n| A few failed | Rerun. One-offs can be ordinary internet noise. | \n| Almost everything fails | Blocked or broken connection (firewall, proxy, VPN, DNS), not this fault. | \n\nExit code is 0 when clean and 1 otherwise.\n\nWork out which layer it is with A/B tests, one change at a time, rerunning the script each time:\n\n1. **Different network:** turn on your phone's hotspot, join it, rerun. Clean means your router or ISP; still failing means it's this PC.\n2. **Different adapter:** switch between Wi-Fi and Ethernet. Same result on both rules out the network card and its driver.\n3. **Security software:** antivirus and firewall \"HTTPS scanning\" or \"Web Shield\" features can break TLS even when switched off, because their network drivers stay loaded. Check whether the script warns about the certificate issuer, then try disabling or uninstalling the product.\n4. **VPN or corporate proxy:** disconnect and rerun.\n\n```\nnode claude-net-check.js --runs 10               # fewer uploads per size (about 14 MB total at 10)\nnode claude-net-check.js --host api.anthropic.com\nnode claude-net-check.js --timeout 15000         # ms per upload\n```\n\nDefault is about 34 MB of upload in total.\n\n- The verdict logic and the interception check have unit tests (`node claude-net-check.test.js` , all pass).\n- Run for real on one Windows 11 machine, where it reproduced a real fault (large uploads failing with `BAD_RECORD_MAC` ,`EPROTO` and`ECONNRESET` ). Not run on macOS or Linux, though it uses only Node's standard library.\n- The tool says where the problem *isn't* . It can point at a layer; it can't prove which product is guilty. The suspect list is a starting order, not a diagnosis.\n- Read-only: it changes nothing on your machine.\n\nMIT licensed.", "url": "https://wpnews.pro/news/a-script-that-tests-whether-your-network-breaks-large-uploads-to-the-claude-api", "canonical_source": "https://github.com/memorykit-maker/claude-net-check", "published_at": "2026-10-20 22:57:50+00:00", "updated_at": "2026-10-20 23:18:37.610016+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["Claude API", "Claude Code", "Anthropic", "Node.js", "Google Trust Services", "api.anthropic.com"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/a-script-that-tests-whether-your-network-breaks-large-uploads-to-the-claude-api", "markdown": "https://wpnews.pro/news/a-script-that-tests-whether-your-network-breaks-large-uploads-to-the-claude-api.md", "text": "https://wpnews.pro/news/a-script-that-tests-whether-your-network-breaks-large-uploads-to-the-claude-api.txt", "jsonld": "https://wpnews.pro/news/a-script-that-tests-whether-your-network-breaks-large-uploads-to-the-claude-api.jsonld"}}