I'd like to propose a pair of new TS APIs below.

TSReturnCode TSHttpTxnVerifiedAddrSet(TSHttpTxn txnp, const struct sockaddr
*addr);
TSReturnCode TSHttpTxnVerifiedAddrGet(TSHttpTxn txnp, const struct sockaddr
**addr);

The motivation is to enable plugins to provide client's "real" IP address
for ATS core and other plugins. Plugins that use the setter function are
expected to read clien's real IP address from somewhere (e.g. Forwarded
header field), and also check the validity. If a plugin successfully
verifies client's IP address, it may call the setter function for later
use. The IP address set by a plugin will be used by ATS remap ACL, and
other plugins which call the getter function, if they are configured to do
so.

Pull Request:
https://github.com/apache/trafficserver/pull/12359

-- Masakazu

Reply via email to