Because friends don't let friends localhost.
Go to file
AJ ONeal 456fe70a0e update README.md 2020-05-06 11:11:40 -06:00
client use DuckDNS for demo 2020-05-06 11:11:13 -06:00
cmd use DuckDNS for demo 2020-05-06 11:11:13 -06:00
examples bugfix relay and update client 2020-05-05 00:44:21 -06:00
html/admin make Prettier 2020-04-28 00:58:26 -06:00
log squash refactor 2020-05-01 00:12:16 -06:00
packer cleanly separate version handling 2020-05-04 22:12:48 -06:00
relay use DuckDNS for demo 2020-05-06 11:11:13 -06:00
rvpn-docker heavier refactoring 2020-04-30 04:43:36 -06:00
sni squash refactor 2020-05-01 01:06:14 -06:00
tools make admin domain more configurable 2020-04-28 01:16:16 -06:00
vendor update deps and vendoring 2020-05-04 22:12:34 -06:00
.gitignore renaming things 2020-05-04 23:08:23 -06:00
.ignore cleanup 2020-04-28 00:47:31 -06:00
.jshintrc make Prettier 2020-04-28 00:58:26 -06:00
.prettierrc make Prettier 2020-04-28 00:58:26 -06:00
LICENSE add LICENSE 2020-05-06 11:11:33 -06:00
README.md update README.md 2020-05-06 11:11:40 -06:00
debug.sh minor fs denesting 2020-04-29 23:52:44 -06:00
go.mod update deps and vendoring 2020-05-04 22:12:34 -06:00
go.sum update deps and vendoring 2020-05-04 22:12:34 -06:00

README.md

Telebit

A secure, end-to-end Encrypted tunnel.

Because friends don't let friends localhost.

Install Go

Installs Go to ~/.local/opt/go for MacOS and Linux:

curl https://webinstall.dev/golang | bash

For Windows, see https://golang.org/dl

Relay Server

All dependencies are included, at the correct version in the ./vendor directory.

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -o telebit-relay-linux ./cmd/telebit-relay/telebit-relay.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -o telebit-relay-macos ./cmd/telebit-relay/telebit-relay.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -o telebit-relay-windows.exe ./cmd/telebit-relay/telebit-relay.go

Configure

Command-line flags or .env may be used.

See ./telebit-relay --help for all options, and examples/relay.env for their corresponding ENVs.

Example

./telebit-relay --acme-agree=true

Copy examples/relay.env as .env in the working directory.

Relay Client

All dependencies are included, at the correct version in the ./vendor directory.

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -o telebit-client-linux ./cmd/telebit/telebit.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -o telebit-client-macos ./cmd/telebit/telebit.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -o telebit-client-windows.exe ./cmd/telebit/telebit.go

Configure

Command-line flags or .env may be used.

See ./telebit-client --help for all options, and examples/client.env for their corresponding ENVs.

Example

# For .env
SECRET=abcdef1234567890
node-tunnel-client $ bin/stunnel.js --locals http://hfc.rootprojects.org:8080,http://test1.hfc.rootprojects.org:8080 --relay wss://localhost.rootprojects.org:8443 --secret abcdef1234567890

Local Web Application

Currently only raw TCP is tunneled.

This means that either the application must handle and terminate encrypted TLS connections, or use HTTP (instead of HTTPS). This will be available in the next release.

mkdir -p tmp-app
pushd tmp-app/

cat << EOF > index.html
Hello, World!
EOF

python3 -m http.server 3000

Check Results

{
	"type": "servers/GET",
	"schema": "",
	"txts": 1490473843,
	"txid": 8,
	"error": "ok",
	"error_description": "",
	"error_uri": "",
	"result": {
		"servers": [{
			"server_name": "0xc42014a0c0",
			"server_id": 1,
			"domains": [{
				"domain_name": "hfc.rootprojects.org",
				"server_id": 1,
				"bytes_in": 4055,
				"bytes_out": 8119,
				"requests": 12,
				"responses": 12,
				"source_addr": "127.0.0.1:55875"
			}, {
				"domain_name": "test1.hfc.rootprojects.org",
				"server_id": 1,
				"bytes_in": 0,
				"bytes_out": 0,
				"requests": 0,
				"responses": 0,
				"source_addr": "127.0.0.1:55875"
			}],
			"duration": 182.561747754,
			"idle": 21.445976033,
			"bytes_in": 8119,
			"bytes_out": 4055,
			"requests": 12,
			"responses": 12,
			"source_address": "127.0.0.1:55875"
		}, {
			"server_name": "0xc4200ea3c0",
			"server_id": 2,
			"domains": [{
				"domain_name": "hfc.rootprojects.org",
				"server_id": 2,
				"bytes_in": 1098,
				"bytes_out": 62,
				"requests": 2,
				"responses": 2,
				"source_addr": "127.0.0.1:56318"
			}, {
				"domain_name": "test1.hfc.rootprojects.org",
				"server_id": 2,
				"bytes_in": 0,
				"bytes_out": 0,
				"requests": 0,
				"responses": 0,
				"source_addr": "127.0.0.1:56318"
			}],
			"duration": 65.481814913,
			"idle": 23.589609269,
			"bytes_in": 62,
			"bytes_out": 1098,
			"requests": 2,
			"responses": 2,
			"source_address": "127.0.0.1:56318"
		}]
	}
}