Skip to content

Commit ff9357e

Browse files
committed
fix: remove transport label (Reality/TCP/etc) from subscription node names
1 parent caebc0e commit ff9357e

1 file changed

Lines changed: 5 additions & 19 deletions

File tree

src/routes/subscription.js

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,7 @@ function generateVlessURI(user, node) {
299299
if (xray.xhttpMode && xray.xhttpMode !== 'auto') params.set('mode', xray.xhttpMode);
300300
}
301301

302-
const transportLabel = {
303-
tcp: security === 'reality' ? 'Reality' : 'TCP',
304-
ws: 'WebSocket',
305-
grpc: 'gRPC',
306-
xhttp: 'XHTTP',
307-
}[transport] || transport.toUpperCase();
308-
309-
const name = `${node.flag || ''} ${node.name} ${transportLabel}`.trim();
302+
const name = `${node.flag || ''} ${node.name}`.trim();
310303
return `vless://${uuid}@${host}:${port}?${params.toString()}#${encodeURIComponent(name)}`;
311304
}
312305

@@ -659,8 +652,7 @@ function _buildClashVlessProxy(user, node) {
659652
const transport = xray.transport || 'tcp';
660653
const security = xray.security || 'reality';
661654
const fingerprint = xray.fingerprint || 'chrome';
662-
const transportLabel = { tcp: security === 'reality' ? 'Reality' : 'TCP', ws: 'WebSocket', grpc: 'gRPC', xhttp: 'XHTTP' }[transport] || transport;
663-
const name = `${node.flag || ''} ${node.name} ${transportLabel}`.trim();
655+
const name = `${node.flag || ''} ${node.name}`.trim();
664656

665657
// Clash Meta doesn't support splithttp/xhttp - skip these nodes
666658
if (transport === 'xhttp') {
@@ -784,8 +776,7 @@ function _buildSingboxVlessOutbound(user, node) {
784776
const transport = xray.transport || 'tcp';
785777
const security = xray.security || 'reality';
786778
const fingerprint = xray.fingerprint || 'chrome';
787-
const transportLabel = { tcp: security === 'reality' ? 'Reality' : 'TCP', ws: 'WebSocket', grpc: 'gRPC', xhttp: 'XHTTP' }[transport] || transport;
788-
const tag = `${node.flag || ''} ${node.name} ${transportLabel}`.trim();
779+
const tag = `${node.flag || ''} ${node.name}`.trim();
789780

790781
// Sing-box doesn't support splithttp/xhttp - skip these nodes
791782
if (transport === 'xhttp') {
@@ -860,8 +851,7 @@ function generateV2rayJSON(user, nodes, routing) {
860851
const host = node.domain || node.ip;
861852
const transport = xray.transport || 'tcp';
862853
const security = xray.security || 'reality';
863-
const transportLabel = { tcp: security === 'reality' ? 'Reality' : 'TCP', ws: 'WebSocket', grpc: 'gRPC', xhttp: 'XHTTP' }[transport] || transport;
864-
const tag = `${node.flag || ''} ${node.name} ${transportLabel}`.trim();
854+
const tag = `${node.flag || ''} ${node.name}`.trim();
865855

866856
const streamSettings = { network: transport === 'xhttp' ? 'splithttp' : transport };
867857

@@ -1120,14 +1110,10 @@ async function generateHTML(user, nodes, token, baseUrl, settings) {
11201110
if (node.type === 'xray') {
11211111
const uri = generateVlessURI(user, node);
11221112
if (uri) {
1123-
const xray = node.xray || {};
1124-
const transport = xray.transport || 'tcp';
1125-
const security = xray.security || 'reality';
1126-
const label = { tcp: security === 'reality' ? 'Reality' : 'TCP', ws: 'WebSocket', grpc: 'gRPC' }[transport] || transport;
11271113
allConfigs.push({
11281114
location: node.name,
11291115
flag: node.flag || '🌐',
1130-
name: `VLESS ${label}`,
1116+
name: 'VLESS',
11311117
uri,
11321118
});
11331119
}

0 commit comments

Comments
 (0)