magic-wormhole / magic-wormhole.rs

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

Gather transit connection information programmatically #150

Closed felinira closed 2 years ago

felinira commented 2 years ago

At the moment it seems like it is not possible to programmatically gather information about the used connection method and IP address / relay hostname during a transfer, at least not when using transfer::send_file and similar.

Would it be possible to make request::accept and transfer::send_file return some sort of informational struct once the transfer has started?

piegamesde commented 2 years ago

Yes, that's a good idea. But first, I think more information needs to be exposed by the transit API. At the moment we simply collect the information whether the connection is direct or a relay, and optionally a name for the relay. Would that be sufficient for your use case or do you need some more information?

felinira commented 2 years ago

While more information is always nice, this would already help. IP addresses would be nice to have, too, but not particularly important.

felinira commented 2 years ago

Thanks! That was fast :)

piegamesde commented 2 years ago

Doing my best ^^