with-authinfo-kludge: Trim default port from `authinfo-kludge' argument.
[with-authinfo-kludge] / with-authinfo-kludge
index fae87b5..f3bb428 100755 (executable)
@@ -592,6 +592,8 @@ sub fix_server_config ($) {
   $s->{"_proxy_sockdir"} = undef;
   $s->{"_proxy_server"} = defined $s->{"via"} ?
     $s->{"sshbind"} : $s->{"remote"};
+  $s->{"_proxy_server"} =~ s/:119$//;
+  $s->{"_proxy_server"} =~ s/^\[(.*)\]$/$1/;
   $s->{"_sshkid"} = undef;
   $s->{"_ssh_master"} = undef;
 }