Open Mikaela opened 2 years ago
It turns out the comment in #626 is wrong and the corrent environment variable to set is either https_proxy
(I didn't try) or all_proxy
which also accepts socks5 and works:
flatpak run --env=all_proxy=socks5://127.0.0.1:9050/ io.github.NhekoReborn.Nheko//master
However that makes matrix.org
accounts not connect and terminal be flooded with html Cloudflare captchas, but I imagine that is a server-side problem.
Cloudflare doesn't like tor, iirc.
Just commenting as I'm a prolific tor user and not being able to use tor with nheko is preventing me and others from using it.
Please note that other clients do not trigger the Cloudflare problems.
Normally this would be a server side issue as Mikaela points out and in fact I had such a problem that was resolved by opening the protections against Tor. However, with Nheko and Nheko alone I still get the disconnects. So I suspect that Nheko is spamming the connection somehow.
The problem occurs across multiple homeservers, engaging across various federated rooms.
I've been using env HTTP_PROXY=socks://127.0.0.1:9050 HTTPS_PROXY=socks://127.0.0.1:9050 /usr/bin/flatpak run …
with nhekoreborn for quite a while now with great success (i have a firewall AND if i omit these env nheko never connects of course)
But I use nice homeservers so they don't ask for captchas.
Also i was able to connect through the SAML login of one of my providers with success
Cloudflare doesn't like tor, iirc.
Nope, because they can't fingerprint you, That is why a program like this needs proxy socks5h support. This both as CLI and inside the GUI as default startup variable
I've been using env HTTP_PROXY=socks://127.0.0.1:9050 HTTPS_PROXY=socks://127.0.0.1:9050
Use torsocks and drop the flatpack as flatpack is tracking = antiprivacy
The Problem
As per https://github.com/Nheko-Reborn/nheko/pull/626, proxy support should be configurable by environment variable
http_proxy
. Howeverflatpak run --env=http_proxy=http://127.0.0.1:8118/ io.github.NhekoReborn.Nheko//master
(with torrcHTTPTunnelPort 8118 IsolateDestAddr PreferIPv6 IsolateSOCKSAuth
) still doesn't go through Tor.The Solution
My preferred solution would be in two parts:
--proxy-server=socks5://127.0.0.1:9050
so it can be scripted or specified in launcher etc.In my opinion also when connection to the proxy fails, Nheko shouldn't connect to the server without proxy if one is configured and instead show a warning.
Alternatives
No response
Additional context
My testing method included running
flatpak run --env=http_proxy=http://127.0.0.1:8118/ io.github.NhekoReborn.Nheko//master
and then opening Element Web and performing a clear cache and reload and Element Web restart which still resulted into Element Web claiming the two sessions were connecting from the same IP address.Happens in the latest version