passthrough

This commit is contained in:
veypi
2021-03-09 22:00:38 +08:00
parent 38c65fd5dc
commit 53b7cbe1dd
7 changed files with 298 additions and 23 deletions
+5 -5
View File
@@ -9,26 +9,26 @@ from_port=$3
to=$4
to_port=$5
if ! [ -e "$1" ]; then
if ! [ -n "$1" ]; then
echo "iptable chan not found" >&1
exit 1
fi
if ! [ -e "$2" ]; then
if ! [ -n "$2" ]; then
echo "from host not found" >&1
exit 1
fi
if ! [ -e "$3" ]; then
if ! [ -n "$3" ]; then
echo "from port not found" >&1
exit 1
fi
if ! [ -e "$4" ]; then
if ! [ -n "$4" ]; then
echo "destination host not found" >&1
exit 1
fi
if ! [ -e "$5" ]; then
if ! [ -n "$5" ]; then
echo "destination port not found" >&1
exit 1
fi