mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-11-01 06:46:58 +03:00
Removed X25519MLKEM768 from optional supported groups
This commit is contained in:
1 parent
44c5ee2a57
commit
a70fc8c5c1
3 files changed
+5
No files matched your search
@@ -272,6 +272,7 @@ async def probe_appdata_len(domain: str, port: int = 443,
|
|||||||
writer = None
|
writer = None
|
||||||
try:
|
try:
|
||||||
ctx = ssl.create_default_context()
|
ctx = ssl.create_default_context()
|
||||||
|
ctx.set_ecdh_curve('X25519')
|
||||||
ctx.check_hostname = False
|
ctx.check_hostname = False
|
||||||
ctx.verify_mode = ssl.CERT_NONE
|
ctx.verify_mode = ssl.CERT_NONE
|
||||||
ctx.minimum_version = ssl.TLSVersion.TLSv1_3
|
ctx.minimum_version = ssl.TLSVersion.TLSv1_3
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ def create_ssl_context(*, check_hostname: bool = True) -> ssl.SSLContext:
|
|||||||
if bundle_dir else certifi.where())
|
if bundle_dir else certifi.where())
|
||||||
context = ssl.create_default_context(cafile=cafile)
|
context = ssl.create_default_context(cafile=cafile)
|
||||||
context.load_default_certs()
|
context.load_default_certs()
|
||||||
|
context.set_ecdh_curve('X25519')
|
||||||
context.check_hostname = check_hostname
|
context.check_hostname = check_hostname
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|||||||
@@ -366,6 +366,9 @@ class ProbeAppdataLenTest(unittest.TestCase):
|
|||||||
probe_appdata_len('localhost', timeout=0.1), timeout=2)
|
probe_appdata_len('localhost', timeout=0.1), timeout=2)
|
||||||
self.assertIsNone(result)
|
self.assertIsNone(result)
|
||||||
reader.read.assert_not_called()
|
reader.read.assert_not_called()
|
||||||
|
hello = writer.write.call_args[0][0]
|
||||||
|
self.assertEqual(parse_client_hello(hello).key_shares,
|
||||||
|
{GROUP_X25519: X25519_KEY_LEN})
|
||||||
writer.close.assert_called_once()
|
writer.close.assert_called_once()
|
||||||
|
|
||||||
asyncio.run(scenario())
|
asyncio.run(scenario())
|
||||||
|
|||||||
Reference in new issue
Block a user