How to create a simple c# http monitor/blocker?

后端 未结 2 1196
清歌不尽
清歌不尽 2021-01-31 23:44

I was reading that question (How to create a simple proxy in C#?) that is near of my wishes.

I simply want develop a c# app that, by example, monitors Firefox, IE, etc a

2条回答
  •  北海茫月
    2021-02-01 00:02

    Your approach will depend on whether or not you are installing this application on the same box you are using to browse or on a separate proxy server.

    If you are doing this on a separate server it will be easier to accomplish this in C# / managed code, as you will be simply writing a C# proxy server that client pc's will have point to. System.Net.Sockets namespace TcpListener and TcpClient will be your friend.

    If, however, you are installing this on the same machine then take a look WinPcap and and SharpPCap and perhaps Fiddler for some ideas.

    Hope that helps.

提交回复
热议问题