privtracker icon indicating copy to clipboard operation
privtracker copied to clipboard

Resolve IPv4 behind reverse proxy

Open dodancs opened this issue 3 weeks ago • 0 comments

Hey, I can see that at least in the log, the IPs are of my docker container that does a reverse proxy instead of the real IP:

privtracker  | 200 -    43µs      172.20.0.4:52162  GET /abc/announce     74     s:1 l:0 -  - Deluge/2.2.0 libtorrent/2.0.11.0
privtracker  | 200 -    55µs      172.20.0.4:52162  GET /abc/announce     75     s:1 l:0 -  - Deluge/2.2.0 libtorrent/2.0.11.0
privtracker  | 200 -    29µs      172.20.0.4:52162  GET /abc/announce     74     s:1 l:0 -  - Deluge/2.2.0 libtorrent/2.0.11.0
privtracker  | 200 -    38µs      172.20.0.4:52162  GET /abc/announce     75     s:1 l:0 -  - Deluge/2.2.0 libtorrent/2.0.11.0

Maybe you can check the Real-IP headers? Or X-Forwarded-For or something?

        X-Forwarded-For: 192.168.0.8
        X-Forwarded-Port: 443
        X-Forwarded-Proto: https
        X-Forwarded-Server: 9ab3ddd1d6b5
        X-Real-Ip: 192.168.0.8

Thanks!

dodancs avatar Dec 01 '25 18:12 dodancs