Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ultravnc_repeater: short read 10 != 250 throws EPIPE #20

Open
zxfrank opened this issue Jul 14, 2016 · 10 comments
Open

ultravnc_repeater: short read 10 != 250 throws EPIPE #20

zxfrank opened this issue Jul 14, 2016 · 10 comments

Comments

@zxfrank
Copy link

zxfrank commented Jul 14, 2016

While trying to connect to ultravnc repeater, I get the error:

{ [Error: This socket has been ended by the other party] code: 'EPIPE' }

and on the repeater

new vnc client connecting.
ULTRAVNC_REPEATER_NO_RFB: not sending RFB 000.000
ultravnc_repeater: short read 10 != 250

my settings to connect to the repeater are:

{
    "host"    : 'myrepeater.example.com',
     "port"    : '123456',
      "password": '+ID:12345678'
}

Is there a trick to make magic happen or is it just me?

thanks for your help

@sidorares
Copy link
Owner

I haven't used ultravnc repeater before, can you give a short intro on how to setup everything @zxfrank ?
Alternatively, if you can provide network dump around disconnect time that would be helpful.
Looks like ultravnc does not like something and closes connection

@zxfrank
Copy link
Author

zxfrank commented Jul 15, 2016

ultravnc repeater log only the 3 lines. The nodejs app log the error again and again and again freakin fast. It occurs on init.

I have an old version of the repeater, I will try with the latest tomorrow.

the exact string in ssvnc (proxy/Gateway) to connect is:

repeater://hostname:port+ID:_ANY_CHARS

http://www.uvnc.com/downloads/repeater/83-repeater-downloads.html

@sidorares
Copy link
Owner

thanks, I'll try to play with repeater on my side

@zxfrank
Copy link
Author

zxfrank commented Jul 15, 2016

Ok now on the latest version of the repeater I got

{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
[Error: This socket is closed.]
[Error: This socket is closed.]
[Error: This socket is closed.]
[Error: This socket is closed.]
[Error: This socket is closed.]
[Error: This socket is closed.]
[Error: This socket is closed.]

then on repeater log

UltraVnc Fri Jul 15 08:48:55 2016 > routeConnections(): new server connecting, accepting...
UltraVnc Fri Jul 15 08:48:55 2016 > acceptConnection(): connection accepted ok from ip: 127.0.0.1
UltraVnc Fri Jul 15 08:48:55 2016 > nonBlockingRead(): start
UltraVnc Fri Jul 15 08:48:58 2016 > nonBlockingRead(): returning normally
UltraVnc Fri Jul 15 08:48:58 2016 > checkIdCode(): � is not IdCode string
UltraVnc Fri Jul 15 08:48:58 2016 > acceptConnection(): mode 1 connections are not allowed, closing connection

It looks like rfb is trying to connect in standard mode instead of (oh my god I had a flash) proxy.

We need to supply proxy parameters in the connection params! like with ssvnc... Is it implemented? if not, do you have an idea where to start?

thanks

@sidorares
Copy link
Owner

What kind of proxy is that?

@sidorares
Copy link
Owner

You can pass any duplex stream as a parameter using stream option, see https://github.com/sidorares/node-rfb2/blob/master/rfbclient.js#L617

For socks proxy for example you can use code similar to https://github.com/sidorares/node-mysql2#connecting-using-custom-stream

@zxfrank
Copy link
Author

zxfrank commented Jul 15, 2016

UltraVNC Repeater http://www.uvnc.com/products/uvnc-repeater.html

is acts as a gateway, the manager connects to it and client reverse connect so you don't have to open firewall

@sidorares
Copy link
Owner

so from the client point of view repeater acts like a normal vnc server?

@zxfrank
Copy link
Author

zxfrank commented Jul 15, 2016

It depends on the mode, I use the mode 2. The repeater is like a gateway, receive connections from both sides and link them together. There's no firewall to configure, it works from anywhere.

@zxfrank
Copy link
Author

zxfrank commented Jul 15, 2016

Maybe we could get some ideas from noVNC novnc/noVNC#103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants