{"record":{"id":"5ba78cbfd99c3d1e","repo":"zed-industries/zed","slug":"wsl-shares-a-network-interface-with-the-host","errorCode":null,"errorMessage":"WSL shares a network interface with the host","messagePattern":"WSL shares a network interface with the host","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/remote/src/transport/wsl.rs","lineNumber":604,"sourceCode":"                working_dir,\n                \"--\".to_string(),\n                command,\n            ]\n        };\n        wsl_args.extend(args);\n\n        Ok(CommandTemplate {\n            program: \"wsl.exe\".to_string(),\n            args: wsl_args,\n            env: HashMap::default(),\n        })\n    }\n\n    fn build_forward_ports_command(\n        &self,\n        _: Vec<(u16, String, u16)>,\n    ) -> anyhow::Result<CommandTemplate> {\n        Err(anyhow!(\"WSL shares a network interface with the host\"))\n    }\n\n    fn connection_options(&self) -> RemoteConnectionOptions {\n        RemoteConnectionOptions::Wsl(self.connection_options.clone())\n    }\n\n    fn path_style(&self) -> PathStyle {\n        PathStyle::Unix\n    }\n\n    fn remote_platform(&self) -> RemotePlatform {\n        self.platform\n    }\n\n    fn remote_os_version(&self) -> Option<String> {\n        self.os_version.clone()\n    }\n","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/remote/src/transport/wsl.rs#L586-L622","documentation":"In WslRemoteConnection::build_forward_ports_command: port forwarding is unconditionally rejected because WSL2 shares the host's network interface — forwarded ports on the host already reach WSL, so no forwarding command is built.","triggerScenarios":"Thrown at crates/remote/src/transport/wsl.rs:604 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Connect to services directly on localhost — no forwarding needed in WSL"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}