From 4e5b46a43d7b67ad9dad34180fa2896fcb51ae84 Mon Sep 17 00:00:00 2001 From: xream Date: Thu, 12 Oct 2023 00:39:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Surge=20Hysteria2=20=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20download-bandwidth(=E8=8B=A5=E6=9C=89?= =?UTF-8?q?=E5=80=BC=E4=BD=86=E8=A7=A3=E6=9E=90=E5=A4=B1=E8=B4=A5=E5=88=99?= =?UTF-8?q?=E4=B8=BA=200)?= 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 | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 0c6e230..a9abf7c 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.68", + "version": "2.14.69", "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 e74bd75..a294d05 100644 --- a/backend/src/core/proxy-utils/producers/surge.js +++ b/backend/src/core/proxy-utils/producers/surge.js @@ -409,6 +409,12 @@ function hysteria2(proxy) { 'underlying-proxy', ); + // download-bandwidth + result.appendIfPresent( + `,download-bandwidth=${`${proxy['down']}`.match(/\d+/)?.[0] || 0}`, + 'down', + ); + return result.toString(); }