Secure webSocket on local network for android browsers - html

I am trying to run a web on my local network that connects to the server through a websocket. When I test it from the same machine that is serving the web (localhost) it works fine but when I try to access the web from my android phone with chrome I get "net::ERR_CONNECTION_REFUSED". It seems that chrome refused all connections to localhost that are not certificated.
I have installed a self certification with the hope that using secure websockets and the certification it would work... Now I can access from localhost as https but I am unable to access from other devices without geting "This Connection is Untrusted"
There is any way to create a certified local network where I can browse to https://192.168.0.x (server IP) from other device and use websockets or secure websockets?
I am open to read other solutions where websockets work in a local network from an android browser.

Related

Firefox/Chrome unable to connect to sites on VMWare Guest

I'm seeing this problem connecting to most sites when connected to our office LAN.
I'm running a VM (using VMWare Workstation 15 Player) running Win10. The host is also Win10.
Your connection is not secure
The owner of www.google.com has configured their web site improperly. To protect your information from being stolen, Firefox has not connected to this web site.
This site uses HTTP Strict Transport Security (HSTS) to specify that Firefox only connect to it securely. As a result, it is not possible to add an exception for this certificate.
Advanced shows
Error code: SEC_ERROR_UNKNOWN_ISSUER
The network connection is "NAT: Used to share the host's IP address".
I had Avast installed and uninstalled it so ensure it was not blocking the connections.
I do not get this error on the host machine
If I connect the host machine to our corporate VPN or use a Wifi connection, I do not get this error.
The date and time are also correct.
Is there something that VMWare Player is doing to the connection?
Firefox Quantum 65.0.2
Chrome Version 72.0.3626.121
Chrome
Firefox

Access google cloud windows server via web

Is there a way to remote desktop into a Windows VM on google cloud via the web without using RDP.
I am able to connect to the VM via RDP, but would like to connect via a web application or other means.
Any suggestions?
I haven't tested it personally but VNC should work. You'll have to review and open the necessary firewall ports.
Www.realvnc.com

How to force a browser tab (chrome) to use wireless and another to use Ethernet cable?

I know that my question is a little awkward, but here's my situation:
I have two networks, one of them is accessible to me via wireless, and the other is accessible to me via an Ethernet cable.
If my laptop is connected to both networks, can I connect to website WW via the wireless network, and website EE via the Ethernet network, in two tabs in the same browser (Chrome) ?
Note: Assume both websites provide video streaming.
Note: Assume that website WW is blocked via Ethernet network, and website EE is blocked via wireless network.
My trials:
I tried to open website WW while laptop connected to wireless only, and then connect Ethernet cable, and open website EE. Result: Website WW closes connection via wireless, and tries to connect using Ethernet, hence stops streaming.
I tried to open website EE while laptop connected to Ethernet only, and then connect to wireless network, and open website WW. Result: Website EE keeps streaming, while WW never loads.
I'm using windows XP, latest google chrome. Any ideas?
If you can reconfigure the access point, you can do this:
1) setup the Wifi access point to be a router (so that it has a different IP address on its Ethernet and on its Wifi interfaces
2) setup the IP address of the wifi card on your PC to be in the IP network of the router (Wifi side)
3) setup a static route on the PC so that WW is accessed by going through the router, and a default route (used for EE) going through the Ethernet.

AIR for Android SocketServer over WiFi

Developing a multiplayer game for Android and using the AIR SocketServer class to communicate between server and client AIR applications.
On Windows 8 I am using Virtual Router Plus to set up my PC laptop(where the server app is running) as a wifi hotspot.
I run ipconfig in cmd after my wifi is running to grab the ipv4 IP address under 'Wireless LAN adapter Local Area Connection'
This is the IP I bind to in the server app and connect to in the client app.
If I launch both server and client on the same machine, everything works fine.
When I install the client app on my Android device, I am unable to establish a socket connection. The WiFi is running properly on my Android device.
Is a policy file necessary on the server machine when creating socketserver connections over a local wifi network?
If so, shouldn't the client app be throwing a security error when it tries to connect?
I am lost as to what my troubleshooting steps should be. ANY tips or feedback appreciated!
This happend because, the AIR Socket communication works only in Desktop application.
Try this native extension, it works perfectly form me:
http://blog.aboutme.be/2011/12/14/udp-native-extension-for-air-mobile-now-with-android-support/

WebSocket won't connect to anything other than 127.0.0.1 / localhost

I have a testapp consisting of an HTML5/WebSocket client and an HTTP/WS server. Both servers are in C#; the HTTP server is my own simple thing and the WS server is also homebrew based on concepts from http://nugget.codeplex.com/. HTTP server is listening on 0.0.0.0:5959 and WS server on 0.0.0.0:5960 (accept connections from any client, but on different ports).
My index.html includes some JavaScript that opens a WebSocket to 'ws://'+document.location.hostname+':5960/' (that is, to the same IP address that the webpage came from, but on port 5960). The WS server sends sample data every 100ms. All in all, it's a pretty straightforward demo.
I'm using Chrome 12.0 on Windows7.
I've found that the HTTP server works from any client, either a browser on my machine pointed to 127.0.0.1:5959 or localhost:5959, AND it works when any machine (mine or a remote machine... "remote" being a different PC on my desk :) hits my server machine's work-internal 10-net address 10.122.0.159:5959. Everything works as expected in HTTP land.
However, the WebSocket only works on 127.0.0.1 and localhost; remote machines can successfully fetch HTML from 10.122.0.159:5959 but the WebSocket will NOT connect to 10.122.0.159:5960. In fact, when I point my local browser to it's own 10-net address (10.122.0.159:5959) I get the same result - HTML loads but WebSocket does not connect.
Any ideas as to why this might be happening?
Does CORS require that the WS be using the same port as the HTTP request originated from? If so, is there a special exception to the rule for 127.0.0.1?
Many thanks,
-Dave
Update
It seems to be caused by a proxy server blocking ws:// requests. Our company employs a proxy server for content filtering and all the usual stuff, and our browsers are configured to use it.Chrome uses IE's proxy settings, and IE's default settings are for localhost to not use a proxy server. When I check the box to have local connections also use the proxy server, my ws:// requests to localhost get blocked. Conversely, when I uncheck the "use proxy server" box my server does rx the WS request. Similarly with the remote machine, if I turn off the proxy on the remote machine my server does rx the ws:// request.
So it's a proxy thing, not a CORS or socket thing, and now I'm off to explore proxy settings with our IT folks.
There is no WebSocket limitation on cross-origin except what is governed by the CORS security in the handshake.
It sounds like something is wrong with your WebSocket server and it is only listening on localhost for connections. I would add some debug output to the OnClientConnect routine in Nugget (WebSocketServer.cs) so you can see when socket connections happen. If you really think it isn't a problem with the server then I would suggest using wireshark and comparing the localhost connection to the remote connection.
Also, if you are using the SilverLight WebSocket prototype (README) in IE 9, then you are restricted to ports 4502-4534 for WebSocket connections. It's possible that for localhost this restriction is lifted.
It is/was indeed a proxy thing.
Rather than asking our IT folks to make changes (good luck with that, eh?) I simply turned off proxy for 10.122.0.159 ([Howto for IE/Chrome][1]). I briefly experimented with turning it off for the ws:// protocol but couldn't get it to work, so for now just opening that one IP address does the trick.