diff --git a/main.py b/main.py index 81786f4..36a52a5 100755 --- a/main.py +++ b/main.py @@ -184,7 +184,11 @@ class FrontRequestHandler(ProxyRequestHandler): f'Proxy-agent: {self.version_string()}\r\n' '\r\n').encode('ascii')) if self.host.count('.') >= 2: - commonname = '.' + self.host.partition('.')[-1] + isccSLD = len(self.host.split('.')[-2]) <= 3 + if isccSLD: + commonname = self.host + else: + commonname = '.' + self.host.partition('.')[-1] else: commonname = self.host dummycert = get_cert(commonname, config)