Open Nokia808 opened 3 years ago
Personally, I don't think this is within the scope of the application and any proxy settings should probably be system-wide. What do you think, @rafaelmardojai ?
@fushinari Well, at a time it is more suitable to use system-wide solution. But at other cases it is more suitable to make only certain applications bypass the blockage .......
However, the final decision is up to the developer(s).
Actually, I think I agree with you that it's a good addition. But it adds a layer of complexity that I'm not sure I want. Also, to implement it properly, we would need py-googletrans
to also support proxy settings, but sadly, it's still marked as a TODO.
@fushinari It is very okay to be in "TODO" list ! Take your time.
I agree with this. And would also add, as a suggestion, the user IP to be somehow replaced by another IP who would then be the one presenting directly the translation request to Google Translator. This would further justify the Dialect usage over the Google Translator website through the browser. I do not know the feasibility of this but it would be great... thanks!
No need for that, we are in Linux :)
You can just use the torsocks
tool to wrap dialect to use tor. (It is safer)
You can use environment variables, for example:
export http_proxy=socks5://127.0.0.1:9050
export https_proxy=$http_proxy
Or to directly start dialect with them:
http_proxy=socks5://127.0.0.1:9050 https_proxy=$http_proxy dialect
The
python-requests
library supports it, thats why it will work for dialect.
Read this for more info: https://wiki.archlinux.org/title/Proxy_server#Environment_variables
You might be able to also use a sandboxing tool to apply a proxy, but I didn't test it.
The python-requests library supports it, thats why it will work for dialect.
Just for the record, Dialect doesn't use python-requests
but libsoup
. And it should respect the proxy settings from GNOME Settings.
Oh
So python-requests
is used for Google translate only?
gTTS
uses it as I saw here. And I saw it here in the flatpak mainfest file.
After some search it should work with libsoup
also for other translate services: https://mail.gnome.org/archives/libsoup-list/2009-February/msg00018.html
So python-requests is used for Google translate only? gTTS uses it as I saw here. And I saw it here in the flatpak mainfest file.
Only Google text-to-speech (gTTS), Google translation is implemented with libsoup.
After some search it should work with libsoup also for other translate services: https://mail.gnome.org/archives/libsoup-list/2009-February/msg00018.html
Yeah, the env vars you pointed should work with libsoup.
Hi.
This may be strange request from title ! But it's usefulness is that: 1) unfortunately, there are certain situation in which even such sites like online translations are blocked ! In such cases this feature will be extremely useful ... 2) to improve privacy of users, like utilizing Google via Tor network to avoid Google anti-privacy hanger....
If this feature accepted to be added as future enhancement, then it should allow SOCKS 5 proxy & should allow user to select UDP or TCP or automatic(UDP/TCP) protocol.
Thank you.