datanoack)echo'WARNING ! although datanoack fooling worked it may break NAT and may only work with external IP. Additionally it may require nftables to work correctly.';;
esac
}
pktws_check_domain_bypass()
pktws_check_domain_http_bypass()
{
# $1 - test function
# $2 - encrypted test : 1/0
@ -812,7 +874,25 @@ pktws_check_domain_bypass()
report_strategy $1$3$PKTWSD
}
tpws_check_domain_bypass()
pktws_check_domain_http3_bypass()
{
# $1 - test function
# $2 - domain
local f desync frag tests
pktws_curl_test_update $1$2 --dpi-desync=fake
["$IPV"=6]&&{
f="hopbyhop destopt"
for desync in $f;do
pktws_curl_test_update $1$2 --dpi-desync=$desync
done
}
report_strategy $1$2$PKTWSD
}
tpws_check_domain_http_bypass()
{
# $1 - test function
# $2 - encrypted test : 1/0
@ -842,7 +922,17 @@ tpws_check_domain_bypass()
report_strategy $1$3 tpws
}
check_domain()
curl_has_reason_to_continue()
{
# $1 - curl return code
for c in 1234627;do
[$1=$c]&&return1
done
return0
}
check_domain_http_tcp()
{
# $1 - test function
# $2 - port
@ -855,7 +945,7 @@ check_domain()
echo\*$1 ipv$IPV$4
# in case was interrupted before
pktws_ipt_unprepare $2
pktws_ipt_unprepare_tcp$2
ws_kill
echo"- checking without DPI bypass"
@ -864,44 +954,86 @@ check_domain()
["$FORCE"=1]||return
}
code=$?
for c in 1234627;do
[$code=$c]&&{
report_append "ipv${IPV}$4$1 : test aborted, no reason to continue. curl code $(curl_translate_code $code)"
return
}
done
curl_has_reason_to_continue $code||{
report_append "ipv${IPV}$4$1 : test aborted, no reason to continue. curl code $(curl_translate_code $code)"
return
}
echo
if["$SKIP_TPWS" !=1];then
tpws_check_domain_bypass $1$3$4
tpws_check_domain_http_bypass $1$3$4
fi
echo
["$SKIP_PKTWS"=1]||{
echo preparing $PKTWSD redirection
pktws_ipt_prepare $2
pktws_ipt_prepare_tcp $2
pktws_check_domain_http_bypass $1$3$4
echo clearing $PKTWSD redirection
pktws_ipt_unprepare_tcp $2
}
}
check_domain_http_udp()
{
# $1 - test function
# $2 - port
# $3 - domain
local code c
echo
echo\*$1 ipv$IPV$3
# in case was interrupted before
pktws_ipt_unprepare_udp $2
ws_kill
echo"- checking without DPI bypass"
curl_test $1$3&&{
report_append "ipv${IPV}$3$1 : working without bypass"
["$FORCE"=1]||return
}
code=$?
curl_has_reason_to_continue $code||{
report_append "ipv${IPV}$3$1 : test aborted, no reason to continue. curl code $(curl_translate_code $code)"