guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Couchman (JIRA)" <>
Subject [jira] [Commented] (GUACAMOLE-47) Get client hostname for use in guac RDP session
Date Sat, 07 Jan 2017 00:10:58 GMT


Nick Couchman commented on GUACAMOLE-47:

Okay, I've got an initial implementation of this going, which I'll link to after I get it
onto GitHub and make sure all of my changes match the contribution guidelines.  There are
some caveats:
- The easiest way to make this work is to grab the HttpServletRequest.getRemoteHost() and
getRemoteAddr() values and use those.  It's a little more complicated than just that, but
that gets what the servlet has as the remote host.  Unfortunately this doesn't always work
as expected, particularly in situations where Guacamole/Tomcat is behind a reverse proxy,
like Apache/mod_proxy or Nginx.
- Dealing with the reverse proxy issue isn't too terribly difficult - there's a X-Forwarded-For
header that is set by Apache's mod_proxy that can be passed through to the servlet.  This
has a couple of catches, though - first, it only passes through the IP address that it is
forwarding for (essentially the original REMOTE_ADDR request header), and, second, you have
to do a little bit extra Tomcat configuration to allow it to be passed through (via the RemoteIP
- To deal with proxy scenarios and get both the original REMOTE_HOST and REMOTE_ADDR values,
you have to set up custom headers in whatever you're using to proxy, and the Guacamole code
has to deal with it.  I've written the code to use the custom X-Guacamole-Client-Host and
X-Guacamole-Client-IP headers.

I'm actually going to deal with these in reverse order - check for the custom headers, first,
check for the X-Forwarded-For header, next, and finally use the getRemoteHost and getRemoteAddr

I'm happy to take comments from anyone off the bat - I'll post the forked GitHub code in a
little while.

> Get client hostname for use in guac RDP session
> -----------------------------------------------
>                 Key: GUACAMOLE-47
>                 URL:
>             Project: Guacamole
>          Issue Type: New Feature
>          Components: guacamole-client
>    Affects Versions: 0.9.9
>            Reporter: Zach Bonjour
>            Priority: Minor
> The "Clientname" variable should show the client name connected to the Apache server.
 I am not a programmer, but if I am understanding this right, there is a java servlet that
could gather that information so it can be used in the Guacamole session.
> Is this possible?

This message was sent by Atlassian JIRA

View raw message