第一步,正在方式配置ngrok服务器
第二步,申请第三方证书,证书最好是泛解析如:*.server.xxxx.com
第三步,把申请的证书放在ngrok服务器,启动ngrok并使用证书启动如:./bin/ngrokd -tlsKey="assets/server/tls/snakeoil.key" -tlsCrt="assets/server/tls/snakeoil.crt" -domain="ssh.51g.shop" -httpAddr=":80" -httpsAddr=":443" -tunnelAddr=":8083"
第四步,ngrok客户端设置如:
server_addr: "a.server.ninonwonon.com:8083"
trust_host_root_certs: true
tunnels:
https:
subdomain: "test"
proto:
https: "192.168.50.253:8088"
注:1.server_addr最好是子域名,才有证书如上xx.server.ninonwonon.com:
2.trust_host_root_certs: true 要设置成true
其他的设置与一般的一样
by zyh 2019 3 29