diff --git a/src/ClashConfigBuilder.js b/src/ClashConfigBuilder.js index 67036b05..475c6c7e 100644 --- a/src/ClashConfigBuilder.js +++ b/src/ClashConfigBuilder.js @@ -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, diff --git a/src/utils.js b/src/utils.js index 7bf88d83..e9c1a947 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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,