Open joconcepts opened 7 years ago
Seems like your handler is problematic. NewProxy already handles the upgrades and other stuff.
func main() {
port, _ := "5700"
proxy_url := fmt.Sprintf("http://localhost:%d", port)
p_u, _ := url.Parse(proxy_url) // handle the errors
r := mux.NewRouter()
r.Handle("/", websocketproxy.NewProxy(p_u))
srv := &http.Server{
Handler: r,
Addr: "127.0.0.1:10001",
}
log.Fatal(srv.ListenAndServe())
}
Please see the example in readme.
I want to write a little proxy for accessing the vnc console of qemu via websocket. Qemu starts the websocket on its own, so its just a simple proxy.
When connecting to the proxy url via noVNC I get the following message:
My code looks as follows:
Can anybody give me some hint why that will not work?