mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
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.
This commit is contained in:
9
tests/docker-ocserv/proxy-connectscript
Executable file
9
tests/docker-ocserv/proxy-connectscript
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user