mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 15:59:02 +08:00
feat: 节点名称为空时, 添加默认节点名称
This commit is contained in:
parent
9b2209cc8b
commit
6a8cee3cd5
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.223",
|
"version": "2.14.224",
|
||||||
"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": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import YAML from '@/utils/yaml';
|
import YAML from '@/utils/yaml';
|
||||||
import download from '@/utils/download';
|
import download from '@/utils/download';
|
||||||
import { isIPv4, isIPv6, isValidPortNumber } from '@/utils';
|
import { isIPv4, isIPv6, isValidPortNumber, isNotBlank } from '@/utils';
|
||||||
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
||||||
import PROXY_PREPROCESSORS from './preprocessors';
|
import PROXY_PREPROCESSORS from './preprocessors';
|
||||||
import PROXY_PRODUCERS from './producers';
|
import PROXY_PRODUCERS from './producers';
|
||||||
@ -186,6 +186,13 @@ function produce(proxies, targetPlatform, type, opts = {}) {
|
|||||||
!(proxy.supported && proxy.supported[targetPlatform] === false),
|
!(proxy.supported && proxy.supported[targetPlatform] === false),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
proxies = proxies.map((proxy) => {
|
||||||
|
if (!isNotBlank(proxy.name)) {
|
||||||
|
proxy.name = `${proxy.type} ${proxy.server}:${proxy.port}`;
|
||||||
|
}
|
||||||
|
return proxy;
|
||||||
|
});
|
||||||
|
|
||||||
$.info(`Producing proxies for target: ${targetPlatform}`);
|
$.info(`Producing proxies for target: ${targetPlatform}`);
|
||||||
if (typeof producer.type === 'undefined' || producer.type === 'SINGLE') {
|
if (typeof producer.type === 'undefined' || producer.type === 'SINGLE') {
|
||||||
let localPort = 10000;
|
let localPort = 10000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user