Jacky's blog
首页
  • 学习笔记

    • web
    • android
    • iOS
    • vue
  • 分类
  • 标签
  • 归档
收藏
  • tool
  • algo
  • python
  • java
  • server
  • growth
  • frida
  • blog
  • SP
  • more
GitHub (opens new window)

Jack Yang

编程; 随笔
首页
  • 学习笔记

    • web
    • android
    • iOS
    • vue
  • 分类
  • 标签
  • 归档
收藏
  • tool
  • algo
  • python
  • java
  • server
  • growth
  • frida
  • blog
  • SP
  • more
GitHub (opens new window)
  • 服务器tutorial
  • spring

  • 数据库

  • 运维

    • SSH 进行本地文件的交互
    • SSH Tunnel结合本地代理案例
    • 查询本地电脑外网 IP
      • 使用 curl
        • 拓展 ifconfig.me
      • 使用 wget
      • 通过浏览器查询
    • dns查询
    • 内网穿透
  • other

  • 《server》
  • 运维
Jacky
2024-09-21
目录

查询本地电脑外网 IP

要查看本地电脑的外网 IP,可以使用以下几种方法

# 使用 curl

curl ifconfig.me
1

# 拓展 ifconfig.me

ifconfig.me 是一个简单的在线服务,提供了获取设备外部(公共)IP 地址的功能。当你使用命令: curl ifconfig.me. 它会返回你当前设备的公共 IP 地址。这个服务非常轻量级,并且专门为用户快速查询其公共 IP 地址而设计,通常用于网络调试和诊断场景

其他功能:

ifconfig.me 还支持通过 curl 命令查询其他网络相关信息,例如:

  1. 获取用户的公共 IP 地址: curl ifconfig.me

  2. 获取用户的代理信息: curl ifconfig.me/ua

  3. 获取 IP 地址的详细信息: curl ifconfig.me/all

这使得 ifconfig.me 成为快速获取外部网络信息的有用工具

# 使用 wget

wget -qO- ifconfig.me
1

这两个命令会返回你本地电脑的外网 IP 地址

# 通过浏览器查询

你也可以通过浏览器访问以下网站来查看你的外网 IP:

  • https://whatismyipaddress.com (opens new window)
  • https://ipinfo.io (opens new window)
  • https://ifconfig.me (opens new window)

访问这些网站后,它们会显示你的外网 IP 地址

上次更新: 2024/12/01, 17:09:08
SSH Tunnel结合本地代理案例
dns查询

← SSH Tunnel结合本地代理案例 dns查询→

最近更新
01
npx 使用指南
10-12
02
cursor
09-28
03
inspect
07-20
更多文章>
Theme by Vdoing | Copyright © 2019-2025 Jacky | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式