Commit f9745d95 authored by Administrator's avatar Administrator

Update app.js

parent 7f422cf0
Pipeline #114 failed with stages
...@@ -8,7 +8,7 @@ const cronSpeed = require('node-cron'); ...@@ -8,7 +8,7 @@ const cronSpeed = require('node-cron');
const shellExec = require('shell-exec') const shellExec = require('shell-exec')
var decimalPointRegex = /\-?\d+\.\d+/g; var decimalPointRegex = /\-?\d+\.\d+/g;
let fs = require('fs') let fs = require('fs')
let port = 5 let port = 3725
let countReboot = 4 let countReboot = 4
...@@ -58,13 +58,7 @@ app.listen(3000, () => console.log(`Example app listening on port 3000!`)) ...@@ -58,13 +58,7 @@ app.listen(3000, () => console.log(`Example app listening on port 3000!`))
async function run() { async function run() {
let whiteIp = await getWhiteIp()
doIptable(whiteIp)
let portRes = await getPort()
if (portRes === '0' || portRes === '443' || port ===5)
port = randomInt(4000, 60000)
else
port = parseInt(portRes)
let a = await shell.exec('cd .. && cd mt && sudo ./server1.sh ' + port, {silent: true}).stdout; let a = await shell.exec('cd .. && cd mt && sudo ./server1.sh ' + port, {silent: true}).stdout;
console.log('Reset Proxy') console.log('Reset Proxy')
} }
......
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