mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-22 11:19:07 +08:00
fix: Hysteria2 输出到 Stash 时 down-speed 和 up-speed 字段截取数字部分
This commit is contained in:
parent
89e8a99729
commit
81c46f6515
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.93",
|
"version": "2.14.94",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -131,14 +131,16 @@ export default function Stash_Producer() {
|
|||||||
isPresent(proxy, 'down') &&
|
isPresent(proxy, 'down') &&
|
||||||
!isPresent(proxy, 'down-speed')
|
!isPresent(proxy, 'down-speed')
|
||||||
) {
|
) {
|
||||||
proxy['down-speed'] = proxy.down;
|
proxy['down-speed'] =
|
||||||
|
`${proxy['down']}`.match(/\d+/)?.[0] || 0;
|
||||||
delete proxy.down;
|
delete proxy.down;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
isPresent(proxy, 'up') &&
|
isPresent(proxy, 'up') &&
|
||||||
!isPresent(proxy, 'up-speed')
|
!isPresent(proxy, 'up-speed')
|
||||||
) {
|
) {
|
||||||
proxy['up-speed'] = proxy.up;
|
proxy['up-speed'] =
|
||||||
|
`${proxy['up']}`.match(/\d+/)?.[0] || 0;
|
||||||
delete proxy.up;
|
delete proxy.up;
|
||||||
}
|
}
|
||||||
} else if (proxy.type === 'wireguard') {
|
} else if (proxy.type === 'wireguard') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user