Skip to content

Commit

Permalink
feat: MMDB 加入 $utils.ipasn
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Oct 30, 2024
1 parent b435866 commit d12ccad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.409",
"version": "2.14.410",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions backend/src/utils/geo.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,7 @@ export class MMDB {
ipaso(ip) {
return this.asnReader?.asn(ip)?.autonomousSystemOrganization;
}
ipasn(ip) {
return this.asnReader?.asn(ip)?.autonomousSystemNumber;
}
}
1 change: 1 addition & 0 deletions scripts/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function operator(proxies = [], targetPlatform, context) {
// getISO, // 获取 ISO 3166-1 alpha-2 代码
// Gist, // Gist 类
// download, // 内部的下载方法, 见 backend/src/utils/download.js
// MMDB, // Node.js 环境 可用于模拟 Surge/Loon 的 $utils.ipasn, $utils.ipaso, $utils.geoip. 具体见 https://t.me/zhetengsha/1269
// }

// 如果只是为了快速修改或者筛选 可以参考 脚本操作支持节点快捷脚本 https://t.me/zhetengsha/970 和 脚本筛选支持节点快捷脚本 https://t.me/zhetengsha/1009
Expand Down

0 comments on commit d12ccad

Please sign in to comment.