wok-next annotate mosh/stuff/patches/mosh.patch @ rev 20594

xcursor-obsidian: update wget URL.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Apr 16 01:07:29 2018 +0300 (2018-04-16)
parents ee7238bfeb84
children
rev   line source
pascal@19992 1 --- a/scripts/mosh.pl
pascal@19992 2 +++ b/scripts/mosh.pl
pascal@19991 3 @@ -347,8 +347,10 @@
pascal@19991 4 open(STDERR, ">&STDOUT") or die;
pascal@19991 5
pascal@19991 6 my @sshopts = ( '-n' );
pascal@19991 7 + my @dbopts = ( );
pascal@19991 8 if ($ssh_pty) {
pascal@19991 9 push @sshopts, '-tt';
pascal@19991 10 + push @dbopts, '-t';
pascal@19991 11 }
pascal@19991 12
pascal@19991 13 my $ssh_connection = "";
pascal@19991 14 @@ -395,8 +397,13 @@
pascal@19991 15 # proxy to break mysteriously.
pascal@19991 16 $ENV{ 'SHELL' } = '/bin/sh';
pascal@19991 17 my $quoted_proxy_command = shell_quote( $0, "--family=$family" );
pascal@19991 18 + my $host = $userhost; $host = $1 if ($userhost =~ m{@(.*)});
pascal@19991 19 + my $ssh = join(' ', @ssh);
pascal@19991 20 + my $port = 22; $port = $1 if ($ssh =~ m{-p *(\d+)});
pascal@19991 21 + push @dbopts, ('-J', "$quoted_proxy_command --fake-proxy -- $host $port");
pascal@19991 22 push @sshopts, ( '-S', 'none', '-o', "ProxyCommand=$quoted_proxy_command --fake-proxy -- %h %p" );
pascal@19991 23 }
pascal@19991 24 + @sshopts = @dbopts if (`@ssh -V 2>&1` =~ m{Dropbear});
pascal@19991 25 my @exec_argv = ( @ssh, @sshopts, $userhost, '--', $ssh_connection . "$server " . shell_quote( @server ) );
pascal@19991 26 exec @exec_argv;
pascal@19991 27 die "Cannot exec ssh: $!\n";