duplicacy icon indicating copy to clipboard operation
duplicacy copied to clipboard

The environment variable HTTP_PROXY does not work with sftp storages

Open Ossssip opened this issue 7 years ago • 5 comments

Hi, I wonder if there is a way to use duplicacy with a proxy server. Quick search reveals that proxies are somehow supported in the GUI version, but I have not find anything related to the cli version.

Ossssip avatar Dec 25 '17 17:12 Ossssip

I think you can set the proxy url in the environment variable HTTP_PROXY or HTTPS_PROXY. This is a feature provided by Go's http client library.

gilbertchen avatar Dec 26 '17 02:12 gilbertchen

I have tested it: It works well at least with OneDrive, but it does not work with sftp storages. Somehow it ignores the environment variable and tries to make a direct connection to an sftp server.

Ossssip avatar Dec 27 '17 13:12 Ossssip

Go's ssh library doesn't provide an option to connect via a proxy, so to make this work with sftp would require a significant amount of effort.

gilbertchen avatar Jan 05 '18 20:01 gilbertchen

Go's SSH library does now seem to support connecting via a proxy.

https://stackoverflow.com/questions/36102036/how-to-connect-remote-ssh-server-with-socks-proxy

ryancdotorg avatar May 15 '21 16:05 ryancdotorg

The HTTP_PROXY and HTTPS_PROXY environment variables are supposed to be for http/https requests specifically and wouldn't apply to ssh/sftp. ALL_PROXY is what you want, but that's not supported either.

ryancdotorg avatar May 20 '21 20:05 ryancdotorg