This commit is contained in:
mwiegand 2021-10-10 14:31:05 +02:00
parent 1c9c4e0902
commit c9eef4fc79
5 changed files with 8 additions and 8 deletions

View file

@ -35,6 +35,9 @@ def s2s_peer_specific(metadata):
'id': repo.get_node(peer).metadata.get(f'id'),
'ip': repo.get_node(peer).metadata.get(f'wireguard/my_ip'),
'endpoint': f'{repo.get_node(peer).hostname}:51820',
'route': [
str(ip_interface(repo.get_node(peer).metadata.get(f'wireguard/my_ip')).network),
],
}
for peer in metadata.get('wireguard/peers')
},
@ -52,10 +55,10 @@ def client_peer_specific(metadata):
client: {
'id': client,
'route': [
'172.30.0.0/24',
str(ip_interface(conf['ip']).network),
]
}
for client in metadata.get('wireguard/clients')
for client, conf in metadata.get('wireguard/clients').items()
},
},
}

View file

@ -62,7 +62,6 @@
'peers': {
'htz.mails': {
'route': [
'172.30.0.0/24',
'10.0.10.0/24',
'10.0.11.0/24',
'10.0.20.0/24',

View file

@ -162,13 +162,13 @@
},
'clients': {
'macbook': {
'ip': '172.30.0.100/24',
'ip': '172.30.0.100/32',
},
'phone': {
'ip': '172.30.0.101/24',
'ip': '172.30.0.101/32',
},
'ipad': {
'ip': '172.30.0.102/24',
'ip': '172.30.0.102/32',
},
},
},

View file

@ -35,7 +35,6 @@
'peers': {
'htz.mails': {
'route': [
'172.30.0.0/24',
'10.0.0.0/24',
'10.0.2.0/24',
'10.0.9.0/24',

View file

@ -26,7 +26,6 @@
'peers': {
'htz.mails': {
'route': [
'172.30.0.0/24',
'10.0.0.0/24',
'10.0.2.0/24',
'10.0.9.0/24',