Docker Image: https://github.com/serjs/socks5-server
YourUsername
: Unique username for SOCKS proxyYourPassword
: Unique password for SOCKS proxyRemoteSocksHost
: IP or hostname of remote server running the proxy
Start a SOCKS5 server on the remote host that all rclone data will go through
docker run --restart=always -d --name socks5 -p 0.0.0.0:1080:1080 -e PROXY_USER=YourUsername -e PROXY_PASSWORD=YourPassword -e PROXY_PORT=1080 serjs/go-socks5-proxy
Write to a file in ~/bin
called rclone
or rcx
.
#!/bin/bash
http_proxy=socks5://YourUsername:YourPassword@RemoteSocksHost:1080
https_proxy=$http_proxy
HTTP_PROXY=$http_proxy
HTTPS_PROXY=$http_proxy
rclone "$@"
Ensure ~/bin
is in $PATH
and use rclone
or rcx
like normal
- Not recommended, last resort. Any tool will use this environment variable and can break other tools
in ~/.bashrc` write:
export http_proxy=socks5://YourUsername:YourPassword@RemoteSocksHost:1080
export https_proxy=$http_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$http_proxy
Run source ~/.bashrc
If rclone is running as a service add the below under the [Service]
line un the file
Environment="http_proxy=socks5://YourUsername:YourPassword@RemoteSocksHost:1080"
Environment="https_proxy=socks5://YourUsername:YourPassword@RemoteSocksHost:1080"
Environment="HTTP_PROXY=socks5://YourUsername:YourPassword@RemoteSocksHost:1080"
Environment="HTTPS_PROXY=socks5://YourUsername:YourPassword@RemoteSocksHost:1080"
Restart the service.