I need to convert a web page requiring viewing a X window from using the VncViewer applet to some HTML5 based VNC client. The worry is NSAPI will get desupported in the near future on browsers (mainly Chrome) that disables applet functions.
I looked at noVNC and websockify and got it to work. But, here is my problem: We still have some client on IE8 that does not support Canvas. For those clients which has Java enabled and won't be changing to a higher version of IE or Chrome, we still want them to keep running the applet version. By running websockify in the wrap mode, it seems I can no longer directly connect to the VNC server (not through websockify) to keep those applet clients functional.
e.g. My command to run websockify is:
run 5903 --wrap-mode=ignore -- vncserver -geometry 1024x768 :3
After this, I tried to use the regular VNCViewer client to connect to port 5903, and it's rejected. Only the websockified page can view the VNC window. If I change the 5903 to 5902, then I can use the regular VNCViewer client to view window at 5903, however the websockified page can't view it at 5902.
Is there a hope to keep concurrent connection to my VNC server available (websockify and regular connections)?
Thank!
I would recommend starting your VNC server normally (not using websockify wrap mode). Then run websockify normally to target the VNC port. The Java client should continue to target the regular VNC port. The noVNC client should connect to the websockify listen port (which will then connect to the VNC server target).
The problem with wrap mode is that the original port is "hidden" (moved to a random high port and accessible to localhost only) and only the websocket port is exposed. But you still need the regular VNC port to be accessible for the Java client.
Related
I am developing an application that uses WebRTC and I want Chrome to use the system camera. From what I understand, the use of the camera is allowed (in the latest versions of Chrome) only from "secure locations" (https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins), like localhost and 127.0.0.1.
I want to test it locally and connect to the server both from a client that resides on the same pc as the server, and from a client from another pc. In particular, the client that connects from another pc needs to connect to the server using its IP address (I am developing/testing it in an Intranet), but the client cannot use the camera because it is not calling localhost.
Is there a way to disable this constraint, so that I am able to test it in an Intranet?
If not, are there any alternatives?
try the unsafely-treat-insecure-origin-as-secure flag in Chrome:
http://peter.sh/experiments/chromium-command-line-switches/#unsafely-treat-insecure-origin-as-secure
I am developing a webpage that uses camera. When I test in Chrome in my local network, camera doesn't work and I get warning in the console:
getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See link for more details.
In the link provided there is an instruction to set some flags in Chrome. So I tried. My command looks like this:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --unsafely-treat-insecure-origin-as-secure="192.168.0.15" --user-data-dir=c:\chrome-dev-profile
But when I run Chrome I get this message:
You are using an unsupported command-line flag: --unsafely-treat-insecure-origin-as-secure. Stability and security will suffer.
What am I doing wrong?
Is there another way I can test in local network without setting up https server? I need this just for development.
Luka,
I've run into this bug just yesterday. I have not found out how to get Chrome to honor that flag on the command line yet. But I did find a workaround that works for my case.
I'm running my web services on a Linux machine that is running an ssh server. I'm testing on windows with chrome, and used putty to connect to the linux box from windows and then created a "local port forward" to make my remote linux box's ipaddress:port appear on localhost:port on windows. Depending on your platform this workaround may work for you. This approach isn't too cumbersome if you only have a few ports to forward.
In my particular case my setting for putty looked like
L8080 localhost:8080
To see more about port forwarding and ssh see: https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding
I’d like to be able to create a GUI that can be viewed over the network by a remote client.
One approach is to code the whole GUI in HTML5 and run it from a server such as Apache; the main difficulty with this is that the GUI includes at least one, sometimes two, windows containing live video streams (without any sound) and there doesn’t seem to be a good way of streaming live video into HTML5 - especially as it really needs to be live; a few seconds’ latency would be unacceptable.
Another approach (which I’ve done already, and actually works pretty well) is just to code the GUI as a desktop application (for example using Qt), and then to view the desktop remotely using VNC or Windows Remote Desktop. This gives the required responsiveness and lack-of-latency, but has the disadvantage that the whole OS desktop is accessible and not just my one application.
So, here is my question: is there a mechanism or a framework available that would enable me to use RFB (i.e. the protocol underlying VNC) or RDP (that underlying Windows Remote Desktop) to provide remote access to a single GUI application rather than a whole desktop?
When we comparing RDP and RFB the main deference is RDP only share metadata where RBF share whole frame buffer of the screen. So RBF is slow than RDP. VNC is using RFB where windows applications like Lync using RDP.
http://sandaruwmp.blogspot.com/2014/05/remote-desktop-application-with-rdp.html Here you can see a simple RDP example
Actually you can create an application that only shares a single application and also you can use many other protocols with RDP
here https://github.com/sandaru/RDAPP in this application it uses RDP with TCP that you can select only one application to show.
In this application it shares the desktop via RDP and listen to a TCP port you can send commands such as "stop selected processes", "Focus single application" and "share whole window". RDP react according to the TCP requests.
i hope this will be useful for you
NOTE: Above Source does not contain any NAT traverse mechanism.
I am having a bit of a problem with HTML5 & WebSockets.
I have put together a very simple client / server application to pass strings to each other and all works well when I am accessing the client html page via a local file path or via http://localhost, however when I try and call it from http:// or http:// it doesn't seem to work.
The first thing the client does is check if the browser supports Web Sockets:
if (!window.WebSocket) {
_Status.innerHTML = "Web Sockets not support by this browser";
return;
}
When I browse to the page with the local host address window.WebSocket is true, but when I use anything else, the page works but window.WebSocket is false.
Am I missing anything obvious? Is it an IE permissions/trust issue?
I am using IE10 and Windows 8 Consumer Preview.
I am out of ideas. Has anyone got any ideas?
WebSockets uses TCP protocol layer to connect.
Server opens Socket and Binds it to specific Port. Then it listening port and accepting connections.
If you are trying to connect to your server, make sure that you use right external IP and you probably need to set up Port Forwarding on your router to your computer, that router will know where to redirect packets.
1) How would I connect through a proxy if I am using the Socket class to connect to a server?
2) If I am running my Flex application through Flash Player in a webbrowser and my webbrowser is configured to use a proxy, does the socket connection go through the proxy automatically?
Ideally, I would like to not have to depend on the web browser's settings, and be able to programmatically proxy the connection from my own code. By supporting proxies directly, I can compile it as a desktop AIR application and still support proxying the connection. Additionally, there may be cases where more than one socket connection will need to be created to different proxies.
Using Action Script 3 in Flex Builder 3.
Thanks.
You may not be able to do this with the vanilla Socket class, but check out this post by Christian Cantrell of Adobe (Google cache version) about a specialized socket class he wrote to allow "TCP socket connections through HTTP proxies in accordance with RFC 2817". His class, the winningly-named RFC2817Socket.as (github), is used by Open Flash Chart. As Christian notes in his post, there are some caveats and it may not work for you if your server doesn't support RFC 2817, or if there are certain other conditions which aren't met.
Note that on Windows, the Flash Player uses IE's proxy settings and ignores the settings of the actual browser you're using.
I've had a look and it doesn't seem possible to do exactly what you want to do. If you have control of a server you can route requests through a server yourself ... and Adobe has examples of this using their Flex Data Access services (BlazeDS and LiveCycle) to go through a proxy. Then again if you control your own server you can get it to proxy anyway you like ...
But I'm afraid there doesn't seem to be anyway to directly set a proxy on the client side using ActionScript.
As for Flash respecting the browsers proxy, I can't say I know from first-hand experience but the evidence from searching isn't good. Here is an article that claims flash won't use your browsers proxy setting for SOCKS on Linux and suggests you need to alter your iptables. There is also this adobe bug report suggesting it doesn't work for rtmp connections at least. Other anecdotal evidence suggests that it works sometimes (for HTTP requests) for some browsers.
So if you need to guarantee that a connection goes through a proxy it looks like you'll need to route your requests through a server and proxy from there.
You can't do that with a regular HTTP or SOCKS proxy. Flex shares browser's connection settings.
But you still can bypass that by using what they call PHP Proxy, basically a website which downloads another websites and forwards the result to you.