harababurel / gcsf

a FUSE file system based on Google Drive
MIT License
2.36k stars 88 forks source link

Dynamic Proxy Support #31

Open erenoglu opened 6 years ago

erenoglu commented 6 years ago

Hi, Can there be a dynamic proxy support for GCSF? I'm roaming between proxy limited and open networks (ie work & office). When in office, use of proxy is mandatory, no direct access to Google Drive. But if GCSF supports proxy, could it be intelligent enough to try to direct as well when it can't reach the proxy, and vice versa. If proxy is set, try proxy, if can't connect, try direct. After given period ie 1 minute, if direct connection times out and is not possible (ie I went to work), then try to connect through proxy. If connected, use it until it times out again (ie I went home), then try direct.

erenoglu commented 6 years ago

Alternatively it can check a PAC file each time it connects and applies the rules given there, or connect direct if it can't reach the PAC file server.

harababurel commented 6 years ago

This might be achievable using something like hyper-proxy, but there is a chance that it requires changes to the Drive API library itself instead of GCSF. I will look into it and see what I can do.

caryyu commented 3 years ago

This(https://github.com/rofl0r/proxychains-ng) can work:

~/.proxychains.conf


strict_chain
proxy_dns
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000

[ProxyList]
http 127.0.0.1 7890
> proxychains4 -q -f ~/.proxychains.conf gcsf login caryyu