Celebrating the 22th anniversary of the UltraVNC: https://forum.uvnc.com/viewtopic.php?t=38031
Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/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
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

linux repeater mode 2 + androidvnc + sc, hangs on handshake

Single Click discussions / bugs
Post Reply
shalak
Posts: 6
Joined: 2011-11-08 00:51

linux repeater mode 2 + androidvnc + sc, hangs on handshake

Post by shalak »

What steps will reproduce the problem?
1. Setting uvncrepeater, linux version in mode 2
2. connecting sc to the repeater (server is behind firewall)
3. connecting android-vnc do repeaterer

What is the expected output? What do you see instead?
Connecting...
Establishing handshake.
Please wait...

What version of android-vnc-viewer are you using?
0.5.0

Which VNC server/version are you using? On which platform?
UltraVNC Win32 Server SC 20.3, on Windows XP SP3

What device are you using?
spam Xperia Arc S (X12)

Are you using a custom ROM? If so, which?
none

Please provide any additional information below.

When connecting from desktop I'm using command (and it works!):
vncviewer.exe -connect ID:6969 -proxy repeater.address.com:5900

In normal version of vncserver (not SC) after using the "add new client" option, specifing repeater as the client, android-vnc connects just well.

Connection configuration of androidvnc:
server:
repeater.address.com
port:
5900
Repeater (repeater recognizes this as IdCode):
ID:6969

SC (Single Click) configured like following (helpdesk.txt):
[HOST]
Connection
-id 6969 -connect repeater.address.com -noregistry

Repeater is Linux version configured like fallowing (/etc/uvncrepeater.ini):
[general]
;Ports
viewerport = 5900
serverport = 5500
maxsessions = 4
logginglevel = 3
allowedmodes = 2
[mode2]
requirelistedid = 1
idlist0 = 6969

Log from repeater as fallowing (/var/log/uvncrepeater.log):
# AFTER CONNECTING SERVER:

Code: Select all

UltraVnc Sun Nov  6 14:29:46 2011 > acceptConnection(): connection accepted ok from ip: server.address.com
UltraVnc Sun Nov  6 14:29:46 2011 > nonBlockingRead(): start
UltraVnc Sun Nov  6 14:29:46 2011 > nonBlockingRead(): returning normally
UltraVnc Sun Nov  6 14:29:46 2011 > parseId(): IdCode = ID:6969
UltraVnc Sun Nov  6 14:29:46 2011 > acceptConnection():  Server sent code 6969
UltraVnc Sun Nov  6 14:29:46 2011 > findDuplicateIdIndex(): similar ID not found
UltraVnc Sun Nov  6 14:29:46 2011 > isCodeInIdList(): ID code match found (6969)
UltraVnc Sun Nov  6 14:29:46 2011 > addServerList(): Server added to list: code = 6969, index = 0
UltraVnc Sun Nov  6 14:29:46 2011 > findViewerList(): Warning, viewer not found (code = 6969)
UltraVnc Sun Nov  6 14:29:46 2011 > acceptConnection(): respective viewer has not connected yet
UltraVnc Sun Nov  6 14:29:46 2011 > nonBlockingRead(): start
UltraVnc Sun Nov  6 14:29:51 2011 > nonBlockingRead(): returning 12 bytes
UltraVnc Sun Nov  6 14:29:51 2011 > readPeerHandShake(): len = 12
# AFTER TRYING TO CONNECT android-vnc, log shows:

Code: Select all

UltraVnc Sun Nov  6 14:29:58 2011 > routeConnections(): new viewer connecting, accepting...
UltraVnc Sun Nov  6 14:29:58 2011 > acceptConnection(): connection accepted ok from ip: client.address.com
UltraVnc Sun Nov  6 14:29:58 2011 > acceptConnection(): pv = RFB 000.000
UltraVnc Sun Nov  6 14:29:58 2011 > writeExact(): start
UltraVnc Sun Nov  6 14:29:58 2011 > writeExact(): returning normally
UltraVnc Sun Nov  6 14:29:58 2011 > nonBlockingRead(): start
UltraVnc Sun Nov  6 14:29:59 2011 > nonBlockingRead(): returning normally
UltraVnc Sun Nov  6 14:29:59 2011 > parseId(): IdCode = ID:6969
UltraVnc Sun Nov  6 14:29:59 2011 > acceptConnection():  Viewer sent code 6969
UltraVnc Sun Nov  6 14:29:59 2011 > findDuplicateIdIndex(): similar ID not found
UltraVnc Sun Nov  6 14:29:59 2011 > isCodeInIdList(): ID code match found (6969)
UltraVnc Sun Nov  6 14:29:59 2011 > addViewerList(): Viewer added to list: code = 6969, index = 0
UltraVnc Sun Nov  6 14:29:59 2011 > findServerList(): server found at index 0, code = 6969
UltraVnc Sun Nov  6 14:29:59 2011 > setViewerActive(): activated viewer at index 0, code = 6969
UltraVnc Sun Nov  6 14:29:59 2011 > setServerActive(): activated server at index = 0, code = 6969
UltraVnc Sun Nov  6 14:29:59 2011 > writeExact(): start
UltraVnc Sun Nov  6 14:29:59 2011 > writeExact(): returning normally
UltraVnc Sun Nov  6 14:29:59 2011 > addRepeaterProcList(): Added proc to index=0, pid=30737, code=6969
UltraVnc Sun Nov  6 14:29:59 2011 > forkRepeater(): in child process, starting doRepeater(5, 6)
I posted this issue on google code issue board of android-vnc as well, so far with no reaction from their community.

It's weird that standard version od uvncserver works well with android-vnc, but hangs while using SC... Does anybody have an idea how to fix it?
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by B »

Check which version of UltraVNC is inside your SC package (I would think it's the current version but I don't know). When you use the "normal" version of UltraVNC Server, which version number are you using?

For some reason a lot of times roll-your-own SC-workalikes such as SCPrompt and ChunkVNC (which embed regular UltraVNC server) yield better results that UltraVNC SC.
shalak
Posts: 6
Joined: 2011-11-08 00:51

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by shalak »

As SC: UltraVNC Win32 Server SC 20.3, on Windows XP SP3
AS standard: UltraVNC Win32 Server 1.0.5


Does ChunkVNC or SCPrompt work with repeater mode 2? I'll try them out when I'm home and I'll post results.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by supercoe »

ChunkVNC was built around the concept of the repeater in mode 2 so you should have the features you want there.

That's really neat the android VNC Viewer has repeater functionality! I didn't know that as I don't have an Android device... maybe I should look into getting an emulator...
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
shalak
Posts: 6
Joined: 2011-11-08 00:51

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by shalak »

Allright, I testes both ChunkVNC and SCPrompt.

With SCPrompt, no luck, exact the same outcome as in UltraVNC SC.

I realised, that whilst android-vnc is holding on the "handshake" screen I close the connection of the SC or SCPrompt, the viewer reports null error.

With ChunkVNC however, android-vnc reports that server uses unsupported security plugin. Is it possible to compile ChunkVNC without DSM? I tried deleting lines from InstantSupport.au3:

Code: Select all

	FileInstall( "InstantSupport_Files\SecureVNCPlugin.dsm", $WorkingPath & "\SecureVNCPlugin.dsm", 1 )
and

Code: Select all

			& 'DEL /F /Q "' & $Path & '\SecureVNCPlugin.dsm"' & @CRLF _
And setting UseDSMPlugin=0 in InstantSupport_files\ultravnc.ini

But the compiler doesn't end its work - shows the VNC server configuration window and won't go any further.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by supercoe »

Ahh yes, didn't think of that... It would take a lot more than that to remove the encryption stuff...
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
shalak
Posts: 6
Joined: 2011-11-08 00:51

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by shalak »

Where should I start? Which files I have to change?
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by supercoe »

I suggest testing without any wrapper.

Get the UltraVNC server and Viewer bins (no installer) here:
http://www.uvnc.com/component/jdownload ... /5/10.html

Start winvnc.exe once and configure the settings (passwords and no encryption)

You can start a reverse connection to a repeater with this command:

Code: Select all

winvnc.exe -autoreconnect ID:1234 -connect repeater.example.com:5500 -run
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
shalak
Posts: 6
Joined: 2011-11-08 00:51

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by shalak »

As I sad in first post:
In normal version of vncserver (not SC) after using the "add new client" option, specifing repeater as the client, android-vnc connects just well.
User avatar
supercoe
400
400
Posts: 1732
Joined: 2009-07-20 21:27
Location: Walker, MN
Contact:

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by supercoe »

Sorry I missed that part.
This is however the first good reason to add a "No Encryption" option to ChunkVNC in order to support android viewers. :)
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by B »

Dude, don't forget you needed that to get the OSX connectivity working too!
shalak
Posts: 6
Joined: 2011-11-08 00:51

Re: linux repeater mode 2 + androidvnc + sc, hangs on handsh

Post by shalak »

SOLVED

I removed lines with reference to SecureVNCplugin.dsm in InstantSupport.au3:

Code: Select all

	FileInstall( "InstantSupport_Files\SecureVNCPlugin.dsm", $WorkingPath & "\SecureVNCPlugin.dsm", 1 )
and

Code: Select all

			& 'DEL /F /Q "' & $Path & '\SecureVNCPlugin.dsm"' & @CRLF _
But I left UseDSMPlugin=1, ChunkVNC compiled with no problem, and android-vnc works well. I suggest changing the scope of IDs in chunkvnc, who needs 6 digits? And it should be posibble to compile with permanent ID.

The only problem I now have is, that after setting server to "install as service" it disconnects from repeater and doesn't establish new connection after becoming the service.
Post Reply