my $ssh = Net::OpenSSH->new($host, gateway => { proxies => ['ssh://intermediate_host', 'ssh://another_host', 'http://proxy:8080'] } );