mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-31 15:55:40 +00:00
🐛 fix ip address lookup
This commit is contained in:
BIN
package-lock.json
generated
BIN
package-lock.json
generated
Binary file not shown.
@@ -68,7 +68,7 @@
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"@zerollup/ts-transform-paths": "^1.7.18",
|
||||
"0x": "^4.10.2",
|
||||
"ipdata": "^1.1.2",
|
||||
"ipdata": "^1.1.3",
|
||||
"jest": "^26.6.3",
|
||||
"node-fetch": "^2.6.1",
|
||||
"ts-node": "^9.1.1",
|
||||
|
||||
@@ -75,6 +75,7 @@ export async function IPAnalysis(ip: string): Promise<LookupResponse> {
|
||||
}
|
||||
|
||||
export function isProxy(data: LookupResponse) {
|
||||
if (!data || !data.asn || !data.threat) return false;
|
||||
if (data.asn.type !== "isp") return true;
|
||||
if (Object.values(data.threat).some((x) => x)) return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user