{"record":{"id":"ece413567916c906","repo":"rathole-org/rathole","slug":"unknown-proxy-scheme","errorCode":null,"errorMessage":"Unknown proxy scheme: {}","messagePattern":"Unknown proxy scheme: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config.rs","lineNumber":303,"sourceCode":"            if s.retry_interval.is_none() {\n                s.retry_interval = Some(client.retry_interval);\n            }\n        }\n\n        Config::validate_transport_config(&client.transport, false)?;\n\n        Ok(())\n    }\n\n    fn validate_transport_config(config: &TransportConfig, is_server: bool) -> Result<()> {\n        config\n            .tcp\n            .proxy\n            .as_ref()\n            .map_or(Ok(()), |u| match u.scheme() {\n                \"socks5\" => Ok(()),\n                \"http\" => Ok(()),\n                _ => Err(anyhow!(format!(\"Unknown proxy scheme: {}\", u.scheme()))),\n            })?;\n        match config.transport_type {\n            TransportType::Tcp => Ok(()),\n            TransportType::Tls => {\n                let tls_config = config\n                    .tls\n                    .as_ref()\n                    .ok_or_else(|| anyhow!(\"Missing TLS configuration\"))?;\n                if is_server {\n                    tls_config\n                        .pkcs12\n                        .as_ref()\n                        .and(tls_config.pkcs12_password.as_ref())\n                        .ok_or_else(|| anyhow!(\"Missing `pkcs12` or `pkcs12_password`\"))?;\n                }\n                Ok(())\n            }\n            TransportType::Noise => {","sourceCodeStart":285,"sourceCodeEnd":321,"githubUrl":"https://github.com/rathole-org/rathole/blob/a292f7ed5402f840415fc6a53827da2f34337856/src/config.rs#L285-L321","documentation":"When `[transport]`/`[network].tcp.proxy` is set, `validate_transport_config` checks the proxy URL scheme and only accepts `socks5` or `http`. Any other scheme (or a URL whose scheme can't be recognized) is rejected with this error at config-validation time.","triggerScenarios":"Setting `proxy = \"...\"` under the tcp transport's network options with a scheme other than `socks5:` or `http:`, e.g. `https://...`, `socks5h://...`, `socks4://...`, or a URL missing a scheme such as `proxy = \"127.0.0.1:1080\"`.","commonSituations":"Users copy a `socks5h://` URL from curl or a browser proxy setting; they omit the scheme and give a bare host:port; they assume HTTPS proxies are supported.","solutions":["Change the proxy URL scheme to `socks5://` or `http://`","If it's a SOCKS proxy with remote DNS (`socks5h`), use `socks5://` — DNS resolution behavior is handled by the library","Add the scheme to a bare proxy address, e.g. `proxy = \"socks5://127.0.0.1:1080\"`","If you need an unsupported scheme (socks4/https), put a local protocol-converting proxy in front or use a supported proxy"],"exampleFix":"# before\nproxy = \"socks5h://127.0.0.1:1080\"\n\n# after\nproxy = \"socks5://127.0.0.1:1080\"","handlingStrategy":"validation","validationCode":"let u: url::Url = proxy.parse()?;\nmatch u.scheme() {\n    \"socks5\" | \"http\" => Ok(()),\n    s => Err(format!(\"unsupported proxy scheme: {}\", s)),\n}?;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use socks5:// or http:// proxy URLs","Never write a bare host:port as the proxy value — always include the scheme","Check the release docs before assuming socks5h/https proxies are supported"],"tags":["config","proxy","url","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"a292f7ed5402f840415fc6a53827da2f34337856","analyzedAt":"2026-09-07T09:56:55.739Z","contentChangedAt":"2026-09-07T09:56:55.739Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}