mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-17 08:54:41 +00:00
16e015635c
It is sometimes needed in application server environments to easily tell if a source is local to the machine or a remote one, without necessarily knowing all the local addresses (dhcp, vrrp, etc). Similarly in transparent proxy configurations it is sometimes desired to tell the difference between local and remote destination addresses. This patch adds two new sample fetch functions for this : dst_is_local : boolean Returns true if the destination address of the incoming connection is local to the system, or false if the address doesn't exist on the system, meaning that it was intercepted in transparent mode. It can be useful to apply certain rules by default to forwarded traffic and other rules to the traffic targetting the real address of the machine. For example the stats page could be delivered only on this address, or SSH access could be locally redirected. Please note that the check involves a few system calls, so it's better to do it only once per connection. src_is_local : boolean Returns true if the source address of the incoming connection is local to the system, or false if the address doesn't exist on the system, meaning that it comes from a remote machine. Note that UNIX addresses are considered local. It can be useful to apply certain access restrictions based on where the client comes from (eg: require auth or https for remote machines). Please note that the check involves a few system calls, so it's better to do it only once per connection. |
||
---|---|---|
.. | ||
design-thoughts | ||
internals | ||
lua-api | ||
acl.fig | ||
architecture.txt | ||
close-options.txt | ||
coding-style.txt | ||
configuration.txt | ||
cookie-options.txt | ||
gpl.txt | ||
haproxy.1 | ||
intro.txt | ||
lgpl.txt | ||
linux-syn-cookies.txt | ||
lua.txt | ||
management.txt | ||
netscaler-client-ip-insertion-protocol.txt | ||
network-namespaces.txt | ||
proxy-protocol.txt | ||
queuing.fig |