You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Scott <sb...@gmail.com> on 2017/08/25 00:29:49 UTC
How to use just the backend of guac
Hopefully this isn't a stupid question, but I would like to just utilize the
VNC, RDP,... functionality of guad and not use the connection management and
auth that the web interface provides. I already have a solution that
provides all of this.Is this possible? Do I just need to follow how to make
my own Web application or is there more?Also, has anyone used node.js
instead of Apache?Thanks in advance.
--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/How-to-use-just-the-backend-of-guac-tp1571.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.
Re: How to use just the backend of guac
Posted by Nick Couchman <ni...@yahoo.com>.
Scott,A few files for you to take a look at. First, on the AngularJS side:
https://github.com/apache/incubator-guacamole-client/blob/master/guacamole/src/main/webapp/app/client/types/ManagedClient.js#L208
In the getConnectString() method, you'll see that several parameters are set up to pass through to the tunnel connection endpoint, and, among those, are GUAC_DPI, GUAC_WIDTH, and GUAC_HEIGHT. Those parameters are taken off and processed in these two files:
https://github.com/apache/incubator-guacamole-client/blob/master/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java
https://github.com/apache/incubator-guacamole-client/blob/master/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequest.java
The TunnelRequest class contains the code that actually looks at the parameters and returns them; the TunnelRequestService class calls those methods and generates a GuacamoleClientInformation object that contains the required information. You can eventually see that information processed here:
https://github.com/apache/incubator-guacamole-client/blob/master/guacamole-common/src/main/java/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.java#L157
There are a few more steps in between there before it actually makes it there, but most of that is just moving through various authentication extensions and such.
Hope that helps.
Regards,Nick
== He has shown you, O man, what is good; And what does the LORD require of you But to do justly, To love mercy, And to walk humbly with your God? --Micah 6:8-- ==
On Thursday, August 31, 2017, 6:15:41 PM EDT, Scott <sb...@gmail.com> wrote:
Nick,
Thanks again for the help.
My next question is, for SSH, how does the display automatically get resized
when the web page is resized and how is the size of the SSH terminal
initialized to the size of the web page?
Right now when I bring it up it is small and appears to not resize.
Scott
--
Sent from: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/
Re: How to use just the backend of guac
Posted by Mike Jumper <mi...@guac-dev.org>.
On Thu, Aug 31, 2017 at 3:15 PM, Scott <sb...@gmail.com> wrote:
>
> Nick,
>
> Thanks again for the help.
>
> My next question is, for SSH, how does the display automatically get resized
> when the web page is resized
Changes to the size of the screen are communicated through "size" instructions:
http://guacamole.incubator.apache.org/doc/gug/protocol-reference.html#size-event-instruction
The Guacamole.Client object provides a function for sending this:
http://guacamole.incubator.apache.org/doc/guacamole-common-js/Guacamole.Client.html#sendSize
>
> and how is the size of the SSH terminal
> initialized to the size of the web page?
>
The initial screen size is communicated during the Guacamole protocol handshake:
http://guacamole.incubator.apache.org/doc/gug/guacamole-protocol.html#guacamole-protocol-handshake
The Guacamole.Client JavaScript object does not handle the handshake,
instead relying on the underlying tunnel to have taken care of that
prior to access being granted (thus enforcing the restriction that
users cannot obtain access to systems not explicitly allowed by the
web application acting as a gateway). The Guacamole Java API provides
an implementation of the handshake via ConfiguredGuacamoleSocket:
http://guacamole.incubator.apache.org/doc/guacamole-common/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.html
with the screen size being a part of GuacamoleClientInformation:
http://guacamole.incubator.apache.org/doc/guacamole-common/org/apache/guacamole/protocol/GuacamoleClientInformation.html
- Mike
Re: How to use just the backend of guac
Posted by Scott <sb...@gmail.com>.
Nick,
Thanks again for the help.
My next question is, for SSH, how does the display automatically get resized
when the web page is resized and how is the size of the SSH terminal
initialized to the size of the web page?
Right now when I bring it up it is small and appears to not resize.
Scott
--
Sent from: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/
Re: How to use just the backend of guac
Posted by Scott <sb...@gmail.com>.
Nick,
Thanks again. After I get a chance to look at the code I'll probably have
more questions.
Scott
--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/How-to-use-just-the-backend-of-guac-tp1571p1575.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.
Re: How to use just the backend of guac
Posted by Nick Couchman <ni...@yahoo.com>.
Scott,There is some example code available, both in the manual and in the github repository for guacamole-client, that should provide some guidance on how to do this. You can implement it from the ground-up, or you could use the guacamole-common component of the repository to do the core functionality and then build your web application on top of that. The guacamole-common piece provides the basic interfaces that talk to the guacd process and do the translation. Of course, if you go this route you'll need to do your implementation in Java, since that's what guacamole-common is written in.
You could go a completely different direction, if you wanted, and write it in some other server-side language, like PHP or NodeJS. I believe there was a PHP implementation out on the web somewhere once upon a time, but that was several years ago and I've not looked in a while. If you go this route, you'd more or less have to start from the ground up, writing all of the client-side components and referencing the Guacamole protocol documentation (and maybe some of the Java source code) to make whatever application you write talk to the guacd process using that protocol.
-Nick
== He has shown you, O man, what is good; And what does the LORD require of you But to do justly, To love mercy, And to walk humbly with your God? --Micah 6:8-- ==
On Thursday, August 24, 2017, 9:25:31 PM EDT, Scott <sb...@gmail.com> wrote:
Nick,Thanks for the reply. For clarification, it is a web application. Since I am really early in my investigation of this and have not really look at the web client that is provided, how easy would be to modify the client to do what I want, which is essentially take some params that provide the appropriate protocol information and the have the RDP/VNC/SSH page served back to me?Scott
View this message in context: Re: How to use just the backend of guac
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.
Re: How to use just the backend of guac
Posted by Scott <sb...@gmail.com>.
Nick,Thanks for the reply. For clarification, it is a web application.
Since I am really early in my investigation of this and have not really look
at the web client that is provided, how easy would be to modify the client
to do what I want, which is essentially take some params that provide the
appropriate protocol information and the have the RDP/VNC/SSH page served
back to me?Scott
--
View this message in context: http://apache-guacamole-incubating-users.2363388.n4.nabble.com/How-to-use-just-the-backend-of-guac-tp1571p1573.html
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.
Re: How to use just the backend of guac
Posted by Nick Couchman <ni...@yahoo.com>.
Scott,Guacamole is, really, a protocol. It's a way of converting the various remote desktop protocols - like RDP, VNC, SSH, etc., - to a single protocol. There is a Guacamole Server (guacd) and a Guacamole Client. The Guacamole Server, guacd, handles the translating RDP, VNC, SSH, and Telnet, to the Guacamole Protocol. The Guacamole Server does not implement everything necessary for you to access the connections in a web browser - you need a client that speaks the Guacmaole protocol to accomplish this.
So, the core answer to your question is, yes, you can just use guacd - you do not have to use the web client provided by the Guacamole project. However, if you're going to do this, you still need something to translate between the Guacamole protocol and whatever client type you're trying to use. If it's a web browser, you'll need to write a web application. If it's a mobile device, you'd need to implement a mobile application, etc. But, whatever client type you want to use, you have to write something that speaks the Guacamole Protocol to guacd.
Hope this helps - feel free to respond with additional questions if you have them.
Regards,Nick
== He has shown you, O man, what is good; And what does the LORD require of you But to do justly, To love mercy, And to walk humbly with your God? --Micah 6:8-- ==
On Thursday, August 24, 2017, 8:29:55 PM EDT, Scott <sb...@gmail.com> wrote:
Hopefully this isn't a stupid question, but I would like to just utilize the VNC, RDP,... functionality of guad and not use the connection management and auth that the web interface provides. I already have a solution that provides all of this.Is this possible? Do I just need to follow how to make my own Web application or is there more?Also, has anyone used node.js instead of Apache?Thanks in advance.
View this message in context: How to use just the backend of guac
Sent from the Apache Guacamole (incubating) - Users mailing list archive at Nabble.com.