mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 01:09:01 +08:00
fix: 修复 password 为数字时的 bug
This commit is contained in:
parent
de2813b035
commit
cc556b641d
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.382",
|
"version": "2.14.383",
|
||||||
"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": {
|
||||||
|
@ -9,6 +9,7 @@ import {
|
|||||||
isNotBlank,
|
isNotBlank,
|
||||||
ipAddress,
|
ipAddress,
|
||||||
getRandomPort,
|
getRandomPort,
|
||||||
|
numberToString,
|
||||||
} from '@/utils';
|
} from '@/utils';
|
||||||
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
||||||
import PROXY_PREPROCESSORS from './preprocessors';
|
import PROXY_PREPROCESSORS from './preprocessors';
|
||||||
@ -327,6 +328,9 @@ function formatTransportPath(path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function lastParse(proxy) {
|
function lastParse(proxy) {
|
||||||
|
if (typeof proxy.password === 'number') {
|
||||||
|
proxy.password = numberToString(proxy.password);
|
||||||
|
}
|
||||||
if (proxy.interface) {
|
if (proxy.interface) {
|
||||||
proxy['interface-name'] = proxy.interface;
|
proxy['interface-name'] = proxy.interface;
|
||||||
delete proxy.interface;
|
delete proxy.interface;
|
||||||
|
@ -111,6 +111,12 @@ function getRandomPort(portString) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function numberToString(value) {
|
||||||
|
return Number.isSafeInteger(value)
|
||||||
|
? String(value)
|
||||||
|
: BigInt(value).toString();
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ipAddress,
|
ipAddress,
|
||||||
isIPv4,
|
isIPv4,
|
||||||
@ -123,4 +129,5 @@ export {
|
|||||||
// utf8ArrayToStr,
|
// utf8ArrayToStr,
|
||||||
getPolicyDescriptor,
|
getPolicyDescriptor,
|
||||||
getRandomPort,
|
getRandomPort,
|
||||||
|
numberToString,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user