Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add support for writing PROXY protocol v2 to upstream #970

@frekons

Description

@frekons

Describe the feature you'd like to add to nginx

With nginx 1.13.11, support for reading version 2 of the PROXY protocol (the binary variant) was added. However, nginx also allows to write the PROXY protocol to a TCP upstream with the "proxy_protocol on;" setting in a server block. However, it seems like this is always version 1. (Implemented as ngx_proxy_protocol_write in ngx_proxy_protocol.c.)

It would be great if version 2 would be supported as well. Maybe configurable by specifying an integer in the configuration "proxy_protocol 2;". Are there any plans to implement this?

Describe the problem this feature solves

https://github.com/path-network/go-mmproxy/blob/master/proxyprotocol.go#L128C1-L129C1

go-mmproxy must use PROXYv2 for UDP. For UDP support, you would need PROXYv2 because in PROXYv1 you send PROXY headers only on first message. This implementation will solve UDP proxy problem and most of the games are using UDP protocol.

Additional context

https://trac.nginx.org/nginx/ticket/1639

https://github.com/dedok/nginx-stream-proxy-protocol-v2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions