vmsock

package
v0.0.0-...-d122567 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SeedPhrase = "github.com/rancher-sandbox/rancher-desktop-vtunnel"

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerConnector

type PeerConnector struct {
	IPv4ListenAddress  string
	TCPListenPort      int
	VsockHandshakePort uint32
	VsockHostPort      uint32
}

func (*PeerConnector) ListenAndHandshake

func (p *PeerConnector) ListenAndHandshake()

ListenAndHandshake listens for incoming VSOCK connections from the Host process The handshake is performed once during startup/restart to make sure that host process is talking to a right hyper-v VM (most likely WSL)

func (*PeerConnector) ListenTCP

func (p *PeerConnector) ListenTCP() error

ListenTCP starts a tcp listener and accepts TCP connections on a given port and addr when a new connection is accepted, ListenTCP handles the connection by establishing virtual socket to the host and sends the packets over the AF_VSOCK

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL