树莓派--外网访问内网

使用https://www.ngrok.cc/服务器
解决的外网访问内网问题、本地WEB外网访问、本地开发微信、TCP端口转发
一.使用http外网访问。
1.打开https://www.ngrok.cc/申请开通http隧道,使用前置域名。
例如前置域名raspberry_leixiaomo(访问时请输入http://raspberry_leixiaomo.free.ngrok.cc//(默认index.html也可以访问其他文件))
2.填写http认证UserName and password
3.填写需要访问的IP地址与端口192.168.11.7:80
4.在linux下载 客户端 (Linux ARM版本),然后cd ~/Downloads 解压 unzip linux_arm.zip
5. 运行客户端命令 Linux:./sunny clientid df6f73c7801a6bf1客户端隧道id(隧道id在https://www.ngrok.cc/的隧道管理可以查看787e517272bf185a)。 
启动多个客户端id ./sunny clientid 客户端id1,客户端id2 
6.打开浏览器输入http://raspberry_leixiaomo.free.ngrok.cc//(默认index.html也可以访问其他文件)).会成功访问index.html文件

二.使用TCP端口转发。
1.填写TCP访问端口:2134(TCP访问端口,请输入1024-65534的端口)
2.填写本地映射端口:192.168.11.7:80(本地映射端口,如需修改其他端口,则输入 127.0.0.1:8000)
3.在linux下载 客户端 (Linux ARM版本),然后cd ~/Downloads 解压 unzip linux_arm.zip
4. 运行客户端命令 Linux:./sunny clientid e4cf2aa414aeddc8客户端隧道id(隧道id在https://www.ngrok.cc/的隧道管理可以查看787e517272bf185a)。 
启动多个客户端id ./sunny clientid 客户端id1,客户端id2 
5.打开浏览器输入http://server.ngrok.cc:2314/(默认index.html也可以访问其他文件)).会成功访问index.html文件

你可能感兴趣的:(树莓派外网访问,树莓派,linux,tcp,web,域名)