Skip to content

Commit

Permalink
Update tuntap
Browse files Browse the repository at this point in the history
  • Loading branch information
zachhuff386 committed Apr 1, 2022
1 parent 5e48736 commit 928310b
Show file tree
Hide file tree
Showing 5 changed files with 636 additions and 30 deletions.
20 changes: 5 additions & 15 deletions resources_win/post_install/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,11 @@ func main() {
cmd.Stderr = os.Stderr
cmd.Run()

wait.Add(1)
go func() {
defer wait.Done()

cmd = exec.Command(filepath.Join(rootDir, "tuntap", "tuntap.exe"),
"install")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run()
cmd = exec.Command(filepath.Join(rootDir, "tuntap", "tuntap.exe"),
"uninstall")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run()
}()
cmd = exec.Command(filepath.Join(rootDir, "tuntap", "tuntap.exe"),
"install")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run()

cmd = exec.Command(filepath.Join(rootDir, "nssm.exe"),
"stop", "pritunl")
Expand Down
4 changes: 2 additions & 2 deletions service/tuntap/tuntap.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ var (
func getToolpath() (pth string) {
if constants.Development {
return filepath.Join(utils.GetRootDir(), "..",
"openvpn", "tapctl.exe")
"tuntap_win", "tapctl.exe")
}

return filepath.Join(utils.GetRootDir(), "openvpn", "tapctl.exe")
return filepath.Join(utils.GetRootDir(), "tuntap", "tapctl.exe")
}

func Get() (adpaters []string, err error) {
Expand Down
Loading

0 comments on commit 928310b

Please sign in to comment.