Skip to content

Commit

Permalink
Merge pull request #283 from Zoupers/master
Browse files Browse the repository at this point in the history
fix: clash wireguard config pre-shared-key key name wrong
  • Loading branch information
geekdada authored Nov 20, 2024
2 parents d4eaedd + f43be62 commit 5b9785e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/clash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,9 @@ function nodeListMapper(nodeConfig: PossibleNodeConfigType) {
port: getPortFromHost(nodeConfig.peers[0].endpoint),
'public-key': nodeConfig.peers[0].publicKey,
...(nodeConfig.peers[0].presharedKey
? { 'preshared-key': nodeConfig.peers[0].presharedKey }
? nodeConfig?.clashConfig?.clashCore === 'clash.meta'
? { 'pre-shared-key': nodeConfig.peers[0].presharedKey }
: { 'preshared-key': nodeConfig.peers[0].presharedKey }
: null),
...(nodeConfig.peers[0].reservedBits
? {
Expand Down

0 comments on commit 5b9785e

Please sign in to comment.