okkur / torproxy

Caddy plugin to enable easy web to tor proxying
https://torproxy.okkur.org
Apache License 2.0
35 stars 6 forks source link

Request: Pass different host to the socks listener #22

Closed tiero closed 4 years ago

tiero commented 4 years ago

I use to run caddy and tor as separate docker containers. I saw that this plugin expect to be on 127.0.0.1 and this is impossible.

Assuming a docker-compose like this, I want to be able to pass to the Caddyfile the exact hostname. This case would be tor:9050 not the local host.

Thanks

version: "3"
services:
  caddy:
    build: 
      context: github.com/abiosoft/caddy-docker.git
      args:
        - http.torproxy
    container_name: caddy
    ports:
      - 80:80
    volumes:
      - ./Caddyfile:/etc/
    depends_on: 
      - tor
    restart: unless-stopped
  tor: 
    build: .
    container_name: tor
    ports: 
      - 9050:9050
    restart: unless-stopped