所以就需要知道内网服务器的出口公网地址
之前被这个事困扰过,前几天想起来于是解决了下,简单记录下几种方法
curl icanhazip.com
curl ifconfig.me
curl ipinfo.io/ip
cur是一个命令行工具,用来请求web服务器,是一个利用URL语法在命令行下工作的文件传输工具
DESCRIPTION
curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS,
IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without
user interaction.
原文:https://blog.51cto.com/sugarlovecxq/2558498