Making a program that intercepts network traffic in Windows

后端 未结 3 1066
野的像风
野的像风 2021-02-09 22:37

Sort of what I\'m asking is \"how to make a software firewall for Windows,\" but something not so complex. I\'m surprised I can find so little when searching for this, only the

3条回答
  •  遥遥无期
    2021-02-09 23:12

    It sounds like what you're looking for is a Winsock Service Provider Interface (SPI) Layered Service Provider (LSP). From what you've said, if you're dealing with Vista or newer, you probably want to implement an instance of the LSP_INSPECTOR class. For older versions of Windows, that class doesn't apply exactly, but the same general idea does. On Vista/7, you set the category (class) for your application with WSCSetApplicationCategory. To install your provider, you fill out a WSAPROTOCOL_INFO structure, then register it by calling WSCInstallProvider.

提交回复
热议问题