Anyone know if it is possible to proxy websocket protocol over vagrant share?
I have a node express app with web sockets that I am testing on a smart phone and using vagrant share. The client device gets the html page back fine but errors on making the web socket connection using ws://
.
var host = window.document.location.host.replace(/:.*/, '');
var port = ':' + (window.document.location.port || 80);
var ws = new WebSocket('ws://' + host + port);
ws.onopen = function(evt) { onOpen(evt) };
ws.onclose = function(evt) { onClose(evt) };
ws.onmessage = function(evt) { onMessage(evt) };
ws.onerror = function(evt) { onError(evt) };
When I test on a desktop browser (safari) it behaves the same but works fine when connecting to locally to the vagrant vm (localhost port forwarded).