bk138 / droidVNC-NG

VNC server app for Android that does not require root privileges.
GNU General Public License v2.0
1.3k stars 186 forks source link

Repeater reconnect not working w/ Guacamole relay #220

Open luyaotang opened 1 month ago

luyaotang commented 1 month ago

1. Clicking "Start Service" does not interact with the already configured connection options under "Connect to Relay Server" below. I hope that if a configuration exists, clicking "Start" should apply it, rather than requiring you to click "Connect to Relay Server" again to trigger the relay service startup.

  1. Currently, when connecting through the repeater, if the viewer disconnects, the repeater will close both sides of the connection. To use the viewer again, you have to re-trigger the connection by clicking "Connect to Relay Server" in droid-ng VNC. I hope that when the service is already running, droid-ng VNC will maintain its connection with the repeater and handle reconnections automatically.

image From the diagram, it can be seen that when the view exits, both the droid-ng VNC and the viewer connections are closed, which means that the next time the viewer connects, there is no available VNC server. It is needed for droid-ng VNC to maintain a thread that keeps the connection with the repeater active while it is in the "running" state and configured with the relay server.

Your environment (please complete the following information):

bk138 commented 1 month ago

Please don't mix up different issues in the same report. Also, please consider using the chat.

For your first question: "Start" intentionally only starts the server. For further automation, please use the Intent interface lined out in the README.

Your second issue should be handled by #200 which is in v2.5.0.

luyaotang commented 1 month ago

I tested this on the latest version 2.5.0, and the second issue still exists. The testing procedure is as follows:

  1. Set up the repeater server address on the phone, connect, and a toast message at the bottom indicates a successful connection.
  2. Use Guacamole as the viewer to connect; it connects successfully.
  3. Close the Guacamole page.
  4. At this point, check the repeater server logs, which show that both the viewer and the droidVNC-NG server have closed.
  5. Attempt to reconnect using Guacamole, but it fails to connect.
  6. Return to droidVNC-NG, click on the relay connection, and now Guacamole can connect successfully.

vnc repeater was build from https://uvnc.com/downloads/repeater/83-repeater-downloads.html

image