一 什么是ngrok ngrok is a reverse proxy that creates a secure tunnel from a public endpoint to a locally running web service. ngrok captures and analyzes all traffic over the tunnel for later inspection and replay. ngrok是一个反向代理,可以从公网建立一个安全隧道到本地的web服务.ngr
@参考文章1.@参考文章2.@参考文章3.@参考文章4,@之前同事的项目 controller @Controller @RequestMapping("/home") public class HomeController { @RequestMapping("/") public String index(HttpServletRequest req) { try { String ip = IpUtil.getOuterNetIp(req);//获取外网ip
using System.Net; # region 获取内.外网Ip /// <summary> /// 获取本地ip地址,优先取内网ip /// </summary> public static String GetLocalIp() { String[] Ips = GetLocalIpAddress(); foreach (String ip in Ips) if (ip.StartsWith("10.80.")) return ip; foreach