Build your own ngrok server

2016年02月13日

How to install ngrok server?

ngrok server installation

This is my client:

ngrok client or here in github ngrok client

How to run a ngrok client?

You need a configure file to define some tunnels first:

    server_addr: "server.ngrok.cc:4443"
    auth_token: "dddddddddddddddddddddddddddddddd" #授权token,在www.ngrok.cc平台注册账号获取
    tunnels:
        rstudio:
            subdomain: "rstudio" #定义服务器分配域名前缀,跟平台上的要一样
            auth: "admin:admin"
            proto:
                http: 8787 #映射本地的8787端口,可以通过加ip为内网任意一台映射
        ssh:
            remote_port: 8022 #服务器分配tcp转发端口,如果不填写此项则又服务器分配
            proto:
                tcp: 22 #映射本地的22端口

I write a small service script to start the ngrok client.