fix: 修复 password 为数字时的 bug

This commit is contained in:
xream
2024-09-16 01:43:16 +08:00
parent de2813b035
commit cc556b641d
3 changed files with 12 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import {
isNotBlank,
ipAddress,
getRandomPort,
numberToString,
} from '@/utils';
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
import PROXY_PREPROCESSORS from './preprocessors';
@@ -327,6 +328,9 @@ function formatTransportPath(path) {
}
function lastParse(proxy) {
if (typeof proxy.password === 'number') {
proxy.password = numberToString(proxy.password);
}
if (proxy.interface) {
proxy['interface-name'] = proxy.interface;
delete proxy.interface;