{"record":{"id":"2ad840f3c9c4a3d6","repo":"apify/crawlee","slug":"request-without-proxy-localaddress-request-he","errorCode":null,"errorMessage":"Request without proxy ${localAddress} ${request.headers.host}","messagePattern":"Request without proxy (.+?) (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/browser-pool/src/container-proxy-server.ts","lineNumber":29,"sourceCode":"\n    const proxyServer = new ProxyChainServer({\n        prepareRequestFunction({ request }) {\n            const prefix4to6 = '::ffff:';\n            const localAddress = request.socket.localAddress!.startsWith(prefix4to6)\n                ? request.socket.localAddress!.slice(prefix4to6.length)\n                : request.socket.localAddress!;\n\n            const upstreamProxyUrl = ipToProxy.get(localAddress);\n\n            if (upstreamProxyUrl === undefined) {\n                if (fallbackProxyUrl) {\n                    return {\n                        upstreamProxyUrl: fallbackProxyUrl,\n                        requestAuthentication: false,\n                    };\n                }\n\n                console.warn(`Request without proxy ${localAddress} ${request.headers.host}`);\n            }\n\n            return {\n                upstreamProxyUrl,\n                requestAuthentication: false,\n            };\n        },\n        port: 0,\n    });\n\n    await proxyServer.listen();\n\n    proxyServer.server.unref();\n\n    return {\n        port: proxyServer.port,\n        ipToProxy,\n        async close(closeConnections: boolean) {","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/apify/crawlee/blob/dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c/packages/browser-pool/src/container-proxy-server.ts#L11-L47","documentation":"The container proxy server's prepareRequestFunction logs (via console.warn) when an incoming request carries no matching upstream proxy for its local address and host; it then falls back to the configured fallbackProxyUrl (or undefined upstreamProxyUrl). Strictly this snippet is a warning, not a throw — it signals requests hitting the proxy that would otherwise go out without a proxy mapping.","triggerScenarios":"A request arrives at the container proxy whose localAddress/host has no assigned upstream proxy and no fallback is set — e.g. a browser in the pool connecting through the proxy port before proxy assignment, or a request to an unexpected host header.","commonSituations":"Containerized browser pool where the browser reaches the proxy directly bypassing proxy settings; DNS or localhost resolution mismatch causing host header lookup failure; misconfigured proxyUrl so requests fall through to the no-proxy path; race at browser startup before proxy binding.","solutions":["Check the console.warn context: identify localAddress and host that lack a proxy mapping","Configure fallbackProxyUrl so unmapped requests still route through a known proxy","Ensure the browser is launched with the correct proxy settings pointing at the container proxy","Verify host headers resolve as expected (IPv6 vs IPv4 localhost mismatches are common)","Inspect container networking/proxy binding setup if warnings repeat for every request"],"exampleFix":"// before: requests fall through with no proxy\nconst pool = new BrowserPool({ ... });\n\n// after: provide a fallback proxy in the proxy server config\nconst proxyServer = await ContainerProxyServer.start({\n  fallbackProxyUrl: 'http://user:pass@proxy.example.com:8000',\n});","handlingStrategy":"fallback","validationCode":"// before starting the pool, ensure a fallback proxy exists\nif (!options.fallbackProxyUrl && !process.env.FALLBACK_PROXY_URL) {\n  console.warn('No fallbackProxyUrl configured: unmapped proxy requests will go direct');\n}","typeGuard":"function hasProxyConfig(o: { fallbackProxyUrl?: string }): o is { fallbackProxyUrl: string } & typeof o {\n  return typeof o.fallbackProxyUrl === 'string' && o.fallbackProxyUrl.length > 0;\n}","tryCatchPattern":"// the library only warns; monitor stdout for the warning\nproxyServer.on?.('warning', (msg) => {\n  if (msg.includes('Request without proxy')) metrics.increment('proxy.unmapped_request');\n});","preventionTips":["Always configure fallbackProxyUrl so unmapped requests are still proxied","Point browsers explicitly at the container proxy address/port","Watch for IPv6/IPv4 localhost mismatches that break host matching","Alert on repeated 'Request without proxy' warnings in container logs"],"tags":["proxy","networking","browser-pool"],"backgroundTag":"request-without-proxy","analyzedSha":"dbe57fb09ca607ad59dcf998f3925ef9ac3bb26c","analyzedAt":"2026-08-30T22:22:28.328Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}