trying to implement transparent proxy same way as in this post, but I have a "proxy" listening only on loopback interface. Once I set DstAddr to loopback, 2nd packet of TCP handshake never received
...
iphdr->DstAddr = htonl(INADDR_LOOPBACK);
tcphdr->DstPort = ProxyPort;
addr->Direction = WINDIVERT_DIRECTION_INBOUND;
...
but it works if DstAddr = address_of_network_interface_packet_captured_from.
Also tried to alter addr
:
addr->IfIdx = 1;
addr->SubIfIdx = 0;
without any effect.
Is there a way to implement such a configuration?