Skip to content

Commit

Permalink
Fix TLSObject serverName when protocol is VMess
Browse files Browse the repository at this point in the history
Signed-off-by: Loren Eteval <[email protected]>
  • Loading branch information
LorenEteval committed Oct 6, 2023
1 parent 4877396 commit 3d76b62
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Furious/Core/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def getTLSSettings(self, security):
# Note: If specify default value 'chrome', some share link fails.
# Leave default value as empty
fp = self.kwargs.get('fp')
sni = self.kwargs.get('sni', self.remote_host)
sni = self.kwargs.get('sni')
# Protect "xxx," format
alpn = list(
filter(
Expand All @@ -440,8 +440,21 @@ def getTLSSettings(self, security):

if fp:
TLSObject['fingerprint'] = fp

if sni:
TLSObject['serverName'] = sni
else:
host = ''

if self.protocol == 'vmess':
host = self.kwargs.get('host')

if self.protocol == 'vless':
host = self.remote_host

if host:
TLSObject['serverName'] = host

if alpn:
TLSObject['alpn'] = alpn

Expand Down

0 comments on commit 3d76b62

Please sign in to comment.