[GH-ISSUE #674] Real IP when dufs is behind proxy #411

Closed
opened 2026-04-08 16:52:41 +03:00 by zhus · 2 comments
Owner

Originally created by @luckman212 on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/sigoden/dufs/issues/674

Sorry if this has been asked already but I searched and didn't find (also looked in the source)

Is there a way to get the dufs log to show the "real" IP of the client when behind a reverse proxy like Cloudflare tunnel or Tailscale funnel?

E.g. any support for showing CF-Connecting-IP, True-Client-IP, or X-Forwarded-For headers?

Originally created by @luckman212 on GitHub (Feb 28, 2026). Original GitHub issue: https://github.com/sigoden/dufs/issues/674 Sorry if this has been asked already but I searched and didn't find (also looked in the source) Is there a way to get the dufs log to show the "real" IP of the client when behind a reverse proxy like [Cloudflare tunnel](https://developers.cloudflare.com/fundamentals/reference/http-headers/) or [Tailscale funnel](https://tailscale.com/docs/features/tailscale-funnel)? E.g. any support for showing `CF-Connecting-IP`, `True-Client-IP`, or `X-Forwarded-For` headers?
zhus closed this issue 2026-04-08 16:52:41 +03:00
Author
Owner
<!-- gh-comment-id:3978868460 --> @sigoden commented on GitHub (Mar 1, 2026): https://github.com/sigoden/dufs?tab=readme-ov-file#log-format <img width="1312" height="1321" alt="Image" src="https://github.com/user-attachments/assets/87f32d75-ba42-4efc-94a1-97597f1f44e9" />
Author
Owner

@luckman212 commented on GitHub (Mar 1, 2026):

Might be helpful to document that the fields must be written with underscores, not hyphens. In my testing, this works

--log-format '$http_X_FORWARDED_FOR  $status  "$request"'

but this does not

--log-format '$http_X-Forwarded-For  $status  "$request"'
<!-- gh-comment-id:3979085216 --> @luckman212 commented on GitHub (Mar 1, 2026): Might be helpful to document that the fields must be written with underscores, not hyphens. In my testing, this works ``` --log-format '$http_X_FORWARDED_FOR $status "$request"' ``` but this does _not_ ``` --log-format '$http_X-Forwarded-For $status "$request"' ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#411