Proxy settings with custom format (works in Filezilla, but not WinSCP)
Hi
I am trying to access an ftp server through a proxy server. I managed to get it working in Filezilla, but cannot get it working in WinSCP. I even tried importing the Filezilla site, but each time I get the response:
If I use the "Generate Session URL/Code..." option the following settings are revealed:
I also tried these sessionOptions which seemed logical, but here I get a timeout.
What am I doing wrong and what are the right settings?
I am trying to access an ftp server through a proxy server. I managed to get it working in Filezilla, but cannot get it working in WinSCP. I even tried importing the Filezilla site, but each time I get the response:
Connection failed.
Authentication failed.
Connection failed.
User Access denied.
Usage: USER username@hostname proxyusername
PASS password
ACCT proxypassword
If I use the "Generate Session URL/Code..." option the following settings are revealed:
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
HostName = "proxyhost",
PortNumber = 21,
UserName = "username@hostname proxyusername",
};
using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);
// Your code
}I also tried these sessionOptions which seemed logical, but here I get a timeout.
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
HostName = "hostname",
PortNumber = 21,
UserName = "username",
Password = "password",
};
sessionOptions.AddRawSettings("FtpProxyLogonType", "7");
sessionOptions.AddRawSettings("ProxyHost", "proxyhost");
sessionOptions.AddRawSettings("ProxyUsername", "proxyusername");
sessionOptions.AddRawSettings("ProxyPassword", "proxypassword");What am I doing wrong and what are the right settings?