mmozeiko / RcloneBrowser

Simple cross platform GUI for rclone
https://mmozeiko.github.io/RcloneBrowser
The Unlicense
1.32k stars 415 forks source link

Feature Request: Add proxy setting #88

Open zdm9981 opened 6 years ago

zdm9981 commented 6 years ago

run like export http_proxy="http://url" on Linux

set http_proxy=http://url on Windows

then we can transfer files with proxy.

Thank you!

makksi commented 6 years ago

Hi, I'm using Rclone browser behind a proxy and it is working. You can use the proxie by setting the following environment variables in windows:

http_proxy=http://yourproxy:port; https_proxy=https://yourproxy:port

ttimasdf commented 6 years ago

In windows, set as above. In mac/linux, create a script like this,

#!/bin/sh

export http_proxy=http://proxy:port
export https_proxy=http://proxy:port

trap "exit" INT TERM
trap 'kill $(jobs -p) 2>/dev/null' EXIT

/usr/local/bin/rclone $@

chmod +x and specify this script as rclone command in settings. Then it works.

EDIT: This workaround has some flaws. The job will NOT stop even you kill it from GUI. The wrapper script will got killed instead and rclone will become a orphaned process running in background. Edit the script adding a signal trap will be good, but complicated. Now the proxy script is fine. Works like a charm.

So, +1, feature request. 😄

guoyida commented 5 years ago

!/bin/sh export http_proxy=http://proxy:port export https_proxy=http://proxy:port trap "exit" INT TERM trap 'kill $(jobs -p) 2>/dev/null' EXIT /usr/local/bin/rclone $@

could you elaborate a bit more on how to specify this script as rclone command in settings? Thanks