proxy

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAgentReverseProxy

func CreateAgentReverseProxy(targetURL *url.URL, stream net.Conn, accessToken *string, host string) *httputil.ReverseProxy

func HandleSpacesCodeServerProxy

func HandleSpacesCodeServerProxy(w http.ResponseWriter, r *http.Request)

func HandleSpacesConsoleProxy added in v0.35.0

func HandleSpacesConsoleProxy(w http.ResponseWriter, r *http.Request)

HandleSpacesConsoleProxy bridges a websocket to a KVM space's serial console (`virsh console` under a pty), giving the browser access to the VM itself: login works with the owner's knot username and service password even when the agent never connected. Only the node that owns the VM can serve it — virsh talks to the local libvirt.

The websocket is upgraded before any console precondition is checked, and every failure is written into the terminal as a [console error] line: a popup that dies silently gives the user nothing to act on.

func HandleSpacesPortProxy

func HandleSpacesPortProxy(w http.ResponseWriter, r *http.Request)

func HandleSpacesSSHProxy

func HandleSpacesSSHProxy(w http.ResponseWriter, r *http.Request)

func HandleSpacesTerminalProxy

func HandleSpacesTerminalProxy(w http.ResponseWriter, r *http.Request)

func HandleSpacesVNCProxy added in v0.35.0

func HandleSpacesVNCProxy(w http.ResponseWriter, r *http.Request)

HandleSpacesVNCProxy bridges a websocket to the VM's built-in QEMU VNC display — the framebuffer QEMU itself renders (bootloader, boot messages, desktop), served on the node's loopback. Nothing is installed in the guest: noVNC in the browser speaks RFB over the websocket, and this handler pipes those bytes to the local VNC TCP port. Like the console, it works when the guest's agent does not, and only the node that owns the VM can reach the display (cluster members bridge through to it).

func HandleSpacesWebPortProxy

func HandleSpacesWebPortProxy(w http.ResponseWriter, r *http.Request)

Proxy a web port for a space or pool, the transport is http and the agent works out the http / https connection.

func PortRoutes

func PortRoutes() *http.ServeMux

Setup proxying of URLs to ports within spaces

func Routes

func Routes(router *http.ServeMux, cfg *config.ServerConfig)

func RunSSHForwarderViaAgent

func RunSSHForwarderViaAgent(proxyServerURL, space, token string, skipTLSVerify bool) error

func RunTCPForwarderViaAgent

func RunTCPForwarderViaAgent(proxyServerURL, listen, space string, port int, token string, skipTLSVerify bool)

func RunTCPForwarderViaAgentWithContext added in v0.22.0

func RunTCPForwarderViaAgentWithContext(ctx context.Context, proxyServerURL, listen, space string, port int, token string, skipTLSVerify bool) net.Listener

Types

This section is empty.

Jump to

Keyboard shortcuts

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