I use the following api for win7 tcp packet redirect:
FWPM_LAYER_ALE_CONNECT_REDIRECT_V4/6,
FWPS_LAYER_ALE_AUTH_CONNECT_V4/6,
FWPM_LAYER_STREAM_V4/6,
FwpsStreamInjectAsync
It is possible to forward a single data packet, but for chrome, it will be very stuck.
Using read-write lock technology,
and Win7 cannot use FwpsQueryConnectionRedirectState.
I am sure that I did not understand your question, but I am glad that you have a solution. For the sake of others who might need help, perhaps you can elaborate?
I started to learn wfp driver and tried to develop wfp redirection in January. The goal is to redirect tcp and udp from win7 to win10.
Eventually I found out that if you use wfp to redirect win7 tcp driver. If you consider restoring the original ip address and port, you can only fall into an infinite lock. Make the system very slow.
Although I have methods to improve efficiency, I still can’t really achieve the efficiency of the original api support above win8.
I think maybe after accessing the windows system source code and wdk framework source code, I can use some hack methods to achieve the efficiency of the original API.
However, if you consider supporting win7 tcp redirection, I strongly recommend that you use lsp hook.
Mr. @weilin_jiang: Please due us the courtesy of restricting your posts to English. That’s a rule of this Community, to enable all to share, learn, and participate.
Mr. @weilin_jiang: Please due us the courtesy of restricting your posts to English. That’s a rule of this Community, to enable all to share, learn, and participate.
Although I have methods to improve efficiency, I still can’t really achieve the efficiency of the original api support above win8.
You can do this on Win7 by coding the REDIRECT_CONTEXT functionality (available on Win8+) yourself. It’s a bit fiddly, but it’s possible - and it shouldn’t really be that much slower.
@Jason_Stephenson How to develop REDIRECT_CONTEXT functionality. the reason for the slowness is that the data of the FWPM_LAYER_ALE_CONNECT_REDIRECT_V4/6 layer is passed to other layers and needs to be searched and locked