From 9426f128c4ebb65deb71fa7864bfd94db9abaa0a Mon Sep 17 00:00:00 2001 From: xream Date: Sat, 1 Mar 2025 21:43:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Surge=20=E8=BE=93=E5=87=BA=E4=BC=9A?= =?UTF-8?q?=E5=88=A4=E6=96=AD=20HTTP=20=E6=98=AF=E5=90=A6=20headers=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/producers/surge.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index edf32d6..7badcb9 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.16.62", + "version": "2.16.63", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/producers/surge.js b/backend/src/core/proxy-utils/producers/surge.js index 01c89e8..f24b832 100644 --- a/backend/src/core/proxy-utils/producers/surge.js +++ b/backend/src/core/proxy-utils/producers/surge.js @@ -433,6 +433,9 @@ function ssh(proxy) { return result.toString(); } function http(proxy) { + if (proxy.headers && Object.keys(proxy.headers).length > 0) { + throw new Error(`headers is unsupported`); + } const result = new Result(proxy); const type = proxy.tls ? 'https' : 'http'; result.append(`${proxy.name}=${type},${proxy.server},${proxy.port}`);