Skip to content

Commit

Permalink
Fix WinDivert filter syntax (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Osherz5 authored Nov 7, 2024
1 parent 05d1b28 commit 8fa9d4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mitmproxy-windows/redirector/src/main2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async fn main() -> Result<()> {
WinDivertFlags::new().set_recv_only().set_sniff(),
)?;
// WinDivert's syntax supports IP ranges (https://github.com/basil00/Divert/issues/250#issuecomment-723515347)
let wd_net_filter = "!loopback && ((ip && remoteAddr < 224.0.0.0) || (ip6 && remoteAddr < ff00::)) && (tcp || udp)";
let wd_net_filter = "!loopback && ((ip && remoteAddr < 224.0.0.0) || (ipv6 && remoteAddr < ff00::)) && (tcp || udp)";
let network_handle = WinDivert::network(wd_net_filter, 1040, WinDivertFlags::new())?;
let inject_handle = WinDivert::network("false", 1039, WinDivertFlags::new().set_send_only())?;

Expand Down

0 comments on commit 8fa9d4b

Please sign in to comment.