From 34698479d0bb439ce715619af0437b47e7df6eab Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 12 Aug 2025 11:29:27 +0300 Subject: [PATCH] minor improve stun windivert filter --- .../windivert.filter.examples/windivert.discord_media+stun.txt | 2 +- init.d/windivert.filter.examples/windivert.stun.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init.d/windivert.filter.examples/windivert.discord_media+stun.txt b/init.d/windivert.filter.examples/windivert.discord_media+stun.txt index 9698bda..1d18ad9 100644 --- a/init.d/windivert.filter.examples/windivert.discord_media+stun.txt +++ b/init.d/windivert.filter.examples/windivert.discord_media+stun.txt @@ -21,7 +21,7 @@ udp.Payload32[17]=0) or (udp.PayloadLength>=20 and - udp.Payload32[1]=0x2112A442)) and + udp.Payload32[1]=0x2112A442 and udp.Payload[0]<0x40)) and ( ((ip.DstAddr < 127.0.0.1 or ip.DstAddr > 127.255.255.255) and (ip.DstAddr < 10.0.0.0 or ip.DstAddr > 10.255.255.255) and (ip.DstAddr < 192.168.0.0 or ip.DstAddr > 192.168.255.255) and (ip.DstAddr < 172.16.0.0 or ip.DstAddr > 172.31.255.255) and (ip.DstAddr < 169.254.0.0 or ip.DstAddr > 169.254.255.255)) or ((ipv6.DstAddr > ::1) and (ipv6.DstAddr < 2001::0 or ipv6.DstAddr >= 2001:1::0) and (ipv6.DstAddr < fc00::0 or ipv6.DstAddr >= fe00::0) and (ipv6.DstAddr < fe80::0 or ipv6.DstAddr >= fec0::0) and (ipv6.DstAddr < ff00::0 or ipv6.DstAddr >= ffff::0)) ) diff --git a/init.d/windivert.filter.examples/windivert.stun.txt b/init.d/windivert.filter.examples/windivert.stun.txt index 58089d5..2dd4aa1 100644 --- a/init.d/windivert.filter.examples/windivert.stun.txt +++ b/init.d/windivert.filter.examples/windivert.stun.txt @@ -1,7 +1,7 @@ !impostor and !loopback and (outbound and udp.PayloadLength>=20 and - udp.Payload32[1]=0x2112A442 and + udp.Payload32[1]=0x2112A442 and udp.Payload[0]<0x40 and ( ((ip.DstAddr < 127.0.0.1 or ip.DstAddr > 127.255.255.255) and (ip.DstAddr < 10.0.0.0 or ip.DstAddr > 10.255.255.255) and (ip.DstAddr < 192.168.0.0 or ip.DstAddr > 192.168.255.255) and (ip.DstAddr < 172.16.0.0 or ip.DstAddr > 172.31.255.255) and (ip.DstAddr < 169.254.0.0 or ip.DstAddr > 169.254.255.255)) or ((ipv6.DstAddr > ::1) and (ipv6.DstAddr < 2001::0 or ipv6.DstAddr >= 2001:1::0) and (ipv6.DstAddr < fc00::0 or ipv6.DstAddr >= fe00::0) and (ipv6.DstAddr < fe80::0 or ipv6.DstAddr >= fec0::0) and (ipv6.DstAddr < ff00::0 or ipv6.DstAddr >= ffff::0)) )