Volver al ranking

coder/wush

Go

simplest & fastest way to transfer files between computers via WireGuard

file-transfergowireguardpeer-to-peer
Crecimiento de estrellas
Estrellas
1.5k
Forks
45
Crecimiento semanal
Issues
12
5001k
sept 25dic 25abr 26jul 26
ArtefactosGo Modulesgo get github.com/coder/wush
README

wush

Go Reference

wush is a command line tool that lets you easily transfer files and open shells over a peer-to-peer WireGuard connection. It's similar to magic-wormhole but:

  1. No requirement to set up or trust a relay server for authentication.
  2. Powered by WireGuard for secure, fast, and reliable connections.
  3. Automatic peer-to-peer connections over UDP.
  4. Endless possibilities; rsync, ssh, etc.

Basic Usage

On the host machine:

$ wush serve
Picked DERP region Toronto as overlay home
Your auth key is:
    >  112v1RyL5KPzsbMbhT7fkEGrcfpygxtnvwjR5kMLGxDHGeLTK1BvoPqsUcjo7xyMkFn46KLTdedKuPCG5trP84mz9kx
Use this key to authenticate other wush commands to this instance.

On the client machine:

# Copy a file to the host
$ wush cp 1gb.txt
Uploading "1gb.txt" 100% |██████████████████████████████████████████████| (2.1/2.1 GB, 376 MB/s)

# Open a shell to the host
$ wush ssh
┃ Enter the Auth key:
┃ > 112v1RyL5KPzsbMbhT7fkEGrcfpygxtnvwjR5kMLGxDHGeLTK1BvoPqsUcjo7xyMkFn46KLTdedKuPCG5trP84mz9kx
coder@colin:~$

asciicast

[!NOTE]
wush uses Tailscale's tsnet package under the hood, managed by an in-memory control server on each CLI. We utilize Tailscale's public DERP relays, but no Tailscale account is required.

Install

Using install script

curl -fsSL https://github.com/coder/wush/raw/refs/heads/main/install.sh | sh

Using Homebrew

brew install wush

For a manual installation, see the latest release.

[!TIP] To increase transfer speeds, wush attempts to increase the buffer size of its UDP sockets. For best performance, ensure wush has CAP_NET_ADMIN. When using the installer script, this is done automatically for you.

# Linux only
sudo setcap cap_net_admin=eip $(which wush)

Technical Details

wush doesn't require you to trust any 3rd party authentication or relay servers, instead using x25519 keys to authenticate incoming connections. Auth keys generated by wush serve are separated into a couple parts:

112v1RyL5KPzsbMbhT7fkEGrcfpygxtnvwjR5kMLGxDHGeLTK1BvoPqsUcjo7xyMkFn46KLTdedKuPCG5trP84mz9kx

+---------------------+------------------+---------------------------+----------------------------+
| UDP Address (1-19B) | DERP Region (2B) |  Server Public Key (32B)  |  Sender Private Key (32B)  |
+---------------------+------------------+---------------------------+----------------------------+
| 203.128.89.74:57321 |               21 | QPGoX1GY......488YNqsyWM= | o/FXVnOn.....llrKg5bqxlgY= |
+---------------------+------------------+---------------------------+----------------------------+

Senders and receivers communicate over what we call an "overlay". An overlay runs over one of two currently implemented mediums; UDP or DERP. Each message over the relay is encrypted with the sender's private key.

UDP: The receiver creates a NAT holepunch to allow senders to connect directly. WireGuard nodes are exchanged peer-to-peer. This mode will only work if the receiver doesn't have hard NAT.

DERP: The receiver connects to the closet DERP relay server. WireGuard nodes are exchanged through the relay.

In both cases auth is handled the same way. The receiver will only accept messages encrypted from the sender's private key, to the server's public key.

Why create another file transfer tool?

Lots of great file tranfer tools exist, but they all have some limitations:

  1. Slow speeds due to relay servers.
  2. Trusting a 3rd party server for authentication.
  3. Limited to only file transfers.

We sought to utilize advancements in userspace networking brought about by Tailscale to create a tool that could solve all of these problems, and provide way more functionality.

Acknowledgements

  1. Tailscale
  2. Headscale
  3. WireGuard-go
Repositorios relacionados
tonyantony300/dashbeam

Send files and folders anywhere in the world without storing in cloud - any size, any format, no accounts, no restrictions.

TypeScriptnpmGNU Affero General Public License v3.0encryptionopen-source
altsendme.com
8.7k540
tonyantony300/alt-sendme

Send files and folders anywhere in the world without storing in cloud - any size, any format, no accounts, no restrictions.

TypeScriptnpmGNU Affero General Public License v3.0encryptionopen-source
altsendme.com
8.6k538
ganeshrvel/openmtp

OpenMTP - Advanced Android File Transfer Application for macOS

JavaScriptnpmMIT Licenseopenmtpmtp
openmtp.ganeshrvel.com
7k291
Ylianst/MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.

HTMLApache License 2.0amtfile-transfer
meshcentral.com
6.9k920
spieglt/FlyingCarpet

Cross-platform AirDrop. File transfer between Android, iOS, Linux, macOS, and Windows over ad hoc WiFi. No network infrastructure required, just two devices with WiFi chips (and optionally Bluetooth) in close range.

Rustcrates.ioGNU General Public License v3.0file-transferwireless
5.2k257
shrimqy/Sefirah

Phone Link / KDE Connect alternative

C#GNU General Public License v3.0androidclipboard
2.7k57
blenderskool/blaze

⚡ File sharing progressive web app built using WebTorrent and WebSockets

JavaScriptnpmMIT Licensefrontendbackend
blaze.now.sh
2.5k299
jinsi-ai/b0pass

百灵快传(B0Pass):基于Go语言的高性能 "手机电脑超大文件传输神器"、"局域网共享文件服务器"。LAN large file transfer tool。

GoGo ModulesApache License 2.0golanggo
4bit.cn/p/b0pass
2.3k324
bitepeng/b0pass

百灵快传(B0Pass):基于Go语言的高性能 "手机电脑超大文件传输神器"、"局域网共享文件服务器"。LAN large file transfer tool。

GoGo ModulesApache License 2.0golanggo
4bit.cn/p/b0pass
2.2k291
YouTransfer/YouTransfer

The simple but elegant self-hosted file transfer & sharing solution

JavaScriptnpmApache License 2.0elegantself-hosted
youtransfer.io
2k201
mayubao/KuaiChuan

仿茄子快传的一款文件传输应用

JavaMavensockethttp
jianshu.com/p/1b0b337829f5
1.8k595
whoozle/android-file-transfer-linux

Android File Transfer for Linux (and macOS!)

C++GNU Lesser General Public License v2.1mtpandroid
whoozle.github.io/android-file-transfer-linux/
1.7k131