linuxserver / docker-deluge

GNU General Public License v3.0
242 stars 88 forks source link

Auth failure logs contain local ip adress when container behind reverse proxy #204

Open Trteich opened 3 weeks ago

Trteich commented 3 weeks ago

Is there an existing issue for this?

Current Behavior

When container is behind reverse proxy(Nginx proxy manager in my case), web UI auth failure log entries contain adress of proxy, but not real adress of host trying to connect. All traffic is proxied by Cloudflare's network to my NPM. I've tried different settings for NPM to insert real ip to request( setting real_ip_header CF-Connecting-IP, etc.), but nothing helped

Expected Behavior

Logs should contain real ip adress of auth failed client

Steps To Reproduce

  1. Install container behing reverse proxy
  2. Proxy all traffic to your domain via Cloudflare
  3. Access to deluge container web UI
  4. Enter wrong password
  5. Auth failure logs contains locall adress of reverse proxy

Environment

- OS: Debian 11

CPU architecture

x86-64

Docker creation

docker run -d \
  --name=deluge \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e DELUGE_LOGLEVEL=error \
  -p 8112:8112 \
  -p 6881:6881 \
  -p 6881:6881/udp \
  -p 58846:58846 `#optional` \
  -v /path/to/deluge/config:/config \
  -v /path/to/downloads:/downloads \
  --restart unless-stopped \
  lscr.io/linuxserver/deluge:latest

Container logs

08:13:29 [ERROR   ][deluge.ui.web.auth         :1672] Login failed (ClientIP 192.168.1.120)
github-actions[bot] commented 3 weeks ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.