Browse Source

custom.d.example old busybox bug workaround

pull/666/head
bol-van 7 months ago
parent
commit
8bc5e16ec1
  1. 9
      init.d/openwrt/custom.d.examples/10-inherit-nfqws
  2. 9
      init.d/openwrt/custom.d.examples/10-inherit-tpws
  3. 9
      init.d/openwrt/custom.d.examples/10-inherit-tpws-socks
  4. 2
      init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https
  5. 9
      init.d/sysv/custom.d.examples/10-inherit-nfqws
  6. 9
      init.d/sysv/custom.d.examples/10-inherit-tpws
  7. 9
      init.d/sysv/custom.d.examples/10-inherit-tpws-socks
  8. 2
      init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https

9
init.d/openwrt/custom.d.examples/10-inherit-nfqws

@ -6,17 +6,20 @@ zapret_custom_daemons()
{ {
# stop logic is managed by procd # stop logic is managed by procd
MODE_OVERRIDE=$OVERRIDE start_daemons_procd local MODE_OVERRIDE=$OVERRIDE
start_daemons_procd
} }
zapret_custom_firewall() zapret_custom_firewall()
{ {
# $1 - 1 - run, 0 - stop # $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() zapret_custom_firewall_nft()
{ {
# stop logic is not required # stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
} }

9
init.d/openwrt/custom.d.examples/10-inherit-tpws

@ -6,17 +6,20 @@ zapret_custom_daemons()
{ {
# stop logic is managed by procd # stop logic is managed by procd
MODE_OVERRIDE=$OVERRIDE start_daemons_procd local MODE_OVERRIDE=$OVERRIDE
start_daemons_procd
} }
zapret_custom_firewall() zapret_custom_firewall()
{ {
# $1 - 1 - run, 0 - stop # $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() zapret_custom_firewall_nft()
{ {
# stop logic is not required # stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
} }

9
init.d/openwrt/custom.d.examples/10-inherit-tpws-socks

@ -6,17 +6,20 @@ zapret_custom_daemons()
{ {
# stop logic is managed by procd # stop logic is managed by procd
MODE_OVERRIDE=$OVERRIDE start_daemons_procd local MODE_OVERRIDE=$OVERRIDE
start_daemons_procd
} }
zapret_custom_firewall() zapret_custom_firewall()
{ {
# $1 - 1 - run, 0 - stop # $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() zapret_custom_firewall_nft()
{ {
# stop logic is not required # stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
} }

2
init.d/openwrt/custom.d.examples/10-inherit-tpws4http-nfqws4https

@ -5,7 +5,7 @@ nfqws_tpws_inheritor()
{ {
# $1 - inherited function # $1 - inherited function
# $2 - 1 - run, 0 - stop # $2 - 1 - run, 0 - stop
local MODE_OVERRIDE
[ "$MODE_HTTP" = "1" ] && { [ "$MODE_HTTP" = "1" ] && {
MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2 MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2
} }

9
init.d/sysv/custom.d.examples/10-inherit-nfqws

@ -6,17 +6,20 @@ zapret_custom_daemons()
{ {
# $1 - 1 - run, 0 - stop # $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 local MODE_OVERRIDE=$OVERRIDE
zapret_do_daemons $1
} }
zapret_custom_firewall() zapret_custom_firewall()
{ {
# $1 - 1 - run, 0 - stop # $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() zapret_custom_firewall_nft()
{ {
# stop logic is not required # stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
} }

9
init.d/sysv/custom.d.examples/10-inherit-tpws

@ -6,17 +6,20 @@ zapret_custom_daemons()
{ {
# $1 - 1 - run, 0 - stop # $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 local MODE_OVERRIDE=$OVERRIDE
zapret_do_daemons $1
} }
zapret_custom_firewall() zapret_custom_firewall()
{ {
# $1 - 1 - run, 0 - stop # $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() zapret_custom_firewall_nft()
{ {
# stop logic is not required # stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
} }

9
init.d/sysv/custom.d.examples/10-inherit-tpws-socks

@ -6,17 +6,20 @@ zapret_custom_daemons()
{ {
# $1 - 1 - run, 0 - stop # $1 - 1 - run, 0 - stop
MODE_OVERRIDE=$OVERRIDE zapret_do_daemons $1 local MODE_OVERRIDE=$OVERRIDE
zapret_do_daemons $1
} }
zapret_custom_firewall() zapret_custom_firewall()
{ {
# $1 - 1 - run, 0 - stop # $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() zapret_custom_firewall_nft()
{ {
# stop logic is not required # stop logic is not required
MODE_OVERRIDE=$OVERRIDE zapret_apply_firewall_rules_nft local MODE_OVERRIDE=$OVERRIDE
zapret_apply_firewall_rules_nft
} }

2
init.d/sysv/custom.d.examples/10-inherit-tpws4http-nfqws4https

@ -5,7 +5,7 @@ nfqws_tpws_inheritor()
{ {
# $1 - inherited function # $1 - inherited function
# $2 - 1 - run, 0 - stop # $2 - 1 - run, 0 - stop
local MODE_OVERRIDE
[ "$MODE_HTTP" = "1" ] && { [ "$MODE_HTTP" = "1" ] && {
MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2 MODE_OVERRIDE=tpws MODE_HTTPS=0 MODE_QUIC=0 $1 $2
} }

Loading…
Cancel
Save