├── inlets_version ├── Procfile ├── .gitignore ├── bin └── wget.exe ├── init.sh ├── client ├── run-mac.sh ├── run-linux.sh └── run-windows.bat ├── app.json └── README.md /inlets_version: -------------------------------------------------------------------------------- 1 | 2.7.4 -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: chmod a+x ./init.sh && ./init.sh -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .wget-hsts 2 | /bin/* 3 | !/bin/wget.exe -------------------------------------------------------------------------------- /bin/wget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ngxson/inlets-heroku/HEAD/bin/wget.exe -------------------------------------------------------------------------------- /init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | INLETS_VERSION=`cat inlets_version` 4 | 5 | if [ ! -f "./bin/inlets" ]; then 6 | wget "https://github.com/inlets/inlets/releases/download/$INLETS_VERSION/inlets" -O "./bin/inlets" 7 | fi 8 | 9 | chmod a+x ./bin/inlets 10 | ./bin/inlets server --port=$PORT --token="$TOKEN" 11 | -------------------------------------------------------------------------------- /client/run-mac.sh: -------------------------------------------------------------------------------- 1 | export REMOTE="https://example.herokuapp.com" 2 | export TOKEN="CLIENT-TOKEN-HERE" 3 | export UPSTREAM="http://127.0.0.1:3000" 4 | 5 | if ! [ -x "$(command -v inlets)" ]; then 6 | echo 'Please run "brew install inlets" to install inlets first' >&2 7 | exit 1 8 | fi 9 | 10 | inlets client \ 11 | --remote=$REMOTE \ 12 | --upstream=$UPSTREAM \ 13 | --token $TOKEN -------------------------------------------------------------------------------- /client/run-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TOKEN="you_password" 4 | REMOTE="your_app.herokuapp.com" 5 | LOCALPORT=80 6 | INLETS_VERSION=`cat ../inlets_version` 7 | 8 | if [ ! -f "../bin/inlets" ]; then 9 | wget "https://github.com/inlets/inlets/releases/download/$INLETS_VERSION/inlets" -O "../bin/inlets" 10 | fi 11 | 12 | chmod a+x ../bin/inlets 13 | ../bin/inlets client --remote=$REMOTE --upstream=http://127.0.0.1:$LOCALPORT --token $TOKEN 14 | -------------------------------------------------------------------------------- /client/run-windows.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | 4 | set TOKEN="you_password" 5 | set REMOTE="your_app.herokuapp.com" 6 | set LOCALPORT="80" 7 | 8 | cd .. 9 | set /p INLETS_VERSION=