Open komlevv opened 9 months ago
they don't tell us that there is two cargo exe in the user folder. One in user/.cargo/bin and another one in rustup toolchains!
One in user/.cargo/bin and another one in rustup toolchains
added both to the firewall exceptions, but it didn't work either.
the only thing that works for me so far is setting up a passthrough proxy on localhost (which is allowed through firewall) and setting config.toml to redirect the traffic through it
[http]
proxy = "127.0.0.1:port"
You can use live_tcp_udp_watch to find out correct file. For win10: C:/Users/$USERNAME/.rustup/toolchains/stable-x86_64-pc-windows-msvc/bin/cargo.exe
Hello and thank you for developing Cargo. Wonder if you have any guidelines for setting up Windows Defender Firewall to work with Cargo?
Problem
My setup: I have Windows Defender Firewall managed by Local Group Policy with defaults set to
Block outbound
unless there's anAllow
rule, allowed bothcargo
executable and acurl
executable throught with unrestricted outbound connections (any port, any protocol), yet the software does not seem to connect. If I allow all outbound connections(disabling the Firewall), it does connect without issue.When I try to connect with
cargo install ...
I get the following erroryet command-line curl works
curl setup
.cargo/config.toml
setting revoke to false in config or
CARGO_HTTP_CHECK_REVOKE=false
env var produces no resultsSo my guess there is something native to Windows cargo is using to connect besides the
cargo.exe
andcurl.exe
. Could you point me to the right direction?Found similar issues, not solved: https://github.com/rust-lang/cargo/issues/11344 https://users.rust-lang.org/t/cargo-install-spurious-network-error/83829
Notes
Also tried on a fresh Win 10 installation, with default Windows Firewall rules all enabled, with policy for Outbound set to Block, and both cargo and curl explicitly allowed - same result. Tried
git-fetch-with-cli
option - same result (git clone over https works fine).rustup-init.exe fails to connect too, even thought it's explicitly allowed throught the Firewall:
Only workaround found so far is to use a local passthrough proxy https://github.com/rust-lang/cargo/issues/12296#issuecomment-1636517717