Coder Social home page Coder Social logo

7tianv / myip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jason5ng32/myip

0.0 0.0 0.0 533 KB

IP 工具箱。可以查看本机IP、挂代理后的IP信息、检查 DNS 泄露、检查 WebRTC 连接、测试网站可用性等。An alternative to ip.skk.moe service.

Home Page: https://jason5ng32.github.io/MyIP/

License: MIT License

JavaScript 58.76% CSS 5.01% HTML 36.23%

myip's Introduction

IP 工具箱

GitHub Repo stars GitHub GitHub contributors GitHub commit activity (branch)

在这里体验:jason5ng32.github.io/MyIP

这是一个完全开源的 IP 信息查看器,可以查询本机 IP、查询任意 IP、查询国内外网站可用性等。这是我第一次用 Vue.js 练手的项目。如果你看着 https://ip.skk.moe 眼馋,那就用这个程序搭建一个属于自己的吧。

主要功能

  1. 看自己的 IP:从多个 IPv4 和 IPv6 来源检测显示本机的 IP
  2. 看 IP 信息:显示所有 IP 的相关信息,包括国家、地区、ASN、地理位置等
  3. 可用性检测:检测一些网站的可用性:Google, Github, Youtube, 网易, 百度等
  4. WebRTC 检测:查看使用 WebRTC 连接时使用的 IP
  5. DNS 泄露检测:查看 DNS 出口信息,以便查看在 VPN/代理的情况下,是否存在 DNS 泄露隐私的风险
  6. 暗黑模式:根据系统设置自动切换暗黑/白天模式,也可以手动切换
  7. 简约模式:为移动版提供的专门模式,缩短页面长度,快速查看最重要的信息
  8. 查任意 IP 信息:可以通过小工具查询任意 IP 的信息
  9. 根据可用性检测结果,返回目前是否可以访问全世界网络的提示

如何使用

几乎开箱即用。直接下载所有代码,放到你本地或服务器上就行,没啥额外步骤。

如果你希望能够显示 IP 所在地的地图,则需要修改 app.js ,在 data 部分,找到:

bingMapAPIKEY: '',

在这里添加你的 Bing Map API Key,添加后,首页的地图按钮就会自动变为可用状态。

申请这个 API 是免费的,一年可以发起 12w 次免费请求,个人玩应该足够用了。如果真要搞大家伙的东西,就自己改一下程序吧,别把 key 放到前端代码里……

如果你连申请都懒得折腾,也可以考虑使用 Google Maps 的 iframe 嵌入。程序里已经注释了这部分的代码,你可以根据实际的情况进行反注释。不过,使用 iframe 实在有点脏脏的感觉。

高级用法

如果你在通过代理上网,可以考虑在你的代理配置里,增加下面的规则(请根据你使用的客户端进行修改),这样就可以实现同时查询真实 IP 和代理后的 IP:

# IP Testing
IP-CIDR,1.0.0.1/32,DIRECT,no-resolve
IP-CIDR6,2606:4700:4700::1111/128,DIRECT,no-resolve
DOMAIN-SUFFIX,ipify.org,Proxy

额外说明

这个程序的 80% 的代码不是我写的,是通过 ChatGPT 写的。大概来回 50 个回合,外加一些细微的手动修改,完成了全部代码。

myip's People

Contributors

jason5ng32 avatar 7tianv avatar dofy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.