bundles/wireguard: add no_autoconnect option
This commit is contained in:
parent
ffb5125ddd
commit
63d42c6b42
2 changed files with 5 additions and 2 deletions
|
@ -175,11 +175,13 @@ def peer_endpoints(metadata):
|
|||
except NoSuchNode:
|
||||
continue
|
||||
|
||||
if repo.libs.s2s.WG_AUTOGEN_SETTINGS.get(name, {}).get('no_autoconnect'):
|
||||
continue
|
||||
|
||||
peers[rnode.name] = {
|
||||
'endpoint': '{}:{}'.format(
|
||||
rnode.metadata.get('wireguard/external_hostname', rnode.hostname),
|
||||
rnode.metadata.get(f'wireguard/peers/{node.name}/my_port', 51820),
|
||||
rnode.hostname,
|
||||
rnode.metadata.get(f'wireguard/peers/{node.name}/my_port'),
|
||||
),
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ WG_AUTOGEN_NODES = [
|
|||
WG_AUTOGEN_SETTINGS = {
|
||||
# special settings to apply when peering with a specific node
|
||||
'home.router': {
|
||||
'no_autoconnect': True,
|
||||
'persistent_keepalive': False,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue