配置ngrok 实现内网穿透

https://imququ.com/post/self-hosted-ngrokd.html

编译服务器和客户端ngrok命令,其中指定了平台,这个平台是由go语言指定的: 

sudo GOOS=linux GOARCH=arm make release-client

启动服务器短命令:

sudo ./bin/ngrokd -tlsKey=server.key -tlsCrt=server.crt -domain="www.haowon.com" -httpAddr=":8080" -httpsAddr=":8081" &
启动客户端命令:

./ngrok start web nx ssh

启动之前先在~/.ngrok下面进行配置

server_addr: www.haowon.com:4443
trust_host_root_certs: false
tunnels:
#    web:
#        auth: "AuthUser:AuthPassWord"
#        proto:
#            http: 80
    web:
        remote_port: 80
        proto:
            tcp: 3000
    ssh:
        remote_port: 10022
        proto:
            tcp: 22
    nx:
       remote_port: 14000
       proto:
           tcp: 4000

    test:
        remote_port: 13000
        proto:
            tcp: 3000



猜你喜欢

转载自blog.csdn.net/zhshuai1/article/details/53573451