From 1c54936626a4a30d0c6f69576a06ba3661f39dc6 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 20 Apr 2022 14:28:08 +0200 Subject: Profiles: Implement SetProfileID instead of getting generic data --- src/wireguard.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wireguard.go') diff --git a/src/wireguard.go b/src/wireguard.go index 3f7da40..2f1c41c 100644 --- a/src/wireguard.go +++ b/src/wireguard.go @@ -26,7 +26,8 @@ func wireguardConfigAddKey(config string, key wgtypes.Key) string { return interface_re.ReplaceAllString(config, to_replace) } -func (server *Server) WireguardGetConfig(profile_id string) (string, error) { +func (server *Server) WireguardGetConfig() (string, error) { + profile_id := server.Profiles.Current wireguardKey, wireguardErr := wireguardGenerateKey() if wireguardErr != nil { -- cgit v1.2.3