Documentation ¶
Index ¶
Constants ¶
const ( // Amazon's extension PP2_TYPE_AWS = 0xEA PP2_SUBTYPE_AWS_VPCE_ID = 0x01 )
const ( // Azure's extension PP2_TYPE_AZURE = 0xEE PP2_SUBTYPE_AZURE_PRIVATEENDPOINT_LINKID = 0x01 )
const ( // pp2_tlv_ssl.client bit fields PP2_BITFIELD_CLIENT_SSL uint8 = 0x01 PP2_BITFIELD_CLIENT_CERT_CONN = 0x02 PP2_BITFIELD_CLIENT_CERT_SESS = 0x04 )
Variables ¶
This section is empty.
Functions ¶
func AWSVPCEndpointID ¶
func FindAWSVPCEndpointID ¶
func FindAWSVPCEndpointID(tlvs []proxyproto.TLV) string
FindAWSVPCEndpointID returns the first AWS VPC ID in the TLV if it exists and is well-formed.
func FindAzurePrivateEndpointLinkID ¶
FindAzurePrivateEndpointLinkID returns the first Azure Private Endpoint LinkID if it exists in the TLV collection and a boolean indicating if it was found.
func IsAWSVPCEndpointID ¶
func IsAWSVPCEndpointID(tlv proxyproto.TLV) bool
Types ¶
type PP2SSL ¶
type PP2SSL struct { Client uint8 // The <client> field is made of a bit field from the following values, // indicating which element is present: PP2_BITFIELD_CLIENT_SSL, // PP2_BITFIELD_CLIENT_CERT_CONN, PP2_BITFIELD_CLIENT_CERT_SESS Verify uint32 // Verify will be zero if the client presented a certificate // and it was successfully verified, and non-zero otherwise. TLV []proxyproto.TLV }
2.2.5. The PP2_TYPE_SSL type and subtypes
struct pp2_tlv_ssl { uint8_t client; uint32_t verify; struct pp2_tlv sub_tlv[0]; };
func FindSSL ¶
SSL returns the first PP2SSL if it exists and is well formed as well as bool indicating if it was found.
func SSL ¶
SSL returns the pp2_tlv_ssl from section 2.2.5 or errors with ErrIncompatibleTLV or ErrMalformedTLV
func (PP2SSL) ClientCN ¶
ClientCN returns the string representation (in UTF8) of the Common Name field (OID: 2.5.4.3) of the client certificate's Distinguished Name and whether that extension exists.
func (PP2SSL) ClientCertConn ¶
ClientCertConn indicates that the client provided a certificate over the current connection.
func (PP2SSL) ClientCertSess ¶
ClientCertSess indicates that the client provided a certificate at least once over the TLS session this connection belongs to.
func (PP2SSL) ClientSSL ¶
ClientSSL indicates that the client connected over SSL/TLS. When true, SSLVersion will return the version.
func (PP2SSL) SSLVersion ¶
SSLVersion returns the US-ASCII string representation of the TLS version and whether that extension exists.