Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bypass squid interception for skype
#!/usr/bin/env bash
set -x
if [ "$1" == "tproxy" ];then
export TABLE=mangle
export TARGET=DIVERT
iptables -t $TABLE -L DIVERT
if [ "$?" -eq "0"]; then
echo "DIVERT EXISTS"
else
iptables -t mangle -N DIVERT
iptables -t mangle -A DIVERT -j MARK --set-mark 1
iptables -t mangle -A DIVERT -j ACCEPT
fi
else
export TABLE=nat
export TARGET=ACCEPT
fi
iptables -t $TABLE -L PREROUTING |grep bypascidrspool
if [ "$?" -ne "0" ];then
iptables -t $TABLE -I PREROUTING -m set --match-set bypascidrspool dst,src -j $TARGET
fi
ipset create bypascidrspool hash:net
while read item; do
echo $item
ipset add bypascidrspool $item
done < cidr-to-bypass.txt
set +x
157.56.135.64/26
157.56.185.0/26
157.56.52.0/26
157.56.53.128/25
157.56.198.0/26
157.60.0.0/16
157.54.0.0/15
13.107.3.128/32
13.107.3.129/32
111.221.64.0/18
91.190.216.0/21
91.190.218.0/24
40.126.129.109/32
65.55.223.0/26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment