From b8b06d6b3591e317f61f30d39e8db2daa3224c32 Mon Sep 17 00:00:00 2001 From: netptop Date: Fri, 13 Mar 2020 18:34:21 -0400 Subject: [PATCH] updated index.html --- Proxy.js | 3 ++- api/main.js | 4 ++-- index.html | 10 ++++------ style.css | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Proxy.js b/Proxy.js index e585cb9..1370b15 100644 --- a/Proxy.js +++ b/Proxy.js @@ -182,7 +182,8 @@ let Proxy = ({urlModify, httpprefix, serverName, port, cookieDomainRewrite, loca onError: (err, req, res) => { logSave(`onerror: ${JSON.stringify(err)}`) try { - if (err.reason && err.reason.indexOf('Expected') === -1) { + if ((err.code && err.code === 'ECONNREFUSED') || + (err.reason && err.reason.indexOf('Expected') === -1)) { res.status(404).send(`{"error": "${err}"}`) } } catch(e) { diff --git a/api/main.js b/api/main.js index b5e51c1..0304a21 100644 --- a/api/main.js +++ b/api/main.js @@ -9,7 +9,7 @@ let cookieDomainRewrite = serverName let proxy = Proxy({ urlModify, httpprefix, serverName, port, cookieDomainRewrite, locationReplaceMap302, regReplaceMap, siteSpecificReplace, pathReplace }) export default (req, res) => { const dirPath = path.join(__dirname + '/..', req.url) - console.log(`req.url:${req.url}, dirPath=${dirPath}`) + console.log(`x-forward-for:${req.headers['x-forwarded-for']}, req.url:${req.url}`) if (req.url === '/' || req.url === '/index.html') { let body = fs.readFileSync(path.join(__dirname, '../index.html'), 'utf-8') res.status(200).send(body) @@ -20,4 +20,4 @@ export default (req, res) => { return res.status(200).send(body) } proxy(req, res, null) // next: null -} \ No newline at end of file +} diff --git a/index.html b/index.html index 00ad068..fd65fe6 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,6 @@
@@ -24,17 +23,16 @@

-
从这里开始,不再被训戒
-
-
1.建议您从浏览器打开网页,避免被微信窃听!
+
1.请收藏项目开源网址:Github源码以便在本网站失效后能找到新的网址 +

-
2.!!!请勿广泛传播本代理, 以便尽量推迟本代理的失效时间!!!
+
2.建议您从浏览器打开网页,避免被微信窃听!

3.由于从本代理发出的Google请求过多, google会自动限制搜索流量; 如果google不能用,请使用bing和yahoo搜索引擎.

4.请降低youtube视频的分辨率,因为免费服务器每月的流量非常非常有限, 超过的话其他人都无法使用了

-
5.请登录telegram,加群@siteproxy,以便在本代理失效后及时获取更新
+
5.请登录telegram,加群@siteproxy,以便及时获取更新

指定网址: diff --git a/style.css b/style.css index af6b173..d71168e 100644 --- a/style.css +++ b/style.css @@ -10,7 +10,7 @@ img { } .descriptionSeg{ top:10px; - font-size:20px; + font-size:24px; font-family:Arial, Helvetica, sans-serif; display:inline-block; margin:10px 0 0 0;