How can I get the connection associate with TunnelEvent?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I get the connection associate with TunnelEvent?

Ben Davis
In my extension, I'd like to get the host associated with a tunnel when it's closed, however the TunnelCloseEvent object doesn't seem to have any data associated with it that can give me the connection itself. I tried looking at the docs for GuacamoleSocket, but that doesn't seem to have host information on it.

Any suggestions?


Ben Davis
Education Director

214-442-1635  | https://boldidea.org/



Reply | Threaded
Open this post in threaded view
|

Re: How can I get the connection associate with TunnelEvent?

vnick
On Thu, Dec 5, 2019 at 10:13 PM Ben Davis <[hidden email]> wrote:
In my extension, I'd like to get the host associated with a tunnel when it's closed, however the TunnelCloseEvent object doesn't seem to have any data associated with it that can give me the connection itself. I tried looking at the docs for GuacamoleSocket, but that doesn't seem to have host information on it.


Sorry, you may have mentioned this in another post somewhere, but can you describe what you're trying to do with your extension?  I'll have to take a look and dig a little deeper, but it seems like getting the connection information from the tunnel events isn't necessarily straight-forward, and I don't even know if it's possible.  However, if you're trying to trigger something when a tunnel is closed (like shutting down a remote system, etc.), there are probably other ways to do that than monitoring those events, and we'd be happy to help you figure out the best way to make that happen.

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: How can I get the connection associate with TunnelEvent?

Ben Davis
My original goal was to shut down the remote system after a certain amount of inactivity.  However, I found another way to do this with a remote-side script that uses netstat to look for connections to the VNC port. It just runs every minute, and shuts the host down if no connections were detected for more than one hour. 

Ben Davis
Education Director

214-442-1635  | https://boldidea.org/





On Sat, Dec 7, 2019 at 7:18 AM Nick Couchman <[hidden email]> wrote:
On Thu, Dec 5, 2019 at 10:13 PM Ben Davis <[hidden email]> wrote:
In my extension, I'd like to get the host associated with a tunnel when it's closed, however the TunnelCloseEvent object doesn't seem to have any data associated with it that can give me the connection itself. I tried looking at the docs for GuacamoleSocket, but that doesn't seem to have host information on it.


Sorry, you may have mentioned this in another post somewhere, but can you describe what you're trying to do with your extension?  I'll have to take a look and dig a little deeper, but it seems like getting the connection information from the tunnel events isn't necessarily straight-forward, and I don't even know if it's possible.  However, if you're trying to trigger something when a tunnel is closed (like shutting down a remote system, etc.), there are probably other ways to do that than monitoring those events, and we'd be happy to help you figure out the best way to make that happen.

-Nick