# check "iptables grep cut xargs ip awk"
for CMD in iptables grep cut xargs ip awk
do
if ! type -p ${CMD}; then
echo -e "${Error} requirements not found, please check !" && exit 1
fi
done
}
config-port(){
echo -e "${Info} Please input port to be accelerated"
read -p "(multi ports is diveded by space . not support port range. default port:8080):" ports
if [[ -z "${ports}" ]]; then
echo -e "0.0.0.0 8080 0.0.0.0 8080\c" >> config-port.conf
else
for port in ${ports}
do
#can write config in new line
echo "0.0.0.0 ${port} 0.0.0.0 ${port}" >> config-port.conf
done
fi
}