add handling of some unknown new rpc

This commit is contained in:
Alexander Bersenev
2023-02-17 20:16:52 +05:00
parent 446682521b
commit 88c8c57a44

View File

@@ -868,6 +868,7 @@ class ProxyReqStreamReader(LayeredStreamReaderBase):
RPC_PROXY_ANS = b"\x0d\xda\x03\x44"
RPC_CLOSE_EXT = b"\xa2\x34\xb6\x5e"
RPC_SIMPLE_ACK = b"\x9b\x40\xac\x3b"
RPC_UNKNOWN = b'\xdf\xa2\x30\x57'
data = await self.upstream.read(1)
@@ -886,6 +887,9 @@ class ProxyReqStreamReader(LayeredStreamReaderBase):
conn_id, confirm = data[4:12], data[12:16]
return confirm, {"SIMPLE_ACK": True}
if ans_type == RPC_UNKNOWN:
return b"", {"SKIP_SEND": True}
print_err("unknown rpc ans type:", ans_type)
return b""
@@ -1570,6 +1574,9 @@ async def tg_connect_reader_to_writer(rd, wr, user, rd_buf_size, is_upstream):
else:
extra = {}
if extra.get("SKIP_SEND"):
continue
if not data:
wr.write_eof()
await wr.drain()