From 91671a7147ab1a29130b56cd098aa37e81d6732f Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 15 Jan 2025 17:32:58 +0700 Subject: [PATCH] basic detection of rdp connection attempts --- xpra/net/socket_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xpra/net/socket_util.py b/xpra/net/socket_util.py index 49b4770417..556b84c0fe 100644 --- a/xpra/net/socket_util.py +++ b/xpra/net/socket_util.py @@ -341,6 +341,8 @@ def guess_packet_type(buf: SizedBuffer) -> str: return "ssl" if data[:4] == b"RFB ": return "vnc" + if len(data) >= 7 and data[:2] == b"\x03\x00": + return "rdp" line1 = bytes(data).splitlines()[0] if line1.find(b"HTTP/") > 0 or line1.split(b" ")[0] in (b"GET", b"POST"): return "http"