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

This commit is contained in:
xream
2023-10-12 00:39:10 +08:00
parent 0509530caa
commit 228c8862e1
2 changed files with 7 additions and 1 deletions

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": {

View File

@@ -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();
}