fix: add server endpoint to wireguard via clients

This commit is contained in:
oddlama 2023-06-01 01:07:24 +02:00
parent 6cedaa53e6
commit 7ddb0ee23f
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -228,9 +228,12 @@
# We are a client node, so only include our via server.
[
{
wireguardPeerConfig = {
wireguardPeerConfig = let
snCfg = wgCfgOf wgCfg.client.via;
in {
PublicKey = builtins.readFile (peerPublicKeyPath wgCfg.client.via);
PresharedKeyFile = config.rekey.secrets.${peerPresharedKeySecret nodeName wgCfg.client.via}.path;
Endpoint = "${snCfg.server.host}:${toString snCfg.server.port}";
# Access to the whole network is routed through our entry node.
# TODO this should add any routedAddresses on ANY server in the network, right?
# if A entries via B and only C can route 0.0.0.0/0, does that work?