• Stars
    star
    730
  • Rank 62,081 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).

wormhole-william

wormhole-william is a Go (golang) implementation of magic wormhole. 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.

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, recv

Flags:
  -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:

package main

import (
	"context"
	"fmt"
	"io/ioutil"
	"log"

	"github.com/psanford/wormhole-william/wormhole"
)

func sendText() {
	var c wormhole.Client

	msg := "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.Client

	ctx := 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 and 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

More Repositories

1

tpm-fido

A WebAuthn/U2F token protected by a TPM (Go/Linux)
Go
179
star
2

donutdb

Store and query a sqlite db directly backed by DynamoDB.
Go
134
star
3

sqlite3vfshttp

Go sqlite3 http vfs: query sqlite databases over http with range headers
Go
130
star
4

wormhole-william-mobile

End-to-end encrypted file transfer for Android and iOS. A Magic Wormhole Mobile client.
Go
104
star
5

memfs

In-memory implementation of Go's `io/fs.FS` interface
Go
85
star
6

emacs-oauth

An oauth library for emacs
Emacs Lisp
42
star
7

sqlite3vfs

Go sqlite3 vfs
Go
29
star
8

cloudtrail-tattletail

AWS Cloudtrail event alerting lambda function. Send alerts to Slack, Email, or SNS.
Go
19
star
9

node-proxy

HTTP and SSL Proxy Using Node.js
JavaScript
16
star
10

node-mjpeg-test-server

Example of an mjpeg server written in node.js
JavaScript
15
star
11

emacs-yammer

A simple yammer client for emacs
Emacs Lisp
14
star
12

csv2sqlite

Go
9
star
13

cassandra-visual-ring

Visualization and planning tool for Cassandra rings
JavaScript
7
star
14

mirabox

Globalscale Mirabox Info
6
star
15

uhid

Linux uhid api in Go.
Go
6
star
16

tpm-ssh-ca

Go
5
star
17

ctapkey

Go
5
star
18

lencode

Go (golang) length prefix encoder and decoder package
Go
4
star
19

lambda-email

SES Lambda email forwarding and programmatic routing service
Go
3
star
20

ruby-mode

Emacs ruby-mode with modified indentation rules.
Emacs Lisp
3
star
21

awsip

Go package to check if ip address belongs to AWS
Go
3
star
22

getlogin

go implementation of getlogin(3)
Go
3
star
23

slack-channel-history

Go
3
star
24

github-stars

CLI tool to list all starred repos by user
Go
3
star
25

ec2price

EC2 price comparison cli tool
Go
2
star
26

wg-captive-browser

Connect to captive portals without disabling wireguard on linux
Shell
2
star
27

what-the-fido

https://what-the-fido.sanford.io Identify FIDO key by its attestation certificate
Go
2
star
28

awsso-agent

awsso is a credential agent for caching aws sso credentials (similar to ssh-agent)
Go
2
star
29

lambdahttp

Go
2
star
30

pinephoneproxy

Go
1
star
31

goversions

CLI tool to list Go releases
Go
1
star
32

awsv4signer

Go aws v4 signer implementation with pluggable hmac function
Go
1
star
33

json2csv

Go
1
star
34

gopherfest-2016-slides

Go
1
star
35

android-media-backup

Android application that uploads your media files to a webserver in the background
Go
1
star
36

nft-to-beanie-baby

Replace 'NFT' with 'Beanie Baby'
JavaScript
1
star
37

github-recent-activity

CLI tool that shows recent github activity for a user.
Go
1
star
38

door-awesomer-chrome

Chrome extension for Nearbuy's door awesomer
1
star
39

remarkablecloud

Go API to the ReMarkable cloud
Go
1
star
40

photo-backup-lambda

Go
1
star
41

git-code-review-el

Emacs Lisp
1
star
42

systray-inbox

Show systray icon when files appear in directory
Go
1
star
43

git-time-machine-el

Easy file history viewing in emacs
Emacs Lisp
1
star
44

dnsforward

Simple dns forwarding server (stub resolver)
Go
1
star
45

btf

BPF Type Format (BTF) in Go
Go
1
star
46

door-awesomer-arduino

C
1
star
47

ubuntuami

Go
1
star
48

parquet-buddy

Parquet-buddy is a CLI tool for inspecting parquet files written in Go
Go
1
star
49

cloudflareip

Go
1
star