Answer the question
In order to leave comments, you need to log in
How to correctly register a proxy-server for puppeteer with a link to a docker container with tor-proxy?
Good afternoon,
I made it on the side for the scrapper using 2 containers -
node (for puppeteer) and tor-socks-proxy
(I tried to build with and without networks, the result is the same):
version: '3.7'
services:
node:
container_name: app_node
build: ./docker/containers/node
volumes:
- ./app:/var/www
- ./volumes/node/nginx/:/var/log/nginx/
ports:
- 3002:3000
working_dir: /var/www
restart: always
tty: true
networks:
- myapp
tor:
container_name: app_tor
image: peterdavehello/tor-socks-proxy:latest
ports:
- 9150:9150
restart: always
networks:
- myapp
networks:
myapp:
driver: bridge
export const LAUNCH_PUPPETEER_OPTS = {
args: [
..
'--proxy-server=socks5://tor:9050'
]
};
curl --socks5-hostname 127.0.0.1:9150 https://ipinfo.tw/ip
docker exec -i -t 5bdddac72709 curl --socks5-hostname 127.0.0.1:9150 https://ipinfo.tw/ip
docker exec -it 03c2c7be89f8 curl --socks5-hostname tor:9150 https://ipinfo.tw/ip
'--proxy-server=socks5://127.0.0.1:9050'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question