Commit ac7ed26c authored by Antoine Millet's avatar Antoine Millet
Browse files

Added a forward method on host clients

parent 871c5da4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -28,5 +28,12 @@ class HostClient(Client):
        """
        return self.proxy.rshell_wait(label, _timeout=None)

    def forward(self, port, destination='127.0.0.1'):
        """ Create a forwarding tunnel on this client and return it.
        """
        tun = self.conn.create_tunnel()
        self.proxy.forward(tun.label, port, destination)
        return tun


Client.register_client_class(HostClient)