Coder Social home page Coder Social logo

jason5ng32 / myip Goto Github PK

View Code? Open in Web Editor NEW
5.5K 19.0 651.0 38.09 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, whois search and more! || 🇨🇳 可能是最好用的IP工具箱。轻松检查你的 IP,IP 地理位置,检查DNS泄漏,检查 WebRTC 连接,速度测试,ping 测试,MTR测试,检查网站可用性,查询 Whois 信息等等。

Home Page: https://ipcheck.ing

License: MIT License

HTML 0.66% JavaScript 29.44% CSS 1.34% Dockerfile 0.18% Vue 68.37%
chatgpt dns ip ipinfo network webrtc leaks proxy whatismyip whatismyipaddress

myip's Introduction

🧰 MyIP - A Better IP Toolbox

jason5ng32%2FMyIP | Trendshift

IPCheck.ing Banner

GitHub Repo stars GitHub forks Docker Pulls GitHub license

CodeQL Docker Build and Push

PWA Windows-image MacOS-image Linux-image

Website

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

👉 Demo: https://ipcheck.ing

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

Deploy with Docker

👀 Main Features

  • 🖥️ View Your IPs: Detects and displays your local IPs, 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.
  • 🔦 DNS Resolver: Performs DNS resolution of a domain name from multiple sources and obtains real-time resolution results that can be used for contamination determination.
  • 🚧 Censorship Check: Check if a website is blocked in some countries.
  • 📓 Whois Search: Perform whois information search for domain names or IP addresses
  • 📀 MAC Lookup: Query information of a physical address
  • 🌗 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

Deploying in a Node Environment

Make sure you have Node.js installed.

Clone the code:

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

Install and build:

npm install && npm run build

Run:

npm start

The program will run on port 18966.

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
BACKEND_PORT No "11966" The running port of the backend part of the program
FRONTEND_PORT No "18966" The running port of the frontend part of the program
SECURITY_RATE_LIMIT No "0" Controls the number of requests an IP can make to the backend server every 60 minutes (set to 0 for no limit)
SECURITY_DELAY_AFTER No "0" Controls the first X requests from an IP every 20 minutes that are not subject to speed limits, and after X requests, the delay will increase
SECURITY_BLACKLIST_LOG_FILE_PATH No "logs/blacklist-ip.log" Path setting. Records the list of IPs that triggered the limit after SECURITY_RATE_LIMIT is enabled
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
IPAPIIS_API_KEY No "" API Key for IPAPI.is, used to obtain IP geolocation information through IPAPI.is
KEYCDN_USER_AGENT No "" The domain name when using KeyCDN, must contain https prefix. Used to obtain IP address information through KeyCDN
CLOUDFLARE_API No "" API Key for Cloudflare, used to obtain AS system information through Cloudflare
MAC_LOOKUP_API_KEY No "" API Key for MAC Lookup, used to obtain MAC address information

Using Environment Variables in a Node Environment

Create environment variables:

cp .env.example .env

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

BACKEND_PORT=11966
FRONTEND_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 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
# Rule Testing
DOMAIN,ptest-1.ipcheck.ing,Proxy1
DOMAIN,ptest-2.ipcheck.ing,Proxy2
DOMAIN,ptest-3.ipcheck.ing,Proxy3
DOMAIN,ptest-4.ipcheck.ing,Proxy4
DOMAIN,ptest-5.ipcheck.ing,Proxy5
DOMAIN,ptest-6.ipcheck.ing,Proxy6
DOMAIN,ptest-7.ipcheck.ing,Proxy7
DOMAIN,ptest-8.ipcheck.ing,Proxy8

🌟 Star History

Star History Chart

myip's People

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  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"
}

关于[ 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,不好评价

例图

简体中文

简体中文,**

自己部署的之后,使用右下角查询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地址不准确丢大脸┭┮﹏┭┮

再开:没法打开/关闭地图按钮的问题

作者你好,还是前几天那个没法打开/关闭地图按钮的问题,那个issue被你close了,但其实变量名我设置应该是对的,问题没解决。

          > 变量名是 BING_MAP_API_KEY 。

Docker里是写的BING_MAP_API_KEY,上面issue的描述没打全,看图。
image

Originally posted by @dreamsmaner in #161 (comment)

功能新增建议

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

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

README 中写到:

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

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

感谢你的分享

国内IP归属地有问题

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

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

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

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

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

一个小提议

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

打开/关闭地图功能无法开启

Docker部署在群晖上,映像版本是4/10早上10:56:07;

BING_MAP_API已设置,但页面右上方的打开/关闭地图按钮没法点(对比ipcheck.ing的话,点地图按钮就会出现地图)。

本来我以为是API的种类问题,因为Bing API有4种Type:Dev/Test,Mobile Application,Website,Windows Application。结果4种我都生成放进变量里试了,都不成功。

请问作者大佬

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

很讨厌每次都提示安装app

提示:此网站具备app的功能性。在您的设备上安装,以享有更全面的体验和便捷的访问。

希望可以选择关闭或者关闭后不再弹出

3.1问题:

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

怎么启用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这张图片作为地图

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.