My HTTP Proxy

For our Data Communications and Network Programming course we had to develop an HTTP proxy server in C (yes, C. Not C++. Not C#. C). It was a very difficult project and I want to share my code with the world. The funny thing is: after I finished, the code looked SO simple. It turned out I had such a hard time because I tried to read every bit of the Requests and Responses using string libraries. This works fine for plain hypertext but breaks on any binary data that contains a zero byte (which is most pages on the internet). I eventually realized I had to treat the requests/responses as a series of plain old bytes (and not as a long string) and this solved my problem.

Hopefully this information and my source code will be of use to other students.

DON’T STEAL MY CODE. USE IT FOR REFERENCE ONLY!!

Download: robperson-proxy2

One Response to “My HTTP Proxy”

  1. Khyron Says:

    You were referred by Dwayne Campbell. I’m looking for a programmer, to take on a POC for a much larger scope project. The goal of the POC is multiple: proving that this idea will work (others have done it, but not quite in the same way, scale, or with the same objectives); developing an MVP and initial customer acquisition (or at least gauging interest); obtaining funding; and probably a few other subgoals. Time frame is immediate. Contact me for details if interested. I’m usually on campus on Fridays around CLDC. After this graduation, I may be on campus twice per year, so if you want to know more, I recommend contacting me immediately.

Leave a Comment