I would like a --proxy command to use with http or socks proxy.
I know rclone support environment variables but it is not a viable option for me because I'm using Rclone with multiple providers and each time I set a proxy in a terminal, it affects the other terminal.
There is no real need for --proxy flag - the same functionality is provided by environment variables. Of course feel free to implement it if you prefer flag and post PR.
BTW environment variables do not have to be set system wide but can be set for specific command execution only:
After a while 1 of my rclone session loose connection to the proxy. I cannot be sure it logs to the other one set in other terminal, when I ran curl ipconfig.me only get a 401 move.
as an aside, this past week, i did a lot of testing running multiple proxy servers at the same time, using openvpn, wireguard, mullvad vpn+browser, firefox and so on.
always, each program would use a different proxy server, never once a problem.
and might follow this advice https://rclone.org/faq/#can-i-use-rclone-with-an-http-proxy
"""
Slightly annoyingly, there is no standard for the name; some applications may use http_proxy but another one HTTP_PROXY. The Go libraries used by rclone will try both variations, but you may wish to set all possibilities.
"""
Of course it does.
The env var is used by looots of programs and libs.
Pythons urllib, curl, wget, majority of go programs and many more. You won't even be able to use github copilot since they block vpn/proxy.
Having another way to set a proxy without affecting other programs would be a huge advantage for some people.
It would also allow you to easily use different proxies when running multiple instances of rclone.
I haven't checked what go lib is used for network but I doubt it doesn't support an additional proxy parameter.
Of course what does? I am not sure what you are saying here.
Again, what?
My statement was when you set environment variables, they are used generally in a terminal you set them in. You "can" set them globally for all time but if that's not what you want, don't do that?
You can already do that with setting environment variables.
--proxy flag would be nice thing to have - it does not exist today. But it will not allow you to do anything beyond what can be done today using env vars. This is why it is "nice to have" feature but nothing critical or "must have"