Skip to content

GUACAMOLE-567: Add specific connection stability test to tunnel implementations.#312

Merged
asfgit merged 5 commits intoapache:staging/1.0.0from
mike-jumper:tunnel-stability-test
Sep 7, 2018
Merged

GUACAMOLE-567: Add specific connection stability test to tunnel implementations.#312
asfgit merged 5 commits intoapache:staging/1.0.0from
mike-jumper:tunnel-stability-test

Conversation

@mike-jumper
Copy link
Contributor

This change corrects the behavior of the connection instability detection by adding tunnel-specific tests which are independent of the underlying Guacamole connection. Regardless of whether the remote desktop connection itself is returning data, these tests verify that the server side of the tunnel is reachable and responding.

For the WebSocket tunnel, these tests leverage the reserved opcode for tunnel-specific instructions to send a "ping" message which the tunnel is required to respond to. By sending these messages roughly every 500ms, the client side guarantees that there should always be traffic over the tunnel unless something is interrupting that traffic.

For the HTTP tunnel, these tests leverage the fact that HTTP already has a request/response pattern that is verified via the HTTP protocol. A simple "nop" instruction is sent to the Guacamole server to force the send half of the tunnel to effectively self test. If the server side of the HTTP tunnel fails to properly handle the HTTP request which results from sending an instruction, the tunnel is flagged as unstable.

…test connection stability independently of the underlying Guacamole connection.
Unlike the WebSocket tunnel, where a manual ping request/response must
be explicitly implemented, we can rely on HTTP's own request/response
to verify stability.
Copy link
Contributor

@necouchman necouchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This ended up being quite the change 😄. Going to test it out before I merge it, but should be done here in a few.

@necouchman
Copy link
Contributor

One question - is this code still Java 1.6 compatible? I was looking up the documentation on the RemoteEndpoint.Basic class, and I don't see it for 1.6 - only 1.7. Do we need to bump the target up?

@mike-jumper
Copy link
Contributor Author

It is, or at least referencing that class doesn't itself require Java 1.7. That class isn't part of Java 1.7 so much as it is part of recent versions of servlet API, which the servlet container may or may not provide. Dynamic detection of WebSocket support takes place during Guacamole's startup.

@asfgit asfgit merged commit 34bab95 into apache:staging/1.0.0 Sep 7, 2018
@mike-jumper mike-jumper deleted the tunnel-stability-test branch September 7, 2018 23:36
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

Successfully merging this pull request may close these issues.

3 participants