Stall Internet Activity When App is Terminated
I'm messing around with the FiddlerCore and .NET and making an Internet Filter application. I'd like to "stall" or prevent Internet Activity if the app isn't running, similar to how Covenant Eyes behaves when it is terminated or logged out.
I'd like to implement a similar behavior. I tried just not closing the FiddlerCore at all, which works but the proxy can easily be removed by anyone who knows what they're doing. Doing this:
Fiddler.FiddlerApplication.Startup(8877,fcsf);
Fiddler.FiddlerApplication.BeforeRequest += new SessionStateHandler(FiddlerApplication_BeforeRequest);
Console.ReadLine();
and never calling Fiddler.FiddlerApplication.Shutdown();
works, as mentioned (HTTP[s] connections fail), but connectivity is easily restored by removing that proxy.
I tried setting FiddlerCore to not be the system proxy (using: FiddlerCoreStartupFlags fcsf = FiddlerCoreStartupFlags.Default;
fcsf = (fcsf & ~FiddlerCoreStartupFlags.RegisterAsSystemProxy);
) but it still seemed to setup a proxy.
Basically, I'd like to hang connectivity 开发者_运维技巧when the app stops running, and restore it when it loads back up. Any ideas? Lemme know if i need to provide any more information. Thanks!
I'm pretty sure you can't do this. Fiddler is just a proxy, and Windows allows users to change their proxy settings.
精彩评论