top | item 42412075

Show HN: Wush.dev – easy P2P file transfer and shells between browser and CLI

3 points| coadler | 1 year ago |wush.dev

A few months ago I wrote a command-line based P2P file transfer and remote access tool called wush [1], which got some pretty good traction. I decided to extend the functionality to bridge the gap between the browser and CLI, allowing file transfers and shells from anywhere. It was built without a trusted coordinator server, with all P2P negotiation happening over DERP [2] using a shared x25519 key.

The original CLI was built using the open source version of Tailscale, which was ported into WASM pretty easily. Unfortunately, Tailscale on WASM is unable to get P2P connections since browsers won't just let you send arbitrary UDP packets. In tests I was barely able to get above 1-2 Mbit/s, which led to the decision to switch to WebRTC for browser <-> browser and browser <-> cli file transfers.

This is my first big front-end/browser project and I definitely learned a lot. Tailscale is impressively flexible and I wouldn't have been able to do this without their progress. Happy to answer any questions and discuss in the comments. Thanks!

[1] https://github.com/coder/wush

[2] https://tailscale.com/kb/1232/derp-servers

discuss

order

No comments yet.