Docker container for gtranslate
This is a simple Docker wrapper for the Google Translate scraper gtranslate by yerinalexey. gtranslate is a lightweight frontend for Google Translate without trackers, developed in Go.
Download or copy the docker-compose.yml file of this repository,
edit the ports if needed and run docker compose up -d
. Then, you can access to the ip of the machine
you've deployed the container plus the port (i.e. http://192.168.0.3:5000
) and start translating.
As in the source program, you can also use the API exposed by gtranslate.
$ curl 'http://192.168.0.3:5000/api?from=es&to=en&text=Hola'
Hello
gtranslate comes with support for deploying the server and route its traffic through the Tor Network. As stated by yerinalexey on gtranslate source code repo, the usage of Tor has some advantages but also drawbacks:
Routing requests through Tor has its benefits:
- 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
If you want to use this Docker image of gtranslate with Tor support, you will have to use the
docker-compose-tor.yml file. Download it, rename to docker-compose.yml
, change
the port(s) if needed, and deploy with docker compose up -d
. This Docker compose file comes along with the
tor-socks-proxy image, that allows gtranslate to use it as a
proxy server.
This time, when you execute a translation query, gtranslate will route your petition through the Tor network instead of your WAN connection.