From 7bed6ac171034a2b8123075515940b6dcf2c72e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 15 Mar 2022 13:38:50 +0100 Subject: [PATCH 1/2] Small tunnel fix and installer info --- client-py3/full/linux/installer.sh | 2 ++ tunnel-server/src/udstunnel.py | 1 + 2 files changed, 3 insertions(+) diff --git a/client-py3/full/linux/installer.sh b/client-py3/full/linux/installer.sh index 7df83c86..7cf44307 100644 --- a/client-py3/full/linux/installer.sh +++ b/client-py3/full/linux/installer.sh @@ -8,6 +8,8 @@ echo "Installation process done." echo "Remember that the following packages must be installed on system:" echo "* Python3 paramiko" echo "* Python3 PyQt5" +echo "* Python3 six" echo "* Python3 requests" +echo "* Python3 cryptography" echo "Theese packages (as their names), are dependent on your platform, so you must locate and install them" echo "Also, ensure that a /media folder exists on your machine, that will be redirected on RDP connections" diff --git a/tunnel-server/src/udstunnel.py b/tunnel-server/src/udstunnel.py index 6ec4c223..8d233b37 100755 --- a/tunnel-server/src/udstunnel.py +++ b/tunnel-server/src/udstunnel.py @@ -227,6 +227,7 @@ def tunnel_main(): while not do_stop: try: client, addr = sock.accept() + logger.debug('ACCEPTED CONNECTION from %s (%s)', addr, client) # Select BEST process for sending this new connection prcs.best_child().send( message.Message(message.Command.TUNNEL, (client, addr)) From e0149900a7488ad00cc0de682f9cb963ae8fa2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 15 Mar 2022 16:28:13 +0100 Subject: [PATCH 2/2] Added protection on broken pipe to tunnel --- tunnel-server/src/uds_tunnel/proxy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tunnel-server/src/uds_tunnel/proxy.py b/tunnel-server/src/uds_tunnel/proxy.py index 7c926774..effb0e98 100644 --- a/tunnel-server/src/uds_tunnel/proxy.py +++ b/tunnel-server/src/uds_tunnel/proxy.py @@ -131,7 +131,10 @@ class Proxy: # Method responsible of proxying requests async def __call__(self, source, address: typing.Tuple[str, int]) -> None: - await self.proxy(source, address) + try: + await self.proxy(source, address) + except Exception as e: + logger.error('Error procesing connection from %s: %s', address, e) async def stats(self, full: bool, source, address: typing.Tuple[str, int]) -> None: # Check valid source ip