mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-24 17:18:25 +08:00
fix: 修改优选订阅生成逻辑,确保仅将HTTPS链接添加到优选API列表
This commit is contained in:
@@ -224,7 +224,7 @@ export default {
|
|||||||
const 完整优选列表 = config_JSON.优选订阅生成.本地IP库.随机IP ? (await 生成随机IP(request, config_JSON.优选订阅生成.本地IP库.随机数量))[0] : await env.KV.get('ADD.txt') ? await 整理成数组(await env.KV.get('ADD.txt')) : (await 生成随机IP(request, config_JSON.优选订阅生成.本地IP库.随机数量))[0];
|
const 完整优选列表 = config_JSON.优选订阅生成.本地IP库.随机IP ? (await 生成随机IP(request, config_JSON.优选订阅生成.本地IP库.随机数量))[0] : await env.KV.get('ADD.txt') ? await 整理成数组(await env.KV.get('ADD.txt')) : (await 生成随机IP(request, config_JSON.优选订阅生成.本地IP库.随机数量))[0];
|
||||||
const 优选API = [], 优选IP = [], 其他节点 = [];
|
const 优选API = [], 优选IP = [], 其他节点 = [];
|
||||||
for (const 元素 of 完整优选列表) {
|
for (const 元素 of 完整优选列表) {
|
||||||
if (元素.toLowerCase().startsWith('https://') || 元素.toLowerCase().startsWith('http://')) 优选API.push(元素);
|
if (元素.toLowerCase().startsWith('https://')) 优选API.push(元素);
|
||||||
else if (元素.toLowerCase().includes('://')) 其他节点.push(元素);
|
else if (元素.toLowerCase().includes('://')) 其他节点.push(元素);
|
||||||
else 优选IP.push(元素);
|
else 优选IP.push(元素);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user