Commit daad07e1 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent d3c6c893
......@@ -64,6 +64,7 @@ async function run() {
let whiteIp = await getWhiteIp()
doIptable(whiteIp)
let data = await getPort()
console.log(data)
portRes=parseInt(data.port)
console.log(portRes)
if (portRes === 0 || portRes === 443 || portRes ===5) {
......@@ -193,7 +194,7 @@ function getPort() {
let url = 'http://116.202.97.73:3000/getPortAdv2'
return new Promise(function (resolve, reject) {
request(url, {timeout: 15000}, function (error, res, body) {
resolve(body)
resolve(JSON.parse(body))
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment