diff --git a/src/proxy.js b/src/proxy.js index 06642cb..7c33fe5 100644 --- a/src/proxy.js +++ b/src/proxy.js @@ -41,6 +41,7 @@ app.set('view engine', 'handlebars'); app.set('views', path.join(__dirname, './views')); app.use('/', express.static(path.join(__dirname, '../public/temp'))); + app.use('/android', express.static(path.join(__dirname, '../android'))); app.use('/windows', express.static(path.join(__dirname, '../windows'))); app.use( @@ -458,6 +459,17 @@ app.use('/node', async (req, res) => { } }); +app.use('/check-status', async (req, res) => { + try { + const result = await isPortReachable('baidu.com', 80, 3000); + + res.send(result); + } catch (err) { + console.log(err); + res.send(false); + } +}); + async function fetchAPI() { const url = 'https://raw.githubusercontent.com/hello-world-1989/cn-news/main/end-gfw-together';