From d5c30358d3143b61379ded5aa8f8b016ce69285f Mon Sep 17 00:00:00 2001 From: qq_41923622 Date: Fri, 21 Feb 2025 12:52:00 +0800 Subject: [PATCH] Fri Feb 21 12:52:00 CST 2025 inscode --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index e26f742..8931135 100644 --- a/index.js +++ b/index.js @@ -61,7 +61,7 @@ return new Promise((resolve,reject)=>{ }; // let url= "https://h5.hunlihu.com/vashow/ly/door/door/sign2"; - let url= "https://h5.hunlihu.com"+proxyUrl; + let url= "http://h5.hunlihu.com"+proxyUrl; // 将对象格式的数据转换为 x-www-form-urlencoded 格式 const encodedData = querystring.stringify(formData); @@ -131,7 +131,7 @@ const server = http.createServer(async(req, res) => { res.setHeader('Access-Control-Allow-Credentials', 'true'); https://h5.hunlihu.com/vashow/ly/door/door/init?0.9173087912286308 if(/\/vashow\/ly\/door\/door\/init/.test(req.url)){ - let proxyData = await getProxyInfoData(req, res,req.url.replace(/^\/shunlihu/, '')) + let proxyData = await getProxyInfoData(req, res,req.url.replace(/^\/h5hunlihu/, '')) res.writeHead(200, { 'Content-Type': 'text/html;charset=utf-8' }); res.end(proxyData); }else{ @@ -139,7 +139,7 @@ const server = http.createServer(async(req, res) => { req.headers['origin'] = subdirectoryMappings.shunlihu; req.headers['referer'] = subdirectoryMappings.shunlihu; req.headers['host'] = "h5.hunlihu.com"; - req.url = req.url.replace(new RegExp(`^\/shunlihu`), ''); + req.url = req.url.replace(new RegExp(`^\/h5hunlihu`), ''); // 将请求代理到目标服务器 proxy.web(req, res); } -- GitLab