Docker部署ngrok反向代理

Docker部署ngrok反向代理

2019-05-27 / 10 评论 / 883 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2021年10月27日,已超过1151天没有更新,若内容或图片失效,请留言反馈。

dhso/ngrok

Another ngrok client by python.

start ngrokd service

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

run ngrok client

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

config

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

ngrok.json example

[{
    "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
}]

Hub地址 https://hub.docker.com/r/dhso/ngrok
Github地址 https://github.com/dhso/ngrok-python

0

评论 (10)

取消
  1. 头像
    download
    Windows 10 · Google Chrome

    Cudos to you to acknowledge your caring about the usefulness of your content, and so too your readers. Peggi Drud Giorgia

    回复
  2. 头像
    indir
    Windows 10 · Google Chrome

    I am not really wonderful with English but I get hold this really easy to translate. Violet Say Rangel

    回复
  3. 头像
    ucretsiz
    Windows 10 · Google Chrome

    Roy Miller is a character that truly pays homage to the tough guys of old. Lillian Nevile Wilow

    回复
  4. 头像
    bluray
    Windows 10 · Google Chrome

    Right here is the perfect webpage for anyone who hopes tounderstand this topic. Zorana Fin Roswald

    回复
  5. 头像
    720p
    Windows 10 · Google Chrome

    I truly appreciate this blog. Thanks Again. Awesome. Emilie Shane Suzanne

    回复
  6. 头像
    yetiskin
    Windows 10 · Google Chrome

    I consider something genuinely special in this site. Rhody Lance Apollo

    回复
  7. 头像
    yabanci
    Windows 10 · Google Chrome

    I am so grateful for your post. Really thank you! Much obliged. Sophronia Oberon Reg

    回复
  8. 头像
    yabanci
    Windows 10 · Google Chrome

    Excellent, what a blog it is! This website presents valuable facts to us, keep it up. Babbie Hill Karolyn

    回复
  9. 头像
    yabanci
    Windows 10 · Google Chrome

    Spot on with this write-up, I actually believe this web site needs a lot more attention. Danita Leicester Byrann

    回复
  10. 头像
    720p
    Windows 10 · Google Chrome

    These are really fantastic ideas in concerning blogging. Abigale Dudley Banks

    回复