Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/machine/gvproxy/gvproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ func Start(ctx context.Context, mc *vmconfig.MachineConfig) error {
if err := mc.GetSSHPort(); err != nil {
return fmt.Errorf("unable to get available ssh port: %w", err)
}

// gvproxy listen a local socks file as Podman API socks (PodmanSocks.InHost)
// and forward to the guest's Podman API socks(PodmanSocks.InGuest).
gvpCmd.AddForwardSock(mc.PodmanSocks.InHost)
gvpCmd.AddForwardDest(mc.PodmanSocks.InGuest)
gvpCmd.AddForwardUser(mc.SSH.RemoteUsername)
gvpCmd.AddForwardIdentity(mc.SSH.PrivateKeyPath)
gvpCmd.PidFile = mc.PIDFiles.GvproxyPidFile
gvpCmd.SSHPort = mc.SSH.Port

// gvproxy endpoint, which provide network backend for vfkit/krunkit
gvpEndPoint := fs.NewFile(mc.GetNetworkStackEndpoint())
Expand Down
2 changes: 1 addition & 1 deletion pkg/port/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

// GetFree returns a free TCP port
func GetFree() (int, error) {
l, err := net.Listen("tcp", fmt.Sprintf("%s:%d", define.LocalHostURL, 0))
l, err := net.Listen("tcp4", fmt.Sprintf("%s:%d", define.LocalHostURL, 0))
if err != nil {
return 0, fmt.Errorf("unable to get free TCP port: %w", err)
}
Expand Down
Loading