magic-wormhole / magic-wormhole.rs

Rust implementation of Magic Wormhole, with new features and enhancements
European Union Public License 1.2
648 stars 72 forks source link

AddrNotAvailable error for IPv4 on Windows #168

Closed shanipribadi closed 1 year ago

shanipribadi commented 1 year ago

While trying out magic-wormhole.rs (0.5.0), I am getting failure to connect with AddrNotAvailable error for Direct Connection, but only on windows, whereas on linux (actually using the linux binary in WSL) works.

The setup is sender on a linux VM on a public internet, and receiver is local windows laptop. The following log is shown on the receiver side. `

[2022-08-14T15:49:42Z DEBUG magic_wormhole::transit] Some follower handshake failed: IO(Os { code: 10049, kind: AddrNotAvailable, message: "The requested address is not valid in its context." }) `

On Windows for some reason I'm getting AddrNotAvailable error for all of the IPv4 connections (my ISP does not support IPv6, so I'm getting NetworkUnreachable error for them, but that is fine). When I tried it out again using the linux binary on WSL as a receiver, then it's working fine.

Note: TCP Relay does work fine..

piegamesde commented 1 year ago

That's an interesting one. Please try out again with #170 and send me the full log, I added a few debug prints that I hope will provide to be insightful.

As a workaround, you can use --force-relay to disable all attempts to do direct connections.