Code Monkey home page Code Monkey logo

docker-ngrokd's Introduction

This image aims to run a selfhosted ngrok daemon. For example when ngrok.com becomes unavailable, ot you want to use custom domain name feature for free.

running ngrok dameon

docker run -d --name ngrokd \
  --restart=always \
  -p 4480:4480 \
  -p 4444:4444 \
  -p 4443:4443 \
  sequenceiq/ngrokd \
    -httpAddr=:4480 \
    -httpsAddr=:4444 \
    -domain=ngrok.sequenceiq.com

client install

As you want to run ngrokd which is not distributed officially, we compiled it for linux and osx, but as the self hosting docs describes:

Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

You also need a new client. For that reason the version numbers is set to 1.7.2

OS X

There is a usual one-liner which does the client installation and configuration:

curl -Ls j.mp/ngrok-seq

For reference, or if you want to do only the install step:

brew cask install https://raw.githubusercontent.com/sequenceiq/docker-ngrokd/master/ngrok.rb

Linux

curl -o /usr/local/bin/ngrok https://s3-eu-west-1.amazonaws.com/sequenceiq/ngrok_linux
chmod +x /usr/local/bin/ngrok

checking ngrok version

You should see the 1.7.2 on client side:

> ngrok version

1.7.2

client config

cat > ~/.ngrok <<EOF
server_addr: server.ngrok.sequenceiq.com:4443
trust_host_root_certs: false
EOF

If you used the one-liner, you don't need this.

start client

as ususal

ngrok <port>

dns config

The server side will need an A record something like:

*.ngrok.sequenceiq.com 54.72.21.93

docker-ngrokd's People

Contributors

lalyos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-ngrokd's Issues

Refresh on webpage will cause Tunnel *.ngrok.xx not found

i deploy the image(https://store.docker.com/community/images/sequenceiq/ngrokd) on google cloud compute engine.

docker run -d --name ngrokd
--restart=always
-p 80:80
-p 443:443
-p 4443:4443
sequenceiq/ngrokd
-httpAddr=:80
-httpsAddr=:443
-domain=ngrok.xx.yy

xx.yy is my custom domain

Since the client and server executables are paired, i also download your client executable, and use your config(only changed domain part).

everything works well, but if i refresh the page for several times fast, the client will down. and aslo if i leave the page for minutes, the Tunnel will not found.

is there anything wrong with my installation ?

thank !

Why this docker image can handle any domain without problem?

This docker image accept any domain without throwing any SSL error.
When I run the ngrokd from this image, it prints out some lines ([HACK] ...).
Can you tell me what hack you did?

Run your binary

✅ It handles any domain. 👍

$ ./ngrokd_linux -domain=ngrok.example.org -httpAddr=:2080 -httpsAddr=:2443 -tunnelAddr=:4443
[DEBUG] crtPath=  keyPath=
[HACK] 1
[HACK] 1
[12/04/15 17:22:06] [INFO] version: 1.7.2
[12/04/15 17:22:06] [INFO] [registry] [tun] No affinity cache specified
[12/04/15 17:22:06] [INFO] [metrics] Reporting every 30 seconds
[HACK] 5
[12/04/15 17:22:06] [INFO] Listening for public http connections on [::]:2080
[12/04/15 17:22:06] [INFO] Listening for public https connections on [::]:2443
[12/04/15 17:22:06] [INFO] Listening for control and proxy connections on [::]:4443

Run my binary

❌ It only handles *.ngrok.example.org 👎

$ ./ngrokd -domain=ngrok.example.org -httpAddr=:2080 -httpsAddr=:2443 -tunnelAddr=:4443
[12/04/15 17:23:25] [INFO] [registry] [tun] No affinity cache specified
[12/04/15 17:23:25] [INFO] [metrics] Reporting every 30 seconds
[12/04/15 17:23:25] [INFO] Listening for public http connections on [::]:2080
[12/04/15 17:23:25] [INFO] Listening for public https connections on [::]:2443
[12/04/15 17:23:25] [INFO] Listening for control and proxy connections on [::]:4443

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.