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

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

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