Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display correct client IP when serving stream in HLS mode behind reverse proxy #955

Closed
yix opened this issue May 25, 2022 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@yix
Copy link

yix commented May 25, 2022

Display correct client IP when serving stream in HLS mode behind reverse proxy

When serving stream in HLS mode behind reverse proxy only proxy IP is visible in the logs. Underlying context gin framework already has the solution and it can be introduced into this project with very little code change:
ctx.ClientIP() has to be used instead of the ctx.Request.RemoteAddr to get client IP.

@yuyinw
Copy link

yuyinw commented May 31, 2022

how to use client ip in yml file

@aler9 aler9 added the enhancement New feature or request label Jun 1, 2022
@aler9
Copy link
Member

aler9 commented Jun 21, 2022

This feature has been implemented; a new parameter called hlsTrustedProxies has been added to the configuration file in order to set trusted proxies:

https://github.com/aler9/rtsp-simple-server/blob/e45820b2c0e2a69beef9e4513c96e55aed822129/rtsp-simple-server.yml#L155

@aler9
Copy link
Member

aler9 commented Jun 24, 2022

fixed in v0.19.2.

@aler9 aler9 closed this as completed Jun 24, 2022
@github-actions
Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants