Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/psanford/wormhole-william
End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
https://github.com/psanford/wormhole-william
cli encryption end-to-end-encryption file-transfer go golang magic-wormhole
Last synced: 5 days ago
JSON representation
End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
- Host: GitHub
- URL: https://github.com/psanford/wormhole-william
- Owner: psanford
- License: mit
- Created: 2019-08-28T16:46:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-24T22:23:01.000Z (about 1 year ago)
- Last Synced: 2025-01-02T04:06:03.372Z (12 days ago)
- Topics: cli, encryption, end-to-end-encryption, file-transfer, go, golang, magic-wormhole
- Language: Go
- Homepage:
- Size: 208 KB
- Stars: 1,108
- Watchers: 14
- Forks: 61
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome-github-stars - psanford/wormhole-william - End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang). (Go)
- awesome-switching - wormhole-william
README
# wormhole-william
wormhole-william is a Go (golang) implementation of [magic wormhole](https://magic-wormhole.readthedocs.io/en/latest/). It provides secure end-to-end encrypted file transfers between computers. The endpoints are connected using the same "wormhole code".
wormhole-william is compatible with the official [python magic wormhole cli tool](https://github.com/warner/magic-wormhole).
Currently, wormhole-william supports:
- sending and receiving text over the wormhole protocol
- sending and receiving files over the transit protocol
- sending and receiving directories over the transit protocol## Docs
https://pkg.go.dev/github.com/psanford/wormhole-william/wormhole?tab=doc
## CLI Usage
```
$ wormhole-william send --help
Send a text message, file, or directory...Usage:
wormhole-william send [WHAT] [flags]Flags:
--code string human-generated code phrase
-c, --code-length int length of code (in bytes/words)
-h, --help help for send
--hide-progress suppress progress-bar display
-v, --verify display verification string (and wait for approval)Global Flags:
--relay-url string rendezvous relay to use$ wormhole-william receive --help
Receive a text message, file, or directory...Usage:
wormhole-william receive [code] [flags]Aliases:
receive, recvFlags:
-h, --help help for receive
--hide-progress suppress progress-bar display
-v, --verify display verification string (and wait for approval)Global Flags:
--relay-url string rendezvous relay to use
```### CLI tab completion
The wormhole-william CLI supports shell completion, including completing the receive code.
To enable shell completion follow the instructions from `wormhole-william shell-completion -h`.## Building the CLI tool
wormhole-william uses go modules so it requires a version of the go tool chain >= 1.11. If you are using a version of go that supports modules you can clone the repo outside of your GOPATH and do a `go build` in the top level directory.
To just install via the go tool run:
```
go install github.com/psanford/wormhole-william@latest
```## API Usage
Sending text:
```go
package mainimport (
"context"
"fmt"
"io/ioutil"
"log""github.com/psanford/wormhole-william/wormhole"
)func sendText() {
var c wormhole.Clientmsg := "Dillinger-entertainer"
ctx := context.Background()
code, status, err := c.SendText(ctx, msg)
if err != nil {
log.Fatal(err)
}
fmt.Println("On the other computer, please run: wormhole receive")
fmt.Printf("Wormhole code is: %s\n", code)s := <-status
if s.OK {
fmt.Println("OK!")
} else {
log.Fatalf("Send error: %s", s.Error)
}
}func recvText(code string) {
var c wormhole.Clientctx := context.Background()
msg, err := c.Receive(ctx, code)
if err != nil {
log.Fatal(err)
}if msg.Type != wormhole.TransferText {
log.Fatalf("Expected a text message but got type %s", msg.Type)
}msgBody, err := ioutil.ReadAll(msg)
if err != nil {
log.Fatal(err)
}fmt.Println("got message:")
fmt.Println(msgBody)
}
```See the [cli tool](https://github.com/psanford/wormhole-william/tree/master/cmd) and [examples](https://github.com/psanford/wormhole-william/tree/master/examples) directory for working examples of how to use the API to send and receive text, files and directories.
## Third Party Users of Wormhole William
- [rymdport](https://github.com/Jacalz/rymdport): A cross-platform Magic Wormhole graphical user interface
- [riftshare](https://github.com/achhabra2/riftshare): Desktop filesharing app
- [termshark](https://github.com/gcla/termshark): A terminal UI for tshark
- [tmux-wormhole](https://github.com/gcla/tmux-wormhole): tmux wormhole integration
- [wormhole-william-mobile](https://github.com/psanford/wormhole-william-mobile): Android wormhole-william app