Useful articles
21 articles
WebSocket
Close codes and failed handshakes.- close code 1006WebSocket closed with status code 1006 — how to find the causeThe connection died with no Close frame. Four causes, and how to tell them apart.
- Error during WebSocket handshakeError during WebSocket handshake — what each message meansThe server did not answer the Upgrade request with a valid 101. The end of the console message says what was wrong.
Certificates & devices
Getting a browser or a phone to trust the proxy.- Trust anchor for certification path not foundAndroid does not trust the proxy certificateApps built for Android 7+ ignore user-installed CAs. How to allow them in a debug build with network_security_config, and what it will not fix.
- Certificate Trust Settings: offiOS: profile installed, certificate not trustedOn iOS a root certificate takes two steps. The second one is under About.
- NET::ERR_CERT_AUTHORITY_INVALIDERR_CERT_AUTHORITY_INVALID through a proxy — how to fix itChrome does not trust the proxy's root certificate. Where to install it on macOS, Windows and Linux, and which browsers and tools ignore the system store.
- 0 requests from deviceHow to see the traffic from an iPhone or an Android phonePhone and computer on one Wi-Fi, a proxy in the network settings, a root certificate with full trust. Four steps, and the five things that break them.
- TLS handshake abortedWhy an HTTPS proxy does not see an app's trafficThe proxy is set up and the certificate is installed, yet the app's requests are missing or die in the TLS handshake. Six scenarios, with a network-level diagram of each and what it looks like in the proxy.
- SSL handshake with client failedSSL handshake failed through a proxy — client side or server sideAn intercepting proxy runs two TLS handshakes: with the app and with the server. How to tell which one failed, and what to fix in each case.
- certificate_unknownSSL pinning and a debugging proxy: what works and what does notAn app with pinning rejects the proxy's certificate even when it is installed and trusted. How to recognise pinning, what the proxy still shows, and how to turn pinning off in a debug build of your own app.
- Certificate expiredThe proxy's root certificate expired — how to replace it everywhereHTTPS through the proxy suddenly stopped working on every site at once. How to check the certificate's dates, tell it apart from a wrong clock, and replace the certificate on the computer and the devices.
- 10.0.2.2:7070How to connect an Android emulator to a proxy10.0.2.2 instead of localhost, three ways to set the proxy, and the certificate in the system store. And why the emulator can lose its internet afterwards.
- Simulator — 0 requestsProxy not seeing iOS Simulator traffic — how to fix itThe Simulator goes online through macOS, so there is no proxy to set inside it. It needs the system proxy on the Mac and the root certificate inside the Simulator, fully trusted.
Proxy connection
When the proxy sees nothing or breaks the network.- VPN on — no requestsProxy not working with a VPN, an antivirus or a corporate proxyA debugging proxy, a VPN, an antivirus that scans HTTPS and a corporate proxy all compete for the same traffic. How to find which one took it, and how to chain them.
- localhost:3000 — 0 requestsProxy not capturing localhost traffic — how to fix itBrowsers and operating systems send localhost past the proxy by default. How to lift that exception in Chrome and Firefox, get around it with a host name, and open a local server from a phone.
- ERR_PROXY_CONNECTION_FAILEDThe proxy is closed but the internet does not work — how to get it backA debugging proxy wrote itself into the system settings and did not get to remove the entry when it closed. How to find the leftover setting on macOS, Windows, Linux and a phone, and switch it off.
Streaming & SSE
Buffered, cut and stalled streams.- X-Accel-Buffering: noSSE arrives in one chunk: nginx bufferingServer-Sent Events land all at once instead of streaming. Three layers act on them: proxy_buffering, gzip and the app itself. How to test each.
- proxy_read_timeout 60sThe stream dies after 60 seconds: proxy_read_timeoutA stream that dies on the same second is a timeout. Default values in nginx, ALB, Cloudflare, Heroku and Envoy, and why a heartbeat is safer.
- U+FFFD «�»Replacement characters «�» in a stream: TextDecoder and the stream flagA multi-byte character was cut at a chunk boundary. One decoder and one flag fix it, and the same mistake is hiding one level up, in the SSE parsing.
- (pending) — 6 per originSSE and the six-connection limit: the seventh tab never loadsAn SSE stream holds an HTTP/1.1 connection for as long as the tab is open, and a browser opens at most six of them per origin. The seventh tab just waits.
Mocking
Your own JSON instead of the backend.HAR files
Recording a HAR and sending it safely.Migrating from another proxy
What maps to what, and how to carry recorded sessions over as HAR.
- CharlesA map of Charles's tools onto Solpuga's and how to carry a recorded session over as HAR: what travels, what is lost, and the limits.
- ProxymanA map of Proxyman's tools onto Solpuga's and carrying a session over as HAR: what travels, what is lost, and the limits.
- FiddlerFiddler is two different products and you leave them for different reasons.
- mitmproxyA map of mitmproxy's features onto Solpuga's and how to carry a recorded session over as HAR: what travels, what is lost, and the limits.