From b484827c15fdc306a9dc8b6ce52117371142dcc0 Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:49:40 +0000 Subject: [PATCH] util: bypass tor for .local domains --- basicswap/util/network.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basicswap/util/network.py b/basicswap/util/network.py index 225ffd8..b2fc4bf 100644 --- a/basicswap/util/network.py +++ b/basicswap/util/network.py @@ -15,9 +15,10 @@ from urllib.request import Request, urlopen def is_private_ip_address(addr: str): - # Will return false for all URLs if addr == 'localhost': return True + if addr.endswith('.local'): + return True try: return ipaddress.ip_address(addr).is_private except Exception: