Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Multi-viewer support and changing ports

Simple, Free, Open Source UltraVNC Wrapper Supporting Windows and Mac OSX
Post Reply
kameleon
Posts: 5
Joined: 2012-10-22 15:15

Multi-viewer support and changing ports

Post by kameleon »

I have been testing ChunkVNC over the weekend and am liking what I see so far. I have a few questions though.

1. Is there a way to enable multiple viewers to connect to a single instant support session? Sometimes we need two or more of us to look at a end users problem at the same time.

2. Would it be possible to change the port 5901 to something like say port 80 and it still work? Our provider only allows outside ports 80 and 443 to be open so we are good on the 443.

Thanks for the super product!
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: Multi-viewer support and changing ports

Post by supercoe »

1) Sorry the Repeater only supports one viewer per server, although I've dreamed of this feature.

2) For sure, whatever port you wish should work just fine. :)
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
kameleon
Posts: 5
Joined: 2012-10-22 15:15

Re: Multi-viewer support and changing ports

Post by kameleon »

Thanks for the fast reply. Now, I want to test the ultravnc_repeater.pl script since I would rather leave a small linux VM running to handle these connections rather than a full windows machine. If I read it correct the ports are optional as is the -r. However I am not sure how I should do this if I am using port 80 instead of 5901. All I will have open to the outside is 80 and 443. Nothing else. What woudl be the correct syntax on that?


Also, I am testing the port 80 deal but am running into a problem. I have it compiled with the following settings:

WAN and LAN are set properly for my setup
Viewer: 80
Server 443

But when I try to connnect to the server I get "Failed to connect to server !" and it is trying to connnect to port 5980, not 80. Is this a config issue or somethign I can work around?
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: Multi-viewer support and changing ports

Post by supercoe »

Here is the documentation inside of Karl's repeater:
ultravnc_repeater.pl:
perl script implementing the ultravnc repeater
proxy protocol.

protocol: Listen on one port for vnc clients (default 5900.)
Listen on one port for vnc servers (default 5500.)
Read 250 bytes from connecting vnc client or server.
Accept ID:<string> from clients and servers, connect them
together once both are present.

The string "RFB 000.000\n" is sent to the client (the client
must understand this means send ID:... or host:port.)
Also accept <host>:<port> from clients and make the
connection to the vnc server immediately.

Note there is no authentication or security WRT ID names or
identities; it is up to the client and server to completely
manage that aspect and whether to encrypt the session, etc.

usage: ultravnc_repeater.pl [-r] [client_port [server_port]]

Use -r to refuse new server/client connections when there is an existing
server/client ID. The default is to close the previous one.

To write to a log file set the env. var ULTRAVNC_REPEATER_LOGFILE.

To run in a loop restarting the server if it exits set the env. var.
ULTRAVNC_REPEATER_LOOP=1 or ULTRAVNC_REPEATER_LOOP=BG, the latter
forks into the background. Set ULTRAVNC_REPEATER_PIDFILE to a file
to store the master pid in.

Set ULTRAVNC_REPEATER_NO_RFB=1 to disable sending "RFB 000.000" to
the client. Then this program acts as general TCP rendezvous tool.

Examples:

ultravnc_repeater.pl
ultravnc_repeater.pl -r
ultravnc_repeater.pl 5901
ultravnc_repeater.pl 5901 5501

env ULTRAVNC_REPEATER_LOOP=BG ULTRAVNC_REPEATER_LOGFILE=/tmp/u.log ultravnc_repeater.pl ...
So you should be able to do:
ultravnc_repeater.pl 80 443


Let me know if that doesn't work out.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
kameleon
Posts: 5
Joined: 2012-10-22 15:15

Re: Multi-viewer support and changing ports

Post by kameleon »

Right. I had the repeater setup properly. My problem is the viewer tries to connect to port 5980 instead of 80. I have read that when you use a two digit port vncviewer thinks it should be in the 5900 range hence the 5980. Maybe switch the server to 80 and run viewer on 443? Just thought of that so I may try that Monday.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: Multi-viewer support and changing ports

Post by supercoe »

Ahh yes, that "feature" of the viewer.... I forgot about that, sorry.

I'd have to do some testing of the viewer to remember what was going on there.

In the mean time, if you're running the repeater locally and you don't need viewer connections from outside of your LAN just run it at 5901.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
kameleon
Posts: 5
Joined: 2012-10-22 15:15

Re: Multi-viewer support and changing ports

Post by kameleon »

The reason I need port 80 to work is so that I can have viewers outside our network. I just tested reversing the ports and running the client on 443 and the server on 80 and it seems to work like a charm. I am about to do some outside testing to verify and will report my findings.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: Multi-viewer support and changing ports

Post by supercoe »

Great detective work, glad to see you've figured it out!
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: Multi-viewer support and changing ports

Post by supercoe »

YY has a solution that also can work:

https://forum.ultravnc.net/viewtopic.ph ... 378#p93378
Yes, both UltraVNC server and viewer are interpreting the port number in this way.

This may be has its purpose: to make it able run as the old VNC that using a parameter called Display Number (a 2-digit number). I'm not sure the exact meaning this parameter, but its syntax is the same as specifying a port no, only it must be a 2-digit number.

If you ask the viewer to connect to a remote host of display number #, the viewer (in general) will use the port 5900+#


So UltraVNC follows this convention, but it has a way to overcome this problem:
Using double colon before the port number, then UltraVNC server and viewer will always treat the specified number as a port number, and will not +5900 to it.

e.g.:
xx.xx.xx.xx::80

Here is a fix if you want to modify ChunkViewer.au3 LINE ~172 and recompile.
Notice that the only change is double colon between address and port.

Code: Select all

			; Mac InstantSupport values are 100000 to 200000, higher values are for Windows
			If $IDNumber < 200000 Then

				; Start Viewer without encryption for Mac
				If $LANMode = 0 Then
					ShellExecute( @ScriptDir & "\Bin\vncviewer.exe", "-proxy " & $RepeaterAddress & ":" & $RepeaterViewerPort & " ID:" & $IDNumber & " -quickoption " & $Quality & " -keepalive 1" )
				Else
					ShellExecute( @ScriptDir & "\Bin\vncviewer.exe", "-proxy " & $RepeaterAddressLAN & ":" & $RepeaterViewerPort & " ID:" & $IDNumber & " -quickoption " & $Quality & " -keepalive 1" )
				EndIf

			Else

				; Start Viewer with encryption for Windows
				If $LANMode = 0 Then
					ShellExecute( @ScriptDir & "\Bin\vncviewer.exe", "-proxy " & $RepeaterAddress & "::" & $RepeaterViewerPort & " ID:" & $IDNumber & " -quickoption " & $Quality & $strAutoScale  & " -keepalive 1 -dsmplugin SecureVNCPlugin.dsm" & $strPassword)
				Else
					ShellExecute( @ScriptDir & "\Bin\vncviewer.exe", "-proxy " & $RepeaterAddressLAN & "::" & $RepeaterViewerPort & " ID:" & $IDNumber & " -quickoption " & $Quality & $strAutoScale & " -keepalive 1 -dsmplugin SecureVNCPlugin.dsm" & $strPassword )
				EndIf

			EndIf
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
kameleon
Posts: 5
Joined: 2012-10-22 15:15

Re: Multi-viewer support and changing ports

Post by kameleon »

I ended up just swapping the 80/443 and leaving it that way. The only other mod I did was to remove the dsm plugin so we can connect from our android devices and support users that way. :)
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: Multi-viewer support and changing ports

Post by supercoe »

Perfect! I just wanted to post another option for the readers. :)
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
Post Reply