Apparently wg-quick did handle the routes correctly after all?

This commit is contained in:
Erik Thuning 2025-03-26 16:27:41 +01:00
parent 580b10137f
commit e5d1b9809e

@ -181,7 +181,6 @@ class WireGuard:
# Ensure a wg config exists on startup
self.update(force=True)
self.init_routes()
def log(self, context_id: str, message) -> None:
@ -229,14 +228,6 @@ class WireGuard:
def meta_filepath(self, config_id: str) -> Path:
return self.filepath(f'{config_id}{metasuffix}')
def init_routes(self) -> None:
config = ConfigParser(interpolation=None)
for conffile in self.configs_base.glob('*/*'+serversuffix):
config.read(conffile)
client_ip_str = config['peer']['allowedips']
client_ip = ipaddress(client_ip_str.split('/')[0])
create_route(client_ip)
def generate_server_config(self):
config = ConfigParser(interpolation=None)
config['Interface'] = {