Skip to content

Commit 108ce3e

Browse files
authored
chore(gvproxy): add gvproxy api endpoint (#50)
1 parent 6474b1c commit 108ce3e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/machine/shim/network_darwin.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ func startHostForwarder(mc *vmconfigs.MachineConfig, provider vmconfigs.VMProvid
7272
gvcmd.Args = append(gvcmd.Args, "-debug")
7373
}
7474

75+
// Add gvproxy API listen endpoint
76+
gvpAPIPath := filepath.Join(mc.Dirs.RuntimeDir.GetPath(), "gvp_api.sock")
77+
err = os.RemoveAll(gvpAPIPath)
78+
if err != nil {
79+
return nil, fmt.Errorf("failed to remove old gvp_api.sock: %w", err)
80+
}
81+
82+
gvcmd.Args = append(gvcmd.Args, "--listen", "unix://"+gvpAPIPath)
83+
7584
logrus.Infof("Gvproxy command-line: %s", gvcmd.Args)
7685
events.NotifyRun(events.StartGvProxy, "staring...")
7786

0 commit comments

Comments
 (0)