I am trying to instantiate client for guacamole in the example here
// Instantiate client, using an HTTP tunnel for communications.
var guac = new Guacamole.Client(
new Guacamole.HTTPTunnel("tunnel")
);
This is from the example here https://guacamole.incubator.apache.org/doc/gug/writing-you-own-guacamole-app.html
Can I possibly do this if/when I have the servlet (tunnel) on a different host that the html file?
Yes, you can connect to a Guacamole HTTP tunnel hosted on a different domain. You will need to specify the full URL to the tunnel (rather than the relative URL
"tunnel"
), as well as the optionalcrossDomain
parameter when creating theGuacamole.HTTPTunnel
:http://guacamole.incubator.apache.org/doc/guacamole-common-js/Guacamole.HTTPTunnel.html
For example:
Using Guacamole's WebSocket tunnel is also an option, as cross-origin restrictions do not apply there.