linux使用小米球内网穿透映射到外网

  • 小米球官网http://ngrok.ciqiuwl.cn
  • 1、到https://manager.xiaomiqiu.com注册账号得到token
    在这里插入图片描述
  • 2、下载对应的版本http://ngrok.ciqiuwl.cn下方有下载地址
  • 3、在配置文件里替换你注册获得的token
  • 4、执行命令,映射到外网,有两种方式
    在这里插入图片描述
  • …/ngrok -config=ngrok.conf -subdomain xxx 80 (如 ./ngrok -config=ngrok.conf -subdomain rwtest 80)
    在这里插入图片描述
  • ./ngrok -config ngrok.conf -log=ngrok.log start <隧道名称> (如 : ./ngrok -config ngrok.conf -log=ngrok.log start httptun)
    在这里插入图片描述
  • 5、关于后台运行可以使用screen;我这里用了另外一个办法,脚本如下主要用>/dev/null 2>&1 & ,运行完后,按任意键返回命令行:
./ngrok -config=ngrok-git.conf  -log=ngrok-git.log -subdomain xxxx 8882 >/dev/null 2>&1 &

posted on 2019-09-10 09:51  愤怒的苹果ext  阅读(8)  评论(0编辑  收藏  举报  来源

导航