Skip to content

Commit

Permalink
fix #281
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Sep 21, 2024
1 parent 466e09f commit 92377bb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/utils/loon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,21 @@ export const getLoonNodes = function (
}`,
nodeConfig.hostname,
nodeConfig.port,
JSON.stringify(nodeConfig.uuid),
`transport=${nodeConfig.network}`,
]

if (nodeConfig.type === NodeTypeEnum.Vmess) {
config.push(
nodeConfig.method === 'auto'
? `method=chacha20-poly1305`
: `method=${nodeConfig.method}`,
? `chacha20-poly1305`
: nodeConfig.method,
)
}

config.push(
JSON.stringify(nodeConfig.uuid),
`transport=${nodeConfig.network}`,
)

if (nodeConfig.network === 'ws' && nodeConfig.wsOpts) {
const obfsHost = getHeader(nodeConfig.wsOpts.headers, 'Host')

Expand Down

0 comments on commit 92377bb

Please sign in to comment.