@GET
    @Path("protocol")
    public ProtocolInfo getProtocol() throws GuacamoleException {

        // Pull protocol name from underlying socket
        String protocol = tunnel.getSocket().getProtocol();
        if (protocol == null)
            throw new GuacamoleResourceNotFoundException("Protocol of tunnel is not known/exposed.");

        // If there is no such protocol defined, provide as much info as is
        // known (just the name)
        ProtocolInfo info = environment.getProtocol(protocol);
        if (info == null)
            return new ProtocolInfo(protocol);

        // All protocol information for this tunnel is known
        return info;

    }
Retrieves the underlying protocol used by the connection associated with
this tunnel. If possible, the parameters available for that protocol are
retrieved, as well.

@return
    A ProtocolInfo object describing the protocol used by the connection
    associated with this tunnel.

@throws GuacamoleException
    If the protocol used by the connection associated with this tunnel
    cannot be determined.
guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java