mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 11:01:50 +00:00
16 lines
No EOL
1.2 KiB
Bash
Executable file
16 lines
No EOL
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
INTERFACE=$2
|
|
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
|
|
else
|
|
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
|
|
fi |