First commit

This commit is contained in:
2025-12-10 05:17:46 +02:00
commit 8a186cfeb2
14 changed files with 743 additions and 0 deletions

23
text.go Normal file
View File

@@ -0,0 +1,23 @@
package proxyprotocol
// TextSignature is prefix for proxyprotocol v1
var (
TextSignature = []byte("PROXY")
TextSeparator = " "
TextCR = byte('\r')
TextLF = byte('\n')
TextCRLF = []byte{TextCR, TextLF}
)
var (
textSignatureLen = len(TextSignature)
textAddressPartsLen = 4
textPortBitSize = 16
)
// TextProtocol list
var (
TextProtocolIPv4 = "TCP4"
TextProtocolIPv6 = "TCP6"
TextProtocolUnknown = "UNKNOWN"
)