GuacLite

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


    Because of these extra features it requires persistence (a database)
    and api calls to add/update users and hosts in order to use it. Also,
    because it is written in Java any extension to the system must also be
    written in Java and served alongside it in a Tomcat or other JSP
    server.

    The Javascript application, called "guacamole-common-js", is a
    browser-native client for guacd with the exception that it speaks
    websocket rather than direct tcp. Therefore it requires a service that
    can provide that relay. It also sends keep-alive (ping/pong) messages
    that don't conform to the guacamole protocol and that the proxy must
    filter out and reply to.

MOTIVATION AND COMPONENTS

    This project exists to allow non-Java projects that wish to use
    guacamole-common-js to access a guacd service, without having to
    conform to the usage expectations of guacamole-common, and without
    having to alter that application via Java. It provides a toolkit for
    implementing a frontend server/client to guacd via Perl and

README  view on Meta::CPAN

    The current supported version of the protocol is 1.3.0

 Guacd Websocket Tunneling Plugin

    GuacLite::Plugin::Guacd is a plugin that provides a helper method to
    establish a websocket connection between a client and a guacd service
    via a configured (but not connected) GuacLite::Client::Guacd instance.
    It initiates the guacd connection and triggers the handshake, it then
    passes messages between the guacd connection and the client's
    websocket, monitoring backpressure between them, and handling the
    keep-alive messages.

    In the future, passing a connected guacd client should be possible, but
    it hasn't been implemented yet.

 Utilities

    GuacLite::Util provides utilies for using the system. Currently it only
    provides one function which can bundle the guacamole-common-js files
    into a single javascript file and provide an initialize function to
    defer loading the javascript until necessary, which is required by some

lib/GuacLite.pm  view on Meta::CPAN


In theory any system could connect to guacd but in practice there is a major client, the Java application called "guacamole-common".
It is a server which serves a Javascript application and provides a websocket <-> tcp proxy/relay between the javascript application and guacd.
It also has user, group, and host management, authentication, and policy management.

Because of these extra features it requires persistence (a database) and api calls to add/update users and hosts in order to use it.
Also, because it is written in Java any extension to the system must also be written in Java and served alongside it in a Tomcat or other JSP server.

The Javascript application, called "guacamole-common-js", is a browser-native client for guacd with the exception that it speaks websocket rather than direct tcp.
Therefore it requires a service that can provide that relay.
It also sends keep-alive (ping/pong) messages that don't conform to the guacamole protocol and that the proxy must filter out and reply to.

=head1 MOTIVATION AND COMPONENTS

This project exists to allow non-Java projects that wish to use guacamole-common-js to access a guacd service, without having to conform to the usage expectations of guacamole-common, and without having to alter that application via Java.
It provides a toolkit for implementing a frontend server/client to guacd via Perl and Mojolicious, without any built-in business logic (user management, host configuration).
It provides the following components, each of which are independent and may be used with any Mojolicious application to provide or embed remote access via a guacd service.

=head2 Guacd Client

L<GuacLite::Client::Guacd> is a Perl/L<Mojolicious> client that communicates with a guacd service.
It configures all relevant parameters for communicating with the guacd service and opening a connection to the remote host (including performing the requisite handshake).

The current supported version of the protocol is 1.3.0

=head2 Guacd Websocket Tunneling Plugin

L<GuacLite::Plugin::Guacd> is a plugin that provides a helper method to establish a websocket connection between a client and a guacd service via a configured (but not connected) L<GuacLite::Client::Guacd> instance.
It initiates the guacd connection and triggers the handshake, it then passes messages between the guacd connection and the client's websocket, monitoring backpressure between them, and handling the keep-alive messages.

In the future, passing a connected guacd client should be possible, but it hasn't been implemented yet.

=head2 Utilities

L<GuacLite::Util> provides utilies for using the system.
Currently it only provides one function which can bundle the guacamole-common-js files into a single javascript file and provide an initialize function to defer loading the javascript until necessary, which is required by some newer browsers.

=head2 Example Web Application

share/public/guaclite.js  view on Meta::CPAN

        setState(STATE_CONNECTING);

        try {
            tunnel.connect(data);
        }
        catch (status) {
            setState(STATE_IDLE);
            throw status;
        }

        // Ping every 5 seconds (ensure connection alive)
        pingInterval = window.setInterval(function() {
            tunnel.sendMessage("nop");
        }, 5000);

        setState(STATE_WAITING);
    };

};

/**



( run in 0.356 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )