From 5d86232fbea944072c097dc2d630a24cd0cdd4e3 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 6 May 2026 04:57:20 +0200 Subject: [PATCH] Added detection of yggdrasil addresses to auto-connect handler --- RNS/Discovery.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/RNS/Discovery.py b/RNS/Discovery.py index f0db825a..3e50e800 100644 --- a/RNS/Discovery.py +++ b/RNS/Discovery.py @@ -636,6 +636,10 @@ class InterfaceDiscovery(): RNS.log(f"You can obtain the configuration entry and add this interface manually instead using rnstatus -D", RNS.LOG_WARNING) return + if is_ygg_ipv6(info["reachable_on"]): + # TODO: Somehow detect if yggdrasil is enabled on the system + return + interface_name = info["name"] config_entry = info["config_entry"] interface_config = {} @@ -757,6 +761,10 @@ def is_ip_address(address_string): return True except: return False +def is_ygg_ipv6(address_string): + try: return ipaddress.ip_address(address_string) in ipaddress.IPv6Network("200::/7") + except: return False + def is_hostname(hostname): if hostname[-1] == ".": hostname = hostname[:-1] if len(hostname) > 253: return False