{
  "lab": "tunnel-502-503-504",
  "recordedAt": "2026-11-05T08:13:58.179Z",
  "environment": {
    "node": "v24.22.1",
    "python": "3.14.4",
    "pythonPackages": "requests==2.34.2 urllib3==2.8.0 httpx==0.28.1 httpcore==1.0.9 aiohttp==3.14.5",
    "curl": [
      "curl 8.5.0 (x86_64-pc-linux-gnu) libcurl/8.5.0 OpenSSL/3.5.5 zlib/1.3.1 brotli/1.2.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.2 (+libidn2/2.3.8) libssh/0.10.6/openssl/zlib nghttp2/1.68.0 librtmp/2.3 OpenLDAP/2.6.10",
      "curl 8.18.0 (x86_64-pc-linux-gnu) libcurl/8.18.0 OpenSSL/3.5.5 zlib/1.3.1 brotli/1.2.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.2 libssh2/1.11.1 nghttp2/1.68.0 librtmp/2.3 mit-krb5/1.22.1 OpenLDAP/2.6.10"
    ],
    "openssl": "OpenSSL 3.5.5 27 Jan 2026 (Library: OpenSSL 3.5.5 27 Jan 2026)",
    "playwright": "playwright 1.63.0, chromium 153.0.8010.12"
  },
  "setup": {
    "upstreamDeadlineMs": 3000,
    "flapOfflineMs": 4000,
    "note": "Ports are random per run."
  },
  "cases": [
    {
      "client": "curl 8.5.0",
      "case": "control",
      "side": "none",
      "url": "https://origin.test:34449/",
      "exit": 0,
      "signal": null,
      "stdout": "http=200 connect=200 exit=0",
      "stderr": "",
      "elapsedMs": 20,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "curl 8.5.0",
      "case": "connect-502-refused",
      "side": "proxy",
      "url": "https://refused.test/",
      "exit": 56,
      "signal": null,
      "stdout": "http=000 connect=502 exit=56",
      "stderr": "curl: (56) CONNECT tunnel failed, response 502",
      "elapsedMs": 10,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.5.0",
      "case": "connect-503-offline",
      "side": "proxy",
      "url": "https://offline.test/",
      "exit": 56,
      "signal": null,
      "stdout": "http=000 connect=503 exit=56",
      "stderr": "curl: (56) CONNECT tunnel failed, response 503",
      "elapsedMs": 10,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.5.0",
      "case": "connect-504-deadline",
      "side": "proxy",
      "url": "https://slow.test/",
      "exit": 56,
      "signal": null,
      "stdout": "http=000 connect=504 exit=56",
      "stderr": "curl: (56) CONNECT tunnel failed, response 504",
      "elapsedMs": 3012,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.5.0",
      "case": "connect-reset",
      "side": "proxy",
      "url": "https://reset.test/",
      "exit": 56,
      "signal": null,
      "stdout": "http=000 connect=000 exit=56",
      "stderr": "curl: (56) Proxy CONNECT aborted",
      "elapsedMs": 10,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.5.0",
      "case": "origin-502-through-tunnel",
      "side": "website",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=200 exit=0",
      "stderr": "",
      "elapsedMs": 17,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "curl 8.5.0",
      "case": "http-proxy-502",
      "side": "proxy",
      "url": "http://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=000 exit=0",
      "stderr": "",
      "elapsedMs": 13,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.5.0",
      "case": "http-origin-502",
      "side": "website",
      "url": "http://origin.test:33817/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=000 exit=0",
      "stderr": "",
      "elapsedMs": 13,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "curl 8.18.0",
      "case": "control",
      "side": "none",
      "url": "https://origin.test:34449/",
      "exit": 0,
      "signal": null,
      "stdout": "http=200 connect=200 exit=0",
      "stderr": "",
      "elapsedMs": 12,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "curl 8.18.0",
      "case": "connect-502-refused",
      "side": "proxy",
      "url": "https://refused.test/",
      "exit": 7,
      "signal": null,
      "stdout": "http=000 connect=502 exit=7",
      "stderr": "curl: (7) CONNECT tunnel failed, response 502",
      "elapsedMs": 9,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.18.0",
      "case": "connect-503-offline",
      "side": "proxy",
      "url": "https://offline.test/",
      "exit": 7,
      "signal": null,
      "stdout": "http=000 connect=503 exit=7",
      "stderr": "curl: (7) CONNECT tunnel failed, response 503",
      "elapsedMs": 8,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.18.0",
      "case": "connect-504-deadline",
      "side": "proxy",
      "url": "https://slow.test/",
      "exit": 7,
      "signal": null,
      "stdout": "http=000 connect=504 exit=7",
      "stderr": "curl: (7) CONNECT tunnel failed, response 504",
      "elapsedMs": 3011,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.18.0",
      "case": "connect-reset",
      "side": "proxy",
      "url": "https://reset.test/",
      "exit": 56,
      "signal": null,
      "stdout": "http=000 connect=000 exit=56",
      "stderr": "curl: (56) Proxy CONNECT aborted",
      "elapsedMs": 8,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.18.0",
      "case": "origin-502-through-tunnel",
      "side": "website",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=200 exit=0",
      "stderr": "",
      "elapsedMs": 13,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "curl 8.18.0",
      "case": "http-proxy-502",
      "side": "proxy",
      "url": "http://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=000 exit=0",
      "stderr": "",
      "elapsedMs": 9,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.18.0",
      "case": "http-origin-502",
      "side": "website",
      "url": "http://origin.test:33817/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=000 exit=0",
      "stderr": "",
      "elapsedMs": 10,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "requests",
      "case": "control",
      "side": "none",
      "url": "https://origin.test:34449/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 200, \"reason\": \"OK\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.06}",
      "stderr": "",
      "elapsedMs": 135,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "requests",
      "case": "connect-502-refused",
      "side": "proxy",
      "url": "https://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"requests.exceptions.ProxyError\", \"error\": \"HTTPSConnectionPool(host='refused.test', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 502 Bad Gateway')))\", \"chain\": [\"urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='refused.test', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 502 Bad Gateway')))\", \"urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 502 Bad Gateway'))\", \"builtins.OSError: Tunnel connection failed: 502 Bad Gateway\"], \"elapsed_s\": 0.06}",
      "stderr": "",
      "elapsedMs": 123,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "requests",
      "case": "connect-503-offline",
      "side": "proxy",
      "url": "https://offline.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"requests.exceptions.ProxyError\", \"error\": \"HTTPSConnectionPool(host='offline.test', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))\", \"chain\": [\"urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='offline.test', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))\", \"urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable'))\", \"builtins.OSError: Tunnel connection failed: 503 Service Unavailable\"], \"elapsed_s\": 0.06}",
      "stderr": "",
      "elapsedMs": 122,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "requests",
      "case": "connect-504-deadline",
      "side": "proxy",
      "url": "https://slow.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"requests.exceptions.ProxyError\", \"error\": \"HTTPSConnectionPool(host='slow.test', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 504 Gateway Timeout')))\", \"chain\": [\"urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='slow.test', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 504 Gateway Timeout')))\", \"urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 504 Gateway Timeout'))\", \"builtins.OSError: Tunnel connection failed: 504 Gateway Timeout\"], \"elapsed_s\": 3.05}",
      "stderr": "",
      "elapsedMs": 3125,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "requests",
      "case": "connect-reset",
      "side": "proxy",
      "url": "https://reset.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"requests.exceptions.ConnectionError\", \"error\": \"('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))\", \"chain\": [\"urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))\", \"http.client.RemoteDisconnected: Remote end closed connection without response\"], \"elapsed_s\": 0.05}",
      "stderr": "",
      "elapsedMs": 125,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "requests",
      "case": "origin-502-through-tunnel",
      "side": "website",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.06}",
      "stderr": "",
      "elapsedMs": 126,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "requests",
      "case": "http-proxy-502",
      "side": "proxy",
      "url": "http://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-proxy\", \"ok\": true, \"elapsed_s\": 0.06}",
      "stderr": "",
      "elapsedMs": 124,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "requests",
      "case": "http-origin-502",
      "side": "website",
      "url": "http://origin.test:33817/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.06}",
      "stderr": "",
      "elapsedMs": 133,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "httpx",
      "case": "control",
      "side": "none",
      "url": "https://origin.test:34449/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 200, \"reason\": \"OK\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.05}",
      "stderr": "",
      "elapsedMs": 124,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "httpx",
      "case": "connect-502-refused",
      "side": "proxy",
      "url": "https://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"httpx.ProxyError\", \"error\": \"502 Bad Gateway\", \"chain\": [\"httpcore.ProxyError: 502 Bad Gateway\"], \"elapsed_s\": 0.05}",
      "stderr": "",
      "elapsedMs": 111,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "httpx",
      "case": "connect-503-offline",
      "side": "proxy",
      "url": "https://offline.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"httpx.ProxyError\", \"error\": \"503 Service Unavailable\", \"chain\": [\"httpcore.ProxyError: 503 Service Unavailable\"], \"elapsed_s\": 0.04}",
      "stderr": "",
      "elapsedMs": 110,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "httpx",
      "case": "connect-504-deadline",
      "side": "proxy",
      "url": "https://slow.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"httpx.ProxyError\", \"error\": \"504 Gateway Timeout\", \"chain\": [\"httpcore.ProxyError: 504 Gateway Timeout\"], \"elapsed_s\": 3.05}",
      "stderr": "",
      "elapsedMs": 3117,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "httpx",
      "case": "connect-reset",
      "side": "proxy",
      "url": "https://reset.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"httpx.RemoteProtocolError\", \"error\": \"Server disconnected without sending a response.\", \"chain\": [\"httpcore.RemoteProtocolError: Server disconnected without sending a response.\"], \"elapsed_s\": 0.05}",
      "stderr": "",
      "elapsedMs": 132,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "httpx",
      "case": "origin-502-through-tunnel",
      "side": "website",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.05}",
      "stderr": "",
      "elapsedMs": 116,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "httpx",
      "case": "http-proxy-502",
      "side": "proxy",
      "url": "http://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-proxy\", \"ok\": true, \"elapsed_s\": 0.05}",
      "stderr": "",
      "elapsedMs": 121,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "httpx",
      "case": "http-origin-502",
      "side": "website",
      "url": "http://origin.test:33817/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.05}",
      "stderr": "",
      "elapsedMs": 115,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "aiohttp",
      "case": "control",
      "side": "none",
      "url": "https://origin.test:34449/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 200, \"reason\": \"OK\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.09}",
      "stderr": "",
      "elapsedMs": 178,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "aiohttp",
      "case": "connect-502-refused",
      "side": "proxy",
      "url": "https://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"aiohttp.client_exceptions.ClientHttpProxyError\", \"error\": \"502, message='Bad Gateway', url='http://127.0.0.1:35185'\", \"elapsed_s\": 0.08}",
      "stderr": "",
      "elapsedMs": 166,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "aiohttp",
      "case": "connect-503-offline",
      "side": "proxy",
      "url": "https://offline.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"aiohttp.client_exceptions.ClientHttpProxyError\", \"error\": \"503, message='Service Unavailable', url='http://127.0.0.1:35185'\", \"elapsed_s\": 0.08}",
      "stderr": "",
      "elapsedMs": 160,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "aiohttp",
      "case": "connect-504-deadline",
      "side": "proxy",
      "url": "https://slow.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"aiohttp.client_exceptions.ClientHttpProxyError\", \"error\": \"504, message='Gateway Timeout', url='http://127.0.0.1:35185'\", \"elapsed_s\": 3.08}",
      "stderr": "",
      "elapsedMs": 3157,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "aiohttp",
      "case": "connect-reset",
      "side": "proxy",
      "url": "https://reset.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"aiohttp.client_exceptions.ServerDisconnectedError\", \"error\": \"Server disconnected\", \"elapsed_s\": 0.09}",
      "stderr": "",
      "elapsedMs": 162,
      "proxyHits": 2,
      "originHits": 0
    },
    {
      "client": "aiohttp",
      "case": "origin-502-through-tunnel",
      "side": "website",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.08}",
      "stderr": "",
      "elapsedMs": 149,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "aiohttp",
      "case": "http-proxy-502",
      "side": "proxy",
      "url": "http://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-proxy\", \"ok\": true, \"elapsed_s\": 0.08}",
      "stderr": "",
      "elapsedMs": 145,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "aiohttp",
      "case": "http-origin-502",
      "side": "website",
      "url": "http://origin.test:33817/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"status\": 502, \"reason\": \"Bad Gateway\", \"server\": \"lab-origin\", \"ok\": true, \"elapsed_s\": 0.08}",
      "stderr": "",
      "elapsedMs": 147,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "playwright",
      "case": "control",
      "side": "none",
      "url": "https://origin.test:34449/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"requestfailed\":[],\"ok\":true,\"status\":200,\"elapsed_s\":0.18}",
      "stderr": "",
      "elapsedMs": 515,
      "proxyHits": 2,
      "originHits": 1
    },
    {
      "client": "playwright",
      "case": "connect-502-refused",
      "side": "proxy",
      "url": "https://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"requestfailed\":[\"net::ERR_TUNNEL_CONNECTION_FAILED\"],\"ok\":false,\"error\":\"page.goto: net::ERR_TUNNEL_CONNECTION_FAILED at https://refused.test/\",\"elapsed_s\":0.106}",
      "stderr": "",
      "elapsedMs": 451,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "playwright",
      "case": "connect-503-offline",
      "side": "proxy",
      "url": "https://offline.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"requestfailed\":[\"net::ERR_TUNNEL_CONNECTION_FAILED\"],\"ok\":false,\"error\":\"page.goto: net::ERR_TUNNEL_CONNECTION_FAILED at https://offline.test/\",\"elapsed_s\":0.107}",
      "stderr": "",
      "elapsedMs": 446,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "playwright",
      "case": "connect-504-deadline",
      "side": "proxy",
      "url": "https://slow.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"requestfailed\":[\"net::ERR_TUNNEL_CONNECTION_FAILED\"],\"ok\":false,\"error\":\"page.goto: net::ERR_TUNNEL_CONNECTION_FAILED at https://slow.test/\",\"elapsed_s\":3.106}",
      "stderr": "",
      "elapsedMs": 3459,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "playwright",
      "case": "connect-reset",
      "side": "proxy",
      "url": "https://reset.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"requestfailed\":[\"net::ERR_EMPTY_RESPONSE\"],\"ok\":false,\"error\":\"page.goto: net::ERR_EMPTY_RESPONSE at https://reset.test/\",\"elapsed_s\":0.103}",
      "stderr": "",
      "elapsedMs": 470,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "playwright",
      "case": "origin-502-through-tunnel",
      "side": "website",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"requestfailed\":[],\"ok\":true,\"status\":502,\"elapsed_s\":0.123}",
      "stderr": "",
      "elapsedMs": 476,
      "proxyHits": 2,
      "originHits": 1
    },
    {
      "client": "playwright",
      "case": "http-proxy-502",
      "side": "proxy",
      "url": "http://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"requestfailed\":[],\"ok\":true,\"status\":502,\"elapsed_s\":0.113}",
      "stderr": "",
      "elapsedMs": 495,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "playwright",
      "case": "http-origin-502",
      "side": "website",
      "url": "http://origin.test:33817/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"requestfailed\":[],\"ok\":true,\"status\":502,\"elapsed_s\":0.115}",
      "stderr": "",
      "elapsedMs": 462,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "node fetch",
      "case": "control",
      "side": "none",
      "url": "https://origin.test:34449/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\":true,\"status\":200,\"server\":\"lab-origin\",\"elapsed_s\":0.026}",
      "stderr": "",
      "elapsedMs": 83,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "node fetch",
      "case": "connect-502-refused",
      "side": "proxy",
      "url": "https://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\":false,\"error_type\":\"TypeError\",\"error\":\"fetch failed\",\"causes\":[{\"name\":\"Error\",\"code\":0,\"message\":\"Request was cancelled.\"},{\"name\":\"AbortError\",\"code\":\"UND_ERR_ABORTED\",\"message\":\"Proxy response (502) !== 200 when HTTP Tunneling\"}],\"elapsed_s\":0.017}",
      "stderr": "",
      "elapsedMs": 71,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "node fetch",
      "case": "connect-503-offline",
      "side": "proxy",
      "url": "https://offline.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\":false,\"error_type\":\"TypeError\",\"error\":\"fetch failed\",\"causes\":[{\"name\":\"Error\",\"code\":0,\"message\":\"Request was cancelled.\"},{\"name\":\"AbortError\",\"code\":\"UND_ERR_ABORTED\",\"message\":\"Proxy response (503) !== 200 when HTTP Tunneling\"}],\"elapsed_s\":0.016}",
      "stderr": "",
      "elapsedMs": 66,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "node fetch",
      "case": "connect-504-deadline",
      "side": "proxy",
      "url": "https://slow.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\":false,\"error_type\":\"TypeError\",\"error\":\"fetch failed\",\"causes\":[{\"name\":\"Error\",\"code\":0,\"message\":\"Request was cancelled.\"},{\"name\":\"AbortError\",\"code\":\"UND_ERR_ABORTED\",\"message\":\"Proxy response (504) !== 200 when HTTP Tunneling\"}],\"elapsed_s\":3.024}",
      "stderr": "",
      "elapsedMs": 3080,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "node fetch",
      "case": "connect-reset",
      "side": "proxy",
      "url": "https://reset.test/",
      "exit": null,
      "signal": "SIGKILL",
      "stdout": "{\"ok\":false,\"error_type\":\"TimeoutError\",\"error\":\"The operation was aborted due to timeout\",\"causes\":[],\"elapsed_s\":10.002}",
      "stderr": "",
      "elapsedMs": 30022,
      "proxyHits": 160357,
      "originHits": 0
    },
    {
      "client": "node fetch",
      "case": "origin-502-through-tunnel",
      "side": "website",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\":true,\"status\":502,\"server\":\"lab-origin\",\"elapsed_s\":0.024}",
      "stderr": "",
      "elapsedMs": 82,
      "proxyHits": 1,
      "originHits": 1
    },
    {
      "client": "node fetch",
      "case": "http-proxy-502",
      "side": "proxy",
      "url": "http://refused.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\":false,\"error_type\":\"TypeError\",\"error\":\"fetch failed\",\"causes\":[{\"name\":\"Error\",\"code\":0,\"message\":\"Request was cancelled.\"},{\"name\":\"AbortError\",\"code\":\"UND_ERR_ABORTED\",\"message\":\"Proxy response (502) !== 200 when HTTP Tunneling\"}],\"elapsed_s\":0.016}",
      "stderr": "",
      "elapsedMs": 77,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "node fetch",
      "case": "http-origin-502",
      "side": "website",
      "url": "http://origin.test:33817/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\":true,\"status\":502,\"server\":\"lab-origin\",\"elapsed_s\":0.016}",
      "stderr": "",
      "elapsedMs": 70,
      "proxyHits": 1,
      "originHits": 1
    }
  ],
  "retries": [
    {
      "client": "curl 8.5.0",
      "option": "--retry 2",
      "url": "https://offline.test/",
      "exit": 56,
      "signal": null,
      "stdout": "http=000 connect=503 exit=56",
      "stderr": "curl: (56) CONNECT tunnel failed, response 503",
      "elapsedMs": 13,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.5.0",
      "option": "--retry 2",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=000 exit=0",
      "stderr": "",
      "elapsedMs": 2018,
      "proxyHits": 1,
      "originHits": 3
    },
    {
      "client": "curl 8.5.0",
      "option": "--retry 2 --retry-all-errors",
      "url": "https://offline.test/",
      "exit": 56,
      "signal": null,
      "stdout": "http=000 connect=503 exit=56",
      "stderr": "curl: (56) CONNECT tunnel failed, response 503\ncurl: (56) CONNECT tunnel failed, response 503\ncurl: (56) CONNECT tunnel failed, response 503",
      "elapsedMs": 2013,
      "proxyHits": 3,
      "originHits": 0
    },
    {
      "client": "curl 8.5.0",
      "option": "--retry 2 --retry-all-errors",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=000 exit=0",
      "stderr": "",
      "elapsedMs": 2022,
      "proxyHits": 1,
      "originHits": 3
    },
    {
      "client": "curl 8.18.0",
      "option": "--retry 2",
      "url": "https://offline.test/",
      "exit": 7,
      "signal": null,
      "stdout": "http=000 connect=503 exit=7",
      "stderr": "curl: (7) CONNECT tunnel failed, response 503",
      "elapsedMs": 11,
      "proxyHits": 1,
      "originHits": 0
    },
    {
      "client": "curl 8.18.0",
      "option": "--retry 2",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=000 exit=0",
      "stderr": "",
      "elapsedMs": 2018,
      "proxyHits": 1,
      "originHits": 3
    },
    {
      "client": "curl 8.18.0",
      "option": "--retry 2 --retry-all-errors",
      "url": "https://offline.test/",
      "exit": 7,
      "signal": null,
      "stdout": "http=000 connect=503 exit=7",
      "stderr": "curl: (7) CONNECT tunnel failed, response 503\ncurl: (7) CONNECT tunnel failed, response 503\ncurl: (7) CONNECT tunnel failed, response 503",
      "elapsedMs": 2013,
      "proxyHits": 3,
      "originHits": 0
    },
    {
      "client": "curl 8.18.0",
      "option": "--retry 2 --retry-all-errors",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "http=502 connect=000 exit=0",
      "stderr": "",
      "elapsedMs": 2017,
      "proxyHits": 1,
      "originHits": 3
    },
    {
      "client": "requests",
      "option": "HTTPAdapter(max_retries=Retry(total=2, backoff_factor=0, status_forcelist=[502, 503, 504]))",
      "url": "https://offline.test/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"requests.exceptions.ProxyError\", \"error\": \"HTTPSConnectionPool(host='offline.test', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))\", \"chain\": [\"urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='offline.test', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))\", \"urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable'))\", \"builtins.OSError: Tunnel connection failed: 503 Service Unavailable\"], \"elapsed_s\": 0.08}",
      "stderr": "",
      "elapsedMs": 148,
      "proxyHits": 3,
      "originHits": 0
    },
    {
      "client": "requests",
      "option": "HTTPAdapter(max_retries=Retry(total=2, backoff_factor=0, status_forcelist=[502, 503, 504]))",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"ok\": false, \"error_type\": \"requests.exceptions.RetryError\", \"error\": \"HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: /bad-gateway (Caused by ResponseError('too many 502 error responses'))\", \"chain\": [\"urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: /bad-gateway (Caused by ResponseError('too many 502 error responses'))\", \"urllib3.exceptions.ResponseError: too many 502 error responses\"], \"elapsed_s\": 0.06}",
      "stderr": "",
      "elapsedMs": 133,
      "proxyHits": 1,
      "originHits": 3
    }
  ],
  "timeline": {
    "client": "requests",
    "url": "https://origin.test:34449/",
    "offlineWindowMs": 4000,
    "samples": [
      {
        "second": 0,
        "sentAtMs": 0,
        "ok": false,
        "error_type": "requests.exceptions.ProxyError",
        "error": "HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))",
        "chain": [
          "urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))",
          "urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable'))",
          "builtins.OSError: Tunnel connection failed: 503 Service Unavailable"
        ],
        "elapsed_s": 0.07
      },
      {
        "second": 1,
        "sentAtMs": 1000,
        "ok": false,
        "error_type": "requests.exceptions.ProxyError",
        "error": "HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))",
        "chain": [
          "urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))",
          "urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable'))",
          "builtins.OSError: Tunnel connection failed: 503 Service Unavailable"
        ],
        "elapsed_s": 0.06
      },
      {
        "second": 2,
        "sentAtMs": 2000,
        "ok": false,
        "error_type": "requests.exceptions.ProxyError",
        "error": "HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))",
        "chain": [
          "urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))",
          "urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable'))",
          "builtins.OSError: Tunnel connection failed: 503 Service Unavailable"
        ],
        "elapsed_s": 0.06
      },
      {
        "second": 3,
        "sentAtMs": 3000,
        "ok": false,
        "error_type": "requests.exceptions.ProxyError",
        "error": "HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))",
        "chain": [
          "urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='origin.test', port=34449): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable')))",
          "urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 503 Service Unavailable'))",
          "builtins.OSError: Tunnel connection failed: 503 Service Unavailable"
        ],
        "elapsed_s": 0.05
      },
      {
        "second": 4,
        "sentAtMs": 4000,
        "status": 200,
        "reason": "OK",
        "server": "lab-origin",
        "ok": true,
        "elapsed_s": 0.05
      },
      {
        "second": 5,
        "sentAtMs": 5000,
        "status": 200,
        "reason": "OK",
        "server": "lab-origin",
        "ok": true,
        "elapsed_s": 0.08
      },
      {
        "second": 6,
        "sentAtMs": 6000,
        "status": 200,
        "reason": "OK",
        "server": "lab-origin",
        "ok": true,
        "elapsed_s": 0.06
      },
      {
        "second": 7,
        "sentAtMs": 7000,
        "status": 200,
        "reason": "OK",
        "server": "lab-origin",
        "ok": true,
        "elapsed_s": 0.06
      }
    ]
  },
  "retryHelper": [
    {
      "scenario": "flap proxy offline window",
      "url": "https://origin.test:34449/",
      "exit": 0,
      "signal": null,
      "stdout": "{\"attempts\": [{\"at_s\": 0.0, \"error\": \"Error('Tunnel connection failed: 503 Service Unavailable')))\"}, {\"at_s\": 0.77, \"error\": \"Error('Tunnel connection failed: 503 Service Unavailable')))\"}, {\"at_s\": 2.32, \"error\": \"Error('Tunnel connection failed: 503 Service Unavailable')))\"}, {\"at_s\": 5.71, \"status\": 200}], \"final\": {\"status\": 200}, \"elapsed_s\": 5.72}",
      "stderr": "",
      "elapsedMs": 5818,
      "proxyHits": 4,
      "originHits": 1
    },
    {
      "scenario": "website 502",
      "url": "https://origin.test:34449/bad-gateway",
      "exit": 0,
      "signal": null,
      "stdout": "{\"attempts\": [{\"at_s\": 0.0, \"status\": 502}, {\"at_s\": 0.97, \"status\": 502}, {\"at_s\": 2.95, \"status\": 502}, {\"at_s\": 5.38, \"status\": 502}, {\"at_s\": 9.93, \"status\": 502}], \"final\": {\"status\": 502}, \"elapsed_s\": 9.94}",
      "stderr": "",
      "elapsedMs": 10043,
      "proxyHits": 1,
      "originHits": 5
    }
  ]
}
