Skip to content

Commit 9426f12

Browse files
committed
feat: Surge 输出会判断 HTTP 是否 headers 字段
1 parent ebc7173 commit 9426f12

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.16.62",
3+
"version": "2.16.63",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/core/proxy-utils/producers/surge.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,9 @@ function ssh(proxy) {
433433
return result.toString();
434434
}
435435
function http(proxy) {
436+
if (proxy.headers && Object.keys(proxy.headers).length > 0) {
437+
throw new Error(`headers is unsupported`);
438+
}
436439
const result = new Result(proxy);
437440
const type = proxy.tls ? 'https' : 'http';
438441
result.append(`${proxy.name}=${type},${proxy.server},${proxy.port}`);

0 commit comments

Comments
 (0)