From 5643e80272ee6c0dfd31c2361f9ea25ec240461a Mon Sep 17 00:00:00 2001 From: cmliu Date: Tue, 10 Sep 2024 13:52:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BA=E7=8E=B0=E5=86=85?= =?UTF-8?q?=E7=BD=AE=E7=BA=BF=E8=B7=AF=E7=9A=84=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E8=87=AA=E5=AE=9A=E4=B9=89ADD*=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _worker.js | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/_worker.js b/_worker.js index fdb12a86c..47e766e51 100644 --- a/_worker.js +++ b/_worker.js @@ -36,6 +36,7 @@ let go2Socks5s = [ ]; let addresses = [ //当sub为空时启用本地优选域名/优选IP,若不带端口号 TLS默认端口为443,#号后为备注别名 + /* 'Join.my.Telegram.channel.CMLiussss.to.unlock.more.premium.nodes.cf.090227.xyz#加入我的频道t.me/CMLiussss解锁更多优选节点', 'visa.cn:443', 'www.visa.com:8443', @@ -49,12 +50,14 @@ let addresses = [ 'www.wto.org:8443', 'chatgpt.com:2087', 'icook.hk', - //'104.17.0.0#IPv4', + '104.17.0.0#IPv4', '[2606:4700::]#IPv6' + */ ]; let addressesapi = []; let addressesnotls = [ //当sub为空且域名带有"worker"字样时启用本地优选域名/优选IP,若不带端口号 noTLS默认端口为80,#号后为备注别名 + /* 'usa.visa.com', 'myanmar.visa.com:8080', 'www.visa.com.tw:8880', @@ -62,6 +65,7 @@ let addressesnotls = [ 'www.visa.com.br:2082', 'www.visasoutheasteurope.com:2086', '[2606:4700::1]:2095#IPv6' + */ ]; let addressesnotlsapi = []; let addressescsv = []; @@ -156,6 +160,33 @@ export default { return new Response(`${fakeConfig}`, { status: 200 }); case `/${userID}`: { await sendMessage(`#获取订阅 ${FileName}`, request.headers.get('CF-Connecting-IP'), `UA: ${UA}\n域名: ${url.hostname}\n入口: ${url.pathname + url.search}`); + if ((!sub || sub == '') && (addresses.length + addressesapi.length + addressesnotls.length + addressesnotlsapi.length + addressescsv.length) == 0){ + addresses = [ + 'Join.my.Telegram.channel.CMLiussss.to.unlock.more.premium.nodes.cf.090227.xyz#加入我的频道t.me/CMLiussss解锁更多优选节点', + 'visa.cn:443', + 'www.visa.com:8443', + 'cis.visa.com:2053', + 'africa.visa.com:2083', + 'www.visa.com.sg:2087', + 'www.visaeurope.at:2096', + 'www.visa.com.mt:8443', + 'qa.visamiddleeast.com', + 'time.is', + 'www.wto.org:8443', + 'chatgpt.com:2087', + 'icook.hk', + //'104.17.0.0#IPv4', + '[2606:4700::]#IPv6' + ]; + if (request.headers.get('Host').includes(".workers.dev")) addressesnotls = [ + 'usa.visa.com:2095', + 'myanmar.visa.com:8080', + 'www.visa.com.tw:8880', + 'www.visaeurope.ch:2052', + 'www.visa.com.br:2082', + 'www.visasoutheasteurope.com:2086' + ]; + } const vlessConfig = await getVLESSConfig(userID, request.headers.get('Host'), sub, UA, RproxyIP, url); const now = Date.now(); //const timestamp = Math.floor(now / 1000);