VNC Server & Client : Source Code For Sale

sfsameer

Well-Known Member
Licensed User
Longtime User
I would like to make a few suggestions for this new version, as well as help explain a few things that may not be clear:

With VNC you have a "host" and "viewer".

- The "Host" is the device that you want to view/control, so it is acting like a webserver. You could connect to the host like a browser connects to a webserver and the "Host" generate the screenshots like a webserver would generate webpages.

- The VNC "Viewer" is like a browser in the above example, you direct the vnc viewer to connect to a vnc host and then the viewer will show you the streaming screenshots from the host (and allow you to send keystrokes and mouse movement to the host device).

Typically to connect to a host, you just need the host's IP address and port number and password - that's is. You would then enter this info into the viewer and the viewer would connect to the host and then allow the viewer to see and control the host.

Often the host would be your client's PC or wireless device. However, their device might be behind a firewall or a cellphone network who's IP address often changes (and a lot of cellular companies don't allow "incoming" connections to cell phones). In these situations, it's not possible for the viewer to connect "to" the host.

Below are two problem scenarios (like the one just mentioned above) and my suggestions for addressing them that I hope [U]sfsameer[/U] would consider for this next version:

1) "Variable" Host, "Fixed" viewer:

The "Host" (the client) is behind a firewall, or is running on a device with a changing IP (cell phone) and/or doesn't allow for incoming connections.

The "Viewer" (the support company, ie "Me") is a desktop PC with a fixed IP address and a firewall/router that can be configured to route incoming connections to the PC's viewer app.

Solution: Allow for the host and viewer apps to perform a "reverse connection". This way, the "viewer" on my PC would be configured to "listen" for an incoming connection from a host. Since my PC is at a fixed IP address, I can provide that address and the configured/forwarded port to the client so that they can enter it into their "host" app. The host app would make a connection into my viewer app and then I could see and control the client's device from my PC. This method eliminates the problem in which the host app can not accept incoming connections, but the viewer app can.

2) "Variable" Host, "Variable" Viewer:

The "Host" (the client) is behind a firewall, or the host is on a device with a changing IP (cell phone) and/or doesn't allow for incoming connections.

The "Viewer" is also behind a firewall, or running on a device who's IP address changes and/or doesn't allow incoming connection.

Solution: Setup a "Proxy" to connect the two to each other.

For this scenario, a proxy would be run on a cloud server and below is my suggestion on how it would work:

1) The "host" app would be designed to make short repeating connections every 5 second or so to this "proxy", basically telling the proxy that this particular host is ready for a connection.
2) The "Viewer" app would then connect to this proxy and the proxy will return a list of hosts that are ready for a connection to the viewer app. When I select a host from the list, the proxy will then return an IP address and port number that the viewer app will then use to connect to tat host. The proxy will then act as a true proxy and reroute all the packets from the viewer app to the host app and visa versa using the IP address and port number the proxy setup to do this exchange. It should route these packets directly between the input and output sockets without the use of a database - this way throughput will be maximum and server load be minimum.

By utilizing a "proxy" for this scenario, it would allow the client to run the host app on their smartphone over a cellular network, and then allow me to control (offer remote support) the client's device from my smartphone which is also operating over a cellular network.

I hope all this makes sense and I look forward to any comments on this.
Hello Dear,

Thank you very much for the detailed for the explanation ♥

About the firewall and the proxy :
-We will do the following, once the project is running the user will be asked to set a port, once the user sets a port the project will open the port in the firewall, just like anydesk or teamviewer by adding it automatically to inbound/outbound rules

Once the port is added to the firewall, the local connection will be available and accessible even if the firewall is on.

-If the user wants to connect publicly, then there are 2 options :
1- open the port in the router - simple enough to do
2- setting up a proxy server (VPN) and connect to it - also simple enough to do.

*We may add a proxy server by combining our VPN project with this project, but first we need to see if it's going to effect the performance :)
 

JohnC

Expert
Licensed User
Longtime User
*We may add a proxy server by combining our VPN project with this project, but first we need to see if it's going to effect the performance :)

First, thank you for reading my post and I totally understand that a "proxy" function will not be part of the first release of this new VNC source code.

I do want to just express a few thoughts for when you do add the proxy feature...

I understand when you talk about automatically setting up new rules for a firewall, or using a VPN to connect the host and viewer together. But I think these methods will require either a configurable firewall or require the user to manually setup and install a VPN - both of which may not work easily over a cellular connection.

This is how I hope the "proxy" feature will work:

1) The end user will simply run a "host" app on their device which will then display some unique connection "code".
2) I will enter that connection code into the "viewer" app running on my phone and then I can connect and see/control the user's device even if we both are on a cellular network.

It would be great if everything could work just that simple (no firewall rules, no vpn needed). This way I can Easily offer Immediate support to my clients without them having to jump through hoops to setup anything.
 

sfsameer

Well-Known Member
Licensed User
Longtime User
This is how I hope the "proxy" feature will work:

1) The end user will simply run a "host" app on their device which will then display some unique connection "code".
2) I will enter that connection code into the "viewer" app running on my phone and then I can connect and see/control the user's device even if we both are on a cellular network.
Just to understand it 100% from our side, if entering a code in the host side and the client wants to connect to the host by entering the code, wouldn't that need a middle-ware server? but the whole point of VNC is Peer-To-Peer direct connections without the need of any middle-ware servers

Let us know what you think of the following so we can start developing it right away :
Once the client connects to the host (Either by Code or IP: port) a 15 seconds timeout countdown will start.
Once the countdown reaches zero and without any successful connection was made, the client will then use the alternative connection (Automatically), which is :
-Middle ware server : In case the host is unable to set up the public connection or connected to a cellular network.
The middle ware server is a proxy project that sends/receives requests between the host and the client

Once the client finds the host in the proxy server then the connection will be established.

Sounds good? :)
 

JohnC

Expert
Licensed User
Longtime User
Just to understand it 100% from our side, if entering a code in the host side and the client wants to connect to the host by entering the code, wouldn't that need a middle-ware server? but the whole point of VNC is Peer-To-Peer direct connections without the need of any middle-ware servers

Sorry for the confusion. Yes, a VNC host and client connection is strictly a "fixed" connection requiring only the host's IP address, port and password.

I am happy that your first release of this source code will work this way.

My original post suggested two additional connection methods:

1) Reverse connection
2) Proxy connection

The "proxy" method can be complex to implement and I totally understand that it will not be part of the first release of this product.

But, I was hoping that you could support a "Reverse" connection method so that the host will connect to the viewer using an IP address and port number.

This way, the user running the host app can select "Perform Reverse Connection" and then I would give the client user my ip address and port number and then the host app would connect to the viewer app running on my PC and allow me to control the user's device.

This method would not require any middle-an proxy - it's simply allowing the connection to be made from the host to the viewer instead of the normal way of connecting the viewer to the host. This method makes it easy for me to support a clients device which is behind a firewall.

In other words, if your host and viewer source code could support "reverse connections", I could create a custom b4A app that would be hard-coded with my pc's IP address and port number into it. This way, I could simply start the viewer app in "Reverse Connection Mode" on my end, and then the user would simply run the custom B4A Host app on their device and then I could immediately control their device very easily.
 

sfsameer

Well-Known Member
Licensed User
Longtime User
Sorry for the confusion. Yes, a VNC host and client connection is strictly a "fixed" connection requiring only the host's IP address, port and password.

I am happy that your first release of this source code will work this way.

My original post suggested two additional connection methods:

1) Reverse connection
2) Proxy connection

The "proxy" method can be complex to implement and I totally understand that it will not be part of the first release of this product.

But, I was hoping that you could support a "Reverse" connection method so that the host will connect to the viewer using an IP address and port number.

This way, the user running the host app can select "Perform Reverse Connection" and then I would give the client user my ip address and port number and then the host app would connect to the viewer app running on my PC and allow me to control the user's device.

This method would not require any middle-an proxy - it's simply allowing the connection to be made from the host to the viewer instead of the normal way of connecting the viewer to the host. This method makes it easy for me to support a clients device which is behind a firewall.

In other words, if your host and viewer source code could support "reverse connections", I could create a custom b4A app that would be hard-coded with my pc's IP address and port number into it. This way, I could simply start the viewer app in "Reverse Connection Mode" on my end, and then the user would simply run the custom B4A Host app on their device and then I could immediately control their device very easily.
Dear the project is not separate projects, meaning the client and the host are in the same software (PC and Android)
Meaning when the user opens the app, he can become a client (viewer) or a host (server) without having to download 2 separate apps (android)/software (PC)
and the same thing goes for the PC

unlike RealVNC, you have to download 2 separate softwares, one for a server and the other for a client

our approach is very different, our approach is 1 software that can act as a client and a server in the same time.

So the reverse connection is already built in the project since the start :)
 

JohnC

Expert
Licensed User
Longtime User
Let us know what you think of the following so we can start developing it right away :
Once the client connects to the host (Either by Code or IP: port) a 15 seconds timeout countdown will start.
Once the countdown reaches zero and without any successful connection was made, the client will then use the alternative connection (Automatically), which is :

-Middle ware server : In case the host is unable to set up the public connection or connected to a cellular network.
The middle ware server is a proxy project that sends/receives requests between the host and the client
Once the client finds the host in the proxy server then the connection will be established.
Sounds good? :)

I am confused about why you are using a time out. The way I was thinking of using the proxy mode is this...

I have a bunch of remote unattended windows PCs that act as a simple controller that controls very large LED electronic signs that display transportation information like bus route times. Currently I am using GoToAssist (GTA), and in order to use their system I need to install their "host" app on all those remote PC's. Then each of these "host" apps repeatedly "ping" the GTA servers telling their servers that each PC is ready for a connection.

Then, when I want to control one of these remote PC's, I run the GTA "viewer" app and it will list all the remote PC's that I can connect to. I then select one of the remote pc's, and after a small delay, my viewer app is connected to the host app running on that remote PC so I can then control it and do what I need to do.

So, as you can see, you can't use timeout because you want all the host pc's to be available 24/7 so I can connect to them at any time.
 

JohnC

Expert
Licensed User
Longtime User
Dear the project is not separate projects, meaning the client and the host are in the same software (PC and Android)
Meaning when the user opens the app, he can become a client (viewer) or a host (server) without having to download 2 separate apps (android)/software (PC)
and the same thing goes for the PC

unlike RealVNC, you have to download 2 separate softwares, one for a server and the other for a client

our approach is very different, our approach is 1 software that can act as a client and a server in the same time.

So the reverse connection is already built in the project since the start :)

I totally understand that you are saying your project will be just app that can run in either "host" or "viewer" mode.

So, are you saying that even if your app is configured to be in "host" mode, I can get it to make an "outgoing" connection to "viewer" mode app?

And are you also saying that I can configure your app to be in "viewer" mode, but yet it will wait for an incoming connection from a remote app running in "host" mode?
 

sfsameer

Well-Known Member
Licensed User
Longtime User
I totally understand that you just have one app.

So, are you saying that even if the app makes an "outgoing" connection, it can still run in "host" mode?

And I can run a version of the app on my PC in the "viewer" mode, but yet instead of making an outbound connection, it will instead "wait" for an incoming connection from a remote app running in "host" mode?
Yes exactly, it can be a host and a client (incoming/outgoing) at the same time
 

sfsameer

Well-Known Member
Licensed User
Longtime User
I am confused about why you are using a time out. The way I was thinking of using the proxy mode is this...

I have a bunch of unattended window devices that act as a simple controller that controls very large LED electronic signs that display transportation information like bus route times. Currently I am using GoToAssist (GTA) and in order to use their system I need to install their "host" app on all my PC's. Then each of these "host" apps repeatedly "ping" the GTA servers telling the servers that each PC is ready for a connection.

Then, when I want to control one of these PC's, I run the GTA "viewer" app and it will list all the remote PC's that I can connect to. I then select one of the remote pc's, and after a small delay, my viewer app is connected to the host app running on that remote PC so I can then control it and do what I need to do.

So, as you can see, you can't use timeout because you want all the host pc's to be available 24/7 so I can connect to them at any time.
The timeout is a way for the project to do 2 things :
1- Connect to the host locally and publicly
2- in case the host is not available publicly nor locally it will start search in the proxy server as suggested above and if it finds the host then it will start connecting to it

We can change the option from a timeout to a radio button if you would like, the radio button will have 2 options :
1- Local/Public
2- Through proxy server

What do you think ? :)
 

JohnC

Expert
Licensed User
Longtime User
Yes, the radio button would be good, this way if I already know a connection is not available publicly, I can simply start a proxy connection right away instead of having to wait for other method to timeout.

OK, so it looks like the first release will have reverse connection ability built-in - excellent!

And a future version will allow a host and viewer (both running on a cellular connection) to connect to each other using a proxy server.

Is this correct?
 

JohnC

Expert
Licensed User
Longtime User
I see that a future update will include a B4A version.

So, what devices will the first version of this app run on?
 

sfsameer

Well-Known Member
Licensed User
Longtime User
I see that a future update will include a B4A version.

So, what devices will the first version of this app run on?
-The first release version will contain the following :
-B4J VNC Client and server

Also i think we will have enough time to create the B4A client as well :)
 

JohnC

Expert
Licensed User
Longtime User
I just noticed that my posts might cause a little confusion because I posted multiple scenarios for how I would like to use the future "proxy" (middleware) ability of this project.

I have two completely different scenarios of how this project would be useful to me...

1) First scenario is to install this app (operating in host mode) on multiple "unattended" android devices that are being used to control outdoor electronic displays. These android devices are located inside cabinets at remote locations. Since these "host" apps are running inside a remote outdoor cabinet, there are no humans around to interact with the host app in any way, so these host-mode apps must be able to run continuously unattended and simply wait for an incoming connection over a cellular network. Then, through the proxy, I can connect to any one of them at any time from my PC or smartphone so I can then service/update that electronic sign remotely.

2) The second scenario is to create a custom B4A and/or B4i version of this app that the user can simply install on their device. Then when they need help with something on their device (like to show them how to turn on a feature in their phone), they will run the app and it will display a code that they will then tell me what the code is. I will then run a "viewer" mode of the app on my device/PC and enter that code. The two versions of the app will then connect to each other, through the proxy, so that I can control the user's device even though one or both of us are using a cellular connection.

I hope this clears up any confusion on my desired uses of this "proxy" (middleware) ability when it is eventually released.
 
Last edited:

hibrid0

Active Member
Licensed User
Longtime User
I use VNC many years ago. And many flavors of it. Reflectors and other things. The problem with it was the reconnection fail a lot.
Then test many tool for remote support like Teamviewer, simple help, Screenconnect, splashstop and many more. After test all Features I bought Screenconnect selfhosted solution.

The Screenconnect will be installer in my own box Linux or Windows, Just open 2 ports and very stable connection, reconnection system work great, file transfer, server side web interface, clients for Windows, Linux, macos and Android (very poor performance and Just for some brands ??‍♂️??‍♂️). But I love this software, If I use Teamviewer I feel I'm using a very old technology, now VNC is very old and less rich on features.

Maybe you will test it and get inspiration from it.
 

sfsameer

Well-Known Member
Licensed User
Longtime User
Hello Dear,

The problem with it was the reconnection fail a lot.

Managing the re-connection is pretty simple to do so it wont be any problem :)

Screenconnect is a Copy & Paste of teamviewer and Anydesk , which we have already developed and released 2 versions of (Teamviewer alternative), the difference between Screenconnect and VNC is the technology which is RFB, The way the connection is handled (Screenconnect, teamviewer, anydesk,etc... require middle ware server and Database) while VNC is a direct connection and everything happens in real-time so it's faster, more reliable, and of course most importantly : more secured, because your data (mouse clicks, keyboard strokes, clipboard, etc...) are not saved in a cached server or a database, they happen per session and real-time in VNC.

After trying, testing, and even stress testing we saw the real power of VNC, so i would 100% recommend it :)
 

hibrid0

Active Member
Licensed User
Longtime User
Hello Dear,



Managing the re-connection is pretty simple to do so it wont be any problem :)

Screenconnect is a Copy & Paste of teamviewer and Anydesk , which we have already developed and released 2 versions of (Teamviewer alternative), the difference between Screenconnect and VNC is the technology which is RFB, The way the connection is handled (Screenconnect, teamviewer, anydesk,etc... require middle ware server and Database) while VNC is a direct connection and everything happens in real-time so it's faster, more reliable, and of course most importantly : more secured, because your data (mouse clicks, keyboard strokes, clipboard, etc...) are not saved in a cached server or a database, they happen per session and real-time in VNC.

After trying, testing, and even stress testing we saw the real power of VNC, so i would 100% recommend it :)
Well in my case I love ScreenConnect, not jus have remote connection, have 3 types of connection:

Support:
Here we create a session, the user connecto a web portal, put the code generate on the admin and click on connect or an arrow, then the system generate an excutable for the platfform (Windows, Mac, Linux or Android), and have many methods to launch the excutable.
The excutable content the script to connect to our server.

Meet.
The admin create the meet, and share the link with all users, all users will connect to listen, speak, view or paint on the screen.
This is part less powerful, but work.

Unantended.
The admin generate the excutable with a tag to identify the group of devices, with the generate file we wil install on many devices and added to the group to identify. For windows will generate .exe or msi.

On the admin panel we have a role panel, to create our technicians, limit to group, limit functions or more.
The system have be extended with Plugins or addons.

In the detail of every device connected, we have a lot of information about hardware, software, IPs, mini screenshot, small remote console for excute small scripts or some command needed on terminal withou interrupt to the user, the clasic chat sesion script.

Toolbox, we will upload many tools to out server and will be avalaible to 1 click on the remote sesion, this feature is avalaible on the sesion for 1 device or excute by lot, selecting 1 group or the machines we want. We will have an nice script and installers library to one click.

OCR, if we see an error we dont need to write manual, just select to ocr tool, map the zone and the system search on google, bing or yahoo.

Another great feature is something called, Backstage sesion, we will connect to this backstage sesion and will work with 2 terminals on the start 1 cmd and 1 powershell, where we will continue working on the remote machine without interrup to the user.


Talking about the speed, I tested it and in my opinion Splashtop have the best speed I tested. But a tool for remote support is not just about speed.
Teamviewer have a great performance and screenconnect have less performance but is not really to worry.
We have all control in out sessions, the session will be recorded on the server side, change the port for communications etc.

This tool is not teamviewer style is more Logmein Rescue or Bomgar Style.


VNC have a lot of clients and integrated with a lot of products on virtualization systems, but is not the best performance. I like noVNC on Proxmox.

My love for this tool is very great. But not as much as B4X. ???
 
Last edited:

sfsameer

Well-Known Member
Licensed User
Longtime User
Well in my case I love ScreenConnect, not jus have remote connection, have 3 types of connection:

Support:
Here we create a session, the user connecto a web portal, put the code generate on the admin and click on connect or an arrow, then the system generate an excutable for the platfform (Windows, Mac, Linux or Android), and have many methods to launch the excutable.
The excutable content the script to connect to our server.

Meet.
The admin create the meet, and share the link with all users, all users will connect to listen, speak, view or paint on the screen.
This is part less powerful, but work.

Unantended.
The admin generate the excutable with a tag to identify the group of devices, with the generate file we wil install on many devices and added to the group to identify. For windows will generate .exe or msi.

On the admin panel we have a role panel, to create our technicians, limit to group, limit functions or more.
The system have be extended with Plugins or addons.

In the detail of every device connected, we have a lot of information about hardware, software, IPs, mini screenshot, small remote console for excute small scripts or some command needed on terminal withou interrupt to the user, the clasic chat sesion script.

Toolbox, we will upload many tools to out server and will be avalaible to 1 click on the remote sesion, this feature is avalaible on the sesion for 1 device or excute by lot, selecting 1 group or the machines we want. We will have an nice script and installers library to one click.

OCR, if we see an error we dont need to write manual, just select to ocr tool, map the zone and the system search on google, bing or yahoo.

Another great feature is something called, Backstage sesion, we will connect to this backstage sesion and will work with 2 terminals on the start 1 cmd and 1 powershell, where we will continue working on the remote machine without interrup to the user.


Talking about the speed, I tested it and in my opinion Splashtop have the best speed I tested. But a tool for remote support is not just about speed.
Teamviewer have a great performance and screenconnect have less performance but is not really to worry.
We have all control in out sessions, the session will be recorded on the server side, change the port for communications etc.

This tool is not teamviewer style is more Logmein Rescue or Bomgar Style.


VNC have a lot of clients and integrated with a lot of products on virtualization systems, but is not the best performance. I like noVNC on Proxmox.

My love for this tool is very great. But not as much as B4X. ???
We promise you that the b4x Vnc will be much better and smoother than the ones you tried before :)
 
Top