Code Monkey home page Code Monkey logo

dtunnel's Introduction

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'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) (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/:

export HEROKU_APP=dtunnel
export TOKEN=837861ba81915d3a65e58ecbd06bc2ac4d444cf0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.