On Sat, Jun 25, 2016 at 6:03 AM, Владимир Фучеджи <[email protected]> wrote:
> Hello. I need some support about your product. > My partner in business set to me task to create some like module to our > exists ticket system: create interface to connect to guacamole server with > next creating remote desktop connection. > Our system is writen on PHP with jQuery. As you unserstand, i have a lot of > problems with it. But can do many. > So, at end i have some technical questions. > 1. How generate hash at end of "user link" (like "#/client/MwBjAG15c3Fs"), > if i received from guacamole such data as: ip (name), protocol, identifier, > parentIndetifier? I receive it from > > http://sever_name/guacamole/api/data/mysql/connectionGroups/ROOT/tree?token= > <token>. > How custom is the interface you will be implementing? If you are planning to use the API alone, and not build off the full web application, you will not need to worry about the specifics of our AngularJS UI, the authentication system, etc. If you do truly need to generate the client identifier string (it's not a hash - it's base64-encoded data), take a look at this thread: https://lists.apache.org/thread.html/006ad37c88d7e93725f767450016870e831d630483280d6fd18e13f1@1464203141@%3Cuser.guacamole.apache.org%3E > 2. How to use this hash next? > The client identifier (again, not a hash) is used only by the client-side JavaScript, which decodes the string into its components: the connection identifier, type, and datasource identifier. This data, along with information about the browser's size and level of support for certain image, audio, and video types is submitted when establishing the tunnel. This information is passed purely via normal HTTP parameters. 3. Your web interface solution receive some data from > http://sever_name/guacamole/websocket-tunnel?token= > > <token>&GUAC_DATA_SOURCE=mysql&GUAC_ID=5&GUAC_TYPE=c&GUAC_WIDTH=1920&GUAC_HEIGHT=904&GUAC_DPI=96&GUAC_AUDIO=audio%2Fogg&GUAC_AUDIO=audio%2Fmp4&GUAC_AUDIO=audio%2Fmpeg&GUAC_AUDIO=audio%2Fwebm&GUAC_AUDIO=audio%2Fwav&GUAC_VIDEO=video%2Fogg&GUAC_VIDEO=video%2Fmp4&GUAC_VIDEO=video%2Fwebm > So, from where it get such params as: GUAC_WIDTH, GUAC_HEIGHT, GUAC_AUDIO, > GUAC_VIDEO? > What you are showing here is the data passed to the WebSocket tunnel during the initial connection attempt. The information is both generated from the client identifier and pulled from the browser. The parameters themselves are documented within the source of the web application: https://github.com/apache/incubator-guacamole-client/blob/065548fcdd885a8f15cbb936f49a60cf9f08b414/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java#L36-L99 This is specific to our web application, however. If you are implementing your own application using the API, you can dictate what information is passed to the tunnels, if any, and how exactly that information will be interpreted. You don't need to write your application to handle data, authentication, etc. in exactly the way we do just because it's what we did. > 4. And the main question: how i can create view for remote desktop > connection using PHP, native JS or jQuery and your clear Guacamole lib > (without AngularJS and so on)? > I have find such article in your manual: > https://guacamole.incubator.apache.org/doc/gug/guacamole-common-js.html > But here is no answer, how create connect by user params. > > Please, help me with this problems or give links on exists solutions. > There is also a tutorial in the manual which covers the absolute basics, and should give you an idea of how to get started: http://guacamole.incubator.apache.org/doc/gug/writing-you-own-guacamole-app.html The tutorial only covers getting the HTTP tunnel, etc. working, but by doing this you should at least get a feel for how the API works in general, and how to move forward by consulting the API docs. If you have any further questions, just post back to the mailing lists and we'll try to help. Thanks, - Mike
