vmproxy

package module
v0.0.0-...-97c7658 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 25 Imported by: 0

README

vmproxy

Tailscale Proxy for VNC and libvirt virsh control over a VM

This repository contains a tsnet Tailscale proxy that allows you to expose a VM via VNC on your Tailnet. Additionally, you can SSH into the tsnet application and control the VM via virsh commands like Stop, Start, Restart, Pause, and Resume.

The code in this repository is experimental and is provided without any warranty. However, it should be relatively easy to adapt for your own use.

Building and running

To build from source and run in dev mode:

go run ./cmd/vmproxy <vm name> <vnc addrport>

For the initial run you need to register with TS_AUTHKEY.

Note: Requires Go 1.20

Contributing

Contributions to this project are welcome. Please feel free to open an issue or submit a pull request if you have any improvements or bug fixes to suggest.

License

This project is licensed under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VNCProxy

func VNCProxy(s *tsnet.Server, tlsLn net.Listener, vncAddrPort string)

Types

type SSHConfig

type SSHConfig struct {
	Domain     string // vm name
	SSHDir     string // ssh directory
	LibvirtLoc string // libvirt socket path or <ip addr>:<port>
}

type SSHServer

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

func NewSSHServer

func NewSSHServer(config *SSHConfig) *SSHServer

func (*SSHServer) Serve

func (s *SSHServer) Serve(ln net.Listener) error

Directories

Path Synopsis
cmd
vmproxy command

Jump to

Keyboard shortcuts

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