{"record":{"id":"934c049bdf03b2d3","repo":"epi052/feroxbuster","slug":"could-not-rebuild-client","errorCode":null,"errorMessage":"Could not rebuild client","messagePattern":"Could not rebuild client","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/config/container.rs","lineNumber":1275,"sourceCode":"            || configuration.resumed\n            || !server_certs.is_empty()\n            || client_cert.is_some()\n            || client_key.is_some()\n        {\n            let client_config = client::ClientConfig {\n                timeout: configuration.timeout,\n                user_agent: &configuration.user_agent,\n                redirects: configuration.redirects,\n                insecure: configuration.insecure,\n                headers: &configuration.headers,\n                proxy,\n                server_certs: Some(server_certs),\n                client_cert,\n                client_key,\n                scope: &configuration.scope,\n            };\n            configuration.client =\n                client::initialize(client_config).expect(\"Could not rebuild client\");\n        }\n\n        if !configuration.replay_proxy.is_empty() {\n            // only set replay_client when replay_proxy is set\n            let client_config = client::ClientConfig {\n                timeout: configuration.timeout,\n                user_agent: &configuration.user_agent,\n                redirects: configuration.redirects,\n                insecure: configuration.insecure,\n                headers: &configuration.headers,\n                proxy: Some(&configuration.replay_proxy),\n                server_certs: Some(server_certs),\n                client_cert,\n                client_key,\n                scope: &configuration.scope,\n            };\n            configuration.replay_client =\n                Some(client::initialize(client_config).expect(\"Could not rebuild client\"));","sourceCodeStart":1257,"sourceCodeEnd":1293,"githubUrl":"https://github.com/epi052/feroxbuster/blob/1f595dab5c76858d5a14fbc47dabf2563d729c62/src/config/container.rs#L1257-L1293","documentation":"try_rebuild_clients reconstructs the main HTTP client after configuration changes (timeouts, proxy, TLS material, server certs). client::initialize is unwrapped with expect, so any failure building the new reqwest client panics with 'Could not rebuild client'.","triggerScenarios":"Calling try_rebuild_clients with client settings that make reqwest's ClientBuilder::build() fail — invalid proxy URL, unreadable client cert/key files, malformed server certificate entries, or TLS backend errors.","commonSituations":"Pointing --proxy at a malformed URL, passing a PEM client certificate whose key doesn't match or can't be parsed, supplying a server certificate file that doesn't exist, or a TLS stack lacking required crypto provider.","solutions":["Verify the proxy URL format (scheme://host:port) and that any client cert/key files exist and are valid matching PEM pairs","Check server certificate files are readable and valid PEM/DER","Install CA certificates / fix the TLS environment, then retry"],"exampleFix":"// before\n--proxy \"localhost:8080\" // missing scheme\n// after\n--proxy \"http://localhost:8080\"","handlingStrategy":"validation","validationCode":"fn validate_client_config(cfg: &ClientConfig) -> Result<()> {\n  if let Some(p) = &cfg.proxy { url::Url::parse(p)?; }\n  for c in [&cfg.client_cert, &cfg.client_key].into_iter().flatten() { std::fs::read(c)?; }\n  Ok(())\n}","typeGuard":null,"tryCatchPattern":"if let Err(_) = std::panic::catch_unwind(|| try_rebuild_clients(&mut config)) { eprintln!(\"rebuild failed: check proxy URL and cert files\"); }","preventionTips":["Use full proxy URLs with scheme (http://host:port)","Verify client cert/key files are valid matching PEM pairs","Confirm server cert files exist and are readable before rebuild"],"tags":["tls","client","reconfiguration","panic"],"backgroundTag":"invalid-config-value","analyzedSha":"1f595dab5c76858d5a14fbc47dabf2563d729c62","analyzedAt":"2026-09-13T19:33:06.208Z","contentChangedAt":"2026-09-13T19:33:06.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}