Files
StudyDiary-20261009/10-WebClipper/curl获取本机公网IP(命令行备忘)_curl 我的ip-CSDN博客 1.md
CrazyJasonwell e97be9ac8c commit all
2026-10-09 22:06:40 +08:00

27 lines
926 B
Markdown
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
最新推荐文章于 2026-03-06 00:34:37 发布
原创 于 2021-04-21 12:40:31 发布 · 1.6w 阅读
· ![](https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart2023Black.png)
4
· ![](https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollect2.png)
12 ·
CC 4.0 BY-SA版权
版权声明:本文为博主原创文章,遵循 [CC 4.0 BY-SA](http://creativecommons.org/licenses/by-sa/4.0/) 版权协议,转载请附上原文出处链接和本声明。
背景: 经常需要 查询 到本机/本网络所在的 IP 地址。比如把本机的外网 IP 加到某个服务的白名单中。
方案:除了在百度上输入IP搜索得到本机IP地址外, 也可以使用 命令 行快捷 curl 访问能够返回 IP 地址的 网址。 以下网址可以使用:
国内/海外都可以访问的地址:
国内可以访问的地址:
```null
curl myip.ipip.net
```
海外(只能从国外访问):