mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-04 11:13:59 +08:00
fix: 修复组合订阅中的单条订阅透传 User-Agent
This commit is contained in:
parent
03e320cbd0
commit
2155cc9639
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.16.13",
|
"version": "2.16.14",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -217,10 +217,12 @@ async function produceArtifact({
|
|||||||
subnames.map(async (name) => {
|
subnames.map(async (name) => {
|
||||||
const sub = findByName(allSubs, name);
|
const sub = findByName(allSubs, name);
|
||||||
const passThroughUA = sub.passThroughUA;
|
const passThroughUA = sub.passThroughUA;
|
||||||
|
let reqUA = sub.ua;
|
||||||
if (passThroughUA) {
|
if (passThroughUA) {
|
||||||
$.info(
|
$.info(
|
||||||
`订阅开启了透传 User-Agent, 使用请求的 User-Agent: ${ua}`,
|
`订阅开启了透传 User-Agent, 使用请求的 User-Agent: ${ua}`,
|
||||||
);
|
);
|
||||||
|
reqUA = ua;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$.info(`正在处理子订阅:${sub.name}...`);
|
$.info(`正在处理子订阅:${sub.name}...`);
|
||||||
@ -243,7 +245,7 @@ async function produceArtifact({
|
|||||||
try {
|
try {
|
||||||
return await download(
|
return await download(
|
||||||
url,
|
url,
|
||||||
ua || sub.ua,
|
reqUA,
|
||||||
undefined,
|
undefined,
|
||||||
proxy ||
|
proxy ||
|
||||||
sub.proxy ||
|
sub.proxy ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user