Simple support for nftables (#1117)

* Simple support for nftables

Co-authored-by: Chen Zhenge <Mr.ChenWithCapsule@outlook.com>
This commit is contained in:
LoveSy
2022-10-23 19:17:33 +08:00
committed by GitHub
parent 51e1ba6897
commit 391ef310b4
12 changed files with 451 additions and 118 deletions

View File

@@ -16,6 +16,7 @@ showhelp()
echo " --platform [luci|luci-compat|debian|openwrt|optware|linux] build for platform. "
echo " --arch [all|armhf|arm64|x86-64|...] build for architecture, e.g. "
echo " --cross-tool [cross-tool] cross compiler, e.g. mips-openwrt-linux-"
echo " --with-nftables build with nftables support"
echo ""
echo "Advance Options:"
echo " --static static link smartdns"
@@ -81,7 +82,7 @@ build()
main()
{
OPTS=`getopt -o o:h --long arch:,filearch:,ver:,platform:,cross-tool:,static,only-package,outputdir: \
OPTS=`getopt -o o:h --long arch:,filearch:,ver:,platform:,cross-tool:,with-nftables,static,only-package,outputdir: \
-n "" -- "$@"`
if [ "$#" -le "1" ]; then
@@ -108,6 +109,9 @@ main()
--cross-tool)
CROSS_TOOL="$2"
shift 2;;
--with-nftables)
MAKE_ARGS="WITH_NFTSET=1"
shift 1;;
--static)
export STATIC="yes"
shift 1;;