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

[Feature Request] Support proxy protocol #7508

Closed
manuelluis opened this issue Jul 17, 2019 · 4 comments · Fixed by #12527
Closed

[Feature Request] Support proxy protocol #7508

manuelluis opened this issue Jul 17, 2019 · 4 comments · Fixed by #12527
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality

Comments

@manuelluis
Copy link
Contributor

Support proxy protocol connections for HTTP/HTTPS and SSH, so we can have the originating ip in the gitea log if we are behind a proxy.

https://www.haproxy.com/blog/haproxy/proxy-protocol/

@lunny lunny added the type/enhancement An improvement of existing functionality label Jul 18, 2019
@stale
Copy link

stale bot commented Sep 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Sep 16, 2019
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Sep 16, 2019
@stale stale bot removed the issue/stale label Sep 16, 2019
zeripath added a commit to zeripath/gitea that referenced this issue Aug 18, 2020
This PR adds functionality to allow Gitea to sit behind an
HAProxy and HAProxy protocolled connections directly.

Fix go-gitea#7508

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath
Copy link
Contributor

OK @manuelluis I have put a PR up to support this - but I think we need to be clear why Gitea needs to be aware of the proxy itself.

@manuelluis
Copy link
Contributor Author

If gitea is behind a proxy like haproxy or nginx and we like to have the original ip in the gitea logs, we can use also the X-Forwarded-For header if the connections are HTTP or the proxy handle the HTTPS connections.
But in the case of SSH connections or if gitea handle the HTTPS and we don't break the SSL in the proxy, with the proxy protocol we can have the original ip.

@zeripath
Copy link
Contributor

So I think my PR does do that IIRC

zeripath added a commit that referenced this issue Aug 21, 2022
This PR adds functionality to allow Gitea to sit behind an
HAProxy and HAProxy protocolled connections directly.

Fix #7508

Signed-off-by: Andrew Thornton <[email protected]>
vsysoev pushed a commit to IntegraSDL/gitea that referenced this issue Aug 28, 2022
This PR adds functionality to allow Gitea to sit behind an
HAProxy and HAProxy protocolled connections directly.

Fix go-gitea#7508

Signed-off-by: Andrew Thornton <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants