u
This commit is contained in:
@@ -9,7 +9,7 @@ const { execFileSync } = require('child_process')
|
||||
let ip
|
||||
try {
|
||||
// 使用 curl 同步请求获取 IP
|
||||
ip = execFileSync('curl', ['-s', 'https://api.ipify.org'], { encoding: 'utf8' }).trim()
|
||||
ip = execFileSync('curl', ['-s', 'https://ifconfig.me'], { encoding: 'utf8' }).trim()
|
||||
} catch (e) {
|
||||
// 如果 curl 失败,降级为固定开发环境
|
||||
ip = '0.0.0.0'
|
||||
|
||||
Reference in New Issue
Block a user