提交 ac6084aa 编写于 作者: U u011409356

Tue Mar 19 17:51:00 CST 2024 inscode

上级 ca207a2f
run = "npm i && npm run dev"
run = "npm i && clear && npm run dev"
language = "node"
[env]
PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}"
XDG_CONFIG_HOME = "/root/.config"
npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global"
\ No newline at end of file
npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global"
[debugger]
program = "main.js"
console.log("欢迎来到 InsCode");
\ No newline at end of file
process.stdout.write('\x1Bc');
const dns = require('dns');
const resolver = new dns.Resolver();
resolver.setServers(['223.5.5.5']); // 设置DNS服务器
// 定义解析DNS的函数
function resolveDNS(domain) {
return new Promise((resolve, reject) => {
resolver.resolve4(domain, (err, addresses) => {
if (err) {
reject(err);
} else {
resolve(addresses);
}
});
});
}
// 使用函数进行DNS解析
resolveDNS('jf.uestc.xyzliang.com')
.then(addresses => {
console.log('IP addresses:', addresses);
})
.catch(err => {
console.error(err);
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册