Can't access TOR Proxy from Docker

76 Views Asked by At

Hi I am trying to run a python script with tor proxy via docker, I came up with this solution.

version: '3'



services:

  tor-privoxy:

    restart: always

    image: dockage/tor-privoxy:latest

    ports:

      - "9050:9050" # Tor proxy

      - "9051:9051" # Tor control port

      - "8118:8118" # Privoxy



  pastebin-app:

    build:

      context: .

    volumes:

      - ./result:/app/result

      - ./config:/app/config

    depends_on:

      - tor-privoxy

    links:

      - tor-privoxy

    environment:

      - TOR_ADDRESS=tor-privoxy


I tried to run curl --proxy socks5h://localhost:9050 'https://wtfismyip.com/yaml' but it showed me failed to connect to port 9050. I dont know why

0

There are 0 best solutions below