user3916429
user3916429

Reputation: 572

redirect sent packets + modification - Pcap.Net

Im using Pcap.Net in a C# app. While browsing a website, i would need to modify all packets except UDP ones to make them go through a proxy.

I explain why, im using a proxy, but its not as fast as direct connection. So i would like to modify the http tcp packets to be sent via proxy, but keep all UDP ones to direct connection for speed reasons.

So the Question is, how can i modify a packet to be aborted to be sent to direct connection but instead, send it to proxy?

PS : i already know how to sort my packets to filter the ones i need to modify.

PS2 : for better clarity. How can i change Destination IP, Destination Port and Request URI from a packet my computer is gonna send?

Upvotes: 1

Views: 1472

Answers (1)

brickner
brickner

Reputation: 6585

Using Pcap.Net you can't change packets sent. See Question 1 in Pcap.Net FAQ

You can, however, capture them, modify them and send the modified packets.

This wouldn't prevent the original packets from being sent.

See Interpreting the packets and Sending Packets in the Pcap.Net User Guide to learn how to capture packets and send new ones.

I hope this helps,

Boaz.

Upvotes: 1

Related Questions