From 5c6ee07d66015af6555d8b58be23a52b97f9ba93 Mon Sep 17 00:00:00 2001 From: Tristan Brice Velloza Kildaire Date: Thu, 5 Sep 2024 00:07:35 +0200 Subject: [PATCH] TCPInterface - When connect(s, Bool)` is called construct a socket that supports both address families --- RNS/Interfaces/TCPInterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RNS/Interfaces/TCPInterface.py b/RNS/Interfaces/TCPInterface.py index 54eadb0..40d2557 100644 --- a/RNS/Interfaces/TCPInterface.py +++ b/RNS/Interfaces/TCPInterface.py @@ -200,7 +200,7 @@ class TCPClientInterface(Interface): if initial: RNS.log("Establishing TCP connection for "+str(self)+"...", RNS.LOG_DEBUG) - self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self.socket = socket.socket(socket.AF_INET|socket.AF_INET6, socket.SOCK_STREAM) self.socket.settimeout(TCPClientInterface.INITIAL_CONNECT_TIMEOUT) self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) self.socket.connect((self.target_ip, self.target_port))