feat: Surge Hysteria2 输出增加 download-bandwidth(若有值但解析失败则为 0)

This commit is contained in:
xream committed 2023-10-12 00:39:10 +08:00
1 parent bf81ca4acf
commit 4e5b46a43d
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -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": {
@@ -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();
}