Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huynhducduy/dtunnel
A service to expose your localhost to the world by create a tunnel from your computer to heroku
https://github.com/huynhducduy/dtunnel
heroku tunnel tunnel-client tunnel-server tunneling tunnels
Last synced: 29 days ago
JSON representation
A service to expose your localhost to the world by create a tunnel from your computer to heroku
- Host: GitHub
- URL: https://github.com/huynhducduy/dtunnel
- Owner: huynhducduy
- Created: 2020-04-12T04:42:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-31T02:31:35.000Z (about 4 years ago)
- Last Synced: 2024-11-04T09:37:24.854Z (about 1 month ago)
- Topics: heroku, tunnel, tunnel-client, tunnel-server, tunneling, tunnels
- Language: Shell
- Homepage:
- Size: 9.08 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - huynhducduy/dtunnel - A service to expose your localhost to the world by create a tunnel from your computer to heroku (others)
README
# dTunnel
## What is dTunnel
Have you heard about `Ngrok`? `Serveo`?
If you dont, these are services that give you a public url for your local app, help you expose your project to the world (internet) without deploying it. So simple and easy to use, right?
The cons of Ngrok or Serveo is that you dont have a static, fixed address (the address will change every time you open), otherwise has a time limit.
This project using `inlets` and `heroku` (you can use it with any of other cloud services) to let you have your own address and full control of your tunnel.
Special thanks to [inlets](https://github.com/inlets/inlets)'s devs for a fantastic project.
## Step to use
First you need a Heroku app, of course. Then clone this project.
Config name of the app, and the local port which you want to expose
```
export HEROKU_APP=
export LOCAL_PORT=
export TOKEN=$(head -c 16 /dev/urandom | shasum | cut -f1 -d" ")
```Then using heroku to build your app
```
heroku login
heroku git:remote -a $HEROKU_APP
heroku config:set TOKEN=${TOKEN} --app $HEROKU_APP
heroku buildpacks:set https://github.com/maximkulkin/heroku-buildpack-dummy.git
git push heroku master
```You can restart your app in case of anything happenned
```
heroku restart web -a ${HEROKU_APP}
```Then using your inlets binary which matches your operating system to run the client (can be downloaded from [here](https://github.com/inlets/inlets/releases)) (remember to make it executable first `chmod +x ./inlets`)
```
./inlets client \
--remote wss://${HEROKU_APP}.herokuapp.com \
--token $TOKEN \
--upstream http://127.0.0.1:$LOCAL_PORT
```## Demo
You can use my heroku app that i created [https://dtunnel.herokuapp.com/](https://dtunnel.herokuapp.com/):
```
export HEROKU_APP=dtunnel
export TOKEN=837861ba81915d3a65e58ecbd06bc2ac4d444cf0
```