Files
ocserv/tests/docker-ocserv/proxy-connectscript
T
Nikos Mavrogiannopoulos 8ed48a14bb tests: check whether IPs are being passed correctly to script when in proxyproto
That is check whether the remote IP passed is other than localhost,
and there is a non-empty IP_REAL_LOCAL.
2015-08-22 20:13:46 +02:00

10 lines
207 B
Bash
Executable File

#!/bin/sh
if [ "$REASON" = "connect" ];then
if test "$IP_REAL" != "127.0.0.1" && test "$IP_REAL" != "::1" && test -n "$IP_REAL_LOCAL";then
echo "$IP_REAL:$IP_REAL_LOCAL" >/tmp/connect/ok
fi
fi
exit 0