Another ngrok client by python.
docker run -d \
--name ngrokd \
--net=host \
--restart=always \
sequenceiq/ngrokd:latest \
-httpAddr=:4480 \
-httpsAddr=:4444 \
-domain=xxx.com
Please remember to modify your domain name resolution
A | *.xxx.com | xxx.xxx.xxx.xxx
docker run -d \
--name ngrok \
--net=host \
--restart=always \
-e NGROK_HOST=xxx.com|xxx.xxx.xxx.xxx \
-e NGROK_PORT=4443 \
-e NGROK_BUFSIZE=8192 \
-v ngrok_app:/app \
dhso/ngrok:latest
ENV | VAL |
---|---|
NGROK_HOST | your ngrokd domain or IP |
NGROK_PORT | default 4443 |
NGROK_BUFSIZE | default 8192 |
in ngrok container
cd /app
edit ngrok.json
save ngrok.json and restart ngrok container
[{
"protocol": "http",
"hostname": "www.xxx.com",
"subdomain": "",
"rport": 0,
"lhost": "127.0.0.1",
"lport": 80
},{
"protocol": "http",
"hostname": "",
"subdomain": "www",
"rport": 0,
"lhost": "127.0.0.1",
"lport": 80
},{
"protocol": "tcp",
"hostname": "",
"subdomain": "",
"rport": 2222,
"lhost": "127.0.0.1",
"lport": 22
}]