

免费资源网 – https://freexyz.cn/
通过容器获取本机的公网ip 可以用本地IP 多服务注册中心
把命令改居ping 执行可以拿到不同的服务器信息
public static String getIfconfigIP()
{
BufferedReader in = null;
String outline = “”;
// timeOut window为ms linux 为s
Runtime r = Runtime.getRuntime(); // 将要执行的ping命令,此命令是windows格式的命令
String pingCommand = ” curl ifconfig.me “;// windows系统
String os = System.getProperty(“os.name”).toLowerCase();
if (os.indexOf(“linux”)
© 版权声明
THE END
★喜欢这篇文章吗?喜欢的话,麻烦动动手指支持一下!★
相关推荐
暂无评论内容