Archive

Posts Tagged ‘ngrok’

ngrok 编译服务器客户端设置

May 22nd, 2016 No comments

服务端编译需要go1.6+, 下载源码

git clone https://github.com/inconshreveable/ngrok.git ngrok
cd ngrok
生成证书
NGROK_DOMAIN="xxxx.com"
openssl genrsa -out base.key 2048
openssl req -new -x509 -nodes -key base.key -days 10000 -subj "/CN=$NGROK_DOMAIN" -out base.pem
openssl genrsa -out server.key 2048
openssl req -new -key server.key -subj "/CN=$NGROK_DOMAIN" -out server.csr
openssl x509 -req -in server.csr -CA base.pem -CAkey base.key -CAcreateserial -days 10000 -out server.crt
cp base.pem assets/client/tls/ngrokroot.crt
编译, 完成后ngrok和ngrokd位于bin下
sudo make release-server release-client
启动服务器
sudo ./bin/ngrokd -tlsKey=server.key -tlsCrt=server.crt -domain="xxxx.com" -httpAddr=":8081" -httpsAddr=":8082"
32位或者arm客户端再编译, 位于bin下的Linux_arm下

Read more…

Categories: 电脑网络|network Tags: ,