Merge pull request #7 from RomikB/update_admin_reg_key

Update admin reg key
This commit is contained in:
pokamest
2024-05-13 12:24:17 -07:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ package conf
import "golang.org/x/sys/windows/registry"
const adminRegKey = `Software\WireGuard`
const adminRegKey = `Software\AmneziaWG`
var adminKey registry.Key

View File

@@ -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(), "WIREGUARD_TUNNEL_NAME="+interfaceName),
Env: append(os.Environ(), "AMNEZIAWG_TUNNEL_NAME="+interfaceName),
Sys: &syscall.SysProcAttr{
HideWindow: true,
CmdLine: fmt.Sprintf("cmd /c %s", command),

View File

@@ -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(), "WIREGUARD_TUNNEL_NAME="+interfaceName),
Env: append(os.Environ(), "AMNEZIAWG_TUNNEL_NAME="+interfaceName),
Sys: &syscall.SysProcAttr{
HideWindow: true,
CmdLine: fmt.Sprintf("cmd /c %s", command),