MCPcopy Create free account

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

Functions366 in github.com/pires/go-proxyproto

↓ 2 callersFunctionConnStrictWhiteListPolicy
ConnStrictWhiteListPolicy returns a ConnPolicyFunc which decides whether the upstream ip is allowed to send a proxy header based on a list of allowed
policy.go:158
↓ 2 callersMethodExperiment
Experiment is true if the type is reserved for temporary experimental use by application developers, see section 2.2.7.
tlv.go:132
↓ 2 callersFunctionFindSSL
FindSSL returns the first PP2SSL if it exists and is well formed.
tlvparse/ssl.go:191
↓ 2 callersMethodFuture
Future is true is the type is reserved for future use, see section 2.2.7.
tlv.go:137
↓ 2 callersFunctionJoinTLVs
JoinTLVs joins multiple Type-Length-Value records.
tlv.go:88
↓ 2 callersMethodNetwork
()
helper/http2/http2_internal_test.go:287
↓ 2 callersMethodPorts
Ports returns source/destination ports for TCP/UDP headers.
header.go:185
↓ 2 callersMethodRead
([]byte)
header_test.go:55
↓ 2 callersFunctionReadTimeout
ReadTimeout acts as Read but takes a timeout. If that timeout is reached, it's assumed there's no proxy protocol header. Deprecated: ReadTimeout cann
header.go:318
↓ 2 callersMethodSSLCipher
SSLCipher returns the US-ASCII string representation of the used TLS cipher and whether that extension exists.
tlvparse/ssl.go:81
↓ 2 callersMethodServeConn
ServeConn enqueues a new connection. The connection will be returned in the next Accept call.
helper/http2/listener.go:49
↓ 2 callersMethodSetDeadline
SetDeadline wraps original conn.SetDeadline.
protocol.go:362
↓ 2 callersMethodSetReadDeadline
SetReadDeadline is a no-op so header processing (which now applies the default read-header timeout) does not dereference the nil embedded net.Conn.
protocol_test.go:2006
↓ 2 callersMethodSetWriteDeadline
SetWriteDeadline wraps original conn.SetWriteDeadline.
protocol.go:377
↓ 2 callersMethodUnixAddrs
UnixAddrs returns UNIX source/destination addresses if the header is UNIX-based.
header.go:164
↓ 2 callersFunctionWithPolicy
WithPolicy adds given policy to a connection when passed as option to NewConn().
policy.go:91
↓ 2 callersFunctioncheckTLVs
(t *testing.T, name string, raw []byte, expected []proxyproto.PP2Type)
tlvparse/test.go:11
↓ 2 callersFunctionconnWhitelistPolicy
(allowed []func(net.IP) bool, def Policy)
policy.go:209
↓ 2 callersFunctionexampleSelfSignedConfig
exampleSelfSignedConfig returns a *tls.Config with a throwaway self-signed certificate, so the example is self-contained. Real servers load a real cer
example_tls_test.go:150
↓ 2 callersFunctionisASCII
isASCII checks whether a byte slice has all characters that fit in the ascii character set, including the null byte.
tlvparse/ssl.go:201
↓ 2 callersFunctionmustMarshalSSL
(t *testing.T, ssl PP2SSL)
tlvparse/ssl_test.go:359
↓ 2 callersFunctionnewContextAssertingServer
newContextAssertingServer returns an http.Server that asserts connContextKey and baseContextKey are present in every request's context.
helper/http2/http2_test.go:287
↓ 2 callersFunctionnewPipeListener
()
helper/http2/listener.go:21
↓ 2 callersFunctionnewTestServer
(t *testing.T)
helper/http2/http2_test.go:265
↓ 2 callersFunctionnewTestServerWithoutConnContext
(t *testing.T)
helper/http2/http2_test.go:277
↓ 2 callersFunctionparse
(allowed []string)
policy.go:227
↓ 2 callersFunctionparseV1IPAddress
(protocol AddressFamilyAndProtocol, addrStr string)
v1.go:246
↓ 2 callersFunctionparseV1PortNumber
(portStr string)
v1.go:235
↓ 2 callersFunctionparseVersion1
(reader *bufio.Reader)
v1.go:32
↓ 1 callersMethodAccept
()
helper/http2/listener.go:27
↓ 1 callersMethodAddr
()
helper/http2/http2_internal_test.go:281
↓ 1 callersMethodEqualTo
EqualTo returns true if headers are equivalent, false otherwise. Deprecated: use EqualsTo instead. This method will eventually be removed.
header.go:197
↓ 1 callersFunctionExtractPSCConnectionID
ExtractPSCConnectionID returns the first PSC Connection ID in the TLV if it exists and is well-formed and a bool indicating one was found.
tlvparse/gcp.go:17
↓ 1 callersFunctionFindAzurePrivateEndpointLinkID
FindAzurePrivateEndpointLinkID returns the first Azure Private Endpoint LinkID if it exists in the TLV collection and a boolean indicating if it was f
tlvparse/azure.go:44
↓ 1 callersFunctionHeaderProxyFromAddrs
HeaderProxyFromAddrs creates a new PROXY header from a source and a destination address. If version is zero, the latest protocol version is used. The
header.go:77
↓ 1 callersMethodReadFrom
ReadFrom implements the io.ReaderFrom ReadFrom method.
protocol.go:477
↓ 1 callersMethodSetDeadline
(t time.Time)
protocol_test.go:1921
↓ 1 callersMethodSetWriteDeadline
(t time.Time)
protocol_test.go:1929
↓ 1 callersFunctionSkipProxyHeaderForCIDR
SkipProxyHeaderForCIDR returns a PolicyFunc which can be used to accept a connection from a skipHeaderCIDR without requiring a PROXY header, e.g. Kube
policy.go:83
↓ 1 callersMethodSpec
Spec is true if the type is covered by the spec, see section 2.2 and 2.2.7.
tlv.go:142
↓ 1 callersFunctionSplitTLVs
SplitTLVs splits the Type-Length-Value vector, returns the vector or an error.
tlv.go:62
↓ 1 callersMethodString
()
helper/http2/listener.go:70
↓ 1 callersMethodTCPConn
TCPConn returns the underlying TCP connection, allowing access to specialized functions. Use this ONLY if you know exactly what you are doing.
protocol.go:338
↓ 1 callersFunctionTestEqualsTo
(t *testing.T)
header_test.go:235
↓ 1 callersMethodUDPConn
UDPConn returns the underlying UDP connection, allowing access to specialized functions. Use this ONLY if you know exactly what you are doing.
protocol.go:356
↓ 1 callersMethodUnixConn
UnixConn returns the underlying Unix socket connection, allowing access to specialized functions. Use this ONLY if you know exactly what you are doin
protocol.go:347
↓ 1 callersFunctionValidateHeader
ValidateHeader adds given validator for proxy headers to a connection when passed as option to NewConn().
protocol.go:90
↓ 1 callersMethodVerified
Verified is true if the client presented a certificate and it was successfully verified.
tlvparse/ssl.go:50
↓ 1 callersFunctionazurePrivateEndpointLinkID
AzurePrivateEndpointLinkID returns linkID if given TLV matches Azure Private Endpoint LinkID format Format description: Field Length (Octets) Descr
tlvparse/azure.go:34
↓ 1 callersMethodformatVersion1
()
v1.go:173
↓ 1 callersMethodformatVersion2
()
v2.go:180
↓ 1 callersFunctionhandle
(conn net.Conn)
examples/tlsserver/tlsserver.go:61
↓ 1 callersFunctioninitVersion1
()
v1.go:24
↓ 1 callersFunctionisAzurePrivateEndpointLinkID
IsAzurePrivateEndpointLinkID returns true if given TLV matches Azure Private Endpoint LinkID format.
tlvparse/azure.go:21
↓ 1 callersMethodisClosed
()
helper/http2/http2.go:208
↓ 1 callersFunctionisPSCConnectionID
(t proxyproto.TLV)
tlvparse/gcp.go:46
↓ 1 callersFunctionmalformedV2LocalTLV
()
helper/http2/http2_internal_test.go:249
↓ 1 callersFunctionnewTLSTestServer
(t *testing.T)
helper/http2/http2_test.go:270
↓ 1 callersFunctionpad
(b []byte, n int)
v2_test.go:73
↓ 1 callersFunctionparseVersion2
(reader *bufio.Reader)
v2.go:73
↓ 1 callersFunctionpscConnectionID
pscConnectionID returns the ID of a GCP PSC extension TLV or errors with ErrIncompatibleTLV or ErrMalformedTLV if it's the wrong TLV type or is malfor
tlvparse/gcp.go:38
↓ 1 callersMethodreadHeader
readHeader reads the proxy protocol header from the connection.
protocol.go:382
↓ 1 callersFunctionselfSignedConfig
selfSignedConfig returns a *tls.Config with a throwaway self-signed certificate so the example runs without external files. Real servers load a real c
examples/tlsserver/tlsserver.go:83
↓ 1 callersFunctiontestTLSConfig
(t *testing.T)
helper/http2/http2_test.go:307
↓ 1 callersMethodvalidateLength
(length uint16)
v2.go:251
MethodAccept
()
helper/http2/http2_internal_test.go:267
FunctionBenchmarkTCPProxy1024KB
(b *testing.B)
protocol_test.go:2453
FunctionBenchmarkTCPProxy128KB
(b *testing.B)
protocol_test.go:2441
FunctionBenchmarkTCPProxy16KB
(b *testing.B)
protocol_test.go:2429
FunctionBenchmarkTCPProxy2048KB
(b *testing.B)
protocol_test.go:2457
FunctionBenchmarkTCPProxy256KB
(b *testing.B)
protocol_test.go:2445
FunctionBenchmarkTCPProxy32KB
(b *testing.B)
protocol_test.go:2433
FunctionBenchmarkTCPProxy512KB
(b *testing.B)
protocol_test.go:2449
FunctionBenchmarkTCPProxy64KB
(b *testing.B)
protocol_test.go:2437
MethodClose
()
protocol_test.go:1942
MethodClose
()
protocol_test.go:1973
MethodClose
()
helper/http2/listener.go:35
FunctionExampleListener_default
()
example_listener_test.go:13
FunctionExampleListener_policyRequire
()
example_listener_test.go:86
FunctionExampleListener_readBufferSize
()
example_listener_test.go:61
FunctionExampleListener_readHeaderTimeout
()
example_listener_test.go:35
FunctionExampleListener_tls
ExampleListener_tls shows how to combine the PROXY protocol with TLS. The only real decision is the listener wrapping order, and it depends on where
example_tls_test.go:36
FunctionExampleListener_tlsHeaderInsideTLS
ExampleListener_tlsHeaderInsideTLS shows the second wrapping order, where the upstream completes the TLS handshake first and only then sends the PROXY
example_tls_test.go:94
FunctionExampleListener_validateHeader
()
example_listener_test.go:112
FunctionExampleNewConn_combined
()
example_conn_test.go:98
FunctionExampleNewConn_default
()
example_conn_test.go:10
FunctionExampleNewConn_disableReadHeaderTimeout
()
example_conn_test.go:31
FunctionExampleNewConn_withBufferSize
()
example_conn_test.go:49
FunctionExampleNewConn_withPolicy
()
example_conn_test.go:81
FunctionExampleNewConn_withReadHeaderTimeout
()
example_conn_test.go:65
FunctionExampleReadHeaderTimeout
ExampleReadHeaderTimeout demonstrates the cancellable, low-level way to read a PROXY protocol header directly from a net.Conn you manage yourself. Unl
example_read_test.go:17
FunctionExampleServer
()
helper/http2/http2_test.go:23
MethodIsUnspec
IsUnspec returns true if the command is unspecified, false otherwise.
version_cmd.go:35
MethodLocalAddr
()
protocol_test.go:1943
MethodLocalAddr
()
protocol_test.go:1974
MethodNetwork
()
protocol_test.go:1955
MethodNetwork
()
policy_test.go:24
MethodNetwork
()
policy_test.go:29
MethodNetwork
()
helper/http2/listener.go:66
MethodRead
(_ []byte)
protocol_test.go:1916
← previousnext →101–200 of 366, ranked by callers