From 9afbbc3efb102cfd9a8d773fda17c78d5937e266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Sun, 3 Mar 2013 13:31:14 +0000 Subject: [PATCH] * Testing guacamole with parameters (we need to pass in the url from where to get credentials, etc...) --- .../main/java/org/openuds/guacamole/TunnelServlet.java | 10 ++++++++-- guacamole-tunnel/src/main/webapp/index.html | 7 ++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/guacamole-tunnel/src/main/java/org/openuds/guacamole/TunnelServlet.java b/guacamole-tunnel/src/main/java/org/openuds/guacamole/TunnelServlet.java index 2b4a51471..c65f91038 100644 --- a/guacamole-tunnel/src/main/java/org/openuds/guacamole/TunnelServlet.java +++ b/guacamole-tunnel/src/main/java/org/openuds/guacamole/TunnelServlet.java @@ -17,12 +17,18 @@ public class TunnelServlet @Override protected GuacamoleTunnel doConnect(HttpServletRequest request) throws GuacamoleException { + + String data = request.getParameter("data"); + if( data == null ) + return null; + + System.out.println("Valor: " + data); // Create our configuration GuacamoleConfiguration config = new GuacamoleConfiguration(); config.setProtocol("rdp"); - config.setParameter("hostname", "dc.ad.dkmon.com"); - config.setParameter("username", "administrador"); + config.setParameter("hostname", "w7adolfo"); + config.setParameter("username", "admin"); config.setParameter("password", "temporal"); // Connect to guacd - everything is hard-coded here. diff --git a/guacamole-tunnel/src/main/webapp/index.html b/guacamole-tunnel/src/main/webapp/index.html index 34e8c50e2..c56b5dd9b 100644 --- a/guacamole-tunnel/src/main/webapp/index.html +++ b/guacamole-tunnel/src/main/webapp/index.html @@ -6,11 +6,12 @@ Simple RDP Tunneling Test - - + + + @@ -39,7 +40,7 @@ }; // Connect - guac.connect(); + guac.connect("data=1"); // Disconnect on close window.onunload = function() {