Skip to content

Commit

Permalink
feat: Host.MCDN
Browse files Browse the repository at this point in the history
Update BiliBili.Redirect.json
  • Loading branch information
VirgilClyne committed May 8, 2024
1 parent 771e351 commit 8f13c01
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 18 deletions.
7 changes: 4 additions & 3 deletions js/BiliBili.Redirect.request.beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ var Settings = {
Host: {
Akamaized: "upos-sz-mirrorali.bilivideo.com",
BStar: "upos-sz-mirrorali.bilivideo.com",
PCDN: "upos-sz-mirrorali.bilivideo.com"
PCDN: "upos-sz-mirrorali.bilivideo.com",
MCDN: "proxy-tf-all-ws.bilivideo.com"
}
};
var BiliBili_Redirect = {
Expand Down Expand Up @@ -852,7 +853,7 @@ function setENV(name, platforms, database) {
return { Settings, Caches, Configs };
}

const $ = new ENV("📺 BiliBili: 🔀 Redirect v0.2.2(1014) request.beta");
const $ = new ENV("📺 BiliBili: 🔀 Redirect v0.2.3(1015) request.beta");

// 构造回复数据
let $response = undefined;
Expand Down Expand Up @@ -984,7 +985,7 @@ $.log(`⚠ FORMAT: ${FORMAT}`, "");
case "8082": // MCDN
case "9102": // MCDN
url.protocol = "https";
url.hostname = "proxy-tf-all-ws.bilivideo.com";
url.hostname = Settings.Host.MCDN;
url.port = "";
url.pathname = "";
url.searchParams.set("url", $request.url);
Expand Down
2 changes: 1 addition & 1 deletion js/BiliBili.Redirect.request.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion js/BiliBili.Redirect.response.beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ var Settings = {
Host: {
Akamaized: "upos-sz-mirrorali.bilivideo.com",
BStar: "upos-sz-mirrorali.bilivideo.com",
PCDN: "upos-sz-mirrorali.bilivideo.com"
PCDN: "upos-sz-mirrorali.bilivideo.com",
MCDN: "proxy-tf-all-ws.bilivideo.com"
}
};
var BiliBili_Redirect = {
Expand Down
8 changes: 4 additions & 4 deletions modules/BiliBili.Redirect.beta.sgmodule
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#!manual=https://manual.biliuniverse.io
#!icon=https://github.com/BiliUniverse/Redirect/raw/main/src/assets/icon_rounded_108x.png
#!category=📺 BiliUniverse
#!arguments=Host.Akamaized:upos-sz-mirrorali.bilivideo.com,Host.BStar:upos-sz-mirrorali.bilivideo.com,Host.PCDN:upos-sz-mirrorali.bilivideo.com
#!arguments-desc=Host.Akamaized: 重定向港澳台 CDN 主机名\nHost.BStar: 重定向国际版 CDN 主机名\nHost.PCDN: 重定向 PCDN 主机名
#!arguments=Host.Akamaized:upos-sz-mirrorali.bilivideo.com,Host.BStar:upos-sz-mirrorali.bilivideo.com,Host.PCDN:upos-sz-mirrorali.bilivideo.com,Host.MCDN:proxy-tf-all-ws.bilivideo.com
#!arguments-desc=Host.Akamaized: 重定向港澳台 CDN 主机名\nHost.BStar: 重定向国际版 CDN 主机名\nHost.PCDN: 重定向 PCDN 主机名\nHost.MCDN: 重定向 MCDN 主机名

[General]
# > TCP Force HTTP Hosts
Expand All @@ -17,8 +17,8 @@ force-http-engine-hosts = %APPEND% *.mcdn.bilivideo.cn:486, *:4480, *.mcdn.biliv
[Script]
BiliBili.Redirect.CDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/.+\.bilivideo\.com\/upgcxcode\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=
BiliBili.Redirect.MCDN.live-bvc.m4s = type=http-request, pattern=^https?:\/\/[xy0-9]+\.mcdn\.bilivideo\.cn:486\/live-bvc\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=
BiliBili.Redirect.MCDN.v1.resource.m4s = type=http-request, pattern=^https?:\/\/(.+):(8000|8082)\/v1\/resource\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=
BiliBili.Redirect.MCDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/[xy0-9]+\.mcdn\.bilivideo\.cn:(4483|9102)\/upgcxcode\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=
BiliBili.Redirect.MCDN.v1.resource.m4s = type=http-request, pattern=^https?:\/\/(.+):(8000|8082)\/v1\/resource\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=Host.MCDN={{{Host.MCDN}}}
BiliBili.Redirect.MCDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/[xy0-9]+\.mcdn\.bilivideo\.cn:(4483|9102)\/upgcxcode\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=Host.MCDN={{{Host.MCDN}}}
BiliBili.Redirect.PCDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/(.+):4480\/upgcxcode\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=Host.PCDN={{{Host.PCDN}}}
BiliBili.Redirect.PCDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/(.+)\.v1d\.szbdyd\.com:9305\/([^/]+)\/upgcxcode\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=Host.PCDN={{{Host.PCDN}}}
BiliBili.Redirect.Akamaized.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/upos-(hz|bstar1)-mirrorakam\.akamaized\.net\/upgcxcode\/, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/beta/js/BiliBili.Redirect.request.beta.js, argument=Host.Akamaized={{{Host.Akamaized}}}
Expand Down
8 changes: 4 additions & 4 deletions modules/BiliBili.Redirect.sgmodule
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#!manual=https://manual.biliuniverse.io
#!icon=https://github.com/BiliUniverse/Redirect/raw/main/src/assets/icon_rounded_108x.png
#!category=📺 BiliUniverse
#!arguments=Host.Akamaized:upos-sz-mirrorali.bilivideo.com,Host.BStar:upos-sz-mirrorali.bilivideo.com,Host.PCDN:upos-sz-mirrorali.bilivideo.com
#!arguments-desc=Host.Akamaized: 重定向港澳台 CDN 主机名\nHost.BStar: 重定向国际版 CDN 主机名\nHost.PCDN: 重定向 PCDN 主机名
#!arguments=Host.Akamaized:upos-sz-mirrorali.bilivideo.com,Host.BStar:upos-sz-mirrorali.bilivideo.com,Host.PCDN:upos-sz-mirrorali.bilivideo.com,Host.MCDN:proxy-tf-all-ws.bilivideo.com
#!arguments-desc=Host.Akamaized: 重定向港澳台 CDN 主机名\nHost.BStar: 重定向国际版 CDN 主机名\nHost.PCDN: 重定向 PCDN 主机名\nHost.MCDN: 重定向 MCDN 主机名

[General]
# > TCP Force HTTP Hosts
Expand All @@ -16,8 +16,8 @@ force-http-engine-hosts = %APPEND% *:4480, *.mcdn.bilivideo.cn:4483, *:8000, *:8

[Script]
BiliBili.Redirect.CDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/.+\.bilivideo\.com\/upgcxcode\/, engine=webview, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/main/js/BiliBili.Redirect.request.js, argument=
BiliBili.Redirect.MCDN.v1.resource.m4s = type=http-request, pattern=^https?:\/\/(.+):(8000|8082)\/v1\/resource\/, engine=webview, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/main/js/BiliBili.Redirect.request.js, argument=
BiliBili.Redirect.MCDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/[xy0-9]+\.mcdn\.bilivideo\.(cn|com):(4483|9102)\/upgcxcode\/, engine=webview, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/main/js/BiliBili.Redirect.request.js, argument=
BiliBili.Redirect.MCDN.v1.resource.m4s = type=http-request, pattern=^https?:\/\/(.+):(8000|8082)\/v1\/resource\/, engine=webview, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/main/js/BiliBili.Redirect.request.js, argument=Host.MCDN={{{Host.MCDN}}}
BiliBili.Redirect.MCDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/[xy0-9]+\.mcdn\.bilivideo\.(cn|com):(4483|9102)\/upgcxcode\/, engine=webview, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/main/js/BiliBili.Redirect.request.js, argument=Host.MCDN={{{Host.MCDN}}}
BiliBili.Redirect.PCDN.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/(.+):4480\/upgcxcode\/, engine=webview, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/main/js/BiliBili.Redirect.request.js, argument=Host.PCDN={{{Host.PCDN}}}
BiliBili.Redirect.Akamaized.upgcxcode.m4s = type=http-request, pattern=^https?:\/\/upos-(hz|bstar1)-mirrorakam\.akamaized\.net/upgcxcode\/, engine=webview, script-path=https://raw.githubusercontent.com/BiliUniverse/Redirect/main/js/BiliBili.Redirect.request.js, argument=Host.Akamaized={{{Host.Akamaized}}}

Expand Down
4 changes: 2 additions & 2 deletions src/BiliBili.Redirect.request.beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ENV from "./ENV/ENV.mjs";
import Database from "./database/BiliBili.mjs";
import setENV from "./function/setENV.mjs";

const $ = new ENV("📺 BiliBili: 🔀 Redirect v0.2.2(1014) request.beta");
const $ = new ENV("📺 BiliBili: 🔀 Redirect v0.2.3(1015) request.beta");

// 构造回复数据
let $response = undefined;
Expand Down Expand Up @@ -151,7 +151,7 @@ $.log(`⚠ FORMAT: ${FORMAT}`, "");
case "8082": // MCDN
case "9102": // MCDN
url.protocol = "https";
url.hostname = "proxy-tf-all-ws.bilivideo.com"
url.hostname = Settings.Host.MCDN;
url.port = "";
url.pathname = "";
url.searchParams.set("url", $request.url);
Expand Down
4 changes: 2 additions & 2 deletions src/BiliBili.Redirect.request.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ENV from "./ENV/ENV.mjs";
import Database from "./database/BiliBili.mjs";
import setENV from "./function/setENV.mjs";

const $ = new ENV("📺 BiliBili: 🔀 Redirect v0.2.2(1014) request");
const $ = new ENV("📺 BiliBili: 🔀 Redirect v0.2.3(1015) request");

// 构造回复数据
let $response = undefined;
Expand Down Expand Up @@ -151,7 +151,7 @@ const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["conten
case "8082": // MCDN
case "9102": // MCDN
url.protocol = "https";
url.hostname = "proxy-tf-all-ws.bilivideo.com"
url.hostname = Settings.Host.MCDN;
url.port = "";
url.pathname = "";
url.searchParams.set("url", $request.url);
Expand Down
3 changes: 2 additions & 1 deletion src/database/BiliBili.Redirect.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"Host": {
"Akamaized": "upos-sz-mirrorali.bilivideo.com",
"BStar": "upos-sz-mirrorali.bilivideo.com",
"PCDN": "upos-sz-mirrorali.bilivideo.com"
"PCDN": "upos-sz-mirrorali.bilivideo.com",
"MCDN": "proxy-tf-all-ws.bilivideo.com"
}
}
}

0 comments on commit 8f13c01

Please sign in to comment.