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
↓ 71 callers
Method
String
()
protocol_test.go:1956
↓ 57 callers
Method
Close
Close wraps original conn.Close.
protocol.go:282
↓ 53 callers
Function
closeOnCleanup
closeOnCleanup registers c.Close() as a t.Cleanup, failing the test on error.
protocol_test.go:60
↓ 47 callers
Function
newBufioReader
(b []byte)
v2_test.go:541
↓ 46 callers
Method
Accept
Accept waits for and returns the next valid connection to the listener.
protocol.go:126
↓ 38 callers
Method
Addr
Addr returns the underlying listener's network address.
protocol.go:195
↓ 35 callers
Method
Write
Write wraps original conn.Write.
protocol.go:273
↓ 34 callers
Method
Close
()
protocol_test.go:1918
↓ 30 callers
Function
newLocalListener
newLocalListener binds a TCP listener on a random localhost port.
protocol_test.go:33
↓ 29 callers
Method
Read
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 callers
Method
Read
(_ []byte)
protocol_test.go:1996
↓ 25 callers
Function
expectClientOK
expectClientOK drains the client result channel and fails on a non-nil error.
protocol_test.go:157
↓ 24 callers
Method
Write
(p []byte)
protocol_test.go:1992
↓ 22 callers
Function
NewConn
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 callers
Function
runClient
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 callers
Method
Close
()
helper/http2/http2.go:221
↓ 18 callers
Method
Error
()
helper/http2/http2_internal_test.go:296
↓ 16 callers
Method
EqualsTo
EqualsTo returns true if headers are equivalent, false otherwise.
header.go:202
↓ 14 callers
Method
RemoteAddr
()
protocol_test.go:1920
↓ 13 callers
Function
Read
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 callers
Method
Close
()
helper/http2/http2_internal_test.go:274
↓ 12 callers
Method
WriteTo
WriteTo renders a proxy protocol header in a format and writes it to an io.Writer.
header.go:222
↓ 12 callers
Function
testTCPv4Header
testTCPv4Header returns the canonical PROXY TCPv4 header shared across tests.
protocol_test.go:43
↓ 12 callers
Method
toByte
()
addr_proto.go:47
↓ 11 callers
Method
WriteTo
WriteTo implements io.WriterTo.
protocol.go:489
↓ 10 callers
Method
Close
Close closes the underlying listener.
protocol.go:190
↓ 10 callers
Method
RemoteAddr
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 callers
Function
fixtureWithTLV
(cur []byte, addr []byte, tlv []byte)
v2_test.go:545
↓ 9 callers
Method
IsDatagram
IsDatagram returns true if the transport protocol is UDP or DGRAM (SOCK_DGRAM), false otherwise.
addr_proto.go:38
↓ 8 callers
Method
IsStream
IsStream returns true if the transport protocol is TCP or STREAM (SOCK_STREAM), false otherwise.
addr_proto.go:33
↓ 8 callers
Method
IsUnix
IsUnix returns true if the address family is UNIX (AF_UNIX), false otherwise.
addr_proto.go:28
↓ 8 callers
Method
ProxyHeader
ProxyHeader returns the proxy protocol header, if any. If an error occurs while reading the proxy header, nil is returned.
protocol.go:288
↓ 8 callers
Method
SetReadDeadline
SetReadDeadline wraps original conn.SetReadDeadline.
protocol.go:368
↓ 8 callers
Function
benchmarkTCPProxy
(size int, b *testing.B)
protocol_test.go:2297
↓ 8 callers
Function
sslTLV
(client uint8, rawSubTLVs []byte)
tlvparse/ssl_test.go:369
↓ 7 callers
Function
AWSVPCEndpointID
AWSVPCEndpointID returns the AWS VPC endpoint ID if present.
tlvparse/aws.go:29
↓ 7 callers
Method
IsIPv4
IsIPv4 returns true if the address family is IPv4 (AF_INET4), false otherwise.
addr_proto.go:18
↓ 7 callers
Method
IsIPv6
IsIPv6 returns true if the address family is IPv6 (AF_INET6), false otherwise.
addr_proto.go:23
↓ 7 callers
Method
Serve
Serve accepts incoming connections on the listener ln.
helper/http2/http2.go:70
↓ 7 callers
Method
ensureHeaderProcessed
ensureHeaderProcessed runs header processing once.
protocol.go:466
↓ 6 callers
Method
Addr
()
protocol_test.go:1658
↓ 6 callers
Function
FindAWSVPCEndpointID
FindAWSVPCEndpointID returns the first AWS VPC ID in the TLV if it exists and is well-formed.
tlvparse/aws.go:41
↓ 6 callers
Method
IsLocal
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 callers
Method
IsUnspec
IsUnspec returns true if the transport protocol or address family is unspecified, false otherwise.
addr_proto.go:43
↓ 6 callers
Function
MustLaxWhiteListPolicy
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 callers
Function
MustStrictWhiteListPolicy
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 callers
Function
ReadHeaderTimeout
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 callers
Method
errorLog
()
helper/http2/http2.go:62
↓ 6 callers
Function
mustJoinTLVs
(t *testing.T, tlvs ...proxyproto.TLV)
tlvparse/ssl_test.go:379
↓ 5 callers
Method
LocalAddr
()
protocol_test.go:1919
↓ 5 callers
Method
LocalAddr
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 callers
Function
SSL
SSL returns the pp2_tlv_ssl from section 2.2.5 or errors with ErrIncompatibleTLV or ErrMalformedTLV.
tlvparse/ssl.go:136
↓ 5 callers
Method
SetTLVs
SetTLVs sets the TLVs stored in this header. This method replaces any previous TLV.
header.go:250
↓ 5 callers
Function
parseUnixName
(b []byte)
v2.go:290
↓ 4 callers
Method
Format
Format renders a proxy protocol header in a format to write over the wire.
header.go:232
↓ 4 callers
Function
IsAWSVPCEndpointID
IsAWSVPCEndpointID reports whether tlv contains an AWS VPC endpoint ID.
tlvparse/aws.go:24
↓ 4 callers
Method
IsProxy
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 callers
Function
NewServer
NewServer creates a new HTTP server. A nil h2 is equivalent to a zero http2.Server.
helper/http2/http2.go:44
↓ 4 callers
Method
Registered
Registered is true if the type is registered in the spec, see section 2.2.
tlv.go:106
↓ 4 callers
Method
String
()
helper/http2/http2_internal_test.go:288
↓ 4 callers
Method
TLVs
TLVs returns the TLVs stored into this header, if they exist. TLVs are optional for v2 of the protocol.
header.go:244
↓ 4 callers
Function
TrustProxyHeaderFrom
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 callers
Function
addTLVLen
addTLVLen adds the length of the TLV to the header length or errors on uint16 overflow.
v2.go:265
↓ 4 callers
Function
chkErr
(err error)
examples/client/client.go:12
↓ 4 callers
Method
closeListeners
()
helper/http2/http2.go:193
↓ 4 callers
Function
formatUnixName
(name string)
v2.go:298
↓ 4 callers
Function
ipFromAddr
(upstream net.Addr)
policy.go:250
↓ 4 callers
Function
newIPAddr
(transport AddressFamilyAndProtocol, ip net.IP, port uint16)
v2.go:280
↓ 4 callers
Method
serveConn
(baseCtx context.Context, conn net.Conn)
helper/http2/http2.go:133
↓ 3 callers
Method
Addr
()
helper/http2/listener.go:60
↓ 3 callers
Method
ClientSSL
ClientSSL indicates that the client connected over SSL/TLS. When true, SSLVersion will return the version.
tlvparse/ssl.go:55
↓ 3 callers
Method
Close
()
protocol_test.go:1662
↓ 3 callers
Function
ConnMustLaxWhiteListPolicy
ConnMustLaxWhiteListPolicy returns a ConnLaxWhiteListPolicy but will panic if one of the provided IP addresses or IP ranges is invalid.
policy.go:131
↓ 3 callers
Function
ConnMustStrictWhiteListPolicy
ConnMustStrictWhiteListPolicy returns a ConnStrictWhiteListPolicy but will panic if one of the provided IP addresses or IP ranges is invalid.
policy.go:189
↓ 3 callers
Function
ConnSkipProxyHeaderForCIDR
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 callers
Method
IPs
IPs returns source/destination IPs for TCP/UDP headers.
header.go:174
↓ 3 callers
Function
IgnoreProxyHeaderNotOnInterface
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 callers
Function
IsSSL
IsSSL reports whether the TLV is of SSL type.
tlvparse/ssl.go:131
↓ 3 callers
Function
LaxWhiteListPolicy
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 callers
Method
Marshal
Marshal formats the PP2SSL structure as a TLV.
tlvparse/ssl.go:91
↓ 3 callers
Function
NewTestTLSServer
based on net/http/httptest/Server.StartTLS.
protocol_test.go:1667
↓ 3 callers
Method
Raw
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 callers
Method
Read
(b []byte)
v1_test.go:292
↓ 3 callers
Method
SSLVersion
SSLVersion returns the US-ASCII string representation of the TLS version and whether that extension exists.
tlvparse/ssl.go:71
↓ 3 callers
Function
SetReadHeaderTimeout
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 callers
Function
StrictWhiteListPolicy
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 callers
Method
TCPAddrs
TCPAddrs returns TCP source/destination addresses if the header is stream-based.
header.go:144
↓ 3 callers
Method
Timeout
()
helper/http2/http2_internal_test.go:298
↓ 3 callers
Method
UDPAddrs
UDPAddrs returns UDP source/destination addresses if the header is datagram-based.
header.go:154
↓ 3 callers
Function
WithBufferSize
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 callers
Function
client
(t *testing.T, addr, header string, length int, terminate bool, wait time.Duration, done chan struct{}, resul
v1_test.go:324
↓ 3 callers
Function
listen
(t *testing.T)
v1_test.go:316
↓ 3 callers
Function
startTestServer
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 callers
Function
vpceTLV
(vpce string)
tlvparse/aws_test.go:230
↓ 2 callers
Method
App
App is true if the type is reserved for application specific data, see section 2.2.7.
tlv.go:126
↓ 2 callers
Method
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 whethe
tlvparse/ssl.go:110
↓ 2 callers
Method
ClientCert
ClientCert returns the raw X.509 client certificate encoded in ASN.1 DER and whether that extension exists.
tlvparse/ssl.go:121
↓ 2 callers
Method
ClientCertConn
ClientCertConn indicates that the client provided a certificate over the current connection.
tlvparse/ssl.go:60
↓ 2 callers
Method
ClientCertSess
ClientCertSess indicates that the client provided a certificate at least once over the TLS session this connection belongs to.
tlvparse/ssl.go:66
↓ 2 callers
Function
ConnLaxWhiteListPolicy
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