Putty官网下载链接:
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Zip压缩包解压:
roo@kali:~# cd ngrok
roo@kali:~# unzip ngrok-stable-linux-amd64.zip
roo@kali:~# cd ngrok
注:若不成功,直接解压提取到此处!
第二种:
Golang语言环境下载地址:
roo@kali:~# https://studygolang.com/dl
roo@kali:~# tar -xzvf 压缩包.tar.gz -C /root/home/Desktop
roo@kali:~# cd 压缩包.tar.gz
roo@kali:~# make
tar.gz格式解压:
roo@kali:~# tar zxvf 安装包版本.tar.gz
roo@kali:~# ./configure
roo@kali:~# make && make install
roo@kali:~# mv go /user/Download
修改Profile属性文件:
leafpad /etc/profile
修改环境变量:
export PATH=$PATH:/user/Download/go/bin
roo@kali:~# source /etc/profile
roo@kali:~# go version
roo@kali:~# go
Gilang源码安装:
roo@kali:~# go get github.com/fatih/color
roo@kali:~# go run Setup.go
roo@kali:~# which go
roo@kali:~# vi ~/.bashrc
export GOROOT=/usr/lib/go-1.7
export GOPATH=$HOME/gopath
export PATH=$PATH:$GOROOT/bin:$GOPATH:bin
roo@kali:~# source ~/.bashrc
官网注册隧道ID:https://ngrok.com/
roo@kali:~# git clone https://github.com/tutumcloud/ngrok.git ngrok
roo@kali:~# cd /ngrok
roo@kali:~root/Download/ngrok # ll
修改ngrok.com
NGROK_DOMAIN="xxx.xxx.xx"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
执行完成后需要替换证书:
roo@kali:~# cp base.pem assets/client/tls/ngrokroot.crt
编译安装:
roo@kali:~# make release-server release-client
roo@kali:~ngrok# cd /bin
roo@kali:~ngrok/bin# ll
启动ngrok服务端:
roo@kali:~# ./bin/ngrokd -tlsKey=server.key -tlsCrt=server.crt -domain="weixin.yangjiace.xyz" -httpAddr=":80" -httpsAddr=":443"
roo@kali:~# ngrok -authtoken 隧道密钥 -subdomain 二级端口
网友评论