https://github.com/emptydreams/ip-china-location
通过 IPv4 地址获取用户的地理位置信息,精确到省。
https://github.com/emptydreams/ip-china-location
Last synced: 3 months ago
JSON representation
通过 IPv4 地址获取用户的地理位置信息,精确到省。
- Host: GitHub
- URL: https://github.com/emptydreams/ip-china-location
- Owner: EmptyDreams
- License: agpl-3.0
- Created: 2023-08-21T10:31:07.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-23T14:25:39.000Z (over 1 year ago)
- Last Synced: 2025-02-13T20:04:48.156Z (3 months ago)
- Language: TypeScript
- Size: 253 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 欢迎使用
该模块用于获取中国区域的省级定位信息(不保证准确),不支持国外定位。
第一次查找所需时间 10ms 左右,非首次查找所需时间 < 1ms。
## 快速开始
使用 `findIPv4` 即可查找指定 IP 的定位,使用 `findOnVercel` 可通过 Vercel 的请求头获取定位信息。
目前 Vercel 平台不支持自动加载数据库,调用 `findOnVercel` 和 `loadDatabase` 时需要手动传入路径。