feat: Node.js 版支持 MMDB, 通过环境变量或在脚本中传入数据库文件路径, 可使用 ipaso 和 geoip 方法

This commit is contained in:
xream
2024-05-12 23:17:11 +08:00
parent d073dfeef8
commit b083d2d840
4 changed files with 97 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ import $ from '@/core/app';
import { FILES_KEY, MODULES_KEY } from '@/constants';
import { findByName } from '@/utils/database';
import { produceArtifact } from '@/restful/sync';
import { getFlag, getISO } from '@/utils/geo';
import { getFlag, getISO, MMDB } from '@/utils/geo';
import Gist from '@/utils/gist';
function preprocess(raw) {
@@ -273,6 +273,7 @@ export const ProxyUtils = {
yaml: YAML,
getFlag,
getISO,
MMDB,
Gist,
};