Documentation
¶
Index ¶
- func CreateAgentReverseProxy(targetURL *url.URL, stream net.Conn, accessToken *string, host string) *httputil.ReverseProxy
- func HandleSpacesCodeServerProxy(w http.ResponseWriter, r *http.Request)
- func HandleSpacesConsoleProxy(w http.ResponseWriter, r *http.Request)
- func HandleSpacesPortProxy(w http.ResponseWriter, r *http.Request)
- func HandleSpacesSSHProxy(w http.ResponseWriter, r *http.Request)
- func HandleSpacesTerminalProxy(w http.ResponseWriter, r *http.Request)
- func HandleSpacesVNCProxy(w http.ResponseWriter, r *http.Request)
- func HandleSpacesWebPortProxy(w http.ResponseWriter, r *http.Request)
- func PortRoutes() *http.ServeMux
- func Routes(router *http.ServeMux, cfg *config.ServerConfig)
- func RunSSHForwarderViaAgent(proxyServerURL, space, token string, skipTLSVerify bool) error
- func RunTCPForwarderViaAgent(proxyServerURL, listen, space string, port int, token string, ...)
- func RunTCPForwarderViaAgentWithContext(ctx context.Context, proxyServerURL, listen, space string, port int, ...) net.Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAgentReverseProxy ¶
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 RunSSHForwarderViaAgent ¶
func RunTCPForwarderViaAgent ¶
Types ¶
This section is empty.