From e948a6592abc0b1c40c56010b28380e3f342a937 Mon Sep 17 00:00:00 2001 From: Mykola Baibuz Date: Mon, 24 Feb 2025 21:20:02 +0200 Subject: [PATCH] Revert naming --- conf/admin_windows.go | 2 +- conf/path_windows.go | 2 +- scriptrunner.go | 2 +- services/names.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/admin_windows.go b/conf/admin_windows.go index 1b3a3fd..431efd0 100644 --- a/conf/admin_windows.go +++ b/conf/admin_windows.go @@ -7,7 +7,7 @@ package conf import "golang.org/x/sys/windows/registry" -const adminRegKey = `Software\Euphoria` +const adminRegKey = `Software\AmneziaWG` var adminKey registry.Key diff --git a/conf/path_windows.go b/conf/path_windows.go index 401e5cf..6952225 100644 --- a/conf/path_windows.go +++ b/conf/path_windows.go @@ -50,7 +50,7 @@ func RootDirectory(create bool) (string, error) { if err != nil { return "", err } - root = filepath.Join(root, "Euphoria") + root = filepath.Join(root, "AmneziaWG") if !create { return filepath.Join(root, "Data"), nil } diff --git a/scriptrunner.go b/scriptrunner.go index 26c2b0e..66b943e 100644 --- a/scriptrunner.go +++ b/scriptrunner.go @@ -47,7 +47,7 @@ func runScriptCommand(command, interfaceName string) error { } process, err := os.StartProcess(comspec, nil /* CmdLine below */, &os.ProcAttr{ Files: []*os.File{devNull, writer, writer}, - Env: append(os.Environ(), "EUPHORIA_TUNNEL_NAME="+interfaceName), + Env: append(os.Environ(), "AMNEZIAWG_TUNNEL_NAME="+interfaceName), Sys: &syscall.SysProcAttr{ HideWindow: true, CmdLine: fmt.Sprintf("cmd /c %s", command), diff --git a/services/names.go b/services/names.go index e19bdc7..8bbecf0 100644 --- a/services/names.go +++ b/services/names.go @@ -15,12 +15,12 @@ func ServiceNameOfTunnel(tunnelName string) (string, error) { if !conf.TunnelNameIsValid(tunnelName) { return "", errors.New("Tunnel name is not valid") } - return "EuphoriaTunnel$" + tunnelName, nil + return "AmneziaWGTunnel$" + tunnelName, nil } func PipePathOfTunnel(tunnelName string) (string, error) { if !conf.TunnelNameIsValid(tunnelName) { return "", errors.New("Tunnel name is not valid") } - return `\\.\pipe\ProtectedPrefix\Administrators\Euphoria\` + tunnelName, nil + return `\\.\pipe\ProtectedPrefix\Administrators\AmneziaWG\` + tunnelName, nil }