irctest.server_tests.ergo.proxy

Ergo-specific tests for PROXY protocol support (v1 and v2).

ProxyProtocolListenerTestCase

Test Ergo's support for proxy: true in listener configuration,

which requires that a PROXY header (either v1 or v2) be sent ahead of the connection data.

ergo
sable
test_no_proxy_header
Test if a listener is configured with proxy: true,

connections that do not send a valid proxy header are rejected.

.d
test_proxy_v1
Test that Ergo accepts a PROXY protocol v1 ASCII header as the

first bytes on the connection and records the proxied IP as the client's apparent address, visible in RPL_WHOISACTUALLY (338).

.d
test_proxy_v2
Test that Ergo accepts a PROXY protocol v2 binary header as the

first bytes on the connection and records the proxied IP as the client's apparent address, visible in RPL_WHOISACTUALLY (338).

https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt §2.2

.d

ProxyProtocolTestCase

ergo
sable
test_proxy_v1
Test that Ergo accepts a PROXY protocol v1 header as the first line

from a connecting client and records the proxied IP as the client's apparent address, visible in RPL_WHOISACTUALLY (338).

.d
test_proxy_v1_not_first_line
Test that Ergo ignores a PROXY protocol v1 header that is not the

very first line on the connection. Any earlier IRC command disqualifies the PROXY line, so the proxied IP must not be recorded as the client's apparent address.

.d