2018-08-09 14:57:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
INTERFACE=$2
|
2021-01-16 07:11:03 +00:00
|
|
|
SERVER=$1
|
|
|
|
if [ -n "$(resolveip -4 $SERVER)" ]; then
|
|
|
|
if [ -z "$INTERFACE" ]; then
|
|
|
|
tracebox -m 20 -l "pkt = ip{dst=to} / tcp{dst=65101} / MPCAPABLE / MSS / WSCALE if string.find(tostring(tracebox(pkt)),'-TCPOptionMPTCPCapable') then print 'MPTCP disabled' elseif string.find(tostring(tracebox(pkt)),'MPTCP') then print 'MPTCP enabled' end" $SERVER
|
|
|
|
else
|
|
|
|
tracebox -m 20 -l "pkt = ip{dst=to} / tcp{dst=65101} / MPCAPABLE / MSS / WSCALE if string.find(tostring(tracebox(pkt)),'-TCPOptionMPTCPCapable') then print 'MPTCP disabled' elseif string.find(tostring(tracebox(pkt)),'MPTCP') then print 'MPTCP enabled' end" -i $INTERFACE $SERVER
|
|
|
|
fi
|
2018-08-09 14:57:26 +00:00
|
|
|
else
|
2021-01-16 07:11:03 +00:00
|
|
|
if [ -z "$INTERFACE" ]; then
|
|
|
|
tracebox -6 -m 20 -l "pkt = ip{dst=to} / tcp{dst=65101} / MPCAPABLE / MSS / WSCALE if string.find(tostring(tracebox(pkt)),'-TCPOptionMPTCPCapable') then print 'MPTCP disabled' elseif string.find(tostring(tracebox(pkt)),'MPTCP') then print 'MPTCP enabled' end" $SERVER
|
|
|
|
else
|
|
|
|
tracebox -6 -m 20 -l "pkt = ip{dst=to} / tcp{dst=65101} / MPCAPABLE / MSS / WSCALE if string.find(tostring(tracebox(pkt)),'-TCPOptionMPTCPCapable') then print 'MPTCP disabled' elseif string.find(tostring(tracebox(pkt)),'MPTCP') then print 'MPTCP enabled' end" -i $INTERFACE $SERVER
|
|
|
|
fi
|
2018-08-09 14:57:26 +00:00
|
|
|
fi
|