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

Using tcp relay with tcp:hostname syntax will panic #177

Closed felinira closed 1 year ago

felinira commented 1 year ago

Specifying the transit server URL as tcp:[domainname]:4001 will panic with the following message:

Panic: thread 'smol-1' panicked at 'Missing hostname in relay URL (also TODO error handling)', /run/build/warp/cargo/vendor/magic-wormhole-0.5.0/src/transit.rs:378:35

The code should return a proper error here. As the python client accepts tcp: without the two slashes it should be considered to accept this too. Alternatively it would be helpful if the pre-transfer url validation could be exported somewhere publically so that I can do manual input validation in preferences.

Downstream issue https://gitlab.gnome.org/World/warp/-/issues/35