Skip to content

docs(tuns): Document how to access client IPs#8

Closed
mac-chaffee wants to merge 1 commit intopicosh:mainfrom
mac-chaffee:real-ip
Closed

docs(tuns): Document how to access client IPs#8
mac-chaffee wants to merge 1 commit intopicosh:mainfrom
mac-chaffee:real-ip

Conversation

@mac-chaffee
Copy link
Copy Markdown
Contributor

Services running behind tuns.sh can access the client IP via X-Forwarded-For header, which is set by Caddy: https://caddyserver.com/docs/caddyfile/directives/reverse_proxy

I chose to document this here instead of the sish docs because sish just passes these headers along; it doesn't set them itself.

The use-case for this is enforcing IP bans or IP allow-lists for services running on tuns.sh.

@antoniomika
Copy link
Copy Markdown
Member

sish actually does set these itself :)

https://github.com/antoniomika/oxy/blob/master/forward/rewrite.go#L23

Probably best to add these there and here.

@mac-chaffee
Copy link
Copy Markdown
Contributor Author

Oh haha, I even pushed these changes to a sish fork first before I moved them here 🤦‍♂️

Okay will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants