mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-13 23:03:09 +00:00
support domains which send several tls records, but print warning
This commit is contained in:
@@ -1925,6 +1925,16 @@ async def get_encrypted_cert(host, port, server_name):
|
||||
if record3_type != 23:
|
||||
return b""
|
||||
|
||||
if len(record3) < MIN_CERT_LEN:
|
||||
record4_type, record4 = await get_tls_record(reader)
|
||||
if record4_type != 23:
|
||||
return b""
|
||||
msg = ("The MASK_HOST %s sent some TLS record before certificate record, this makes the " +
|
||||
"proxy more detectable") % config.MASK_HOST
|
||||
print_err(msg)
|
||||
|
||||
return record4
|
||||
|
||||
return record3
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user