Reverse connection

Topics: Feature requests
Jun 3, 2013 at 1:31 AM
Is possible implement reverse connection for bypass router firewall and nat policy without reconfigure this? Also how I can make encrypted connection?

Your project is very good and I try with vncviewer work fine if uncomment 2 lines for rfb. Only if setting low colours I get blank screen, but I Know is in develop stage.
Coordinator
Aug 7, 2013 at 7:41 PM
Hello,

I am trying to keep NVNC fully by the RFB Protocol standards, so i will not implement a reverse connection on in.
As far as encrypted connection is concerned, if i understood you correctly, you want to encrypt the traffic between the client and server. As far as I know, the default RFB encodings do not have encryption, but I have seen that Tight and Ultra support encryption, so if there is enough documentation and code examples available, i might try to translate one.

Anyways, you are always welcomed to modify the source code according to the licence, and add encryption and reverse connection, as long as you post the modified code.

Thanks for your interest,
T!T@N
Aug 8, 2013 at 9:05 AM
Hello. I solved this. I found a piece of source code for making gateway for various software. This is a gender changer and is listen-listen software. I changed listen socket to connect software. This work fine without touching parameters like virtual server. This work also if -listen used in vnc. Also I see some code is disabled by comments suffix for using realVNC work. Unstable but work if used compatibile settings in realVNC. Your code is fantastic. When I can I send you changes for firewall friendly connection. Thank you

Da: [email removed]
Inviato: ‎07/‎08/‎2013 22.19
A: [email removed]
Oggetto: Re: Reverse connection? [nvnc:445756]

From: T1T4N

Hello,

I am trying to keep NVNC fully by the RFB Protocol standards, so i will not implement a reverse connection on in.
As far as encrypted connection is concerned, if i understood you correctly, you want to encrypt the traffic between the client and server. As far as I know, the default RFB encodings do not have encryption, but I have seen that Tight and Ultra support encryption, so if there is enough documentation and code examples available, i might try to translate one.

Anyways, you are always welcomed to modify the source code according to the licence, and add encryption and reverse connection, as long as you post the modified code.

Thanks for your interest,
T!T@N
Aug 13, 2013 at 4:30 PM
Edited Aug 13, 2013 at 4:31 PM
This is modify for reverse connection. Using TCPClient instead of TCPListener and launch vncviewer with -listen port for reverse connection. Also can use TCPGateway from http://www.source-code.biz/tcpgateway/csharp/ with external Windows Server. Only issue tcp gateway can connect all request without check if connection is made by your clients and needed to implement authentication mechanism for prevent abuse.

This is my modification:
  public void Start()
        {
            isRunning = true;
            try
            {
                serverSocket = new TcpClient(); //here I changed tcplisten with tcpclient
                serverSocket.Connect(Gateway, Port); //here I call directly connection on start. This bypass firewall rules and not needed virtual server config in router policies
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                isRunning = false;
                //Close();
                return;
            }
            try
            {
                localClient = serverSocket.Client;
                IPAddress localIP = IPAddress.Parse(((IPEndPoint)localClient.RemoteEndPoint).Address.ToString());
                Console.WriteLine(localIP);
                stream = new NetworkStream(localClient);
                reader = new BigEndianBinaryReader(stream);
                writer = new BigEndianBinaryWriter(stream);
                clients.Add(localClient);
            }
            catch (Exception ex) { 
                Console.WriteLine(ex.ToString());
          }
           
        }