diff --git a/app/ui/plugins/global.tsx b/app/ui/plugins/global.tsx index 0c27391..3b7dd10 100644 --- a/app/ui/plugins/global.tsx +++ b/app/ui/plugins/global.tsx @@ -317,7 +317,7 @@ const Global: React.FC = () => { { > AUTO(自动,默认) alia(海外-阿里云) - {/* bda */} bda2(大陆-百度云) bldsa(大陆-B站自建) - qn(全球-七牛) tx(大陆-腾讯云) txa(海外-腾讯云) + estx(大陆-B站自建) + akbd(大陆-B站自建) {self._auto_os['os']}: {self._auto_os['query']}. time: {self._auto_os.get('cost')}") @@ -457,10 +457,10 @@ class BiliBili: logger.debug(f"preupload: {ret}") if preferred_upos_cdn: original_endpoint: str = ret['endpoint'] - if re.match(r'//upos-(sz|cs)-upcdn(bda2|ws|qn)\.bilivideo\.com', original_endpoint): - if re.match(r'bda2|qn|ws', preferred_upos_cdn): + if re.match(r'//upos-(sz|cs)-upcdnbda2\.bilivideo\.com', original_endpoint): + if re.match(r'bda2', preferred_upos_cdn): logger.debug(f"Preferred UpOS CDN: {preferred_upos_cdn}") - new_endpoint = re.sub(r'upcdn(bda2|qn|ws)', f'upcdn{preferred_upos_cdn}', original_endpoint) + new_endpoint = re.sub(r'upcdnbda2', f'upcdn{preferred_upos_cdn}', original_endpoint) logger.debug(f"{original_endpoint} => {new_endpoint}") ret['endpoint'] = new_endpoint else: diff --git a/biliup/plugins/bili_webup_sync.py b/biliup/plugins/bili_webup_sync.py index 01d851d..bfcd6a6 100644 --- a/biliup/plugins/bili_webup_sync.py +++ b/biliup/plugins/bili_webup_sync.py @@ -374,11 +374,25 @@ class BiliBili: logger.info(f"{file_name} 开始上传") if self.save_dir: self.save_path = os.path.join(self.save_dir, file_name) - cs_upcdn = ['alia', 'bda', 'bda2', 'bldsa', 'qn', 'tx', 'txa'] + cs_upcdn = ['alia', 'bda2', 'bldsa', 'tx', 'txa'] jd_upcdn = ['jd-alia', 'jd-bd', 'jd-bldsa', 'jd-tx', 'jd-txa'] + special_upcdn = { + 'estx': { + "os": "upos", + "query": "probe_version=20250923&upcdn=estx&zone=cs", + "probe_url": "//e17962d5cstx.esheep.com/OK", + }, + 'akbd': { + "os": "upos", + "query": "probe_version=20250923&upcdn=akbd&zone=cs", + "probe_url": "//bb27c891csbd.aikobo.cn/OK", + }, + } preferred_upos_cdn = None if not self._auto_os: - if lines in cs_upcdn: + if lines in special_upcdn: + self._auto_os = special_upcdn[lines] + elif lines in cs_upcdn: self._auto_os = {"os": "upos", "query": f"upcdn={lines}&probe_version=20221109", "probe_url": f"//upos-cs-upcdn{lines}.bilivideo.com/OK"} preferred_upos_cdn = lines diff --git a/crates/biliup-cli/src/lib.rs b/crates/biliup-cli/src/lib.rs index 4ceb904..e25954d 100644 --- a/crates/biliup-cli/src/lib.rs +++ b/crates/biliup-cli/src/lib.rs @@ -313,7 +313,8 @@ pub enum UploadLine { Cntx, Antx, Attx, - Bda, Txa, Alia, + Estx, + Akbd, } diff --git a/crates/biliup-cli/src/server/common/upload.rs b/crates/biliup-cli/src/server/common/upload.rs index 4824586..101f2bb 100644 --- a/crates/biliup-cli/src/server/common/upload.rs +++ b/crates/biliup-cli/src/server/common/upload.rs @@ -130,11 +130,12 @@ async fn initialize_upload_context( async fn get_upload_line(client: &reqwest::Client, line: &str) -> AppResult { let line = match line { "bda2" => line::bda2(), - "bda" => line::bda(), "tx" => line::tx(), "txa" => line::txa(), "bldsa" => line::bldsa(), "alia" => line::alia(), + "estx" => line::estx(), + "akbd" => line::akbd(), _ => Probe::probe(client).await.unwrap_or_default(), }; Ok(line) @@ -382,9 +383,10 @@ pub async fn upload( Some(UploadLine::Cntx) => line::cntx(), Some(UploadLine::Antx) => line::antx(), Some(UploadLine::Attx) => line::attx(), - // Some(UploadLine::Bda) => line::bda(), Some(UploadLine::Txa) => line::txa(), Some(UploadLine::Alia) => line::alia(), + Some(UploadLine::Estx) => line::estx(), + Some(UploadLine::Akbd) => line::akbd(), _ => Probe::probe(&client.client).await.unwrap_or_default(), }; for video_path in video_paths { diff --git a/crates/biliup-cli/src/server/config.rs b/crates/biliup-cli/src/server/config.rs index 8bce724..bcb6e6c 100644 --- a/crates/biliup-cli/src/server/config.rs +++ b/crates/biliup-cli/src/server/config.rs @@ -46,7 +46,7 @@ pub struct Config { #[serde(default)] pub submit_api: Option, - /// 上传线路:AUTO | alia | bda2 | bldsa | qn | tx | txa + /// 上传线路:AUTO | alia | bda2 | bldsa | tx | txa | estx | akbd #[builder(default = default_lines())] #[serde(default = "default_lines")] pub lines: String, diff --git a/crates/biliup-cli/src/uploader.rs b/crates/biliup-cli/src/uploader.rs index 9b5db45..7e79add 100644 --- a/crates/biliup-cli/src/uploader.rs +++ b/crates/biliup-cli/src/uploader.rs @@ -440,9 +440,10 @@ pub async fn upload( Some(UploadLine::Cntx) => line::cntx(), Some(UploadLine::Antx) => line::antx(), Some(UploadLine::Attx) => line::attx(), - // Some(UploadLine::Bda) => line::bda(), Some(UploadLine::Txa) => line::txa(), Some(UploadLine::Alia) => line::alia(), + Some(UploadLine::Estx) => line::estx(), + Some(UploadLine::Akbd) => line::akbd(), _ => Probe::probe(&client.client).await.unwrap_or_default(), }; // let line = line::kodo(); diff --git a/crates/biliup/src/uploader/line.rs b/crates/biliup/src/uploader/line.rs index 9850a43..6a83b29 100644 --- a/crates/biliup/src/uploader/line.rs +++ b/crates/biliup/src/uploader/line.rs @@ -323,16 +323,6 @@ pub fn attx() -> Line { } } -/// 百度云海外(Cloudflare) -pub fn bda() -> Line { - Line { - os: Uploader::Upos, - query: "zone=cs&upcdn=bda&probe_version=20221109".into(), - probe_url: "//upos-cs-upcdnbda.bilivideo.com/OK".into(), - cost: 0, - } -} - /// 腾讯云EO海外 pub fn txa() -> Line { Line { @@ -352,3 +342,23 @@ pub fn alia() -> Line { cost: 0, } } + +/// B站自建 +pub fn estx() -> Line { + Line { + os: Uploader::Upos, + query: "probe_version=20250923&upcdn=estx&zone=cs".into(), + probe_url: "//e17962d5cstx.esheep.com/OK".into(), + cost: 0, + } +} + +/// B站自建 +pub fn akbd() -> Line { + Line { + os: Uploader::Upos, + query: "probe_version=20250923&upcdn=akbd&zone=cs".into(), + probe_url: "//bb27c891csbd.aikobo.cn/OK".into(), + cost: 0, + } +} diff --git a/crates/stream-gears/src/uploader.rs b/crates/stream-gears/src/uploader.rs index dd648db..df5c717 100644 --- a/crates/stream-gears/src/uploader.rs +++ b/crates/stream-gears/src/uploader.rs @@ -25,9 +25,10 @@ pub enum UploadLine { Cntx, Antx, Attx, - Bda, Txa, Alia, + Estx, + Akbd, } impl From for biliup_cli::UploadLine { @@ -47,9 +48,10 @@ impl From for biliup_cli::UploadLine { P::Cntx => C::Cntx, P::Antx => C::Antx, P::Attx => C::Attx, - P::Bda => C::Bda, P::Txa => C::Txa, P::Alia => C::Alia, + P::Estx => C::Estx, + P::Akbd => C::Akbd, } } } diff --git a/crates/stream-gears/stream_gears/stream_gears.pyi b/crates/stream-gears/stream_gears/stream_gears.pyi index bc7630e..ef1b63f 100644 --- a/crates/stream-gears/stream_gears/stream_gears.pyi +++ b/crates/stream-gears/stream_gears/stream_gears.pyi @@ -116,12 +116,6 @@ class UploadLine(Enum): Bda2 = 1 """百度云""" - Qn = 2 - """七牛""" - - Bda = 3 - """百度云海外""" - Tx = 4 """腾讯云EO""" @@ -134,6 +128,13 @@ class UploadLine(Enum): Alia = 7 """阿里云海外""" + Estx = 8 + """B站自建""" + + Akbd = 9 + """B站自建""" + + def upload(video_path: List[str], cookie_file: str, diff --git a/public/config.toml b/public/config.toml index cb42214..1f3935c 100644 --- a/public/config.toml +++ b/public/config.toml @@ -24,7 +24,7 @@ filtering_threshold = 20 #submit_api = "client" ### 选择全局默认上传插件,Noop为不上传,但会执行后处理,可选bili_web,biliup-rs(默认值) #uploader = "Noop" -### b站上传线路选择,默认自动选择最优线路。目前可手动切换为alia(海外), bda2(大陆), bldsa(大陆), qn(全球), tx(大陆), txa(海外) +### b站上传线路选择,默认自动选择最优线路。目前可手动切换为alia(海外), bda2(大陆), bldsa(大陆), tx(大陆), txa(海外), estx(大陆), akbd(大陆) lines = "AUTO" ### 单文件并发上传数,未达到带宽上限时,增大此值可提高上传速度(不要设置过大,部分线路限制为8,如速度不佳优先调整上传线路) threads = 3 diff --git a/public/config.yaml b/public/config.yaml index 768bffd..73832fa 100644 --- a/public/config.yaml +++ b/public/config.yaml @@ -24,7 +24,7 @@ filtering_threshold: 20 #uploader: Noop ### b站提交接口,默认自动选择,可选web,client #submit_api: client -### b站上传线路选择,默认自动选择最优线路。目前可手动切换为alia(海外), bda2(大陆), bldsa(大陆), qn(全球), tx(大陆), txa(海外) +### b站上传线路选择,默认自动选择最优线路。目前可手动切换为alia(海外), bda2(大陆), bldsa(大陆), tx(大陆), txa(海外), estx(大陆), akbd(大陆) lines: AUTO ### 单文件并发上传数,未达到带宽上限时,增大此值可提高上传速度(不要设置过大,部分线路限制为8,如速度不佳优先调整上传线路) threads: 3