Raw-sockets
Fast and does not consume local resources.
# sip="192.168.1.1"
# dip="192.168.1.2"
# python clean_iptables.py $dip
# pypy raw-sockets-tcp3wh.py true 100 $sip $dip 22
Raw-scapy
Slow but does not consume local resources
# dip="192.168.1.2"
# python clean_iptables.py $ip
# python raw-scapy-tcp3wh.py true 100 $dip 22
Kernel-3wh
Fast but consumes local resources.
# sip="192.168.1.1"
# dip="192.168.1.2"
# python clean_iptables.py $dip
# pypy kernel-tcp3wh.py 50 true $sip $dip 22
Kernel-sshopen
Fast but consumes local resources.
# sip="192.168.1.1"
# dip="192.168.1.2"
# python clean_iptables.py $dip
# python kernel-sshopen.py true 50 $sip $dip 22
Source code
# cat lib.py
# cat clean_iptables.py
# cat raw-sockets-tcp3wh.py
# cat raw-scapy-tcp3wh.py
# cat kernel-tcp3wh.py
# cat kernel-sshopen.py