mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-12 07:40:30 -08:00
fix(integration-test): Don't erase endpoint & allowed ips when setting PSK
This commit is contained in:
committed by
David Niehues
parent
d5162d7b9a
commit
098aff91ab
@@ -41,6 +41,16 @@ let
|
||||
type = lib.types.path;
|
||||
description = "Location of the .osk file on the key exchange server";
|
||||
};
|
||||
|
||||
endpoint = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "IP address of the peer to connect via.";
|
||||
};
|
||||
|
||||
allowedIps = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "IP addresses on the WireGuard VPN the peer is allowed to use";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
@@ -67,6 +77,8 @@ in
|
||||
| ${pkgs.wireguard-tools}/bin/wg \
|
||||
set ${instanceCfg.wgInterface} \
|
||||
peer ${instanceCfg.peerPubkey} \
|
||||
endpoint ${instanceCfg.endpoint} \
|
||||
allowed-ips ${instanceCfg.allowedIps} \
|
||||
preshared-key /dev/stdin
|
||||
'';
|
||||
serviceConfig = {
|
||||
|
||||
@@ -207,6 +207,8 @@ in
|
||||
rpHost = "peerakeyexchanger";
|
||||
peerPubkey = staticConfig.peerB.publicKey;
|
||||
remoteKeyPath = keyExchangePathAB;
|
||||
endpoint = "peerB:${builtins.toString wgPort}";
|
||||
allowedIps = "${staticConfig.peerB.innerIp}/24";
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs multiPeer {
|
||||
@@ -217,6 +219,8 @@ in
|
||||
rpHost = "peerakeyexchanger";
|
||||
peerPubkey = staticConfig.peerC.publicKey;
|
||||
remoteKeyPath = keyExchangePathAC;
|
||||
endpoint = "peerC:${builtins.toString wgPort}";
|
||||
allowedIps = "${staticConfig.peerC.innerIp}/24";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -255,6 +259,8 @@ in
|
||||
rpHost = "peerbkeyexchanger";
|
||||
peerPubkey = staticConfig.peerA.publicKey;
|
||||
remoteKeyPath = keyExchangePathBA;
|
||||
endpoint = "peerA:${builtins.toString wgPort}";
|
||||
allowedIps = "${staticConfig.peerB.innerIp}/24";
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs multiPeer {
|
||||
@@ -265,6 +271,8 @@ in
|
||||
rpHost = "peerbkeyexchanger";
|
||||
peerPubkey = staticConfig.peerC.publicKey;
|
||||
remoteKeyPath = keyExchangePathBC;
|
||||
endpoint = "peerC:${builtins.toString wgPort}";
|
||||
allowedIps = "${staticConfig.peerC.innerIp}/24";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -330,6 +338,8 @@ in
|
||||
rpHost = "peerckeyexchanger";
|
||||
peerPubkey = staticConfig.peerA.publicKey;
|
||||
remoteKeyPath = keyExchangePathCA;
|
||||
endpoint = "peerA:${builtins.toString wgPort}";
|
||||
allowedIps = "${staticConfig.peerA.innerIp}/24";
|
||||
};
|
||||
CB = {
|
||||
create = true;
|
||||
@@ -338,6 +348,8 @@ in
|
||||
rpHost = "peerckeyexchanger";
|
||||
peerPubkey = staticConfig.peerB.publicKey;
|
||||
remoteKeyPath = keyExchangePathCB;
|
||||
endpoint = "peerB:${builtins.toString wgPort}";
|
||||
allowedIps = "${staticConfig.peerB.innerIp}/24";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user