Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pires/go-proxyproto
/ functions
Functions
366 in github.com/pires/go-proxyproto
⨍
Functions
366
◇
Types & classes
41
↓ 2 callers
Function
ConnStrictWhiteListPolicy
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 callers
Method
Experiment
Experiment is true if the type is reserved for temporary experimental use by application developers, see section 2.2.7.
tlv.go:132
↓ 2 callers
Function
FindSSL
FindSSL returns the first PP2SSL if it exists and is well formed.
tlvparse/ssl.go:191
↓ 2 callers
Method
Future
Future is true is the type is reserved for future use, see section 2.2.7.
tlv.go:137
↓ 2 callers
Function
JoinTLVs
JoinTLVs joins multiple Type-Length-Value records.
tlv.go:88
↓ 2 callers
Method
Network
()
helper/http2/http2_internal_test.go:287
↓ 2 callers
Method
Ports
Ports returns source/destination ports for TCP/UDP headers.
header.go:185
↓ 2 callers
Method
Read
([]byte)
header_test.go:55
↓ 2 callers
Function
ReadTimeout
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 callers
Method
SSLCipher
SSLCipher returns the US-ASCII string representation of the used TLS cipher and whether that extension exists.
tlvparse/ssl.go:81
↓ 2 callers
Method
ServeConn
ServeConn enqueues a new connection. The connection will be returned in the next Accept call.
helper/http2/listener.go:49
↓ 2 callers
Method
SetDeadline
SetDeadline wraps original conn.SetDeadline.
protocol.go:362
↓ 2 callers
Method
SetReadDeadline
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 callers
Method
SetWriteDeadline
SetWriteDeadline wraps original conn.SetWriteDeadline.
protocol.go:377
↓ 2 callers
Method
UnixAddrs
UnixAddrs returns UNIX source/destination addresses if the header is UNIX-based.
header.go:164
↓ 2 callers
Function
WithPolicy
WithPolicy adds given policy to a connection when passed as option to NewConn().
policy.go:91
↓ 2 callers
Function
checkTLVs
(t *testing.T, name string, raw []byte, expected []proxyproto.PP2Type)
tlvparse/test.go:11
↓ 2 callers
Function
connWhitelistPolicy
(allowed []func(net.IP) bool, def Policy)
policy.go:209
↓ 2 callers
Function
exampleSelfSignedConfig
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 callers
Function
isASCII
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 callers
Function
mustMarshalSSL
(t *testing.T, ssl PP2SSL)
tlvparse/ssl_test.go:359
↓ 2 callers
Function
newContextAssertingServer
newContextAssertingServer returns an http.Server that asserts connContextKey and baseContextKey are present in every request's context.
helper/http2/http2_test.go:287
↓ 2 callers
Function
newPipeListener
()
helper/http2/listener.go:21
↓ 2 callers
Function
newTestServer
(t *testing.T)
helper/http2/http2_test.go:265
↓ 2 callers
Function
newTestServerWithoutConnContext
(t *testing.T)
helper/http2/http2_test.go:277
↓ 2 callers
Function
parse
(allowed []string)
policy.go:227
↓ 2 callers
Function
parseV1IPAddress
(protocol AddressFamilyAndProtocol, addrStr string)
v1.go:246
↓ 2 callers
Function
parseV1PortNumber
(portStr string)
v1.go:235
↓ 2 callers
Function
parseVersion1
(reader *bufio.Reader)
v1.go:32
↓ 1 callers
Method
Accept
()
helper/http2/listener.go:27
↓ 1 callers
Method
Addr
()
helper/http2/http2_internal_test.go:281
↓ 1 callers
Method
EqualTo
EqualTo returns true if headers are equivalent, false otherwise. Deprecated: use EqualsTo instead. This method will eventually be removed.
header.go:197
↓ 1 callers
Function
ExtractPSCConnectionID
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 callers
Function
FindAzurePrivateEndpointLinkID
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 callers
Function
HeaderProxyFromAddrs
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 callers
Method
ReadFrom
ReadFrom implements the io.ReaderFrom ReadFrom method.
protocol.go:477
↓ 1 callers
Method
SetDeadline
(t time.Time)
protocol_test.go:1921
↓ 1 callers
Method
SetWriteDeadline
(t time.Time)
protocol_test.go:1929
↓ 1 callers
Function
SkipProxyHeaderForCIDR
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 callers
Method
Spec
Spec is true if the type is covered by the spec, see section 2.2 and 2.2.7.
tlv.go:142
↓ 1 callers
Function
SplitTLVs
SplitTLVs splits the Type-Length-Value vector, returns the vector or an error.
tlv.go:62
↓ 1 callers
Method
String
()
helper/http2/listener.go:70
↓ 1 callers
Method
TCPConn
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 callers
Function
TestEqualsTo
(t *testing.T)
header_test.go:235
↓ 1 callers
Method
UDPConn
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 callers
Method
UnixConn
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 callers
Function
ValidateHeader
ValidateHeader adds given validator for proxy headers to a connection when passed as option to NewConn().
protocol.go:90
↓ 1 callers
Method
Verified
Verified is true if the client presented a certificate and it was successfully verified.
tlvparse/ssl.go:50
↓ 1 callers
Function
azurePrivateEndpointLinkID
AzurePrivateEndpointLinkID returns linkID if given TLV matches Azure Private Endpoint LinkID format Format description: Field Length (Octets) Descr
tlvparse/azure.go:34
↓ 1 callers
Method
formatVersion1
()
v1.go:173
↓ 1 callers
Method
formatVersion2
()
v2.go:180
↓ 1 callers
Function
handle
(conn net.Conn)
examples/tlsserver/tlsserver.go:61
↓ 1 callers
Function
initVersion1
()
v1.go:24
↓ 1 callers
Function
isAzurePrivateEndpointLinkID
IsAzurePrivateEndpointLinkID returns true if given TLV matches Azure Private Endpoint LinkID format.
tlvparse/azure.go:21
↓ 1 callers
Method
isClosed
()
helper/http2/http2.go:208
↓ 1 callers
Function
isPSCConnectionID
(t proxyproto.TLV)
tlvparse/gcp.go:46
↓ 1 callers
Function
malformedV2LocalTLV
()
helper/http2/http2_internal_test.go:249
↓ 1 callers
Function
newTLSTestServer
(t *testing.T)
helper/http2/http2_test.go:270
↓ 1 callers
Function
pad
(b []byte, n int)
v2_test.go:73
↓ 1 callers
Function
parseVersion2
(reader *bufio.Reader)
v2.go:73
↓ 1 callers
Function
pscConnectionID
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 callers
Method
readHeader
readHeader reads the proxy protocol header from the connection.
protocol.go:382
↓ 1 callers
Function
selfSignedConfig
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 callers
Function
testTLSConfig
(t *testing.T)
helper/http2/http2_test.go:307
↓ 1 callers
Method
validateLength
(length uint16)
v2.go:251
Method
Accept
()
helper/http2/http2_internal_test.go:267
Function
BenchmarkTCPProxy1024KB
(b *testing.B)
protocol_test.go:2453
Function
BenchmarkTCPProxy128KB
(b *testing.B)
protocol_test.go:2441
Function
BenchmarkTCPProxy16KB
(b *testing.B)
protocol_test.go:2429
Function
BenchmarkTCPProxy2048KB
(b *testing.B)
protocol_test.go:2457
Function
BenchmarkTCPProxy256KB
(b *testing.B)
protocol_test.go:2445
Function
BenchmarkTCPProxy32KB
(b *testing.B)
protocol_test.go:2433
Function
BenchmarkTCPProxy512KB
(b *testing.B)
protocol_test.go:2449
Function
BenchmarkTCPProxy64KB
(b *testing.B)
protocol_test.go:2437
Method
Close
()
protocol_test.go:1942
Method
Close
()
protocol_test.go:1973
Method
Close
()
helper/http2/listener.go:35
Function
ExampleListener_default
()
example_listener_test.go:13
Function
ExampleListener_policyRequire
()
example_listener_test.go:86
Function
ExampleListener_readBufferSize
()
example_listener_test.go:61
Function
ExampleListener_readHeaderTimeout
()
example_listener_test.go:35
Function
ExampleListener_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
Function
ExampleListener_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
Function
ExampleListener_validateHeader
()
example_listener_test.go:112
Function
ExampleNewConn_combined
()
example_conn_test.go:98
Function
ExampleNewConn_default
()
example_conn_test.go:10
Function
ExampleNewConn_disableReadHeaderTimeout
()
example_conn_test.go:31
Function
ExampleNewConn_withBufferSize
()
example_conn_test.go:49
Function
ExampleNewConn_withPolicy
()
example_conn_test.go:81
Function
ExampleNewConn_withReadHeaderTimeout
()
example_conn_test.go:65
Function
ExampleReadHeaderTimeout
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
Function
ExampleServer
()
helper/http2/http2_test.go:23
Method
IsUnspec
IsUnspec returns true if the command is unspecified, false otherwise.
version_cmd.go:35
Method
LocalAddr
()
protocol_test.go:1943
Method
LocalAddr
()
protocol_test.go:1974
Method
Network
()
protocol_test.go:1955
Method
Network
()
policy_test.go:24
Method
Network
()
policy_test.go:29
Method
Network
()
helper/http2/listener.go:66
Method
Read
(_ []byte)
protocol_test.go:1916
← previous
next →
101–200 of 366, ranked by callers