Skip to content

Commit

Permalink
更新_worker.js,修改User-Agent格式以提高机场订阅兼容性
Browse files Browse the repository at this point in the history
  • Loading branch information
cmliu committed Jan 22, 2025
1 parent fb9f392 commit 8a5701b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ async function getSUB(api, request, 追加UA, userAgentHeader) {
async function getUrl(request, targetUrl, 追加UA, userAgentHeader) {
// 设置自定义 User-Agent
const newHeaders = new Headers(request.headers);
newHeaders.set("User-Agent", `v2rayN/${追加UA} cmliu/CF-Workers-SUB ${userAgentHeader}`);
newHeaders.set("User-Agent", `v2rayN/6.45 cmliu/CF-Workers-SUB ${追加UA}(${userAgentHeader})`);

// 构建新的请求对象
const modifiedRequest = new Request(targetUrl, {
Expand Down

0 comments on commit 8a5701b

Please sign in to comment.