Skip to content

Commit 182e712

Browse files
committed
chore: network 逻辑有点乱了 可能还牵扯到别的逻辑 补充一点说明 以后再优化
1 parent d0cd900 commit 182e712

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

backend/src/core/proxy-utils/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,15 +437,23 @@ function lastParse(proxy) {
437437
formatTransportPath(transportPath);
438438
}
439439

440+
// network 逻辑有点乱了 可能还牵扯到别的逻辑 以后再优化...
441+
// 以 mihomo 为准的话, 其实应该是
442+
// network¶
443+
// 传输层,支持 ws/grpc,不配置或配置其他值则为 tcp
440444
if (proxy.type === 'trojan') {
441445
if (proxy.network === 'tcp') {
442446
delete proxy.network;
443447
}
444448
}
449+
// network¶
450+
// 传输层,支持 ws/http/h2/grpc,不配置或配置其他值则为 tcp
445451
if (['vmess'].includes(proxy.type)) {
446452
proxy.cipher = proxy.cipher || 'none';
447453
proxy.alterId = proxy.alterId || 0;
448454
}
455+
// network¶
456+
// 传输层,支持 ws/http/h2/grpc,不配置或配置其他值则为 tcp
449457
if (['vless'].includes(proxy.type)) {
450458
if (!proxy.network) {
451459
proxy.network = 'tcp';

0 commit comments

Comments
 (0)