增加登录日志

This commit is contained in:
hanhh committed 2021-09-07 01:40:41 +08:00
1 parent 0cbfca979e
commit eb196bd40d
11 files changed
+233 -12

No files matched your search

+3 -2
View File
@@ -158,11 +158,12 @@ export async function getNetIp(req: any) {
}
try {
const baiduApi = got
.get(`https://www.cip.cc/${ip}`, { timeout: 100000 })
.get(`https://www.cip.cc/${ip}`, { timeout: 10000, retry: 0 })
.text();
const ipApi = got
.get(`https://whois.pconline.com.cn/ipJson.jsp?ip=${ip}&json=true`, {
timeout: 100000,
timeout: 10000,
retry: 0,
})
.buffer();
const [data, ipApiBody] = await await Promise.all<any>([baiduApi, ipApi]);