Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
proxyproto
✓ github.com/pires/go-proxyproto
Create a Proxy Protocol header.
package main
import (
"fmt"
"github.com/pires/go-proxyproto"
)
func main() {
header := &proxyproto.Header{
Version: 1,
Command: proxyproto.PROXY,
TransportProtocol: proxyproto.TCPv4,
SourceAddr: &net.TCPAddr{IP: net.ParseIP("10.0.0.1"), Port: 1234},
DestinationAddr: &net.TCPAddr{IP: net.ParseIP("10.0.0.2"), Port: 5678},
}
fmt.Println(header)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.12.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.