wfp driver very stuck in win7... ...

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.

Can you help me?

I fixed this problem in a surprising way. End this question. I implemented win7 to win10, tcp and udp redirection, pure wfp driver.

Maybe I was the first to realize it.

Even for TCP redirection at the stream layer, waiting for the server to send data. Also solved.

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.

connect redirect is not transparent. o:)

同行,你哪里的

Mods:
Translated: Colleague, where are you from?

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.

@weilin_jiang China. You can send me your email.

1 Like

@weilin_jiang said:
同行,你哪里的

Mods:
Translated: Colleague, where are you from?

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.

Sorry!

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

I thought of other ways to redirect wfp under win7 in the middle of the night. However, I do not want to disclose my method.

For win7 tcp redirection, don’t be limited to FWPM_LAYER_ALE_CONNECT_REDIRECT_V4/6

Or simply use lsp hook, or restrict customers to use win10. The life of win7 is over.