Skip to content

Commit

Permalink
fix: missing parameters in trojan (使用转换服务后无法连接 #85)
Browse files Browse the repository at this point in the history
  • Loading branch information
ursageer committed Dec 28, 2024
1 parent 53df4b6 commit cd32677
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ClashConfigBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class ClashConfigBuilder extends BaseConfigBuilder {
cipher: proxy.security,
tls: proxy.tls?.enabled || false,
'client-fingerprint': proxy.tls.utls?.fingerprint,
servername: proxy.tls?.server_name || '',
sni: proxy.tls?.server_name || '',
network: proxy.transport?.type || 'tcp',
'ws-opts': proxy.transport?.type === 'ws' ? {
path: proxy.transport.path,
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function parseServerInfo(serverInfo) {
if (params.security === 'xtls' || params.security === 'tls' || params.security === 'reality') {
tls = {
enabled: true,
server_name: params.sni,
server_name: params.sni || params.host,
insecure: false,
utls: {
enabled: true,
Expand Down

0 comments on commit cd32677

Please sign in to comment.