I need to build a local fake http server. It will listen all my http request and will decide which packet will be dropped or forward or delayed. Can I do that ? If I can how can I do it ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes
First, make a socket server:
http://www.switchonthecode.com/tutorials/csharp-tutorial-simple-threaded-tcp-server
Next, parse HTTP and respond to it (linked in HTTP/1.0 for simplicity):
http://www.ietf.org/rfc/rfc1945.txt
As for “dropped or delayed”, a “web server” does not operate at a packet level, you will have to clarify what you need it to do.