mirror of
https://github.com/tiennm99/mtprotoproxy.git
synced 2026-10-11 03:13:42 +00:00
support domains which send several tls records, but print warning
This commit is contained in:
1 parent
87f4370927
commit
51b2482dec
1 file changed
+10
@@ -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