Skip to content

[Feature Request] Support proxy protocol #7508

@manuelluis

Description

@manuelluis
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/

Activity

stale

stale commented on Sep 16, 2019

@stale

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.

added
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implemented
on Sep 16, 2019
added a commit that references this issue on Aug 18, 2020
dd337e1
zeripath

zeripath commented on Feb 14, 2021

@zeripath
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

manuelluis commented on Feb 14, 2021

@manuelluis
ContributorAuthor

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

zeripath commented on Feb 14, 2021

@zeripath
Contributor

So I think my PR does do that IIRC

added a commit that references this issue on Aug 21, 2022
943753f
added a commit that references this issue on Aug 28, 2022
80bdb5f
locked and limited conversation to collaborators on May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @lunny@manuelluis@zeripath

      Issue actions

        [Feature Request] Support proxy protocol · Issue #7508 · go-gitea/gitea