mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-09-26 21:01:14 +08:00
config: remove private_key setting for now
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
@@ -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.
|
||||
|
@@ -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() {
|
||||
|
@@ -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"`
|
||||
|
Reference in New Issue
Block a user