Hi

I'm playing with guacamole and implementing very simple web application. It
doesn't have any authentication and is based web socket and only supports
SSH connection

Anything is fine except after successful connection to remote host, guacd
doesn't respond to anything!

The connection and login is successful and the home directory of remote
server is rendered in my browser, but nothing happens for keyboard inputs
afterwards.

I have logged anything. keys are sent from front-end and are received and
sent to gaucd in my web app successfully, but guacd responds to none of
them!

The connection is alive cause the "sync" instruction is sent from both
sides,

I have tried anything related to coding and using different versions of
guacamole libraries, none of them fixed the problem

here's my front-end code:

   <script>
            function hello(){
                var tunnel = new Guacamole.WebSocketTunnel("socket");
                var client = new  Guacamole.  Client(tunnel);

                client.connect();

 
document.getElementById("display").appendChild(client.getDisplay().getElement());

                var keyboard = new  Guacamole.  Keyboard(document);
                keyboard.onkeydown = function (keysym) {
                    client.sendKeyEvent(true, keysym);
                }

                keyboard.onkeyup = function (keysym) {
                    client.sendKeyEvent(false, keysym);
                }
            }

        </script>

and here's where i send instructions to guacd:

        GuacamoleWriter writer = this.guacamoleTunnel.acquireWriter();
        writer.write(message.getPayload().toCharArray());
        this.guacamoleTunnel.releaseWriter();

and here's where i create tunnel:

       GuacamoleSocket guacamoleSocket = new ConfiguredGuacamoleSocket(
                new InetGuacamoleSocket("localhost", 4822),
                guacamoleConfiguration

        );

        this.guacamoleTunnel = new DelegatingGuacamoleTunnel(
                new SimpleGuacamoleTunnel(guacamoleSocket)
        );

and also there's a thread which is listening to guacamole tunnel to read
and send instructions from guacd to front-end

what am i missing? what's wrong? any help is appreciated

Regards

Reply via email to