Skip to content

Commit

Permalink
更新_worker.js,添加对base64订阅格式的支持,并修改请求配置以忽略SSL证书验证
Browse files Browse the repository at this point in the history
  • Loading branch information
cmliu committed Feb 19, 2025
1 parent bce3403 commit 58df04e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export default {
let req_data = MainData;

let 追加UA = 'v2rayn';
if (url.searchParams.has('clash')) 追加UA = 'clash';
if (url.searchParams.has('b64') || url.searchParams.has('base64')) 订阅格式 = 'base64';
else if (url.searchParams.has('clash')) 追加UA = 'clash';
else if (url.searchParams.has('singbox')) 追加UA = 'singbox';
else if (url.searchParams.has('surge')) 追加UA = 'surge';
else if (url.searchParams.has('quanx')) 追加UA = 'Quantumult%20X';
Expand Down Expand Up @@ -464,7 +465,15 @@ async function getUrl(request, targetUrl, 追加UA, userAgentHeader) {
method: request.method,
headers: newHeaders,
body: request.method === "GET" ? null : request.body,
redirect: "follow"
redirect: "follow",
cf: {
// 忽略SSL证书验证
insecureSkipVerify: true,
// 允许自签名证书
allowUntrusted: true,
// 禁用证书验证
validateCertificate: false
}
});

// 输出请求的详细信息
Expand Down

0 comments on commit 58df04e

Please sign in to comment.