How to use the current user for proxy with WinSCP

1

1

I'm writing a .NET (web) application that uses WinSCP to upload files to an SFTP server. The connection to this server goes through an http proxy.

I already found out how to set proxy information (host, port, user and pass) statically, but I was wondering if there is a way to use information from the defaultProxy tag in web.config.

Getting the host and port is trivial, but I can't seem to find a way to tell WinSCP to use the current user/pass (i.e. the one the application pool is using), if useDefaultCredentials is set.

The WinSCP GUI does not have an option to use the current user, so my guess is it's not possible. But maybe I'm overlooking something?

Berend

Posted 2017-10-12T10:11:18.403

Reputation: 1 824

Answers

1

It's unfortunately not possible.

You cannot have WinSCP use the default credentials for proxy.

Neither you can retrieve the current user credentials. See Get windows proxy username/password.

Martin Prikryl

Posted 2017-10-12T10:11:18.403

Reputation: 13 764