Git Product home page Git Product logo

ngrok-webapi's Introduction

ngrok-webapi

simple webapi wrapper for ngrok

Introduction

本工具将ngrok的功能封装成RESTful API,方便程序调用

Requirement

  • docker
  • ngrok 1.x
    • 不需要自己提供,安装脚本会自动下载并编译

Run

git clone [email protected]:keepwn/ngrok-webapi.git
cd ngrok-webapi

# generate ngrok bins
mkdir $(pwd)/ngrok-bin
docker run --rm \
    -e DOMAIN="$DOMIAN" \
    -e TUNNEL_PORT=$TUNNEL_PORT \
    -e HTTP_PORT=$HTTP_PORT \
    -e HTTPS_PORT=$HTTPS_PORT \
    -v $(pwd)/ngrok-bin:/release keepwn/ngrok-self-hosting

# build image: ngrok-webapi
docker build -t ngrok-webapi -f Dockerfile-ngrok-webapi .

# please modify app.conf
# create container and run
docker run -d \
    --name=ngrok-webapi \
    --restart=always \
    -p 5000:5000 \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v ./ngrok-bin:/ngrok-bin
    ngrok-webapi

# enjoy
curl 127.0.0.1:5000/info

Details

ngrok功能的封装是通过docker来实现的:

  • 容器的启动停止相当于ngrok隧道的开启关闭
  • 一个容器对应一条ngrok隧道配置,容器之间互不影响

ngrok-webapi's People

Contributors

keepwn avatar

Watchers

James Cloos avatar  avatar

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.