Coder Social home page Coder Social logo

jason5ng32 / myip Goto Github PK

View Code? Open in Web Editor NEW
4.6K 18.0 538.0 37.76 MB

The best IP Toolbox. Easy to check what's your IPs, IP geolocation, check for DNS leaks, examine WebRTC connections, speed test, ping test, MTR test, check website availability and more! || 🇨🇳 可能是最好用的IP工具箱。轻松检查你的 IP,IP 地理位置,检查DNS泄漏,检查 WebRTC 连接,速度测试,ping 测试,MTR测试,检查网站可用性等等。

Home Page: https://ipcheck.ing

License: MIT License

HTML 0.96% JavaScript 19.99% CSS 2.14% Dockerfile 0.27% Vue 76.64%
chatgpt dns ip ipinfo network webrtc leaks proxy whatismyip whatismyipaddress

myip's Introduction

🧰 MyIP - A Better IP Toolbox

GitHub Repo stars GitHub forks Docker Pulls Website PWA GitHub license

Windows-image MacOS-image Linux-image

🇺🇸 English | 🇨🇳 简体中文 | 🇫🇷 Français

👉 Demo: https://ipcheck.ing

Notes: You can use my demo for free, and you can also deploy it yourself.

Deploy with Vercel Deploy with Docker

👀 Main Features

  • 🖥️ View Your IPs: Detects and displays your local IP, sourcing from multiple IPv4 and IPv6 providers.
  • 🕵️ IP Information: Presents detailed information for all IP addresses, including country, region, ASN, geographic location, and more.
  • 🚦 Availability Check: Tests the accessibility of various websites, such as Google, GitHub, YouTube, ChatGPT, and others.
  • 🚥 WebRTC Detection: Identifies the IP address used during WebRTC connections.
  • 🛑 DNS Leak Test: Shows DNS endpoint data to evaluate the risk of DNS leaks when using VPNs or proxies.
  • 🚀 Speed Test:Test your network speed with edge networks.
  • 🚏 Proxy Rule Testing: Test the rule settings of proxy software to ensure their correctness.
  • 🌐 Global Latency Test: Performe lantency tests on servers located in different regions around the world.
  • 📡 MTR Test: Perform MTR tests on servers located in different regions around the world.
  • 🌗 Dark Mode: Automatically toggles between dark and daylight modes based on system settings, with an option for manual switching.
  • 📱 Minimalist Mode: A mobile-optimized mode that shortens page length for quick access to essential information..
  • 🔍 Search IP Information: Provides a tool for querying information about any IP address.
  • 📲 PWA Supported:Can be added as a desktop app on your phone as well as a Chrome app on your computer.
  • ⌨️ Keyboard Shortcuts: Supports keyboard shortcuts for all functions, press ? to view the shortcut list.
  • 🌍 Based on availability test results, it indicates whether global internet access is currently feasible.
  • 🇺🇸 🇨🇳 🇫🇷 English, Chinese, and French support.

📕 How to Use

There are 3 Ways to deploy:

Deploying in a Node Environment

Make sure you have Node.js installed.

Clone the code:

git clone https://github.com/jason5ng32/MyIP.git

Install:

npm install

Build:

npm run build

Run:

npm start

The program will run on port 18966.

Using Vercel

Click the 'Deploy to Vercel' button at the top to complete the deployment.

Using Docker

Click the 'Deploy to Docker' button at the top to complete the deployment. Or, use the following shell:

docker run -d -p 18966:18966 --name myip --restart always jason5ng32/myip:latest

📚 Environment Variable

You can use the program without adding any environment variables, but if you want to use some advanced features, you can add the following environment variables:

Variable Name Required Default Value Description
PORT No 18966 The port on which the program runs
BING_MAP_API_KEY No "" API Key for Bing Maps, used to display the location of the IP on a map
ALLOWED_DOMAINS No "" Allowed domains for access, separated by commas, used to prevent misuse of the backend API
IPChecking_API_KEY No "" API Key for IPCheck.ing, used to obtain accurate IP geolocation information
IPINFO_API_TOKEN No "" API Token for IPInfo.io, used to obtain IP geolocation information through IPInfo.io
KEYCDN_USER_AGENT No "" User Agent for KeyCDN, used to obtain IP geolocation information through KeyCDN
CLOUDFLARE_API No "" API Key for Cloudflare, used to obtain AS system information through Cloudflare
VITE_RECAPTCHA_SITE_KEY No "" Google reCAPTCHA's Site Key, used to display reCAPTCHA verification on the frontend
RECAPTCHA_SECRET_KEY No "" Google reCAPTCHA's Secret Key, used to verify reCAPTCHA verification on the backend

Using Environment Variables in a Node Environment

Create environment variables:

cp .env.example .env

Modify .env, and for example, add the following:

PORT=18966
BING_MAP_API_KEY="YOUR_KEY_HERE"
ALLOWED_DOMAINS="example.com"
IPChecking_API="YOUR_KEY_HERE"

Then restart the backend service.

Using Environment Variables in Vercel

Please refer to the content in .env.example and add it to the environment variables in Vercel.

Using Environment Variables in Docker

You can add environment variables when running Docker, for example:

docker run -d -p 18966:18966 \
  -e BING_MAP_API_KEY="YOUR_KEY_HERE" \
  -e ALLOWED_DOMAINS="example.com" \
  -e IPChecking_API="YOUR_TOKEN_HERE" \
  --name myip \
  jason5ng32/myip:latest

👩🏻‍💻 Advanced Usage

If you're using a proxy for internet access, consider adding this rule to your proxy configuration (modify it according to your client). This setup lets you check both your real IP and the IP when using the proxy:

# 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

😶‍🌫️ Additional Notes

70% of the code for this program was not written by me, but generated through ChatGPT. After about 90 rounds of back-and-forth and some minor manual adjustments, all the code was completed.

🌟 Star History

Star History Chart

myip's People

Contributors

dofy avatar jason5ng32 avatar jeamorg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

myip's Issues

[feature] support curl fetch ip in terminal

root@debian ~> curl ipinfo.io
{
  "ip": "43.*.*.*",
  "city": "Hong Kong",
  "region": "Hong Kong",
  "country": "HK",
  "loc": "****",
  "org": "AS132203 Tencent Building, Kejizhongyi Avenue",
  "timezone": "Asia/Hong_Kong",
  "readme": "https://ipinfo.io/missingauth"
}

一个小提议

在代码中,将微软地图Api的值,做成环境变量,同时可以前台隐藏。
这样的话,在vercel部署时可以后台输入,而不用更改源代码,防止key泄漏。

hi可否公开你跟 chatgpt 创建此应用的聊天历史

README 中写到:

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

我很好奇这是怎么做到的,如何开发出如此简洁好用的网站,我也想做类似的事情。

感谢你的分享

怎么启用google maps?

// 构造 AS Number 的链接
if (card.asn === '') {
card.asnlink = false;
card.mapUrl = '';
} else {
card.asnlink = https://radar.cloudflare.com/traffic/${card.asn};

// 使用 Google Maps 内嵌 iFrame
card.mapUrl = `https://www.google.com/maps?q=${card.latitude},${card.longitude}&z=2&output=embed`;

}
改成这样子也没有启用google maps,还是在引用defaultMap.jpg这张图片作为地图

功能新增建议

增加翻墙/不翻墙时的v4/v6使用优先级检测
还有就是 #21 中的建议改为环境变量 方便部署和同步上游更新

国内IP归属地有问题

ipv6的识别成北京金融街(我实际是某个别的省的)
ipv4虽然是我们那个省,但不是我们那个市
建议还是用ip138或者IPInfo.io的数据库吧

自己部署的之后,使用右下角查询ip不准确问题

1.首先我使用自己部署的项目查询118.249.21.169 ,显示的是北京的ip
image
image

  1. 使用 https://ipcheck.ing/查询118.249.21.169,却是准确的
    image
    image

我发现他们使用的请求接口不一样,自己部署的使用的是/api/ipapicom,而这个项目使用的是/api/ipchecking
在我跟进代码的时候发现使用这个接口需要IPChecking_API_KEY环境变量
image

  1. ip查询不准确如何解决或者 IPChecking_API_KEY在哪里获取;
    ps: 刚刚跟同事battle 因为查询的ip地址不准确丢大脸┭┮﹏┭┮

3.1问题:

已填写IPINFO_API_TOKEN
IP信息内无法显示IP内容
Screenshot_2024-01-31-08-29-02-023_com android chrome-edit

请问作者大佬

请问作者大佬,src/components下的文件在docker容器里哪个目录下啊?多谢

关于[ IP检测] Emoji显示错误的BUG

已在我的博客中写出解决办法

  1. 🛜 IP数据显示错误

    image-20231127205625386

    • 这应该是一个小Bug, 原作者是编写平台可能是MacOS,这是一个emoji表情
      但是在Windows平台上会显示一个小方块
    • 解决办法也很简单,在 index.html 中搜索 IP 数据

      <h2 id="scrollspyHeading1" class="col-4" :class="{'mobile-h2' : isMobile }">🛜 IP 数据</h2>
      改为
      <h2 id="scrollspyHeading1" class="col-4" :class="{'mobile-h2' : isMobile }"><i class="bi bi-radar"></i> IP 数据</h2>
      即可
    • 现在IP数据被成了一个图标,该项目支持 fontawesome 图标库, 你可以在这里找一个自己喜欢的图标替换掉 bi bi-radar
    • image-20231127205914651
    • 此问题已在Github向作者提交

[Feature Request] (根据网站显示的语言来)决定 Bing 地图 的语言

根据 官方文档,使用 Bing Map API 可以决定生成的图片的语言。

在本项目中,

MyIP/res/app.js

Line 167 in 8f8c733

card.mapUrl = `https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/${card.latitude},${card.longitude}/5?mapSize=800,640&pp=${card.latitude},${card.longitude};66&key=${this.bingMapAPIKEY}&fmt=jpeg&dpi=Large`;

如果想显示简体中文的内容,就可以在请求链接后添加 culture 参数 &c=zh-cn

当然,原文档还为亲切的**用户准备了个非常zzzq的 userRegion 参数 &ur=cn,不好评价

例图

简体中文

简体中文,**

在hostloc nodeseek 小众软件都刷到了,是个老人了

在hostloc nodeseek 小众软件都刷到了,是个老人了

十几年前记得还和对象分别有禅猫博客,恍然如隔世什么的两个博客,记不得太清了,但是还黑过,但也没做破坏。

至于可能吧,极客公园,那是后话了

Feature request: Adding IPinfo to the homepage and adding support for tokenless access

I work for IPinfo, and I appreciate the inclusion of IPinfo.io in the project. However, I noticed that IPinfo is not shown on the homepage of https://ipcheck.ing/. MyIP is one of the most fantastic services that supports our service, so we would be grateful if the project shows our data to all its users.

image

Is your feature request related to a problem? Please describe.

I would like to request the addition of IPinfo on the homepage.

Another aspect I would like to request is the addition of IPinfo's tokenless access to the project and site. IPinfo supports tokenless access to its API endpoint and can deliver up to 1,000 requests per day.

We appreciate the support for adding the access token, and I think users should be able to chose to provide a token or not. We would like to ensure that all users of MyIP have access to our data, regardless of whether they have an account with us or not. Please do keep the access token input system, but if the user has not provided an access token, I hope they can still get data from us.

IPinfo also supports IPv6 connection through the following API endpoint:

https://v6.ipinfo.io

Describe the solution you'd like

I would to like request the following:

  • Adding IPinfo in the homepage of https://ipcheck.ing/
  • Adding support for tokenless access to IPinfo's API service.
  • Adding support for the IPv6 endpoint

Describe alternatives you've considered

I have not considered any alternatives.

Additional context

None.

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.