init: clear qn variables when MODE_HTTP(s) disabled

This commit is contained in:
bol-van 2021-12-11 11:11:07 +03:00
parent 0f38feb10f
commit 4392d356ce
2 changed files with 20 additions and 8 deletions

View File

@ -353,14 +353,20 @@ get_nfqws_qnums()
} }
[ "$NFQWS_OPT_DESYNC_HTTPS6" = "$NFQWS_OPT_DESYNC_HTTP6" ] && _qns6=$_qn6; [ "$NFQWS_OPT_DESYNC_HTTPS6" = "$NFQWS_OPT_DESYNC_HTTP6" ] && _qns6=$_qn6;
} }
[ "$MODE_HTTP" = 1 ] && { if [ "$MODE_HTTP" = 1 ]; then
eval $1=$_qn eval $1=$_qn
eval $3=$_qn6 eval $3=$_qn6
} else
[ "$MODE_HTTPS" = 1 ] && { eval $1=
eval $3=
fi
if [ "$MODE_HTTPS" = 1 ]; then
eval $2=$_qns eval $2=$_qns
eval $4=$_qns6 eval $4=$_qns6
} else
eval $2=
eval $4=
fi
} }
create_ipset() create_ipset()

View File

@ -580,14 +580,20 @@ get_nfqws_qnums()
} }
[ "$NFQWS_OPT_DESYNC_HTTPS6" = "$NFQWS_OPT_DESYNC_HTTP6" ] && _qns6=$_qn6; [ "$NFQWS_OPT_DESYNC_HTTPS6" = "$NFQWS_OPT_DESYNC_HTTP6" ] && _qns6=$_qn6;
} }
[ "$MODE_HTTP" = 1 ] && { if [ "$MODE_HTTP" = 1 ]; then
eval $1=$_qn eval $1=$_qn
eval $3=$_qn6 eval $3=$_qn6
} else
[ "$MODE_HTTPS" = 1 ] && { eval $1=
eval $3=
fi
if [ "$MODE_HTTPS" = 1 ]; then
eval $2=$_qns eval $2=$_qns
eval $4=$_qns6 eval $4=$_qns6
} else
eval $2=
eval $4=
fi
} }
tpws_apply_socks_binds() tpws_apply_socks_binds()