config: remove private_key setting for now

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2022-09-14 10:43:29 +02:00
parent 3a63224c8b
commit 2ea6fd1847
3 changed files with 3 additions and 9 deletions

View File

@@ -227,15 +227,11 @@ epdisc:
# Keys which are not a glob(8) pattern, will be created as new interfaces if
# they do not exist already in the system.
interfaces:
#
\*:
cfgsync:
path: /some/special/wireguard/config-dir/
# A simple interface specific setting
# cunicu will set the private key of interface 'wg0' to the provided value.
wg0:
private_key: kODOmlTNhYbF9htW3uYiE1qKuvBnJKd7MFvaookGd14=
epdisc:
enabled: false
# No settings are overwritten. But since this is not a glob pattern,
# A new interface named 'wg1' will be created if it does not exist yet.

View File

@@ -338,7 +338,7 @@ var _ = Context("config", func() {
cfg, err := config.ParseArgs("--config", "../../etc/cunicu.yaml")
Expect(err).To(Succeed())
Expect(cfg.Interfaces["wg0"].PrivateKey.String()).To(Equal("kODOmlTNhYbF9htW3uYiE1qKuvBnJKd7MFvaookGd14="))
Expect(cfg.InterfaceSettings("wg-work-laptop").PeerDisc.Community).To(Equal("mysecret-pass"))
})
It("throws an error on an invalid config file path", func() {

View File

@@ -112,8 +112,6 @@ type InterfaceSettings struct {
Name string
Pattern string
PrivateKey crypto.Key `koanf:"private_key,omitempty"`
WireGuard WireGuardSettings `koanf:"wireguard,omitempty"`
AutoConfig AutoConfigSettings `koanf:"autocfg,omitempty"`
ConfigSync ConfigSyncSettings `koanf:"cfgsync,omitempty"`