Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.
/ tnnlink Public archive

Simple HTTP tunnel using SSH remote port forwarding

License

Notifications You must be signed in to change notification settings

faejr/tnnlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tnnlink

Build Status

Simple HTTP tunneling using SSH, authorized using github public keys.

Self-hosted ngrok alternative.

Visit tnnl.ink to see it in action.

Connecting

ssh <github-username>@localhost -p 2222 -R 80:localhost:<local-port>

Planned features (no order)

  • TCP tunnel
  • Custom sub-domain

Dependencies

Usage

  1. Install Go
  2. Get the code
go get github.com/liljebergxyz/tnnlink
  1. Compile & Install
go install github.com/liljebergxyz/tnnlink
  1. Generate a passwordless host key
ssh-keygen -t rsa -b 4096 -f host_rsa
  1. Create a config file
[http]
addr = ":8080"
sslAddr = ":4433"
mainDomain = ".localtest.me/"
ssl = false
cert = "./cert.pem"
key = "./key.pem"

[ssh]
addr = ":2222"
key = "./host_rsa"
whitelist = ""
  1. Launch
tnnlink --config="./config.toml"

Explanation of whitelist

The whitelist config entry is a comma-seperated list of github usernames

Notes

  1. This software has not been audited in anyway and was a fun weekend project I intend to continue supporting, but it is my first time writing a full application in Go for actual every-day use.
  2. SSL is not activated by default and you are expected to generate a letsencrypt wildcard certificate in order to utilize it