Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windivert Blacklist not working in Chrome. Works well in Edge Firefox etc #327

Closed
abhilashaman08 opened this issue Jan 21, 2023 · 3 comments

Comments

@abhilashaman08
Copy link

abhilashaman08 commented Jan 21, 2023

Windivert (webfilter) Blacklist not working in Chrome. Works well in Edge Firefox. Packets are captured well, but seems like TCP RST does not reset connection. Following snippet:

    string pattern = "outbound && !loopback && (ip || ipv6)";	
for (int i = 0; i < whiteListIp.size(); i++)
{
	pattern = pattern + " && (ip.DstAddr != " + whiteListIp[i] + " )";
}
pattern = pattern + " && (tcp.DstPort == 80 || tcp.DstPort == 443 ) && tcp.PayloadLength > 0";

handle = WinDivertOpen(pattern.c_str(), WINDIVERT_LAYER_NETWORK, priority, 0);
@abhilashaman08
Copy link
Author

@basil00 could you help?

@basil00
Copy link
Owner

basil00 commented Jan 24, 2023

The webfilter example is not very useful. It only supports HTTP/1.1, which was somewhat relevant in 2011 when it was first written, but is no longer relevant as almost all websites/browsers use encryption + more modern web protocols. This sample should be retired.

As for your code, this does not appear to be webfiter anyway, so I cannot comment.

@basil00 basil00 closed this as completed Jan 24, 2023
@abhilashaman08
Copy link
Author

abhilashaman08 commented Jan 24, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants