diff --git a/init.d/openwrt/custom.d.examples/10-inherit-nfqws b/init.d/openwrt/custom.d.examples/10-inherit-nfqws index b1564024..83db175f 100644 --- a/init.d/openwrt/custom.d.examples/10-inherit-nfqws +++ b/init.d/openwrt/custom.d.examples/10-inherit-nfqws @@ -6,17 +6,20 @@ zapret_custom_daemons() { # stop logic is managed by procd - MODE_OVERRIDE=$OVERRIDE start_daemons_procd + local MODE_OVERRIDE=$OVERRIDE + start_daemons_procd } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/openwrt/custom.d.examples/10-inherit-tpws b/init.d/openwrt/custom.d.examples/10-inherit-tpws index e9c5f69c..157eab4c 100644 --- a/init.d/openwrt/custom.d.examples/10-inherit-tpws +++ b/init.d/openwrt/custom.d.examples/10-inherit-tpws @@ -6,17 +6,20 @@ zapret_custom_daemons() { # stop logic is managed by procd - MODE_OVERRIDE=$OVERRIDE start_daemons_procd + local MODE_OVERRIDE=$OVERRIDE + start_daemons_procd } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/openwrt/custom.d.examples/10-inherit-tpws-socks b/init.d/openwrt/custom.d.examples/10-inherit-tpws-socks index b4e686a7..90c97e90 100644 --- a/init.d/openwrt/custom.d.examples/10-inherit-tpws-socks +++ b/init.d/openwrt/custom.d.examples/10-inherit-tpws-socks @@ -6,17 +6,20 @@ zapret_custom_daemons() { # stop logic is managed by procd - MODE_OVERRIDE=$OVERRIDE start_daemons_procd + local MODE_OVERRIDE=$OVERRIDE + start_daemons_procd } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https b/init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https index 752b1a20..c3685a53 100644 --- a/init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https +++ b/init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https @@ -5,7 +5,7 @@ nfqws_tpws_inheritor() { # $1 - inherited function # $2 - 1 - run, 0 - stop - + local MODE_OVERRIDE [ "$MODE_HTTP" = "1" ] && { MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2 } diff --git a/init.d/sysv/custom.d.examples/10-inherit-nfqws b/init.d/sysv/custom.d.examples/10-inherit-nfqws index 60029690..2e2dca02 100644 --- a/init.d/sysv/custom.d.examples/10-inherit-nfqws +++ b/init.d/sysv/custom.d.examples/10-inherit-nfqws @@ -6,17 +6,20 @@ zapret_custom_daemons() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_daemons $1 } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/sysv/custom.d.examples/10-inherit-tpws b/init.d/sysv/custom.d.examples/10-inherit-tpws index c1b183e3..84ac85f2 100644 --- a/init.d/sysv/custom.d.examples/10-inherit-tpws +++ b/init.d/sysv/custom.d.examples/10-inherit-tpws @@ -6,17 +6,20 @@ zapret_custom_daemons() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_daemons $1 } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/sysv/custom.d.examples/10-inherit-tpws-socks b/init.d/sysv/custom.d.examples/10-inherit-tpws-socks index 7fcb0e26..62ddb0a2 100644 --- a/init.d/sysv/custom.d.examples/10-inherit-tpws-socks +++ b/init.d/sysv/custom.d.examples/10-inherit-tpws-socks @@ -6,17 +6,20 @@ zapret_custom_daemons() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_daemons $1 } zapret_custom_firewall() { # $1 - 1 - run, 0 - stop - MODE_OVERRIDE=$OVERRIDE zapret_do_firewall_rules_ipt $1 + local MODE_OVERRIDE=$OVERRIDE + zapret_do_firewall_rules_ipt $1 } zapret_custom_firewall_nft() { # stop logic is not required - MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft + local MODE_OVERRIDE=$OVERRIDE + zapret_apply_firewall_rules_nft } diff --git a/init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https b/init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https index f05d75eb..40eb419a 100644 --- a/init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https +++ b/init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https @@ -5,7 +5,7 @@ nfqws_tpws_inheritor() { # $1 - inherited function # $2 - 1 - run, 0 - stop - + local MODE_OVERRIDE [ "$MODE_HTTP" = "1" ] && { MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2 }