@Echo Off&Title

if exist 添加IP策略(勿必).bat goto AddIpsec
if exist 删除IP策略.bat goto DelIpsec

:AddIpsec
title 正在添加IP策略（阻止联网检测反弹）……
netsh ipsec static del policy name="Block TU">Nul
netsh ipsec static add policy name="Block TU"   
netsh ipsec static add filteraction name="Block" action=block  
netsh ipsec static add filter filterlist="Total Uninstall" srcaddr=me dstaddr=50.28.84.142
netsh ipsec static add filter filterlist="Total Uninstall" srcaddr=me dstaddr=50.28.102.160
netsh ipsec static add rule name="Total Uninstall" policy="Block TU" filterlist="Total Uninstall" filteraction="Block"   
netsh ipsec static set policy name="Block TU" assign=y
ren %0 删除IP策略.bat

:DelIpsec
title 正在删除IP策略……
netsh ipsec static set policy name="Block TU" assign=n
netsh ipsec static del policy name="Block TU"
ren %0 添加IP策略(勿必).bat