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

proxyproto: PROXY protocol net.Conn and net.Listener impl #919

Closed
wants to merge 1 commit into from

Commits on Sep 20, 2024

  1. proxyproto: PROXY protocol net.Conn and net.Listener impl

    Use github.com/pires/go-proxyproto header parsing and provide better (safer) net.Conn and net.Listener implementations.
    The Conn type is designed after tls.Conn.
    
    We never read more than header bytes from connection.
    This allows to eliminate any 3rd party readers,
    and to use the connection ReadFrom() and WriteTo() functions if provided.
    The underlying connection is available via Conn.NetConn().
    
    On context cancellation the connection is closed to terminate the paring go routine,
    and to avoid unspecified behaviour caused by double reads from header parsing and user code.
    mmatczuk committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    54d89e8 View commit details
    Browse the repository at this point in the history