Skip to content

Commit

Permalink
fix: clash 中 raw tcp 的节点没有 network 字段
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Oct 9, 2019
1 parent dfe293a commit 56244c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,9 @@ export const getClashNodes = (
port: nodeConfig.port,
uuid: nodeConfig.uuid,
alterId: nodeConfig.alterId,
network: nodeConfig.network,
...(nodeConfig.network === 'tcp' ? null : {
network: nodeConfig.network,
}),
tls: nodeConfig.tls,
...(nodeConfig.network === 'ws' ? {
'ws-path': nodeConfig.path,
Expand Down
1 change: 0 additions & 1 deletion test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ test('getClashNodes', async t => {
name: 'Test Node 4',
alterId: '64',
server: '1.1.1.1',
network: 'tcp',
port: 8080,
tls: false,
type: 'vmess',
Expand Down

0 comments on commit 56244c1

Please sign in to comment.