I hope to implement a proxy UDP traffic function in WFP, proxy the traffic to the local proxy program, and forward it to my remote UDP proxy server by the local proxy program
WFP has some problems with the UDP redirection processing function. The community did say that it was a Microsoft problem. I tried to bypass those problems, but I encountered a problem that I couldn’t solve:
Some applications use the Connect function for UDP sockets, causing my local proxy to reply data to the application. Because the source IP of the datagram replied to the application does not match the target IP of the data sent by the application UDP, the operating system discards my local proxy’s reply
I tried to use the raw socket on the local proxy to modify the source IP of the reply datagram to the target IP of the application UDP socket, and reply to the application, but Microsoft has restricted the raw socket: if the source IP of the datagram does not exist on the network interface, it will be discarded.
How should I bypass this restriction? Although I know that Microsoft is trying to prohibit denial of service attacks, the original intention is good, but it has caused me a lot of trouble.