MCPcopy Create free account

hub / github.com/pires/go-proxyproto / functions

Functions366 in github.com/pires/go-proxyproto

↓ 71 callersMethodString
()
protocol_test.go:1956
↓ 57 callersMethodClose
Close wraps original conn.Close.
protocol.go:282
↓ 53 callersFunctioncloseOnCleanup
closeOnCleanup registers c.Close() as a t.Cleanup, failing the test on error.
protocol_test.go:60
↓ 47 callersFunctionnewBufioReader
(b []byte)
v2_test.go:541
↓ 46 callersMethodAccept
Accept waits for and returns the next valid connection to the listener.
protocol.go:126
↓ 38 callersMethodAddr
Addr returns the underlying listener's network address.
protocol.go:195
↓ 35 callersMethodWrite
Write wraps original conn.Write.
protocol.go:273
↓ 34 callersMethodClose
()
protocol_test.go:1918
↓ 30 callersFunctionnewLocalListener
newLocalListener binds a TCP listener on a random localhost port.
protocol_test.go:33
↓ 29 callersMethodRead
Read is check for the proxy protocol header when doing the initial scan. If there is an error parsing the header, it is returned and the socket is clo
protocol.go:239
↓ 25 callersMethodRead
(_ []byte)
protocol_test.go:1996
↓ 25 callersFunctionexpectClientOK
expectClientOK drains the client result channel and fails on a non-nil error.
protocol_test.go:157
↓ 24 callersMethodWrite
(p []byte)
protocol_test.go:1992
↓ 22 callersFunctionNewConn
NewConn is used to wrap a net.Conn that may be speaking the PROXY protocol into a proxyproto.Conn. By default the returned Conn applies DefaultReadHe
protocol.go:220
↓ 20 callersFunctionrunClient
runClient launches the standard client goroutine and returns a channel that is closed on success or receives the first error.
protocol_test.go:83
↓ 18 callersMethodClose
()
helper/http2/http2.go:221
↓ 18 callersMethodError
()
helper/http2/http2_internal_test.go:296
↓ 16 callersMethodEqualsTo
EqualsTo returns true if headers are equivalent, false otherwise.
header.go:202
↓ 14 callersMethodRemoteAddr
()
protocol_test.go:1920
↓ 13 callersFunctionRead
Read identifies the proxy protocol version and reads the remaining of the header, accordingly. If proxy protocol header signature is not present, the
header.go:268
↓ 12 callersMethodClose
()
helper/http2/http2_internal_test.go:274
↓ 12 callersMethodWriteTo
WriteTo renders a proxy protocol header in a format and writes it to an io.Writer.
header.go:222
↓ 12 callersFunctiontestTCPv4Header
testTCPv4Header returns the canonical PROXY TCPv4 header shared across tests.
protocol_test.go:43
↓ 12 callersMethodtoByte
()
addr_proto.go:47
↓ 11 callersMethodWriteTo
WriteTo implements io.WriterTo.
protocol.go:489
↓ 10 callersMethodClose
Close closes the underlying listener.
protocol.go:190
↓ 10 callersMethodRemoteAddr
RemoteAddr returns the address of the client if the proxy protocol is being used, otherwise just returns the address of the socket peer. In case an er
protocol.go:316
↓ 10 callersFunctionfixtureWithTLV
(cur []byte, addr []byte, tlv []byte)
v2_test.go:545
↓ 9 callersMethodIsDatagram
IsDatagram returns true if the transport protocol is UDP or DGRAM (SOCK_DGRAM), false otherwise.
addr_proto.go:38
↓ 8 callersMethodIsStream
IsStream returns true if the transport protocol is TCP or STREAM (SOCK_STREAM), false otherwise.
addr_proto.go:33
↓ 8 callersMethodIsUnix
IsUnix returns true if the address family is UNIX (AF_UNIX), false otherwise.
addr_proto.go:28
↓ 8 callersMethodProxyHeader
ProxyHeader returns the proxy protocol header, if any. If an error occurs while reading the proxy header, nil is returned.
protocol.go:288
↓ 8 callersMethodSetReadDeadline
SetReadDeadline wraps original conn.SetReadDeadline.
protocol.go:368
↓ 8 callersFunctionbenchmarkTCPProxy
(size int, b *testing.B)
protocol_test.go:2297
↓ 8 callersFunctionsslTLV
(client uint8, rawSubTLVs []byte)
tlvparse/ssl_test.go:369
↓ 7 callersFunctionAWSVPCEndpointID
AWSVPCEndpointID returns the AWS VPC endpoint ID if present.
tlvparse/aws.go:29
↓ 7 callersMethodIsIPv4
IsIPv4 returns true if the address family is IPv4 (AF_INET4), false otherwise.
addr_proto.go:18
↓ 7 callersMethodIsIPv6
IsIPv6 returns true if the address family is IPv6 (AF_INET6), false otherwise.
addr_proto.go:23
↓ 7 callersMethodServe
Serve accepts incoming connections on the listener ln.
helper/http2/http2.go:70
↓ 7 callersMethodensureHeaderProcessed
ensureHeaderProcessed runs header processing once.
protocol.go:466
↓ 6 callersMethodAddr
()
protocol_test.go:1658
↓ 6 callersFunctionFindAWSVPCEndpointID
FindAWSVPCEndpointID returns the first AWS VPC ID in the TLV if it exists and is well-formed.
tlvparse/aws.go:41
↓ 6 callersMethodIsLocal
IsLocal returns true if the command in v2 is LOCAL or the transport in v1 is UNKNOWN, i.e. when no address information is expected, false otherwise.
version_cmd.go:24
↓ 6 callersMethodIsUnspec
IsUnspec returns true if the transport protocol or address family is unspecified, false otherwise.
addr_proto.go:43
↓ 6 callersFunctionMustLaxWhiteListPolicy
MustLaxWhiteListPolicy returns a LaxWhiteListPolicy but will panic if one of the provided IP addresses or IP ranges is invalid. Deprecated: use ConnM
policy.go:144
↓ 6 callersFunctionMustStrictWhiteListPolicy
MustStrictWhiteListPolicy returns a StrictWhiteListPolicy but will panic if one of the provided IP addresses or IP ranges is invalid. Deprecated: use
policy.go:202
↓ 6 callersFunctionReadHeaderTimeout
ReadHeaderTimeout reads the PROXY protocol header from conn, giving up after timeout. It is the cancellable replacement for the deprecated ReadTimeout
header.go:356
↓ 6 callersMethoderrorLog
()
helper/http2/http2.go:62
↓ 6 callersFunctionmustJoinTLVs
(t *testing.T, tlvs ...proxyproto.TLV)
tlvparse/ssl_test.go:379
↓ 5 callersMethodLocalAddr
()
protocol_test.go:1919
↓ 5 callersMethodLocalAddr
LocalAddr returns the address of the server if the proxy protocol is being used, otherwise just returns the address of the socket server. In case an e
protocol.go:300
↓ 5 callersFunctionSSL
SSL returns the pp2_tlv_ssl from section 2.2.5 or errors with ErrIncompatibleTLV or ErrMalformedTLV.
tlvparse/ssl.go:136
↓ 5 callersMethodSetTLVs
SetTLVs sets the TLVs stored in this header. This method replaces any previous TLV.
header.go:250
↓ 5 callersFunctionparseUnixName
(b []byte)
v2.go:290
↓ 4 callersMethodFormat
Format renders a proxy protocol header in a format to write over the wire.
header.go:232
↓ 4 callersFunctionIsAWSVPCEndpointID
IsAWSVPCEndpointID reports whether tlv contains an AWS VPC endpoint ID.
tlvparse/aws.go:24
↓ 4 callersMethodIsProxy
IsProxy returns true if the command in v2 is PROXY or the transport in v1 is not UNKNOWN, i.e. when valid local/remote address and port information is
version_cmd.go:30
↓ 4 callersFunctionNewServer
NewServer creates a new HTTP server. A nil h2 is equivalent to a zero http2.Server.
helper/http2/http2.go:44
↓ 4 callersMethodRegistered
Registered is true if the type is registered in the spec, see section 2.2.
tlv.go:106
↓ 4 callersMethodString
()
helper/http2/http2_internal_test.go:288
↓ 4 callersMethodTLVs
TLVs returns the TLVs stored into this header, if they exist. TLVs are optional for v2 of the protocol.
header.go:244
↓ 4 callersFunctionTrustProxyHeaderFrom
TrustProxyHeaderFrom returns a ConnPolicyFunc which can be used to decide whether to use or reject PROXY headers based on the source IP of the connect
policy.go:268
↓ 4 callersFunctionaddTLVLen
addTLVLen adds the length of the TLV to the header length or errors on uint16 overflow.
v2.go:265
↓ 4 callersFunctionchkErr
(err error)
examples/client/client.go:12
↓ 4 callersMethodcloseListeners
()
helper/http2/http2.go:193
↓ 4 callersFunctionformatUnixName
(name string)
v2.go:298
↓ 4 callersFunctionipFromAddr
(upstream net.Addr)
policy.go:250
↓ 4 callersFunctionnewIPAddr
(transport AddressFamilyAndProtocol, ip net.IP, port uint16)
v2.go:280
↓ 4 callersMethodserveConn
(baseCtx context.Context, conn net.Conn)
helper/http2/http2.go:133
↓ 3 callersMethodAddr
()
helper/http2/listener.go:60
↓ 3 callersMethodClientSSL
ClientSSL indicates that the client connected over SSL/TLS. When true, SSLVersion will return the version.
tlvparse/ssl.go:55
↓ 3 callersMethodClose
()
protocol_test.go:1662
↓ 3 callersFunctionConnMustLaxWhiteListPolicy
ConnMustLaxWhiteListPolicy returns a ConnLaxWhiteListPolicy but will panic if one of the provided IP addresses or IP ranges is invalid.
policy.go:131
↓ 3 callersFunctionConnMustStrictWhiteListPolicy
ConnMustStrictWhiteListPolicy returns a ConnStrictWhiteListPolicy but will panic if one of the provided IP addresses or IP ranges is invalid.
policy.go:189
↓ 3 callersFunctionConnSkipProxyHeaderForCIDR
ConnSkipProxyHeaderForCIDR returns a ConnPolicyFunc which can be used to accept a connection from a skipHeaderCIDR without requiring a PROXY header, e
policy.go:62
↓ 3 callersMethodIPs
IPs returns source/destination IPs for TCP/UDP headers.
header.go:174
↓ 3 callersFunctionIgnoreProxyHeaderNotOnInterface
IgnoreProxyHeaderNotOnInterface returns a ConnPolicyFunc which can be used to decide whether to use or ignore PROXY headers depending on the connectio
policy.go:289
↓ 3 callersFunctionIsSSL
IsSSL reports whether the TLV is of SSL type.
tlvparse/ssl.go:131
↓ 3 callersFunctionLaxWhiteListPolicy
LaxWhiteListPolicy returns a PolicyFunc which decides whether the upstream ip is allowed to send a proxy header based on a list of allowed IP addresse
policy.go:118
↓ 3 callersMethodMarshal
Marshal formats the PP2SSL structure as a TLV.
tlvparse/ssl.go:91
↓ 3 callersFunctionNewTestTLSServer
based on net/http/httptest/Server.StartTLS.
protocol_test.go:1667
↓ 3 callersMethodRaw
Raw returns the underlying connection which can be casted to a concrete type, allowing access to specialized functions. Use this ONLY if you know exa
protocol.go:330
↓ 3 callersMethodRead
(b []byte)
v1_test.go:292
↓ 3 callersMethodSSLVersion
SSLVersion returns the US-ASCII string representation of the TLS version and whether that extension exists.
tlvparse/ssl.go:71
↓ 3 callersFunctionSetReadHeaderTimeout
SetReadHeaderTimeout sets the readHeaderTimeout for a connection when passed as option to NewConn(). A value of 0 disables the header read timeout; ne
protocol.go:101
↓ 3 callersFunctionStrictWhiteListPolicy
StrictWhiteListPolicy returns a PolicyFunc which decides whether the upstream ip is allowed to send a proxy header based on a list of allowed IP addre
policy.go:176
↓ 3 callersMethodTCPAddrs
TCPAddrs returns TCP source/destination addresses if the header is stream-based.
header.go:144
↓ 3 callersMethodTimeout
()
helper/http2/http2_internal_test.go:298
↓ 3 callersMethodUDPAddrs
UDPAddrs returns UDP source/destination addresses if the header is datagram-based.
header.go:154
↓ 3 callersFunctionWithBufferSize
WithBufferSize sets the size of the read buffer used for proxy header detection. Values <= 0 are ignored and the default (256 bytes) is used. Values <
protocol.go:113
↓ 3 callersFunctionclient
(t *testing.T, addr, header string, length int, terminate bool, wait time.Duration, done chan struct{}, resul
v1_test.go:324
↓ 3 callersFunctionlisten
(t *testing.T)
v1_test.go:316
↓ 3 callersFunctionstartTestServer
startTestServer listens on a random port, wraps the listener with wrapListener (or a proxyproto.Listener if nil), and starts an h2proxy.Server in the
helper/http2/http2_test.go:234
↓ 3 callersFunctionvpceTLV
(vpce string)
tlvparse/aws_test.go:230
↓ 2 callersMethodApp
App is true if the type is reserved for application specific data, see section 2.2.7.
tlv.go:126
↓ 2 callersMethodClientCN
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 whethe
tlvparse/ssl.go:110
↓ 2 callersMethodClientCert
ClientCert returns the raw X.509 client certificate encoded in ASN.1 DER and whether that extension exists.
tlvparse/ssl.go:121
↓ 2 callersMethodClientCertConn
ClientCertConn indicates that the client provided a certificate over the current connection.
tlvparse/ssl.go:60
↓ 2 callersMethodClientCertSess
ClientCertSess indicates that the client provided a certificate at least once over the TLS session this connection belongs to.
tlvparse/ssl.go:66
↓ 2 callersFunctionConnLaxWhiteListPolicy
ConnLaxWhiteListPolicy returns a ConnPolicyFunc which decides whether the upstream ip is allowed to send a proxy header based on a list of allowed IP
policy.go:102
next →1–100 of 366, ranked by callers