Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

終端一鍵查詢公網 IP:curl 多種 API 支援純文字、JSON、XML 格式

編輯:關於 Linux

純文字輸出

curl icanhazip.com
curl ifconfig.me
curl curlmyip.com
curl ip.appspot.com
curl ipinfo.io/ip
curl ipecho.net/plain
curl www.trackip.net/i

JSON 格式

curl ipinfo.io/json
curl ifconfig.me/all.json
curl www.trackip.net/ip?json

XML 格式

curl ifconfig.me/all.xml

完整 IP 詳細資訊

curl ifconfig.me/all

結語

無需安裝額外工具,單一 curl 指令即可從多個公開 API 取得公網 IP,支援腳本解析的結構化格式。

Copyright © Windows教程網 All Rights Reserved