Add proper Tor setup guide
This commit is contained in:
parent
6feb20c8e8
commit
fc412afdb6
33
README.md
33
README.md
|
@ -43,18 +43,41 @@ Usage of ./gtranslate:
|
||||||
--user-agent string User-Agent header to use
|
--user-agent string User-Agent header to use
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to proxy requests through Tor network, it's a good idea to
|
# Using Tor
|
||||||
set User-Agent of Tor Browser so it will be harder to identify such
|
Routing requests through Tor has its benefits:
|
||||||
servers:
|
- Google will have a hard time tracking `gtranslate` servers as they act like normal Tor users
|
||||||
|
- You probably won't get banned as requests are made from different IPs
|
||||||
|
|
||||||
|
Despite that, it has some drawbacks:
|
||||||
|
- Much slower response time
|
||||||
|
- Might get capcha or some other junk that will block requests
|
||||||
|
- If doing the wrong thing, you might get your server compromised (in terms of anonymity)
|
||||||
|
- This feature is not tested in development
|
||||||
|
|
||||||
|
First of, you need to set up Tor daemon on the server. Here's a guide on
|
||||||
|
ArchWiki: [Tor](https://wiki.archlinux.org/index.php/tor).
|
||||||
|
|
||||||
|
With default settings, it should start a SOCKS5 proxy on localhost, port
|
||||||
|
9050.
|
||||||
|
|
||||||
|
Also, to minimize fingerprint, you need to use a very common user agent
|
||||||
|
on Tor network. And, you guessed it, get it straight from Tor Browser.
|
||||||
|
If you have one, you can just open `https://httpbin.org/headers` and
|
||||||
|
copy it from there. If not, the latest available is provided here:
|
||||||
|
[Tor Browser's User-Agent](https://tor.stackexchange.com/questions/4890/tor-browser-user-agent-strings/21524#21524)
|
||||||
|
|
||||||
|
Full setup:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./gtranslate \
|
./gtranslate \
|
||||||
--user-agent "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0" \
|
--user-agent "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0" \
|
||||||
--proxy socks5://localhost:1080 \ # Set `Socks5Proxy localhost` in Tor config
|
--proxy "socks5://localhost:9050" \
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
[Source](https://tor.stackexchange.com/questions/4890/tor-browser-user-agent-strings/21524#21524)
|
If you have managed to set it up or experienced issues with this guide,
|
||||||
|
feel free to shoot an email to my [public inbox][public-inbox] or tag
|
||||||
|
`@yerinalexey@mastodon.online` on Fediverse.
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
- Proper language selector
|
- Proper language selector
|
||||||
|
|
Loading…
Reference in New Issue