新建txt,重命名为ip.bat 再将下列文本,贴到ip.bat里 @echo off echo Public IP: curl ifconfig.me echo. pause 双击ip.bat,可得本机公网ip地址。