


If I want to add or remove proxies then I simply edit the NAMES list, run the script again, restart Docker Compose and voila! With open("docker-compose.yml", "w") as f:į.write(f" container_name: 'tor-'\n")į.write(" image: 'pickapp/tor-proxy:latest'\n") WARNING = "# Generated by create-proxies script.\n\n" To make this setup more flexible I have a script, create-proxies, which generates the contents of proxy-list.txt and docker-compose.yml. Setting the IP_CHANGE_SECONDS environment variable to 60 causes the Tor exit node used by a proxy to change every minute. There are four services defined, each of which maps port 8888 on the container to a specific host port (a sequence of ports starting at 9990 and corresponding to the ports listed in proxy-list.txt). This is my docker-compose.yml: # Generated by create-proxies script. Using Docker Compose it’s easy to spin up a cluster of Tor proxies. In order to access a truly diverse set of IP addresses I’m tapping into the Tor network via the pickapp/tor-proxy Docker image.
