ckcr4lyf / kiryuu

A highly performant HTTP bittorrent tracker (WIP)
Do What The F*ck You Want To Public License
13 stars 3 forks source link

NGINX (or general reverse proxy) compatibility #25

Open ckcr4lyf opened 1 year ago

ckcr4lyf commented 1 year ago

Currently we take the IP address from source directly

It would be nice if we can put it behind NGINX, and get the IP via header such as X-Forwarded-For.

This should be a configurable property, since in cases where we do not have a reverse-proxy we don't want to "trust" this header as a source of truth for the IP.

ckcr4lyf commented 1 year ago

https://github.com/ckcr4lyf/kiryuu/blob/156bded92de9d56efcb428331e2d8ef05082d786/src/main.rs#L53-L61