pires / go-proxyproto

A Go library implementation of the PROXY protocol, versions 1 and 2.
Apache License 2.0
491 stars 108 forks source link

Introduce HeaderProxyFromAddrs #31

Closed emersion closed 4 years ago

emersion commented 4 years ago

Clients usually need to create a Header they'll WriteTo the underlying connection.

This commit allows users to easily create a Header from a source and destination net.Addr. If the net.Addr cannot be represented by proxyporoto, the transport information is left unspecified.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.7%) to 91.892% when pulling ccbb3647bbc98a41f0cace704ac83d1b14bda188 on emersion:header-from-addrs into 1bb4fdb81a7ff38d3473261f229f5b67829d0393 on pires:master.

emersion commented 4 years ago

All done!

emersion commented 4 years ago

Done!