nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.01k stars 791 forks source link

Nextcloudcmd: add support for Tor via socks5 proxy #2446

Open iootaa opened 4 years ago

iootaa commented 4 years ago

Hi there,

Expected behaviour

I'm trying to use nextcloudcmd with Tor. For that, I need use a socks5 proxy:

nextcloudcmd --logdebug --httpproxy socks5://127.0.0.1:9050 /home/amnesia/Persistent/nextcloud https://server.name

Actual behaviour

I get the following error message:

[ info nextcloud.sync.accessmanager ]: 2 "" "[...]/ocs/v1.php/cloud/capabilities?format=json" has X-Request-ID "4d7dd[...]"
[ info nextcloud.sync.networkjob ]: OCC::JsonApiJob created for "[...]" + "ocs/v1.php/cloud/capabilities" ""
[ warning nextcloud.sync.networkjob ]: QNetworkReply::NetworkError(UnknownNetworkError) "Error communicating with HTTP proxy" QVariant(Invalid)
[ info nextcloud.sync.networkjob.jsonapi ]: JsonApiJob of QUrl("[...]/ocs/v1.php/cloud/capabilities?format=json") FINISHED WITH STATUS "UnknownNetworkError Error communicating with HTTP proxy"
[ warning nextcloud.sync.networkjob.jsonapi ]: Network error: "ocs/v1.php/cloud/capabilities" "Error communicating with HTTP proxy" QVariant(Invalid)
[ debug default ] [ main(int, char**)::<lambda ]: Server capabilities QJsonObject()
Error connecting to server

(I just removed the timestamp and server name)

Client configuration

Client version: Nextcloud version 2.5.1git Using Qt 5.11.3, built against Qt 5.11.3 Using 'OpenSSL 1.1.1d 10 Sep 2019'

Operating system: Tails 4.10

Server configuration

Unknown

kn0wmad commented 1 year ago

I've noticed that the default setting on the desktop app is to use the System Proxy, however, this does not actually work when that system proxy is Tor. This may be a separate ticket, but more general Tor support would also be highly appreciated.

Edit: #901 is the ticket described