vsocksshproxy

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package vsocksshproxy opens a raw byte tunnel to a guest-agent's ssh port, which itself proxies straight to the guest's local sshd - no framing, no agent-level auth.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session is one raw byte tunnel to a guest-agent's ssh port, reached by dialling a vsock UDS multiplexer path.

func Start

func Start(ctx context.Context, udsPath string, sshPort uint32) (*Session, error)

Start dials udsPath (a Firecracker/Cloud Hypervisor vsock UDS multiplexer) on the guest-agent's ssh port. Callers must call Close when done.

func (*Session) Close

func (s *Session) Close() error

Close closes the underlying vsock connection.

func (*Session) CloseWrite

func (s *Session) CloseWrite() error

CloseWrite half-closes the write side, signalling EOF to the guest-agent (and, through it, the guest's sshd) while still allowing reads - used when the client is done sending but the guest may still have a response coming. Returns an error if the underlying connection doesn't support half-close.

func (*Session) Read

func (s *Session) Read(p []byte) (int, error)

Read reads bytes coming from the guest's sshd.

func (*Session) Write

func (s *Session) Write(p []byte) (int, error)

Write forwards p toward the guest's sshd.

Jump to

Keyboard shortcuts

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