EvotecIT / Transferetto

Small PowerShell module with FTPS/SFTP functionality
MIT License
55 stars 14 forks source link

Not working behind a proxy #19

Closed ericfran closed 2 years ago

ericfran commented 2 years ago

Hi, seems it doesn't work behind a proxy or is there some setting/parameters that could be set to make it works ?

regards, Eric

ericfran commented 2 years ago

is there a way to set a proxy setting ?

PrzemyslawKlys commented 2 years ago

Haven't had time to look at it yet.

From what I can see: https://github.com/robinrodricks/FluentFTP/blob/master/FluentFTP.CSharpExamples/ConnectProxySocks5.cs it's supported. Would just need a different definition to start with. There are also 4 versions of proxy - https://github.com/robinrodricks/FluentFTP/wiki/FTPS-Proxies so to support them all would require some gymnastics.

So requires code changes.

ericfran commented 2 years ago

HiThanksYes I saw in the Fluentftp the proxy settings so I wa staying to find the proxy settings 😉RegardsSent from my iPhoneOn 2 Nov 2022, at 09:14, Przemysław Kłys @.***> wrote: Haven't had time to look at it yet. From what I can see: https://github.com/robinrodricks/FluentFTP/blob/master/FluentFTP.CSharpExamples/ConnectProxySocks5.cs it's supported. Would just need a different definition to start with. There are also 4 versions of proxy - https://github.com/robinrodricks/FluentFTP/wiki/FTPS-Proxies so to support them all would require some gymnastics. So requires code changes.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

PrzemyslawKlys commented 2 years ago
# Login via UserName/Password via proxy
$Client = Connect-FTP -Server 'test.rebex.net' -Verbose -Username 'demo' -Password 'password' -ProxyHost '192.252.216.81' -ProxyPort 4145 -ProxyType FtpClientSocks5Proxy
$List = Get-FTPList -Client $Client
$List | Format-Table
Disconnect-FTP -Client $Client

# Login via UserName/Password with Proxy
$Client = Connect-FTP -Server 'test.rebex.net' -Verbose -Username 'demo' -Password 'password' -ProxyHost '104.37.135.145' -ProxyPort 4145 -ProxyType FtpClientSocks4aProxy
$List = Get-FTPList -Client $Client
$List | Format-Table
Disconnect-FTP -Client $Client

This seems to work, but I am not really sure - it's free proxy.