Windscribe / holepunch-client

Totally self-contained SSH reverse tunnel written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Download

What?

This is a standalone binary for creating a semi-persistent (client tries its best to detect errors, use keepalives and do reconnects) SSH reverse tunnel.

You can use the native OpenSSH server as a server, or function61/holepunch-server which brings some fancier optional features like purely-over-HTTP operation.

Failed connections are automatically retried and includes a helper to add this service to system startup (Systemd).

Usage

Download a suitable binary (we support Linux/AMD64, Linux/ARM and Windows/AMD64) for you from the Bintray link.

First, generate a keypair for you:

$ ssh-keygen -t ecdsa -b 521 -C "my awesome private key" -f id_ecdsa

Copy content of id_ecdsa.pub to your SSH server's authorized_keys file.

Write holepunch.json (see holepunch.example.json). You can use this with a vanilla SSH server, but if you're using function61/holepunch-server, you can also connect via WebSocket if you use format like ws://example.com/_ssh in server address.

Run client (this example is for Linux):

$ ./holepunch write-systemd-file
$ sudo systemctl enable holepunch
$ sudo systemctl start holepunch
$ sudo systemctl status holepunch

How to build & develop

How to build & develop (with Turbo Bob, our build tool). It's easy and simple!

Credits

Hugely inspired by codref's gist

About

Totally self-contained SSH reverse tunnel written in Go

License:Apache License 2.0


Languages

Language:Go 97.8%Language:Shell 2.2%