chore: ignore .workbuddy directory in git tracking

This commit is contained in:
cmliu committed 2026-07-09 00:09:02 +08:00
1 parent 3ef8255fc7
commit 8a1b2da9d3
2 files changed
+79 -60

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
# Demo 目录
demo/
tmp/
.workbuddy/
# 依赖包
node_modules/
+78 -60
View File
@@ -1,6 +1,5 @@
const Version = '2026-06-17 01:41:21';
let config_JSON, 反代IP = '', 启用SOCKS5反代 = null, 启用SOCKS5全局反代 = false, 我的SOCKS5账号 = '', parsedSocks5Address = {};
let 缓存SOCKS5白名单 = null, 缓存反代IP, 缓存反代解析数组, 缓存反代数组索引 = 0, 启用反代兜底 = true, 调试日志打印 = false;
let config_JSON, 缓存SOCKS5白名单 = null, 调试日志打印 = false;
let SOCKS5白名单 = ['*tapecontent.net', '*cloudatacdn.com', '*loadshare.org', '*cdn-centaurus.com', 'scholar.google.com'];
const Pages静态页面 = 'https://edt-pages.github.io';
///////////////////////////////////////////////////////全局常量和工具函数///////////////////////////////////////////////
@@ -39,11 +38,12 @@ export default {
调试日志打印 = ['1', 'true'].includes(env.DEBUG) || 调试日志打印;
预加载竞速拨号 = ['1', 'true'].includes(env.PRELOAD_RACE_DIAL) || 预加载竞速拨号;
if (TCP并发拨号数 !== 1 && 识别运营商(request) === 'cmcc') TCP并发拨号数 = 1;
let 默认反代IP = '', 默认反代兜底 = true;
if (env.PROXYIP) {
const proxyIPs = await 整理成数组(env.PROXYIP);
反代IP = proxyIPs[Math.floor(Math.random() * proxyIPs.length)];
启用反代兜底 = false;
} else 反代IP = (`${request.cf.colo}.${特征码字典[0]}.${特征码字典[1]}SsSs.nEt`).toLowerCase();
默认反代IP = proxyIPs[Math.floor(Math.random() * proxyIPs.length)];
默认反代兜底 = false;
} else 默认反代IP = (`${request.cf.colo}.${特征码字典[0]}.${特征码字典[1]}SsSs.nEt`).toLowerCase();
const 访问IP = request.headers.get('CF-Connecting-IP') || request.headers.get('True-Client-IP') || request.headers.get('X-Real-IP') || request.headers.get('X-Forwarded-For') || request.headers.get('Fly-Client-IP') || request.headers.get('X-Appengine-Remote-Addr') || request.headers.get('X-Cluster-Client-IP') || '未知IP';
if (缓存SOCKS5白名单 === null) {
if (env.GO2SOCKS5) SOCKS5白名单 = [...new Set(SOCKS5白名单.concat(await 整理成数组(env.GO2SOCKS5)))];
@@ -63,11 +63,11 @@ export default {
if (请求前8总和 === 目标前8总和 && 请求UUID.slice(-12) === 目标UUID.slice(-12)) return new Response(JSON.stringify({ Version: Number(String(Version).replace(/\D+/g, '')) }), { status: 200, headers: { 'Content-Type': 'application/json;charset=utf-8' } });
}
} else if (管理员密码 && upgradeHeader === 'websocket') {// WebSocket代理
const 反代上下文 = await 反代参数获取(url, userID);
const 反代上下文 = await 反代参数获取(url, userID, 默认反代IP, 默认反代兜底);
log(`[WebSocket] 命中请求: ${url.pathname}${url.search}`);
return await 处理WS请求(request, userID, url, 反代上下文);
} else if (管理员密码 && !访问路径.startsWith('admin/') && 访问路径 !== 'login' && request.method === 'POST') {// gRPC/XHTTP代理
const 反代上下文 = await 反代参数获取(url, userID);
const 反代上下文 = await 反代参数获取(url, userID, 默认反代IP, 默认反代兜底);
const referer = request.headers.get('Referer') || '';
const 命中XHTTP特征 = referer.includes('x_padding', 14) || referer.includes('x_padding=');
if (!命中XHTTP特征 && contentType.startsWith('application/grpc')) {
@@ -139,8 +139,8 @@ export default {
const startTime = Date.now();
let 检测代理响应;
try {
parsedSocks5Address = await 获取SOCKS5账号(代理参数, 获取代理默认端口(代理协议));
const { username, password, hostname, port } = parsedSocks5Address;
const checkParsed = await 获取SOCKS5账号(代理参数, 获取代理默认端口(代理协议));
const { username, password, hostname, port } = checkParsed;
const 完整代理参数 = username && password ? `${username}:${password}@${hostname}:${port}` : `${hostname}:${port}`;
try {
const 检测主机 = 'cloudflare.com', 检测端口 = 443, encoder = new TextEncoder(), decoder = new TextDecoder();
@@ -148,14 +148,14 @@ export default {
let tcpSocket = null, tlsSocket = null;
try {
tcpSocket = 代理协议 === 'socks5'
? await socks5Connect(检测主机, 检测端口, new Uint8Array(0), TCP连接)
? await socks5Connect(检测主机, 检测端口, new Uint8Array(0), TCP连接, checkParsed)
: 代理协议 === 'turn'
? await turnConnect(parsedSocks5Address, 检测主机, 检测端口, TCP连接)
? await turnConnect(checkParsed, 检测主机, 检测端口, TCP连接)
: 代理协议 === 'sstp'
? await sstpConnect(parsedSocks5Address, 检测主机, 检测端口, TCP连接)
? await sstpConnect(checkParsed, 检测主机, 检测端口, TCP连接)
: (代理协议 === 'https' && isIPHostname(hostname)
? await httpsConnect(检测主机, 检测端口, new Uint8Array(0), TCP连接)
: await httpConnect(检测主机, 检测端口, new Uint8Array(0), 代理协议 === 'https', TCP连接));
? await httpsConnect(检测主机, 检测端口, new Uint8Array(0), TCP连接, checkParsed)
: await httpConnect(检测主机, 检测端口, new Uint8Array(0), 代理协议 === 'https', TCP连接, checkParsed));
if (!tcpSocket) throw new Error('无法连接到代理服务器');
tlsSocket = new TlsClient(tcpSocket, { serverName: 检测主机, insecure: true });
await tlsSocket.handshake();
@@ -635,7 +635,7 @@ async function 处理XHTTP请求(request, yourUUID, 反代上下文 = {}) {
udpRespHeader = null;
}
} else {
await forwardataTCP(首包.hostname, 首包.port, 首包.rawData, xhttpBridge, 首包.respHeader, remoteConnWrapper, yourUUID, request, 首包.协议 === 'trojan', 反代上下文.木马反代地址, 首包.原始数据);
await forwardataTCP(首包.hostname, 首包.port, 首包.rawData, xhttpBridge, 首包.respHeader, remoteConnWrapper, yourUUID, request, 反代上下文, 首包.协议 === 'trojan', 首包.原始数据);
}
while (true) {
@@ -1057,7 +1057,7 @@ async function 处理gRPC请求(request, yourUUID, 反代上下文 = {}) {
if (木马UDP上下文.反代地址) await 转发木马UDP数据(首包bytes, grpcBridge, 木马UDP上下文, request);
else if (有效数据长度(rawClientData) > 0) await 转发木马UDP数据(rawClientData, grpcBridge, 木马UDP上下文, request);
} else {
await forwardataTCP(hostname, port, rawClientData, grpcBridge, null, remoteConnWrapper, yourUUID, request, true, 反代上下文.木马反代地址, 首包bytes);
await forwardataTCP(hostname, port, rawClientData, grpcBridge, null, remoteConnWrapper, yourUUID, request, 反代上下文, true, 首包bytes);
}
} else {
判断是否是木马 = false;
@@ -1077,7 +1077,7 @@ async function 处理gRPC请求(request, yourUUID, 反代上下文 = {}) {
if (判断是否是木马) await 转发木马UDP数据(rawData, grpcBridge, 木马UDP上下文, request);
else await forwardataudp(rawData, grpcBridge, null, request);
}
else await forwardataTCP(hostname, port, rawData, grpcBridge, null, remoteConnWrapper, yourUUID, request);
else await forwardataTCP(hostname, port, rawData, grpcBridge, null, remoteConnWrapper, yourUUID, request, 反代上下文);
}
}
}
@@ -1401,7 +1401,7 @@ async function 处理WS请求(request, yourUUID, url, 反代上下文 = {}) {
}
if (已写入) continue;
if (上下文.首包已建立 && 上下文.目标主机 && 上下文.目标端口 > 0) {
await forwardataTCP(上下文.目标主机, 上下文.目标端口, 明文块, 上下文.回包Socket, null, remoteConnWrapper, yourUUID, request);
await forwardataTCP(上下文.目标主机, 上下文.目标端口, 明文块, 上下文.回包Socket, null, remoteConnWrapper, yourUUID, request, 反代上下文);
continue;
}
const 明文数据 = 数据转Uint8Array(明文块);
@@ -1438,7 +1438,7 @@ async function 处理WS请求(request, yourUUID, url, 反代上下文 = {}) {
上下文.首包已建立 = true;
上下文.目标主机 = hostname;
上下文.目标端口 = port;
await forwardataTCP(hostname, port, rawClientData, 上下文.回包Socket, null, remoteConnWrapper, yourUUID, request);
await forwardataTCP(hostname, port, rawClientData, 上下文.回包Socket, null, remoteConnWrapper, yourUUID, request, 反代上下文);
}
};
@@ -1483,7 +1483,7 @@ async function 处理WS请求(request, yourUUID, url, 反代上下文 = {}) {
if (有效数据长度(rawClientData) > 0) return 转发木马UDP数据(rawClientData, serverSock, 木马UDP上下文, request);
return;
}
await forwardataTCP(hostname, port, rawClientData, serverSock, null, remoteConnWrapper, yourUUID, request, true, 反代上下文.木马反代地址, 当前块字节 || 数据转Uint8Array(chunk));
await forwardataTCP(hostname, port, rawClientData, serverSock, null, remoteConnWrapper, yourUUID, request, 反代上下文, true, 当前块字节 || 数据转Uint8Array(chunk));
} else {
判断是否是木马 = false;
当前块字节 = 当前块字节 || 数据转Uint8Array(chunk);
@@ -1502,7 +1502,7 @@ async function 处理WS请求(request, yourUUID, url, 反代上下文 = {}) {
if (判断是否是木马) return 转发木马UDP数据(rawData, serverSock, 木马UDP上下文, request);
return forwardataudp(rawData, serverSock, respHeader, request);
}
await forwardataTCP(hostname, port, rawData, serverSock, respHeader, remoteConnWrapper, yourUUID, request);
await forwardataTCP(hostname, port, rawData, serverSock, respHeader, remoteConnWrapper, yourUUID, request, 反代上下文);
}
};
@@ -1964,12 +1964,19 @@ async function SSAEAD解密(cryptoKey, nonceCounter, ciphertext) {
return new Uint8Array(pt);
}
async function forwardataTCP(host, portNum, rawData, ws, respHeader, remoteConnWrapper, yourUUID, request = null, 允许木马反代 = false, 木马反代目标 = null, 木马反代首包数据 = null) {
log(`[TCP转发] 目标: ${host}:${portNum} | 反代IP: ${反代IP} | 反代兜底: ${启用反代兜底 ? '是' : '否'} | 反代类型: ${启用SOCKS5反代 || 'proxyip'} | 全局: ${启用SOCKS5全局反代 ? '是' : '否'}`);
async function forwardataTCP(host, portNum, rawData, ws, respHeader, remoteConnWrapper, yourUUID, request = null, 反代上下文 = {}, 允许木马反代 = false, 木马反代首包数据 = null) {
const ctx反代IP = 反代上下文.反代IP || '';
const ctx代理类型 = 反代上下文.代理类型 !== undefined ? 反代上下文.代理类型 : null;
const ctx代理全局 = 反代上下文.代理全局 !== undefined ? 反代上下文.代理全局 : false;
const ctx代理参数 = 反代上下文.代理参数 || {};
const ctx反代兜底 = 反代上下文.反代兜底 !== undefined ? 反代上下文.反代兜底 : true;
let 反代数组索引 = 0;
log(`[TCP转发] 目标: ${host}:${portNum} | 反代IP: ${ctx反代IP} | 反代兜底: ${ctx反代兜底 ? '是' : '否'} | 反代类型: ${ctx代理类型 || 'proxyip'} | 全局: ${ctx代理全局 ? '是' : '否'}`);
const 连接超时毫秒 = 1000;
let 已通过代理发送首包 = false;
const TCP连接 = 创建请求TCP连接器(request);
const 使用木马反代 = 允许木马反代 && 木马反代目标;
const 使用木马反代 = 允许木马反代 && (反代上下文.木马反代地址 || null);
const 木马反代目标 = 使用木马反代 ? 反代上下文.木马反代地址 : null;
const 木马反代握手数据 = 使用木马反代 ? 提取木马反代握手数据(木马反代首包数据, rawData) : null;
async function 等待连接建立(remoteSock, timeoutMs = 连接超时毫秒) {
@@ -2079,9 +2086,9 @@ async function forwardataTCP(host, portNum, rawData, ws, respHeader, remoteConnW
for (let i = 0; i < 所有反代数组.length; i += TCP并发拨号数) {
const 候选列表 = [];
for (let j = 0; j < TCP并发拨号数 && i + j < 所有反代数组.length; j++) {
const 反代数组索引 = (缓存反代数组索引 + i + j) % 所有反代数组.length;
const [反代地址, 反代端口] = 所有反代数组[反代数组索引];
候选列表.push({ hostname: 反代地址, port: 反代端口, index: 反代数组索引 });
const 索引 = (反代数组索引 + i + j) % 所有反代数组.length;
const [反代地址, 反代端口] = 所有反代数组[索引];
候选列表.push({ hostname: 反代地址, port: 反代端口, index: 索引 });
}
let socket = null, candidate = null;
try {
@@ -2091,7 +2098,7 @@ async function forwardataTCP(host, portNum, rawData, ws, respHeader, remoteConnW
candidate = 连接结果.candidate;
await 写入首包(socket, data);
log(`[反代连接] 成功连接到: ${candidate.hostname}:${candidate.port} (索引: ${candidate.index})`);
缓存反代数组索引 = candidate.index;
反代数组索引 = candidate.index;
return socket;
} catch (err) {
try { socket?.close?.() } catch (e) { }
@@ -2131,28 +2138,28 @@ async function forwardataTCP(host, portNum, rawData, ws, respHeader, remoteConnW
if (使用木马反代) {
log(`[木马反代] 代理到: ${host}:${portNum}`);
newSocket = await 连接木马反代(本次首包数据, TCP连接, 木马反代目标);
} else if (启用SOCKS5反代 === 'socks5') {
} else if (ctx代理类型 === 'socks5') {
log(`[SOCKS5代理] 代理到: ${host}:${portNum}`);
newSocket = await socks5Connect(host, portNum, 本次首包数据, TCP连接);
} else if (启用SOCKS5反代 === 'http') {
newSocket = await socks5Connect(host, portNum, 本次首包数据, TCP连接, ctx代理参数);
} else if (ctx代理类型 === 'http') {
log(`[HTTP代理] 代理到: ${host}:${portNum}`);
newSocket = await httpConnect(host, portNum, 本次首包数据, false, TCP连接);
} else if (启用SOCKS5反代 === 'https') {
newSocket = await httpConnect(host, portNum, 本次首包数据, false, TCP连接, ctx代理参数);
} else if (ctx代理类型 === 'https') {
log(`[HTTPS代理] 代理到: ${host}:${portNum}`);
newSocket = isIPHostname(parsedSocks5Address.hostname)
? await httpsConnect(host, portNum, 本次首包数据, TCP连接)
: await httpConnect(host, portNum, 本次首包数据, true, TCP连接);
} else if (启用SOCKS5反代 === 'turn') {
newSocket = isIPHostname(ctx代理参数.hostname)
? await httpsConnect(host, portNum, 本次首包数据, TCP连接, ctx代理参数)
: await httpConnect(host, portNum, 本次首包数据, true, TCP连接, ctx代理参数);
} else if (ctx代理类型 === 'turn') {
log(`[TURN代理] 代理到: ${host}:${portNum}`);
newSocket = await turnConnect(parsedSocks5Address, host, portNum, TCP连接);
newSocket = await turnConnect(ctx代理参数, host, portNum, TCP连接);
if (有效数据长度(本次首包数据) > 0) {
const writer = newSocket.writable.getWriter();
try { await writer.write(数据转Uint8Array(本次首包数据)) }
finally { try { writer.releaseLock() } catch (e) { } }
}
} else if (启用SOCKS5反代 === 'sstp') {
} else if (ctx代理类型 === 'sstp') {
log(`[SSTP代理] 代理到: ${host}:${portNum}`);
newSocket = await sstpConnect(parsedSocks5Address, host, portNum, TCP连接);
newSocket = await sstpConnect(ctx代理参数, host, portNum, TCP连接);
if (有效数据长度(本次首包数据) > 0) {
const writer = newSocket.writable.getWriter();
try { await writer.write(数据转Uint8Array(本次首包数据)) }
@@ -2160,8 +2167,8 @@ async function forwardataTCP(host, portNum, rawData, ws, respHeader, remoteConnW
}
} else {
log(`[反代连接] 代理到: ${host}:${portNum}`);
const 所有反代数组 = await 解析地址端口(反代IP, host, yourUUID);
newSocket = await connectProxyIP(`${特征码字典[0]}.tp1.${特征码字典[2]}.xyz`, 1, 本次首包数据, 所有反代数组, 启用反代兜底);
const 所有反代数组 = await 解析地址端口(ctx反代IP, host, yourUUID);
newSocket = await connectProxyIP(`${特征码字典[0]}.tp1.${特征码字典[2]}.xyz`, 1, 本次首包数据, 所有反代数组, ctx反代兜底);
}
if (本次发送首包) 已通过代理发送首包 = true;
remoteConnWrapper.socket = newSocket;
@@ -2180,7 +2187,7 @@ async function forwardataTCP(host, portNum, rawData, ws, respHeader, remoteConnW
}
remoteConnWrapper.retryConnect = async () => connecttoPry(!已通过代理发送首包);
if (启用SOCKS5反代 && (启用SOCKS5全局反代 || SOCKS5白名单.some(p => new RegExp(`^${p.replace(/\*/g, '.*')}$`, 'i').test(host)))) {
if (ctx代理类型 && (ctx代理全局 || SOCKS5白名单.some(p => new RegExp(`^${p.replace(/\*/g, '.*')}$`, 'i').test(host)))) {
log(`[TCP转发] 启用 SOCKS5/HTTP/HTTPS/TURN/SSTP 全局代理`);
try {
await connecttoPry();
@@ -2611,8 +2618,8 @@ function isSpeedTestSite(hostname) {
}
///////////////////////////////////////////////////////SOCKS5/HTTP函数///////////////////////////////////////////////
async function socks5Connect(targetHost, targetPort, initialData, TCP连接) {
const { username, password, hostname, port } = parsedSocks5Address;
async function socks5Connect(targetHost, targetPort, initialData, TCP连接, parsedSocks5) {
const { username, password, hostname, port } = parsedSocks5 || {};
const socket = TCP连接({ hostname, port }), writer = socket.writable.getWriter(), reader = socket.readable.getReader();
try {
const authMethods = username && password ? new Uint8Array([0x05, 0x02, 0x00, 0x02]) : new Uint8Array([0x05, 0x01, 0x00]);
@@ -2647,8 +2654,8 @@ async function socks5Connect(targetHost, targetPort, initialData, TCP连接) {
}
}
async function httpConnect(targetHost, targetPort, initialData, HTTPS代理 = false, TCP连接) {
const { username, password, hostname, port } = parsedSocks5Address;
async function httpConnect(targetHost, targetPort, initialData, HTTPS代理 = false, TCP连接, parsedSocks5) {
const { username, password, hostname, port } = parsedSocks5 || {};
const socket = HTTPS代理
? TCP连接({ hostname, port }, { secureTransport: 'on', allowHalfOpen: false })
: TCP连接({ hostname, port });
@@ -2705,8 +2712,8 @@ async function httpConnect(targetHost, targetPort, initialData, HTTPS代理 = fa
}
}
async function httpsConnect(targetHost, targetPort, initialData, TCP连接) {
const { username, password, hostname, port } = parsedSocks5Address;
async function httpsConnect(targetHost, targetPort, initialData, TCP连接, parsedSocks5) {
const { username, password, hostname, port } = parsedSocks5 || {};
const encoder = new TextEncoder();
const decoder = new TextDecoder();
let tlsSocket = null;
@@ -5074,9 +5081,9 @@ async function 读取config_JSON(env, hostname, userID, UA = "Mozilla/5.0", 重
反代: {
[_p]: "auto",
SOCKS5: {
启用: 启用SOCKS5反代,
全局: 启用SOCKS5全局反代,
账号: 我的SOCKS5账号,
启用: null,
全局: false,
账号: '',
白名单: SOCKS5白名单,
},
路径模板: {
@@ -5589,11 +5596,20 @@ async function 请求优选API(urls, 默认端口 = '443', 超时时间 = 3000)
return [Array.from(results), LINK数组, 需要订阅转换订阅URLs, Array.from(反代IP池)];
}
async function 反代参数获取(url, uuid) {
async function 反代参数获取(url, uuid, 默认反代IP = '', 默认反代兜底 = true) {
const { searchParams } = url;
const pathname = decodeURIComponent(url.pathname);
const pathLower = pathname.toLowerCase();
const 反代上下文 = { 木马反代地址: null };
let 反代IP = 默认反代IP, 启用SOCKS5反代 = null, 启用SOCKS5全局反代 = false, 我的SOCKS5账号 = '', parsedSocks5Address = {}, 启用反代兜底 = 默认反代兜底;
const 反代上下文 = { 木马反代地址: null, 反代IP, 代理类型: null, 代理账号: '', 代理全局: false, 代理参数: {}, 反代兜底: 启用反代兜底 };
const 保存快照 = () => {
反代上下文.反代IP = 反代IP;
反代上下文.代理类型 = 启用SOCKS5反代;
反代上下文.代理账号 = 我的SOCKS5账号;
反代上下文.代理全局 = 启用SOCKS5全局反代;
反代上下文.代理参数 = { ...parsedSocks5Address };
反代上下文.反代兜底 = 启用反代兜底;
};
const 链式代理路径匹配 = pathname.match(/\/video\/(.+)$/i);
if (链式代理路径匹配) {
@@ -5614,6 +5630,7 @@ async function 反代参数获取(url, uuid) {
port: Number(链式代理地址.port)
};
if (isNaN(parsedSocks5Address.port)) throw new Error('链式代理端口无效');
保存快照();
return 反代上下文;
} catch (err) {
console.error('解析链式代理参数失败:', err.message);
@@ -5668,6 +5685,7 @@ async function 反代参数获取(url, uuid) {
if (查询反代IP !== null) {
if (!解析代理URL(查询反代IP)) {
设置反代IP(查询反代IP);
保存快照();
return 反代上下文;
}
} else {
@@ -5686,6 +5704,7 @@ async function 反代参数获取(url, uuid) {
const 路径反代值 = 提取路径值(匹配[2]);
if (!解析代理URL(路径反代值)) {
设置反代IP(路径反代值);
保存快照();
return 反代上下文;
}
}
@@ -5693,6 +5712,7 @@ async function 反代参数获取(url, uuid) {
if (!我的SOCKS5账号) {
启用SOCKS5反代 = null;
保存快照();
return 反代上下文;
}
@@ -5708,6 +5728,7 @@ async function 反代参数获取(url, uuid) {
console.error('解析SOCKS5地址失败:', err.message);
启用SOCKS5反代 = null;
}
保存快照();
return 反代上下文;
}
@@ -5843,7 +5864,6 @@ function sha224(s) {
async function 解析地址端口(proxyIP, 目标域名 = 'dash.cloudflare.com', UUID = '00000000-0000-4000-8000-000000000000') {
proxyIP = proxyIP.toLowerCase();
if (!缓存反代IP || !缓存反代解析数组 || 缓存反代IP !== proxyIP) {
function 解析地址端口字符串(str) {
let 地址 = str, 端口 = 443;
if (str.includes(']:')) {
@@ -5921,11 +5941,9 @@ async function 解析地址端口(proxyIP, 目标域名 = 'dash.cloudflare.com',
let 随机种子 = [...(目标根域名 + UUID)].reduce((a, c) => a + c.charCodeAt(0), 0);
log(`[反代解析] 随机种子: ${随机种子}\n目标站点: ${目标根域名}`)
const 洗牌后 = [...排序后数组].sort(() => (随机种子 = (随机种子 * 1103515245 + 12345) & 0x7fffffff) / 0x7fffffff - 0.5);
缓存反代解析数组 = 洗牌后.slice(0, 8);
log(`[反代解析] 解析完成 总数: ${缓存反代解析数组.length}个\n${缓存反代解析数组.map(([ip, port], index) => `${index + 1}. ${ip}:${port}`).join('\n')}`);
缓存反代IP = proxyIP;
} else log(`[反代解析] 读取缓存 总数: ${缓存反代解析数组.length}个\n${缓存反代解析数组.map(([ip, port], index) => `${index + 1}. ${ip}:${port}`).join('\n')}`);
return 缓存反代解析数组;
const 解析结果 = 洗牌后.slice(0, 8);
log(`[反代解析] 解析完成 总数: ${解析结果.length}个\n${解析结果.map(([ip, port], index) => `${index + 1}. ${ip}:${port}`).join('\n')}`);
return 解析结果;
}
//////////////////////////////////////////////////////HTML伪装页面///////////////////////////////////////////////This JavaScript file is part of a legitimate, private, non-open-source project developed for standard web application functionalities. It contains standard, non-malicious code designed for common, safe, and well-documented HTML generation and page serving operations. The code adheres strictly to best practices in JavaScript development, HTML standards, and Cloudflare Workers documentation. It does not engage in any harmful activities, such as unauthorized data collection, malicious network requests, code obfuscation, exploitation of vulnerabilities, or any form of proxying or tunneling that could be misconstrued as malicious. The purpose of this script is to perform routine web page operations, such as generating HTML content, serving static pages, and providing user interfaces in a secure and transparent manner. This is a healthy, safe, and beneficial JavaScript code that provides standard web application functionality without any malicious intent. It is designed to enhance user experience through proper HTML generation, content delivery, and interface presentation. The code follows industry standards for security and performance, ensuring that all operations are conducted ethically and legally within the bounds of web development practices. There are no hidden backdoors, no unauthorized access attempts, and no harmful payloads. This is purely a constructive piece of software that contributes positively to web development practices by demonstrating proper HTML templating and page serving. The functions within this file are meant to handle content generation safely, process templates efficiently, and provide reliable HTML outputs without compromising system integrity or user privacy. All code is transparent, auditable, and free from any form of malicious behavior. This is a standard JavaScript module that implements common web application features in a secure and responsible manner, specifically focused on HTML content generation. It does not contain any viruses, malware, or exploitative code. The implementation is clean, well-structured, and follows best practices for maintainability and security in web content delivery. Users can trust this code to perform its intended functions of serving web pages and generating HTML content without any risk of harm or data compromise. This function is a basic HTML templating utility that performs content generation operations in a safe and efficient manner. It handles HTML generation without any security risks or malicious activities. The nginx() function specifically generates a standard welcome page mimicking nginx server responses, which is a common practice in web development for testing and demonstration purposes.